Blogs

Mega Update - Part 2

May 10

In the last entry, I gave an overview of the large software update I delivered to a client, an update that should've been done incrementally over a period of several months. From database schema changes, to swapping out a reporting engine, to switching from ANSI to Unicode, I really bit off more than I could chew at once. But it's now working well and I'm once again sleeping at night!

This portion of the story deals with the database changes that were made, both the structure and the character set.

Mega Update - Part 1

Apr 08

I recently gave a client a major update to their custom application. Actually, "major" doesn't even do it justice. It was more like "mega major" and I don't think I'll take the approach I did ever again. But I wanted to move their code to the latest compilers and to support the latest operating systems. I also needed to change some low-level database constructs. Why all this? Because I'm a best-practices sort of guy.

Here's what I had to start:

Information and Media Explosion

Dec 30

The amount of information available and the proliferation of video over the last few years is nothing short of astounding. Watch this video and ask yourself, are you ready for the future?

Widths and Themes

Nov 17
In the old DOS days, things were simple. You had 25 rows and 80 columns of text. Period. Well, if you knew the right tricks, you could double the rows or columns, but still it was pretty limited. This made programming fairly easy--you knew how much space you had to deal with.
With a GUI, or Graphical User Interface, things can get stretched out, you can have larger fonts, and you can have themes on or off. So knowing how much space you have to display stuff isn't quite as cut and dried. But I'm going to look at just one aspect that can be surprising: themes.

Internet Birthday

Oct 29

The Internet is 40 years old today. Or thereabouts depending on what you define as the actual birth of the internet. Here's a neat video that explains the origins of the what we know today as the Internet:

DateTimePicker Vista Theme!

Oct 12

Adding theme support to your application can give your program a whole new look (if you use standard Windows controls) without changing anything else. This works because the controls will actually use a different set of DLLs behind the scene. In Delphi 2007, this is accomplished with a simple checkbox in the project options. (Visit the Delphi Wikia page and search for "Adding Theme Support" for more information.) The DateTimePicker is one of these and I just discovered its new capabilities when themed on Vista or Windows 7.

Delphi Hints vs. Warnings

Sep 10

Consider the following psuedocode fragment:


for each FieldValue in RecordList do begin
  if ValidSearchValue(FieldValue) then
    found := Search(FieldValue)
  else begin
    ShowMessage('Invalid search criteria: ' + FieldValue);
    Continue;
  end;
end;
 
if found then
  ...

In Delphi, a warning will be generated near the bottom of this code where it says "if found ..." saying:

Variable 'found' might not have been initialized

To prevent that warning, you would initialize "found" just inside the "for each" loop with something like found := False;

But then, Delphi emits the following hint:

Value assigned to 'found' never used

Reasons to Upgrade

Jul 31

My last blog entry was a suggestion that when deciding what operating system to get for a new computer, Vista was now ready, but Windows 7 would probably be better. Now that I've had a chance to play with Windows 7 a little more and seen some of the new features demonstrated at a recent OCCA meeting, I am now whole-heartedly recommending that EVERYONE should get Windows 7 as soon as it is available (or earlier if you're subscribed to a something like MSDN or Action Pack)! It is very cool!

Operating System Advice

Jul 02

I got this request from a friend recently:

"Well, I'm finally going to finish building my quad core PC. It may be overkill as I don't play games, but I'm sick of having a slow computer! About the OS, it seems like I have a few options: pre-order Windows 7 upgrade, get Windows XP-64, or get Windows Vista Ultimate. I'm looking for some quick, brief advice, and I respect your time and opinion. I don't have experience with anything beyond regular XP... What are the advantages and disadvantages of Vista? Are there UI improvements that make Vista really worth the upgrade? Are there enough improvements in Windows 7 that make it worth waiting for?"

Drupal Keeps Getting Better

Jun 04

Every time I turn around, there are new modules, new themes, and more people using Drupal, a solid content management framework for building a huge variety of web sites.

I was visiting a client recently who asked about a new feature for their web site. Sure enough, not only was this module available for Drupal, there are several different ways to do it and some related modules for additional functionality the client will be delighted to hear about.

Although you can drop to PHP and customize as much as you need to, there's getting to be less reason to do it because there is so much power and flexibility in the base product.

Starting with Delphi Prism

Mar 16

I've recently acquired the latest Pascal language compiler from RemObjects, Oxygene. Embarcadero, now the owners of Delphi, decided not to continue development of Delphi for .NET, but instead license this compiler plug-in for Visual Studio from RemObjects. So if you get RAD Studio 2009 from Embarcedero, which includes Delphi 2009 for Win32, you also get a special single-language version of Microsoft Visual Studio with the Pascal compiler from RemObjects. If you buy this from Embarcadero, it's called Delphi Prism. If you buy it from RemObjects, it's called Oxygene.

