# Tuesday, 18 October 2011

In the past, most developers’ approach to code is that you should write it once and hopefully never have to debug or revisit it again. This stems from the traditional waterfall approach of software development where we were trying to completely describe the entire system up front perfectly. Change was bad and bugs were not accounted for and left for the end.

The Agile movement ushered in the first change to this mentality. Agile introduced the concept of refactoring, or writing your software once and then revisiting it (often if needed) and restructuring its internals for improvement (without changing its external outputs). Refactoring is a core tenant of test driven development, where you are encouraged to refactor each method you write at least once.

The Lean Manufacturing movement is built around the concept of Kaizen, or Japanese for “improvement” or “change for the better.” Last week at the first even Lean and IT summit in Paris, France, I heard once or twice about the concept of writing code as a Kaizen event. Software Kaizen goes a step further than refactoring.

The Lean guys were talking about Kaizen as the removal of waste by the improvement of your own work. It is about understanding waste derived from your own decisions, looking at the unnecessary costs created by our wrong assumptions and decisions. The Lean guys spoke about how Kaizen is cultural shift that gets people thinking.

While refactoring addresses each individual method, Software Kaizen takes a much broader approach and looks for waste in your entire work. A lot of time we developers build features and stuff that are not needed. Where did you create a library that you only call once in the name of “maintainability?” Where did you make something unnecessarily complex in the name of “extensibility?” Where where your assumptions incorrect and caused problems or ambiguity in your code? When have you over engineered a feature? Refactoring only partially addresses this, we’ll go in on a regular basis and refactor a few complex methods, but we rarely ask ourselves if we need that entire method in the first place, or an entire feature. Software Kaizen asks us to look at our code and asks us why did we do it this way, with a “cut first” mentality. It challenges the assumptions we made at the time we wrote the code.

Traditional waterfall approached code as something you should write and be perfect the first time and only revisit it when you find bugs. Agile encourages refactoring your methods for improvements in the way it runs and reads internally. Software Kaizen encourages looking your system and looking at the choices you made in the name of maintainability, extensibility, etc, and ask yourself where you were wrong. Software Kaizen focuses on approaching your code knowing you are going to change it often. In the past we fought change, Software Kaizen embraces change as part of the process.

Give it a try, it is harder than it seems. (“Of course I need that really really complex method, I may one day port this code to a Mainframe!”) Good luck and happy coding.

posted on Tuesday, 18 October 2011 02:36:57 (Eastern Daylight Time, UTC-04:00)  #    Comments [2] Trackback
# Monday, 10 October 2011

A lot of people have posted tributes to Steve Jobs over the past week. I’ve seen him called the CEO of the Decade (something I agree with) and also compared to Henry Ford (I sort of agree with). I’d like to call attention to four lessons we can learn from Steve Jobs’ Apple, two positive and two negative. First the good:

Apple avoided falling into the trap of the Innovator’s Dilemma

Apple avoided falling into the trap of the Innovator’s Dilemma. In a nutshell, the Innovator’s Dilemma says the following (I am paraphrasing): when you invent something, first you are trying to penetrate a new market and convince people to buy your invention. At this stage you will do anything to get noticed. After a while, your invention becomes mainstream.  Your profits predictable. Your investors complacent. Then a new disruptive technology is starting to show up here and there. You ask your customers (who are all mainstream consumers or businesses) what they want and you build that for them. Pretty soon, you go out of business (or drastically lose share) because the new disruptive technology overtook you. You failed because you made good management decisions (focusing on profits, listening to customers, etc), hence the dilemma. Henry Ford is credited with saying:  “If I listened to my customers, I’d have built a faster horse.”

Apple constantly churned and churned out new products, defining new categories. The pace of innovation was breathtaking, as soon as a new iPhone was released, there were rumors of a newer and faster one. Some would say that Apple was going to cannibalize their older products with the new, but they forged ahead anyway, with the profits to show for it. Apple embraced the disruptive technologies, not fought them.

Apple worked to create an experience, not just raw technology

When you buy an iPad, you are buying an experience. With the integration with iTunes you can download Apps, books, movies, magazines, and of course music. There is a whole ecosystem around Apple and the iPad, that is why they don’t OEM iOS to other vendors to build a device, Apple wants to control the experience.

Android on the other hand has no such ecosystem. They build the OS and let the OEMs build the hardware. There are phones running Android that are much better than the iPhone and there are tablets that are just as good as the iPad, but don’t sell well. Why? There is no ecosystem. I went into the local electronics shop here in Hong Kong and played with the Lenovo and Samsung tablets and there was no true “feel” to them, it was just a screen waiting for you to configure stuff on. Good for geeks, but not for consumers. My mom needs the simplicity of an ecosystem and an integrated experience. 

