Entries from June 2008
I’ve run into this problem a few times, but I’m putting out a call to see if anybody has some great insight into a good solution. To date, I’ve come up with three different approaches to handling user settings, but none of which I’m in love with. Other ideas, other comments, other ways?
Working assumptions
It’s handy [...]
Tags:
I bike… I bike more than average… While a Poseur Jersey would be fun, I was thinking on my ride to work today that a shirt/jersey that said (primarily on my ride to work):
The more I bike The less gas I use The more there is The cheaper it is The happier you are
Maybe [...]
Tags: bicycle poetry
Way to carried away with this… here’s the SpiderMonkey version (as opposed to the rhino) one. Biggest complaint is the File object is a bit of a pain to use…
fd = File(’p.test’);
fd.open(”read”,’text’);
mre = /^__MULTI_TOKEN__\s+(\S+)\s+(.*)\t?\s*(\d+)\s*$/;
sre = /^__SINGLE_TOKEN__\s+(\S+)\s*\t?\s*(\d+)\s*$/;
var ofd = File(’full.txt’);
ofd.open(’write,create,replace’,'text’);
first = {}
while (line = fd.readln()) {
if (m = line.match(mre)) {
[...]
Tags:
Using the Rhino compiler… sorry no benchmark numbers, but just as a placeholder. To pick a nit, wanted to do first[m[1]] += parseInt(m[3]) but that yeilded a NaN since first[m[1]] was undefined… You would think that JavaScript would make undefined == 0.
fd = java.io.BufferedReader(java.io.FileReader(’p.test’))
mre = /^__MULTI_TOKEN__\s+(\S+)\s+(.*)\t?\s*(\d+)\s*$/;
sre = /^__SINGLE_TOKEN__\s+(\S+)\s*\t?\s*(\d+)\s*$/;
ofd = java.io.PrintWriter(java.io.FileWriter(’full.txt’));
first = {}
while (line = fd.readLine()) [...]
Tags:
When it’s intertwined — ok, bad joke.
I’m currently “fighting” (playing) around with the python storm ORM system and had the following problem (not the real code, but demonstration).
What I wanted to say is:
find(…, employee_title == ‘CEO’)
However this didn’t work, I had to say:
find(…, employee_title == u’CEO’)
After a bit of discussion down a mailing list, I [...]
Tags:
The IEEE summary of this error is worth a read, both from the cause and the outcome of the UI testing.
Since I’m frequently dealing with interfaces that require typing of sets of digits or numbers. I’ve been thinking about this for the last few days and have two thoughts on how to reduce errors like [...]
Tags: