Geekostat

Disclaimer: I can tell right now that this is one of those late-night posts where I should be sleeping, not posting about a technical topic. But these not-entirely-lucid ones are sometimes the most fun to read.

I consider myself extremely tech-savvy. I can build a computer from parts, make my own Ethernet cables, run some performance tuning on interactive websites, write applications in numerous programming languages (as well as SQL and HTML), and much more.

But I still don’t get our digital thermostat. They’re programmed to go down to 58 at night, come up to 67 on weekends and from something like 6 to 9 a.m., and 3 to 9 p.m. on weekdays. In other words, when people are home.

Of course, me being home on vacation isn’t quite compatible with this. There’s a simple override, where you can hit the up or down arrows to set it to a temperature. While I use (and appreciate!) this, it’s also a pain. It’s really no fun waking up and having it be 58. I’d really like to reprogram it to automatically come up to 63 or so around 10:30.

I still don’t get why the whole thing isn’t on the LAN. This would have two obvious benefits right out of the gate–it’d be much easier to configure (even if you let someone with no clue about usability design the GUI, it’ll be better than the myriad knobs, switches, and buttons on our thermostat!), and it’d be more convenient in many cases to pull up a new tab in your web browser than to walk down the hall to the thermostat. (Plus, the thermostat is in my parents’ bedroom. I’d have loved to have turned the heat up a few degrees around 11 tonight, since it’s 9 outside and almost as cold inside. But something tells me they really wouldn’t have appreciated it.)

I’m also not sure that the ‘simple’ thermostat algorithm is that efficient. You figure it works something like:

while(1) { $temp = getTemperature(); $desired = readDial(); if($temp<$desired) furnace.enable; if($temp>$desired) furnace.disable; }

When we view it at ‘computer speed,’ I think we can see one of the basic problems: in theory, the furnace could start flapping, where on one loop iteration it turns the furnace on, and just a fraction of a second later, it turns it off. I don’t profess to know a lot about the overhead in starting a furnace, but I’d imagine that it’s most efficient to let it run for a few minutes.

I think a much better system would be to have a programmed minimum run time: if the furnace is turned on, we should run it for at least 5 minutes. After 5 minutes, we again evaluate the temperature: if it’s at the target, we turn it off. If not, we drop into a quicker polling, maybe once every minute. Incidentally, this is much better for the thermostat’s processor, but if its sole purpose is determining whether to turn something on or off, no one really cares about minimizing overhead.

So you give it a secondary purpose: handling a TCP/IP stack and a basic webserver! All of a sudden, instead of an infinite loop, you run a tiny bit of code every 30 seconds.

You can also generate some interesting statistics. For example, how long does the furnace need to run to raise the temperature one degree? How does this scale–if you want to raise it three degrees, does it take three times as long? How does the temperature of my house look when graphed across a day? How about telling me how long the furnace ran yesterday? And, given information about my furnace’s oil consumption and our fuel costs, it’d be cool to see how much it’s costing. And it could give us suggestions: “If you drop the temperature from 68 to 67, you’ll save $13.50 a month,” or such. This would require some storage, but a gig of solid-state media (e.g., a camera’s SD or CF card) is around $10-20 now. Plus, with the advent of AJAX, you can push some of the processing off to the client–let the client use a Flash applet or some good Javascript to draw the graphs if the thermostat is underpowered!

In conclusion, I’m freezing.

Idea

Why isn’t there a really good “network appliance” as a network gateway? You can get a low-end firewall/router, or you can build your own machine.

Setting up OpenBSD is no walk in the park, though. I want to build an “appliance” based on OpenBSD, and give it a nice spiffy web GUI. You buy the box, plug one side into your switch and one side into your cable modem or whatnot, and spend ten minutes in a web browser fine-tuning it. I was really fond of the appearance of the Cobalt Qube, although it could be made much smaller. And throw a nice LCD on the front with status. You can run a very low-power CPU, something like the one powering these. It really doesn’t need more than 512MB RAM, but give it a small solid-state drive. And a pair of Gigabit cards, not just for the speed, but because GigE cards usually are much higher-quality. In building routers, the quality of your card determines how hard the CPU has to work.