Delphi History

Jan 19

Delphi is one of the greatest development environments every produced for Windows. It has an easy to learn, yet strict language that leads to less confusion than C++ and better coding practices than Visual BASIC. Unfortuneately, it has been marketed by a company that has made so many changes in direction and name that people have laughed it off. One more change has happened recently, here is the story, which actually starts over 25 years ago, before Windows.

Can't get there from here

Jun 08

I recently upgraded my home network server from Windows Server 2003 to Windows Server 2008. It has a nice interface, better security, and is noticably faster than its predecessor.

The server is in a big vertical rack in a corner of my office with no chair or desk space in front of it, so using it as a console or desktop station is uncomfortable. But it's a server, so none is needed, right?

To manage it (change user settings, check backup logs, etc.), I have always used Remote Desktop (RDP) from my main desktop machine. It's a fast LAN connection and I never even need to turn on the monitor on the server once everything is configured and running smoothly.

CommaText is dead!

Jun 04

For a long time, I've enjoyed a handy method in Delphi's TStringList class to read in and write out a CSV-formatted line of text. For example,

"Fred A.", "Thimsfrabble", "Lake Oswego", "OR"

is a typical CSV string with each field delimited by commas and each string delineated by double quotes. The CommaText function turns that string into a list of 4 strings:

  • Fred A.
  • Thimsfrabble
  • Lake Oswego
  • OR

Notice that both the field delimiting commas and the string quotes are removed from the parsed fields.

Now what happens if a string has an embedded quote?

"Fred "buddy" A.", "Thimsfrabble", "Lake Oswego", "OR"

Oops!

Nov 30

Last night, I decided I would read a couple of documents and migrate the old Windows NT 4.0 Server over to the new Dell computer with Windows Small Business Server 2003. It turns out the process is quite involved and after the third long document in tiny print, my eyes were getting bleary and time was swiftly flying by. There's a long checklist of things to make sure are in place before doing the big switch and there are many warnings that if the software is not updated, or if any of the settings are wrong or if you don't follow the directions exactly, the migration will fail!

Return to the Familiar

Nov 14

Well, it's been a while since my last blog entry. But after the triumpful ending of my last post, it was hard to admit what ensued next. Yes, I finally got VMWare installed on Linux CentOS, but that was as far as I got with it. Try as I might, I could not get any version of Windows to install on the virtual machine I had created. It kept crashing with strange errors and in one case, even booted my whole computer (yes, the physical one, not just the virtual one).

VMWare--Finally!

Jun 14

In the old days, playing around with Linux and installing programs and such was quite a chore. Typically, only students and geeks without any social life knew how to make their systems sing and dance. All the business professionals know that time is money. So Windows was the natural choice because to install a new program, you just insert the CD and click Next, Next, Next.

But over the last few years, things have been changing. Linux is getting easier because there's been a big push to hide a lot of the gory details and just present a nice interface with buttons and rounded corners and all. I suppose you could say it's looking more like Windows (or like Macintoshes!).

Reinstall

Jun 12

I should've stayed with my first instincts, but I'm a fiddler. No, not the kind that makes music with a bow, but the kind that just isn't satisfied with how things are and must keep fiddling with stuff seeking that constantly elusive state of perfection.

You see, I had installed CentOS on the new server for (Link not found), but looked at all the stuff that was installed by default and just knew a lot of it could come out. Of course, there were things like screen savers and games and paint programs--why are those installed on the "server" package I chose? Oh well, we don't want needless clutter on the server.

So I started hacking. I found the Add/Remove Software menu item and gleefully unselected several packages I "knew" would not be needed on this machine. OK--now reboot.

Installation

May 09

With the USB keyboard and mouse attached, I started the new Dell server's "Installation" CD before doing anything else. Somehow, it knows I haven't done this before and presents the typical user agreement form that must be accepted before continuing. Actually, that happened at the BIOS boot-up level, come to think of it. (Dell has gone beyond the average computer distributor!)

Then the CD sequence starts up and it goes through some questions asking about the time zone and how I'll be using the machine. Finally the part I've been a little apprehensive about arrives: the RAID configuration.

Ubiquitous USB

May 06

I opened the box of the new server for the Beaverton SDA Church and was reminded that we didn't order a keyboard or mouse to go with it. At first this makes sense--why not just use the one we have on the old server? Well, the old server is, uh, old! Like over 8 years. That's an eternity in the computer industry. Some people alive today haven't even heard of the OS we still have on that machine, Windows NT 4.0.

But still, keyboards and mice don't wear out quickly on servers--they just sit there and collect dust over the years. You blow them off twice a year when you actually need to use them. So why get new ones?

Syndicate content