Thursday, March 31, 2005

Google Speeds up for Firefox

Jake just posted a comment about Google's latest speed enhancement. Not only is it a great idea, but it is Firefox, Mozilla and other Gecko engine browser specific. These browsers support the prefetch relative link which allows a page to be downloaded in the background when it is expected the user will visit that page. A really cool feature.

I have a really fast internet connection here at work, so I tried this feature on a site that takes a little while to load: www.Borland.com. I did a search for Borland in FireFox and Internet Explorer after clearing the cache and restarting the browsers.

Before clicking the links I viewed source on both pages. The Firefox page has a new tag inserted only before the link to Borland's home page.

<link rel="prefetch" href="http://www.borland.com/">

The Internet Explorer page does not have this additional tag. I was under the impression that this prefetch tag needed to be in the header section of the page. It would appear that is not the case.

Clicking the link in Internet Explorer takes about 5 seconds before the page finishes loading. Clicking the link in Firefox takes about 1 second before the page finishes loading (as indicated by the loading progress bar on the bottom of the page.)

While the prefetched page is loaded into the Cache, it does not appear in the history until actually visited. I verified that. The FAQ says cookies may be preloaded though, which I didn't verify.

So even if someone adds a hack to Internet Explorer to recognize this tag it will require Google to return this tag to a browser claiming to be Internet Explorer.

Tuesday, March 29, 2005

Delphi Code Profilers

Michael P. on TDAG mailing list was looking for a Delphi code profiler to identify dead code. This is a useful too to have. Used to be I used Turbo Power's suite (which I forget the name of now). With them closing shop I wasn't able to come up with a good answer for him. Lucky for us all Stephen Q. provided the following list:

Looks like some good choices! I've heard good things about AQTime now that I think about it.

It turns out Nick "The Great One" Hodges is an AQTime reseller and might be able to get a good deal for anyone interested. Contact him for more information!

Monday, March 28, 2005

TraceTool 4 : A trace framework and a visual trace utility

Talk about flexability, TraceTool 4 provides A trace framework and a visual tracing for C#, Delphi (.net and Win32) and Java. Beyond the trace framework it also provides a complete trace viewer (Tail ,outputDebugString, event log) with support for Log4J, Log4Net and Microsoft Enterprise Instrumentation Framework (EIF).

The fact is supports .Net, Java and Delphi in one free tool is pretty impressive. I haven't actually used it, but it sounds to be a useful tool.

Thanks to Craig for the tip.

Wednesday, March 23, 2005

Visual Basic Migration Path

Speaking of not wanting some customers, Microsoft has made it official that they don't want their legacy Visual Basic developers. Well it looks like REAL Software does.

REAL Software is offering a migration path to their REAL Basic development tool from Visual Basic. Current VB users have until March 31st, 2005 to visit www.REALSoftware.com/vb6 and get their free copy of REAL Basic. The program looks fairly similar to Visual Basic, but it runs on Linux and Mac OS X as well as Windows. They even have a white paper on porting Visual Basic 6 projects as well as a project converter.

Borland should offer something like this to move VB developers to Delphi, although it is a more logical offer from REAL Basic.

Tuesday, March 22, 2005

Loopy Syntax - Delphi vs. C#

There is a guy who I work with who is taking some introduction to programming classes. He came by to ask us (the developers) some questions about loop syntax, not specific to any language. They are just working in pseudo code at this point. A co-worker wrote out some C# code and he was a little bit confused even though it was written to be very easy to follow. I decided to write it all out in Delphi for him. He found it much easier to read, specifically the for statement.

He pointed to the C# for statement and said "Why would anyone want to use this syntax when the Delphi syntax is so much simpler?" I told him that the C# for statement was more flexible, but that I agreed Delphi was a simpler language to read.

Julian Bucknall was recently ranting about code readability in response to Nick Hodges' comments about the superior readability of Delphi. Julain said readability has nothing to do the language and everything to do with what the reader is familiar with and how the code is written. While those are both important factors I disagree that the language is irrelevant. APL and ASM are not readily apparent with what they are doing, even to people who know the language. Don't get me started about binary machine code! Delphi is more readable then C#.

From Julian's examples of the for syntax used:

Delphi
for i := 0 to pred(List.Count) do

C#
for (int i = 0; i < list.Count; i++)

The Delphi for statement reads like English:

[For] [variable] [gets the value of] [starting value] [to] [ending value] [do]

