Yearly Archives: 2012

C code that could get you fired

Here’s another stupid C trick I’ve carried around in my brain for a while: #define sizeof(x) (rand() % 20 + 1) The mod and addition are to give a random number in the range from 1 to 21. This can … Continue reading

Leave a Comment

Filed under code

Wherein 2 is shown to be equal to 1

Here’s a little maths trick I have for some reason carried around in my brain for years: Dividing through by the common Why this is possible is left as an excercise for the reader 🙂

4 Comments

Filed under geekery

C code you should never use in production

I’ve been meaning to write this little trick down for a while, so while I remember to, here’s a stupid little C trick which amuses me. Consider a C array: char array[3] = {1,2,3}; To access element 3, you would … Continue reading

5 Comments

Filed under code

Three years down the line

Three years ago today, I made a commitment to the Lord and the world that I wanted to spend the rest of my life with an amazing woman who had become my everything. Three years down the line, I’m even … Continue reading

Leave a Comment

Filed under Uncategorized

Headphone jacks do not belong on the front of laptops

Attention laptop designers: Don’t put the damned headphone jack on the front of the laptop, for crying out loud! You’ve forced me to choose between annoying background noises or annoyingly having to rest my arms on the headphone cable and … Continue reading

Leave a Comment

Filed under computers

Sumatra PDF

I’ve been using Pandoc for generating most of my documents for some time now, even going so far as to write a small tool to add additional support specific to my needs. I mostly generate PDF documents, and I found it … Continue reading

Leave a Comment

Filed under computing

Deluge Toggle – the world’s simplest Deluge client

I’ve recently been using Deluge to download torrents, thanks to froztbyte’s recent blog post. It seems to work very well, especially when combined with FlexGet for handling RSS feeds of torrents. My torrents are downloaded by my desktop machine, which … Continue reading

Leave a Comment

Filed under computing, programming