Posts

Showing posts with the label code

Static Typing

Image
/via  +Richard Carlsson

Code Refactoring

Image
Heck, any  kind of refactoring...

The Truth about Git

Image
via XKCD

When HTML came to congress...

Image
The Obamacare hearings have begun , (cue wingnuts yelling Benghaziii!!! Obamacare !), and they are pretty much exactly as idiotic as you would expect them to be. The looniness took full hold when Joe Barton (R - Clueless) pointed at the code (pdf) below, and tried to get a contractor to admit that it violated HIPAA Rep. Joe Barton (R-Tex.) grilled CGI’s Campbell on a warning on the Web site that information visitors entered into the system would be subject to greater disclosure than the medical forms Americans typically fill out. That information is protected under the Health Insurance Portability and Accountability Act (HIPAA), a privacy law.  “Are you aware this was in the source code? Do you think that’s HIPAA compliant?” Barton asked. “Admit it! You're under oath.” In case you don't feel like zooming, the code that the Honorable Rep. is so incensed about is this <!--<p>To continue you must accept the terms and conditions...    <li> You have ...

Readability beats Performance (or, foldr is *not* evil)

Image
James Hague ( Programming in the 21st Century ) points out that we really, really shouldn't be focusing on Optimization.  To quote In any modern discussion of algorithms, there's mention of being cache-friendly, of organizing data in a way that's a good match for the memory architectures of CPUs. There's an inevitable attempt at making the concepts concrete with a benchmark manipulating huge--1000x1000--matrices. When rows are organized sequentially in memory, no worries, but switch to column-major order, and there's a very real slowdown. This is used to drive home the impressive gains to be had if you keep cache-friendliness in mind.    [...] Linked lists are a worst case, potentially jumping to a new cache line for each element. That's damning evidence against languages like Haskell, Clojure, and Erlang. Yet some naive developers insist on using Haskell, Clojure, and Erlang, and they cavalierly disregard the warnings of the hardware engineers and use ...