Archive for Software Dev & Productivity

26 May 2011

HTML5, it’s DHTML all over again

No Comments Software Dev & Productivity

I watched a video from MIX 2011 called “HTML5 for Silverlight Developers” last night and it was very compelling.  I was all on-board.  I would prefer to not code things in Silverlight and give my clients the caveat—“but it won’t work on an iPad”.  So, I whipped out Visual Studio and started to code.

There is something very cool about being able to code something and not have to wonder if they client has Silverlight installed.  This was awesome.

Except . . . nothing works in a browser below IE9 or Chrome or Firefox or whatever.  IE6 through IE8 didn’t work at all.

I myself am a Chrome user and gave up IE long ago unless a contract requires that I use it. But most corporate environments are a long way from upgrading to IE 8, let alone the latest IE9.

After doing some googling, I found the HTML5 shim which allows things to render properly in IE and the ExplorerCanvas javascript plugin to allow using the canvas in IE.  So, there are work-arounds.  However, these plugins allowed me to do basic things in IE8—but failed in other areas.  For example, with these plugins I could draw a rectangle on the canvas in IE8—but I couldn’t implement the drag/drop interface.

At one point, I had 5 different browsers open and was refreshing each one after making a change to my html.  Ever time, at least one of them failed.  If I tried to cater for a quirk in IE, Chrome would stop working.  When I got it working in Chrome, IE would give an ugly javascript error.

But this is nothing new.

Back in 1999, I bought an big Microsoft book called “Dynamic HTML” which espoused DHTML as the future of the web.  It gave loads of examples on how to create animations and include very cool stuff in your pages.  DHTML was term used by Netscape and IE, but this book focused entirely on Internet Explorer.  When you tried to run your same code in the counterpart Netscape browsers, nothing rendered at all and you ended up with javascript errors.  The book got around the cross-browser difficulties by ignoring all other browsers.  If you worked in a corporate environment and would never code on anything but Internet Explorer, DHTML (or the Microsoft version of it) was great.

DHTML was a broad term (as is HTML 5) and doesn’t belong to company.  You code to a certain specification and each browser (or device) renders that as they see fit.  You have very little control over how it will look unless you code with a plugin like Flash (and now, Silverlight).

I have seen fantastic DHTML animations in IE which only worked in IE.  I can remember seeing stunning animations in Netscape which didn’t work in IE (all using ‘layer’ tags).  I remember last year seeing a cool Arcade Fire video in HTML 5 which worked great in Chrome but not in IE.  There is still no consistency here.

The “HTML5 for Silverlight developers” video was a lot like the DHTML book.  It looks great until you dig deeper.

The reason I’m hesitant to jump on the HTML5 bandwagon (and I reeeallly want to) is Internet Explorers slow adoption of it.  Actually, it’s not Internet Explorer—since they are implementing a lot of new features in IE9, but most corporate environments won’t take up the new browser for at least one or two years.  So, if you put something on the web, you have to think about the large amount of lunchtime surfers who won’t even be able to see your page.  You need to write loads of conditional code just to make sure your down-level browsers can even see a message saying “Not supported by your browser” instead of a javascript “Errors in page” popup.

One thing you should never ask your clients is “What browser versions do you want this to support?”  The answer is always the same—“Well, all of them.”  This is why the IE-only inventions of the past (HTML+Time, background filters, etc) never took off.  This is why a lot of the HTML5 features—as cool as they are—won’t take off either.  We Chrome users don’t carry enough weight yet to move the entire world to the newer code.  If Apple had allowed Flash on the iPad, I don’t think anyone would care about HTML5 at all.

I want to be converted and go back to plug-in-less web development. But so far, HTML5 (or rather, the browser creators) have let us down.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

02 Dec 2010

Looking forward to Silverlight 5

No Comments C# Coding, Software Dev & Productivity

So, I watched the Silverlight Firestarter keynote where some of the Silverlight 5 features were revealed and have to say that it all looks really good. 

There were some pretty impressive interfaces demo’d. 

