10.16.11

Are the times ‘a-changin’?

I have often though that we live in uninteresting times. Men have gone to the Moon and back, nuked their asses to hell, invented some of the most breath-taking gadgetry and right now we’re just recovering from 100 years of creativity by taking a 50-year vacation of brain death.

Read the rest of this entry »

08.27.11

Bug Norris

We’ve spent our last three days at the office debugging a very obscure bug (which we’ve eventually isolated to what might in fact be a problem in TI’s MSP430). It’s one of those incredibly obscure ninja bugs which depend on timing and compilation options which crept into our firmware update code and caused one byte (just one) of some flash segments to be written incorrectly.

While banging our head against it we actually ended up believing we are trying to debug a kind of Chuck Norris of bugs and from here to the following jokes about Bug Norris, the way was quick and easy.

  • Bug Norris can mask a NMI
  • Bug Norris can infect a virus
  • You never fix Bug Norris, he just moves in another part of the code
  • Bug Norris is a self-modifying bug that even turned itself into an operating system once, that operating system was called Windows.
  • Bug Norris can live in comments inside your code
  • Bug Norris is optimized out even in code compiled with -O0.
  • Bug Norris can roundhouse kick your debugger

07.14.11

Moving from academia (back) to industry

Things have been quiet here lately; I’ve been busy with various university-related stuff, a Big Conference and, well… switching jobs. I’ve worked in the industry before, but I took a break to focus on my studies and ended up in academia for two years. Now I’m slowly readjusting to not working at a university. If anyone else ends up in such a situation, here’s how it goes so far.

Read the rest of this entry »

07.2.11

Absinthe emacs theme

Enjoy.

(defun color-theme-absinthe ()
 (interactive)
 (color-theme-install
 '(color-theme-absinthe
 ((background-color . "#000000")
 (background-mode . light)
 (border-color . "#001902")
 (cursor-color . "#01b300")
 (foreground-color . "#b6f977")
 (mouse-color . "black"))
 (fringe ((t (:background "#001902"))))
 (mode-line ((t (:foreground "#000000" :background "#4f831b"))))
 (region ((t (:background "#0d4519"))))
 (font-lock-builtin-face ((t (:foreground "#729fcf"))))
 (font-lock-comment-face ((t (:foreground "#63697e"))))
 (font-lock-function-name-face ((t (:foreground "#00dbed"))))
 (font-lock-keyword-face ((t (:foreground "#4ebc6e"))))
 (font-lock-string-face ((t (:foreground "#53f240"))))
 (font-lock-type-face ((t (:foreground"#8ae234"))))
 (font-lock-variable-name-face ((t (:foreground "#9dfa89"))))
 (minibuffer-prompt ((t (:foreground "#729fcf" :bold t))))
 (font-lock-warning-face ((t (:foreground "Red" :bold t))))
 )))
