Wednesday 12 November 2008

"happiness is like peeing your pants: everyone can see it, but only you can feel its warmth"

I figured I might as well take another month break from this place. Regular posting schedules are hard, man. I set up Google calendar to e-mail me every day a post is due, but I tend to just ignore the e-mails. I am bad, I know. But I'm out here again today, to praise my laptop.

And my trusty Eee has plenty of reasons to be praised. First, it gets you girls. That is usually not the case with technology, but there's something about a tiny laptop that attracts them like honey attracts bees. Maybe it's the cute factor, I don't know. I will refer you here and stop talking about it now. The second reason to praise my laptop is this: it's got linux on it. And that is cool, because it means that
  • It never crashes
  • You can click the little terminal button and noone will understand what you're doing anymore (including you, sometimes)
  • Most things actually work
  • Things that don't work magically start working some day, making you happy
I should stress that last point a little bit more: Linux makes you happy. It makes you happy because of a nifty thing called a "package manager". If this doesn't make sense, allow me to give you an example of how this works: Say you need to do task X on your computer, but you do not have software to do task X. A little googling reveals you need software Y. In windows, the next steps would be downloading Y from some website, agreeing to a EULA, clicking next a few dozen times, et cetera. On my laptop, you click the little terminal icon (losing all bystanders in the process), and type this:
sudo apt-get -y install Y
and that, my friends, is awesome. Not only does this install and set up the software ready for use, it will download future, newer versions of Y automagically, and set them up without your intervention. And that is why things that don't work suddenly start working someday, making you happy in the process.

what prompted this? Well, this morning I woke up and started my laptop as usual. I had obtained some Linkin Park music the previous day, and wanted to sync this to my iPod. This I do using the Banshee media player. It had sort-of kind-of iPod support, which means it will see your iPod. And after an inordinate amount of time, sometimes it loads some of the songs on it for playing on your pc. And you can drag files to it to upload them. Hopefully. However, today was different. Suddenly, everything worked flawlessly, within seconds. Turns out the trusty package manager had updated Banshee to its new version, 1.4.0, and this version works.

This, my friends, makes me happy.

Today's quote is unsourced. I saw it on bash.org, unsourced. You may have figured out already that I don't know what the source is.

Monday 13 October 2008

“There is no such thing as accident; it is fate misnamed”

