January 31, 2006
Unhappy? That's rich . . .
There are psychological reasons for this. Material possessions are vulnerable to the “hedonic treadmill”, says Montier, whereas experiences are not. In other words, we quickly get used to new things and they become part of our norm. “We might get a new fast car and at first be out washing it every weekend but six months later we have become accustomed to it, the kids have scuffed up the seats in the back and the boot is full of dog hairs, ” he says. “This is hedonic adaptation at work . . . material possessions are likely to be assimilated relatively fast.”
January 25, 2006
I've been in Orlando now since Saturday, and I've had an absolutely great time. Everyone at Lotusphere treats me far better than I deserve, and I'm grateful. And so many people expressed interest in Couch I feel completely energized and focused. Things are good.
I'm hoping to write some more about LS and my impressions of IBM's efforts and future, but I'm so focused on Couch I probably won't get around to it. I will say that I think IBM has finally gotten its head on straight, and they have the right people working on this stuff, very dedicated and talented people. I'm much more bullish on the future of Notes and Domino than I was before.
January 23, 2006
Stupid C question
This question seems so easy I feel dumb for asking, but I can't find the answer after much searching. Does anyone know of a C api call on Windows to parse a text string that contains a date and/or time (ex "12/18/2004 12:00 pm") into a time_t structure, or some other structure that can be converted into a time_t?
It's not that hard to parse out a date time of a fixed format, but this is for Fabric I want this to be able to accept a variety of the most common formats. I found some stuff for MFC and some other frameworks, but they are too heavy to add to project, this must exist on Windows as a core API call, right?
If I can't find it, I'll guess I'll use the Boost C++ libraries, which have pretty comprehensive date time support. But its a huge framework and I'd rather not take a bunch of time integrating into my project.
January 16, 2006
Bit Twiddling Hacks
Premature optimization bites once again
Why do I so easily succumb to the siren song of premature optimization? I'm now ripping out of Fabric a feature I meant to be a performance boost, but a couple of design decisions later and it was clear the feature was just making things complicated.
Simplify simplify simplify. Optimize later.
I've now gotten the first iteration of the Fabric test suite done with a test runner that reads test formulas out of specially delimited files, runs them and verifies the output. Currently I've written 800 lines or so of Fabric test formulas, and that will grow quickly as new functions are added.
So with the test suite in place I'm currently going through all the code and refactoring mercilessly: cleaning up, clarifiying code and comments, and looking for problems.
Big work items left to go:
Compiler error handling - Currently the compiler gives very cryptic error messages on bad formulas.
Core Functions - I've implemented all the operators already, but only a handful of the needed built-in functions.
Date/Time datatype - Completely unimplemented so far.
Performance profiling - I'd like to do some basic profiling just to shake out any egregious performance problems.
Memory Leak testing - I need to add detection of memory leaks into the test suite.
I'm hoping to have all this done and Fabric completely incorporated into CouchDb by March 1.
January 14, 2006
I have ambition. I'm not sure why I have it, I'm not sure why it burns inside me like it does.
When I'm not challenged, when I feel like success is a given and I don't really have to struggle to accomplish my goals, I feel a pressure, a voice in the back of my head that tells me time is running out, my chance to change the world is slipping away. That is a terrible feeling, to feel like not only am I missing my chance, but the world could be little better if only I'd stand up and fight. I feel the regret of my future self looking back on a life where I took the easy path, a life squandered because I was lazy and timid.
And so I find challenges, I push myself, I fight and I struggle. And the pressure goes away. For a little while.
January 10, 2006
Live Action Punch-Out!
Oh man, back in the day my friends and I were obsessed with Mike Tyson's Punch-Out! Watching this brought it all back.
January 9, 2006
Going to Lotusphere
I'm going to Lotusphere. I've been invited to use a spare pass of a company with a booth. I wasn't going to go at first, but since I spend 23 hours a day in my house, I figure a little break and interacting with the humans might be a good thing for me.
I'm thinking of arriving late Saturday and leaving Tuesday morning. I might stay longer, but for now I think two full conference days are enough.
While bulding Couch I'm living off savings, so I've got to do this trip on the cheap and I will be leeching off as many people as possible. So... Anyone got an extra bed for me to crash on? Anyone want to buy me a meal? Anyone got some "unlucky" money their fortune teller told them to dispose of? Mail me!
I've now got a place to crash (big thanks to Mac Guidera). And thanks to everyone who offered.
January 7, 2006
Pump those crazy delicious legs!
GREAT FALLS, Mont. - A cow that escaped a slaughterhouse dodged vehicles, ran in front of a train, braved the icy Missouri River and took three tranquilizer darts before being recaptured six hours later. News of the heifer's adventures prompted a number of people to offer to buy the animal.
I loved reading about this cow's daring hijinks.
Reminds of a time when I was driving to work when I was still in college in NC. My drive took me a past a small farm and that day somehow the cows had gotten out and were causing havok. Cows were everywhere, azaleas being eaten, the cornfield getting smashed, and I think I saw some smoking and spraying graffitti on the barn. One cow near the side of the road kept turning his head up and mooing louder than I'd ever heard a cow moo. MOOOO! MOOOO! MOOOO!
I rolled down the window and yelled "Rock on cow brother! ROCK ON! MOOO!!"
I'm not sure why I did that, but it felt good. Perhaps it's the result of all that childhood exposure to The Far Side.
January 4, 2006
More abandoned writings: I suck at Counter-Strike
Here's another post from last summer that I didn't publish and forgot about. I probably didn't publish it because I was ashamed of how badly I suck at Counter-Strike. But now I have mustered the courage to tell my story.
I suck at Counter-Strike.
Ok, I bought and played Half-life 2. Lots of fun, a really cool game. Bundled with it was Counter-Strike: Source, which is a sorta-realistic first person shooter pitting terrorists against counter-terrorist. Basically it boils down to running around and shooting things. Apparently Counter-Strike is dominated by 12 year old boys who pick nicknames that look like line noise. Naturally I figured I would become quite good at it in no time, because after all I'm a grown up and it's just running around and shooting things.
And yet, after spending way too much time playing it, I suck. I suck very badly. And apparently everyone else totally rules with a high kill/death ratio, while I get 1 kill every 20 times I'm killed. And that's just because I accidently fired a shot just as a bad guy rounded a corner. I'm not sure how everyone else has a positive kill/death ratio except me, unless I'm the one guy everyone's killing. If I make it longer than 30 seconds into a round without getting killed, then I consider myself to be "on fire".
I learned rather quickly that if you see an enemy and just starting firing (the "spray and pray" tactic), that you will hit nothing. Meanwhile the other guy crouches down to aim, fires and boom, you're dead. So I learned to instead crouch, aim and fire, and then boom I'm dead anyway.
At first I thought everyone was cheating. Everyone. Had to be. No other explaination, I can't be this bad. Then I realized that maybe, just maybe, I really suck at this game. Maybe everyone is better than me, because somehow running around and shooting things is harder than it looks. Maybe I just plain suck at Counter-Strike.
This one's a little more my speed:
Fabric Test Suite
Ok, so I've been working feverishly the past month or so trying to get the core features of the Fabric Formula Language to all fit together. You might say I've been busy as a beaver, but I don't like to think of myself as a beaver, I'd rather be a cougar. A cougar that's real busy working on something.
Anyway, now that I have it working and I'm happy with the design of things, I want to refactor the hell out the code (it looks like a cougar wrote it). So I need to go through each line of code, restructing and cleaning things up, looking for bugs and unmet edge cases and what not. But before I do all that, I really should have a comprehensive test suite of Fabric formulas to verify they continue compile and compute correctly as I make changes. I figure once that's in place it should only be a few days to get the code into good shape, it's only a few thousand lines so far.
So now the problem is how do I want to write the test suite? I'm thinking what I want is a seperate .exe that reads text files and the text files contain the formula tests and expected results. The .exe runs each formula and validates it computed correctly. This is pretty much how we did it at Iris. I'm not sure how I want to structure the text file, but I think something like this:
foo - "a" "b" "c" "d"
bar - "g" "h" "i" "j"
FIELD baz := foo + bar;
baz - "ag" "bh" "ci" "dj"
foo - 1 2 3 4
%return - 10
So my question, is this a good way to go about it? The most obvious alternative is to use XML, but I don't want to have to escape the formula source for every "<" and ">" character, blech. I started to look around to see if the Python source has a core language test suite but I gave up after half an hour and I decided to "lazy web" the issue. I just now made the above format up, so I'm sure there's a better way, something more cougarish?
January 3, 2006
Bestus Christmas shirt ever
A most excellent gift from my wife. Go Bayside!
January 2, 2006
Taking the GPL plunge
One thing I'd like to have in Fabric is decimal (base 10) arithmetic. Most languages have IEEE floating point support, but it causes all sorts of problems that are often subtle and bite you at odd moments.
So instead I'd like to use a decimal arithmetic floating point library. Unlike regular floating point, decimal arithmetic always comes out the same answer you'd get working it out with pencil and paper. The only problem is I can't find a public domain one, the only I can find is from IBM available under the GPL license. That means (I think) I am compelled to provide the source for Fabric under a GPL compatible license. And also CouchDb. Right?
I was probably going to do that anyway, but once I incorporate this library, I no longer have a choice. At least that's my understanding of it.
Quick update, the Fabric formula engine is quite far along. While its still quite rough around the edges, I've now got all this working:
+ addition/string concatenation
: list concanation
~= case insensitive equality
!= not equal
< less than
> greater than
<= less than or equal
>= greater than or equal
:= variable/field assignment
 array subscript/slice
|| logical OR
&& logical AND
! logical NOT
id variable/field reference
.. field concatenation range
Numbers 1 : 1.2 : 1.2e10
Strings "foo" : 'foo'
Keywords [SomeKeyword] : [AnotherKeyword]
Date-Times [10/24/1973 5:00 pm]
user defined functions (including recursion)
My next big tasks are getting the code well organized and commented and writing a formula test suite.
Ook, the programming language for orangutans
This is an example of how to program in Ook!. This will cause the statement "Hello World!" to be displayed through standard output:Wikipedia: Ook!
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.