Archive for July, 2006
Passed the ‘Java 5 New Language Features’ JBB exam
Just passed the ‘Java 5 New Language Features’ exam on java blackbelt. Exams are becoming expensive! Costed me 12 piggies… But good to exercise java 5 stuff. Although the questions are good they are a bit easier (mostly due to being more focussed, not putting in unexpected null-pointers etc) then the questions I’m studying for the upcoming exam
No commentsJava for the ladies
My wife doesn't really like coding, she can find her way around HTML, CSS en some Javascript... but only if I really don't feel like doing it for her. Can't blame her, she is a designer.
She does however like making puzzles, specifically numerical puzzles like sudoku.
While preparing for the upcoming exam I stumbled over the following question, which I asked her to try and figure out.
Place the fragments into the code to produce the output 33. Note, you MUST use each fragment exactly once
class Incr{ public static void main(String ... args){ Integer x = 7; int y = 2; x __ __ ; __ __ __; __ __ __; __ __ __; System.out.println(x); } }
The allowed fragments:
| y | y | y | y |
| y | x | x | |
| -= | *= | *= | *= |
After introducing her to some basic concepts ( x *= x could be written x = x*x) she got to work, and managed to come up with the answer. Can you?
78 commentsIG Syntax Hiliter
Today I talked to arjan about the wordpress setup used for the company blog. I welcome the addition of the blog for sharing knowlegde with the community. One thing I noticed was the well looking syntax...
Arjan told me this was done by using the IG Syntax Hiliter using some custom modifications by Erik.
I installed the lot, so you can join me in cursing the examples which I'm studying for my programmers exam:
public class Eggs{ int doX(Long x, Long y) { return 1; } int doX(long ... x) { return 2; } int doX(Integer x, Integer y) { return 3; } int doX(Number x, Number y) { return 4; } int doX(short ... x) { return 5; } public static void main(String ... args){ new Eggs().go(); } void go(){ short s = 7; System.out.print(doX(s,s) + " "); System.out.println(doX(7,7)); } }
Brrr... I just hate this type of code... but hey, need to pass the upcoming exam!
No commentsNamed pipes
Last friday the guy behind the twinview setup on the desk in front of me tipped me on named pipes. Bash uses named pipes in a really neat way. When you enclose a command in parenthesis, the command is actually run in a subshell; that is, the shell clones itself and the clone interprets the command(s) within the parenthesis. Since the outer shell is running only a single command, the output of a complete set of commands can be redirected as a unit.
Since I learned this I mostly used it in combination with the diff command:
diff <(curl http://www.liekeensofie.nl//scripts/lightbox.js)
<(curl http://www.maas-frensch.com/sjoerd/wp-content/plugins/wp-lightboxJS/lightbox.js.php)
The above compares two webpages without the need of temporary files!
1 commentSjoerd goes ubuntu!
In the weeks just before Sjoerd was born I ordered the geekiest thing I ever ordered in my entire live: the ubuntu creeper. I ordered the smallest size, but it took Sjoerd 8 months, 1 week and 5 days to grow into it. But here it is!
Looking at him like this takes me being proud to another level!
1 commentHeader
While looking at the pictures I took while cooking some shrimps on my BBQ I discovered a wonderfull close-up, which I used in the header above... Not really shure if it will stay on for long, but I think it has got a nice summer feel to it!
No commentsCX-310-055
Today the mailman brought me my voucher to attend the Sun Certified Java Programmer exam. After three years of saying "I'll take it as soon as I have spare time" I finally decided to just pick a date...
4 commentsVisit by Slemper
Yesterday Maarten (aka Slemper) finally came to visit Sjoerd! A good reason to try out my new BBQ. Maarten is one of the few people I actually know by person (we made lots of music together during our first years at the HKU) which is also featured in the project I'm working on (revamping the 3voor12 website). A couple of months ago he released his first full album, which is (if you like the type/style of music) realy nice; good work!
Browser shots
Testing your website for browser compatibility is a tedious job. Most projects don't have budget to test on to many browsers. A good tool to at least have an idea of how a pages looks in the different browsers is http://v03.browsershots.org/
The only actions needed to test your pages are:
- submit url
- select browsers/operating systems to test
- that's it!
And browsershots will create screenshots of your page for all selected browsers/operating systems! Nice!
No commentsFun with XMØDMÂP
A colleguea of mine noticed me struggling with testing unicode support for the current application. I actually never knew a decent way to enter all those pesky (ë ę ç è ñ) characters.
The following xmodmap line will bind the right alt key (commonly known as alt-gr) to the multi (or 'compose') key:
xmodmap -e 'keysym Alt_R = Multi_key'
after this you can use the right alt key followed by the accent you want to use and the character you want to use it for CøøL!
(The xmodmap program is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms. It is usually run from the user’s session startup script to configure the keyboard according to personal tastes.)
No comments