You might have noticed another on of my post hiatuses the past two weeks or so. This time I did not go on a trip, nor did I forget or let laziness get the best of me. So what happened? (Bear with me here, I'm trying to create some suspense. All will be revealed).

You might also notice how I was singing an ode to cycling and exercise in my last post. And I mention that with a reason. Because I was pretty happy riding my bicycle, until September 29, at about 6:45 PM, when I hit reality. And reality, in this case, was in the form of a car. I will keep the accident report short: I flew over the hood, through the air, woke up in the ER with a concussion and a gap the size of a day in my memory, and spent the past two weeks recovering.

So there you go. Americans just can't take anybody doing something healthy on their roads. Seriously though, it was totally my fault. I ignored a stop sign. And well, if reality throws a stop sign at you, and you ignore it, people are going to get hurt. That's just a fact. So now I can't even run for the next month, and I am already bored out of my mind. Might as well start watching the terrible TV over here. The only good thing is the SciFi channel.

today's quote is from Napoleon. My new goal is to get a fantastic friends quote in there, but the only one that made me laugh so far was the one with a star trek reference. Go figure.

Thursday 25 September 2008

"Life is like riding a bicycle. To keep your balance you must keep moving"

Did I mention I was in Minneapolis, Minnesota, this weekend? anyway, it threw a spoke in my posting schedule. We don't do catching up on the net, and I don't have time for that anyways, so I'm just going to continue on as consistently as I can.

For the last, say, 10 years of my life, the bicycle has been my preferred mode of transport. The Netherlands has a deeply ingrained bicycle culture, which is both the reason this preference exists and the method by which it is sustained. Riding your bike through Amsterdam is possibly the only sane way to navigate it. Since no one on a bike there has any regard for traffic laws, driving a car there is virtually equal to murder (suicide is not really the right word here).

However, in The good old USA, riding a bike categorizes you as definitively out of your freakin' mind. Why, that's why god gave us the car, isn't it? Added to that is the complete lack of bicycle-friendly infrastructure, and the fact that everything here is so damn far away from other things. Riding a bike here is, in other words, is a royal pain in the ass, no matter how good a saddle you have.

Having said all that, my host father has recently bought me a bicycle. Not one of those things we Dutchies would use to navigate traffic comfortably, but a racing model. This thing was built for speed. 10 gears on it, which are necessary with all the hills around here. So despite all my complaints, I have been cycling my way to school recently, and it is an absolute joy. Finally exercising my muscles again! What I'm trying to say is, get off your fat ass and go do some physical exercise, you damned americans!

today's quote supposedly came from Einstein, though this has not been difinitely confirmed

Thursday 18 September 2008

"People accept their limitations so as to prevent themselves from wanting anything they might get"

I missed my posting deadline again today, this time by more than two hours. I'm sorry, I try to keep my schedule, but I hardly get time for a private thing like this except at night (though it can hardly be considered private if the website is there for all to see).

I've been quite happy with my Eee PC 901. You get noticed by everyone in the cafetaria (and sometimes mocked, but who cares?), and it's a nifty little thing to have around. Honestly, I sometimes think I only bought it for the cool-factor. You know, like drooling at the iPod section of a store? My inner gadget-freak acting up. However, the Xandros-based linux distro installed on the thing is, frankly... awfull. For, one, the simple GUI which seems to emphasize easy, is just too limiting. And the advanced mode is KDE based, which is just not my cup of tea.

So today I installed Eeebuntu on my little Eee pc, after first trying Eeedora and failing to get either wifi or ethernet working. Now, Eeebuntu doesn't actually support them out of the box either, but at least it makes it possible to install them. Let me show you a list of some things eeedora does not provide out of the box:
  • GCC
  • make
  • G++
  • wget
  • man
  • open-office
  • any multimedia applications
And probably some more obscure things I forgot about or didn't try. But that is a list of pretty essential things. You don't have internet access to install them, and you can't compile packages from source either. I suppose I could have gone out to find .rpm files for all these, but I installed eeebuntu instead, and got all this and Wifi working by installing two .debs I transferred over via USB-drive. So now I actually have a smooth compiz-enabled desktop with every application I'll ever need. It's a shame that eeedora was being such a royal pain, since I prefer yum over apt-get, but I can live with the way things are right now.

today's quote was already harder to find. It comes from Celia Green. Also, WikiQuote is my newest friend.

Tuesday 16 September 2008

If you can't decide in a day... you can't decide

I can get quite irritated at the the indecisiveness of some people, Most likely because I am one of those people myself. Nothing annoys us more than seeing our own flaws accentuated in someone else. A few days ago, I went with Betty to the Wal-mart to buy me a cellphone. Of course, it is impossible to go Wal-mart with a woman and a shopping list, buy what you need, and get out. At a certain point you will hear the line "Oh, while we're here..." or one of its many variations, which will be the start of a shopping spree no man can easily endure.

To Wal-mart's credit, they have quite a few different products. And by that I don't mean that they have everything from hunting rifles to peanut butter (they do), but that they have a hundred different brands of peanut butter. Including one that sells 16 kilogram(!!) buckets. But I digress.

On this particular day, Betty had decided to buy some bread, and so it was that I found myself at the giant store's bread section. And Betty was dancing around it like a child around a Christmas tree. Feeling the texture of all the different breads, admiring their looks, marveling at all the different flavours. Seriously, this went on for 10 minutes. I mean, how hard is it buy some friggin' bread!?!

And that's when it got even worse. I know, it's hard to imagine, but she managed it. She did the one thing possible to make this situation even more dire: She asked for my opinion.
As you may have guessed, I don't give a **** about bread. And I was annoyed. Normally, when faced with such a situation, men use tried methods that have been known to work, such as the no-no-yes rule. However, this only works for specific questions ("do you like this?"), not when asked for an opinion. Needless to say, I panicked a bit, and opted for the simple approach: point at the nearest bread and pray she'll just go with that. Luckily, it worked this time, though she caught on to the arbitrary nature of my decision.

The funny thing is, I did the exact right thing one can do in such a situation. If it is that hard to choose between the different breads (and one can abstract this advice to other concepts), it is likely that the choices are equal in value. Which means that more important than what you choose, is that you choose. The worst option you have is not making a choice at all.

Epilogue
Betty's indecisiveness cropped up again yesterday, when we were at an auction. I swear, this man talked so fast it was unbelievable. But I'm straying again. The problem was that by the time Betty decided she wanted to bid on some item, it was already sold. I was determined not to get caught in that habit, so when an old keyboard came up for auction I immediately cast aside any doubts and vowed to get it. And I did. For a measly 80 dollars, I now have a keyboard standing in my room, a re-branded JVC. It doesn't even come near a piano, but anything is better than nothing at all.

Today's title is a quote from "Munich," which is a good movie. Go see it. And sorry I didn't make it with the post. I'm only an hour late in my timezone though.

Friday 12 September 2008

Happy Birthday Dad!

Today is my fathers forty-seventh birthday. Congratulations from the states dad! Don't miss me too much!

I've been having trouble getting posts out ever since coming to the states, so I have decided to put myself on a more strict posting schedule. Posts will be every Monday, Wednesday, and Friday. Sunday posting will be optional. for those of you following the mailing list, posting there will be twice a week, Wednesday and Saturday. These have all been recorded in my google calendar to remind me. There may be an overlap in topics, so if you follow both of these outlets, be prepared for repetition. Together with the new schedule will be a new format: every post title will be a quote from a video game, movie, book, or other such thing. The post topic will relate to the quote in some way but not to the source of the quote in question. Exceptions are made when a political event or other recent real-world thing will be discussed. I'm hoping this format and schedule will help me write some more interesting posts.

I bought a tennis racket and some balls this week. I haven't had the chance to use them yet but I'm really pumped about that. A few people at the dorms play tennis and I want to play them. There are a few things still on my to-buy list, including a mobile phone and a camera. I've been drooling over iPhones, but I'm definitely not going to buy one at the ridiculous 2-year plan (60 bucks a month!) that they come with. the iPod touch is also tempting, but the 32 gig is too expensive and I still have a good iPod. My inner gadget freak is just acting up again. Especially after seeing the refurbished section at the applestore, with 80GB iPod classics going for just 176 dollars. Every geek in the world has a thing for Apple I guess.

My current favorite songs are "the poet and the pendulum" by Nightwish and "I'm yours" by Jason Mraz. I guess it shows my conflicting musical tastes. If anyone is interested, I will keep listing these as theey change

Tuesday 19 August 2008

academic programming

School has started over here in Wisconsin, and so far I have had a Web development class and a Visual Basic class. So far, I'm okay with each of them, but not particularly impressed. I guess my level of skill exceeds either of these classes, but they are prerequisites for the more interesting C# classes that I'll get in the second semester.

The web development class jumped right into coding HTML, which I regard as a good thing to do. Though I think more effort could have gone into explaining the nature of HTML code, like the differences between content and markup, I was happy to learn that old ways of doing styling were no longer used, and basic CSS was taught in the class.
The teacher explained to us how she had learned that it was okay not to close your p tags, but that this was regarded as wrong these days. So far so good. I did, however, regret that she did not always use strict XHTML, and sometimes lapsed into incorrect structures like these:
<.tag1><.tag2>some content<./tag1><./tag2>
To be clear, what I'm referring to here is the incorrect order in closing tags. (sorry about the dots and everything, I'm trying to get blogger not to eat HTML tags but I'm so far unsuccessful. Entities, on the other hand, are not recognised).

The visual Basic class was a bit more disappointing. First off, we did not get into any coding whatsoever the first class. Most of the class was spent looking at different types of flowcharts and UML stuff. Second, I was quite disappointed to learn that the software development lifecycle we were taught was basically the waterfall. Then the class went of trying to explain OO design, inheritance, polymorphism... these are things that cannot be taught without knowing some coding. The result was that the subjects were being dumbed down and incorrectly explained.

On another note, our VB teacher is female (which I find surprising, though I carry no judgement) and used to work as a COBOL programmer (well, nobody's perfect). She also teaches the C# and information security classes, though my info security class is not taught by her. I'm feeling lucky that I already have programming experience, because I think I would feel very confused coming out of the VB class had I had no previous experience.

Overall, I liked the HTML class better than the VB one. I think the teacher was a lot better (should I note my WebDev teacher is also female?), and it at least adheres to current development standards, or at least makes an effort in that direction. We'll see how things progress

Tuesday 12 August 2008

I have arrived

Welcome, everyone, to my first message from the United States.

The trip to Wisconsin was mostly smooth, without any delays or other annoying stuff. It was, of course, tiring, but such things are unavoidable. My digestive system is still a bit upset, and I'm also still tired, but I'm sure I will eventually adapt. The weather here is a nice 25 degrees, mostly sunny (though today is a bit overcast). My host family is a married couple called Betty and Ron (I won't go into last names because of privacy). They have four children who are all out of the house already, and live mostly in Arizona. Ron is a long distance truck driver, so he'll be home mostly on weekends. Betty is part-time medical transcriptionist who I believe works for a dentist.

There is a nice mountain right across from the house, with a few skyslopes and everything. I'm looking forward to winter snowboarding and everything that goes along with that.

School hasn't started yet, it will begin next monday. I met a woman from NTC (my school) at the airport, who gave me a super thick booklet which I haven't read yet, but will. I've driven around town with my host mother, and seen the college already. She seems to think of everything as small, though it is all a lot bigger than what we have in the Netherlands.

This post was written from Betty's computer, but I'll be buying my own soon for the most work I have to do. So I'll see you all soon from my own pc. I'll also be buying a camera so you can all see what my new home looks like.

Wednesday 30 July 2008

Pre-leave post

It's not that far away now anymore, the exchange. I may or may not have mentioned this, but I will leave for the states august 11, just under two weeks from now. I am strangely calm. Serene, I would almost say. In contrast, my mom is sort of freaking out all of a sudden. She has the impression that I need to do a lot of things before leaving. I wouldn't know what, really. Clean out my room, pack my bags, and we're all set.

Tania, my mexican alter-ego who will be replacing me during my time abroad, will arrive the ninth, two days before I leave. She'll have to bear with the guest room for a few days, but I don't think that's such a big deal. I'm floating between excited and nervous about meeting here. She speaks decent english, so it probably shouldn't be a problem, but I'm still nervous. More than about my own host family, which incidentally I don't know a thing about.

I should probably mention the dark knight. A friend of mine had tickets to the (Dutch) pre-run, the night before the official opening. We were seated basically exactly in the center of the IMAX theater, which was really awesome. As a bonus, free beer and nachos were served. And let's not forget the movie, which is awesome for a three reasons: the performance of Heath Ledger, the character that really drives this thing along. Second reason is not placing all attention on awesome special effects. They're there, but they don't take center stage for a change. And third reason is Morgan Freeman, one of my favorite actors of all time. In my eyes, a movie gets points just for him being in it.

I'll be seeing Wall-e tomorrow. I'm really expecting a lot from that movie. I'm hoping it'll be a pixar movie worth owning, which I haven't seen since Finding Nemo. Ratatouille is also good, I heard, but I never got the chance to see it. Maybe I'll rent the DVD once.

Friday 4 July 2008

for the sake of content

So, after almost a month hiatus, I am now back to entertain you with another post. I'm not going to think up any more excuses for not posting. Frankly, with my day job progressing normally, there's just not much going on worth blogging about. I am of course kept busy, implementing the A* algorithm in python and other such niceties. This one jumps out at me since the use of a heuristic makes A* annoyingly unpredictable. Moving around the goal or start points of a graph might work just fine. Alternatively, it could blow up in your face for no apparent reason and take off finding a path to China.

I'm writing this at work right now, to keep myself from falling asleep. Yesterday was my friend's birthday party. The main dish was the movie The Happening, a horror/disaster movie not unlike The Day After Tomorrow. This time around, the plants are angry at us and dispense a neurotoxin that makes people want to literally kill themselves. I am not joking. The movie started with construction workers jumping off their buildings en masse, in an enactment of the infamous lemmings. Though we noted and appreciated the ties between this movie and the suicide bunnies, we feel safe in recommending that you do not go see this movie.

Despite resolutions to the contrary I was (mis)led by temptation to party on far too long, finally hitting the sack at about 3:30 AM. Of course our little kittens no longer have any qualms about going into my bedroom, jumping on my bed, and start hunting one of my body parts that happens to be moving at the time. This was not appreciated, and I conveyed this message to them in clear and concise manner. No excessive violence was used, of course.

I will make a feeble attempt at dragging myself through the day. I am afraid that with my limited concentration, the bugs/lines of code ratio would exceed one, which makes programming an extremely bad idea at the moment. I've decided to focus on the simple things, letting the hard ones for after the weekend, when my mental state has returned to normal levels.

Tuesday 17 June 2008

School's over for me!

I've been back for a few days now, but there has been so much going on I didn't have the time to get around to posting something. Well then, where to start, where to start...

Probably most important is that I passed my exams with flying colors. Here are my marks:
Dutch:7
Latin:6
Philosophy:6
English:8
Chemistry:8
Physics:8
Math:8

There will also be german and french marks appearing on my diploma, but I passed those classes 3 years ago with similar marks. Festivities have already commenced to celebrate my diploma.

And when I say festivities I actually mean my job as a python programmer has just started. I'm sitting in an office right now, making a wxPython application that I won't bore you with. It's actually quite fun, though I have spent most of my time reading documentation and experimenting with the GraphicsContext API.

In my previous post I said I would be going on a vacation with some friends. I mentioned Ameland as a likely destination, but actually the goal was Terschelling, the island next to it, throwing all my rabid fans and paperazzi off my track. Actually, I just forgot what island we had decided upon and picked one at random, but he former story sounds more exciting.
Anyway, we had a lot of fun there, the weather was great, and we played midget golf. That's all you need to know really. I will give you one more nugget of information: our vacation at some point involved beer and a soccer match, which we won.

Now onto more important news: exchange. In the middle of my vacation, I took a leave of my friends and traveled to the city of Arnhem, where the exchange information and preparation weekend was held. About a hundred of my fellow exchange students showed up. Strangely, about eighty percent of those also went to the USA, with rather a lot of them going to states in the lake michigan area. About the weekend I could also bore you with endless details, but it should suffice to pass judgement in a single word: exhausting. There was beer here also, and the amount of hours spent sleeping were surprisingly little. Though we were talked to a lot, I would not call the weekend informative. Most of this talking carried the same single message: judge not, for thy culture is different. A not altogether surprising variant to the well known biblical saying.

Last but not least: two little kittens can now be seen walking in our house, chasing each other or sleeping lazily in the sun. The chasing must be quite tiring, I believe. I love them already. Pics will be coming up ASAP. They do not dare enter my bedroom yet, granting me my sleep at night. The stairs are a very intimidating obstacle, I concur. But this will not likely last long. They already wake up my sister wrestling in her room at night. Sometimes even on her bed.

Thursday 29 May 2008

I am a free man!

Hurray! The exams are finally over, and until august, I am basically a free man! No more school, no more boring stuff, no more nothing. Just me and the things I want to do. And THAT means programming.

But first, next week I'm going on a vacation with two friends of me. A camping trip of sorts. Our destination will most likely be Ameland. Or another of the Wadden Islands. We'll be leaving saturday, and I expect to be back sometime the week after that.

Monday 26 May 2008

Linux: threats are enough to fix it

Firefox was locking up on me again. Mind you, this is not usually a problem with firefox, but Fedora 9 comes with the BETA of firefox 3, and since this is a still unfinished version, I have found it to be somewhat slow on me sometimes, even crashing a few times.

So as soon as I thought it had locked up again, I quickly opened a prompt and threateningly wrote out the following command:
ps aux | grep firefox | awk '{print $2;}' | xargs kill -9
Then, before the final press of the enter button, I switched back to firefox again, just to check. And what do you know? Without intervention, the scared little fox had decided to start running again. Good boy you! I was only midly sorry I never got to use that triple-pipe thing right there.

So there you go. In Linux, even the Beta's work. If you... coerce them, a little.

Brushing up on history

I just discovered phrack, and I find it endlessly fascinating to read up on old issues. Especially the phreak world news is really awesome. I don't understand half of what they're saying, but still all stories about old hacker groups and phone phreaks are enthralling. Just now I'm reading issue 3, and I quote:
Finally, after several months of promises, Brainstorm (ELITE)
now has a 10 Meg Hard-drive
To me, the idea of a 10 Meg hdd by itself is hilarious. But a group of people actually using it together is almost incomprehensible, despite the knowledge of 'ye olde days' I already have.

Other highlights are philes (articles) on how to make different types of bombs and pipe guns, in-depth information on long lost and obscure PDP-11 system variants, and informative articles on picking locks, tapping phones, and electrifying school lockers.
Issue 3 was released in 1986. So this all happened a bit more than twenty years ago, when internet barely existed. I'm looking forward to slightly more recent articles that I can actually relate to, but these old articles are fun purely for historic reasons.

Saturday 24 May 2008

Yay! Its weekend

Hurray! The first and hardest part of my exams is now over and done. I feel like it all went pretty well. Some better than others, but a good feeling across the board. Latin was without a doubt the worst, and left me mentally completely drained. I couldn't do anything for the rest of the day. Luckily, chemistry was scheduled for the day after that, so I didn't need a lot of preparation.

Three more things are coming up: Philosophy, English, and Math. I plan on finishing English in record time. My Philosophy marks always surprise me (in a good way). It just math that sounds like it could be tricky. However, if I keep going at my current pace, I shouldn't have a problem with any of these, given adequate preparations.

Lesson learned today: when using flite (speech synthesis) on Fedora 9, it crashes. Hard. It turns out the problem is actually pulse audio, so kill that to unfreeze your pc. Thank you and goodnight.

Thursday 22 May 2008

Exams on the way

I'm well into my exams now, and so far it's going pretty well. I've had two already, Dutch and Physics, and I didn't have any problems with either. Tomorrow is Latin, the hardest of all of them, so it's far from over.

Apart from that, there is chemistry on Friday, which shouldn't be a problem, and philosophy, English and math next week. Apparently, the math central exams are always a lot easier than the school exams, so I'm lucky there. I usually get ridiculously high marks for physics with no effort at all (seeming knowledgable and talking a lot seems te be enough), and I'm going for a straight A on English.

And then I'm finally done, free to do the things I like to do. It should be great. I'll see you guys then.

Monday 19 May 2008

Crystal ball says it may be Wisconsin

Just before I got on vacation, I received a strange email from a Korean dude who is apparently from North Central Tech. As if that wasn't enough, he spoke to me about how excited he was I was coming to the same college as him, and how he wanted to meet me. The English was lacking in quality, littered with '^__^' symbols and the like, but the message was clear. He was convinced I was going to NTC, and he was excited about it. He was also a YFU exchanger.

Now I was quite surprised a Korean dude was emailing me, but even more surprised he knew where I was going before I did. I always assumed, that if the YFU had found suitable host parents, I would here it from them, not from a random student. I was, quite reasonably, a little wary of this excited stranger. However, he seems to know a considerable amount of details about me, such as the classes I will follow, and (not unimportant) my name and email address. So, while I remain cautious, I have drawn the conclusion that I will most likely go to North Central Technical College, Wausau, Wisconsin.

So, way up north, in a small town. It's not like the Florida vacation I just had. I did, however, indicate my hobby of ice skating (the going fast kind, not the dancing kind, mind you). And I expressed my wishes to continue pursueing this hobby in America. I stand by that wish now, and I'm on the whole content with my destination.

Of course, perhaps this was all a mistake of epic proportions, and Korean dude was never meant to email me. I don't know for certain, since I still haven't received word from the YFU about my destination. I will have to wait and see. But my crystal ball says it may be Wisconsin.

Monday 12 May 2008

Back from vacation

I probably should have mentioned it somehow, right. I really meant to I swear. But I got mixed up in all the preparations. So, I've just come back from two weeks of vacation in Florida. It was really awesome. And no, we did not visit Disney. We visited Sea World, which is like, so a totally different thing. It has only ONE roller coaster, you know! And we only did it one day. It's 'educational'.

Yeah, anyway, we had a lot of fun. I fed a squirrel my apple in the park, which is something I've never done before. And I saw alligators in the Everglades, and dolphins in the Gulf of Mexico. It was pretty amazing, we were just sitting at the beach and suddenly we saw them drifting along the coast. I also tried to catch a salamander with my hands. I caught one by the tail once, then had only the tail in my hands moments later. It was still twisting in my hand.

One of the things that amazed us all is the amount of space there is in America. Three lane roads are common, a patch of grass separates the road from buildings, parking lots everywhere, huge stores that sell everything... It's so radically different from Europe's cramped streets. I guess it is because of the difference in how the cities developed. I think I prefer our cities. It's busier here, people on bicycles, walking on the sidewalks, nice small stores... If I want to see a movie, I just grab my bicycle and 40 minutes later I'm at the theater. Or I could take public transport. You can't really do that in the US. Of course, you're allowed to drive a car when your 16 instead of 18, but still...

I'll try to get you some of my pictures as soon as I can. We're not really picture-taking people and we tend to forget the camera a lot, but we should have some.

Saturday 19 April 2008

Webdesigning

It's been a while, hasn't it? I must have a boring life or something, I don't know. Either way, my family has picked a student for the exchange. She is a Mexican girl. I won't reveal any more private details here, but I have faith it will all work out beautifully. She's supposed to send us a letter or e-mail sometime soon. So I'll get back to you by then.

Now on to the title. A while ago I landed a little job. I am to design a small website for a small family that runs holiday apartments in Greece. A friend of my mother belongs to the family, knows I am 'good with computers' and asked me to design a new website for them. Their current website, which can be found here, basically sucks.
The nice thing is they don't need something a lot more complicated than what they have now. That makes my job a lot easier, and it has convinced me that I'm up to the task. But that's not the best thing about this job.

The best thing is the payment: free stay in one of their apartments on a small Greek island called Nisyros. So provided I can afford the plane tickets, I'm going to Greece this summer! To pay for aforementioned tickets, I'll be working for my dad's company writing some python application.
It appears I have my work cut out for me.

Monday 14 April 2008

Adventures in Mario Kart


This image (courtesy of xkcd.com) originally dates back to Mario Kart: Double Dash, for the gamecube, But I have found that it applies equally well to the new Wii version of the game. I must confess that they have made this new game a lot harder, and that's not just the controls.

This makes the game a lot more challenging and fun, but also a huge frustration to play. The wii's wrist strap is actually a good measure to have, 'cause I had the urge to throw my remote against the wall several times today, after being pounded with red shields and squashed by giant bikes over and over, pushing me all the way back to last place right before the finish line.

Nevertheless, there is something about the game that just makes you want to keep on playing. Despite the back- and neckaches I've been having (My TV is positioned too low) I've been playing it pretty much non stop for the past few days, cursing, swearing, and generally having a good time. I just completed 150cc this afternoon, and now all that's left is mirror mode and of course the delicious online. It's more than enough to keep me busy for a long time, at least until super smash brothers finally arrives (why the hell that game is not out in europe is beyond me). And of course I'll be playing this with my brother and sister for months to come (just like with the last mario kart).

Sunday 13 April 2008

Happy Birthday Simone

Today (well yesterday technically) is my sisters fifteenth birthday, so let's sing everyone. The real party starts tomorrow, so there's lots more fun to come! Happy birthday, Simone.

I also bought Mario Kart Wii today. I've been playing it all day, and I really do love it. The steering wheel is awesome (an awesome piece of plastic, how about that) and the online capabilities should really up the replay value. The rankings particularly sound pretty awesome to me. The competitions should also be pretty cool when they start coming. This game is a solid buy if you ask me (I advise you don't, though. I'm not unbiased at all).

I fixed the bug that made my library crash under windows. It turns out I was accidentally blitting an image onto itself, which under linux is perfectly fine, but windows starts complaining and segfaults for some reason. Either way, it is fixed now. Updated versions should be coming out soon.

Before I leave, I will give you this fine piece of advice: Don't ever try chinese rice wine. It's a warm alcoholic beverage that is almost, but not quite, entirely unlike wine. It's also not at all tasty. So don't drink it. And consider yourselves lucky, because I had to find this out the hard way.

Friday 11 April 2008

Not Much Going On

Excuse me for not posting everyday. It's not because I forget this blog or something, there's just not enough going on to be talking about at the moment. I'm taking a break programming games right now. I'll get back on that eventually though, don't worry. School results are in, and there's not much exchange related stuff happening right now. That doesn't leave a lot of stuff to blog about.
I have a couple of unrelated small things going on that don't really warrant a blog post on their own, so I'm just rolling that in one big thing.

I started typing with ten fingers. It's something I always thought would be pretty cool to be able to do, and it would really speed up my typing. I downloaded KTouch and the full text of the GPL v3, and just started practicing. My current speed is about 215 characters per minute, or 35 words per minute. I've also noticed that programming this way is not very efficient, since you need all the hard to reach keys like '(' or '*' a lot more than in ordinary texts, which slows you down considerably.

I downloaded pygame 1.8 and tried it on my machine. It works perfectly. I have had complaints of a 'Runtime Error' when attempting to run my library example, but since that is as much detail as I have, and I can't reproduce the error no my machine, I'm not pursuing the bug any further. Anyone has any further problems and can give me details, please let me know. I also started doing the python challenge. It's a fun challenge for those not quite mathematical enough to like the euler project. There's a lot more use of the standard library going on there. I'm currently on level 10.

The YFU called my parents, and they're going to look over files from possible candidates to come over here while I'm gone. I'm imagining them sitting in the living room, YFU lady with a big catalog in her hands, my parents looking at some chinese guy. Then the lady says 'I also have this Fin. I think he'd be a great fit for you.' It's got a sort of slave market feeling to it, doesn't it? It'll probably a lot different than this scene, though. I sure hope so. For the Fin's sake.

Wednesday 9 April 2008

The Results Are In

It's been a while since the last post, hasn't it? I've just been relaxing a bit since the tests. And preparing mentally for the final exams in May. Or something. Now though, results are in, and they are mixed. Let me put up a short list for you. The marks are out of ten, with ten being highest and one being lowest. 5.5 is the lowest passable grade.

  • Physics: 8.0
  • Latin: 5.4
  • Math: 4.9
  • Chemistry: coming in thursday. But it's definitely good.
So that's a mixed bag right there. I knew I screwed up math, so that mark was not altogether unsurprising, but I thought I did pretty good on Latin. I guess I didn't though. So I'm kinda bummed I only just failed that. That's totally unacceptable really.

I get a second chance on two of these by my choice, so obviously I'm going to try math and Latin again. Those tests will both be next Monday, so I'm not completely finished yet.

Sunday 6 April 2008

More Stuff in Stdtools

There's more new stuff in the stdtoold package. The package cleanup has now been done (partially), and is available here. There is more coming, but that should do for the moment.

I've also added a new slider bar element to the GUI. It's pretty elementary, but should serve nicely. I also have plans for a more general 'widget' element, that allows you to embed and organize other elements. Note that this goodie GUI stuff is not released yet. It will come out sometime in the future.

In the meantime, I still don't have the new pygame 1.8 yet. Ubuntu is (like always) a bit slow in getting these packages upstream. I'll just have to wait out a bit longer (and I'm a bit lazy, since apparently there's some issues with stdtools and pygame 1.8, and I don't want to fix them just yet).

Friday 4 April 2008

Last Exam Day

Today was my last exam day, starring my physics test. It actually went pretty well, and I had no problems with any of the questions except for the last one (I couldn't remember formulas for calculating dosage equivalent). So what I did was just multiply all the data that was given to me and wrote that down. Such an answer is of course horribly wrong, but what do you do?

From now onto the final exams (in The Netherlands we have school exams given throughout the last three years and country-wide exams given in one week or so) Is about a month, and there's basically nothing in between. So Three weeks of pure relaxation. Except for the studying, of course. I guess that's important.

Wednesday 2 April 2008

stdtools update


stdtools, my pygame-based game library, is moving along smoothly. I have implemented a bit more sane GUI elements (buttons, menu's) that all work through my event system. The package structure is still a mess, but I will attend to that eventually. I also have plans for some documentation, which will require me to rewrite a lot of the docstrings and organise it in a sane way. I will do that shortly as well.

The new pygame version 1.8 came out recently, which means a lot of new stuff to work with. Of particular interest are the video and mask packages, the first one of which enables video playback (obviously) and the other one can be used for fast pixel-perfect collision detection. I haven't downloaded it yet, but the documentation is up and it looks promising.

I recently saw this google tech talk by Linus Torvalds, about the Git source control management system. I was intrigued, and wanted to try it out. So the stdtools package is as of now on a Git repository. The repo Isn't publicly accesible yet, since I don't have a good place to put it. I'll ask my father (who is in charge of the network here) if I can put on our server. Then everyone will have access to the latest bleeding-edge development code.

I've included a little screenshot of the pong game I'm developing with my library. It's main use is to test the features available, to see if the library is pleaseant to work with and get a better picture of necessary features.

P.S.: I should note that the menu is mostly there to show off the possibilities. None of the buttons work, except for 'new game' and 'quit.'

Second Test Day

Today was my second day of tests. Two tests were on schedule, chemistry and Latin. Chemistry went so incredibly easy it was almost a joke. I was a little worried about chemistry, because I really could not afford to fail the test. Not because of my marks, but because of my honor.

You see, I've always been quite good at chemistry. It's a shame I'm not really that interested in it, because I have some talent for it. Unfortunately, my teacher deems it necessary to explain subjects in such detail that I understand the problem within five minutes. The rest of the forty minutes of that class is then spent half asleep, or chatting with the guy next to me.

I do understand that for most people, chemistry doesn't come quite as easy. But after asking around in class, I have confirmed that almost everyone shares my opinion. The teacher simply doesn't get that the whole class understands the subject already and gets bored. He insists that we stay focused on the practice exercises he makes for us, and threatens to note anyone who doesn't pay attention as absent (too much absence can have serious repercussions).

You can imagine I was not altogether content in that class. Then, a few weeks ago, our teacher, in another one of his rants, said that either we should pay attention or leave the class forever. He was even nice enough not to note us absent, should we decide to leave. I saw my chance. I just raised my hand and said "I would like to leave, actually." He stared at me confused for just a moment, then managed a nod. He mumbled something like "talk to me after class." I nodded back, gathered my stuff and left, and that was that. I went back at the end of that class to talk to him for a bit. He had snapped out of his confusion and asked me if I was sure. He mentioned there were still a few subjects left to cover, which I would have to catch up with by myself. I said this would be no problem. I could see he didn't believe a single word of it.

So now, I had effectively dropped chemistry, except for the exams. I had a great time, doing all sorts of useful stuff in the hours others were hearing about boring amino acids. It was a wonderful decision. The only problem, of course, was that I couldn't fail the test without having to admit I needed the classes after all, so I was a bit worried about that.

In the end, though, that was all for nothing. I caught up with the amino acids the day before the test in about fifteen minutes, and the actual test was a walk in the park. My honor is saved, and life is wonderful. I have recommended my classmates they do the same thing and ditch class. No one has yet, but that may be the better option for them anyway.

If you wanted to know about Latin, it went fine. It wasn't quite as easy, but doable.

Tuesday 1 April 2008

Math stuff

So, this morning I did my first exam, Math. I thought I did pretty bad, but after deliberation with my classmates, I found out they did almost equally bad. We collectively decided we all sucked, and that the test was hard.
Looking back at some of the exercises done, I realize now that I would hardly even understand what the paper was trying to tell me if I saw this five years ago. A good example is this problem:

What is the following limit?

Impressive, right? Well, not for the mathematicians among us, but imagine looking at this with just (the dutch equivalent of) a high school education. I have just that, and to me this looks pretty daunting. I managed to arrive at an answer on the test, luckily. However, upon arriving home I wrote a little python script to actually calculate the limit (well, something close to it).
n = 200
upper = sum((-4)**i for i in range(0, n+1))
lower = (-4)**n

print float(upper) / lower
Simple enough. The answer came out to 0.8, or 4/5. That's not exactly what I had on the test (zero), but I was close enough. I remember there was a 5 in the divisor at some point. I guess we can't get everything right. Here's hoping I get points for originality.

Sunday 30 March 2008

Containment Versus Inheritance

In the stdtools package I recently released, there is a class called ResourceLoader. It's purpose is to provide a dictionary-like object that loads resources a game might need, like sound and images. The point is that the images are not loaded until they are accessed. A lazy loading mechanism, one might say. I wanted the object to behave like a dictionary, and make it generic enough so it could be easily adapted for a partical resource type.

The ResourceLoader class does exactly that. It overrides the __getitem__ and __delitem__ hooks to behave like a dictionary, and you can adapt it for a particular resource type by subclassing it, and overriding the load and locate methods. This is all very nice. However, there is a design issue in the class: It uses the dictionary through containment.

What I mean by that, is that the class has an attribute, self.resources, that is a dictionary of all the resources I have currently loaded. If the __getitem__ method is called, the class first tries to retrieve the requested item from the dictionary, and if it is not available, attempts to load it:
class ResourceLoader:
def __init__(self, paths):
self.paths = paths
self.resources = {}

def __getitem__(self, key):
if key not in self.resources:
self.resources[key] = self.locate(key)
return self.resources[key]
So why is this wrong? Remember that this class essentially is a dictionary, with some altered access mechanics. Therefore, it makes much more sense if the class is also derived from a dictionary, instead of containing one. This is the difference between an is-a and a has-a relationship. It makes no sense for this object to have a dictionary attribute if all access of the object is passed onto that dictionary anyway.

There are also concrete benefits to using inheritance in this case. Most importantly, we get all the nice things a dictionary can do, like iterating over it, retrieving it's length, etc. Another bonus is that it is a bit faster, since we don't have to look up self.resources each time. Another benefit we get in this case is that we can forget about the __getitem__ hook, and simply implement the __missing__ method, which is called if a key is missing.

It is not always so clear when to use inheritance, and when to use containment. Think about how your class should behave. If it's behavior is mostly like a dictionary or other type, and the class would benefit from having the methods that type has, inherit it. If the class uses the dictionary more as an implementation detail, and it makes no sense to call something like has_key on your object, it is better to use containment.

I have rewritten the ResourceLoader class as described here, and I'm going to push a new version of it out sometime in the future.

New Goals

I was never one for new year's resolutions. In my opinion, they are unnecessary, pointless things that usually end up broken anyway. Quitting smoking is a wonderful example. Though neither of my parents smoke, I have a few aunts and uncles that do. They have quit smoking countless times. Or, I should say, have attempted to do so. To this day, they are still smoking.

Nevertheless, in a recent evaluation of my life-style I have come to the conclusion that there are a few things I would like to see changed. Improved. I recognize that the best thing to do to improve, is to set goals. So it is now that I have to resort to these things I always dreaded, these resolutions. I do hope that my resolutions will not end up as abandoned and forgotten as so many others I have seen, and to that end I will try to keep track of them in a logbook of some form. Now, here is my list of goals (I avoid the name resolutions):
  • Exercise daily. I cycle a good 7 kilometers to school and back every day, so I am content with my leg muscles. I would, however, like some more muscle (and strength) in the chest, arms, and belly. To that end I will do some push-ups, pull-ups and crunches each morning. Something like fifteen minutes is the goal.
  • Shorten my time in the shower. I do enjoy a good hot shower. A lot. So much, in fact, that I sometimes shower for half an hour. This takes a lot of my time in the morning, which I will henceforth need for my exercises. Another bonus is the energy saving environmental effect. And possibly an increase in sleep time, which is another one of my hobbies. So ten minutes tops in the shower.
  • Go to bed earlier. I am truly a creature of the night (like batman, yes?). I have no problem at all staying up until 2 am or later. On weekdays, this cuts in my sleep time (Particularly tonight, because daylight savings time is going in effect here), and in weekends, I end up sleeping through most of the morning. I'd like to move my waking cycle more in sync with the cycle of the sun. Henceforth, midnight is the time I will go to bed, except when there are movies I want to see. Similarly, 9 am or earlier is the time I would like to rise. This gives me about 8 hours of sleep (I need some time to fall asleep) which is more than enough (If i recall correctly seven hours is recommended for people my age).
  • Drink more water. To measure the amount of soda I drink each day, I took a fresh glass for each drink, and left these glasses on my desk for one day. The result is a rather large amount of glasses sitting on my desk right now. In response, I have decided to drink more water. I will take a full half liter bottle with me to school, and have an empty one around dinner time. When thirsty, drink water instead of soda.
  • Spend more time learning Japanese. I want to learn this language for some time now, but progress is disappointing. Well, not anymore: I will set aside half an hour minimum each day for Japanese, specifically the half hour immediately after dinner.
These rules will all be followed during weekdays. On weekends, most of these rules are somewhat relaxed. There will still always be exceptions (like parties or other special occasions) where I allow myself to deviate from these rules. I'm talking mostly about my ordinary, daily life.
The rules will all go into effect immediately, and by that I mean next morning (I should say this morning, as it is already 3:28 am). I'm going to rigorously log how much these rules have been followed, in a file on my PC and perhaps also in this blog.

So there you have it. Wish me luck

Friday 28 March 2008

using reduce

Recently I've been reading this blog, about a guy who has set some goals for his life and is now trying to complete them. While I'm not especially interested in all that stuff, the guy is also trying to learn python. I have a sizable amount of experience with the language, so I've been sort of helping him along with his code, pointing out things that could be improved. recently he posted this code, about a function translating text to morse code. You can go over there and read that post, but basically he wrote this:
def translate(text):
text = text.lower()
for char in text:
print morse_code[char] + ' ',
morse_code represents a dictionary mapping characters to their morse code equivalents. Now this function is actually pretty pythonic and overall good, but as I commented, it is unnecessarily limited. The job of the function is to translate text, but it also prints it. What if you wanted to save the text to a file? to accomplish this, the 'what you do with the data' part (printing) should be moved out of the function. A function should do only one thing and return it's results.
You could easily modify this function: declare an empty string, add the characters to it in the loop, then return the result. But this makes the function a little bit unpythonic. There is a simpler, more elegant way to do it.

Cue reduce. Reduce is a really nice functional tool of python that in select situations simplifies the code A lot. It's not needed often, but when it is, marvel at it's simplicity. So, you ask eagerly, how do we use it?

reduce is a function used to reduce (aha) a sequence of values into a single value. It takes to arguments: a function, and a sequence. First, the function is called with the first and second arguments of the sequence. Then, it is called with the result of this call and the third argument. Then, with the result of this call and the next argument. This carries on until there is no more next sequence to apply the function to. At that point the result of the call is returned.
Let's look at a specific scenarion:
import operator
reduce(operator.add, [1, 2, 3, 4, 5])
operator.add is simply a function that adds its two arguments together. So, reduces takes the first and second elements, and calls the function with them. The resulting value is of course 1 + 2 = 3. Then, it takes this result and the next value, and calls the function again. The result is 3 + 3 = 6. As we go on like this, we can see that the result of reduce, in this case, is the sum of the numbers in the sequence. (note that, for adding a sequence of numbers, we have the sum function, which is better, cleaner and faster than this method)

using reduce to rewrite the translation method above, we can obtain the following:
def translate(text):
return reduce(str.__add__, (morse_code[c]+' ' for c in text.lower()))
Now there is a short function. I use a generator expression to obtain the translated text, and sum the characters together with the reduce function. the str.__add__ function is what is called behind the scenes if you add to strings together (i.e. 'str' + 'str2'). A generator expression is another one of those really useful tools to clear up your code. They are, however, an advanced subject. If you don't know what they are yet, first go look up list comprehensions. then, check out generators and finally generator expressions.

P.S.: while proofreading this post, I decided to check out the python documentation. It turns out that summing a sequence of strings is also such a common operation that it has a function just for that. Here is the correct, fastest and pythonic way to do write the above function:
def translate(text):
return ' '.join(morse_code[c] for c in text.lower())
the join function joins together the strings in the sequence, and uses the string it is called on as a separator. I didn't know about this function. The things we learn, right?

School ending

Spring is coming up, and with that come also what I believe you might informally call finals in American (like midterms, but at the end, right?). What I mean to say is, exams are coming up. There's about half a dozen of them next week (the 'school' part), and than the actual, official ones that make up 50% of your end grade are in may. That's pretty damn soon.

I was basically coasting along this last year, enjoying the ride, looking at the scenery, and then bam! Exams come up and you end up in this whirlwind of teachers trying to complete the course in time (apparently our Latin teacher will need to schedule some extra classes to get it done), having to suddenly know all sorts of stuff (how the hell do you calculate the mass of a certain gas, given temperature, pressure and the amount of mole?), and official lectures by dusty professors (seriously, respect to them. They know. A lot). The year that started so relaxed ends in tons of worries.

I must confess, though, I'm still pretty relaxed most of the time. The hardest part (oral exams) are already behind me, and I passed those (albeit barely). Chemistry and English are a breeze for me, so the real hard stuff is in math, physics and Latin. That's mostly managable. So like I said, most of the time I'm relaxed. It's just these evenings on the couch when I sigh, and my mom says "Only a month left, Hugo," and I just think "damn, just a month? That soon?"

I guess I've had mostly good grades for the past five or six years though (those passed pretty fast as well by the way), so I should be ok. It's about time school ended anyway. It's been dragging on like this for a few months now. And I'm really excited about the exchange.

P.S.: (volume * pressure) / temp = mole * gas constant
one formula down, tons of others to go.

Tuesday 25 March 2008

restructuring pygame flow

I've been programming in Python for quite some time now, and I have really fallen in love with the language. It's simple yet powerful, and there's a whole slew of libraries included. And even more out in the wild. Almost everything I do is in python now, and I'm liking it.

One of the things that has always had my particular attention is game programming. Python as no built-in library just for that, but there is an excellent library available for that called Pygame. It consists mostly of bindings to the SDL library (which is also pretty good), and a bit of python specific stuff to make everything easy for you. So I've been writing small games with pygame for a while, and it's mostly been good. One gripe I have with it, however, is the way the program is structured. I'm talking about the event loop:
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT:
return
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
player.move("up")
#et cetera et cetera
In short, checking for all events occurs in a single loop. That's good, but the actual handling of the event (player.move) occurs in the same single loop. This I find bad. Code used handling the player, enemies, menu options, all of it is gathered up in this single loop, which will grow into monstrous proportions because of that.

To counter this behavior, I have written an EventManager class that is based on callbacks: objects can register functions with the event manager, and these functions will be called if the event is triggered. The function is passed the event in question as an argument, and can act on the event accordingly. With this class checking for events occurs in the EventManager instance, and handling of events occurs inside the relevant objects. All the code is where it belongs, and everyone is happy.

Allow me to demonstrate how a simple class may make use of the eventmanager:
class SimpleObject:
def __init__(self):
EventManager.bindToGlobal(
(KEYDOWN, self.onKeydown),
(KEYUP, self.onKeyup),
(MOUSEBUTTONDOWN, self.onLeftMousebutton, {'button':1}))

def onKeydown(self, event):
print "keydown:", event.key

def onKeyup(self, event):
print "keyup", event.key

def onLeftMouseButton(self, event):
print "left mouse button pressed!"
the above is a simple example of how the event manager may be used. The bindToGloblal method is a class method which makes the requested event bindings to the global EventManager instance, which is stored inside the class itself (usually only one global instance is needed. This method simplifies acces to this instance). The arguments to the function are tuples consisting of the event type, the handling function, and optionally a filter which can make sure only events with certain attributes trigger the handler. In the above example, onLeftMouseButton is only called if event.type equals MOUSEBUTTONDOWN, and event.button equals 1.

So, you ask, where is the source to this elegant class, so I may use it in my games and reach ascension? Good Question. The EventManager class is part of a package that I now use to develop all of my games. Other parts of the package are collision detection, resource management (images, sounds), a primitive GUI, a simple vector class, and some more random tidbits I find useful in my projects. The entire package together is a complete mess, and I really wanted to clean things up a bit before I throw it to you wolves out there.

That said, though, the functionality is there for those who want it. I've tarred the package together under the (slightly) dubious name of stdtools, and it's available here. The entire package is unstable and subject to change. It's also under the GPL.

Passed the test

As part of the procedures that need to be followed in an exchange such as this, I took the CELT test last week (that's Comprehensive English Language Test. check it out here). I can assure anyone else who needs to take this test for some reason, it is almost too easy. I was told that no one in YFU had ever seen someone fail the test, ever. Me? I scored 296 out of 300. If you want to know, the required amount of points to pass the test is 160. With that behind me, I have now been definitively accepted into the YFU exchange program.

Now is also an appropriate time to address a few questions I have been asked regularly by friends and family. First and foremost, when I will be leaving. I don't have an exact date of departure, but the website tells me we leave somewhere near the first week of August. Secondly, where exactly will I be going? Unfortunately, I don't know yet. Allow me to explain.

The procedure I mentioned earlier involves filling out a whole bunch of forms (more like a whole book. It is really a lot), which together form a comprehensive profile of yours truly. The YFU then sets out and compares this with forms filled out by potential host families, and tries to find a good match. The forms include a lot of information, like health status, personality, likes and dislikes, teacher evaluations, the list is endless.

What I'm trying to explain, is that YFU will need some time to find a proper host family for me, someplace where I can fit in. That doesn't happen overnight, and these families are all over the states. So, until they find a host family, I won't know where I'm going to end up. It could be anything from Hawaii to Utah.

Monday 24 March 2008

random backgrounds

Excuse me for all the posts. Since I'm only just starting, I'm trying to get a lot of content out in a short time (get a good start, so to speak).

Recently I got bored with the default Ubuntu background. It's really nice looking with all the swirls and stuff, but I'd been staring at orange for long enough now. So I decided to find some cool looking new backgrounds. Sounds simple, right?

Well, not really. Sure finding a cool wallpaper is not that hard at all. In fact, it's so easy I couldn't decide which one to pick. What I really wanted was a way to get a different wallpaper each time I started my computer. Unfortunately, gnome offers no such option. So I decided to write a little script for it myself. Here's what I came up with:

path="/usr/share/backgrounds"
file=`ls $path | perl -e '@a=<>;print $a[rand(@a)]'`
gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$path/$file"

It's really even simpler than I expected it would be. picking a file is a one-liner, as is changing the background. I put in a path variable so you can set the location of your backgrounds.
Now all you need is some hot backgrounds, and set this to run every time you log in (using gnome session management at system/preferences/sessions), and you have a random new background image every time you log in.

Huge block tower

So, while I was browsing through our archives looking for a passable photo to use in my blogger profile, I came across this gem that my brother and sister built last Christmas.

That is one freakin' huge block tower right there. It's not that clear in the picture, but it goes right up to the ceiling. I asked my sister about the exact length, but she couldn't remember anymore. She did, however, remember that there was only about two centimeters left between the ceiling and the top of the tower. Going by the height of our ceiling, that would make the tower about 2.40 m high!

I never actually saw the real thing, since I was not home that morning. My sister told me it took the entire morning to build, and it never fell down once. The biggest problem was breaking it down without damaging the wooden floor. They eventually just put all the cushions they had around it, and then threw a ball at the bottom. My sister told me it went down like the twin towers.

As an aside, I found a somewhat passable picture for my profile as well, and uploaded that. So go ahead and make jokes about how I look.

I declare the blogs opened!

Alright everybody, welcome to the official (well, sort of) opening of my going USA blog. Allow me to explain a few simple things:

This august I will go to America for a full year. This is organized by an international exchange organization called the YFU (Youth for Understanding, I believe. Don't ask me were they got the name). I will live for a year in a host family, and also go to a community college.
I thought it would be fun for friends and family if I set up a blog where I can talk about my experiences as an exchange student.

That should do it for the introduction. I also have a few short yet important notes for everyone:
  • As exercise, I have decided that I will always post in the English language. I believe the internet has made me fluent enough, but it can never hurt to practice some more.
  • The layout is a boring default template for the moment, sorry for that. I'll color it up with nice American flags and such in due time, don't worry
  • Since I will most likely take a computer science course for my college year, and I have a great interest in programming, Linux, and other things computer related, I will post about these subjects regularly. Apologies for family and friends more interested in my other experiences. My posts will be properly labeled, so sort the interesting stuff out yourself.
  • Like I said, the blog is foremost for friends and family. Anyone else is of course welcome, should they find my incoherent rambling amusing, but I don't expect many of you right now.
That's all for the moment. I will follow up with some more detail about the exchange soon. Now to get the word out this blog is starting.