CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

February 2006 - Posts

  • How I found RAD

    In a pleasantly provoking post Jeffrey warns us against the dangers of RAD. What RAD stands for in his eyes is not to clear. Jeff's post makes clear it is a sliding definition. I cannot state things better than Jeff's final comment. But as the RAD acronym has a long history in my career, with many a bright side, I would like to add my 2 bits.

    The first PC's were no more than a calculator on steroids. They could be programmed but the gap between the programs tools and the customers problem domain was gigantic. Quite a step was dBase. In it's programming language you could code something like

    @ 2, 10 SAY Customer->Name

    The first PC's were text-based, this statement would display the customers name on text row 2, starting at column 10. In many a language before that you had to copy the string byte by byte to a very specific location in RAM, the address corresponded to a location on the screen. The next byte would set the character's color, the byte after that the next character and so on. So the @ 2, 10 SAY statement was a RADical improvement.

    dBase also brought the first way to work with structured data. It's so much easier to just code Customer->Name instead of copying something out of an obscure IO buffer. But checking the uniqueness of primary keys and the validation of foreign keys had all to be done by hand in dBase. It took the arrival of Access 1.0 and sql server connections to the desktop to relieve you of that burden.

    Windows brought graphical forms and real form designers. The first tools worked with resources; you had to do the @ x,y in there. With Access, Delphi and VB came the visual form designers making the once so RADical @ x,y obsolete. Drag and drop designers also took a great flight for non visual items like database operations. When you look at datasets in VS 2005 it's loads and loads of (generated) code whose content is steered by setting properties in the visual designer

    Somewhere in this history the term RAD popped up. It could stand for Rapid Application Development or even Rapid Application Design. It was welcomed as a good new thing, a radical change. Using drag and drop the craftsmanship of the developer who knew how to find his way on the CRT-screen was obsolete, now every idiot could create a program. And many an idiot started creating programs.

    But a fool with a tool is still a fool. You can setup database interaction very quickly in a dataset but when the connection string to the database is hard coded inside the app just will not work on the customers machine. VS 2005 tries do do a good job here, as its RAD-wizards try to redirect the connection string to the app's config file. Even worse are monolithical apps. Here VS 2005 really loses it. It will suggest dropping a SQLdatadapter straight on a web form. So all code of your app, from the database connection to the presentation HTML ends up in one solid rock. This is where I completely agree with Jeffrey, this kind of software is un-testable and un-maintainable.

    A prototype built this way always ends up in the waterfall of all other over-specified documents in the start of a project. But in the course of the project, working with the customer, I still very much rely on all visual designers to navigate through and organize the code. Am I still doing RAD ? Looks like it. Is it bad ? I don't think so. RAD is as powerful a tool as a chainsaw. Very effective but very dangerous if you don't know how to handle it. On the other hand, RAD is just a marketing buzz-word to me and nice for a little rant.

  • Setting up a simple internet server (pt2) : it's all about AD

    I'm in the middle of setting up a web server for my site. In a previous post I had blogged on getting the machine up and running. In this post I will take a closer look at Active Directory which proved even more central than I had expected. Again this is nothing deep. IT pro guys are probably laughing their heads off reading this. But hey you guys: you're speaking a different language than us developers. Again these are just some things I wish I had known in advance and were hidden to deep in the docs.

    Adding features to a Windows 2003 is a matter of enabling roles. My hard earned advice is to start always with the Domain Controller role. This will install and set up active directory. The setup will ask for the name of the domain the server is going to control. This is a point of  "Think first, start the setup later". Why ?

    • A domain control can only control one domain (name). Period. My server is going to host my old GekkoSoftware.nl domain but also PetersGekko.net as well as PetersGekko.com. I had to chose one of these names as the domain name. Internet request for the other domain names can be handled by this server as well, more on that in a later post, but there is no way to administer that in AD on a single server.
    • Adding the AD role will also configure the DNS role. In case you already set up that one things might get messed up.

    In case things do get messed up there is a very nice MS support article which really helped me. In title it is directed at Windows 2000, but it did help me very well in straightening my 2003 box.

    Active directory is everywhere and I am really beginning to like it; in one place I have an overview of all computers, users, shares and the kitchen sink. There are several ways for machines to join. They can join themselves from the system part in their control panel. Having done that I can than manage the client PC straight from a server management console. But you can also add a machine from the server. In my network I have a Maxtor network storage drive. So far I had to manage and monitor it in a browser. Having added a computer named Maxtor in AD I now have a view on what's going on over there straight from the AD console.

    It even shows things it's web-based management interface keeps hidden. Like the folder path's of the shares. Pleasant surprise.

    Active directory controls everything. As mail server I installed Exchange. It took me some time to find the place to add and manage mailboxes and email addresses. It is right in the heart of AD user management, a right click away.

    By default the property pages of an AD user already has three rows of tabs. Exchange will add even another row.

    So setting up the server all boils down to Active Directory management. In the next and (intended) last post I'll describe the pitfalls I encountered setting up incoming traffic. After all, that's what a web server really is about.

  • Vista under pressure

    Vista is addicting. But is very disk-hungry as well. I managed to swamp my first disk. Remarkable is how well Vista keeps behaving with less than 3Mb of free disk space. It turns sluggish and generates frightening warnings :

    But two minutes later disk and Vista were well again. Very very adaptive. Except when you try to hibernate the system, it was the first, and so far only, blue screen.

    Now ordering: New harddisk

  • DotNed user group meeting

    Hey Dutchies: coming Thursday, February 23, the user group DotNed will meet. Hosted by Macaw with a presentation on Enterprise Library for .NET 2.0. Last time I went it was great, I'm hoping for something likewise. It's free. Signup here. See you there.

  • Vista: it's all about a nice UI

    Perhaps somebody will recognize this posts subtitle as the title of Julien Ceyssial's blog. He used to be one of the first generation of dnj bloggers but hasn't posted for very very long. But his subtitle is still in my head. On one hand I completely disagree with the statement. IT should be about correct and timely information, all the rest is distraction. On the other hand I totally agree. The information can be quite good but when it's hidden behind seven clicks in a lost corner of the presentation a lot of human beings will not use the software. Which makes it just as bad as highly decorated nonsense.

    In Vista Windows is trying to make a big step forward in pimping the UI. There is a big Vista review on the Windows supersite; here are some of my observations.
    Given the right hardware (DirectX 9 graphical card) Vista will present itself with the glass interface with transparent window borders (the level is adjustable) and the window itself projects some shade on the background. It is a delight to work with; personally I like it a lot more than my recent Mac OS X sidestep. At first sight the new Windows looks so simple without any unnecessary distractions. But it's full of nice features.

    Although, I'm not completely convinced yet. Some programs build on this transparent border. Take Media Player

    The player-controls are in a transparent part. So is the level meter in the lower left corner. Here the transparency makes that hard to read. Occasionally Media Player displays text, like the song's title, in that corner as well. Which just blurs away.

    Vista wraps all programs in the new borders, including legacy software. But some parts of the OS behave like legacy as well. Take this dialog to set a network card's properties.

    It does have the new borders. But the long list of properties will (still) only display in four narrow lines. No sizing, a lot of wasted space. When you compare it to the richness of WPF sizing and sliding panels there is still work to do.

    An UI covers more than just the visual part. One of my favorites is the volume control. You can set (and mute) individual sound sources. So when you're listening to some nice music you are not disturbed by loud announcements of new mail arriving.

    Now downloading : Orcas CTP
     

  • Things you cannot do with (Virtual PC for) the Mac (?)

    Mac users can be pretty religious about their OS. Which is nice but in the end you cannot do everything with a Mac. When you're a student and are dependent on the websites and slideshows your teachers have in store for you; you just need Powerpoint and IE on Windows. There is a way to get the best of both: Virtual PC for Mac. Which will give you a virtual PC running Windows in a window on the Mac. Recently I set up a such a creature and bumped into some issues. I'm not 100% sure about all of them, hence the (?). So feel free to chime in or light a match.

    • Exchanging virtual machines is (next to) impossible. A virtual PC created under Windows is one big file containing the complete machine. A virtual PC created on a Mac is a gigantic tree in which it is completely unclear what contains what. You can import a Windows created machine on a Mac; the other way round looks like an unsolvable puzzle. The Mac OS is nice because it hides all internals from the user but the disaster is that it still keeps everything hidden for the experienced user. You just get lost in files not being a file, resource forks, and differences between the display name and the name on disk. Yuck !
       
    • VirtPC for Mac cannot work with an NTFS virtual machine. When creating a new virtual PC VirtPC mac suggests a FAT or a FAT32 disk. When you create a virtual PC under Windows it's no problem to give it a NTFS disk. So far I found out that VirtPC for Mac totally crashed on every Windows created PC I gave it. I should try feeding it a FAT machine; but that's an experiment which does take some time. There is a known issue with the Mac OS X on external (USB) drives with NTFS; such disks are read-only.
       
    • Virtual PC for Mac will not run a Vista PC. Even before you run into the file system issue Virt PC trips over the Mac's bios and reports it not supporting ACPI. With new macs on Intel processors people are trying to boot Windows XP on a Mac. So far without success. It would have been hilarious to have Vista running on PowerPC hardware. Almost as hilarious as running Linux on an Xbox. Which is possible.

    On the other hand, having seen Vista, who needs a Mac ?

    <update>This post was based on version 7 of vpc. As far as I can see this is quite a different creature than version 6. On the outside one big vpc7 file, on the inseide no vhd's and the like ..</update>

  • Splitting the Delphi heritage

    This was found in a comment on Eric's post on open source and IDE's which refelected on Delphi for sale. There is an online petition asking Mark ShuttleWorth to buy Delphi and release it as free software. Nice. But.......

    In my goodbye to Delphi post I mentioned some things hindering the further evolution of Delphi:

    • Need for backwards compatibility
    • Staying alive in the eco system of Borlands tools

    Delphi is now freed from the latter. Releasing it as open source will satisfy the first. But imho the Spirit of Delphi torch is now in Chrome's hands.

  • Delphi for sale

    Although I already said goodbye to Delphi, I  still follow what's happening. The latest news is that Borland is going to split its activities. They are going to concentrate on ALM (application Lifecycle Management) tools. Their developer tools, or IDE division, is for sale ! No buyer has been identified yet. For a list of guesses see the comments on David I's blog posting..

    Resources to stay up to date:

    • Bob Swart's (the man with the hat) weblog
    • DavidI's (one of the two big men with a beard) weblog
  • Installing Vista build 5270 on a (tiny) Tablet PC

    Vista is coming. To us developers Vista is about new API's, to users Vista is about a new UI. As a developer you have to take a good look at that as well; that's how people will (want to) work with the software you make. The feel of Vista is different; I could try to list all the small and bigger differences but to get a feel yourself there is no other way than work with it yourself. The latest CTP is stable and does not require any hyper hardware as long as you don't install it in a virtual PC. Back to multi-boot. To get a full immersion I recently installed it on my tablet PC.

    Again the OS has many monikers

    • In the initial startup it's still Longhorn
    • On the desktop it's still beta2
    • According to the screen saver it is Windows Tablet PC edition
    • <Update> Build 5230 in my original post. Typo. Thanks Sander </update> 

    It is not the real beta2 yet. As I understand matters there will not be a distinct release labeled beta 2, but several CTP's instead. Working with build 5270  is a real pleasure. Build 5219 turned blue once in a while but this one keeps on running and running. And it's running well. Despite my machine's good but not great hardware specs (1Ghz Pentium mobile and 512 Mb RAM) it's smooth (smoother than XP tablet PC ed !) and very very usable. The tablet functionality is now fully integrated in the OS. Peter Wright has written some very good posts describing that.

    My personal favorite Vista feature is the magnifying glass. Here it is in full action

    It highlights another very specific feature of Vista which Frans will like. The date's description is no Dutch, not even double Dutch. New amongst the languages supported is Frysk. Which is one of the many dialects spoken in the Netherlands and the only one which made it getting a special status. In the province of Friesland official documents are bilingual, in Dutch and Frysk. To spell it correctly you need letters not part of the standard Dutch character set. The official name of the province is Fryslân. To type that you needed a French codepage or an international keyboard with dead keys. Vista has FY, the Frisian keyboard layout. An a circumflex (â) cannot be part of a domain name, which at the time led to some insulted Frisians. For them it is a serious matter, to the others in the country it is somewhat a source of amusement. Personally I would like Grunnegs added :)

    Developing software for Vista is going to be a different ballgame. VS 2005 installs and works well on Vista but doesn't open the Vista api's yet. New is  the Orcas CTP, which is actually just a new name for the WinFx CTP's. Vista is the platform on which WPF (the presentation part of winfx) will really shine. Orcas will install on XP and server 2003 as long as you also install the WinFx runtime on the machine. But I'm going for Vista. New OS, new UI, new languages, new stuff to play with. With VS 2005 up and running I need a future focus; learning just never stops.

     

  • COM variant arrays and .NET

    Many a COM server exchanges data with its clients using so called variant arrays. These can contain anything you can imagine. Creating a variant array from a COM client can be a hassle. The Delphi VCL framework has the VarArrayCreate function to help you. Creating a variant array from a .NET COM client is even easier as an array of objects is compatible. Take this snippet where a COM server (sp) member expects an array containing variant bools. The array is declared as an array of object. It's members are filled with booleans.

    object[] weeks = new object[sp.ActiveCollege.WeeksPerYear];

     

    long match = 1;

    for (int i = 0; i < 53; i++)

    {

       if ((match & inAct.WeekPatroon) != 0)

           weeks[i] = true;

       else

           weeks[i] = false;

    }

     

    WeekInYearPattern wp = sp.ActiveCollege.CreateWeekInYearPattern();

    wp.PatternAsArray = weeks;

     

    The COM-object wp, has a variant array typed property PatternAsArray which  is completely satisfied with the object[]. No conversions, no hassle. Almost to easy to be true.

    Posted Feb 03 2006, 07:46 AM by pvanooijen with 1 comment(s)
    Filed under:
More Posts

Our Sponsors

Free Tech Publications

This Blog

Syndication

News