I’m so tired of hearing how Microsoft is dumping Silverlight.  The keynote alleviated some of those fears, I hope.

The biggest benefit, I think, will be the ability to put breakpoints in xaml databinding.  Most of the Silverlight problems I have are trying to figure out if the INotifyPropertyChanged event was fired for an element in my gui. 

So, life will be easier . . . by the end of next year.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

09 Nov 2010

Homework

No Comments Growing Up, Software Dev & Productivity

I was terrible about doing homework when I was a kid.  It was always so much easier to think of the excuse I was going to use the next day than it was to turn off the TV and just do it.

I can remember too many occasions when the teacher would collect homework and try to name-and-shame me in front of the class.  “Where is your homework, Eric?”

“I didn’t do it,” I said while looking down at my desk and hoping the teacher would just move on to someone else.  I figured if I looked pitiful enough, he would leave me alone.

“Well, why didn’t you do it?” he would insist.  I could see his legs at the edge of my desk as he towered above me waiting for an answer.  He wasn’t going to accept that as my only answer. The whole class’ attention was on me.  I could feel my face getting hot with embarrassment, but hey, Knight Rider was worth it.

So, I gave the teacher the go-to answer for everything.  I give him the answer that I’m sure all teachers loathe—“I forgot.”

Towards the end of the school year, they usually gave up on me.  My parents tried everything to get me to do my homework, too.  But it was so easy to lie about how much homework I had.  Besides, I had a busy schedule starting with He-Man at 3:30 and ending with whatever prime time show was on that night before 9.

As I got older, the homework load got heavier and the likelihood of me doing it was much smaller.  My aversion to homework, along with my truancy habit, were the reasons I failed several classes in high school and went to Summer school ever year to make them up. My dad still talks about how he wasn’t sure whether I would graduate from high school at all.  I never even applied to any colleges.

I can remember my mom telling me that homework was a part of life and that I would get homework all the time when I grew up and went to work.  I didn’t really believe this.  Grown-ups don’t have any homework.

Now, I do have homework.  But here’s the big difference—the homework is not mandatory.  That really makes it difficult to do.

Now, I will sit down in the evenings with a big computer book read chapter after boring chapter of a subject which might not interest me in the slightest, but I need to know it.  I look at this homework the same way I look at running on a cold morning—there are hundreds of reasons not to do it, but one or two compelling reasons to do it.

Now, my job is to stay competitive and relevant in a market that is always moving.  Now I must stay ahead of technology that is always shifting.  Now, I sell the skills and knowledge that’s contained in between my ears.  My competition for work is not just in London, but in America, China, India, and the rest of the world.

So, I have to keep building that knowledge.  That means homework and studying.  What makes it easier is that not everyone does this.  To many people, if the boss doesn’t demand it, or if it can’t be a prominent bullet-point on the cv, it’s not worth learning.  The phrase I hear again and again is “The last thing I want to do when I get home from a long day at work is think about computers.”

But I’ve also worked with a lot of really good people who will browse the tech manuals on the trains or watch tutorial videos in the evenings to constantly educate themselves too.

I remember listening to a Brian Tracy tape years ago where he said (I’m paraphrasing), that you give eight hours to your employer and ever added hour goes to building you.

So, now I know the importance of homework and evening study.  Life would have been a lot easier if I learned it earlier.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

02 Nov 2010

I take back all the things I’ve said about Silverlight

No Comments C# Coding, Software Dev & Productivity

After my initial resistance to using Silverlight, I have to say that I have been using it heavily for the past month and am very impressed with it.  When I look at Silverlight as a web technology, I am amazed by the stuff you can do with it and how extensible it is.

My apprehension was due to web standards.  And I still have concerns here.  Microsoft had a big win when they got SL to work on Macs as well as Windows.  But the lack of a Linux version still bothers me (the Mono guys are working on this).  The biggest blight on the technology is lack of iPad support.

