Category Archives: Uncategorized

1.61803398…

In order to declutter my website at school I decided to move all explanatory content over to this blog. I decided to start with an interesting number I have been using in some of my programming assignments. This magic number … Continue reading

Posted in Math, Programming Assignments, Uncategorized | Tagged , ,

Yet another “trick” that isn’t really a trick …

In my attempt to answer a question during my lecture this afternoon I typed in a quick-and-dirty program that was supposed to illustrate what I was saying. In the program I had to pass a variable number of struct pointers … Continue reading

Posted in Pointers, Programming Essentials, Uncategorized

Privacy on the Internet? (non-technical)

Last week I had a lengthy discussion with a friend about privacy issues pertaining to social networks on the Internet. Privacy and social networks? The longer I think about it, the more I believe that our society must be sick … Continue reading

Posted in Non-technical, Uncategorized | Tagged , ,

The X-Factor (OR The Power of XOR)

Once upon a time, a girl (non-computer scientist) had bought two pieces of cake for coffee. She asked her nerdy boy-friend: ‘Do you want this one or that one?’ He said ‘Thanks!’ and he quickly moved both pieces onto his … Continue reading

Posted in Bit-Twiddling, Uncategorized | Tagged , , ,

Lost in translation (C vs. Assembly Language)

In my classes on microcontroller programming I often draw comparisons between C and assembly language. This is to show my students that either programming language has both advantages and disadvantages. While the efficiency of C code predominantly depends on how … Continue reading

Posted in Programming Essentials, Uncategorized | Tagged , , ,

Source Code Readability

Summer holidays ahead, yay! This will be the time when my job is an enviable one. Having spent the last couple of weeks grading never ending piles of final exams and thesis projects I feel like I deserve it. Most … Continue reading

Posted in Programming Essentials, Uncategorized | Tagged , , , , ,

Never waste your memory! (Huffman Encoding)

In Morse code, a simple “dit” (.) represents the letter e, while a more complex sequence “dah-dit-dah-dah” (-.–) represents the letter y. As you probably know, the occurrence of e is significantly higher than the occurrence of y in most … Continue reading

Posted in Bit-Twiddling, Information Theory, Uncategorized | Tagged , , , , ,

Pointers and References – Part 3 (Kinky Stuff)

Once in a while, I show my students some fancy examples of what you can (but shouldn’t) do with pointers. Most students would be watching the screen with baffled looks on their faces. Those who cannot find any interest in … Continue reading

Posted in Pointers, Uncategorized | Tagged , , ,

Pointers and References – Part 2 (Intermediate Stuff)

This is my second posting on pointers and references. In part 1 you could read about the basic nature of pointers. Now we will have a look on two very common examples of how pointers are being used. 1. Passing … Continue reading

Posted in Pointers, Programming Essentials, Uncategorized | Tagged , , , | Leave a comment

Pointers and References – Part 1 (Rookie Stuff ;)

Pointers are subject of fear for a large number of people. Some of them hate pointers because they can cause nasty problems that are difficult to debug, others hate them because they never really understood what pointers actually are. Indeed, … Continue reading

Posted in Pointers, Programming Essentials, Uncategorized | Tagged , , ,