It seems every couple of months we get barrage of mixed messages about livelihood of platform we all make living from and its that time of year again. This time what set off the wrath of community was unveiling of Windows 8 Metro UI touch centric interface and statement that it was built using HTML5 and JavaScript. There was no mention of WPF or Silverlight or .NET… Understandably lot of people are up in the arms.

I have no first hand knowledge of what the plans are for Windows 8, but here are my thoughts based on what we know today. Windows 8 will as every single version of Windows still run GDI based apps. They call it Classic mode, but there will be no dropping of that mode any time soon. That means that all apps that are running today will run tomorrow on Windows 8. Best bet for those apps in my opinion is still WinForms and not WPF or Silverlight. Why? GDI is closest to the Windows platform since it works directly with Windows messages and drawing canvas and those are not going away due to must have “feature” to continue to support millions of apps already developed for Windows. And I bet we will find the way to integrated those with the metro tiles…

Why new User Interface technology is needed?

We know that there will be no investment to further speed optimize WPF (I can’t find link with that statement right now, but when I do I will add it). And since Windows 8 will run on ARM processors so you can have those long run-time tablets, that rules out the WPF. And it rules out Silverlight to some extent unless serious performance optimizations are done. Why? Silverlight is for example slow running on say MacBook Air, in fact so slow that it cannot be used for anything serious. It is not snappy enough when running on netbooks as well. I bring those up since that is about performance of ARM processors running tablets today.

So for Windows 8 to run well on low powered tablets new UI technology is needed. We know that Internet Explorer 9 and 10 uses hardware accelerated rendering  that is snappy and fast enough so it is no surprise that first demos of Windows 8 touch based input shell are written using this combination. However, I do believe that HTML/JavaScript are simply not as productive as .NET stack which is evident to anyone who tried both. Additionally, you can’t really write apps like Visual Studio in HTML/JavaScript. It would be madness. This HTML/JavaScript combo for UI shell is nothing new, Palm WebOS did this already, its not bad but nothing spectacular…

What is new UI tech?

I don’t know, but it has to be hardware accelerated so it uses the graphics chip to render all of the UI. It is possible that they resurrect Visual C++ to target platform natively and it is possible that they start compiling .NET CLR directly to native instruction set, but I think this is unlikely since there is ARM and Intel processor architecture and you’d need two compiled versions of native code to target both.

My bet is on the .NET based stack possibly compiled directly to native code with new UI layer that is heavily hardware accelerated. We will know in couple of months whether these predictions hold true.

What do you think?

 

 

“Any fool can make things bigger, more complex, and more violent. It takes a touch of genius-and a lot of courage-to move in the opposite direction” said Albert Einstein. I’ve been writing code for over 25 years and one thing that I see is in short supply over and over again is simple well thought out code.

I can’t put my finger on why this is, but rarely do I see code that is simple and that I can follow with ease. Mostly I see very complex code with execution paths intervened like spaghetti in the bowl. It is not that work code is attempting to do is complex, it usually is not, it’s that solution implemented is convoluted. I think it is result of unclear thought processes or perhaps inexperience, but it still does not explain why people with seemingly lot of experience still write complex code. Or perhaps it does. Simple code requires conscious effort while convoluted one comes out without much thought.

So if you want to elevate your coding skills, you should as part of your development process, devote time for simplifying your code and architecture. There has to be the time where you look at your code and prune, prune, prune. And if you can’t find anything that you can make simpler and easier you are not looking hard enough.

The finest language is mostly made up of simple unimposing words.
George Eliot

 

 

Do you feel pressured to dream big? Do you feel like you ought to be able to come with some amazing new inventions, but when you try, you can’t think of anything? Dream big dreams they tell you, like that is how it happens. Like it is that simple. And then you feel inadequate as nothing comes to your mind. No earth shattering  ideas. You just can’t come up with anything that will turn world upside down.

I’ve been struggling with this since I’ve been 10 years old. It is complete and utter nonsense I tell you. Problem is that we ready historic accounts of great inventors and they are written as if those great ideas just popped into their heads. Newton got hit by apple and he came up with theory of gravity. How do you compete with that? Or Archimedes taking a bath and then idea pops in his head on how to calculate density based on volume of water displaced. That’s pure genius! No wonder we feel inadequate.

Except it did not happen that way except in history books. It is is subject of debate whether Newton even observed an apple fall. He was not struck by one either. And even if he was, the stories like this discount 20 years of work that took him to explain gravity.

And Archimedes story completely discounts significant time he spent trying to find ways to calculate density of an object. He might have figured it out when stepped into the bath tub when he tried to relieve stress of not being able to find the solution, but only thanks to all the work he has done up to that point.

