If Steve Ballmer Ran Apple

Interesting analysis on Steve Ballmer’s Microsoft by Ben Thompson, who left there a few months ago. I particularly found this paragraph interesting:

In the consumer market, it’s the immeasurables that matter. It’s the ability to surprise and delight, and create evangelists. It’s about creating something that developers demand access to, and that consumers implicity trust. The consumer market is about everything you can’t measure, everything Microsoft’s legion of mini-Ballmer’s can’t see and will never appreciate.

I can’t help but wonder when this happened? I can only assume Microsoft changed after Ballmer took over. All of the Microsoft business and process books I read in my younger days (back when I read a lot of those books) all seemed to indicate a Microsoft that wasn’t particularly focused on metrics. In fact, Bill Gates seemed to be every bit the demanding leader with his fingers in every pie as Steve Jobs is described. Maybe this is really a story of what happens when founders leave their companies. Most don’t survive, at least not in the high-flying state they were with the founder.

It also was a company back then that seemed to be as strong with consumers as it was with enterprises. Everyone I knew who had a computer in their house had a Windows computer. Now, it seems, everyone has a Mac at home. When did that happen? And what made that happen? Was it a coolness factor? The iPod? Better computer systems? It also seems that the virus epidemic was a big factor in this as well.

Finally, I can’t help but wonder if Microsoft’s struggles are also a parable on the risks of putting sales people in charge: an extreme focus on money, exactly the thing most of us technologists seem to care the least about.

Controlling Content Editable

I’m burned out. I busted my rear end last week writing a piece of code that has been a major problem for us. Equals uses a web technology called content editable. In short it allows a developer to segment a section of a web page and say that the user can type there. It is similar to a text area but content editable allows for rich text editing (bold, lists, headlines, etc).

The concept of content editable is amazing but there are a couple of major problems with it:

  1. The standards are different across browsers. How returns are treated, for example, is completely different on WebKit (Safari and Chrome) than IE than Firefox. I haven’t even tried it on Opera and other browsers.
  2. The cursor is a foreign thing to most browsers. Except for text areas and text fields, we were never really meant to be able to see a cursor on an HTML page.

We had to make a number of very difficult decisions here and have to admit that one of the reasons Equals is taking longer than we anticipated is simply because we ended up re-writing most of the way the note is handled. Equals relies heavily on every line having an appropriate container, whether that is a div, a p, or a header tag.

When we started out we thought we would write our code to control the cursor and then would modify the content editable area as we went along. But what we found is that controlling the cursor is very difficult. Since controlling the cursor isn’t well supported [1], making sure it always does the thing we want it to do is dangerous. We had all kinds of weird behavior.

Furthermore, the original code we wrote for this is the first Javascript code we had written. What a horrible way to get our feet wet! Upon further study, it became clear that there was a better way to write this portion of Equals, one that would be much more stable, much more portable, and allow us to do things in the future we couldn’t fathom doing today with the original code.

So a few weeks ago we decided to re-write it. The goal was to generally let content editable do what it wants and then adjust after the fact. We also moved more HTML out of the content editable area, which will stabilize the content and make it easier for us to handle stuff like copy and other across-document functions.

We also found that how we start the HTML within the content editable area makes a big difference on how the browser forms its HTML. It will repeat that first line for every return key if set up correctly. Firefox, though, prefers <p><br></p>, Safari and Chrome prefer <div><br></div>, and IE prefers <div></div> without the break. It also matters when this is set. Firefox and IE don’t seem to care, but Safari and Chrome require page load.

Once I figured this out, other pieces fell into place and typing notes became routine. It all just worked. I took 750 lines of code and reduced it to 150 lines of code. I even was able to handle cut and copy correctly.

Until a user pasted something into the content editable area. Then all hell broke loose. And that’s why I’m burned out.

Last week I wrote 150 lines of code, all of it dealing with the process of pasting [2]. The problem with paste is that it pastes whatever it has in its paste memory buffer, whether that is well-formed HTML or not. Again, I didn’t want to control the contents of the paste. So I let the content editable do what it wants and then, after the fact, go through the entire document and clean it up [3].

