Nim's braindump Swords, code and a dirty mind!

2Jan/1016

Maven sucks?

Kent Spillner certainly seems to think so. I disagree with the conclusion, but I find myself agreeing with a lot of the points he makes. It's true that maven builds aren't always consistent across different platforms or even maven versions. It's also true that your pom.xml file can grow rather large and complicated if you want to get maven to do interesting things. And it's definitely very true that maven dependency management can be hair-pullingly-complicated and is essentially broken. Sure.

But saying that writing your own build manager is better? Advocating ant and rake? Seriously? Maven does a lot more than just build your project. It does reporting, site generation, eclipse project generation and pretty much anything else you can think of. The convenience of the thing is worth a lot. It's definitely worth having to struggle with the POM every once in a while. And to be honest, the POM syntax isn't much more horrible than ant's or rake's.

As for platform/version inconsistencies: if you can't force the people on your team to use the same software, then your problems probably run a lot deeper than just build management. Software has bugs, this includes maven as well. If you've hit a particular bug that causes your build to go kaboom, then fixing it sounds like the way to go.

If you have the time to write a build manager for every project you work on, be my guest. I for one don't, and maven has actually served me pretty well so far.

flattr this!

Tagged as: , 16 Comments
15Dec/090

Iaido Explained, part 1: Metsuke

Iaido isn't exactly your average hobby. Most of my friends don't know anything about it other than the fact that it's got something to do with swords. The usual reaction is "Sweeeeet!". That's usually about as far as the interaction goes. If I played football, golf or tennis I'm sure people would come up with all sorts of interesting jargon-riddled chit-chat. Most people know, to some extent, what "off-side", "handicap" or "back-hand" mean. Well, martial arts too come with their own jargon. I'll try to explain a key term/concept on something of a regular basis.

Metsuke, or 目突, is an essential concept of many martial arts. It's not to be confused with 目付. That particular kind of Metsuke refers to some kind of government official back in the Tokugawa era. The one I'm referring to translates roughly as "eye thrust", and as such it refers to making eye contact and making sure your gaze is locked onto your target. This is not as easy as it sounds. When you're pairing up with someone, it's easy enough to keep an eye on them. When you're doing solo kata however – which is most of the time in iaido – things get a bit more complicated. Looking at something that isn't there isn't easy. Looking at a moving target that isn't there is down right hard. The distance has to be right, the timing has to be right. If you look to the left while cutting to the right, something is definitely wrong. These kinds of mistakes aren't as obvious as making a wrong step or cutting the wrong way, but they're still mistakes. Knowing where your enemy is and what you're doing to him is at least as important as being able to make nice cuts.

It's said that advanced iaidoka can not only visualise their own imaginary opponent, but also those of their students. Who knows, maybe one day...

flattr this!

Tagged as: No Comments
14Dec/090

Regensburg seminar with Esaka-sensei

I recently spent four days in the rather picturesque Regensburg, Bavaria, Germany. Not as a tourist or anything work related, thankfully. The only thing on my mind during those four days was iaido. Four days of training under the all-seeing eye of Esaka-sensei and some of his senior students.

My group (Ikkyu up to Nidan) was placed in the very capable hands of a man whose name I never quite got, although Niishima-sensei seems to come to mind. Not sure how old he is, and it would of course be rude to speculate, but let's just say that if I ever live to be his age I hope to be half as fit as him! He took a while to warm up (literally, quite likely, 't was chilly), but once he reached boiling point there was no stopping him. He corrected me several times, mostly on relatively minor points, but those corrections alone made the seminar worth the trip. When Esaka-sensei corrected my footwork, I could almost forget about the ridiculously overpriced hotel with crappy beds.

Doing nothing but iai for four days in a row is a great way to improve. I didn't learn anything I wasn't already supposed to know, but the sheer number of repetitions combined with viewing things in a different light made my iai progress rather nicely. Definitely worth the trip!

