Revisiting why incompetents think they’re awesome

“In 1999 a pair of researchers published a paper called “Unskilled and Unaware of It: How Difficulties in Recognizing One’s Own Incompetence Lead to Inflated Self-Assessments (PDF).” David Dunning and Justin Kruger (both at Cornell University’s Department of Psychology at the time) conducted a series of four studies showing that, in certain cases, people who are very bad at something think they are actually pretty good. They showed that to assess your own expertise at something, you need to have a certain amount of expertise already…”

Bytes and bitwise operators in C

“Bitwise operations have many uses. I asked a question a few months ago at, where I was taught that. The answer which I accepted contained the following list of uses (credit goes to user whatsisname):
* Juggling blocks of bytes around that don’t fit in the programming languages data types
* Switching encoding back and forth from big to little endian.
* Packing 4 6bit pieces of data into 3 bytes for some serial or usb connection
* Many image formats have differing amounts of bits assigned to each color channel.
* Anything involving IO pins in embedded applications
* Data compression, which often does not have data fit nice 8-bit boundaries.\
* Hashing algorithms, CRC or other data integrity checks.
* Encryption
* Psuedorandom number generation
* Raid 5 uses bitwise XOR between volumes to compute parity.
* Tons more…”


The most useful GCC options and extensions

“This post contains information about some of the most useful GCC options. It is meant for people new to GCC, but you should already know how to compile, link and the other basic things using GCC; this is no introduction. If you want an introductory tutorial to GCC, just google for that.

The things this article attempts to cover include (as well as a few other things):

  • Optimization
  • Compiler warning options
  • GCC-specific extensions to C
  • Standards compliance
  • Options for debugging
  • Runtime checks (e.g. stack overflow protection)…”


Functional programming in sh

“I find myself trying to do things I can do in GHCi more each passing day in my innocent /bin/sh. I find myself seeking a good balance between the numerous layers of hacks that compose shell script and the purely functional wonder of a Haskell program. Such efforts already exist, most recently in Shelly.hs, but I believe this to be tackling the problem from the wrong end. Instead of hacking together a library to make Haskell code reminiscent of the beloved /bin/sh, the problem should be tackled with extreme prejudice by hacking together a sh script to mimic the best of Haskell, and retain the beauty of shell scripts…”

High Frequency Trading – What’s broken and how to fix it

“In previous posts, I discussed the basic mechanics and social utility of high frequency trading. Of particular import is that I characterized the latency arms race as socially wasteful. Now I’ll discuss a policy proposal which might mitigate the harmful effects of the race for latency, while giving better prices to speculators…”

Self-updating scripts

“Analyzing your site using Page Speed or YSlow often produces lower scores than you might expect due to 3rd party resources with short cache times. 3rd party snippet owners use short cache times so that users receive updates in a timely fashion, even if this means slowing down the site owner’s page.

Stoyan and I were discussing this and wondered if there was a way to have longer cache times and update resources when necessary. We came up with a solution. It’s simple and reliable. Adopting this pattern will reduce unnecessary HTTP requests resulting in faster pages and happier users, as well as better Page Speed and YSlow scores…”