Where each square bracket represents each part or token of the statement. The only things that are even the slightest confusing is the := for [gets the value of] and using pred(List.Count) for [ending value], with the latter being expressed other ways just as frequently. For great readability store the ending value in a variable before the for statement is called.

The C# is considerably more confusing:

[for] [required open parenthesis] [type of variable] [variable] [starts with] [value] [required separator] [variable] [check condition] [required separator] [increment variable] [required closing parenthesis]

The ++ syntax is more confusing then the := syntax (before the variable or after the variable?) but it could be expressed other ways (i.e. variable = variable + 1) but rarely is. I realize that the ++ syntax is holy war for some people, and I will admit it is a nice short-cut. When you are talking about readability, short-cuts usually mean less readable.

The C# for statement is more flexible and powerful then the Delphi one is natively. You can do everything you can in C# with Delphi, but Delphi might take a little more code. The difference is the resulting code will be easier to read in Delphi then in C#.

Borland DevCon 2005 Call for Papers Clarified

Craig Stuntz has a clarification on the C4P. John Kaster posted in the newsgroups that there would be some invited speakers who would be compensated similar to normal.

While that seems like a good idea to keep the "choice" speakers in attendance while saving money on the less choice ones, it seems like risky business to have speakers who must provide their own way and don't have a vested interest in appearing. A lot can happen in the time from when a session is accepted and when BDC actually occurs. If a speaker has to pay their own airfare and accommodations and receive nothing in return for their efforts then they might be easily dissuaded to spend their time and money elsewhere.

Back in 2003, when I was to speak for BorCon, I actually lost my job during the process between submitting abstracts and attending BorCon. I also had a new baby on the way that was taking priority for my money. If it were not for the fact Borland was paying my airfare and accommodations I may not have been able to attend. I was lucky that my new employer gave me time off, although it was without pay. Since my speaking was not to promote my business (like many trainers, writers, consultants, etc.) I actually still spent more then I was compensated to attend. Granted I did get the benefit of actually attending.

I could easily see a large number of missing speakers in the uncompressed category. It could even be an honest mistake of waiting too long to make their reservations only to find out their only option is driving crossed country (or further) and sleeping in their car.

I decided I am planning to submit abstracts this year, but I am not planning to submit as many as in previous years. In previous years it was kind of like winning a lottery to be selected. You were compensated for your efforts. Now your efforts are rewarded with more work. Even submitting good quality abstracts is a massive undertaking. Actually preparing sessions is even more work.

Friday, March 18, 2005

DevExpress Doesn't Really Want My Business

Does DevExpress's policies strike anyone but myself as odd? They are one of the few component or development tool vendors that absolutely refuses to offer trial versions of their wares. Instead they want you to buy it, and then return it under their 60 day money back guarantee. They also absolutely refuse to offer phone support, even on a paid basis.

[Rant On]

I was tasked to evaluate C# in Visual Studio.net vs. Delphi 2005. The evaluation includes the robustness of 3rd party components, especially grids. Everyone knows that since the disbanding of TurboPower that DevExpress has been the big winner in the Delphi Informant Reader's Choice Awards. So naturally I wanted to use their grid in my test.

I figured if I explained things to DevExpress they would be willing to work with me. I can usually find a solution that is an advantage for everyone. I called their presales and they said they did not have any trial downloads, even for review copies. They did suggest I email support. While I had them on the phone I asked if it were at all possible to purchase paid phone support, even on a per incident basis. They told me that if we buy the subscription plan then we get priority email support. So I emailed support to see if we could work out something. It was a brick wall.

I explained to them that since I work for a large company they won't buy something until it has been evaluated, and I need a copy to evaluate so I can recommend it. I would imagine most large companies have similar policies. Knowing the paper work involved in getting a purchase order and then the paper work involved in refunding that, I cannot imagine most accountants would approve of such sillyness.

I guess if I really wanted to I could buy their product on my own credit card, then turn right around and get a refund. Seems like that wouldn't be a good solution for DevExpress unless they just plan to make the return process difficult.

I'll look for another grid from a company that actually wants my business.

[Rant Off]

He Lives: The Delphi Marketing Manager

Mike SlinnUntil today he was only rumored to exist. Back in August Borland was looking for a Delphi Marketing Manager and it would appear Michael Slinn is guy for the job. You gotta like a guy who includes a link to the c2.com Wiki in his first blog post. Unfortunately a visit to his personal web site lists 9 different programming languages, with Delphi not among them. He has a lot of learning to do.

Speakers Jump Ship

