Hm!

October 27, 2006

WordPress.com, it would seem, really sucks at posting html and all the nice stylesheets I need to display code just don’t work!

I’ve moved to http://thinkersroom.com/bytes/

Borland: Adapt Or Perish

October 8, 2006

I cut my development teeth with cutting edge technology like DBASE III+ (10 points to anyone that can remember what pack does!). I then moved on to even more cutting edge technology called Access 2.

Inevitably I found myself in Visual Basic 6. Which was pretty fine until a succession of rough experience on two projects had me looking for the nearest tree to string myself.

VB 6 New Project

It is very difficult to explain to a CEO why the application runs on machine 1 but not on machine2, despite the fact that they had the same operating system. It was even more difficult to explain why it runs on machine 3 and machine 4 but machine 3 refuses to generate crystal reports while machine 4 does it perfectly.

The project was a disaster. Wrestling with DLL registration and un-registration. Looking for components to do pretty straightforward things.

VB 6′s Rich Component Palette

Yes, a change was necessary.

As it happened I ran into a friend that weekend waxing lyrically about Borland Delphi.

I was ready to try anything. So I sourced a copy and installed it.

And was blow away.

Borland had indeed built a better mouse trap.

Pros

  1. Blisteringly fast
  2. Came with extremely rich collection of component
  3. Built in reporting tool
  4. Compiled to EXE … no dependency headaches
  5. Object oriented
  6. Powerful language
  7. Flexible VCL Framework

Cons

  1. That begin … end thing is an acquired taste

It was a no brainier

And then enter Microsoft and .NET.

But first a little history.

Borland as a company has had a tumultuous history. On one hand they revolutionized the development industry with its Turbo Products — Turbo Pascal and Turbo Prolog. Cheap, functional development tools targeted at the masses.

On the other hand Borland have never struck observers as having a coherent and consistent strategy. Think of the excellent products they developed, got the masses hooked on and then unceremoniously dumped. Like Sidekick

Think of the moodswings that have made, at one point or another, Borland switch between being

  • A development tools company
  • A productivity software company (Borland Office, Anyone?)
  • A development tools company for the masses
  • A development tools company for the enterprise
  • An application lifecycle management company

Think of the musical chairs that have been played at the helm since the exit of Philippe Kahn.

Think even further of the mind numbing decision to dump a respectable brand and rename themselves to Inprise

And then in one fell swoop Microsoft poached the cream of the crop from the Borland Stable, including with Anders Heljsberg.

Anders Heljsberg ultimately became the architect behind .NET and C#. One wonders where Borland would be if he’d stayed.

But despite their management problems their products were generally solid. The VCL architecture in partcicular has always struck me as being brilliant. They’ve managed to build a very good abstraction layer, that frees developers to conentrate on the task at hand rather than the nuts and bolts. Delphi and C++ Builder users who have moved to .NET will immediately grasp the DataSet and data binding heritage, as well as many of the concepts behind the IDE.

VCL is an excellent example of forward thinking — the fact that the Delphi compiler team were able to bolt the .NET framework on top is testament to this.

Unfortunately good technology without strategy simply will not cut it today. Borland have never really aggressively pushed their products like Microsoft have. In today’s environment it is not what you have — it’s how you push it.

Borland’s core products are getting  a run for their money from the competition. Delhi is being blown out of the water by Visual Studio. JBuilder is facing grim odds against Eclipse. Interbase is now just another database in the crowded marketplace with arguably more capable and cheaper alternatives like SQL Express, Oracle Express, Firebird, MySQL.

Which (finally!) brings me to the point I am trying to make. Delphi is arguably the crown jewel in the Borland stable.

Delphi is undeniably THE RAD tool of choice for for native Win32 development. It is feature rich, powerful and easy to use.

Since Delphi 7 Borland has shipped 4 releases — Delphi 2005, Delhi 2006 and Turbo Explorer for Delphi.

Delphi 8 came with Delphi 7 in the box. Delphi 2005 on the other hand was APPALING. Big, buggy, and unstable. Snatching defeat from the jaws of victory. Creating a huge mass of unhappy loyal Delphi users.

Things have not been helped by the uncertainly caused by Borland spinning off its development tools of a soon-to-be named company. Things in this regard are still unclear.

Borland Developers Studio BDS 2006 is a much better effort, with nice features influenced by Visual Studio 2005 (The TFlowPanel and the TGridPanel and the placement guides in particular come to mind).