Google and by extension their OEMs, figured that slick and cool technology was going to be enough to win. Apple realized that good technology was not enough, users demanded an experience, and Apple gave it to them.

Now some lessons from things that Steve could have done better:

Apple suffers from the “Curse of the superstar CEO”

When I was in business school, I read a case study called “Curse of the superstar CEO”. The article stated that recently we have looked to leaders (CEOs) who have a lot of charisma and we tend to worship them like a religious figure. The curse of the superstar CEO is very problematic, it leads to leadership succession problems as well as exaggerates the impact that the CEO has on the company they are leading.

Steve Jobs was larger than life, the black turtle neck shirt and jeans (which I liked) became a cultural icon. No matter how great a CEO Tim Cook will be, he will always be compared to Steve Jobs and will always disappoint simply for not being Steve. (If you don’t believe me, just ask Steve Ballmer how he is doing not being Bill Gates.)

Apple Took secrecy to an extreme

I understand how you want to keep things secret in a competitive marketplace. I also understand the value of trying to control the message. That all said, Apple took this all to an extreme. They shut down fan rumor sites (by suing fans who were kids!), sent the police to people’s homes to look for a lost iPhone prototype, and never talked to the press.

While this creates a tremendous amount of buzz, it also leads to misaligned expectations. When the MacBook Air and the iPhone 4S were announced, their reviews and reception were not that great as people were holding out and expecting something more. While the secrecy worked to generate buzz, it did not always work out as a positive. When secrecy is taken to such an extreme, it can work against you. While Apple is still super positive, they can get away with a lot, but not forever.

posted on Monday, 10 October 2011 11:43:59 (Eastern Daylight Time, UTC-04:00)  #    Comments [3] Trackback
# Wednesday, 21 September 2011

Today is day 3 of running the Windows 8 Build tablet. Apparently I am the only person in Hong Kong with the Build Win8 tablet and everyone I  know in Hong Kong wants to play with it. Some Telerik customers read my blog post from yesterday and asked me if they can play with the tablet too. I set up a meeting at a local pub in Hong Kong to allow some Telerik customers to play with the tablet. So today, the tablet went into the wild. Smile

Stop 1: Starbucks

I was a little early to meet our customers, so I hung out at Starbucks. Just about all of the PCs in the Starbucks were Macs. I whip out the WinPad and it turned a lot of heads. One guy even came up to me and asked me what type of tablet I had. I did an impromptu demo since I was in the middle of a tweet war with some Telerik colleagues back in Bulgaria. Passed the tech elite/Starbucks test. SMS from our customer, so time to meet at the pub.

Stop 2: The Pub

When the Telerik customers showed up at the pub they went to work with the tablet. They liked the desktop mode option and we got into a long discussion on Metro only vs non Metro only devices.  Played a little with Visual Studio and looked at the references for a native XAML app. Spent a lot of time on Metro. We all agreed that if Win8 delivers as promised, Apple has a ton of completion on its hands. After an hour of playing and talking, I can say that it passed the enterprise customer test. We’re late for a networking event, so it is time for the next pub.

Stop 3: The Next Pub

There is a monthly networking event in Hong Kong called Web Wednesday where the techies and social media types gather around and talk shop. When we walked into the pub, I bumped into Furuzonfar (Foo-bar for short), a buddy of mine who is a student in Hong Kong University. Furuzonfar is an avid WP7 user and took the tablet for a test run. Pretty soon there was a circle of people around him and they where playing for a long time. Passed the college kid test.

A guy from Intel came by and played with it for a while too. He was happy that it was running an Intel chip. Smile Then some other WP7 enthusiasts came by and I had to snag a photo. Suddenly WP7 is a lot more compelling.

2011-09-21 19.20.10

Furuzonfar was generating so much attention that a reporter from the Financial Times came by and wanted to know what was going on.  I wrestle the tablet away from the college kids/Intel dude and do a demo for the FT reporter. She particularly liked how you can snap an app to the side of the window. As a mac user, she was impressed, so it passed the reporter test.

Finally it was time for the tablet’s field trip to end and I headed home. All in all, a lot of activity for a tablet in one evening.  I head home to New York for the weekend and will see if it passed the hardest test of all, the Mom test.