There’s so much that a router can do. You can run a transparent caching proxy, a caching DNS server, priority-based queuing of outgoing traffic (such as prioritizing ACKs so downloads don’t suffer because of uploads, or giving priority to time-sensitive materials such as games), NAT, an internal DHCP server, and, of course, a killer firewall. You can also generate great graphs of things such as bandwidth use, blocked packets, packet loss, latency…You can regulate network access per-IP or per-MAC, and do any sort of filtering you wanted. It could also easily integrate with a wireless network (maybe throw a wireless card in, too!), serving as an access point and enabling features like permitting only certain MACs to connect, requiring authentication, or letting anyone in but requiring that they sign up in some form (a captive portal). And I really don’t understand why worms and viruses spread so well. It’s trivial to block most of them at the network level if you really monitor incoming traffic.

I’m frankly kind of surprised that nothing of this level exists. I think there’s a definite market for quality routers. A $19 router does the job okay, but once you start to max out your connection, you’ll really notice the difference! A good router starts prioritizing traffic, so your ssh connection doesn’t drop and your game doesn’t lag out, but your webpages might load a little slower. An average router doesn’t do anything in particular and just starts dropping packets all over the place, leaving no one better off. (And a really bad router–our old one–seems to deal with a fully-saturated line not by dropping excess packets or using priority queueing, but by reboot itself, leaving everyone worse off… I think this may have had to do with the duct tape.)

…and a Happy New Year!

(Okay, it works in chronological order, but I display newest on top… So just pretend my title complements Kyle’s.)

I wasn’t planning on blogging about my Christmas presents, but Kyle did and I decided to save some stuff for a new post.

I was much relieved when the former bishop of Turkey brought a Rebel XTi to replace my 10D (RIP, buddy; I loved you for the short time I knew thee). Although it’s technically a lower “class” of camera, the XTi is really an upgrade to the 10D in all ways except size and weight, so I’m quite pleased. (I “lost” ISO3200, but it was so noisy that i don’t miss it.) Not only is it a higher resolution (and a bigger LCD!), but Canon introduced an awesome new feature: an ultrasonic “duster” for the sensor that runs every time you turn the camera on or off. It’s too soon to tell, but it’s seemingly pretty effective at making sensor dust a problem of the past.

Along with it was a 50mm f/1.8 lens… I was a bit concerned at first, because it’s an effective 80mm with the FoV crop, but it’s turned out to still be an ideal length. The f/1.8 aperture affords me two great abilities: one is to take pictures in comparatively dark places without relying on flash, and the other is the ability to throw the background way out of focus, achieving “bokeh,” a fabulous effect.

Holly

I should note that, in the past few days, I re-shuffled things on my computer, re-installing Ubuntu on a clean partition and getting Compiz working. I’m hoping to use Xen to run my Windows installation, but I haven’t gotten Xen and my desktop environment to play nicely yet. I backed up my 500 GB “backup” drive, reformatted and repartitioned it (in a sane manner this time), and then moved everything back onto it in a more organized manner. I also set up an old stereo I had almost forgotten I owned. So it was practically Christmas even before today.

We also got a Wii for the family, along with Guitar Hero 3. Trying to get my parents using it, I realized just how steep the learning curve is: they’ve probably sunk a couple hours into practice and are just now finishing songs. It was the same way for me, too, just a long time ago. In a way, I kind of wonder why people bother: if you spend half an hour and get nothing but the crowd booing you, it’s really not encouraging to keep going. GH3 on the Wii is interesting–you snap a Wiimote into the back and use that, making it a wireless guitar. (Woot!) As an added bonus, the sounds when you mess up come out the controller and not the TV, which would be very helpful in multiplayer mode.

Guitar Hero 3 for the Wii

The Wiimotes now ship with this silly-looking “skin” for the controllers. I’m not sure whether it’s to protect the controllers (which practically explode if they get flung into a cinder block wall) or to protect people (who, presumably, do not like being hit in the head with game controllers), but it’s probably a good idea either way… They just look a bit goofy, is all.

New Wiimotes

