Friday, March 03, 2006

Lammpix, Lamppix Mini, XAMMP and Live CDs

Just another night of hunting for small linux distributions and/or live cds, hovered mostly on Knoppix, Damn Small Linux, and Puppy Linux, when suddenly I came up to Lamppix and Lamppix Mini. I have used XAMMP before, and I'd say that XAMMP is very easy and nifty. And then another very nifty idea: XAMMP (and more) on a live cd. From what I understand from skimming the Lamppix site, Lammpix Mini is intended to be the blank template on which you will install your web application to, and afterwards it should be ready for handing out (most probably as a demo cd). And the docs say that you will (most probably) have to use the BIG Lammpix for your web application development. I infer that you could also make your demo cd the install cd also if you want to. I imagine that you may do this on the boot like "boot demo" or "boot install", similar to most *nix installations.

Unfortunately for those who can't understand German, some XAMMP addons are documented in German. Even some FAQs are in German. And if I may ask (a possibly frequently asked question), what does it all mean in English? One very interesting addon for me is the Tomcat addon (documented in German), and unfortunately I can't understand German.

As for multisession live cds, we may now have use for the space not taken up by installing small-sized ISOs.

References:
http://www.xammp.org
http://www.apachefriends.org
http://www.apachefriends.org/en/xampp.html
http://lamppix.tinowagner.com
http://lamppix.tinowagner.com/en/mini/
http://www.knoppix.org/
http://www.knoppix.net/
http://www.damnsmalllinux.org/
http://www.puppylinux.org/
http://www.puppylinux.com/
http://www.pupweb.org/

Wednesday, March 01, 2006

Hibernate mappings for Internet-disconnected applications

Some time before, my officemates were looking for a way to make the HBMs work even if the application sits on top of a network-disconnected computer. It's only now that I chanced upon the entry in the Hibernate Users FAQ pertaining to this problem. That entry is "Hibernate tries to connect to http://hibernate.sourceforge.net at startup!" The first solution is to use a better XML parser, but in our case, our interest is in using SYSTEM id instead of PUBLIC id in the HBMs.

Simple difference between Hibernate get() and load()

get() and load() both...

Return the persistent instance of the given entity class with the given identifier

but get()...

[returns] null if there is no such persistent instance. (If the instance, or a proxy for the instance, is already associated with the session, return that instance or proxy.)

and load()...

assumes that the instance exists.

therefore...

You should not use this method [load()] to determine if an instance exists (use get() instead). Use load() only to retrieve an instance that you assume exists, where non-existence would be an actual error.

Links:
HIbernate 3 Session API (org.hibernate.Session)
Session.get()
Session.load()

Tuesday, February 28, 2006

The price of freedom is responsibility

The price of freedom is responsibility, but it's a bargain, because freedom is priceless.
~ Hugh Downs

Wednesday, February 22, 2006

Web-based TODO list management: Horde+Nag and ackerTodo

Horde with Nag is harder

I was tasked to survey tasklist management software and I came down to Horde+Nag and ackerTodo. Well, I chose ackerTodo. While I was downloading PEAR modules for Horde, I took the chance to unzip ackerTodo-3.6.tar.bz2 to /var/www/html. Then I came back to configuring Horde. To cut the story short, Horde with Nag is much more difficult to configure compared to ackerTodo. I gave up with Horde+Nag and resorted to recommending ackerTodo for the job. Complexity won in the trade-off with Flexibility. The modularity idea of Horde is a good concept though.


ackerTodo lacks documentation

ackerTodo doesn't have a comprehensive and idiot-friendly documentation besides the README, which one will be able to see only in the downloaded distribution (or in the SourceForge CVS viewable here).


Mailing is coupled to OS due to use of mail()

When I first demoed it, my manager looked for email capabilities. So I got back to my desk to search for that. At first, what I saw from the README was that there was a suggestion for a cron job that will mail users with tasks due on the present day (using date("Ymd")). This was not acceptable. Since there is no exhaustive documentation, I resorted to looking at the code. The code states that when a new task is assigned, the assigned person is mailed, if he/she sets the mailing preferences. So I thought that mailing will be done by simple use of sockets and not the underlying operating system mail transfer agent to decouple itself from the features of the OS (which may not be present). OK, I was wrong, it uses mail(). So I read the php documentation on mail() and it says there that the function uses sendmail. Luckily we have sendmail, and with some tweaking, ackerTodo is sending mail already. Previously I thought I would have to code this functionality myself; but due to patience and laziness, I saved modification efforts.


Simple control on assignment of tasks by others