Analysing the numbers of sales must have led Borland to the conclusion that people were just not upgrading.

Last week Nick Hodges, the Delphi product manager had a post on his blog asking “Why Aren’t you upgrading”.

Let’s just say the responses came thick and fast. Last time I checked there were 140 or so responses. Almost all mentioned “quality”. And bafflingly when I checked next Nick had taken down the comments.

Then he put up a new post in which he gave 14 Reasons why you should upgrade. Bafflingly, at #1 was Quality. As the responses show people may agree with points 2 through 14, quality was hotly disputed.

Granted, strides have been made but BDS cannot claim to be a quality release.

But even that can be resolved. The question is, would it help?

When it comes to choosing tools of trade, I believe in being pragmatic. Decide what needs to be done and then choose the best hammer for the nail.

Delphi is an awesome tool for win32 development. The question is, will it fully and natively be able to develop native applications for Vista? Can it consistently leverage the most recent .NET framework?

Coming to .NET, BDS 2006 is another kettle of fish.

In this regards, BDS cannot be an option because:

  1. As a .NET development environment, you can only leverage the .NET Framework 1.1 in your applications. For me, that makes BDS a non starter for my work. The .NET Framework 2 is a significant release of the framework and I’d be crazy to pass up the gains made to stick to a tool on the basis of nostalgia, or passion.
  2. If you have developed PDA applications for the Compact Framework, compared to VS 2005, BDS is again a distant second. Distant. Developing, debugging and deploying.
  3. The instability of the IDE is yet another nail in the coffin. When you have to take a deep breath before debugging … it is not a good thing.
  4. Things like WPF and Avalon are beginning to cross my radar.
  5. With regards to .NET BDS will always be playing catchup to Visual Studio. Right now the Borland team working on the next version of BDS to leverage .NET 2. Microsoft is working on the next Visual Studio that will leverage the .NET Framework 3. You cannot build a better mousetrap than the guy who builds the mice

As long as they maintain their current strategy with regards to .NET, Borland will continue to lose the few .NET developers in the fold.

Strategy

Here  is a radical thought.

Borland should cease any further development of a .NET integrated IDE.

That’s right. They should completely nuke the whole BDS 2006 .NET business. They should concentrate their experience and expertise on developing only two (or 3 IDEs)

  • Borland Delphi, for Win32 Development
  • Borland C++ Builder
  • JBuilder

What about .NET?

Borland should work very very hard to make Delphi, or Object Pascal, a first class citizen of the Visual Studio.NET environment.

Think outside the box and leverage the .NET framework the way RemObjects have with their excellent product Chrome. Using Object Pascal you can develop .NET 2 applications RIGHT NOW and leverage the .NET Framework 2. Totally integrated with the Visual Studio 2005 IDE.

This is something Borland had better look at. Currently Delphi + VCL is a framework on Win32. In the .NET world there already is a framework. What Borland should be thinking of doing is keeping the Delphi language alive.

Building an integrated development environment is not an effective use of time or resources because

  • It is very hard
  • It is very costly
  • Borland will always be playing catchup to Microsoft. They will always be a framework behind

It makes little business or strategic sense to continue to invest in a .NET IDE.

Borland should instead concentrate on making  Delphi a first class language of the .NET environment, completely integrated into the IDE. And leverage Microsoft’s IDE. They’ve already done the hard work. Why re-invent the wheel?

This make sense because

  • They can get back all the Delphi developers who decamped to  .NET. These are very VERY MANY
  • They might even get converts from VB or C#
  • They don’t have to sink vast resources into debuggers, editors, etc
  • Delphi can regain its presence in the development world as a language. Fact of the matter — as a language Delphi and Pascal are dying out
  • They can save the time and resources invested in the .NET IDE and use it to improve the Win32 IDE AND the language
  • They can get considerable sales revenue from a new SKU – Microsoft Visual Studio.NET Delphi Edition, or as an extra language in the Professional, Enterprise  & Team System SKUs
  • They can even refractor the BDS IDE and sell it as an addin for Visual Studio to keep current Delphi users happy as well as getting potential new users. The BDS IDE does have its charms.

The writing’s on the wall. Adapt or perish

kick it on DotNetKicks.com

Browser Browser

August 28, 2006

So I installed Internet Explorer 7 on Friday. I have despised IE ever since I can remember, and used Firefox even before it was called Firefox. Yes sir, I distinctly recall downloading and extracting the zip file that contained a browser called Phoenix. Version 0.4

