Catching a Mouse for Acme

Recently I added Acme (from Plan9 from User Space) to my very short list of preferred editors/IDEs. As it turns out – one needs a great mouse to be able to do any work at all with Acme, which led me on a search for a good device that would be inexpensive (so no Evoluent) and fitting for Acme. To execute any command in Acme a properly functioning middle mouse button (B2) is required.

After researching for a while I got a hold of a Logitech T400 and added my experience to the thread below, which is a good anthology of Acme-compatible mice:
comp.os.plan9 › [9fans] Logitech T400 mouse with Plan9 and Plan9port Acme:

The Logitech T400 seems to be the cheapest modern mouse that has a clickable middle button and the potential to work well with Plan9/Acme. After about a week of fulltime use – it works better than anything else I have tried (Logitech with a scroll wheel, Apple Magic Mouse :/ )

The T400 does have a native B2 – which is the very top (back) part of the touch-scroll section – closest to the middle of your palm. Without any configuration B1,B2,B3 work out of the box, but not without bending your middle finger to reach B2 under your palm.

I found the touch scroll to be fairly sensitive and easier to activate accidentally vs same functionality on a scroll-wheel mouse.

T400 is a wireless mouse with a tiny USB piece, which is recognized and works out of the box on GNU/Linux and Mac OS X (provided you use Plan9 from User Space)

For use with the Acme editor – the front part of the touch-scroll on the T400 is most interesting and important. By default the button emits Meta / Command key (as if it’s a keyboard). It would have been nice to have a hardware switch that makes the entire middle button (aka touch-scroll) act as a B2 – but no such luxury.

On GNU/Linux (Arch) I was able to easily remap the Meta key (Windows logo) to a B2 with the following commands:

$ xmodmap -e 'keycode 133=Pointer_Button2'
$ xkbset m

Because my window manager (Awesome WM) uses the Windows Logo key extensively and the script above remaps it to a B2 click – navigating around Awesome with the default keyboard config becomes nearly impossible. To solve that – I reconfigured Awesome WM to use the Alt key as its Mod1 instead.

On a Mac OS X the Logitech T400’s middle front button emits a ⌘Command keycode. Remapping that (for free) to B2 in the OS proved difficult. I decided to patch Plan9 from User Space (devdraw/cocoa-screen.m). With my patch the actual ⌘Command key on my MBP’s keyboard emits a B2 click in Acme (in addition to the Command keycode). A caveat with this patch – pressing keyboard’s ⌘Command key in Acme would cause execution of the text under the mouse pointer. (I find this to be a bonus rather than a bug since Meta doesn’t do much in Acme)

Patch is here: (critique is welcomed)

Hope another Acme user finds this helpful!

On a similar note: What kind of shoes do mice wear? Squeakers of course!

Why Bank of America sucks and how I fixed it (today only… for myself…)

Sometimes push comes to shove and you have to do an international wire transfer. ASAP! Stuff happens, it’s an emergency. Not life threatening in my case, but nevertheless – an emergency.

Quick research shows that with Bank of America there are 3 ways to that:

  1. the old-school way – at a branch
  2. maybe over the phone
  3. for sure – online

Logged in. It took about ten minutes to prepare for the transfer (create a new recipient – address, bank account number, routing numbers, bank’s address, currency etc.) Then a few more minutes to enter the amount, get the text messages from SafePass, verify etc.
At the end of the lengthy process a rounded button lights up on the bottom: Make Transfer. Clicking on it is kind of a cathartic experience – after all that work of triple checking long numbers and international addresses – this is it – click and it’s done.


… nothing …

A yellow hover note appears next to the mouse “Make Transfer- Unavailable
First… what’s up with the spacing around the dash?! But then I guess most importantly: WHY IS THIS NOT WORKING??

The status bar shows: javascript:void(0);

Click! … Click! Click! … Click! Click! Click! Click!

… nothing …

(Or I transferred everything I had… and more…)

There’s that 1-800 number on the back of the BofA debit card. Dialed it!

  • “For online blah blah blah presss 5… beep beeep. Hellooo, how may I help you!”
  • “Online transfers don’t work. Pressing ‘Make Transfer’ doesn’t make anything”
  • “Oh yes, sir! We’re aware of the issue – other customers have been calling too.”
  • “And?”
  • “Well branches are closed on the weekend so the web site is the only way to do a wire transfer. My advice would be to call back Monday…”
  • “Ahm… Monday Pacific actually means Tuesday on the other side of the Globe. That doesn’t work for me!”
  • “Sorry there’s nothing I can do!”
  • “Transfer me to the Transfers department!”
  • “I can transfer you to Transfers but it’s Sunday – they’re closed…”

