Interruption At Work Created A Mishap

2009-08-30 by monzool

INTERRUPTIONS AT WORK is a frequent occurrence but generally its not a big problem. This time however the unavoidable loss of focus on what you was doing before, gave an unpleasant surprise.

I was adding some new functionality and had just written the following:

switch (state) {
    case Step3:
        configuration.length = 10;
        break;
}

Next I added a line to specify the configuration data on index zero. With the intention of doing this for the remaining nine data indexes, I copy-pasted the first line and incremented the index.

switch (state) {
    case ConfigureTask:
        configuration.data[0] = 
        configuration.data[1] = 
        configuration.length = 10;
        break;
}

But this was at the exact moment a colleague asked a question. To figure out the answer I had to browse around in the same file I was just editing. Not finding the complete answer there, the hunt led on to opening a bunch of other files. Eventually the situation evolved to a discussion using a white-board.

Now, even though the above code is incomplete, it compiles to perfectly valid code!. What the above code does is to initialize configuration.data[0], configuration.data[1] and configuration.length to 10. Naturally this behavior was never the desired behavior for that code…

Later, returning to my workstation, I had completely forgotten about the unfinished implementation I worked on before. In my mind it was already done and I proceeded on other things that would eventually allow me to run some basic tests for the new implementations. The nature of the code is to delegate a state dependent number of black-box data to a task. The receiving task is found by peeking into the first byte of the black-box data (configuration.data[0]). Unfortunately ‘10′ is a perfect match for the first task to be configured. So when unit-testing, at first everything seemed to be okay.

Later some strange behavior appeared, for which I could find no good reasons. Eventually I found the faulting situation in great dismay.

This kind of logic errors is the kind that can become extremely difficult to find, and I’ve learned my lesson: if leaving in the middle of writing some source code, be sure to quickly add some non-code that will not compile.

Posted in C++, Entertainment, Lua, Personal, Programming | No Comments »

TheCamp 2009

2009-08-04 by monzool

THE-CAMP 2009 WAS the third time I’ve dedicated a week of my summer vacation at TheCamp.
As mentioned in previous posts (TheCamp 2008 and TheCamp 2007) its a week where nerds meet to have fun, eat lots of food, drink beers and hack with ones own projects at will. This year we were 50 participant of a wide variety. The youngest participant was an (circa) 14 year old gamer, the oldest participant was a lady of 73 years of age wanting to acquire some more Linux knowledge. This year the female participant count was raised to five – a pleasant trend.

As the previous years I came with so many projects to do, that I knew I would not finish them all. I’ve been wanting to learn functional programming for a while. My intention was to learn Falcon, but one other participants had a task of learning Haskell, while another was proficient in the language, so I joined in on Haskell. I only had time for a brief encounter, but I’ve ordered some books and can’t wait to seriously dive in. I had brought some work with me, where I managed to clean up some unit-test and functionality-test code. Linx have had my interest for a while now, and I managed to do a prototype porting, of a client-server application of mine, to use Linx for IPC instead. I wanted to try out Mono on a PowerPC evaulation board, but LTIB didn’t really want to run on my Debian unstable install, so I ended up playing around with OpenSuse 11 on a Sun Virtualbox 3.0.

Virtualization was in fact the “great big thing” in this years guest talks. Asbjørn Sloth Tønnesen held a talk about Xen, Niklas Q. Nielsen held a talk about OpenVz. A third person (Svenne Krap) gave a short informal introduction to KVM. Poul-Henning Kamp held a talk where he apposed the increasing use of virtualizing the hardware.

Generally there was many excellent talks this year (to many to describe in detail), but here is some details on a few:

Bo S. Sørensen held a very entertaining talk about Android. He gave an overview in the evolution of smart-phones, and introduced the available Android phones. During his 45 minute talk he demonstrated the Android development tools by creating an application that could extract where his fotos on his phone where taken (if equipped Android phones stores the GPS position as meta data for each photo), and show the positions on a google map. As a side note: working daily with embedded Linux, it was with much envy I saw how seamless and easy the development environment integrated with the actual hardware. It was impressing to see how easy one could switch from running or debugging directly on a phone or in a Android emulator.

