Author Archives: bitjunkie

About bitjunkie

Teacher, Lecturer, and BITJUNKIE ...

A Beginner’s Guide to Object Oriented Programming (2)

Long time no see. I hope you still remember my recent posting on object-oriented programming. Here is part two, which I hope you are interested in. Today, we are going to have a look at inheritance. If you do not … Continue reading

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

Subroutines, Functions, Methods

Most, if not all, programming languages allow you to create subroutines, functions, or methods, all of which follow the same principle. You can think of them as black-boxes that contain source code to perform a specific task. For example, you … Continue reading

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

Swapping Variables

Many algorithms, including the world-famous Euclidean, require to swap the values of two variables. So you probably know the following principle. int x = 8; int y = 123; int tmp = x; x = y; y = tmp; However, … Continue reading

Posted in Bit-Twiddling, Information Theory, Uncategorized | Tagged , , , , | Comments Off on Swapping Variables

A Beginner’s Guide to Object Oriented Programming (1)

What’s so fancy about Object Oriented Programming? Computers have been invented to help real-world people solving real-world problems, even though it seems today that computers actually contribute problems to the real world. Since a plain computer doesn’t know anything about … Continue reading

Posted in Programming Essentials, Uncategorized | Tagged , , | Comments Off on A Beginner’s Guide to Object Oriented Programming (1)

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 , , | Comments Off on 1.61803398…

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 | Comments Off on Yet another “trick” that isn’t really a trick …

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 , , | Comments Off on Privacy on the Internet? (non-technical)

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 , , , | Leave a comment

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 , , , | Comments Off on Lost in translation (C vs. Assembly Language)

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 , , , , , | Comments Off on Source Code Readability