Its like when you are putting puzzle together. Is there anything special about last piece you put into the 1000 piece puzzle? The only significance is that it finishes the puzzle, but that is only because you put 999 pieces in correct order before it. Any piece of the  puzzle could have been last, but last one is not supremely significant.

So it is with ideas and inventions. They just don’t pop into your head from nowhere. They are result of hard work and curiosity. You see some problem while you are trying to do something and you get curious. You start exploring, learning whether anyone else solved it before, how they did it etc. Then all your knowledge gets digested and it is in this phase, that you may come up with your idea to attack the problem. Sometimes this insight takes very long time. Most of the time it takes lot of work. But, there is no great insight without hard work!

The best way to get new ideas is to immerse yourself completely into the subject matter, learn, explore, understand. Then step back and do unrelated activity so your subconscious can process what you learned. It is usually during these quiet times that ideas pop into your head. But they will not pop unless you put in the hard work required.

 

It all started with statement Bob Muglia, Microsoft president in charge of server and tools business. This was part of the statement:

Silverlight is our development platform for Windows Phone. Silverlight also has some “sweet spots” in media and line-of-business applications.

But when it comes to touting Silverlight as Microsoft’s vehicle for delivering a cross-platform runtime, “our strategy has shifted.”

Silverlight will continue to be a cross-platform solution, working on a variety of operating system/browser platforms, going forward, but HTML is the only true cross platform solution for everything, including (Apple’s) iOS platform.

Lot of people took this as declaration of death for Silverlight. Well, at least for being used to build web applications.

Also, on PDC 2010 the WPF received paltry 35 minutes presentation which spent only 10 minutes on new WPF functionality.

Then earlier this week Evernote which has huge user base switched whole app from WPF to C++. Here is what they said:

…there were some problems we simply couldn’t fix: the blurry fonts, slow startup times, large memory footprint, and poor support for certain graphics cards were all issues that the technology behind 3.5 (Windows .net and WPF) was incapable of resolving. As a result, we ended up chasing down platform bugs rather than adding the great features our users wanted. So we decided to start over from scratch, with fast, native C++ that we knew we could rely on. As you’ll see, the results are amazing. This new version will set a foundation for rapid improvement.

It is for sure, radical departure. I think they could have used WinForms at least and have best of all worlds, but I suspect they experienced lot of pain…

So is Silverlight dead?

If you step back and look at the Microsoft latest message shift, now saying that Silverlight’s primary focus is as a platform for Windows Phone 7 what does that actually mean? Would they say this if Silverlight was widely adopted or at least adopted in line with their expectations and used in web applications? (Keep in mind that they know the best how much Silverlight is actually used.) I don’t think they would change Silverlight message at all if that were the case. Which means that while Silverlight is very nice it simply did not get adopted  for web applications in large numbers that were expected. But that does not mean it is dead, it is probably more important than ever. But important for something other than it was envisioned for. Important for Windows Phone 7, the latest battleground.

However, if you have ever developed web app with JavaScript and HTML you know how painful that is. Silverlight does make things much easier, much more productive so why the heck it is not used more? Its platform that it could be easier to develop for and I’ll cover that later. Read on.

Is WPF dead?

Short answer is, it is not, unless they are cooking new technology we don’t know about. And my money is on that they have nothing so it will be here for couple of years at least which is as much as you can say about any technology…

But WPF is used in VS.NET 2010, I hear you say, that’s good, right? They give it and they can take it away… Things change.

I can tell you that WinForms will be around as long as Windows OS itself works with HWND which it will be for pretty much very long time…

There are and were some badly needed improvements to WPF that took 5 years to implement. For example when 4 years ago I complained about blurry fonts in WPF I’ve been told that they don’t see it. Fonts are fine… I guess they were not fine when they started actually using them so they finally fixed them in WPF 4 and now they started to look acceptable.

It also did not help that they were busy developing ton of new controls for Silverlight and WPF thinking that will spur adoption, but alas it did not help and in my opinion it took focus away from the actual platform. But why not?

Good house is built on good foundation

Developer division in MS is about providing killer platforms so ecosystem can grow around them. They just can’t do it all themselves and they don’t need to.

Instead of making WPF, as platform, super usable with best font rendering, best debugging capabilities XAML and code, best XAML visual editors, best startup speeds, they spend years on other things that are built on top of the platform.

In essence they were trying to build second floor for the house with unfinished foundation… It does not work that way.

