“JPOX”:http://jpox.sf.net has a revamped website, much more appealing than the old one. The addition of hierarchical menus and class/ER diagrams helps the user understand the features of JPOX better. It follows the same layout style as many other Java open-source project websites. I am considering discussing with “Stephane”:http://www.ile-maurice.com to offer some free web hosting.
You know you have been coding too much when you start dreaming about it. Not exactly about someone (yourself or anyone else) coding, but about code itself. I remember that when I was preparing for the CPE (Certificate of Primary Education) exams, I used to have numbers and math operations flying around in my head; I would lie down in bed at night and do mental calculations till I fall asleep.
What happened to me this morning as I came out of sleep was very similar, except that I was manipulating the code I am currently working on. What still amazes me is the fact that I actually uncovered an anti-pattern in a piece of code that I had not touched for weeks. Although it may be funny that the word “Eureka!” flashed through my mind at the same time, it is wonderful that such a thing could happen. The anti-pattern in question is as follows.
I have a business class called User that is a composite of another class called ContactInfo, itself a composite of the Address class. What currently happens in my code at the time a user needs to be added is:
1. Instantiate an Address object.
2. Instantiate a ContactInfo object passing the Address object to the constructor.
3. Instantiate a User object passing the ContactInfo object to the constructor.
What my dream told me to do (which I am going to tonight) is:
1. Instantiate a User object.
2. Within its constructor, instantiate a ContactInfo object.
3. Within that object’s constructor, instantiate an Address object.
Of course, this is the correct way to proceed according to the composition rule, which says that a composite object should be responsible for the creation and lifetime of its components.
I am not very sure whether such dreams are healthy, or whether they are a precurse of dementia. But, I more than welcome such inspiration.
I removed my post about installing Linux on the iBook because I am currently back with Mac OS X.
Although “Gentoo Linux”:http://www.gentoo.org is the distribution of choice thanks to the ease of resolving dependencies when installing applications in a FreeBSD-like manner, there were certain things that I needed but could not get to work. The most important one is the ability to connect the iPod to Linux. “gtkpod”:http://gtk.sf.net compiled successfully, but I did not manage to get Firewire working.
Half-way through a cycle of changing the configuration of and re-compiling the kernel, I realised that the reason I bought the iBook, and later upgraded to Panther, was that I wanted to not have to fiddle with things and just get everything working right from the start. So, I got rid of Linux and put back Mac OS X.
Recently, someone asked me how to quickly read a file with Visual Basic code without dealing with streams.
Of course, once you learn doing this in GW-Basic, Basica, and friends, it sticks in your mind. Those who forgot, shame on you!
Dim iFileNumber As Integer
Dim sLine As String
iFileNumber = FreeFile
Open "C:stats.log" For Input As iFileNumber
Do While Not EOF(iFileNumber)
Input #iFileNumber, sLine
I usually keep a tab on all things Gnome, but I seem to have missed the release of “Gnome 2.6″:http://www.gnome.org. I could not find any release date. So, maybe it only happened today or yesterday. If yesterday, it could be an April’s Fool gag that they have not yet removed from the website.
Going through the release notes, it seems too intricate to be an April’s Fool gag.