Thursday, October 30, 2008

Delphi 7 Enhancement Tools

-Are you still programming Delphi 7? -Yes. -Are you mad? There are newer versions of the software environment! Why you don't use Delphi 2005-9? -Delphi 7 it is the classics) I love it! It has all i need and it's not so large as modern Delphi IDE.

Install Updates
I'm using Delphi 7 with Update 1. But the Update 1 is not necessary for programming it's for better quality and faster work. The update fixes the bugs that were previously you had to correct manually. So updates are highly recommended.
Another reason to install updates it's incapability with some of Enchantment Tools.
For example CnWizards can't work correctly on without UP1. The source editor line numbering and highlighting current line won't work. Line numbers says freeze on screen and current line isn't highlighted.

Everyday programming
Delphi 7 haven't integrated tools for code folding, brace matching and much more that will be very useful in everyday programming. Most of the features are added in latest Delphi 2005-2009 releases but it's very heavy weight!

To enhance Delphi 7 usability use free third party tools such as:
GExperts
GExperts is a set of tools built to increase the productivity of Delphi programmers by adding several features to the IDE. GExperts is developed as Open Source software and encourages user contributions to the project.

Let's look at GExperts structure:
  • Editor Experts
  • IDE Enhancements
  • Code Editor Enhancements
  • Editor Toolbar
  • Debug Window
More often than not I use:
  1. Message Dialog - message dialog constructor
  2. Procedure list - list of project procedures
  3. Component Grid - Help context identifers
  4. Editor Toolbar - user defined extra toolbar in editor
The coolest thing it is the begin and end matching! Sometimes legacy code is very big and it
s very hard to find the right end for begin. Here I'm pressing Ctrl+Alt+Right Arrow and see the corresponding end.
The full list of enhancements provided by GExperts with screen shots you can find here.

Download GExperts

DelForExp
DelForExp it's Delphi source code formatter. Developing in team always hard especially in Delphi project because it has not integrated Source code formatter. Install the DelForExp and forget about chaos in your code. Define formatting rights once and distribute for each developer. You can reformat the code when you want so all your projects sources can be formatted in one common style.

DelForExp as the Delphi plugin requires installed GExperts for work.

I have defined codding rights and now our source code have one style. It's enhance the readability of the code and understanding what code do. Especially it's very usable on legacy unstructured code.


Download DelForExp.

CnWizards
And now look at CnWizards

CnWizards provides more than ten wizards with a lot of enhancements
in Delphi / C++ Builder /BDS IDE:

  • Code Input Helper
  • Code Structure Highlight and Lines
  • Enhanced Units/Forms List
  • TabOrder Wizard
  • Flat Toolbar in Form Designer with full customized
  • MSDN Help Integrated
  • Toolbar in Editor with full customized
  • Project Extension Tools
  • Multi-line Component Palette
  • Roll Windows and Set to Topmost
  • Source Codes Statistics
  • Uses Unit Cleaner
  • Lots of Other Improvements
One of most useful features it's advanced code highlight! The code becomes more readable and completely legible. Cn highlight block words begin|end and connect them by line colored same as words. Every nested level colored with another color. Now your code completely readable, you'll never forget about final end.

Another usable feature is "Uses cleaner". Long developing and big project produces many units and references between them. One or more modules can stay unused and it's only the code garbage. Clean it with "Uses cleaner"!

I don't now why Delphi developers didn't add line numbering in code editor...but it's very hard to determine in which row the cursor is placed. Cn adding good line numbering with highlighting current code line.

Download CnWizards

CnWizards and GExperts supplement each other. I'm using them together with DelForExp.

I'll be glad to know any other enhancement tools.

My security guard - Avira Premium

I've tried many anti viruses such as Dr. Web, Kaspersky, Nod 32.
But my faith was broken by simple Trojan virus on the my coworker's computer.
No one of the products listed above were not able to remove it
, moreover, some of them have not been able to install.

Free-AV did it!
It has successfully installed, found and heal the files! And also it work faster than Kaspersky and doesn't require a lot of memory!

I reccomend to all my friends to install Free-av as best free antivirus. And it's really work!

Free version it's only antivirus but I need mail and web pages check so I'm using Avira Premium with promo key.

How to get free promo 3 month license for Avira Premium?
Just get it from promo shop server!
_https://license.avira.com/en/promotion-cj0ptfb6eh8cmw6a101r

Wednesday, October 22, 2008

HASP 4 Driver install failed

We're using the HASP hardware keys to protect our software from unlicensed use.
HASP key requires the driver for detected by system.

Two days ago was trying to install the HASP 4 security key driver and it has failed.
I've tried to reinstall it for three times but it always fail.

What the problem with this driver? It was working for a long time on many computers!
The problem is the driver and hardware incompatibility. For unknown reasons the HASP driver is very freakish and not all versions can work correct on every CPU.

That's it! The AMD processor was the source of problem .

Currently used Hasp driver v4.95 can't work with the AMD CPU unfortunately.
To solve the incompatibility problem use the newer versions of HASP driver. I've tried with Hasp Driver v4.96 and the problem has disappeared.

Read more about HASP

Saturday, October 18, 2008

Delphi Programming style

Delphi it's really good IDE but it has some disadvantages. There no common universal code formatter. The programmers are very different in theirs coding styles, so it makes very difficult to develop the code together.

Legacy code
Reading legacy code sometime I think: "What the hell is that? How can it be able to write this!". Not all of the programmers know about codding standards and in the most cases it's not necessary. The one programmer can write the code any way one likes, he don't need to remember codding rules to understand old code.

Automatic source code formatting
When we have too much legacy code the manual reformatting becomes the heavy routine. I advise to use the GExperts for Delphi with DelForExp source code formatter. I'm using "Borland Style" predefined option and I like Borland code style it's really good for reading.

Team work
Team work is not so simple. Anyone want to write as he consider be better. But we can't build any kind of the Babylon tower...eh...big application speaking and writing in thousands languages. So we need to develop the codding standard for our team.

Codding standard
Let's try to define what we want.
Conventions for:
  • Unit naming
  • Unit structure
  • Identifier Naming
  • Commenting style
  • Declaring functions, procedures, classes, records, etc.

The next rules are not necessary, you also can define new rules and change, delete other rules.
This style developed on the codding styles listed in the articles:
  1. Identifier Naming Conventions
  2. Coding Standards and Conventions
  3. Coding Standard
  4. Delphi 4 Developer's Guide Coding Standards Document
  5. Стандарт стилевого оформления исходного кода Russian
For the next time I want to describe my codding standard based on this articles.

Tuesday, October 14, 2008

For the first time - Delphi

I'm starting with listing of my primary knowledge resources for Delphi programing.

First of all I'm trying to find the way to do something new in Delphi Help, it's really good source written by Borland Developers and I advice everyone to read it after understanding Delphi syntax.

Someone think about Delphi as history anachronism, but I don't think so. It can be very pretty for every programmer. No meter what programing language is used to get the result.

For the deeper knowledges I recommend to read really good Hallvard's Blog.
Every question you have can be asked by Google for 90%, other not well formated questions can be put into google groups such as
Russian Delphi sources:
Design Patterns in Delphi:
Announcement
I've planed the article about "Delphi Programming style".