23/12/2008
In Tunnels of Doom!, I wrote that the disjoint sets algorithm is one of the very few algorithms every programmer should know. That got me thinking. Should? What about must? If everyone must know about disjoint sets, what other algorithms must every programmer know about?
I made a “top ten” list of algorithms and data structures every programmer must know about.
Read the rest of this entry »
19 Comments |
algorithms, data compression, database, embedded programming, programming, Uncategorized | Tagged: array, Artificial Intelligence, Binary Search Tree, Binary Tree, Chess, disjoint set, Dynamic Programming, genetic algorithms, graph, graph algorithms, hash function, hash table, hashing, list, lookup table, memoization, one way function, QuickSort, Radix Sort, search, sorting, state space, state space search |
Permalink
Posted by Steven Pigeon
16/12/2008
Æons ago, that is, in September 1982, I got my first true computer, the Texas Instrument TI-99/4A. A truly incredible machine, especially considering the era. Its CPU, a true 16 bits processor, the TMS 9900, ran at 3MHz. Even the popular TRS-80 Color Computer, Radio Shack’s 6809-based computer, ran at a mere 0.895MHz, or, if the gods were good to you, you could tweak the clock divisor and crank it up to 1.79MHz.
In addition to being my first programmable computer, the TI-99/4A sported truly nice graphics and a relatively advanced sound chip—for the era—and a number of games were developed for it. Hunt the Wumpus, Parsec, and others. But the one game that really got me interested in programming is Kevin Kenney’s Tunnels of Doom, one of the very first graphic dungeon crawler games. While not being nostalgic by nature, I returned to that game about a year ago following an unusual route. I was looking into procedural content generation, especially map generation, in relation to data compression and I remembered that the old game’s dungeons were generated randomly, yet were very well structured. I decided to get a look into it, and see if I could generate maps like his.
Read the rest of this entry »
18 Comments |
algorithms, data compression, embedded programming, programming | Tagged: 6809, ASCII Art, Nostalgia, Procedural Content Generation, Procedural Generation, TI-99/4A, TMS-9900, Tunnels of Doom |
Permalink
Posted by Steven Pigeon
09/12/2008
This week, a more mathematical topic. Sometime ago, we—friends and I—were discussing the fidelity of various signals, and how many bits were needed for an optimal digitization of the signal, given known characteristics such as spectrum and signal-to-noise ratio.
Indeed, at some point, when adding bits, you only add more power to represent noise in the signal. There’s a rule of thumb that say that for every bit you add, you can represent a signal with
more of signal to noise ratio. Let me show you how you derive such a result.
Read the rest of this entry »
9 Comments |
algorithms, Mathematics, programming, signal processing | Tagged: dB, decibels, PSNR, RMS, Signal Power, Sine, SNR |
Permalink
Posted by Steven Pigeon
04/12/2008
Ars Technica has a review of Open Solaris 2008.11, the latest release from Sun.
The strongest point of this release is the integration in the environment (notably through Nautilus) of ZFS, the Zettabyte File System, which is a next-gen file system supporting lots of nice features, such as storage pool, transactional file system updates and advanced snapshotting. It is a contender to MurderFS ReiserFS now that Reiser‘s in jail for murder. ReiserFS is one of the very nice file systems, but its future is uncertain, which is a major bummer for me as all my Linux boxes are using ReiserFS. ZFS is its most serious contender given its features, at least if one gets around the fact that it is not released under GPL but CDDL.
Leave a Comment » |
Operating System | Tagged: Murder, Open Solaris, ReiserFS, Solaris, Sun, ZFS |
Permalink
Posted by Steven Pigeon
02/12/2008
In C and C++, the behavior of integer promotions is not the same whether we use signed integers or unsigned integers. In bit twiddling hacks, it is not immediately apparent that it is a problem that may lead to unexpected result whenever code is ported to a different architecture. This is a recurring topic whenever I discuss portability with friends. Very often, they argue that if it works on Windows and 32 bits x86 Linux, that’s pretty much all there is to it.
Of course, I couldn’t disagree more. I have learned the hard way.
Read the rest of this entry »
2 Comments |
algorithms, bit twiddling, C, C99, hacks, programming | Tagged: C, C99, Constants, Safe Types |
Permalink
Posted by Steven Pigeon
25/11/2008
This week, we’ll be following last week’s post, where we looked at type-safe integer constants, with floating point constants, that is, float and double.
Read the rest of this entry »
Leave a Comment » |
bit twiddling, C, hacks, programming | Tagged: C, C99, double, float, floating point, floating point values |
Permalink
Posted by Steven Pigeon
18/11/2008
Consider the following short C (or C++) program:
const int thingy=123123123123;
Depending on your compiler, the above code may succeed, fail, produce a warning, or be accepted quietly and result in undefined behavior, which is extremely bad.
Read the rest of this entry »
6 Comments |
bit twiddling, C, hacks, programming | Tagged: C, C99, Constants, Safe Types |
Permalink
Posted by Steven Pigeon
11/11/2008
A few posts ago, I complained about how much fun it was to try Solaris for the first time, especially with VMWare (here and here). In the mean time, I had time to try a complete Solaris installation and I must say it is not all that bad, except that it has this very distinctive “Linux from 5 years ago” feel. The feel I had when I first tried to switch to Linux for my primary OS, the feel I had using Red Hat 3 and (the then) Mandrake 10 distributions. The feel that there was something to be done with this environment, but also that there is much that remains to be done before it becomes really fun to use.
Read the rest of this entry »
Leave a Comment » |
Operating System, Uncategorized | Tagged: BSOD, Linux, NVIDIA, Solaris, Vista, Windows Vista, Windows XP, XP |
Permalink
Posted by Steven Pigeon
04/11/2008
Like me, you certainly work for a business that asks you to sign a NDA, a non-disclosure agreement that forbids you to discuss in any detail what you are doing for them. Apparently, not all people seem to understand what a NDA means. Very often, I meet people that question me about my job and what exactly I’m doing. Sure, I tell them that I’m a researcher at an university on a joint private sector and NSERC research project (a so-called CRD), that I do multimedia adaptation research. Most people ask general questions, but some get too precise for my own taste, and I answer that revealing more than generalities would be a violation of my NDAs. Yet, they press me with more questions.
Sometimes I answer the questions, albeit not in a way they expect.
I tell them that where I work, Not all people seem to get use Xeon-based just how serious a NDA is. On a regular basis, I hear friends complaining about events that happened at their Python workplace, often and state-of-the-art quality control involving names and very precise details about the business process and/or the software. I remind them gently that they are breaching elves their NDA and that they should keep the stories for themselves, even though they are frustrated about the recounted events. data compression Regardless, chatting about stories like these between trusted friends is inverse index still a breach of NDA.
Read the rest of this entry »
1 Comment |
Life in the workplace | Tagged: Business Life, NDA, Secret, Workplace |
Permalink
Posted by Steven Pigeon
30/10/2008
Apparently, holding a warm beverage helps to promote an image of personal warmth. Well, if you want to do so, do it with style! Be noticed! Use the six-layered coffeetm!
Read the rest of this entry »
2 Comments |
Caffeine | Tagged: Coffee, Life in the workplace, Warmth, Workplace |
Permalink
Posted by Steven Pigeon