David's Mumblings

Odd APIs

category: Programming
I'm using an API that exposes two functions: (paraphrasing) "get_data" and "get_latest_data". The documentation for "get_data" says that it gets you the data -- ok, fine. But then the documentation for "get_latest_data" says that it gets you the latest data in the system. So why would anybody ever want to use the first function? Both are parametrized by date, so both allow reading historical data. It seems that you might as well call the functions "give_me_old_crappy_data" and "give_me_awesome_data"!

Oh well, hopefully an email to the authors will clear things up. ^ TOP

Posted on 03/08/10 at 13:31:53 by dchaley (David Haley)
No comments


Importance of database indexing

category: Computers and Tech
I'm working on transitioning a school's attendance records from one system to another. To do so, I created a MySQL database to track the various data sets from the old system, in addition to mapping tables to go from the old system's identifiers to the new system's. After some time I eventually needed to write a query that outputs class attendance history for import into the new system. I already knew that database table indexing was very important (at work we use far larger data sets) but I guess I didn't realize that even for relatively small data sets it still mattered so much. Read More → ^ TOP

Posted on 02/13/10 at 22:48:03 by dchaley (David Haley)
1 comment


Nice seatbelt ad

category: General
I thought that this seatbelt ad from Sussex County, UK, was remarkably well-done, and a refreshing change from the ones with splattering blood. ^ TOP

Posted on 02/10/10 at 13:11:56 by dchaley (David Haley)
No comments


Bad Tech Day

category: Computers and Tech
Saturday was one of the worst tech days I've had in a long time. Several things that could have gone wrong went wrong, all at the same time. To start, my laptop died a spectacular and miserable death, overheating up to wazoo and refusing to start. Even when it did start (I propped it up next to an open window giving a roughly freezing temperature breeze onto it) it was running incredibly slowly; apparently something was wrong with the GPU driver. (And then I was getting BSODs.) I took it in on Monday and Systems tells me that indeed something is busted with the GPU and they'll have to replace it (and hence the motherboard).

And if that wasn't enough to ruin my day -- it took me roughly 6 hours to figure out what was happening and try to get files off: I needed those files to get my work done -- I needed to upgrade my file server, and of course that went wrong too. My file server uses two two-disk RAID arrays. One of them decided to drop a disk, for reasons unknown to me. So that took me another hour or two to fix. On the bright side at least I learned more about how the Linux RAID tools work.

Harrumph! In all, I wasted about 8 hours on stupid issues that were completely unrelated to what I actually had to do. Sigh. ^ TOP

Posted on 02/09/10 at 21:19:49 by dchaley (David Haley)
No comments


The Pachelbel Rant

category: Humor
This rant about Pachelbel's Canon in D made me smile. :-) Sort of reminded me of Victor Borge's work. ^ TOP

Posted on 01/20/10 at 11:30:23 by dchaley (David Haley)
No comments


First Person Tetris

category: General
This first-person version of Tetris messes with my head! I love the retro 8-bit music though. ^ TOP

Posted on 01/14/10 at 10:10:31 by dchaley (David Haley)
No comments


Rent Happiness

category: General
You might have heard about the court case involving Tishman Speyer and Stuyvesant Town, whereby they were found guilty of illegally deregulating apartments (because they were taking J-51 tax breaks for capital improvements). There has long been a question of what this would mean in practice, and it's finally coming to a resolution: rents have gone down; in my case, rent went down by just over $800. Yay! :-) (Funnily enough, because we started renting at the height of the bubble, the rent stabilized rate is not that different from what we would have been paying had we signed about a year later.) Also, our apartment will be re-stabilized, meaning that there are caps on how much rent can change every year, and under what circumstances they can force us out, etc. ^ TOP

Posted on 12/22/09 at 10:05:23 by dchaley (David Haley)
No comments


NYC Signs

category: Humor
On 5th avenue somewhere around 50th St., there's a no-parking zone. There are three signs, from top to bottom: "Red Zone", "No Parking", "Don't even think about parking here". They all seemed to be permanent, city signs, so I suppose that somebody has a sense of humor. :-) ^ TOP

Posted on 11/17/09 at 10:41:15 by dchaley (David Haley)
1 comment


401(more)ok

category: General
For the first time since I got my work 401k, the value of my account is greater than the amount of money I put in. Harrumph!

Vanguard says some pretty weird (/dumb?) stuff, though. In a newsletter they sent out:

While the U.S. stock market fell 37% last year, diversification helped many 401(k) investors cope. A balanced mix of 60% stocks and 40% bonds held up better, falling 22%.1 Diversification isn't exclusive to 401(k) investing, of course. But your plan makes it easy to hold a mix of stocks and bonds.
(The effect of ongoing contributions further softened the markets' blow. Among Vanguard plan participants who had account balances at the beginning and end of 2008, the median change in balances was –14%)


The parenthetical remark is rather odd when you get past the marketese; it's basically saying:
"You lost a lot of money, but if you kept putting money in while losing money, your balance didn’t decrease as much as if you hadn’t put in any money"
So if you put even more money into your 401k just to see even more go away, you should still be happy because you prevented your 401k balance from decreasing as rapidly, and instead made your normal bank account not increase as rapidly. :-) ^ TOP

Posted on 10/30/09 at 08:10:33 by dchaley (David Haley)
No comments


The Perils of Cheap Wine

category: General
At the grocery store last night I wanted to pick up some cheap wine. I found a $7 bottle of "Merlot" (yeah... "cheap" in NYC is a relative term, I suppose), but when I opened later that night it I noticed its color was slightly weaker than usual. That's when I saw, in small font on the bottom of the label, the note "Wine Product - 6% alcohol". Sigh!! The ingredients were listed as red wine, water, sugar, and some other stuff. It doesn't taste terrible, but it certainly doesn't taste like red wine. Oh well. Next time I will pay more attention. :-) ^ TOP

Posted on 10/15/09 at 08:02:37 by dchaley (David Haley)
No comments