posted on Wednesday, 21 September 2011 11:33:51 (Eastern Daylight Time, UTC-04:00)  #    Comments [1] Trackback
# Tuesday, 20 September 2011

Yesterday I blogged about using my Windows 8 tablet as my main machine for work and device for play. Today I will share my experience in using the device for building a Metro app.

The first application that I ever wrote was 19 years ago for the Timex Sinclair 1000. (I can’t believe that I am that old!) I’ve come a long way now writing for a touch enabled device (but the TS 1000 was about the same size of an iPad.). Keeping with tradition, I will write a simple “Hello World” and see how it goes.

Step 1: Load Visual Studio

Sounds easy, right? Remember this is Windows 8, so we have to tap Visual Studio in the Metro start screen and then wait for it to load in “desktop mode.”  Ok, it was pretty easy. I’m using Visual Studio 11 Express Edition, the one that came with the machine. (I have not downloaded the Ultimate edition yet, I will do so shortly and get back to you.)

Photo1VS

Step 2: Create the Project

When you load Visual Studio, you will notice that there are only Metro project templates. I select Visual C# and the most basic type of project an “Application.” This is a blank container for a Metro application.

Photo2ProjectType

Step 3: Write Some XAML

I could not seem to open the project in Expression Blend 5 Preview, so I had to code the XAML by hand. I inserted a Button and a TextBlock. I’ll do the classic “Hello World” using a tapped event.

<UserControl x:Class="SuperCoolMetroApp.MainPage" ...>    
    <Grid x:Name="LayoutRoot" Background="Green">         
        <Button Name="MyButton" Content="Metro Button" Tapped="Button_Tapped" 
                HorizontalAlignment="Left" VerticalAlignment="Top" 
                Width="166" Margin="338,106,0,0"/>
        <TextBlock Name="MyTextBlock" HorizontalAlignment="Left" 
                   TextWrapping="Wrap" FontSize="20" Text="" 
                   VerticalAlignment="Top" Margin="535,106,0,0" 
                   Height="74" Width="391"/>
    </Grid>    
</UserControl>

Step 4: Write an Event Handler

After fiddling around for a while, I realized I was thinking way too much like a Silverlight/WPF developer and not a Metro developer. I quickly discovered the “Tapped” event and wrote an event handler for it.

//my first C# code for WinRT!
private void Button_Tapped(object sender, Windows.UI.Xaml.Input.TappedEventArgs e)
{
    //Hey, it's a start ;)
    MyTextBlock.Text = "Hello Touch!";
}