One note that I have is that the user can choose to disable being assigned tasks by others. One of the main reasons a very high executive of our company asked for this is for him to be able to assign tasks to his managers. If one of his managers disabled being assigned tasks by others, this very high executive would not be able to assign this manager tasks unless the very high executive (which will have admin rights) explicitly enable what the manager disabled. (Well, this could be a minor irritant for very high executives, but on second thought, are not very high executives very irritable?...) So I wish ackerTodo had an admin capability to allow or disallow modification of the option to be assigned tasks by others. Or more fine-grained control on who can assign tasks to whom.


I fancy a java version, ackerTodo-java?

ackerTodo is simple and sweet. Only, it is in PHP. I am imagining something very much like it done in Java. Which brings to mind Spring, Hibernate, maven, javadocs, xref docs, topcoder-inspired tests, UML diagrams,... ListfulThinking / jtodo just so happened to be a swing application.

Webcalendar (on sourceforge.net, on freshmeat.net) looks interesting also...

Friday, January 20, 2006

Invoking by reflection - methods with interfaces as parameters

Well, currently I can't.

SAXParseException The processing instruction target matching "[xX][mM][lL]"

This is from an officemate:

SAXParseExceptionThe processing instruction target matching "[xX][mM][lL]"

Diagnosis:

"the processing instruction target matching "[xX][mM][lL]" is not allowed"
is a common problem that means there are some white spaces before the XML
declaration.

some link

Thursday, January 19, 2006

Free Bug Tracking Systems

In a previous company, an in-house-developed issue tracker was used and it is somewhat adequate but considering that that company was a small one, developing something like that in-house is a huge waste of resources when a lot of better-quality and free issue trackers are just a download away.

Currently, Bugzilla is used but I guess there are better free software than this. I just usually make use of the functions "Find a Specific Bug", and "Resolve bug, changing resolution to FIXED". The advanced query functions show just a lot of information in a very unstructured (and frustrating) way. Although I just usually make use of the two aforementioned functions, I feel that those two are already adequate. It's just frustrating that their other functions are not too impressive. And the UI is also unimpressive.

I came across MySQL's Eventum while browsing on information about their database. Eventum screenshots look good. I guess the project is still very young since its 1.1 version was released just last June 2004 and is currently in their 1.7.0 version.

I just heard of a project who migrated from JIRA to Mantis. I thought that must be something very good since JIRA seems to be very good already. It is among the 200 most active projects on sourceforge. This might be promising, but unfortunately, the website is hardly accessible today.

And then I came across this most promising project called Trac. One of the users on their list striked me: Ruby on Rails. Trac has integration with subversion as opposed to Eventum's CVS integration. Trac's timeline include integration with CVS and Arch though, while Eventum's roadmap does not mention integration with other version control systems.

Selenium on testing web applications

The link.

Just downloaded version 0.6 but not yet tested it. It so happened that I am doing manual regression tests and wanted to incorporate Selenium in the process. With the short time that I have I can't try Selenium because I'm halfway with the manual tests already. I have been exposed to HTTPUnit and HTMLUnit but Selenium seems easier even in its driven mode.

Being run in the browser itself directly, the application could be tested for its compatibility with the actual browser running it. Actually these characteristics of Selenium are highlighted in their website.

Tomcat problem - java.lang.OutOfMemoryError: PermGen space

I think I get these errors when I do deployment and undeployment of wars in "hot deploy". Many articles point to this source in theserverside.com : "Explaining and Fixing java.lang.OutOfMemoryError: PermGen" ; there are some discussions in Resin which somehow blame leaks in CGLIB which is utilized by Hibernate. CGLIB claims a fix for this concerning ThreadLocals for release 2.1_03. I'm not yet familiar with ThreadLocals. I haven't tried newer CGLIB releases that has that fix. Maybe in another project utilizing Hibernate. I should also document in this blog how to manipulate the memory for the jvm using the command-line (one of those -Xm parameters..).

Javascript issue - window.onload

problem was with

window.onload = ...


inside a script tag, which was resolved by a
script tag with the following attributes:

FOR=window EVENT=onload LANGUAGE="JScript"


and put the onload logic between the scrip tags,
which works for both IE and Firefox.

W3 Schools - The best things in life are free

..hope they remain as such. Since I turned to them for reference, I lost the urge to always consult HTML Complete. A downside could be that they are online, instead of being a book. Most consulted are referrences on "HTML 4.01" and "HTML DOM".

The link.

Web Developer - Firefox Extension

The link is here.

I have installed this tool months ago and have not used it very much, except for "Forms" > "Display Form Details" so as to avoid viewing the source often. That specific function is very helpful nonetheless. The "shortcut" which is Ctrl+Shift+U is, well.. longer than Firefox's Ctrl+U. Should I discover other useful functions, then that would be great.