The Absolutely True Story of a Real Programmer Who Never Learned C

Says Wil Shipley

I have a young friend named Sam who is quite a programming prodigy. Sam does know C! I need to make this clear: he’s not the titular programmer.

C-Language-Name

But a couple years ago Sam told me a story about a different programmer who never learned C, and I liked it so much that right on the spot I asked his permission to repeat it. (I could never just steal such a tale.)

Continue reading

Float or double?

computer man

Introduction

In scientific computation we use floating point numbers a lot. This article is a guide to picking the right floating point representation for you. In most programming languages there are two built-in precisions to pick from: 32-bit (single-precision) and 64-bit (double-precision). In the C family of languages these are known as float and double, and those are the names I will use in this article. There are other precisions: half, quad etc. I won’t cover these here, but a lot of the discussion makes sense for half vs float or double vs quad too. So to be clear: I will only talk about 32-bit and 64-bit IEEE 754 here. Continue reading

do {…} while (0) in macros

learn-to-code-what-is-programming

If you are a C programmer, you must be familiar with macros. They are powerful and can help you ease your work if used correctly. However, if you don’t define macros carefully, they may bite you and drive you crazy. In many C programs, you may see a special macro definition which may seem not so straightforward. Here is one example:

Continue reading

5 inspiring examples – programming languages that popular computer games are written on

Video games are a big business. Total revenue for the U.S. video game industry reached $23.5 billion last year, a 5 percent increase from 2014. Behind every video game are programmers who help develop the product. Although programming languages vary by game, a few are the most popular. Here’s a look at the languages powering video game development.

Continue reading