I also got some great books… I’ve started several, and am having a hard time deciding whether I should keep up status quo (reading a chapter or two from one and then coming back and picking up another book and continuing that), or read them sequentially. Current must-reads on my nightstand* include my (signed!) copy of The First Campaign by Garrett Graff, an expert on blogging and politics; Tim Ferriss’ The Four-Hour Workweek (pre-review: the little bit I’ve read is fascinating, but between the book and his website, I can’t help but pick up on a bit of ego?); “Why Are All the Black Kids Sitting Together in the Cafeteria,” an interesting (or so it looks; I haven’t gotten far in yet) look at race relations in America by Spelman College President Beverly Daniel Tatum; and Naked Economics, a thin paperback “Undressing the Dismal Science” by Charles Wheelan: it looks like the type of book I wish I’d had when I was taking Economics.

I also received a nice vacuum. Ordinarily, I wouldn’t be too excited about a vacuum cleaner. Think of the, “Oh, it’s more clothes?!” you felt as a child. I think that’s how most people would feel upon receiving a vacuum cleaner. Especially college-aged guys. But you should see the floors in my dorm room… The vacuum was among my favorite gifts this year. Our floor at school gets vacuumed about once a month. It needs to be vacuumed about thrice a week. So it’s going to be a huge improvement.

* Full disclosure: I don’t actually have a nightstand, but I didn’t think it was too egregious of a lie to not say that the books are actually split between my desk and the side of my bed. But in case anyone wants to try to accuse me, there it is: I don’t have a nightstand.

An Uncontrollable Urge

A few years ago Andy and I ran a hosting company. It never got that far, but it was fun, and also a learning experience.  Today I’m finding that I can’t get the idea of starting it again out of my head. The problem is that, this time, I’d want to start it big.

There are a bunch of technologies that I find downright exciting:

  • Old racks full of blade servers are hitting the used market. And by “old” I mean dual 2-3 GHz Xeons, a gig or two of RAM, and hard drives that still rival what hosts are renting in dedicated servers. I’d probably want to put in new drives, but the machines are cheap and they’re plentiful.
  • Boston has a number of good data centers, and all the big Tier 1 providers are here. That there seem to be no well-known hosting companies out here is frankly kind of surprising. You have no idea how badly I want to pick up a couple racks in a colocation facility, and pull in a couple 100 Mbps lines.
  • cPanel looks like it’s matured a lot since I last used it, and it has some good third-party stuff such as script installers. It looks like it remains the number one choice in virtual hosting.
  • Xen is downright exciting. It permits splitting a physical host into multiple virtual machines. With the advent of chips with hardware virtualization support from both AMD and Intel, it now runs with very little overhead. It used to require extensive modifications to the “guest” OS, so that only modified versions of Linux worked. With newer processors, though, you’re able to run machines without them having to know they’re in a virtual machine, opening up options. You can run Windows now. The virtual dedicated server / virtual private server market is growing. (Xen also supports moving hosts between physical servers, which has a lot of nice applications, too!)
  • OpenBSD’s firewall, pf, continues to intrigue me for its power. I just found PFW, a really spiffy web GUI for managing pf. Not only does it do basic firewall stuff, but it’s got support for prioritization of traffic / QoS, and for load balancing. I’m probably just scratching the surface.
  • I’ve spent years honing my admin skills and improving server performance. Improved performance on a shared server, of course, means more clients per server, or more money.

I’m wholly convinced I should start a Boston hosting company. I just need $100,000 capital or so. (Santa, do you read my blog? Do you fund businesses? I’ll give you partial equity.)

Das Klunker

In the past few days, we’ve spent way more time shoveling snow than is reasonable. We have a relatively long driveway, and it’s a major pain to shovel it. We have a snowblower, but it’s really not all it’s cracked up to be. And last time I was in the garage half of the engine appeared to be removed.

While I think it’s more of a pipe dream than anything, my dad and I have been kicking around the idea of picking up an old junker of a truck. It should run and pass inspection (or be reasonably easy and cheap to fix), but some rust and crappiness is okay. Something like this. And then we’d throw a plow on the front. It’d be useful for our weekly runs to the dump, and, of course, for plowing. (Plus, there’s a lot of “cleanup” we’d like to do–there’s probably about two feet of snow on the side of the road that could be pushed back, and the town did a terrible job plowing the entrance to our street. And there are huge snowbanks, something we’d love to push down a bit.

It turns out that plows are expensive, and good, running trucks are also way more than I thought. From having seen junkers on the side of the road in the past, I was fairly convinced we could do this for under $500. It’s now looking like $2,000 is a better price range.

Or we could just get a just-broken-in Lincoln (Presidential Series!!) for a mere $500. (Step one: remove garbage from floor. Step two: try to clean up the leather a bit. Step three: resell.) Actually, I’d love to try to take my ‘radio arbitrage’ skills and apply them to autos, except that having an extra radio is well and good, but having four broken-down cars in my parents’ driveway might not be as well received. And, you know, the fact that they’re a lot more expensive and thus a lot more risky.

Qqueue!

So I’m a huge fan of Ask Metafilter. The basic premise is simple: you ask a question and lots of people answer. But Ask MeFi rocks because they maintain high standards. So you actually get really good answers. It costs $5 to join, which is done to pay for the servers but, frankly, seems like a good way for keeping crap out, too.  You’re allowed one question a week, so I try to make it good. But oftentimes, I put it off for several weeks for want of something worthy of using up my question.

So I started a list. And I figured I’d allowed voting and comments. And before I knew it, I had this monstrosity. It was actually extraordinarily simple to code, too. I hope to add better questions over time: these are the ones that were on my mind at the time. You can vote (the + and – buttons), and leave comments. Feel free to do so. (I’m not taking question ideas: get your own account if that’s what you want!)

Serverama

I’ve been itching to start up a Boston-based dedicated server company. There’s surprisingly few options. As I dig around I’ve found a few that exist, but they’re practically unheard of. I want to start one up and do some good marketing. Name recognition is pretty big when it comes to dedicated servers. However, none of the people I’ve talked to so far (my mom) has been willing to give me the ~$100,000 start up capital I’d need.

I have slightly different plans for furnishing the racks I’d want in a colocation center, but there are plenty of good deals to be had on eBay, in case anyone’s in the server market.

  • 1U Dell, dual 3 GHz Xeons, 1 GB RAM, 73 GB SCSI (10K RPM). $485 + $25 shipping.
  • If you’d prefer disk space over disk speed, there are also 1U SuperMicro machines, a 2.8 GHz Xeon (dual-capable, but not so equipped), 2 GB RAM, and a pair of 250 GB disks. About $400 shipped.
  • Comparatively expensive, but $1500 buys dual 3.2 GHz Xeons, 4 GB RAM, and 3x 146 GB SCSI disks.
  • Not cheap at all, but dual quad-core processor, 16 GB of RAM, and 6x 146 GB disks is my type of machine! $5375 if you’ve got the cash burning a hole in your pocket… (It looks like these processors support VT virtualization, so you can run something like Xen on it and host multiple virtual machines, Windows or Linux, without problems.
  • Dual 3.2 GHz Xeons, 4GB RAM, and a pair of 750 GB disks? $1277+58 seems like a pretty good deal!

Why I’d Go Nikon

Andrew’s biased me. I’m a Canon fan. I own a Canon body, and now, two Canon-mount lenses. And this brings in switching costs: the lenses would be useless to me if I had a Canon. And, while I think it’s mostly irrational, I’ve come to love everything about Canon cameras and see any difference as a flaw in Nikons.

But I’m still excited about the Nikon D3. And it turns out that I’m far from the only one. The D3 has a ton of people anticipating its release. And even at 5 grand, I wouldn’t be surprised if they’re sold out at first. I don’t have that much to spend on a camera, but if I were a serious photographer, I’d have pre-ordered mine already.  Why?

  • Higher ISOs mean you can get shots that you otherwise couldn’t. Or that you can buy cheaper (and lighter) lenses and still get good shots. Everything in photography is a trade-off: to increase shutter speed, you need to either raise the ISO (which raises grain), or use a wider aperture (which usually hits hard limits: your lens is only so good, and you pay through the nose for faster ones). Increases in usable ISO, though, come “free”–if you can suddenly take clean shots at ISO6400, as you apparently can with the D3, you can get shots that, frankly, were impossible on other cameras.
  • Higher ISOs can mean increased savings. To get really good shots when I can’t shoot above ISO1600 (or ISO800 if I want clean shots), I pretty much have to buy a faster lens. Pros have tens of thousands in high-end lenses for just this reason. They can get the shots I can’t. Suddenly, at ISO6400, I’d be on par with them.
  • A lot of cameras are using “cropped” sensors… The sensor is smaller than 35mm film, so only the center of the image coming through the lens falls on the sensor, effectively cropping the image. This is beneficial if you’re using telephoto lenses, as it’s essentially a “bonus” zoom. (A 200mm lens on my camera is equivalent to a 320mm lens on a full-frame camera.) But for people who shoot at the wide end, it’s a major pain. The crop gave rise to things like Sigma’s 10-20mm lens, which is ridiculously wide. The reason is that, on a 1.6x crop sensor, it’s 16mm equivalent at the wide end: right on par with existing lenses. A lot of lenses are being built just for these cropped sensors, which permits them to be lighter and cheaper. But people still prefer the full-frame sensors, so now there are two types of lenses floating out there. Nikon nailed it here: their camera will work with both. If you mount a lens for ‘cropped’ cameras, it’ll only use part of the sensor. If you mount a full-frame lens, it uses the whole frame.
  • They built a longer-life shutter. Bravo. (Actually, Canon did too…)
  • They improved the LCD to over 900,000 pixels. One thing that drives me nuts on the 10D is that the image is tiny and low-resolution. You have to spend time zooming in to see if it came out alright. And when you’re shooting live action, this means missing a ton of shots. So you shoot blindly, and then realize that the whole thing came out unusable.
  • They have a built-in guide, so you don’t have to carry the manual around. Again, brilliant! The menu also looks a little bit less like it was made in 1982.
  • When I talk about high ISOs, 6400 is just their ‘normal’ upper. As with most cameras, you can enable “Expanded ISO” mode, which gives you some more settings, with the catch that they’re somewhat noisy. But you can shoot at ISO25,600. This is just obscene, and I’m fairly certain that, until Nikon came out with this, no one had ever even thought about a camera being this fast.
  • They kept up a high shutter speed… Between 9 and 11 frames per second, in fact.

Something tells me that the folks at Canon are scrambling to develop a sensor this good.. I hope they are. Because I hate those stupid circular viewfinders on Nikon cameras.

Aside: I really hope the folks at Canon are also scrambling to develop a camera that ditches the shutter… I’m still at a loss to explain why it’s even in a digital camera.

Aside: Maybe they can steal my ideas and include a useful integrated WiFi chip… Or a built-in intervalometer. That’d be trivial to implement?

Misery

Tonight Oprah and Obama spoke at the Verizon Center. I went, both as a fan (of Obama, not Oprah) and to try to get some great shots.

I’ve heard Obama speak before. He’s really good. I went in tonight with Obama being my likely pick, but with Edwards still having some chance, and with the idea that Richardson would rock, too, but that he doesn’t stand a chance right now. I came out convinced that, without a doubt, Obama’s my guy.

Oprah also turned out to be an amazing speaker. I generally don’t have anything positive to say about TV celebrities, but she turned out to be great. She spoke about how, when she’s not on TV, she’ll often say, “Somebody should do something about that…” to all the things wrong in America right now. So, for the first time in her career, she stepped up and endorsed a political candidate, the one she thinks will “do something about that” to all our contemporary problems.

Michelle Obama spoke, too. Granted, she’s biased, but she had nothing but good things to say about her husband. She spoke about how when she first met him, they were both lawyers. While she was focused on wanting to be the next millionaire with her law degree, Obama received his degree and then went into destitute, rural areas to help.

And of course, Obama spoke. While he called himself the third-best of the three when it comes to speaking, his speech didn’t disappoint. Hearing him talk almost gives me goosebumps. I’m so focused on all that’s wrong with America: millions don’t have health care (as soon as I graduate from college, I’ll join the ranks of the uninsured), we keep botching things like Katrina, maybe because all of our National Guard / military is tied up with Iraq’s civil war. Our economy heads further south and shows no signs of stopping…

But when he talks, I suddenly have a vision of what America should be: veterans coming back from Iraq receiving a hero’s welcome and receiving veteran’s benefits, restored relations with the world community, health care for everyone*, the end of a pointless war, and the end of the clash between blue states and red states–a United States, if you will.

So why is my post entitled Misery? Because my camera died.

Here’s Cameron, a 10-year-old student, reading a letter to Obama, imploring him to provide more aid to the autistic:

10 year old!

He received (much-deserved!) hearty applause.

NH Governor John Lynch

There’s our beloved John Lynch addressing the crowd. We were near the back of the Verizon Center, so we didn’t have the best angle, but I knew from past experience that Senator Obama was very cognizant of the fact that the crowd wasn’t just directly in front of him, so he would turn around and make sure all the crowd got his attention. So I was excited. Obama would surely come around to the other side of the podium at some point, and I’d get some great shots. The lighting was good enough that I was getting 1/100 and better shutter speeds at ISO800 (on a slow f/5.6 lens); the only thing I could have wished for was a faster lens to throw the background out of focus a bit more. But I was golden. A lot of people say photography’s all about light. To me, it’s all about angles. And we’ve all seen head-on shots of politicians. They’re boring. I had a good perch.

So, you might ask, where are all the shots of Oprah, or Michelle and Barack Obama?

Err 99. Canon’s catch-all error message.

For a lot of people, it’s a bad connection between the camera and the contacts on the lens. For others, it’s a CF card error. But I tried it all in vain. I “reseated” the lens. No luck. I tried taking a shot with no lens. No luck. I tried shooting without a CF card. (That wouldn’t do me much good, but it’d tell me if the CF card was the problem.) Still Err 99. I tried reseating the battery, which apparently sometimes resolves the error. No luck. I even took the battery out and removed the little CMOS battery. No luck.

All indications are that it’s the worst possible fate: a shutter problem. There do look to be some small scratches on the shutter, although I wasn’t about to stick my hand in and try. (Because then it’s guaranteed to become a shutter problem…) The shutter isn’t really user-serviceable. Taking the camera apart is very involved. You have to send it back to Canon, for what’s apparently a $200 repair.

Is this a sign that I should get the Rebel XTi I’ve been eying? Or just a sign that I should give up photography?

The worst part, though, wasn’t sitting there knowing that my pride and joy of a camera had just become little more than a paperweight. It was knowing that I was missing some great shots. Initially, I kept just powering it back off and on trying to get some good shots. As Obama walked out, there was a huge sign blocking a lot of people from seeing him as he walked out. So he ducked down and waved underneath the sign. I had a nice, clear shot, and was at 1/100. I clicked the shutter. If all I had gone well, I’d have held it down and gotten three off in rapid succession, ensuring that at least one came out well. But all didn’t go well. Err 99. I got nothing.

A bit later on, he was speaking, and I noticed that Michelle Obama had her arm across Oprah’s back as they sat there. 200mm was just enough length to just about fill the frame with the two of them and Barack at the podium to the left. Err 99.

I spent a long while trying to see if I could resuscitate it, but eventually gave up.

* Before you fault this for the cost, consider that we’re spending many, many billions more than any nation in the world. As President Clinton remarked last month, if we were to put all the other country’s health care systems up on a board, throw a dart and pick whatever it hit, we’d save billions. And yet, despite paying billions more than we should be, we can’t even cover everyone!

Lost in Translation

Check out this radio‘s description. It’s got excess value and pettiness! And a phrase-lock-loop. And “LCD aphellotropic lights of showing screen,facile operation in dark” has got to mean “backlit screen.” (Facile is Spanish for “easy,” no your mom jokes.) Oh, and you can’t forget the Auto-charger rabbet. And it comes with a chargeable battery.

Anyone else confused? (Bonus points: I tried to copy-and-paste a quote, and it carried over the HTML tags, which included <font face=”Wingdings”> at one point….?!)