When I was commenting on the call for papers last night I thought it looked like Borland was reducing the benefits to speakers, but I wasn't sure. Nick Hodges sums up some of the changes from previous years.

Dr. Bob has already confirmed he will not attend since he cannot afford it, and a number of other speakers have suggested they may not attend, or may attend and not write. I don't know how often I talk to people who attend sessions based on the speaker and not the topic. Especially when Mark Miller still spoke at BorCon, he was often referred to as the "Master." If enough of the headliners make a public enough of an announcement that they will no longer be attending then Borland may have a hard time getting people to attend.

Although I have seen other conferences where they charge the speakers for the privilege of presenting a paper at the conference. I think for a general industry conference that would work, but where BorCon is all about supporting and promoting Borland tools - your presentation is required to revolve around a Borland tool - that seems like it wouldn't be a logical progression.

Having spoken at BorCon in 2003 I concur with Nick and Craig's assessment about the amount of time it takes to prepare a session. I was surprised how much time it required. Lots of research up front, then you constantly update things since the technology changes so fast.

I am still debating if I will submit abstracts or not. Just submitting abstracts is a fairly large undertaking.

Thursday, March 17, 2005

BorCon now DevCon

05DevConWhen the BorCon 2005 page was first updated they put bold on the word developers. In some of the comments about the announcement it was indicated that Borland was refocusing on developers. Today the BorCon page today shows it has been renamed DevCon. I guess that says a lot about refocusing on development.

First impulse is this is a good sign. Borland is continuing back to their roots as a developer's tool company. They are listening to the developers who want to see a greater focus on them (self aren't they). This is a stark contrast to Microsoft and their abandonment of their Visual Basic 6 Developers. Nice to know there is a development tools company that is still about "Developers, developers, developers."

With some more thought I realize this will be one of those things where everyone keeps calling it BorCon for a few years. The big question is will the public catch on to the name change before the company changes it back?

In related news, the call for papers is now open as well.

Wednesday, March 16, 2005

Typecasting in Delphi

I was just explaining this to someone so I thought I would blog about it for the world. It is a basic concept in Delphi, but an important one to know.

There are two ways to type cast something in Delphi. You can use

(Instance as Type).member

or

TType( Instance ).member

The diferences is using AS checks to make sure Instance is a TType first, and if not raises an exception. Technically if you use an IS first then the AS is redundant. When you don't use is then it will attempt to typecast even if the cast is invalid.

The syntax to use IS:

if ( Instance is TType ) then
begin
  TType( Instance ).member. . . .
end
else
begin
  // alternative condition
end;

When using AS you could use exception handling to have the same results.

Tuesday, March 15, 2005

Monday, March 14, 2005

Boise Bloggers' Meetup

Weblogger MeetupsThis Wednesday I will be at the Boise Bloggers Meetup. If you are interesting in blogging and near Boise, then this is the place to be!

When:

Wednesday, March 16, 2005 at 6:00 PM

Where:

Moxie Java 10650 Overland RD. @5 Mile Boise, ID 83709 Map

Tuesday, March 08, 2005

Militants Attempt Attack on Offshoring

It looks like US IT workers are not the only one upset with offshoring. Straight from Slashdot:

Militants killed in an encounter in New Delhi on Saturday night planned to attack leading software companies in Bangalore in addition to the Indian Military Academy in Dehra Dun, Delhi police said on Sunday Indian police claim the men were members of Lashkar-e-Toiba - a Wahabi militant group fighting for an independent Kashmir. Apart from maps of call centers police also recovered 100 kilos of dynamite, 10.5 kilos of RDX explosive, 450 detonators, three AK-56 rifles and a satellite phone.
Either that or they were hired by someone in the US to help move jobs back over here. This actually raises a really good point about the integrity of your data overseas. Granted not all countries are unstable, but it may be easier for someone to attack the facilities overseas then within the US. What if they had also been armed with a 200 GB Firewire hard drive?

Don't get me wrong, the loss of human life would be the greatest tragedy, but what if those lives were lost as part of an espionage operation? Large corporations place a lot of value on information, especially information about their competition. What a tragedy it would be to kill someone over ones and zeros.

Or what if PayPal or Amazon had an off shore data center and someone attacked it, downloaded all the customer's bank and credit card information, then left an explosive to cover their tracks. Blame it on some militant separates group and no one would be suspicious of good old fashion thievery. They could be draining bank accounts for years to come before everyone was able to change their information or could even make the connection.

Reinstall the Installer

