Sunday, June 29, 2003

A New Low

i just ripped mp3s of a series of physics lectures. i am such a dork.

Wednesday, June 25, 2003

More People Should Read This

so i just got my copy of code reading - the open source perspective in the mail today (i love amazon). it's fantastic. this kind of thing should be taught in computer science programs. maybe with books like this appearing, it will be.


looks like the oscon wiki has started up...

Tuesday, June 24, 2003

Much Cooler Than My Attempts

so this, is a damn nice java implementation of zeroconf, in java. it's far far cooler than my attempts to implement some of the same stuff in c, so if you're looking for a starting point for some rendezvous support in an application, and java plus lgpl is acceptable, check it out. if nothing else, it's a good place to get some ideas on how to implement your own, so check it out anyway, even if you don't plan on writing a java app.

oh, and just a note on the code itself:

maybe i'm spoiled by coding in languages where you can actually define things outside of a class, but faking it by making a bunch of classes that aren't really related in an isa type relationship all extend from a base class who's only purpose is to hold constants seems like a neat trick, but when it comes right down to it, it seems like the language shouldn't be forcing these kind of contortions on it's developers.

wow, that was a long sentence.

Monday, June 23, 2003

Wow, They Did It Again

so i just tried out the audio conferencing capabilities of the new ichat beta, and damn, they rock. the audio quality is fantastic, and while i hadn't been too excited about it, i'll have to seriously consider picking up the iSight so i can play with the video conferencing. if they hit the mark this closely with the audio, i imagine the video must be pretty cool.

Keeps Getting Better

just downloaded safari 1.0, and it's continuing to get better and better. fonts seem to look quite a bit nicer in this version, and overall, i'm quite impressed with the browser's progress. it's damn fast, works damn well, and integrates seamlessly with the rest of the os.

oh, and there were one or two other announcements today that are worth mentioning, but other people have already done that, so i don't see the point ;-)

Sunday, June 22, 2003

Curses, Foiled Again

so i'd just like to point out, for future reference, that if someone is looking for a great way to keep me from making any real progress on anything at all over a weekend, scheduling the release of a new harry potter book on friday night is a damn good way to start.

oh, and for the record, i love it. best one yet.

Friday, June 20, 2003

Fun With PuTTY

so i just figured out how to do two of the things i wanted to do with subversion's ssh tunneling, and i figured i'd write it down here, so others can benefit from my playing around, and more importantly so i don't forget how i did it.

first, i wanted to be able to set up an ssh tunnel through the exposed machine on my home network, so i can hit the machine which has my personal subversion repository on it. this isn't especially difficult to do, but i'd never really played with it before. second, i wanted to get subversion on a windows box to tunnel it's repository access over ssh. several people mentioned they'd gotten this working on the dev list, but i'd never actually tried it myself, and it took a little fiddling around before i could get it to work.

ssh tunneling is pretty simple. the command looks something like this:

C:\> plink -L 4747:quicksilver:22
plink is the command line interface to putty, everyone's favorite win32 ssh client. i believe you can just replace that with 'ssh' if you're on a unix machine. 4747 is the port on my local machine that i'll be hitting, quicksilver is the name of the machine the tunnel is pointing to on my home network, 22 is the port ssh is running on on quicksilver, and is my username @ the machine i'm tunneling through.

once you enter your password, you'll be presented with a shell interface to the machine you're tunneling through, which you can safely ignore, since the whole point of this was to set up the tunnel, not to get a login shell. to confirm that the tunnel is working, just try to connect to port 4747 on your local machine, and you should see the beginnings of the ssh connection to
the box you're tunneling to.

now that the tunnel is up, let's see what we need to do to get subversion on windows to speak to it. first, you'll have to set up the SVN_SSH environment variable, since you'll be using plink, not ssh, as your tunnel agent. this should look something like this:

C:\> set SVN_SSH=plink -P 4747 -l yourusername -pw yourpasswordhere
now, you can just use subversion as usual, like this:
C:\> svn list svn+ssh://localhost/home/repos/writing
since you've told subversion to hit port 4747 on localhost (4747 from the -P argument to plink, and localhost in the url), it'll hit your ssh tunnel, and everything will be forwarded on to the machine on the home network. note that you apparently need to set the password in the SVN_SSH variable, because if you don't, subversion hangs waiting for you to enter it. i'm not entirely sure why this happens, but this seems like a reasonable work around for now.

Tuesday, June 17, 2003

so i've been playing around with ruby recently, since i want to try using a higher level language than C or C++ for some stuff at work (ok, i admit it, i'm tired of debugging memory corruption problems, and i'd LOVE the chance to isolate low level memory management to a small portion of the code i have to deal with). i already know that ruby was damn cool, but wow, it is just entirely too easy to put together a ruby wrapper around an existing C API, throw a script around it, and get a useful application. it's a good thing everyone gets scared off by the fact that a disturbing amount of ruby's documentation is in broken english (if it's in english at all) due to the fact that it's development community is largely japanese, otherwise they'd all be over it, and i wouldn't be able to look like a miracle worker by using it to make my projects easier than they have any right being ;-)

now i just need matz to finish up version 1.8, or at least release a new snapshot, since between the last prerelase and now, they've added YAML support, and some of my fiendish plans involve use of YAML...

Monday, June 16, 2003

Why I Shouldn't Touch Hardware

so if you're ever looking for a good way to make your computer start locking up randomly, installing two case fans backwards, so that hot air is actually being blown in to the case, is a good way to do it.

just for future reference...

Sunday, June 15, 2003

Poor Impulse Control

it's a damn good thing there isn't a best buy closer to my apartment...