I like HTML and I feel comfortable with it.  When ASP.Net webforms were released 10 years ago, I felt Microsoft were trying to bring a Visual Basic-type development experience to the web.  I can’t tell you how many developers I’ve met who profess not to know html.  They only know the very basics of html and a bunch of tags like <asp:Button>.  With php, classic asp, and the new MVC framework, you have more control of how your page renders in different browsers because you wrote the code to do it.  I guess I’m a purist in this area.

But Silverlight is not html development.  It’s also not flash.  It’s more like writing a client application which runs on the desktop—but has to play safely in a web sandbox.  The rules are all different.  All calls back to the server are asynchronous and you can’t stop and wait for them.  Binding is very heavily used, and the code-behind works better than in ASP.Net because there are no postbacks required.

In the past month, I’ve really geeked out.  I spend most of my time thinking about the project I’m working on and how I can improve it.  I’m reading my fourth book on Silverlight in the evenings and spending the days coding away.  You might think that’s sad (it has been said to me), but I’m really enjoying it.  It won’t last forever, so you need to take full advantage of enthusiasm when you get it.

Anyway, I take back some of the things I said before about Silverlight. 

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

13 Sep 2010

The lone developer is dangerous.

No Comments Software Dev & Productivity

The lone software developer is the reason for most bad software and most spaghetti code.  A lone developer will sit down and code before making a plan.  Since there is nothing to explain to anyone else, there is absolutely no reason to make a plan or to write any documentation.  There is no reason to comment code.

Any software developer who has worked in a development team knows just how the team dynamic changes compared to an individual coder.  In a team, all your code must be justifiable.  Any areas of ambiguity, inefficiency, or prone to error will be caught by other developers.  Any code comments are written with other developers in mind (instead of simply “Notes to Self”).

A good software team needs a leader.  Software development is very personal work.  A developer sits down and wrestles with code from morning until night.  Even when in a team, he is often alone with functionality or bugs and must do what is necessary to complete them.   Any criticism of this work at the end of the day is a recipe for disaster.  A team leader, with a position of authority (but preferably with a good dollop of tact) needs to be able to step in and clean up the areas ambiguity at the earliest moment (daily, preferably).

I’ve worked in environments where all greenfield projects are given to a Grad student to cut their teeth on before working on the big applications.  Frequently, these small project become critical systems.  When things go wrong, the code is given to more senior developers to fix.  So, senior developers make patch work fixes on systems which began on a shaky foundation already.

But the truth is, not every project is big enough for an entire team.  In those cases, peer review becomes even more important.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

22 Jun 2010

I give up on the iPhone fanboy thing

4 Comments iPhone

Two years ago, I bought the iPhone 3g.  It was awesome.  I missed the first rush to buy it, so had to wait for weeks until more were available. 

I liked most things about it.  I was annoyed that it didn’t sync very well with my Windows machine and it forced me to use iTunes, but it was so cool I overlooked all that.  Then it bugged me that I couldn’t tether the phone to laptop so I could surf the web using my 3g connection on the train (so I would have to take out a second contract with O2 for mobile broadband").  But I have to overlook that too.

Six months ago, I got a call from O2 saying my contract was up and asking if I wanted to upgrade.  I told them I wanted to wait for the iPhone 4.  So, as June 7 approached—I couldn’t wait for the iPhone 4 announcement to see what it would be like.  I registered my interest on the site.  The new phone would have a clearer display, video editing, a webcam!  Apple is touting as a game-changer.  The rush is on.  The pre-orders have already sold out. 

You know what?  I don’t want to be a part of this any more.  I don’t want to be someone who drools over the next Apple product.  These game-changer features are incremental improvements.  I never look at my current iPhone and say “Man, the resolution on this thing is awful!”  I never once thought—”If only I could edit video on this thing.” 

I don’t want to wait for new stock or stand in a queue.  I don’t want to pay through the nose for the privilege.  I don’t want to read any more news stories about new features.  I want to break free.

I got my new phone.  It’s an Android phone—the HTC Desire.  It does most everything I need it to do and it was much cheaper.  Highly recommend it.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon