Thursday, December 8, 2011

Ho ho ho, now I have a microscope

Santa Claus had a short pit-stop here today and dropped off a high powered microscope from Amscope :-) Unfortunately the 10 MP camera doesn't seem to work very well, which is a bummer and something I will have to fix. However, I'm still full of excitement about this :-)

Update: The camera isn't dead on arrival. It seems to be alive and kicking when plugged into an old XP machine. My OSX box didn't recognize the camera at all. Amscope advertise that this camera should be useful both for windows and OSX, but either that information is incorrect or something is missing.

My cellar office is definitely getting a "mad scientist" flavor now: That microscope is huge and it stands right in the middle of my desk where I previously had a big flatscreen monitor so it's kind of hard to miss :-) Now I need to kick the tires a bit to get the imager up and running, set up some processing pipelines from the cellar office (where the XP box is located) up to the interclouds where the images will be stored. Also I now need to aquire some kit to make interesting preparates to look at. So far i've just looked at paper, which is interesting enough for an evening, but it gets a bit tiresome after a while even at 2000 times magnification :-)

Update on the update: A quick email to amscope cleared things up a bit. The camera as shipped from amscope doesn't contain software for OSX, but they have software available for download here: I haven't tested it yet so I don't know how good or bad it is, but this is progress :-)

Update^3: I've now tested the osx software and basically, it sucks, but not so badly that it's unusable. The software from amscope is an application that seems to be reading directly from the USB connection and then allow images to be captured either as single frames or as movies. That's not so bad, but what's just stupid is that they haven't bothered to make an OSX driver for the camera, which means that all other imaging software for OSX is probably useless. That is stupid. It is possible to work around this, but it would have been much better not to.

Tuesday, November 15, 2011

Telenor Management - a view into my crystal ball

I was thinking a bit about the future of the top management in Telenor the other day, and here are what I found. Mind you, I have no (absolutely no!) access to information that is private or confidential about these matters. Everything I say is based on a combination of open sources and wild guesses. Caveat reader. With these preliminaries out of the way, let's look at some cherry-picked facts listed in no particular order.
  • Jan Edvard Thygesen jumps ship from Telenor to Vimpelcom. Thygesen has been one of the most influential directors in Telenor during the last almost twenty years. He has been instrumental in particular with respect to the eastern european investments. As such, it is natural that he now joins Vimpelcom, one of the companies Telenor has had a considerable investment in. However, it also indicates another thing: He believes he has better opportunities in Vimpelcom than in Telenor.
  • The previous CEO of Telenor, Thormod Hermansen was CEO from 1991 to 2002. That is 11 years.
  • Before Hermansen Kjell Holler was CEO from 1980 to 1991, 11 years.
  • This year the current CEO, Jon Fredrik Baksås has been CEO for ten years. If history is any guide, he will step down next year. Nothing has been announced yet but that just makes it more interesting when we are playing the game: "Who's the next CEO of Telenor?"
  • Actually there is an obvious candidate: Kristin Skogen Lund. Let me name the ways in which she is qualified: She's bright. She's an MBA (INSEAD) , she already works within Telenor (the Digital Services division, formerly chief of the Nordic division). Also she's the president of the Confederation of Norwegian Enterprise which in practice means she's got considerable political clout, something which is mandatory for any Telenor CEO, since it's a government owned company. Finally, she's a she. Of course it's not obvious that she'll be elected, but it wouldn't be at all surprising if she is.

So what do i see in my crystal ball? I see a CEO change sometime next year. I see Kristin Skogen Lund being the next CEO, and I see a significant portion of the current top management team coming the same conclusion as Thygesen; that their remaining years are better spent elsewhere than in Telenor. As a consequence of this there will be a considerable influx of new people in Telenor's top management. Some will be internal, and some will be external, and I couldn't possibly comment on who I think any of these people will be :-)

Monday, October 17, 2011

Something to bite in ;-)

Even though the machine learning homework was really simple, it was still fun to do. I clearly needed a refresher on Octave, and Professor Ng's Octave intro was very useful: Exactly the right mix of speed and clarity. Ng is a really impressive character. He is obviously an extremely good teacher: At first glance that's not so obvious since it seems like the things he explains are just so simple that anyone could have done as well as him. That's actually the hallmark of a good teacher: The lessons just seems obvious. It's only after a while, usually after struggling a bit, one recognizes that the lessons are not that obvious and the teacher is actually brilliant :-) A risk with teachers like that however is that one believes that the lessons is all one needs, that exercises are not needed. Luckily I've learned that particular lesson previously and I've got no need to repeat it.

Another little but impressive detail is the octave code used to submit the exercises. Yes, you read that right: Octave itself does the upload. The submit script has its own SHA-1 implementation, talks with the ml-class server over the wire and handles the submit for you. Very elegant.

I managed to get the main part of the exercises done on monday but the extra credit parts will have to wait a bit.