Is it just me or is the concept of reinstalling the Microsoft Windows Installer a preposterous notion? I was just talking to Steve and he said he had to do just that to get some software to install on the machine he was working on.

So what happens when you need to reinstall the installer that the installer requires?

Friday, March 04, 2005

Delphi the Ferrari

Most developers I know who have worked in Delphi think is one of the best development tools / languages out there. Unfortunately many of them also realize that for their career they need to be familiar with Visual Studio and C#. The argument is there are more people with those skills, and there are more jobs for people with those skills.

I was thinking about this an it occurred to me that Delphi is a Ferrari. Anyone who knows about Ferrari's would most likely choose it for their car. I know I would. Unfortunately we all don't drive Ferrari's. Most of us are stuck with a Toyota Corolla or some other really common car.

So if I were a mechanic, who wanted to specialize in a type of car and stock parts and tools specific for that car I would probably choose the Corolla over the Ferrari. Naturally I know that the Ferrari is a better car, but I know that there are more people driving Corolla's out there, so it is a better career move.

Although a mechanic that is actually able to specialize in Ferrari's, and find enough customers to justify their business, will make much more money, and chances are they will be happier too, since that are working with the best.

Feel free to substitute BMW, Mercedes, etc. for Ferrari. There really isn't anything wrong with a Corolla, but which would you rather drive?

Delphi and Global Variables

Something that is interesting about Delphi and global variables is there is no such thing.

A global variable is one that is accessible everywhere, you actually cannot do that directly in a Delphi project of any complexity. Turbo Pascal was one of the first languages to introduce name spaces, in I believe version 3, with the concept of units. A unit limits the scope of all your variables to that unit and any unit that uses that unit.

You cannot have two identifiers that have the same name, which is where these unit name spaces come in again. If you have two variables named bar, one in the foo unit and the other in the re unit then you could reference them as foo.bar and re.bar respectively.

Granted if you make a single unit that has unit global variables and then use that unit from every other unit in your project then you come pretty close to having a global variable, but not quite. If you make use of any built in or 3rd party libraries then your variable is still not globally available inside those units.

Thursday, March 03, 2005

March 3rd, 2005 Meeting Wrap-up

globeChris opened with a demo of World Wind. It lets you zoom from satellite altitude into any place on Earth. Leveraging Landsat satellite imagery and Shuttle Radar Topography Mission data, World Wind lets you experience Earth terrain in visually rich 3D, just as if you were really there. It is written in C# and you can get the source code on Source Forge.

It is a lot like Google's Keyhole program.

The book Extreme Programming Adventures in C# was recommended.

Author Ron Jeffries demonstrates how to apply extreme programming's key concepts to .NET and C# ? including the use of customer stories, customer acceptance tests, and "Spikes"?and the fundamental techniques of Simple Design, Test-Driven Development, and Refactoring to create practical, .NET-ready applications.

We covered a few chapters in our Design Patterns Explained book. Overall everyone seems to like the book and we are getting a lot out of it. Design patterns does a lot to expand the vocabulary of programmers as we communicate with each other about our art.

  • Steve D. covered chapters 11 (Abstract Factory) and 17 (Decorator) and summarized
  • Chapter 15 (Commonality & Variability) & 16 (Analysis Matrix)
  • Jim covered chapter 14 - Principles & Strategies
  • Doug covered chapter 18 - Observer pattern

Doug had a great quote on Abstract classes vs. Interfaces: "It is better to have then to be." *

Next month we will have:

  • Mike on Chapter 19 - The Template Method
  • Jim on Chapter 20 - Lessons Learned
  • Doug on 21 - Singleton
  • Steve D. will do a programming language beginning with X
  • Steve R. will share a language beginning with U.

*Correction: Doug corrected me on his quote:

Actually, I said that "It is better to have something than to be something", and I should clarify that this goes for classes that have many and/or diverse behaviors. Also, I believe we were actually discussing aggregation vs. inheritance.

I am usually jotting notes pretty quickly and occasionally miss things. Thanks for the clarification Doug!

Wednesday, March 02, 2005

BorCon 2005

I was trying to keep an eye out for this, and here is the first news from Nick Hodges blog:

The 2005 Borland Conference has been informally announced. Here's Anders Ohlsson in the newsgroups:

The conference will be November 6-10. It will be on the west coast, but not in San Jose.

That's as much as I've been permitted to say at this time.

Time to start planning if you want to attend. I am sure the November date is so it avoids PDC in September.