I cannot begin to enumerate the things I find so irritating about IE.

No, on second thoughts I can

  • No tabs
  • Inability to print some pages without cutting off large chunks of the margin
  • Tendency to crash mid-download taking down (with a loud crash) all other open windows
  • No tabs
  • Search dialog that obscures the text
  • Cavalier disregard for web standards
  • No tabs

So finally, after reading a few reviews, I thought why not? Give it a shot. After all, I like to keep an open mind.

Installation

Internet Explorer 7 is a 14MB download. If, of course, your Windows is legit. Within no time you’re merrily on your way

The next order of business is the licence term, which, as usual, you won’t read.

Once you have agreed, you again have to validate your windows. If I’m going to be bothered about this anyway, validating before download is a wee bit redundant.

Next the installer will suck a variety of bits and pieces down the line.

Then it gets cracking on the IE 7 downloads

And gets on with the installation

It then removes what it considers to be malicious software. I don’t mind saying for a second there I suspected it was nuking Firefox

On to its core components

And finally you’re on your way!

The first shock is that Google is the default search engine, and not MSN or Windows Live Search

Interface

Trousers have pockets at the hips because they are very convenient at that particular location. They are easy to reach right where they are and they follow thousands of years of convention.

The merry men behind IE’s interface apparently do not ascribe to this particular school of thought. In their wisdom they defy convention and move around the function buttons away from where they have come to expect them. 

Figure: Opera with the back history, back, forward, image and reload buttons

Figure: Mozilla with back, history, reload, stop and home buttons.

Figure: IE 7. Back and forward are on the left. Reload and stop have inexplicably migrated over to the right of the address bar. Years and years and years of conditioning have led me to expect everything to do with page navigation on the left. I invariably find myself mousing over to the left only to discover reload and stop are not there!

For 10 points and a ladle of gravy, try to find the print button.

Dudes, if it ain’t broke – Don’t fix it!

Another feature that could bear fixing is the find. Find that gets in the way of my text is of little use! Though someone has cottoned on to it and moved it to the top right of the screen, still, its in the way!

Opera has this very same problem

Firefox’s solution is the most elegant

Improvements

The improvements though are several orders of magnitude

Choice of search engines

Open in new tab

It does, however, lack one thing I rely on heavily that Firefox and Opera both oblige

Search text in Google (Firefox)

Search text in Google (Opera)

When it comes to memory, IE does not disappoint. Hot on the heels of Firefox, it makes itself at home and takes great liberties with your RAM.

However, it has yet to beat Firefox’s record on my notebook (198 MB). And it can clean up after itself, unlike Firefox that merrily consumes away

Summary

Very impressive improvement over the howling dog that was IE 6.

Not bad.

Not bad at all.

kick it on DotNetKicks.com

Unexpected Behavior

August 20, 2006

Visual Studio’s immediate window, our old friend, is generally a very powerful debugging aid. A few judicious commands executed there can save hours of manually reading through source code that makes sense on paper on screen.

In fact the only place the immediate window fails to deliver is when dumping the contents of multi-line string variables. In this particular instance, it is a close race  between the immediate window and a chocolate teapot as to who is of less use.

Look at this sample code:

P.S. Yes, that is inline SQL! Sue me!

If you put a breakpoint at the Console.ReadLine() and dump the contents to the immediate window, this monstrosity rears its ugly head:

 

This, needless to say, is not something I generally want. This SQL statement cannot be pasted and executed in Query Analyzer / iSQL / SQL*Plus without forcing me to open another application and wrestling with search and replace and then pasting *that* to the query window.

Why not dump the string as it is?

Aside:

Watching a newbie try to use Windows Media player this weekend made me realize just how hostile it is to completely green users. The more I thought about it the more I realized is that it actually is not as easy to use as it seems!

For  example:

Does this mean the movie is paused and will play if you click the button or it is playing and will pause when you click the button?

I found myself unable to answer what the heck this button does

And what the hell is the second set of maximize, minimize and close buttons for?

Builder

Here is the last update to builder EVER by me. It was a proof of concept and I enjoyed wrestling with the code but  there will be a proper tool from Microsoft eventually. No need for me to lose sleep over it!

kick it on DotNetKicks.com

SandCastle Builder

August 7, 2006

