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
Structures in the C Programming Language
Structures in C is one of the most misunderstood concepts. We see a lot of questions about the use of structs, often simply about the syntax and portability. I want to explore both of these and look at some best practice use of structures in this post as well as some lesser known facts. Covering it all will be pretty long so I will start off with the basics, the syntax and some examples, then I will move on to some more advanced stuff. If you are an
The basic idea behind this principle is that taking measurements influence the thing you are measuring.
In microcontrollers we all get intruduced to this idea at some point when you are trying to figure out if the oscillator is running, and measuring it with a scope probe you realize - of course only after a couple of hours of struggling - that the 10pF impedence load the scope probe is adding to the pin is actually causing the oscillator, which was working just fine, to stop dead.