The edge cases are ridiculous on this one and I have only tested it in Safari so far, but the code feels fairly solid. It handled a plethora of variations and bizarre behaviors. And if it does end up working out, I have a nice function we can call if an Equals note does get out of whack for any reason. Here’s hoping the code stands and I don’t have to patch it further. This 150 lines could be spaghetti code really really easily.

[1] If you need to deal with cursor stuff, I highly recommend Rangy. We still use it some but not as much as we did in the first revision.

[2] And undo and redo, technically, although I consider both of those a side-benefit of fixing paste.

[3] I thought of alternatives like pasting into a hidden text area, cleaning up the code, then moving it into the content editable area. That may still be an option if my way fails completely in the end. But that required me to control the paste process, and that is something I wasn’t comfortable with having control over in all browsers.

Steve Ballmer’s Retirement Timing Sucks

Steve Ballmer, in his retirement letter to Microsoft employees:

There is never a perfect time for this type of transition, but now is the right time. My original thoughts on timing would have had my retirement happen in the middle of our transformation to a devices and services company focused on empowering customers in the activities they value most. We need a CEO who will be here longer term for this new direction.

I’d like to know what goes through Steve Ballmer’s head. [1] How, in a million years and at this seminal point in Microsoft’s history, did he possibly think he could start a major re-organization of the company and then hand it over to a new CEO part way through? And when he said he’d do it in the middle of the “transformation,” where in that transformation does he actually think the company will be in a year?

I feel bad for the next girl. Not only is she going to have to complete a half finished transition, but she will have to pick up the pieces and try to make it her own company at the same time. If Ballmer was going to retire, he should have done it before the re-org announcement, helping the new CEO formulate the plan and act as an advisor during the transition. Then Microsoft would truly be her company.

I’ve already expressed my perspective on Microsoft and what direction I think the company should go. It’s no where close to the direction Ballmer has set for it. If Microsoft wants to talk anyway, though, I’d be happy to go to Seattle. 🙂

[1] I’d also like to know if this is him being forced to retire, but that’s a separate issue.

The Imperfect Craft

Nice post by Daniel Jalkut on his philosophical change regarding refining his craft:

As a modern software developer, I derive as much joy from remaining relevant as I do from the thrill of identifying and solving the particular problems in my work. To remain relevant, I have to reject my previous assumption that I would spend a lifetime refining my craft. Instead, I will spend a lifetime adapting the techniques of yesterday’s craft to the sometimes radically different challenges of today. I may never become “a real expert,” as I hoped I might be. But by diligently throwing out the old rules and embracing the new ones, I hope to come close.

I would argue that remaining relevant is refining his craft. It is really hard, I think, in the modern coding era to be good at only one thing. Once upon a time I was a very good Palm OS programmer. That skill is completely irrelevant today.

Today I’m a solid iOS, Rails and Javascript programmer. I’ve been programming for almost 30 years and I have never been more relevant and never felt as capable of crafting amazing software products as I do right now.

Taken Out Of Context

Marco Arment on a recent Accidental Tech Podcast:

People assume because I have an audience in some places means that any app I release will be a giant hit. That really isn’t the case. I have an advantage, certainly, by having an established audience. I have an advantage mostly up-front where I’m mostly guaranteed a pretty good launch. After that I’m in the same boat as everyone else.

Marco released the information to his app BugShot here. Since then, he went on to say in ATP, his sales have dropped further and are now down to about 15-20 per day.

I’m saddened to admit that I apparently was the catalyst for that post based on a footnote in my post The App Store Problem Is Not Price. What I meant by my footnote is exactly what Marco said on ATP: he has an advantage, particularly at launch, and nothing more.

What frustrated me was not annoying Marco, although I wasn’t happy about that. We emailed and worked it out. What bothered me was that other people took my footnote, ignored the point I was really making, and focused on the Marco part, leaving out the update I added to clarify the point.

I’ve had a few highly read posts over the years, that one being one of them. But I’ve never had a post so taken out of context by others before. That was a real eye-opener. It felt like a horrible game of telephone. My offhand, misinterpreted footnote seemed to become something else entirely.

Sorry, Marco.