Hardcore Software

How hard it can get?

Disposable email ID May 21, 2007

Filed under: Life,Software,Web — Hemant @ 7:00 pm

When was the last time you were surfing a site and want to try a software out. You click on download and it asks for your email id?
When was the last time you want to see just a conversation thread in a forum and it forces you to register (asking your email Id) before letting you see the conversation?
When was the last time you wanted to register to some site by are afraid of spams?

If any of above web annoyances happened to you, the solution is mailnator!

What mailnator does is exactly what you want. It creates a disposable email id for you every time you open mailnator homepage. And you can even check your emails (for registration confirmation, trial keys etc.) and email Id will automatically be deleted after few hours…


Moving to .NET Platform, A difficult choice? May 20, 2007

Filed under: .NET,Delphi,Life,Software — Hemant @ 5:20 pm

I am working on a product which is developed using Delphi for Win32. Originally Delphi 7 was used and we then moved to Delphi 9 (Delphi 2005) and are now planning to move to Delphi 10 (Delphi 2006). I have to admit that despite the originally reluctance in accepting the Delphi as the long term development technology, I have now grown to simply love it. You know what I like about Delphi most? The fact that it solves the real world problems!

You know there is lot of technology talk always going on. Every second day you hear the announcement of a new language, new database technology, new framework which would just magically solve all your problems. But if you have worked even for few months in software industry (as I have), you will realize there is no such thing which can solve all our problems magically. Language, framework and components just assists you do your job and *nothing* can replace a good programmer. Still Delphi provides the simple to understand and simple to use framework which suits most developers. This is because real developers like to find the “most appropriate way” to solve a problem in given time and resources and not essentially the “best way”. Lengthy and exhaustive time, performance, use analysis is luxury of few developers, who program in a garage and for fun.

Everything was working fine until my organization had to think “What to do about .NET platform? Do we need to go for it?”

After thinking for sometime, I concluded couple of points:

  1. Developers (who actually get to work on product) like to work on a technology which is popular in market. Perhaps it makes them feel safer that it will not be too difficult to find another job, just in case. If you ask “Why you like to work on .NET?” it would be difficult for them to answer. Perhaps the only answer is “because every second person seems to talk about .NET”.
  2. It doesn’t matter to the organization whether its developers are using .NET or Java or Delphi; it wants to deliver the right solutions to customer at right time.

During my initial couple of months in software development, I used to find so many problems with existing code/structure/design etc. Even a stupidly named variable would drive me nuts. It’s not that now I don’t care about how variable are named but you just can’t make everyone to name variables like you. You have to adjust somewhat somewhere. I always liked to do things the perfect way and I still do, but now I also think “what is more important? Renaming the variable to my taste in 20 odd units or shipping the product to customer next week?” Don’t take me wrong, I am a real nasty person in this regard; I would still rename the variable in 20 odd units but only in next planned release!

In coming few days, a decision will be made by me and few senior people (who I actually admire). Lets see what comes up!


My Nerd Score March 12, 2007

Filed under: Humour,Life,Software — Hemant @ 5:18 pm

I am nerdier than 89% of all people. Are you nerdier? Click here to find out!


How to be highly paid manager even though you are a stupid moron?

Filed under: Humour,Life,Software — Hemant @ 10:55 am
  1. Start a subscription of good technology magazine. Whenever a new issue arrives, read the headlines (only) of all articles and recite few new names in it. You will need to utter one of those in big management meetings so that you sound most updated person.
  2. Once in a while, open one of those fat books which you managed to steal from your library when you were pursuing your dumb management degree, and go through some of those chapters. Hey! You will find at least dozen management ideas which sound super cool but actually does nothing in practice. You can suggest those ideas to someone and pretend to be super-intelligent. Don’t worry, if ever, someone will try to work on those ideas, soon he will become more confused than ever and will never come to you again.
  3. Don’t be too involved with your sub-ordinates. More you speak, more they will know the truth you are a stupid moron. So say few words straight from Oxford dictionary, sitback and relax.
  4. Always use the ^professional^ language in your documents and emails. Don’t use witty sentences and humour ‘coz that will create an impression that you are not professional. Any yes, don’t forget to discourage your sub-ordinate who uses simple english to say things straight and little humour to enjoy his job/work. You can say something like “You need to work a lot on your communication skills”. It will make him feel you are perfect manager and he should improve a lot to be *such a nice manager*.
  5. Whenever you are in a meeting, act like you an angel straight from heaven. Speak in a very low polite voice and sound a real gentleman. I know you are not actully like that but you need to pretend that you are a gentleman.
  6. Don’t leave a single chance to mark your name on a good work done by your sub-ordinate. Do mention his name for good work also when he is present and a very few people are listening to you, otherwise maintain *your* larger than life image.
  7. Instil a culture of ideals that don’t actually mean anything practical, this involves coming up with a mantra that sub-ordinates are supposed to adopt like “we must all realise the max” or “strive to achieve” etc. Essentially this means asking people to do more work without getting more money and still feeling good about it.