(provide 'color-theme-absinthe)

05.21.11

Living With A Night Owl: A Guide For Other Species of Birds

Having a night owl as a friend or some form of a significant other can be complicated. It’s not so much due to the limits imposed by our schedule per se; but more because it can be difficult to understand why your night owl friend is grumpy at 7 AM or skips a night out because they have work to do. Here’s a short guide for you other species of birds; a small crash course that might perhaps offer you some insight into this somewhat weird life of ours.

Read the rest of this entry »

05.16.11

5 Mistakes People Who Write Scientific Software Make

Being a programmer involved in writing scientific software is somewhat similar to being passionate about history and getting stuck in the Middle Ages.

Read the rest of this entry »

01.23.11

Hardware hell all over again

In the last few days, I have been paying a visit to a place I had left long ago, in the days when Turbo C was the IDE of choice and accessing 4 MB of memory was done using memory hacks. Yes: it is the hardware hell, the familiar place where they had config.sys on the table last time I got there. It’s not there anymore, but something else is.

First, some background story. In spite of my grunting about the lack of a decent C99 compiler for it, I’m trying to move my laptop to Windows 7; after all it came with the license, I might as well use it. Besides, Linux just doesn’t cut it as a laptop operating system. The battery life I get from it is somewhere between awkward and catastrophic (about 2 and a half hours with all the power saving hacks and nuts, which is about half of what I get from Windows 7 in power saving mode), the closed-source ATI drivers randomly crash when I add a second monitor and the open-source ATI drivers don’t see it. In fact, setting up dual-monitor support in general is a mess. Ten years ago it really “just worked”: add three lines in XF86config, restart X server — woop, dual monitor glory. Now it supposedly does that automatically through a full stack of tools, from xrandr to some funky desktop applet, and inevitably something doesn’t work. The applet crashes, xrandr refuses to work, the virtual desktop size gets reset every time I remove the monitor and instead of everything being done using hand-written xorg.conf, nowadays it’s done using some autodetection system that couldn’t autodetect if the computer is on. It became so messy and entangled that I simply stopped trying to wrap my head around how it works, making me feel like a fossil from the days of punch cards. The same goes for power management. Putting my computer to sleep works, and everything wakes up except for the coolers, resulting in everything hitting the 100 deg Celsius critical temperature within 30 minutes.

So basically I moved away from Linux on my laptop to get away from the hardware hell. I was sick of having to hack my way to using two screens for half an hour, constantly watching over the battery during conferences, doing prayers and incantations every time I wake up the computer and of trying to find a Gtk theme that looked good and didn’t take up half of my screen to show a toolbar.

Good bye, Linux drivers hell. Welcome, Windows drivers hell.

First one down the row: driver conflicts. Or something. Having both my LAN card and my WAN card enabled promptly result in a BSOD at login. Bear in mind that I am not talking about creepy cards manufactured on a boat in the Sea of China — both of them are in the Windows HCL. If I disable one of them (fortunately I have little use for the LAN card), I only get one occasionally, at login, probably due to some other drivers that I coudln’t identify even using WhoCrashedIt. In any case, they go away if I turn off the computer and unplug it, then start it again, which isn’t too dreadful for me because I mostly put it on sleep anyway. But I could not help feeling the irony of it. Every time I see some gnutard ranting about how Windows is insecure and unstable and throws BSODs, I’d inevitably tell him to use something other than Windows 95 and that I haven’t seen a BSOD since the days I didn’t have a beard. And yet there I was, scratching my head as to what the heck was wrong and how I might diagnose a BSOD I was seeing every time I tried to log on.

Second one down the row: Bluetooth. I know it’s there because I can use it under Linux. So imagine my surprise when I tried to connect my old Apple BT keyboard and couldn’t find the damn Bluetooth icon around. Bluetooth was showing up under Device Manager, my mobile phone was detecting my laptop and it could try to connect to it, although I couldn’t type the passcode because there was no box asking for it. The Bluetooth service was off, adding to my bafflement (what the heck was it seeing if the Bluetooth service off?), but in any case, I figured I’d probably check for some newer drivers.

Screw you, Dell!

Screw you, Dell!

61 MB? For a Bluetooth driver? Seriously? I have hard drives around my house that are smaller than a damn Bluetooth driver. A minimal NetBSD takes up about that much space and that’s a whole fscking operating system with a handful of tools around! Not to mention that downloading this at the whooping 40 KB/s of their slow mirror was excruciatingly slow.

The good news is that the installer did not ask me for a restart. The bad news is that I had to do it anyway because, upon opening Device Manager, my theme suddenly changed to Aero Basic and then the whole thing promptly crashed.

After about an hour of wrestling with it, I am now able to type this message using my beloved wireless keyboard. This took roughly 45 minutes more time than it took me to set up my first PS/2 keyboard under MS-DOS. At this rate, I would expect it to take me about 2 hours to set up a keyboard 10 years from now. No wonder that vocal human-computer interaction is such a big deal.

09.24.10

Praising pastis

The reason why you haven’t seen anything around here lately is that I’ve been working hard to finish two papers (you know how academics is…), and shortly after that I left to Toulouse, to attend SCEE 2010 ( http://sites.onera.fr/SCEE2010/ ). It was a very inspiring atmosphere, and sitting at the same table with Tim Davis is, well, for the lack of any more elaborate description, just great. Bonus when you’re an undergraduate. One day before coming home I’m so full of ideas that it won’t be easy to find time for writing about my experience of a real HPC project with Python as I promised.

The other thing I wanted to mention is that the French are famous for their cheese, but they should also be famous for pastis; technically that’s absynth’s halfling, but in fact it’s a great drink that deserves an ode of its own. Grab a bottle if you can.

08.21.10

The perils of using a Matlab wrapper with Python

If you have ever had to work with tons of legacy code, Alexander Schmolck and Vivek Rathod’s excellent mlabwrap is a complete lifesaver. On the other hand, remember that Matlab’s way of storing dense matrices (column-based indexing starting from one) is different from the one Numpy uses. This hides some annoying trouble here which is not immediately easy to spot.

Read the rest of this entry »

08.15.10

Why I’m using Python rather than Matlab for scientific programming

During the last few weeks I’ve been implementing the project I’m currently working on in Python rather than Matlab. Matlab is a standard tool in scientific programming and pretty much the de-facto standard at my workplace. Fortunately, the fine folks I’m working with at LMN are very open and when I told them I want to use Python to implement my next application, the answer was somewhere along the lines of “That’s very interesting, I never heard of anyone using it for that… oh, wait, no, I know of some guy who works at <an important semiconductor company> and I remember he’s using Python… oh well, go ahead with it and show me the code in the end, I’m very curious”. Heck, this is one place I’d like to work at until I retire. So, after about 5 weeks of testing, what have I to say?

Read the rest of this entry »