As I looked over the new events and properties, I realize the power of .NET. While I was using something familiar (XAML and C#), I was also using something new (a touch based API). The .NET framework abstracted away the WinRT API for me into something I can deal with and understand. Very quickly I was able to come up to speed with the object model for XAML touch enabled controls. (You can also do checks to see if they are touch enabled and provide a classic “click” event for example.) I think people may pass over this point too quickly, we are finally getting the true promise of the .NET framework: we are using the CLR and C# on top of a NEW platform/API for the first time (unless you are a MONO developer.)

Step 5: Running your App

Time to run the app. I hit F5 and took a video for you to enjoy. Notice that I swipe to get back to the desktop mode after I am done using the application. Cool.

That’s it! In just a few easy steps, I became a device/tablet developer. Try that in Objective-C.  Winking smile

posted on Tuesday, 20 September 2011 05:48:45 (Eastern Daylight Time, UTC-04:00)  #    Comments [1] Trackback
# Monday, 19 September 2011

Today was my first day back in the office for my job at Telerik and I decided that I would try an experiment. I would use only my Windows 8 tablet that I received at the Build conference last week for both my work and play. I put away my Lenovo laptop (for work) and my iPad (for reading in bed) and decided I would use only the tablet for the next few days.

The tablet came with a Bluetooth keyboard and dock, so I put that together and started to play around.

 IMG_20110919_172548

The first thing that I realized is that the traditional Windows “Start” menu is gone, completely replaced by the Metro UI. Cool. Then I installed the imperative items:

  • Evernote
  • Dropbox and Live Mesh
  • Live Writer
  • Skype

I had to install them in “Desktop” mode and they showed up in the Metro Start menu. Cool.

My day started with doing regular emails back to the Telerik offices around the world, so I did that through Gmail and Outlook Web Access in Internet Explorer 10 in the Metro mode. Quickly I realized that I don’t need a mouse, but have a USB mouse nearby very handy.

Telerik’s CEO popped up on Skype to talk for an hour about Build and other things. Worked just great, I forgot I was on a prototype machine. Skype only worked in Windows Desktop mode though. It would be great when Skype is a “live tile” and gives me notifications and messages.

I then went into Visual Studio 11 Express that came included with the machine. Built a few simple Metro applications with XAML and C# and .NET 4.5. I felt like I was building Silverlight or WPF applications, it was pretty straightforward. (More on this in the next blog post.) I tried to share a screen shot of the application on Facebook via Socialite (the built in Facebook app for Metro), however, there was a bug there.

After a few more hours of editing documents, emailing and skyping, I called it a day for work and went out for some dinner. I used the device in “slate” mode and dealt with it touch only and no keyboard/doc. I was able to consume most of the content I like to consume (Facebook, Twitter, hacker news, TED videos, RSS newsfeeds, etc) while eating as if it was an iPad. Obviously there are no apps available yet so I had to do this all via the browser. To be honest, the experience was just fine. (I am not a heavy iPad user, if you play a lot of games, etc, on your iPad, you will miss them until Microsoft opens the App Store.)

I played some Sudoku with my Twitter feed docked on the side, great for my ADD! Smile 

IMG_20110919_174330

The key thing that I realized after one full day with Windows 8 is that the new Metro UI is the main experience. Even if you are going to use Windows 8 in an enterprise with just the “Desktop” mode, you will interact with the Metro UI as your “Start” button and application launcher (I played around with a mouse and keyboard for a few hours and the Metro UI worked fine with a mouse and keyboard). I am thinking about in the future if you are using a Win8 PC at work and you also have an ARM based Metro-only Win8 tablet/pad at home. The UI and experience are exactly the same for most of your operations. That is pretty compelling.

Lastly I wrote this blog using Windows Live Writer. Time to call it a day. Tomorrow I will post my experience using the Visual Studio 11 Express edition.

posted on Monday, 19 September 2011 05:56:42 (Eastern Daylight Time, UTC-04:00)  #    Comments [2] Trackback
# Thursday, 15 September 2011

The Microsoft developer ecosystem has been alive with buzz about Windows 8 all week at the Build conference. What everyone is talking about is the new Metro user experience and interface and the new WinRT API that supports it.

I was one of the lucky ones who got a ticket to Build before it sold out and received the developer prototype hardware tablet running the early preview of Windows 8 (I’ve never had prototype hardware before!) After playing with it for a few days, I can say that while the app store is not open yet and it is obvious  that the software is pre-alpha (there is no Metro mail client for example) running on prototype hardware, I can tell you that the new Metro UI experience is awesome. The iPad will have true competition.

While the iPad ushered in this form factor and paradigm, with Windows 8 Metro, Microsoft has taken it to a new level.  Windows 8 Metro uses the same immersive app concept pioneered by the iPad, however, the desktop is alive with data via “live tiles.” Instead of boring icons like the iPad, Metro gives you a truly interactive experience. The live tiles are live updates from the apps, everything from RSS feeds and Twiter to stocks and weather. You have full control over this experience and can customize the notifications or even turn them off (but not sure why you would want to do this.)

As I have played with Windows 8 all week, I never found myself going to “Desktop” mode on the tablet. As I interacted with the Metro tiles, I found myself doing all of the “tablet” things I normally do on my iPad. When I had to “work” (like write long emails and blog posts), I found myself using my laptop.

Windows 8 gives you the ability to have the “best of both worlds” where you can use the Metro style UI and then when you need to, dock your tablet into a station and use it in “desktop” mode using traditional Windows with a mouse and keyboard. This is a great feature that will undoubtedly be used by millions of people.

That said, Microsoft needs to OEM a version of Windows 8 to tablet hardware developers that will only run in Metro mode. While I fully expect that my next laptop will have a touch screen and I will interact with Windows 8 Metro mode often on it, my experience on the laptop will mostly be running in traditional desktop mode with a mouse and keyboard (try writing this blog post on a tablet today). At the same time, I would also want a (cheaper) Windows 8 tablet where I only interact with the Metro UI. Just like how I have a laptop PC and tablet iPad today, I use each in different scenarios. In short, laptop for work, tablet for play.

When people buy a tablet like the iPad, they want the immersive experience and that experience only. I have argued before that people don’t want a tablet that is a laptop replacement, they want both devices. When using a tablet, I don’t need to go out to the desktop mode and use Outlook, I just want to use the touch UI and a lightweight app for my mail. When using my laptop, I don’t want the constraints of a tablet. They are different devices that have different uses.

With a Metro-only SKU of Windows, the tablet vendors can build truly awesome experiences that don’t have any of traditional Windows running. They can build lower power devices that run on ARM and hit the $500 or below price point. It will be clear that this is a “tablet” and not a PC. People love the experience of the iPad, they like how they are constrained and can’t do the things they do on their PCs. These constraints force the consumer to interact with the iPad differently, and that has led to its success. If Windows removes those constraints, allowing the tablet users to shell out to Windows, then it will most likely confuse the customer and ultimately fail. Just like all of the Android tablets trying to add “laptop” features and have failed so far.

I asked a Microsoft executive point blank yesterday if they were going to have a tablet Metro-only SKU of Windows. While he said my question was “insightful”, he said Microsoft has made no SKU decisions at this time. At least he did not say no. Winking smile

posted on Thursday, 15 September 2011 12:59:40 (Eastern Daylight Time, UTC-04:00)  #    Comments [3] Trackback
# Thursday, 08 September 2011

I have argued before that the Android tablet market is a mess and can’t compete with the iPad. I said that the Android manufacturers were developing a tabletized laptop while Apple was developing an “experience” centered around their integrated services.  I made the claim that only Amazon can really take on the iPad with its integrated experience and books, music, video service as well as its own AppStore. Last week it was leaked that Amazon is nearly done with a 7 inch Kindle branded Android tablet. It should sell for about $249 and hit the markets in October or November.

While it is true that Amazon will be taking on the iPad and giving the iPad its first real competition, the real game-changer is for the Android tablet market. Analysts are already saying Amazon will sell 5 million units-this year. (That means in 2 months!) Except for maybe the Galaxy Tab (before Apple sued Samsung due to patents), not a single Android tablet was able to penetrate the market.  If they could not stand a chance against the iPad, they will stand absolutely no chance against both the iPad and Kindle-pad.

Another loser in all of this is Google. Since Android is Open Source, Amazon took a pre 2.2 version of Android, forked it and customized it for its own needs-without any interaction from Google. No Google apps, no Goolge Marketplace, all Amazon branding and Amazon services. So the best selling Android tablet will have nothing to do with Google!

posted on Thursday, 08 September 2011 05:49:51 (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Tuesday, 06 September 2011

Back in January, I argued that AppStores are not necessary as mobile economics mature and start to mimic web economics. Why do I need to download Skype from the AppStore when I can just go to Skype.com and do the same?

appstore

Apple changed the rules and suddenly the AppStore looks like it may die a toddler. Back in February, new rules for advertising revenue and media content were implemented by Apple. If your app is in the app store and you generate revenue from a new customer, you have to give Apple 30% of the revenue of everything you sell.  As per Steve Jobs:

"Our philosophy is simple -- when Apple brings a new subscriber to the app, Apple earns a 30% share... When the publisher brings an existing or new subscriber to the app, the publisher keeps 100% and Apple earns nothing."

Talk about a finders fee! Take the Kindle for example. If a new customer downloads the Kindle on the iPad and buys a book for $10, Apples gets $3 from Amazon, killing its margins. The same for the New York Times, Economist, Financial Times, and other magazines. What particularly vexed those publications is that Apple would tell the publisher absolutely nothing about the subscriber (Apple owns that data!), reducing any ability to personalize marketing to their own subscribers!

Content Producers Strike Back

The content producers started to fight back. Amazon was the first to strike with its web based Kindle Cloud Reader. It is a web application that uses web standards (HTML5) to allow users to read (online or offline!) their books. You can install a link on your iPad home screen making it look like an app, but it is not. It is just a web site and you completely bypass the AppStore, allowing Amazon to keep 100% of the revenue and customer data.

Another popular content producer struck an even deeper blow to the AppStore. The Financial Times, the winner of the Apple Design Award in 2010, has done the same as Amazon and released a cloud based version of their popular iPad app. Then in a move that can only be described as insurrection, the Financial Times has pulled its (award winning!) iPad and iPhone apps altogether from the AppStore!

With such moves by industry leaders Amazon and the Financial Times, the floodgates are open for others to follow. Apple can’t block the web in its devices, so it is the end of the AppStore as we know it. Even if Apple comes back and says, “ok ok, we will only take 3%, not 30%”, why would Amazon give Apple 3% when it can keep 100% for itself? Tasting freedom, publishers will never come back.

It was nice knowing you AppStore. RIP.

posted on Tuesday, 06 September 2011 05:51:05 (Eastern Daylight Time, UTC-04:00)  #    Comments [7] Trackback