When WinForms came out it was clearly better technology than Visual Basic 6. You could do more and you had all tooling support in VS.NET you needed. Debugging worked, visual designer worked. You had all what you liked in VB 6 and more. No wonder we all jumped on it like crazy. It was clearly better.

When WPF came out it was not really better than WinForms. Yes, it had more powerful graphics stack, you can do neat animations, but font rendering was horrendous, it was slow to start-up, it required yet another steep learning curve and VS.NET tooling was crude. So moving to it from WinForms unless you really needed those powerful graphics, and most business apps do not, was step backwards. So most people kept on using WinForms. And they still do! We sell 5 times more WinForms controls than WPF and Silverlight combined. Market voted!

Way forward

I beleive this can be turned around by getting back to basics. And that is the platform! Make platform the best platform for developing client apps and let your ecosystem do its work. Here is what to do:

  • Speed up start-up times. If WPF or Sivlerlight out-of-browser app does not start at least with same speed, if not faster, than WinForms then your platform work is not done!
  • Even better font rendering. You look at text rendered by WPF and text in Windows 7. See any difference? Your platform work is not done!
  • XAML and code debugging. If there is a bug in XAML and debugger does not break on exact line in XAML which is a problem and it tells you what the problem is, your platform work is not done! If I need voodoo to debug Binding is Silverlight and WPF your platform work is not done!
  • XAML User Interface Editor. If you have dedicated XAML code editor window in VS.NET visible by default your platform work is not done! If I need XAML code editor at all, your platform work is not done!

If this platform strategy was in place 4 years ago every single item on this list could have been covered. Do you think we would be talking about death of WPF or Silverlight today?

It is still not too late to get to platform basics. But it has to happen fast!

For DevComponents I can say that while most of our competitors stopped developing new stuff for WinForms we increased our investment there. WinForms will be around as long as HWND is around and that is for mighty long time. We hedge on Silverlight and WPF too with continued investment to make best controls we can make. There is nobody that provides better controls and more value for both Silverlight and WPF than us. I just wish we all could be more certain about both.

What do you think? What tech are you going to choose?

 

I’ve been reading about the celebration Microsoft made for Windows Phone 7 release to manufacturing (whatever that means these days) which was set like a mock funeral for iPhone and Blackberry. I guess this was declaration of Windows Phone 7 as killer technology, because you know, once that is out (so they are celebrating stuff that hasn’t been released) the iPhone and Blackberry are doomed.

Side note on timing because I don’t want to get sidetracked by this, but I find this extremely funny once you stop to think about it. Windows Phone 7 was “completed” on September 1st and its release date will be announced at a media event on October 11 in New York. Uh, huh.

Here is the thing with killer technologies. Killer technology gets its killer status only in hindsight. Killer technology is something that your users attribute to your product after it has been a smashing success. It is not something you proclaim even before product is released. Whenever technology is announced as killer technology, as a rule, it will not be. Proclaiming your own greatness only casts the doubt on existence of it.

So instead of saying what people can do with your product and how it makes someones life easier you concentrate on how your product will kill some other. When did killing become a valuable quality? And why would you market your product with message that has negative connotations?

How do you recognize next killer technology? I don’t think you can, but you can recognize what technology will not be killer technology. It is the one that announces that it is.

 

Software Dictators

If you run any version of Windows with auto-update enabled then you are familiar with this little box:

Use it as reminder of something you should never do.

What’s wrong it? Computer will close whatever you had open and reboot and unless you are at your machine to see this dialog your open apps are gone. Even if you see it your options are to Postpone or Restart right now. In essence you have no choice. Your computer is taken over by software dictator.

I have backup scheduled in the middle of the night. Of course, the Windows updates get installed when computer wakes up from sleep to perform backup, and since that function in Windows does not anticipate that there might be no human seeing Windows Update message, it reboots the machine and interrupts the backup in the middle. Many times I have lost all state I had in open apps until I had this turned off.

The only remotely acceptable option for that Windows Update dialog would be if your desktop and all open apps are returned to exact same state as before reboot. But, they are not.

Contrast that with how Mac OS X handles the OS updates. It does not show any dialog whatsoever. It does not stop your work-flow. The Update icon in dock-bar starts bouncing to let you know something is up and when you click it, you see this (note that icon in dock stops bouncing and just sits there after certain time interval):

And you are free to ignore it as much as you want. You can keep it open for weeks until you decide that updates can be installed and machine rebooted. This design is not taking over your machine and breaking your work-flow to install an update which in no way is what you need right that moment.

On Windows, its race to disarm the reboot ticking bomb.