Palle Raabjerg ranted (friendly) about keyboard layouts. He’s a bit fan of the Maltron ergonomic keyboards. Martin Toft spoke about his experiences with bug fixing Vim at Google Summer of Code 2007.
An then there was Thomas Bøgholm… The two public television stations DR1 and DR2 are experimenting with streaming all their broadcastings in Linux friendly high resolution streams. So Thomas records and stores everything streamed from those two channels. Some might think this a the work of a crazy man, but I think it is an awesome (and crazy) thing to do. He’s made some software for automating the procedures, and got the software released under FOSS friendly license.

A very special event was celebrating the 40′th year of the moon landing by having a midnight outdoor movie display of the Apollo 11 mission. One of the TheCamp participants had bought a book where the authors had done a lot of work piecing together two movies of the moon landing mission. The first movie was the last 30 minutes of the decent and landing on the moon, the second movie was an almost 2 hour movie of Niel Armstrong and Buzz Aldrin working the moon. I’ve only seen small clips from the first moon landing, and it was first when seeing these movies that I really got my eyes up for the amazing achievement that was performed 40 years ago. I was very much awe struck. The same could be said for a revisiting participant of American (U.S.A) origin. He was convinced that he had seen everything there was to be seen of the Apollo 11 mission, but this movie had quite a few bits and pieces that was new to him. He went strait to amazon and bought the book :-).

This year we also had a visit from a public television station that did a daily broadcasting from different summer arrangement around the country. They didn’t have the first (or n’th) clue about computers, so they mainly wanted to hear “IT-jokes” (they didn’t understand a single one of the jokes) and filmed the days special event of hardware-throwing.

So TheCamp proved again to be the highlight of the year. I’m definitely going next year ;-).

Posted in Personal, Travel | No Comments »

Upgraded From WordPress 2.2.2 to WordPress 2.7

2009-02-08 by monzool

WORDPRESS 2.7 UPGRADE from WordPress 2.2.2 done with no problems.
I was somewhat worried that my old theme would break on the upgrade, but It appears to be working. Well, I got at little issue with the Wp-Syntax plugin. I upgraded the plugin and now my GeShi style overrides do not work anymore – guess that is things one discover when doing infrequent upgrading.

I’m looking forward to working with this new WordPress version and exploring its added features.

Posted in Personal, Programming, Web | No Comments »

Fixing VW Passat Intrumental Panel

2009-01-30 by monzool

THE INSTRUMENTAL PANEL on my 1992 VW Passat was giving some strange readouts on the electrical indicators and warning lights. At first I thought that something was wrong with the temperature censors, so I had en engine block censor changed. That helped nothing, but then other errors began to emerge. For example, the temperature gauge and diesel gauge would sometimes showing erratic values, jumping from one setting to another or just showing obviously false values. The overheating warning light would signal after just starting the engine, or having run only a few kilometers or the headlight settings would indicate the opposite of what was actually set. This recording shows how the gauges head for endpoints and the headlight indicator changes, when switching on the headlights and instrument panel lights.
All these issues turned my suspicion towards an electrical error in the instrumental panel; and sure enough it turned out to be an electrical fault. The instrument panel circuit board is connected to external components via a big multi-connector. The soldering for this connector were broken and needed re-soldering.

Steps take to make the instrument panel work correctly

To get the instrument box out, the steering wheel has to be unmounted first. The rim around the panel box can be awkward to pull out, but start but pulling the right side first and when that detaches the other side follows easily. The panel box is top mounted with a couple of screws.


When pulling out the panel box the speedometer cable will detach from the box. When refitting the panel box, position the lower part panel box in an outwards angle, and the panel can then be tilted into upright position with the speedometer cable guide right into place.