Delphi Compiler Version Directives March 6, 2007

Filed under: .NET,Delphi,Software — Hemant @ 1:32 pm
Here is a list of Delphi Compiler version directives. I searched few places but none could give me complete list (A page on About.com was closest to completion) so I thought of creating this list and publishing it.
VER80 Delphi 1
VER90 Delphi 2
VER100 Delphi 3
VER120 Delphi 4
VER130 Delphi 5
VER140 Delphi 6
VER150 Delphi 7
VER160 Delphi 8
VER170 Delphi 2005
VER180 Delphi 2006
WIN32 Indicates that the operating environment is the Win32 API.
CONSOLE Indicates that an application is being compiled as a console application.
LINUX Indicates that the operating environment is Linux.
CPU386 Indicates that the CPU is an Intel 386 or better.
MSWINDOWS Indicates that the operating environment is Windows. Use MSWINDOWS to test for any flavor of the Windows platform instead of WIN32.
CLR Indicates the code will be compiled for the .NET platform.

Sharing spreadsheets using Microsoft Excel February 27, 2007

Filed under: Software — Hemant @ 8:11 am

When was the last time you needed to quickly collect some information from you colleagues and you couldn’t find an easy way to do this? When was the last time you opened an Excel Spreadsheet and it said “This workbook is locked for editing by user blah. What would you like to do?”

Problem is many people doesn’t know about a neat feature of Microsoft Excel which allows collaboration and sharing of Excel Spreadsheets. This essentially means, more than one user can edit a spreadsheet at the same time. Interested in how to do this?

In Microsoft Excel 2003, you need to follow “Tools > Share Workbook” menu:

In Microsoft Excel 2007, this option is located in “Review” ribbon:

Firing above option shows a dialog presenting a check-box which says something like “Allow changes by more than one user at the same time..blah blah”. Select this option and save the work book in a network location where all the persons who need to edit this workbook has write access and you are done!


Thinking of using constants in Delphi? Consider class properties!

Filed under: .NET,Delphi — Hemant @ 5:39 am
If you have gone through any *real* software project you will understand the need of using constants in code. Your professor would have told you thousand times that don’t use any magic numbers in code and if you need, define a constant and use *that* in code. I wouldn’t go into the flexibility constants brings in (define and change at single place and use million times stuff).

What I want to discuss is an alternative to constant. There are called “class properties”. In C world, these would be called static properties. Yes, you guess right. These are properties which relate to a “class” rather than an “object” (instance of the class). With Delphi.NET, we now have:

  1. Class Fields
  2. Class Methods (Both procedures and functions)
  3. Class Properties

Class fields and class properties and not available in Delphi for Win32 (well, programmers take “never say die” approach).

So class properties allows us to write something like:

number: Integer;
number := TPredefinedNumbers.DefaultNumber;
//do something with number

Here, “DefaultNumber” is a class property of TPredefinedNumbers class and we can access DefaultNumber using class name and without actually creating an instance of it. .NET framework makes extensive use of class properties. Refer SystemColors, Brushes etc.

Why class properties qualifies as an (perhaps better) alternative for constants? The reason is, you never know what crazy requirement will be raised by your sales or marketing person which calls for user control on that constant. Perhaps you would think that using the INI file for that constant value would be better so that you can control it. Perhaps day after tomorrow it will qualify to sit in a database field. Who knows?

So class properties provide a great abstraction. When you want to change the location where that constant value resides, all you need to change the get method of class property. And everything works fine..

TPredefinedNumbers = class
class function GetDefaultNumber: Integer;

class property DefaultNumber: Integer read GetDefaultNumber;



class function TPredefinedNumbers.GetDefaultNumber: Integer;
//You can return a hard coded value
Result := 0;

//or you can get from INI file or database or whatever and return