Some interesting things I learnt:

  • The Japanese find it quite puzzling that we Westerners have such long femurs. For some people this means that the "Tsuka one fist from the Hara, Tsuba by the knee"-adage is simply impossible.
    I had the Metsuke and footwork in Ukenagashi completely wrong. Now that I've got it right, the rest of the Kata feels much more natural.
  • Esaka-sensei may be old, but he can draw his sword in the blink of an eye without seemingly moving a muscle. Practice makes perfect, I suppose!

For some reason I've still not received any pictures from the seminar. A lot of people took a lot of pictures and I'd expected to find some of them online by now. No such luck, however. If and when they do appear on the interwebs, I'll be sure to upload some of the more flattering ones. Mental note: bring a camera next time.

flattr this!

Tagged as: No Comments
8Dec/092

My new todo-tool: Toodledo

When it comes to getting things done, my memory is a bit of a leaky bucket. I've used all sorts of ways to manage my todo list, from simple entries in my .plan to monitors covered in post-its. Most of these work for me to some extent. At work I can force myself to remember to look at my notepad and strike things through when they're done. When I'm at home, it's a different matter altogether. Things end up not getting done. It gets worse when I'm at work and get a brilliant idea that I should complete at home. When that happens, I usually send myself an e-mail. There are currently 55 unread e-mails from myself in my mailbox. Needless to say, they're not going anywhere.

Enter Toodledo. It's basically just an online todo-database, of which there are many. But it comes with a very handy Firefox sidebar plugin, which not only allows me to add tasks on the fly, but it also lets me filter my items by context. So at home I have my home context, and at work there's the work context. Makes my life easier, I tell ya!

Toodledo sidebar in action

Toodledo sidebar in action

flattr this!

Filed under: english 2 Comments
7Dec/090

Howto: PostgreSQL data source in JDeveloper/OC4J

Today I had to create a postgres connection pool in JDeveloper's embedded oc4j container. JDeveloper being the horrible piece of software that it is, and its documentation being rather lacking, this took a lot longer than it should have. The pretty GUI wizards aren't able to pull it off either -- these measly conjurers really aren't worthy of the name.

The biggest hurdly was postgres' connection pool not being happy with just a jdbc URL. Instead it expects a hostname, port number and database name. These things are all in the jdbc url, but never mind, that would've been too simple. After reading through the XSD for data-sources.xml, I realised that there's an option to provide custom properties to the factory. Quite simple really. A connection pool definition looks something like this:

<connection-pool name="myPool" disable-server-connection-pooling="false">
	<connection-factory
		factory-class="org.postgresql.jdbc3.Jdbc3PoolingDataSource"
		user="postgres" password="1234"
		url="jdbc:postgresql://localhost:5432/db">
		<property name="serverName" value="localhost" />
		<property name="portNumber" value="5432" />
		<property name="databaseName" value="db" />
	</connection-factory>
</connection-pool>
<managed-data-source name="dataSource" jndi-name="jdbc/postgresDS" connection-pool-name="myPool" />

Once this is done, all that's left to do is place the postgres driver JAR in the j2ee/home/applib folder in your JDeveloper folder. If you don't place it there, you'll get very nice class not found errors.

That's it. Not very hard at all!

flattr this!

7Dec/096

I have a blog!

After some 10 years of blog-silence Ive decided to fall back into old habits. And yes, blogs have actually been around that long! I don't expect I'll be posting terribly regularly, on account of being lazy. Regardless of laziness, you can probably expect frequent (illustrated) rants about Crappy Code. In all likelihood various sword-related musings will end up here as well.

Should you, for some obscure reason, be interested in my current activities, here's a quick overview:

  1. Employed as a Java strumpet
  2. Musō Jikiden Eishin-ryū iaido
  3. Hyoho Niten Ichi-ryū kenjutsu
  4. Japanese lessons in order to pronounce the above correctly :-)
  5. Some open source Java stuff
  6. Slacking off
  7. More stuff in the pipeline

I'd love to spend more time hacking away at home, but somehow time keeps passing without my noticing it. Rather interesting phenomenon which I should probably take up with a physicist -- or maybe a psychologist. That being said, I'm always willing to make time for interesting projects. You're obviously more than welcome to point me in the right direction ;-) .

flattr this!

Tagged as: 6 Comments