The speedometer guide is unscrewed in counter-clock wise direction. At the right side of the back cover is a multi-connector. When removing the internal circuit board, this connector has to be unlocked by prying a thin screwdriver (or other fitting tools) into each of the two locking mechanisms.

After opening the box, the gauges are removed. The speedometer is corner screwed while the two other can carefully be pulled of their mountings.


The problem in this case, was the multi-connector slot (here seen from the connector side)


Visually inspecting the pin soldering revealed that most of the pin soldering had gone bad. To fix the instrument panel the soldering had to be redone.


This panel, or variations of, is common to most VW’s of late 80’s and 90’s models and apparently this type of error is not an uncommon failure in these circuits prints.

Posted in Personal | No Comments »

Speedway On A Cold, Windy And Rainy day

2008-10-07 by monzool

COLD, WINDY AND rainy would describe the weather this past Saturday evening. Not that that kind of weather uncommon in Denmark, but this particular day I was at the outdoor Speedway event “Denmark vs. The World” at Vojens Speedway Arena. Speedway is one of the most exiting motor sport types, and its a fantastic experience to watch it live. This event was a special event where two teams, with Danes on one team and non Danes on the other, would race each other for the price.

Here’s a movie that I recorded with my IXUS 50 Canon camera: Speedway – Denmark vs. The World. Not the best quality, but captures the excitement pretty well.

It was a fantastic evening apart from the fact that the event was canceled after heat 11 out of 18 heats due to bad weather. As this picture will show, we all got a bit surprised on the weather. Here sits my brother, my sisters husband and my father with his Easton cap, all hoping it would stop raining.


I’m somewhat glad that I’m not on the picture – we ain’t looking to stylish I guess. lol.

Posted in Personal, Travel | No Comments »

TheCamp 2008

2008-07-27 by monzool

THE-CAMP 2008 WAS a repeat of the success from last year. Again this year 40 people, in all ages, from all over Denmark (plus an North America from Norway, plus a Dane from Holland) rallied for 7 days of of open source. TheCamp is the perfect opportunity for doing some serious nerding and spending time with others of same interest.

Again this year I had a lot planned for this year, but as expected I didn’t get though it all. Firstly I downloaded the latest Subversion revision of Boost 1.35.1 and did some Asio socket and thread programming. I’ve been using Mercurial for a while but planned a switch to Bazaar, so I got that install and moved my projects to a new (local) repository. I’ve bought a new Lenovo 3000 N200 laptop and planned for getting wireless lan up and running on it. That however, was surprisingly easy as everything was supported right out of the box on a Debian Unstable installation. I finally managed to check off a long time waiting TODO item of learning how to use CScope from Vim. I installed Aros on my spare laptop, an old Asus A1000, but Aros kept crashing on me, so I gave that up. Wednesday was more a chill-out day with drinking a few cold beers, taking to people generally enjoying that the sun had finally appeared ;-). I did get some Python programming done with libnotify though. Otherwise I played around with some programming with the Clutter-project toolkit along with it’s Python bindings Pyclutter. Additionally I also tried a bit of Docbook, but decided that LaTeX was better.

As per tradition at TheCamp there was plenty of guest speakers. There was three presentations a day, but of course attending was voluntary.

Sunday, the highlight was when Vim guru Preben Guldberg reran his Vim/regular-expressions presentation from last year. Preben is an expert user in Vim and is also seriously proficient in regular expressions (I think he’s got the black ninja belt in both categories). This year I grasped somewhat more that I did last year, so a great rerun ;-).

Monday Poul-Henning Kamp of FreeBSD/phkmalloc/Varnish fame gave a presentation on developer habits and tools. In essence his was tired of things like having to write linked lists or decide what hash-trees to use. He wished that the software industry would do for them selves, what they have done for all other industries – make the computer do the work. As always an interesting PHK speech, but I think the audience didn’t fully agree; as one argued: “There are being made progress with tools like Eclipse and frameworks like Ruby On Rails, but if you insist on using Vi and writing low level C, then your not really making it easier on your self”. In the evening, Linux multimedia enthusiast and game graphics designer, Rene Jensen held a Blender workshop where he gave a live introduction to Blender.

