flak rss random

sinatra mime types

Sinatra (the ruby web app framework) has a handy method to indicate that the response is an attachment and should be saved: attachment filename. It even sets the content type correctly. Unless it can’t guess from the filename. Then it throws an unrecoverable error.

Discovered this little fact trying to download a .tgz file. The documentation says if I find a mime type Sinatra doesn’t understand, I’m supposed to run mime_type :tgz, 'application/octet-stream'. OK, great. So where’s the list of already known types? Never mind that, I’m really supposed to make up a list of every mime type I might want to download at some point and register them all up front? Insanity. In theory, I think rack is supposed to already be using a default of application/octet-stream, but it appears I’m just unlucky.

Posted 08 Apr 2012 02:40 by tedu Updated: 11 Apr 2013 21:34
Tagged: mailtanium rants software web

software reliability and utility

Following up on the previous post about software reliability, let’s consider the concept of utility functions. There’s a few definitions for utility function, but I’ll say it’s something along the lines of a function that maps the raw measure of something to its value to the user. A common example given for money is the natural log function, which explains why a dollar to a millionaire is worth less than a dollar to a poor person, even though the raw measure ($1) remains the same: log(11) - log(10) > log(1e6 + 1) - log(1e6). Law of diminishing returns.

more...

Posted 06 Apr 2012 23:45 by tedu Updated: 09 Mar 2013 18:19
Tagged: software thoughts

software reliability and kernels

OpenBSD 5.1 preorders are now up on the site. And minix 3.2 was also released recently. Here are some reflections on why microkernels don’t matter. I’m not saying microkernels are worse, or slow, or anything like that; they just aren’t that much better. There’s a somewhat long two part argument coming up. One part is that microkernel reliability is overstated, the second part is that the value of reliability is itself overrated.

more...

Posted 06 Apr 2012 23:43 by tedu Updated: 09 Mar 2013 18:34
Tagged: software thoughts

goodbye gmail

This post is rather delayed, since I quit using gmail almost a year ago, and the decision was made more than a year ago, but since I’m hopefully going to start writing about my post gmail adventures, I’ll start at the beginning.

Gmail was, for a time, pretty awesome. It was certainly an upgrade from pine in many respects. The ability to open attachments without bizarre scp contortions was a plus. I don’t really need to recount the virtues of gmail, but I was impressed with it for quite some time. First (and only, really) web app to replace a desktop app for me. But Eden was not to last.

Over time, I had a growing spam problem. No matter how many Chinese emails I flagged as spam over the course of five years, gmail was convinced that this was the day I woke up knowing Mandarin. Also, based on observed behavior, gmail whitelisted all emails with the word “lottery” in the subject. This was kind of a slow burn pain.

Also, the filtering options were kind of limited. Basically, too many annoying mailing list people and not enough tools to deal with them. I could block senders, one by one, somewhat tediously, but no good way to kill a thread. This was kind of a spiky pain, really bad some days, less intense other days.

Finally, there were some service disruptions or shortages or whatnot. Every time I clicked an email and did not get to see the email just stoked the fire a little more.

Things hit the bottom after I had already made the decision to quit. When it was just personal email in gmail, I was limping along, but once we started using gmail for work and I had to start using two browsers to keep things straight, the pot really boiled over. See also my other post on that.

In the end, I decided the only solution was to write my own mail client, because there are not enough of them. As far as I was concerned, gmail was the best available, and it’s just not that good. My replacement, since named mailtanium, was built to be fast and flexible. I’ll introduce it in another post.

Posted 29 Mar 2012 05:11 by tedu Updated: 09 Mar 2013 18:36
Tagged: mailtanium rants software

Coriolanus

I didn’t know about the Shakespeare play before learning of the movie, but it sounded interesting. It’s a modern adaptation, updating the setting to the present day. Such adaptions may not please everyone, but it works. Really well, in fact.

Prescient is the wrong word, but it’s the first impression I had watching Coriolanus campaign for consul. Timeless, maybe. The modern update helps drive this home; a period setting would have allowed the viewer to dismiss the story as not here, not now. His campaign goes about as well as I imagine my presidential campaign would go. I don’t know if the timing of the movie to coincide with the primary campaigns is deliberate, but it’s apt.

Posted 24 Mar 2012 03:32 by tedu Updated: 24 Mar 2012 03:32
Tagged: moviereview

kindle fire's second death

My first kindle fire, back in November, lived for about two hours. Then I updated it to software version 6.1 and it was forever after frozen at the startup logo screen. Amazon kindly sent me a second fire that survived the update, which I had been using more or less happily for the past month. More happily because I can view pretty pictures and movies with it, less happily because the interface was super slow and unresponsive. About a million reviewers have said much the same.

Today, that second kindle fire apparently tried to update itself to version 6.2. Tried and failed, or as some people like to say, tried and died. Same symptoms as the first go round, frozen at the startup logo. Supposedly, this was the update that fixed the UI response issues, but I’ll never know. This time it’s going back for a return, no replacement. Maybe I’ll try again in a year, but if I need to get a new device every time there’s a software update I’ll pass.

Posted 12 Jan 2012 03:30 by tedu Updated: 12 Jan 2012 03:30
Tagged: gadget rants review

a programming interview question

Technical interviews are always hard to get right, for the interviewer no less than the interviewee. Too simple and the question fails to weed out the people you don’t want. Too hard and you end up selecting for people that lucked out and heard the question or a variant before. There’s no solution, thankfully, or we couldn’t endlessly debate the problem.

more...

Posted 22 Dec 2011 20:41 by tedu Updated: 10 Feb 2015 23:29
Tagged: c programming thoughts

unable to view this email

Every couple days I get an email from some group because I found my way onto their mailing list. The message body: “Our system has detected that your e-mail reader does not support HTML and you are therefore unable to view the content of this e-mail.” Thanks for trying, maybe? Really, the message just infuriates me far more than typical content free text emails because I know your system hasn’t detected shit. Maybe you should upgrade to a system that detects I don’t want your email.

Posted 17 Dec 2011 00:10 by tedu Updated: 31 Aug 2012 17:33
Tagged: mailfail

latest Google retardery

We have gmail at school and sometimes I forget to sign out when I’m done reading email. I usually get a reminder pretty quickly though because it doesn’t take long at all for something to break. Like news search. I search for something and click on the top news link. Then google tells me “Oh hi, your account doesn’t have news turned on so this page is unavailable.” Gee, thanks, maybe you could have figured that all out before providing said unavailable page as the top search result?

Anyway, the fix is as retarded as the problem. Logout and do the search as nobody at all. Then news is turned back on. Apparently we pay more for less.

Posted 11 Dec 2011 00:26 by tedu Updated: 11 Dec 2011 00:26
Tagged: rants

database schema upgrades

Sooner or later, every database is going to need a schema change, usually to coincide with a software upgrade. Sometimes it’s simple, just adding a little more data. Sometimes it’s not so simple and things go wrong and you need to make them right. Here’s my current best idea how to go about minimizing pain, assuming we have some software version X that we’re upgrading to version X+1, and that the installer or upgrade tool will need to upgrade the database from schema Y to schema Y+1. I’ve used plans like this pretty successfully, but came back to the idea after thinking about the statistical component of the problem more recently.

more...

Posted 14 Oct 2011 19:36 by tedu Updated: 14 Mar 2014 15:22
Tagged: programming software thoughts