I don’t say bad words… typically. Not today!

Hung up!

You know that feeling – stuck in a plane… on a runway… for 3 hours… and there’s nothing you can do about it.
Same feeling – your money is in an account. You need it – there’s a legal way… generally… But not today! Today is not your day – not going to happen… because of someone’s incompetency. Perhaps a systematic failure!


Logged in to the site and went through the International Wire Transfer procedure all over again.

Click on “Make Transfer” – nothing!
Right click on “Make Transfer” – “Inspect Element with Firebug”


Tadaa! (here, read the code:… BTW – if my sanitization wasn’t perfect and you find my banking info in that gist – don’t steal my money… call BofA – they’ll probably just give it to you)

Hm… Weird… Human readable JavaScript? Bank of America does not minify/obfuscate/compress their JS code??!!

Ran makeDFTransfer() in Firebug Console. Got nothing in exchange for brevity!

Alright… let’s read the whole thing

Here’s the definition: function makeDFTransfer() { ... }
Lame – someone must have been working on this thing and commented out validations… And this left in production code?!

Well makeDFTransfer() only calls calculateRate().
calculateRate() then, at some point, makes an HTTP POST to (don’t get excited about the params – I changed the important values):

(amount, fromCfiID and toCfiID… hm… if you find yourself Scrooge Mcducking it because of what I showed you – share with me, k?)

Response is 200 OK and then <fxrateid> 123123123 </fxrateid>

fxRateId? I would have expected something like <transferstatus> OK </transferstatus>

Something is missing…
Scrolling… scrolling… scrolling…


// Make an international wire transfer.
function makeInternationalTransfer() { ... }

Heeey!! document.getElementById('makeTransferForm').submit();

Submitting that form is all I care about at this point!

Executed makeInternationalTransfer()

And then the prompt: “Please wait while we are verifying… blah blah”

Seconds later I got the e-mail:

We have received the following transfer request on June 23, 2013:

Item #: 123123123
Amount: $XYZ
To: Abc Defg
Fee: $XY
Service: International

You can always check your transfer status on the Review Transfer screen at

K! Awesome!

What’s wrong with this whole thing?!

This is Bank of America, people! This is not!

#1 Customer service should suggest workarounds! If the site does not work – there needs to be another way to take care of business – how about phone! It’s 2013! Wait! It’s 2013 the site should be working no matter what!
#2 The site should be working… no matter what! It’s 2013!
How to achieve #2 (and not worry about #1):
#3 QA!
#3.1. Such thing as JS unit test exists
#3.2. Integration testing?! Perhaps spare a dollar, BofA, and hire 100 people in Detroit to test every clickable thing on your site! Make sure it works BEFORE you ship it!
#3.3. Minify/Obfuscate your JS! I can teach you but I’m gonna have to charge.
#3.4. There’s this thing – LinkedIn – go there find new front-end engineers. Actually find a new CIO/CTO

Laurie Readhead replaced Marc Gordon a year ago. If her job is to hire people (middle managers?) who are smarter than her… and their jobs is to hire people who are smarter than them… And at some point some much smarter person puts this stuff in production:

function makeDFTransfer() {
if(fromDFUI() && null!=getFromCurrency() && ''!=getFromCurrency()){
// if(document.getElementById('intlTransferType').value == 'fxWire' ){
if(null!=document.getElementById('intlTransferType').value && ''!=document.getElementById('intlTransferType').value ) {
// }


then Laurie Readhead must be no smarter than a fifth grader. Brian Moynihan – you got some firing/hiring to do!

Ok I’m done! (with BofA too!)

Competition, please!?

A decade in Detroit would definitely make anyone an expert in the culture of the US mid-west – the rust belt. Detroit, much like Eastern Europe, has lived in fear for many years. Globalization was the last slap in the face of Motown and better/cheaper competition obviously put the last nail in the coffin of an era. In Eastern Europe the fall of the iron curtain rendered many state owned business incapable of delivering quality and price comparable to that of the outside markets. In both cases protectionism eliminated competition and lead to the same inevitably suicidal disillusionment – our product is superior, business would last forever.

Silicon Valley is unparalleled in redefining the importance of competition.

The entrepreneurs on the Internet frontier often wake up worrying about the relevance of their work. If there is no doubt in the future of the product then perhaps stability has been reached, innovation is out and obsolescence is in the near future.

@Shervin Pishevar recently tweeted: “When in doubt, believe!”

Innovation means being alone, ahead of everyone else. Walking the path less traveled means you can get lost and never find your way back to relevance.

And when competition arrives – you know you are doing something right.

In the rest of the world the more people line up for your lunch the less you will get to eat.
In Silicon Valley – if someone else wants to eat your lunch – it must be really delicious.

When competition arrives – the fun begins!

On Team Leadership: Motivation and Fear of Disappointment

There must be as many opinions on how to motivate team members as there are different human personalities. Yet there seem to exist 3 easily distinguishable groups of beliefs on employee motivation and how to accomplish it.

The largest group is perhaps the one of team leaders who do try to motivate employees and yet they either fail or are unable to sustain it for long. We could probably agree that the percentage of managers acting as demotivators and anticatalysts of excitement is depressively large.

Then there’s the bizarre group of team leaders who strongly believe that employees cannot be motivated. Employees should find their own self-motivation and should bring forth their best without the team leader having to work for that. The team leader exists to merely give direction, not excite or motivate. Even though these mangers could be part of the first group of failed leaders, they deserve their own category due to the of even an attempt to motivate.

There is the third group of leaders – the naturally and contagiously exciting person. This is the person that may be an officially appointed leader, but employees would have followed anyway. These are the people everyone clings to, looks up to, asks for advice. These are the go-to people for motivation and a recharge – knowledgeable, well respected and admired.

Six years ago I had the pleasure to work with an excellent man, a true leader and a catalyst for personal change at Rochester College. Our paths in life crossed for a year only. Jim Bentley was taken away from us – his co-workers, his family and friends. This one year we, his colleagues, grew perhaps the most in our personal lives as well as careers. Jim had a unique way to deal with every person…

Bentley taught us how to work hard, work after hours, get things done on time and apologize for not having done enough. He talked to everyone, cared for everyone and took every personal matter to heart. Every morning he gave us our dose of energy, charged us, excited us and let us run.

We delivered. We were happy to work for him and asked for more. Work seemed as an unending hack-day… I share Doug’s feelings and lessons learned during that period of my career.

Six years later I am reminded of Jim’s greatness as I see his way of leadership practiced at Meebo. A culture of strong leadership and great motivation provides young leaders with a complete tool set for driving the fast growth of the company. The constant effort to communicate, educate and motivate creates one strong and healthy team – a true pleasure to work with.

Walls up, culture out

In a world of still booming high tech business, upgrading the office environment – from open floor plans, to cube farms, to full blown offices – seems logical and natural progression for a company. As an organization grows, the open floor plan gets noisier and more distracting. Soon cubicles appear to be the only step towards efficient use of space and higher productivity. If the company continues to grow and prosper – offices pop up, employees happily move in, decorate them, close the door and… work. Environment looks better than ever. The hierarchy of the organization transpires – big boss is in the elegant, hidden office in the corner, while the dispensable workers are lumped together somewhere in a windowless area.

For a software developer an open floor plan is noisy and agitating. It could only fuel the super short attention span the Internet-savvy people have nowadays. Provided an office – developers can focus, close themselves in their private creative micro cosmos and thrive, churn out code and be happy. Management and employees seem to agree – offices are the ultimate win-win scenario for productivity and employee happiness.

So companies invest large amounts to erect walls, put doors and close them. Some even put locks on the doors. Barricaded in their offices employees start using phones instead of their feet, avoiding eye contact. The number of faces one sees on a daily basis diminishes. If timed right, it would be possible to spend a day at work without facing another human being.

The company invests in building up offices and kills it’s culture as a result. Transparency is gone, sharing is marginalized to e-mail communication and exchange of ideas happens only during the occasional scheduled meeting.

Another scenario is possible – a less naturally occurring one.

The entire creative/development team is on the same open floor. No walls, no cubes, no extra furniture. Directors sit in the middle of it all. Teams are grouped together, yet still with everybody else.

Then Adam from Team X walks up to the Director and asks a question. Director turns to Brian for help. Charlie from Team Y overhears the struggle to resolve a problem and joins the conversation. Garry, the system administrator, has an opinion as well and chimes in. After a brief discussion Adam knows how to proceed. This situation engaged the minds of multiple people, gave a chance to the Director to lead, to inspire and to actively make a decision and show a general direction (to everyone in the environment). This becomes a public manifestation of the culture of a company – it is a way to build strong teams, preserve the environment and lead with example.

Other overlooked and neglected company culture elements that are destroyed by the erection of office walls and thrive in open office plans:
– transparency – who does what, when, how much
– accountability – pressure to work, rather than spend time on entertainment
– ease of approach – lack of doors makes it easier to approach a colleague and ask a question
– communication – more constructive and productive dialogs take place, engaging more people, drawing more expertise

Social Networking Revisited: Why an Online Presence is Important

In the mid-nineties my first web site was published online. It seemed like a big achievement – not many other people had their own personal web spaces. A decade and a half later and years (after all content was deleted) it was quite disruptive to find the site cached at The content is not what I would have published today, knowing what the Internet would be transformed to. The web became hostile and unfriendly to the initial web builders, the explorers of the digital frontier (web 0.2 at that time). The site has been long removed since then and I still find broken links to it from other early adopters.

Later I found a renewed enthusiasm for the web. In the mid 00’s I was excited about re-connecting with friends on Facebook. It seems that by that time entering personal information on any web page has become something of a habit. Safety wasn’t a concern. Privacy wasn’t an issue either… it seemed. When the site opened up its gates to my Alma Mater – students were readily volunteering whatever personal data the was required and more.

Then things got ugly. Privacy became a concern for many. We realized Google is indeed making money and our private data is in the core of its business model. Identity theft protection ads even appeared on highway billboards – brand new profitable business. I closed my Facebook account. In fact I closed whatever accounts I could. My desire was to completely wipe out my online identity. This lead me to 2 realizations:

  • There’s no way to remove what’s been published out there. It’s been cached/archived and it’s perhaps impossible to remove it.
  • Disappearing from the Internet may not be the best for the personal/career growth of an individual

I realize now that appropriate presence in select social networks is of crucial importance to one’s personal and career growth. The Internet gives us all a voice. There might be a lot of noise out, but the nature of the digital media provides strong filters too. A strong, valuable opinion would be heard. Talent does stand out and the people who search for real knowledge would find plenty of it.

Here is my advice to you, skeptical Internet user:

  • first and foremost – determine what part of your life may be enriched by an Internet audience (what goals would the Internet crowd help you achieve?) [example: you want to be a great cook]
  • avoid most social networks, but embrace the niche ones – these that support your life’s goals. [if there’s a – join it]
  • don’t post all of your personal information – only what may pertain to the niche you’ve selected
  • blog about the specific topic only – posting anything that comes to mind may result in alienating your audience / friends [perhaps other cooking enthusiast don’t want to hear about your car problems]

Before posting even a single line of text on the Internet, think of the picture this would paint to an individual, who knows nothing else about you. Is this the image you are going for? (Think of the people who might read it: family members, business partners, recruiters, folks from your communities)

Harvard Business Review’s article “Managing Yourself: What’s Your Personal Social Media Strategy?” explores this topic as well. Read it to find out why corporate leaders must have an appropriate online presence!

Worries of a SaaS developer

Often times programmers would state – “Great developers write good software – fast and reliable.” Or perhaps… “Do it right the first time you won’t have to worry about it.”

Truth in the SaaS world is not so obvious…

Back in the days, when commercial software meant executing business logic on the local CPU, these statements may have been true in some broad sense. Then the Internet evolved and and SaaS was born (and is maturing fast).

A recent discussion with a traditional software developer lead me to the realization that the challenges of the SaaS developers remain a secret to the wider community. My colleagues and I are developers who takes pride in the up-time and optimal performance of our software – Plex Online. Yet often we find ourselves worrying at night about the product created and put in production during the day.

While both traditional software and software as a service may suffer from bugs, slow performance, hardware failures etc., SaaS developers have to be vigilant for a whole new set of troubles.

True multi-tenant software as a service products (such as Plex Online) rely on the Internet to deliver value to its customers. The performance of our software is directly related to the reliability, latency and built-in redundancy of the Internet connections at both consumer’s and provider’s sites. Another set of points of failure fueling worries are the pieces of infrastructure in between – routers, firewalls, intrusion detection systems and proxy servers. Experience shows hundreds of possible situations in which SaaS could be affected by:

  • caching servers (causing stale data)
  • intrusion detection systems intermittently blocking traffic
  • and firewalls ignoring certain URLs (too long, improperly formed etc.)
  • interrupted AJAX calls due to length of strings, specific content
  • content filters (false positive on the data transferred between data center and workstation)

My hope here is that most SaaS developers have the luxury to leave network-related stress to be handled by data-center staff / site reliability engineers.

Another area of risk and unpredictability is… customer’s behavior. We have seen enterprises changing business practices over-night. Often drastic changes in the way an enterprise handles the daily operation may result in a very different data distribution in the core of the ERP system. That would require in some cases adjustments to the software as well.

Modern database systems on which SaaS is built (Oracle, MSSQL, MySQL) have the ability to find an optimal algorithm for a given task based on the size of a data set. This ensures timely execution of queries. These databases also offer the ability to cache the best execution plans and reuse them. Cache is necessary as determining optimal algorithm for a given set may be resource-intensive. When an event however causes customers’ data to change drastically, skewing the statistics gathered on the existing sets, cached execution plans need to change as well.

This problem may be compounded by multiple customers’ data changing rapidly and unexpectedly all at the same time. In multi-tenant environments where customers share the same code-base, this may result in software module that performs fast for one customer, yet very slow for another. These are the cases that keep SaaS software developers (and performance analysts) awake at night on emergency calls.

Traditional software (single user/enterprise) is immune to such trouble. (Problems of traditional/locally hosted software from customer’s perspective will be explored in a separate article.)

Predicting Demise of the Mobile App Market

We’ve heard it many times – Android overtakes iPhone sales (

One very interesting development – mobile software profitability – is often overlooked.  It remains in the shadow of the Android-vs-Apple hardware sales noise.

Yet Pingdom focuses on a true differentiator and a real issue:

Why Android developers are losing money, and it’s not due to piracy” (

Why aren’t we hearing more stories of careers made off the Android Market (

  • – Android users less likely to pay for an app (cheapskates??)
  • – ad revenue isn’t as high for Android apps as iPhone apps (about one-seventh or one-eighth)
  • – fragmentation/legacy android platforms (too many pre-Froyo)
  • – tough to find good apps – Google/Android market isn’t doing much to improve this – is the market “too open”?
  • – Android/Google Market’s return policy ( – 40% returns of applications


One could easily conclude – Apple’s is the only App Market that makes business sense.

  1. rapidly improving mobile browsers (HTML5 – JavaScript – OpenGL in a browser ==
  2. growth of the mobile screen (iPad, Droid X, EVO)
  3. expanding data coverage / mobile broadband (4G, 3.5G, WiMax, LTE) (in 3rd world and developed contries)
  4. app markets full of cheap/free & ugly/useless apps

… can’t help but predict the demise of the mobile app markets.  The last to close would be Apple’s.  If the existing app markets do survive for a little longer – it would be primarily because of the sale of games… until HTML5+OpenGL becomes a mature game development platform!

А ми се иска да си беше по старо му…

Две хиляди… Може би дори деветдесет и осма да е… Разхождам се по пазара – улица Пазарска свършва… Започва площада, който е зад джамията в центъра на Стара Загора. Обаче не може да се пресече улицата без да се заобиколят сергийките на “Пълнене на запалки” бизнеси. А колко са много – като гъби бяха навирели тогава. Не помня 10 стотинки ли беше или левче да си напълниш запалката. Струва ми се като сън – било ли е така или не – не съм сигурен. Да не би да си измислям всичко това…

Помня обаче със сигурност че незнаех как тези хора успяват да оцелеят. Чудех се тогава (по свой първичен и наивен начин) какъв им е бизнес модела? Как или по-точно какво е това което ги води всеки нов ден на същото място, със същата масичка с червена мушама с бяло-жълти цветенца… с малкото менгеменце и голямото шише газ-пълнител-аеросол… Чичковци някакви, засмени, щастливи, гръмогласни с побеляващи мустаци… но стабилен явно бизнес…

Върнах се там… на ъгъла зад Електродома след 10 години – НИЩТО. Няма ги вече… Даже и кино имаше там… и него го няма от край време.

А ми се иска да си беше по старо му.

“GPS not allowed” says the Blackberry LocationProvider

“GPS not allowed!”With this message Research in Motion is telling me that unless I pay $20 and register on their site I will NOT be able to run my software on their device…

That makes me wonder – is the device RIM’s or mine?

Recently I’ve been developing an unsophisticated application for blackberry devices.  I’ve applauded the Blackberry’s ability to download software from any URL, install it and run it.  When I included a reference to the Location Based Services API however, an exception was thrown…  I am not allowed to use certain RIM controlled APIs.  I have to prove who I am, pay and wait 2 weeks for a key.  (Reminds me of a painfully familiar Eastern European beaurcratic regime)

What is the reason for  these complications?

RIM insists this is done for “for security and export control reasons,” yet neither Android, nor Symbian has ever asked for anything similar…

Case will remain opened for now…