Tuesday Jørgen Olsen from Sun Microsystems Denmark presented OpenSolaris 2008.5 (sprinkled with Solaris comparisons as a few of the audience run Solaris at work). Jørgen may be an old guy that looks like a hippie with his headband and log grey hair – but he definitely know his Solaris/OpenSolaris stuff. We got a demonstration of the SMF (Service Management Facility) that is an attempt to replace the old system initialization scripts. Other topics was ZFS, Containers, virtualization and DTrace. Later that day Bjarke Walling gave a demonstration of Lego Mindstorm. It was a great run though of Lego Mindstorms hardware, software and historic. He had built a couple of robots and created a program upon feature request from the audience.

An interesting speech Wednesday was Flemming H. Sørensen’s presentation on the Syllable operating system. Flemming had been in the Syllable core group for a couple of years, having responsibility of the locale system. He, and a group of fellow Syllable friends, just forked Syllable to do development that they’d felt had been neglected far too long.

Thursday Preben Guldborg held another session of Vim tricks where one could ask questions or get help with.

All in all this voluntary driven TheCamp was just perfect again this year, and I will surely return next year.

Posted in Personal, Travel | No Comments »

Blade Runner – Final Cut

2008-05-21 by monzool

BLADE RUNNER HAS been one of my favorite movies since the first time I saw it.


I’ve always hoped that I would get chance to see Blade Runner on the big cinematic screen, but hadn’t really believed that an old 1982 movie would get big screen time. But suddenly the chance came up, as BioCity in Århus arranged a special marathon, dedicating one show room for continuously playing Blade Runner – Final Cut at all time slots for almost an entire week. The sensation was enhanced by the fact that the movie was projected from a digital copy with a high resolution projector. What a fantastic picture quality! This was the first time I’ve seen a digital movie projected at the cinema – and what a debut experience with such a picture-beautiful movie as Blade Runner. This is how movies should be seen.

Definitely worth the almost 150 kilometer drive.

Rating: ★★★★★



Posted in Entertainment, Movies, Personal | 1 Comment »

Wolf Tattoo Restoration

2008-04-24 by monzool

MY WOLF TATTOO had been in need of major restoration job for several years now. Today I finally went to “Doc Pain”, the local tattoo shop, and had it redrawn.

This is a photo taken during the recoloring of the tattoo. It is really stunning to see how much it had degraded since it was originally made in 1995.


At first the tattooist wasn’t quite confident that it could be salvaged. In some places the contours had almost vanished and other places the skin had some tissue scarring. I wasn’t that worried though – it couldn’t get much worse I reckoned.

Now its good as new, and I hope it stays good this time around. If it does, I need to find another drawing to be tattooed.

Posted in Personal | No Comments »

What GUI Toolkit To Use?

2008-02-29 by monzool

GUI PROGRAMMING IS not something I’ve done in quite a while. At work I do embedded programming and that’s mainly also what I’ve been doing for my own personal projects. Except for some small utility applications I really haven’t done large GUI projects since MFC 6.0 was cool (if such a time ever was) ]:->.

An absolute requirement is that the end result must be multi platform capable (Linux, BSD, Mac OS X and Windows). Plenty of frameworks and toolkits exists that fulfill that requirement, but I find that the Kde/Qt constallation is the most exiting and complete toolkit(s) around – especially given the multi platform perspective introduced by Kde 4. Although Kde 4 is not quite stable yet, I think the choice is wise in a longterm perspective.

I primarily do C/C++ programming (and a bit of Lua scripting), but I really would like to extend my horizon (or more precise raise above n00b level) in other programming languages like C# and Python. Given that I have much to learn about Kde, GUI’s and what else is hot in the desktop programming world, the option of C# is not a mandatory requirement. I could settle on a C++ and Python solution.

Mixing two complete different kinds of languages (static and dynamic) requires either good binding layers or Mono. The Kde Project provides a large suite of binders in the KdeBindings package. The README contains a concise description of the project contents:

This package contains:
* working:
  * korundum: KDE bindings for ruby
  * qtruby: Qt bindings for Ruby
  * smoke: Language independent library for Qt and KDE bindings. Used by QtRuby
    and PerlQt.
  * kalyptus: a header parser and bindings generator for Qt/KDE. Used for
    Smoke, Java, C# and KSVG bindings generation at present.
  * ruby/krossruby and python/krosspython which are plugins for the kdelibs/kross
    scripting framework to provide scripting with python+ruby to applications.
  * PyKDE: KDE bindings for python, requires PyQt from riverbankcomputing.co.uk
  * Qyoto: Qt bindings for C#
  * Kimono: KDE bindings for C#

The Mono project seems to be somewhat controversial. A lot of writing has being going on lately on Mono vs. Novell/Microsoft vs. freedom. Anders Hejlsberg and his team have created both clever and interesting stuff in the .NET architecture like C#, DTS (Common Type System) and CLR (Common Language Specification), but I can’t appreciate embracing other closed proprietary technologies from the .NET portfolio, when other alternatives exist in the FOSS community. I think Robert Devi summed it up nice in the Osnews.com comments (the personal rantings of Robert on Mono speed/memory, Amarok etc. I don’t agree on).

As far as I can tell, the above observations give me the following constructs:

  1. C++ + Kross + PyQt + PyKde(*1).
  2. Mono + C# + limited managed C++ + Qyoto/Kimono + IronPython.

*1: PyKde is not released for Kde 4 at present time.

Its a difficult decision whether to choose the one or the other construct. Because I have already done much C++ coding (and shot a foot off more that once) and not much C# coding, I lean mostly towards the Mono solution. Unfortunately this could potentially force me to use MonoDevelop. Tried it eight months ago and tried it again yesterday; it’s still the single most unstable piece of software I ever used :-(. Hope its not the case that it only works on OpenSuse or Suse. That would not be freedom. Anyways, selecting C# would mean that the money I spent on the book Professional C#, 3rd Edition won’t go to waste.

Posted in Personal, Programming, Software | No Comments »

B&O Speakers Rocks – Other Music Too

2008-02-26 by monzool

THE QUARTERLY GRAND tour of company introduction for new Bang & Olufsen employees was up today. Having started at Bang & Olufsen just this January, I attended this all day event.

The introduction day included various speakers from the executives hall, a tour, and visiting various technical experts that did a “show and tell” on their respective area of expertise. All in all It was a really great and informative day.

Three things stand out from the day as having made huge impressions on me.

  1. The level of production quality control.
  2. Trying a BeoLab 3 “blind” sound test.
  3. A BeoLab 5 sound demonstration.

The production facilities were quite impressing, but especially the resources put into quality control was staggering! The company motto is “perfection, no less” (although in more words in the official slogan ;-)) and I begin to understand that they really mean it.

We attended a blind test where a curtain hid the speakers being used to play different types of music. I seriously would have bet my car on, that it could not be that same speakers playing both the classic piece and the rock music. The sound image portrayed by the speakers was so different, that I (as well as the other attendees in the group) was absolutely chocked to see two tiny BeoLab 3 being unveiled behind the curtain. Impressive and great fun.

The tour also included a stop in the Bang & Olufsen show room. The room featured a fully equipped home theater with a BeoVision 4, four Beolab 5 speakers, DVD player and CD player and then a Beo4 remote-control for controlling everything (including the lights, window shades, the door and the elevating projector screen). And whau! The sound coming out of those BeoLab 5 speakers was just amazing. Not matter what kind of music was played, or at what volume, they just played perfectly! As others have discovered before me no distortions are audible even when the volume is cranked to “eardrum popping levels”.

I was perfectly happy with my NAD T743 amplifier and my old Dali 104 speakers before today – sigh

Posted in Personal | 2 Comments »

« Previous Entries