[Update #3] - 11 August 0900

Version 1.2 

Apparently (can’t isolate the issue exactly) it works for some people and not for others.

- Logs the commands it executes (so you can see if there are any issues with paths, etc)

- Cleaned up some of the UI elements

[UPDATE # 2] – 9 Aug

Version 1.1

Well, as one is wont to accidentally do, I packaged the debug build rather than the release …. hence the snafu.

I believe SandCastle Builder is working now.

[UPDATE # 1] – 9 Aug

Version 1.1

- Fixed issue of incorrect extension when chosing your own CHM

- Added feature to allow specification of custom footer

[Oringinal]

Yep. Another one.

Joining the bandwagon of individuals keen to build a GUI for Sandcastle is yours truly.

Here are screen shots of Builder

New

Builder

Progress

Builder In Action

Complete

Builder At Rest

What makes mine different?

  • It is “Project” based so you don’t have to keep specifying the assembly, xml file, etc
  • Does not assume SandCastle or the Help Compiler is installed to the default location. It does however assume they are installed somewhere!
  • Reasonably polished UI – don’t you think? ;)
  • All in C# – no batch files (except for a workaround to piping output from one process to another)
  • Does all its work in the temp folder and cleans up after itself
  • Allows you to immediately view the CHM

Do I have any other plans?

Yep

  • Fix the inevitable bugs that MUST be hiding somewhere
  • Capture output from SandCastle’s various executables and log to file
  • Convert builder to a Visual Studio Addin
  • Allow builder to directly build projects & solutions
  • Allow builder to run from console so it can be used by built tools like nant and msbuild

Have a go and let me know what you think by leaving a comment. What i’m keen to know is if it runs at all :)

Download SandCastle Builder Here

Download the Manual Here

kick it on DotNetKicks.com

It amazes me just how even the biggest companies continue to make a very fundamental mistake — failing to clearly label the versions of their software.

How many companies release software and fail to indicate the release date and/or version numbers, leaving you wondering if you should download it or not? More than you’d think!

Google is one such. You cannot know the versions of their various software until you download them and install them. Which is a waste of

a) My bandwidth
b) Their bandwidth
c) My time
d) My hard disk space

and ultimately

e) My sanity

Look at three examples:

Deskop Search

Google Destop Search

Picasa

Google Picasa

Google Talk

Google Talk

But Google is not too bad. Picasa is just under 5 MB and Talk is just under 2 MB

Steve Jobs’ Apple Computer is another culprit.

You cannot know the version of iTunes until you download all 35MB of it and install it.

This is crazy.

Another colossal annoyance is needless coupling of products.

The less said about Google Pack the better. I do not for one second believe the whole is greater than the sum of the parts.

Another culprt is (drums please) Apple’s iTunes. Packaged with the iTunes installer is QuickTime. This is not a problem if you’re installing iTunes for the first time. It is if you want to upgrade iTunes from 6.0.4 to 6.0.5.

I see no reason to keep downloading a humongous file for a micro-version change.

iTunes

After all, if they are really integrated it would have a seamless single installation, rather than the current iTunes installer calling the QuickTime installer!

Why not split them up into 3 Packages like so

- iTunes Complete (6.0.5 & QuickTime 7.1)
- iTunes 6.0.5 (Requires Quickime 7.1)
- QuickTime 7.1

A final culprit is again our friend Apple with its iPod update software. If you want to download the latest software for your iPod Nano it merrily comes down the wire with software for the iPod Video, the iPod Mini and indeed each and every iPod’s software,topping the scales at 50+ MB.

iPod Updater

I cannot think of a single good reason for this.

Dear Apple, I am perfectly aware what sort of iPod I have, thank you very much! Let me download exactly what I need!

kick it on DotNetKicks.com

Environment NewLine

August 3, 2006

If you are one of those people that put “\r\n” in your strings to indicate a newline, raise your right hand and smack your head.

Why?

1) You are assuming your code will always run on Windows. Unix uses \n alone, Apple (until OS 9) used \r alone. Your code might just end up being compiled under Mono and then what?
2) It looks plain ugly
3) You have to escape the characters again (at least in C# if you’re not using the verbatim operator @). This quickly becomes a pain in the — er –becomes cumbersome when dealing with a lot of text

What should you do?

Simple

string line = string.Format(“And this is the end of the line{0}”, Environment.NewLine);

kick it on DotNetKicks.com

Follow

Get every new post delivered to your Inbox.