08/06/2010
In a previous post I expressed my worries about Python being excruciatingly slow and I used a toy problem to compare the speed of Python to programs in other several languages, including C.

Of course, all kind of people complained that I couldn’t compare a dynamic, interpreted language with static, compiled languages. First, let met tell you that I sure can. First, the goal was to measure speed, and not the effects of type system of the language (although logically correlated) nor the programming paradigm: the amount of CPU used to solve a given problem was the primary (if not only) point in interest.
But to be fair to Python, I extended the tests to other interpreted, dynamic languages, such as Lua, Perl, PHP and JavaScript. I also added Pascal and Haskell in the compiled languages groups.
Read the rest of this entry »
14 Comments |
algorithms, assembly language, Bash (Shell), C, C99, Life in the workplace, Object Oriented Programming, programming, Python, rants | Tagged: C, Compiler, Dynamic Typing, Factorial, Firefox, functional programming, Haskell, Interpreter, JavaScript, JIT, Lua, Pascal, Performance, PERL, PHP, Python, redditards, Repositories or GTFO, Static Typing, Toy Problem |
Permalink
Posted by Steven Pigeon
13/04/2010
Unit testing helps you make sure that your code is working properly but the black-box approach has its limits. In fact, in a complex program with (unsurprisingly) complex behavior, black-boxing becomes a major hindrance to testing. So what are the options? There are several options, but they all seem to have their inconveniences; some violate the basic tenets of object oriented programming, some introduce additional occasions for bugs. I think that there’s no easy solution.

Read the rest of this entry »
2 Comments |
C, Life in the workplace, Object Oriented Programming, programming, Unit Testing | Tagged: #define, accessors, C, cpp, cross-cutting concerns, debugger, encapsulation, friend, macro, operator delete, operator new, polymorphism |
Permalink
Posted by Steven Pigeon
06/04/2010
I am currently contemplating the possibility of recoding all my CDs into new compressed formats. I currently use MP3 but since I started my collection in a time when a huge hard drive was 4GB, a lot of those are coded at 96 and 112 kilobits/s… which doesn’t sound all that great. Although MP3 isn’t the greatest format around, it does offer the advantage of being compatible with nearly all players around, something neither FLAC nor Ogg Vorbis can claim.

Some of the most recent devices support the addition of codecs, but not all. My Sansa player doesn’t, although I could probably upgrade the firmware or something but my car built-in player is another story. So for the time being, I considered recoding everything in MP3 with a higher bit-rate, or maybe use FLAC and write some kind of script that transcode the files to MP3 for exporting to a player. I’m not decided yet. But let say I decide to stick with MP3 all the way. What bit-rate should I use?
Read the rest of this entry »
5 Comments |
data compression, Life in the workplace | Tagged: ABR, CBR, codec, compression, encoder, FLAC, gpsycho, LAME, MP3, MP3 Audio, ogg, ogg vorbis, psychoacoustics, sound, sound compression, Variable Bit Rate, VBR, vorbis |
Permalink
Posted by Steven Pigeon
30/03/2010
Things I never, ever, want to hear. Ever.

6 Comments |
Life in the workplace, programming, rants, Unit Testing, wtf | Tagged: Compiler, LOC, negligence, nonchalance, OS, SLOC, Software, stupid |
Permalink
Posted by Steven Pigeon
23/03/2010
Developing software isn’t easy. No, I’m serious. It’s not. Every year that passes brings us more experience, and sometimes reality bites us real hard in the ‘rear.

For example, people do not always remain with a project until it completes. Often, people join a team for a summer, or for a year or two, then leave. That’s normal and expected. Of course, if the project is large, or the stay short, the code portion that was assigned to a particular individual may not be completed by the time he leaves. Can you manage to leave a team gracefully?
Read the rest of this entry »
Leave a Comment » |
Life in the workplace, programming, Unit Testing | Tagged: Comments, Developers, Developers Developers Developers, Documentation, God's Eye View, LOC, projects, SLOC, Software, team, WIP |
Permalink
Posted by Steven Pigeon
02/03/2010
As you already know—if you read my blog before—I use Emacs as my primary editor, for C, C++, Python, LaTeX, etc., and I’ve grown fond of the clunky ol’ piece of software. Still, once in a while, I need an extra, potentially weird customization.

Read the rest of this entry »
3 Comments |
emacs, hacks, Life in the workplace, programming, Unit Testing |
Permalink
Posted by Steven Pigeon
23/02/2010
Have you ever add to decide, you and your colleagues, where to go for lunch? Each time, it ends up being a committee, of course. It gets even worse when not only you have many colleagues, but also two offices, or two groups, at different locations. Since we work in a rather large city, we want to walk to the chosen restaurant, rather than drive, but in a way that is fair to either group.

So to settle the argument about where are the restaurants midway of both locations, we need a map, and some math.
Read the rest of this entry »
2 Comments |
algorithms, hacks, Life in the workplace, Mathematics, programming |
Permalink
Posted by Steven Pigeon
16/02/2010
In Calibrating your LCD for Better Results I presented a few techniques to adjust your LCD so that you get better colors, even though it’s not a perfect calibration.

I have a couple of laptops and their screens aren’t all equal. Not all all. The Vaio gives beautiful, vibrant colors. The Dell Mini 10 HD also gives rather cromulent colors. The E6500, on the other hand, is dreadful. Not the whole computer of course, because otherwise it’s a rather good machine. But the screen is just disappointing. And the thing is, you can’t adjust anything besides the brightness—which defaults to blinding bright. What would it take to make such a screen acceptable?
Read the rest of this entry »
2 Comments |
Inoffensive Rant, Life in the workplace | Tagged: adjust, brightness, color, Color Calibration, color temperature, contrast, Dell, Dell Mini, hue, laptop, LCD, NVIDIA, on display menu, saturation |
Permalink
Posted by Steven Pigeon
02/02/2010
Do you ever have pipe-dreams about what you should be able to do with your computer? Like those crazy virtual interfaces like they had in the movie Minority Report or like every CSI lab seems to have? (well, that’s at the movies, of course). What about just more down-to-earth matters such as making large, complex documents such as source code more legible? I have few ideas—maybe a bit wacky.

Read the rest of this entry »
5 Comments |
emacs, hacks, Inoffensive Rant, Life in the workplace | Tagged: brackets, CSI, emacs, parentheses, scope, syntax highlighting |
Permalink
Posted by Steven Pigeon
26/01/2010
Regardless of which operating you’re using, you’re bound to encounter applications that cause you problems. Some applications cause you problems so often that you eventually place a custom launcher or even a keyboard short-cut to a command that kills the applications. Firefox used to be one, but since version 3, it’s been much better. I still have problems, though now it’s always related to the Flash plug-in (which is rather troublesome in 64 bits mode). Another one that cause me problems regularly, is EvilEvolution, the Exchange client for Linux.

One essential *nix command you should know, is kill. The kill command dispatches a signal to a process, by default, SIGTERM. This message instructs the process to terminate. It can ignore the signal, but in general, it will close gracefully after freeing resources. If the program ignores the signal or is in an unstable state, you can kill it “harder” by using kill -9, which sends the process an unmaskable SIGKILL. The process terminates instantly under most circumstances.
Read the rest of this entry »
Leave a Comment » |
Bash (Shell), hacks, Inoffensive Rant, Life in the workplace | Tagged: custom launcher, Evilution, Evolution, Firefox, Gnome, killall, launcher, microsoft exchange, npviewer.bin |
Permalink
Posted by Steven Pigeon
Avoiding the Junkyard
23/03/2010Developing software isn’t easy. No, I’m serious. It’s not. Every year that passes brings us more experience, and sometimes reality bites us real hard in the ‘rear.
For example, people do not always remain with a project until it completes. Often, people join a team for a summer, or for a year or two, then leave. That’s normal and expected. Of course, if the project is large, or the stay short, the code portion that was assigned to a particular individual may not be completed by the time he leaves. Can you manage to leave a team gracefully?
Read the rest of this entry »