More and more people are boasting about Maven (like him), I decided to try it too. First obstacle to overcome (of course): http proxy. Luckily, the Maven people have written a nice FAQ. So I put
maven.proxy.host = corpproxy.mmm.comin my build.properties (nicely put in ${user.home}, yes). It didn't work for me. After an hour of fiddling about, suddenly it came to me. I changed the above to
maven.proxy.port = 3128
maven.proxy.host = corpproxy.mmm.comAnd it worked!
maven.proxy.port = 3128
Did you spot the difference yet? Hint: try counting the spaces after 3128. Jup. There cannot be any, or it won't work. I very vividly remember, when starting to use Ant, we were all making fun of the poor people using make, because they had to deal with tabs and spaces and the lot. Now, we have progressed so far to be at that same point. History just keeps on repeating itself.
OK, onto the next error...
Via via, I discovered AurigaDoc today. A tool to generate documentation in several formats - worth checking out, I thought. And it indeed seems to do a pretty decent job. However, when I saw that you had to manually maintain the titles in your TOC, my enthusiasm very quickly faded away. The fact that documents seemed to be interspersed with <table> tags, didn't help much.
Forrest does a much better job in separating all the concerns. I am a big fan of Forrest. The only drawback that I have found was that you couldn't generate a PDF that covers your whole documentation. Since this blog entry was written several months ago, I decided to re-investigate this. And now it is possible to generate a single site-wide PDF! In your forrest.properties file, just set the project.start-uri to site.html, and both the single-page and the multiple-page versions (in HTML and PDF) are generated. Thank you Forrest!
Tested with latest CVS version. I don't know how long it has been in there.
The first time I disagree with my favorite unix girl enough to blog about it.
Fair enough, she is upset because, if you install Windows these days, it is very likely to be virus-infected before you can even reach windowsupdate.com (although I don't have a problem there, being behind an ISP proxy and all...) But then she gets off in this all-too-familiar "hehe, this can't happen on unix, hehe, you stupid windows-users".
I don't buy that. For one, she admits herself:
(and most people who use linux know better)This is the main difference between any Windows and Unix installation. The users. I've not been virus-infected (yet?), but I've been using Windows for quite some time now. However, I do have received my share of "BritneySpears.scr". I'm just smart enough not to click those, as are most people who use Linux. The difference is that people who aren't smart/interested enough to know this (hey, maybe they spend their time saving the lifes of too-soon-born children), usually won't run Linux.
To a lesser extent, I also disagree with
the virus won't be able to do anything bad to the sytemMost of Windows' viruses these days do nothing else than sending themselves around a bit, using the user's address book. As soon as there's a mail program available on Linux that allows you address the address book programatically, you'll have the same problems there. This has nothing to do with the OS, but with the application.
Look at me, defending Microsoft here. It must be that I'm getting old and understanding...
I've just (finally) finished The Pragmatic Programmer: From Journeyman to Master. Great read. I seem to have worked already following most of the principles explained in this book, but it is nice to have them spelled out for you. It reassures that you're on the right track, helps you to understand yourself and your way of programming, and helps you to find areas in which you can improve yourself.
For those who haven't read the book, a short synopsis: apply the programming/analysis/managing/.... methodologies you know, but without being zealous about it. Use UML to draft your class model, but don't restrict your use case by drawing a puppet, an arrow and a balloon. Write test cases, but don't write more than the return is worth. "Pragmatic" in every way.
This book has already spawned my interest in two other books: Surviving Object-Oriented Projects, and a good book on perl. Speaking of which: do you know of any?
A few months ago, we encountered performance problems when accessing our DB. After some searching, we quickly found out that PreparedStatements actually are better than plain Statements (don't ask). But this only is the case if you can reuse the same PreparedStatement over and over again, on the same connection. Since we were using a Connection pool, the question was raised whether putting a Connection back in the pool wouldn't "erase" its PreparedStatement pool. Since we didn't find any answer to this question, we decided to take the safe way, and build our own PreparedStatementCache. Do I surprise you if I tell you that this isn't as easy as it seems? Especially if you start mixing in Threads to clean up statements and the like....
To make a long story short, the PreparedStatementCache kept causing headaches. Every now and then, we encountered closed PreparedStatements on places where they weren't meant to be. So yesterday, I weeded everything away again, replacing everything with a ConnectionPool from Oracle (instead of the single connection we were using before). The major question remained though: If we put Connections back into the pool, will their PreparedStatements be reusable?
And this morning, I googled to finally find this article. Praise the Lord. Months of headaches down the drain. I'm a happy man today.
Update: read this too. Very interesting.
Update 2: I still wasn't very happy with the solution we got, because it was very Oracle-dependent (and in fact even dependent on the version of classes12.zip you were using). Thanks to a comment from Wim, I found out that DBCP also does Statement caching. I had heard about DBCP before, and have investigated it for this, but didn't find the reference to Statement caching. Thanks Wim! However, according to Koen, c3p0 should do a better job than DBCP. And it also has the StatementCaching option, so we went for that one. Fingers crossed that it passes the real-life tests.
Blogging seems to be contagious: David has picked it up too (without much fuss, but you don't hide from referer logs).
David is an ex-collegue of mine, who started his career at the exact same time and place as me. Apparently, he's now working at a job that I turned down because of a bad commute. I hope to read he's happy there. Welcome!
Update: David seems to have forgotten to have an e-mail address available. So David: congrats with your daughter! May she make you proud every day (and grant you some sleep now and then too).