Software should never be designed so it forces the user to do anything out of the context of his current work-flow.What I mean by that is following; Showing Yes/No/Cancel message box that asks user to save data when application is being closed is in context. It is direct response to user action. Showing Software Update dialog when an application is started is completely unacceptable since it is not what user wants to do. It is not in context of his intent.

When you are not in control of your machine you gets frustrated. There is one more decision to make, one more interruption to take which drives all of us nuts. And because of that we label software and even whole operating systems as hard to use, frustrating and just not pleasant.

This design point is easily overlooked. I’ve made more mistakes like this than I can count. But its contribution to pleasing, easy to use software is huge. Keep it in mind.

Tagged with:
 

Back in February I posted about the Apple iPad and I concluded that iPad perhaps may replace not only netbook, but also laptop and main machine for many people.

Now, 2 million of iPads have been sold in less than 60 days and I think I may have been close to the mark with observations. Here is what Steve Jobs on The D Conference had to say about tablets and PC’s:

When we were an agrarian nation, all cars were trucks. But as people moved more towards urban centers, people started to get into cars. I think PCs are going to be like trucks. Less people will need them. And this is going to make some people uneasy.

Watch this:

iPad is getting lot of mind-share and there is excitement around it that is much larger than it ever was with Windows based tablet PC’s. Why is that?

I had Tablet PC since 2002 when we added Tablet PC support to DotNetBar and I just have not been impressed. Not back then and not today. The tablet features are bolted on top of mouse/keyboard based operating system and are not forefront of the UI experience. They actually get in your way while you are trying to do something. Who wants to write with pen on screen when typing is faster? Who wants to poke into the small areas of screens with pen when using mouse is easier? It is much easier to not use the pen and use mouse and keyboard instead because UI does not fit the tablet device. That’s why I think the latest crop of Windows 7 based tablets don’t stand a chance. Not much has really changed, it is same old, same old.

As consumer, on one side you have iPad tablet with Operating System that is specifically designed for touch input, which works great and is super responsive. It has such strong focus on touch input that using real keyboard with it, is not such great experience. And you can forget about connecting mouse to it, you simply don’t have a need to do it. I am not saying that as anything bad, but to highlight purpose driven touch design. iPad OS* is also designed to work on low powered processors which are both cheaper and use less energy. iPad costs $499, it is fast and battery lasts 10 hours.

On the other side you have Windows 7 based tablets with Operating System that is not designed for touch input. Arguably, Windows 7 tablet functionality is not that much different from first Windows XP Tablet PC extensions from 2002 and in my opinion it stinks. The Windows Tablets are also at least $200 more expensive than iPad, touch input is awkward and unresponsive, they are not really that fast and battery last only 2-3 hours.

I do not think Windows 7 tablets have appeal. They have not sold well back in 2002 they will not sell well today either.

Bright light on horizon is Windows Phone 7 (almost carbon copy of iPhone OS) which is Silverlight powered OS but I have two concerns with it.

It seems that operating system and core apps are not written in Silverlight, which means that Silverlight is second rate citizen on the platform. That may be big downside. If all system applications are not written in Silverlight it is very significant. Significant in sense that API that system apps are using is not directly what Silverlight apps are using and Silverlight based apps will be slower than native phone apps and that will  provide worse user experience. That can easily sink the whole platform since these are not devices with plenty of processing power. There is nothing worse on touch platform when you touch the screen and it does not register. It is frustrating. On iPhone system apps and third-party apps are all written with Objective-C and use same API’s.

My second concern is that for some reason Microsoft says that WP7 is designed for devices with screen size of 3 inches or less and that there are no plans to put in the tablet. But, that does not make sense to me since whole WP7 user experience is panoramic based i.e. it is displaying part of the bigger canvas, something like looking through the window.

So you swipe and zoom to move around… Why would that not translate to bigger screen is puzzling to me. Just look at image above and it is obvious. I think this might be classic case of misdirection to disguise true intent. I think tablets running Windows 7 Phone OS will happen probably next year. Unless Microsoft wants to protect its cash cow (Windows 7 platform), in which case it will lose again on tablet and phone market.

So in opening round I think it is safe to say that tablet (iPad) that was designed from ground up for touch input won. Apple took risk to start from scratch. They abandoned all existing Mac OS X apps, created something new and it paid off. Windows was trying to have it all. Backwards compatibility to keep all existing apps and OS investment, and have just bolted on some tablet features that were poor fit for the device. Purpose won over a bolt-on.

* There is no separate OS for iPad, rather it is all one iPhone operating system with iPad specific user interface features
 

Code-word: Framework

