Archive for May, 2006
Wednesday, May 31st, 2006
Optimizing OO With Type Feedback
Lambda the Ultimate “Type inference in Python” discussion links to a very interesting paper on Type Feedback, an optimization technique for OO programs that was unfamiliar to me before today.
An excerpt from the paper explains the idea of Type Feedback at a high-level:
The key idea of type feedback is to extract type information from previous […]
No Comments » - Posted in Python, Programming by dkaz
Wednesday, May 31st, 2006
Pairwise Testing
Extreme configurability of the platform I’m working on for my dayjob has sparked my interest in Pairwise Testing.
Pairwise.org defines this testing method in a short, concise way:
Pairwise (a.k.a. all-pairs) testing is an effective test case generation technique that is based on the observation that most faults are caused by interactions of at most two factors. […]
No Comments » - Posted in Testing by dkaz
Tuesday, May 30th, 2006
Left-to-Right Reader vs. Functional Programming
Following Lisp/Scheme code has always felt a bit akward and unnatural to me.
I’ve thought long and hard about why that is and I might have the culprit (hint: it’s not the parentheses) - it’s the right-to-left/bottom-to-top reading style needed to follow the code.
4 Comments » - Posted in Programming, Lisp/Scheme by dkaz
Saturday, May 27th, 2006
Constraint Based Development
My current work assignment feels a bit like a Sudoku puzzle - as additional functional and technical requirements trickle in, I’m forced to go back to the drawing board on parts of my solution. Check out Wikipedia’s definition of Constraint Satisfaction Problems to see where I’m coming from:
Constraint satisfaction problems or CSPs are mathematical problems […]
1 Comment » - Posted in Math, Programming, Process by dkaz
Monday, May 22nd, 2006
Linux Tip #1: Testing cron scripts
Useful tip by Todd Huss - test your cron scripts using the env -i somescript.sh command
No Comments » - Posted in Linux, Testing by dkaz
Monday, May 22nd, 2006
Higher Order Functions
My two primary languages, Java and Ruby, don’t have explicit support for HOFs, but they both have some related functionality.
Let’s first look at Wikipedia’s definition of Higher Order Functions:
In mathematics and computer science, higher-order functions are functions which do at least one of the following:
take one or more functions as an input
output a function
The […]
No Comments » - Posted in Java, Ruby, Python, Programming, Lisp/Scheme by dkaz
Sunday, May 21st, 2006
Continuations Debate
Keeping tabs on the latest continuations debate:
Gilad Bracha’s post on why Continuations won’t be support in Java
Tim Bray’s post on why Continuations will not be needed in the near future
David Meggison’s post on why client-side state should be used to fix the Continuation problem
Seaside Avi Bryant’s post on why Continuations are, in fact, a good […]
No Comments » - Posted in Java, Smalltalk, Programming by dkaz
Thursday, May 18th, 2006
Nagle’s Algorithm
I was curious why “disabling nagle’s” to improve performance is such a popular fix these days…
Nagle’s algorithm is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network. It is named after John Nagle, then at Ford Aerospace and lately at Animats.
Nagle’s […]
No Comments » - Posted in Java, Networking by dkaz
Thursday, May 18th, 2006
Python triple-quoted strings
As a Python newbie, I was a bit perplexed by the “””-delimited strings…
From python.org:
In triple-quoted strings, unescaped newlines and quotes are allowed (and are retained), except that three unescaped quotes in a row terminate the string. (A “quote’’ is the character used to open the string, i.e. either ‘ or “.)
1 Comment » - Posted in Python by dkaz
Wednesday, May 17th, 2006
Method Finder in Ruby
Here’s a tool that I didn’t know I couldn’t do without - Andrew Birkett version of Smalltalk’s MethodFinder. Fabulous stuff.
I needed to record the source code for later…
class Object
# Clone fails on numbers, but they’re immutable anyway
def megaClone
begin self.clone; rescue; self; end
end
end
class MethodFinder
# […]
No Comments » - Posted in Ruby, Smalltalk, Programming by dkaz
Wednesday, May 17th, 2006
Light Reading on Type Inference
I spent some time tonight reading up on Type Inference - topic especially appealing on days spent staring at JDK 1.5 code along these lines
Map<String,List<Integer>> numbersByKey =
new HashMap<String,List<Integer>>();
Some interesting snippets I found on Type Inference:
A lively conversation blog post/conversation on The Fishbowl
Michal Moskal’s writeup on Nemerle.org
Overview of local type inference in Scala
strangelights.com on C# var […]
No Comments » - Posted in Java, C#, Programming by dkaz
Monday, May 15th, 2006
Learn to Read Website
One of the (many fruitless) ideas I kicked around in the past has been a website for helping kids with learning to read.
It seemed to me that no one had solved this problem very well in the cyberspace, and as a parent of a 5-year old I was pretty frustrated with that.
Couple of days ago, […]
