Exactly how long is a nanosecond?
This Lore blog is all about standing on the shoulders of giants.
Back in February 1944 IBM shipped the Harvard Mark 1 to Harvard University. It looked like this:
The Mark I was a remarkable machine at the time, it could perform addition in 1 cycle (which took roughly 0.3 seconds) and multiplication in 20 cycles or 6 seconds. Calculating sin(x) would run up to 60 seconds (1 minute).
The team that ran this Electromechanical computer had o
Embedded applications are hard for a large number of reasons, but one of the main issues is memory. Today I want to talk about how our C variables get initialized and a few assumptions we make as we use C to write embedded software.
Let us take a few simple declarations such as we might make every day.
char *string1 = "string1";
const char *string2 = "string2";
char const *string3 = "string3";
char * const string4 = "string4";
char const * const string5 = "string5";
In C99 th
This is the first of a 5 part article where I will explore some different ways to tokenize keywords. This is a simple and common task that seems to crop up when you least expect it. We have all probably done some variation of the brute force approach in this first posting, but the posts that follow should prove interesting. Here is the sequence:
Part 1 : STRCMP Brute Force and the framework
Part 2 : IF-ELSE for speed
Part 3 : Automating the IF-ELSE for maintenance
Part 4 :
If you are going to be writing any code you can probably use all the help you can get, and in that line you better be aware of the "Ballmer Peak".
Legend has it that drinking alcohol impairs your ability to write code, BUT there is a curious peak somewhere in the vicinity of a 0.14 BAC where programmers attain almost super-human programming skill. The XKCD below tries to explain the finer nuances.
But seriously many studies have shown that there is some truth to this in the sense that
Epigrams on Programming
Alan J. Perlis
This text has been published in SIGPLAN Notices Vol. 17, No. 9, September 1982, pages 7 - 13.
The phenomena surrounding computers are diverse and yield a surprisingly rich base for launching metaphors at individual and group activities. Conversely, classical human endeavors provide an inexhaustible source of metaphor for those of us who are in labor within computation. Such relationships between society and device are no