The AI course seems a bit more clunky. Still worth the time but not the same level of style as machine learning. So far It's been a refresher course for me, but obviously one I need. Today's lecture was about probabilities and I discovered I had to think for several seconds (ok, even a few minutes) before I got the quiz questions right. That's surprising, after all I know this stuff, right? This is a reminder that you don't really know something if you don't actually do it on a regular basis. This is true for maths, but it's also true for programming and probably most other tasks requiring some skill.

Yet one pleasant surprise has been the discussion forum for the ai class and ml course on reddit. It's nice. People are polite, ask relevant questions, get good answers and are on topic and discuss academically interesting issues. It's a bit like being back on the internet before 1993 :-)

For some reason I've managed to lose my notes for the first two modules. Sigh. Another sigh is the LaTeX preview in AquaEmacs: It's just not working on my laptop. It is working on another machine at work so I'll try a bit of "differential debugging" to see what's the cause of the malfunction. That kind of thing just freaks me out when it happens. I have to breathe slowly several times :-)

However, all in all, it's good fun. I think I could benefit from explaining the stuff I'm learning to someone else; that's a really good way to enforce learning. I'll see if I can concoct some situation at work where it is appropriate to lecture on gradient descent, linear regression, bayesian networks or normal equations :-) Colleagues beware!

Friday, October 14, 2011

First AI homework done, Octave is nice

... but I obviously need a refresher course to get the intuition for what's right up. Good thing that the machine learning homework is really simple. Hopefully I'll get it done by this sunday, one week before it's due. One can hope.

Wednesday, October 12, 2011

First day of real coursework

So today was the first day of real coursework. I've been through module 1 and some of module 2 of the AI course and started on the machine learning videos.

Both of these courses have in-video review questions, and that's in fact a good idea. In both of the classes the material so far is just repetition, but it's repetition of stuff I learned quite a few years back, so today's lesson is that this kind of repetition is something one should approach with some humility: I know this stuff, or at least so I believe, yet I've yet to score perfectly (on first attempt) on any (except one) of the review questions. I even managed to get most answers to the review-questions about tree and graph-search algorighms wrong. I didn't see that coming. However, I'm taking this in good spirits. This is fun, it's a bit more challenging than I thought it would be at this stage but that's ok :-)

Monday, October 10, 2011

It's the little things - Octave and Gnuplot on OSX

I look forward to do some work on the machine learning and AI tasks, but right now I'm struggling with the basic tools. In particular the fact that I can't get plotting to work with Octave on OSX. I can get Octave to work, I can get Gnuplot to work, but not to use Gnuplot from within Octave. It's very frustrating. I will of course crack this one one way or another, but this is the kind of hurdle I get no pleasure from jumping over.

Update: I found a solution on

It's simply to put this:

## commands executed on startup

into an ~/.octaverc file. It works for octave, but not for QtOctave, but that's acceptable.

Update 2: It even works for qtMatlab, now I only need to get the inferior octave thingy in AquaEmacs to work and I'm all set to work in perfect comfort :-)

Happy Happy Joy Joy

The joys of fatherhood: Yesterday I was helping my son to bed, talking a bit with him and reading from a book. He is six years old and has recently started in first grade at school. Two really nice things happened:
  1. For some reason we were talking about numbers, and I asked him if the number eight was a prime. He waited a few seconds obviously thinking, then smiled and said "No, because it is an even number" . His math teacher is really cute too :-)
  2. I've decided to feed him some antidote to children's television, so I'm reading Kiplings "Jungle Book" for him (not the Disney version). I haven't read that version myself before and it was a plesant surprise: It's very well written, witty and not very politically correct. Sometimes it's just plain brutal, but (except some blatantly racist parts that I quietly skipped when reading) it's also very tasteful. Hooray for old Rudyard ;-)

Thursday, October 6, 2011

Stanford machine learning and AI

In other news: I've joined the experiment by participating in the AI and Machine Learning classes at Stanford. I'll report sporadically on how it's going. So far it's going great, which isn't so strange since classes start on october 10, which is on next monday :-)

The biggest question is if I will find time to do this on top of a full and busy schedule at work, and the inevitable full schedule in my private time (I've got four kids age twelve and younger). I'll try, but the classes will be among the first things to go if I find that there just isn't enough time.

Anyway, I'm exited about this ;-)

Wednesday, October 5, 2011

My power supply died

It's a brand new one for my Apple laptop. I'm sure it did so in sympathy with its maker.

Monday, May 16, 2011

How to fix bugs

1. Figure out how to reproduce the bug, or failing that, get extensive logs from when the bug manifested.

2. Locate where the bug most likely happens and start narrowing in:
  • If possible, write a test that reproduces the bug.
  • If the code where you believe the code is located is badly written clean up the readability as much as possible without making any semantic changes. Sometimes the bug will then stand out clearly and will be easily fixed.
  • Figure out invariants, pre and postconditions in your code, and insert checks for them everywhere you can. If they fail, fix them, if that fixes your bug it's gone if not then you've just fixed a bug waiting to happen.
3. If this doesn't work for a prolonged period of time. Fix the bug by rewriting the entire mess. Giving up is a very efficient, but also very expensive debugging technique.

More later :-)