Blog

14 Jun, 2009

Windows 7 without IE

Posted by: admin In: Uncategorized

That’s a shame. Internet Explorer is an excellent tool for downloading Firefox!

Read the press release here:

http://www.google.com/hostednews/afp/article/ALeqM5hGWpt2Jl279bg2BaPZz52moEnlnA

Tags: ,

I dag kan vi lese i VG at Norwegian har begynt å ta 40 kroner fra de som betaler med kredittkort. I og med at Norwegian selger billetter gjennom hjemmesiden sin på nett vil jeg tro at dette gjelder de aller fleste kundene deres. I følge Anne-Sissel Skanvik som er Norwegians informasjonsdirektør skal dette dekke beløpet kredittkortselskapene krever Norwegian for. Dette er så dumt at det er helt fantastisk! Det faller fullstendig på sin egen urimelighet at kredittkortselskaper tar 40 kroner per transaksjon!

Jeg sier ikke det at Norwegian ikke skal få love til å tjene penger, som alle andre bedrifter må de få pengene sine fra et sted, men jeg skulle ønske at denne trenden med hinsides vanskelige prismodeller tok slutt! Det hele startet da Post og Teletilsynet lanserte Telepriser.no hvor folk enkelt kan sammenligne mobilabbonementspriser. I ettertid har mobilbransjen med flere kommet opp med den ene prismodellen mer ubegripelig enn den andre.

Vg’s artikkel

17 May, 2009

Intel X25-M rules on Ubuntu 9.04

Posted by: admin In: Hardware| Linux

I finally got tired of waiting for the prices to drop further so I bought me a little from-me-to-me present, the Intel X25-M SSD. Ubuntu 9.04 already boots pretty fast, but with this drive it’s amazing! As you can read from the chart belove it takes around 10 seconds to get to the login screen. When I bought it I had hoped that it would make NetBeans and compilation of some semi-heavy Java projects more snappy, but it turnes out that the CPU was a much larger bottleneck than I had expected.

Ubuntu 9.04 boot with Intel X25-M SSD

Jeg hadde heller ikke bekymret meg stort om penger hvis alle i landet med en tv var tvunget til å betale meg nesten tre tusen kroner i året!

http://e24.no/medier-og-reklame/article3079677.ece

Tags: ,

16 May, 2009

Stupid default setting in NetBeans

Posted by: admin In: Uncategorized

One thing is that NetBeans wants to expand tabs into spaces, at least thats a hot topic. Although, why the hell would anyone use spaces when the keyboard actually has a dedicated key to produce a nice indentation is beyond me. But why in the name of all that is holy isn’t line numbering turned on by default?! I know it’s a minor thing, but it’s stupid non the less!

Tags:

I was astonished to find out that Mercurial was unable to represent empty folders. The most obvious workaround is to create an empty file in each of those folders. But hey, you don’t want to do that by hand do you? Well luckily we’re all using a Linux based OS with an extremely powerful command line. It took me just a couple of minutes to come up with a one-liner bash script which creates an empty file in every empty directory.

find . -empty -type d | xargs –replace=EMPTYDIR touch “EMPTYDIR/.empty”

This will put an empty file named “.empty” in every empty sub directory from where you’re standing.

Please make sure that you copy the line correctly. There is an double hyphen before xargs’s replace parameter and regular double quotes around the touch argument.

I’m so sick and tired of Subversion! A couple of days ago our repository server was down which caused the f… stupid svn client to hang. Not even pressing Ctrl-C would stop it. In the end I had to kill it the hard way. This obviously messed up the svn locks. You should think that they had implemented a timeout and sensible error message by 2009? And don’t even get me started on all those .svn directories laying around!

Anyway, this finally pushed me to have a look at alternatives. I’ve been wanting to try out Mercurial for some time now and this pushed me over the edge. My first impression is really good! I obviously have to spend some time getting used to the distributed model, but it seems like it might be worth it. Everything was looking rose red until I figured out that it doesn’t support tracking of empty folders!? It does make sense when I think about their architecture built up around sha1 sums, but I still think that it’s strange. I often create a directory structure before I start coding. The workaround seems to be creating empty files inside each folder, which sounds a little annoying to me.

That’s it for now. Man it felt good to shout and scream a little about Subversion! :-)

08 May, 2009

NetBeans 6.7 is looking good!

Posted by: admin In: Programming| Uncategorized

I’ve been trying out the beta build of NetBeans version 6.7 and it’s looking very good. The PHP support is becoming very good.

Even Grails support is coming along with support for Grails 1.1. Rumors has it that even debugging is supported now! Nice work!

Tags:

Bah, can’t believe that it took me that long to figure it out. Apparently you need to have the Grails application context up and running in order to use convertes (as XML / JSON) in your unit tests. After moving my test from the unit test folder over into the integration test folder it worked like a charm. Well, I’ve wasted time and blogged about it so you won’t have to repeat the mistake. Cheers!

02 Apr, 2009

Embedded Java LDAP server for unit testing

Posted by: admin In: Programming

I’ve just spent about a day trying different embeddable Java LDAP servers. To save you from all the trouble I came across I’m going to share some of my experiences.

Basically you have three choices when it comes to  embeddable Java LDAP servers (at least open source). First of you have Sun’s OpenDS, they have a page dedicated to Tips and tricks for writing unit tests. I have to say that I’m not very impressed by OpenDS. Don’t take me wrong it might be a fantastic LDAP server, but it certainly does not give me the feeling of being very embeddable! First of all the documentation refers to a mysterious class TestCaseUtils. I’ve checked builds from version 1.0.something to 1.2.something without finding it. The second drawback is that OpenDS is like a flesh-eating-configuration-monster sent back in time to kill the spirit of any developers getting near it. It comes with a 2000+ lines ldif config file, which is supposed to work for servers running embedded as well. It would be nice if they could provide a minimal configuration file for embedded use. To me it complained a lot about errors in the bundled schemas. Oh that’s right you need to set up a directory structure for config files, schemas and locks. Again, not very embeddable!

The second and third choise is ApacheDS. You have the newer version 1.5. with support for fancy things like triggers and stuff and you have the older 1.0 series. Both LDAPv3 compatible. The project is very well documented and they even maintain something they call Apache Directory Studio, which is a graphical LDAP GUI based on Eclipse. Very nice! If you don’t need the fancy stuff implemented in the 1.5 series I really recommend that you go for the older 1.0 series for your unit testing. You’ll find jars in Maven repos and it’s really simple to get started. It just works the way you expect it to! Just follow this guide and you will be unit testing your LDAP code in no time.

At the time I’m writing this 1.5.4 is the newest version of the 1.5 series. They have a guide for doing unit testing with 1.5 as well, but due to some problems it won’t work with 1.5.4 so you’ll have to build the trunk for your self or track down a Maven snapshot repo (good luck!).

Happy testing!