I’ve seen this countless times. You’ve seen it too. Software architecture from hell. The architecture which only purpose is to satisfy itself. Architecture that tries to solve imaginary problem and address imaginary constraints. Too complex and completely unnecessary.

When programmer does not care or do not understand the problem that software is trying to solve, often he goes off and satisfies his need to do something with outrageous architecture. Laziness to investigate actual problem is cause of this. Imaginary software problems get invented so that they can be solved only by an amazingly complex architecture. Look at me, this is some crazy complex code I written!

Please don’t be that programmer. Software is made to make life easier. It is developed to add value. Yes, sometimes complex architecture is required, but more often than not, complex architecture is written because that is path of least resistance… It appears like glamorous work that shows off your amazing skills when in fact, it is complete waste of time. Yeah, I speak from past experience. Guilty on that count. I guess every single developer is too… It is part of growing up.

So how do you recognize this tendency? As soon as you start talking about need to create “framework” watch out! You need framework as much as dog needs fleas. Framework is code word for “I need something to keep me interested in this project”. Framework is code word for “I have no clue or care about problem this software is trying to solve”. It is path of least resistance since it keeps you in familiar territory: code.

Solutions are often far simpler that we are willing to admit, but they require in-depth understanding of the problem which does not start with code…

 

In my previous post on how to become really good developer, I touched upon something that I feel needs more attention. I said that you need to invest over 10,000 hours in practicing the craft to really become good. What I failed to mention is that those 10,000 hours must be progressively harder. You must push yourself out of your comfort zone and you must take on harder and harder assignments in order to really grow. Mindlessly doing something will not improve your skills. Doing things at the level you are comfortable at will not improve your skills. Like muscles that need to be exercised progressively harder to develop, mental skills require this increasing complexity to grow.

The biggest obstacle by far in this quest is temptation to give up, and you will be tested many times.  What you need to realize though is that quitting in long run is much harder than to keep on going. When you quit on yourself, you are chipping away your character. More times you quit, easier it becomes to quit. And that spreads like cancer to anything that you are trying to accomplish.

If you quit, guilt will follow with its cousins: could have, would have and should have. You start either beating yourself up for quitting or lying to yourself. You keep thinking that if you just have worked through difficulties, you would be on top of the world. You could have done it. You will look with envy at people that did. That’s why quitting is harder than doing it. This realization comes only after it is too late.

Don’t give up and quit on yourself.

Every game in life, whether it is programming, business or physical like sports, is always, always 90% mental game. “Whether you believe you can or can’t, you are right”, said Henry Ford. You quit in your thoughts and your attitude first, regardless of external circumstances. You model external circumstances in your head to support your decision no matter what circumstances are. You tell yourself that it is too hard, that it will take too long and that you just can’t do it. You put it off for next time. You withdraw mentally long before you manifest that outside.

Part of every big accomplishment is victory over these inner doubts and weaknesses. It is not that 10,000 hours of hard work is something you can’t do, anyone can, but it is hard to make yourself work at it every single day. That is hard. Forcing yourself to keep going when going gets though, when hour gets late and you’d rather watch TV than work.

So the biggest part, the most important part of becoming really good developer is persevering and not giving up when problems get too hard. Don’t ask for help from others on how to solve a problem. Solve it yourself first then ask for opinions on your solution. Volunteer for hard projects. If you see something that nobody wants to work on maybe it is something you should get done. Each problem you solve, each obstacle you work through, will add a brick to your character wall. Once that wall is standing tall and strong no problem will bring it down.

Just don’t give up!

PS. Please don’t get hang up on 10,000 hours. Depending on your profession and talent that number might be significantly higher, but rarely it is significantly lower. 10,000 hours should also not be used as excuse to start doing. Often we get side-tracked by “preparation” for the actual doing. This is just another form of procrastination. You can read as many books as you want about bicycle riding, but you can only learn to ride by actually doing it.

 

Utterly lost

There is fine line between exploring and being utterly lost. While former is fun, latter is usually frustrating. Exploring involves having grasp of where you are and vision of where you are heading and it is this knowledge and state of the mind that separates it from being lost.

Thus we should start our learning with at least some sense of direction, understanding of what are we trying to accomplish, to avoid jumping in with both feet and being utterly lost.

Writing code is a lot like exploring and being lost. In most cases you start seeing real issues only after you are under way. Rarely you have everything worked-out up front and devil is in the details, as it is said.

You can easily recognize the code that was written by utterly lost developer. It is good old spaghetti code that is result of muddy thinking and no direction running in circles around itself. It usually can be replaced with purpose written code of clear thinker that is 1/10th of the size. The difference is in preparation.

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

© 2009 Denis Basaric: DevComponents Blog