i stopped on the way back from MA to pick up season 4 of buffy on dvd, since it came out this week and was on sale, and walked out with two other dvds and a game boy game, in addition to what i had been looking for. if there was a best buy in stamford, i would have absolutely no money, and entirely too much stuff i really don't need.

(for the record, the two dvds were go and gross anatomy, both of which rule and were on sale for 8 bucks, and the game boy game was 'namco museum', which is also both cool and cheap.)

Saturday, June 14, 2003

Wow, Lots of Options

so has a list of rss aggregators (although they're calling them 'blog newsreaders'). it's really quite remarkable how many options there are in this particular area, i mean they've listed 12 separate apps for windows alone, and i know there are more out there that they don't mention. personally, i can't think of a feature i'd really want that net news wire doesn't already have, but hey, with this many choices out there, i'd be willing to bet there's something cool...

Wednesday, June 11, 2003


so i went out flying with my boss's boss yesterday, and managed to survive the experience. it was my first time up in a small plane like that, and well it was a little weird, i have to say i enjoyed it. we went up to providence, had dinner, and came back. it's definitely pretty cool that you can take a trip that normally would take several hours and lots of traffic, and reduce it to a little over an hour, depending on wind.

also, i must admit, they just have the coolest toys in airplanes. mark's gps is just so neat ;-)

Monday, June 9, 2003

This Weekend...

so this weekend my sister was up from DC, to hang out in NYC with some of her friends from back home. she crashed here friday night, went into the city the next day, and stopped here sunday before heading home.

i'm searching for something more interesting to say about this, but in reality i'm just writing this entry because i promised her i'd mention it here ;-)

Sunday, June 8, 2003

Fully Buzzword Compilant

so i've been planning to do it for a while, but this morning i finally broke down and picked up a copy of creating applications with mozilla.

i've been playing around with it a bit, and so far i'm quite impressed. xul is quite cool, and you really can throw together a nice little gui in little to no time at all. i'm still slogging through some of the available docs on how to create xpcom components that would let me use arbitrary c/c++ code from within xul applications, but so far, it doesn't look that bad.

there are a dizzying number of buzzwords involved with mozilla (XML, XUL, CSS, RDF, XPCOM, the list goes on and on), but despite that, they seem to have really come up with some neat things. if i was sitting down and creating a new application today, i'd have to say it would be quite tempting to base it on mozilla. it seems reasonably easy to work with, and you get all sorts of cross platform goodness (at least for the gui portions of your code) practically free.

Wednesday, June 4, 2003

It's A Bug Hunt

so i tracked down a fun bug today, and i thought i'd share it, since the error is fairly generic and anyone coding in c++ could run into it.

so i'm working on a unit test framework (porting it actually), and like several other c++ unit test frameworks, there is a 'test registry' that's really a global object, and when you create a test you use a macro to add it to the global registry. the macro, under the hood, creates another global object, which in it's constructor calls a method of the registry to add your test to it.

a week ago, the test suite was working fine, i had ported it over and all was going according to plan. then i got distracted and worked on something else for a while (until yesterday actually). yesterday, i had a free second (i was frustrated with something else i was debugging actually), so i picked up the unit test framework and started porting some existing tests to it. oddly, when i got things compiling and linking, it seemed that the tests would not actually get run.

after some debugging, it turned out that the test was getting added to the registry just fine, but by the time we called the function that ran the tests, the registry was empty. at this point i was confused, so i started playing with the debugger, setting watchpoints on the internals of the registry (the front and back pointers of the underlying vector actually), and it turned out that what was happening was this: the test was being added to the vector before the vector's constructor was called. it turns out that on this platform a vector (after it's constructor is called) has member variables that are all zeroed out, and in this particular case the vector happened to be in the same state before the vector was called. this means that the push_back function that was called to add the test to the registry worked, even though the vector had not been initialized. then, the vector's constructor was called, and the vector's member variables were zeroed out, so it seemed as if nothing was ever added to it.

c++ does not require any specific ordering of global objects within the same library (or executable, they have a fancier word for it). so it's perfectly valid for the two constructors to be called in this 'inconvenient' order. to avoid the problem, you can move one of the objects to a dynamicly linked library. this will allow the system's runtime linker to resolve the problem for you. the first time the macro instantiates it's object, it will try to reference a symbol in the libarary, so they dynamic linker will automatically run the constructor of the registry object as part of the process of linking it in to the running executable.

and no, before you ask (since at least two of you are still reading at this point), i did not figure this out all on my own. i got up to the 'damn, the constructor is happening after the add' point, noticed the constructors were happening in the wrong order, and went to ask for help from one of our resident c++ gurus, who explained how the problem was solved when the unit testing library was first written.

Tuesday, June 3, 2003

Curse You Nintendo!

metroid fusion is sitting on the table, taunting me, because for the past few days i've been stuck, right at the end, unable to proceed. i've got this suspicion that i've missed too many power ups, and i'm never going to be able to beat the final enemies...

that said, i do seem to be lasting longer against them, but still, it's getting frustrating...

Sunday, June 1, 2003

Come On People!

it continues to amaze me that there are still people out there who are smart enough to write some pretty cool code, but dumb enough to mix tabs and spaces in their source files. i mean this isn't rocket science people, if you want someone else to be able to read the code (especially if you're using something other than the vaguely standard 1 tab == 8 spaces setting), JUST PICK ONE OR THE OTHER! if you don't, as soon as someone who doesn't have their editor configured EXACTLY the same as yours opens it up, the first thing they'll say is "damn, this looks like crap, didn't anyone teach this guy how to indent?"

that is all.