Decade in Review

Tomorrow, it will be 2020.

In 2010, I was a web developer and manager at a small company outside of Boston. Now, I’m a developer and team lead at a very very large international company. In 2010, I programmed in mostly Java and Perl. Now, it’s mostly Go and C++.

In 2010, I lived in South Boston in a condo I owned with a small patio. Now, I live in South Boston in a different condo that I own with a large back yard (for this neighborhood at least). In 2010, I lived with my beautiful wife and beautiful dog Gus. Gus isn’t with us anymore, but we’ve got two adorable toddlers that keep us busy instead.

In 2010, my parents lived in an RV on the road. Now, they only live half of the time in their RV on the road, and the other half of the year they spend in a small home in an “RV resort” in Florida.

In 2010, I was active on MetaFilter, Facebook, Twitter, and Flickr. Now, I still visit those websites but of them I’m really only active on Twitter. In 2010 I had a personal website, and despite reports to the contrary I still do.


The Scary <s>Future</s> Present of TV

Back in 2013, I had a conversation with cmatta about what I thought was the scary inevitable future of streaming companies vertically integrating into content producers. I kept meaning to write up a blog entry. Here we are, now, 6 years later, and the future I saw is now the present, so I will just copy and paste some excerpts from the conversation, and you’ll just have to believe I was as prescient as I claim I was.

I need to write a post about why House of Cards and Arrested Development scare me

Picture a world where Comcast made some shows and RCN made other shows and each one of a dozen cable companies each made their own shows

And none of them carried each others shows

That world would be really terrible

Instead of actual openness, it’s just a different kind of closedness, and it’s about the same amount of money but a lot more annoying

It’s only Netflix and Hulu right now

I’m extrapolating out a decade

There’ll be dozens of these providers all with mutually exclusive shows and streaming mechanisms

It’ll be a nightmare for the user

And you’ll be saving like 10%

It depends on what I think Netflix and Hulu and Amazon are going to do as these things get more popular, and I don’t think it is “cooperate”

And then I’ll have to have 20 different accounts to watch the one good show on each of the 20 distributors

You’ll be paying about the same – $40-80 a month, but it’ll be harder because you’re paying a bunch of different places

And the punchline:

cmatta: write this up, i'd be happy to have a longer-form discussion on this

me: I will, you’re ON, MATTA

I post this now, because there’s now not just Netflix and Hulu and Amazon, all with great exclusive originals, but also CBS All Access if you want to watch Star Trek Discovery and the upcoming Picard show. And HBO Now for Game of Thrones. And soon you’ll need Disney+ if you want to watch anything Marvel or Star Wars or Fox (like The Simpsons or Futurama). And Apple is getting into the original content business, too.

That’s potentially 7 different monthly bills where just 10 years ago you’d pay one company and be done with it. Forget the days when all your TV would just work, today there’s a question if the world’s biggest content producer’s new service will work on the world’s biggest tech company’s streaming device. The content is better than it was then, without a doubt, and the ability to watch whenever (I’m old enough to have programmed a VCR in my life) but the experience as a consumer is worse.


Nexus One in 2017

I’ve been using my old Nexus One (running Android 2.3) for the past week, while a replacement Nexus 5X has been in transit. Observations:

Nexus One screenshot

  • I forgot how bad the screen was. Basically invisible in bright sunlight, even at full brightness and shaded.
  • How do I communicate? Talk is dying, Allo and Hangouts aren't supported. Using an old enough apk of Hangouts that can be installed gives a modal "please upgrade" popup on start.
  • The browser isn't horrible, but there's apparently some cross-site SSL feature it doesn't support, because I get warnings about buttflare certs being bad pretty much everywhere.
  • Twitter works! Crazy!
  • Maps works too!
  • Signal supposedly supports 2.3 but I got strange errors every time I tried to install it.
  • I forgot how slow HSPA was.
  • Gmail works, but for some reason it doesn't seem to sync quite right. I very rarely can see the emails in my Inbox, even when Gmail says they're there. Inbox isn't supported, sadly. The browser-based Gmail is better, but no notifications obviously. Some HTML glitches too, but nothing horrible.
  • It's seems like a bad thing that an OS released a little more than SIX years ago would be so unsupported. The Gmail/Hangouts/Signal/Allo situation is sad. To be fair, though, Ice Cream Sandwich (8 months newer) was a big departure and it seems like a lot of apps use that as their oldest supported version.
  • The vibrate is INTENSE.
  • The ringtones are horrible. The alarm tones are worse.
  • The camera isn't actually so bad, but the 80db shutter sound is surprising every time.
  • I miss the trackball (especially trackball notifications).
  • Having to unlock to see/swipe notifications is surprisingly painful.
  • The calendar widget only shows your next event, not your agenda for the day. How is that useful?
  • I actually don't hate the small form factor as much as I thought I would

First Seven Languages

My #FirstSevenLanguages:

  1. BASIC - I remember programming BASIC on my parents' IBM PC around the age of 6. For a long time it was mostly copying simple code from books and writing tight for loops. Eventually I progressed to QBASIC and some simple graphics stuff.
  2. C - My dad taught me C when I was getting fed up with BASIC. The only thing I remember writing was a crappy RPG based on the places I hung out with friends.
  3. TI-BASIC - I wrote a bunch of small programs that automated some geometry/trig/calculus rules for my TI-82 in High School. I also wrote some games, tic-tac-toe and 2-player checkers among the ones I recall.
  4. Pascal - I learned Pascal in high school, as part of the AP Computer Science program. My proudest moment was Uno and Battleship, both with simple AI opponents.
  5. Perl 5 - I learned Perl in my free time my freshman year at college. I created a small community website (wsvw1u.com) using CGI.
  6. C++ - The Computer Science courses at RPI were primarily in C++ at the time I was there. For parts of courses, I also dabbled in MIPS assembly, Smalltalk, and Scheme.
  7. JavaScript/JScript - My first full-time job after graduation was writing tools for the 24-hour NOC at Priceline.com. We used a mix of Perl, server-side JScript, and JavaScript.

Upgrading a 8-year-old TV

In 2008, when my parents sold the house I grew up in and started cruising the world in an RV, they gave me their flatscreen television for safe keeping. The expectation was that they’d do the On The Road thing for a couple of years and then take it back when they settled down. They’re still doing it, and the TV is now hilariously out of date. And a couple of weeks ago, the antenna connection stopped working, meaning it was time to upgrade.

The main requirements were: about 40 inches, wide viewing angle, at least 3 HDMI inputs, and never ever ever a Samsung. I was hoping I could also purchase it from a local brick-and-mortar store (instead of online) for an insignificant premium. We don’t need a 4k screen (at that size, and with our couch 11ft away from the screen, it wasn’t necessary. I spent lots of time reading Wirecutter, Rtings, and 4k.com.

The Wirecutter recommended TV (Vizio M43-C1) was very very close to what I needed, but it didn’t have a great viewing angle. I ended up deciding on a 43-inch Sony X830C. Great viewing angle and plenty of HDMI. Rtings felt the contrast wasn’t great and the surface was too reflective, but 4k.com didn’t really agree and general picture quality wasn’t super high on our list – I was sure it would be better than our old free screen.

Anyhow, it’s on the wall now. Six inches larger than the old screen, but covers up less wall. Definitely good. More detailed thoughts coming after I get more time to watch it.

UPDATE: After using the TV for the past two months, I’m definitely a fan. The reflectivity is not a problem, and the colors and viewing angle are excellent. We almost never use our Roku box anymore, which isn’t its fault, it’s just that our TV does everything we used it for. Android TV is pretty good, I think our TV has only crash-rebooted a couple of times (which is a weird concept). The UI could be a bit faster, but whatever. It’s nice having the Guide be accurate even though we only use an antenna (however our old TV used to get its guide had stopped working years ago). The biggest complaint I have is that the remote is sort of a disaster.


Red Sox 2016 preview

Ever since my parents have been living within spitting distance of Fort Myers, I’ve sent them a quick list of Red Sox storylines going into Spring Training. Seeing as pitchers and catchers report today, I figured today would be a good day to do it. 2016 is going to be an important year for the Red Sox.

  • There's a good chance that manager John Farrell is on a relatively short leash. His World Series victory in 2013 has given him a little benefit of the doubt, but the last two seasons have seen last-place finishes and declining attendance. General Manager Ben Cherington was replaced with his assistant Mike Hazen, so it's clear that ownership is willing to make changes. I'd bet if we finish in last place again, Farrell would be gone.
  • We've got lots and lots of young talent, mostly promoted up through the farm system. Mookie Betts (RF) is probably the most prominent, but Jackie Bradley Jr (CF), Xander Bogaerts (SS), Rusney Castillo (LF), and Blake Swihart (C) are all promising kids, too.
  • We signed the premiere pitching free agent in December: David Price. He's making $30 million this year, and then also for the 6 years following that. He won the Cy Young in 2012 and was 2nd in voting and led the AL in ERA last year. He won 18+ games three of his last five seasons and we haven't had an 18-game winner since Lester in 2010.
  • We also picked up a big name closer: Craig Kimbrel. Led the league in saves for 4 years (4th place last year). Both he and Price are solidly in their prime, too: 28 and 30, respectively.
  • As for last year's big signings that didn't perform as expected, well, we'll see how they go. There were rumors of trade attempts for Pablo Sandoval ($17M/y) and Hanley Ramirez ($22M/y), but nothing panned out. Ramirez was moved from his usual shortstop (where we're overloaded) to left field last year (where he looked lost at Fenway, especially compared to the young guys) and this year will be at First Base, where he's never played.
  • The rest of our starting rotation is pretty stable from last year, which is to say: mediocre. Buchholz will look amazing through June like usual, but then will go to 15-day DL and stretch that out to missing a dozen starts. (We exercised his option for this year, and we've got another one for next year, but I wonder if we let him go if he can't stay healthy. Again.) Porcello will hopefully live up to his 4-year $20M+/y extension. E-Rod, Kelly, and Wright will probably get through the year with 4ish ERAs and we'll have to hope that's good enough to keep us in games.
  • And last, but definitely not least: this will be Big Papi's last season. By most advanced metrics (WAR, OPS+, RE24), he was among the top hitters on our team yet again last year and hopefully he'll go out on top too.

Most statistical projections have us favored to win the division or be in the running for a wildcard, both of which depend on some luck and few injuries. Hopefully it’ll be an exciting year.

Go Sox!


Happy 2016

The number 2016 is 11111100000 in binary. Years whose binary representations are just 1s followed by 0s have been rare for a thousand years, but we’re going to get more and more in the next few decades:

201611111100000
203211111110000
204011111111000
204411111111100
204611111111110
204711111111111
2048100000000000

And then no more until the 31st century. So enjoy them while they last!


Records that The Force Awakens has set

Star Wars: The Force Awakens had a pretty big opening weekend. It broke the records for domestic opening weekend ($247.9M, over Jurassic World’s 208.8M) and worldwide ($529M, also breaking Jurassic World’s 524.9M). But that’s not all.

  • Largest Thursday "preview" day
  • Largest Friday, largest opening day, largest single day
  • (Not the largest Saturday, it was 3rd, behind the first Avengers movie and Jurassic World
  • Largest Sunday
  • Largest Monday (in this case breaking Spiderman 2's 11-year-old record)
  • Highest per-theater average (this record is probably the craziest -- it broke Jurassic World's previous record by 22%)
  • Fastest movie to $100M (in fact, the very first movie to break 100M in one day, so this record will never be broken, only tied) and the fastest to $250M
  • Largest domestic and global IMAX weekends
  • Biggest December opening weekend (by a factor of 3! $248M, compared to the previous record was the first Hobbit at 85M)

There are more, too, but they’re all implied by the above ones (largest PG-13 opening weekend! Largest holiday weekend!).

And for the record, my review:


The National Anthem retold simply

Our Sign With Stars On It

It’s morning now. That thing we saw last evening – can you see it? It was on the other side of that wall. We could see its colors even though there was a fight happening. In fact, the fighting gave off light that let us see it all night! So, is it still there?

(Inspired by XKCD’s Up-goer Five and repeated singing of The Starspangled Banner to my infant daughter.)


A week's worth of paternity leave

Stats from a week’s worth of paternity leave with a 3.5 month old:

  • Naps: 22 (average 4.4 per day, median length: 46 mins)
  • Bottles: 20 (average 4 per day, median volume: 3.25 oz)
  • Diapers: 32 (average 6.4 per day)
  • Smiles: 1040 (approximate)

JavaScript Flickr carousel

My wife and I made something a couple of weeks ago, and her name is Simone. Our families and some friends want to see lots of pictures, but most people don’t want us to flood their Facebook feeds with baby photos (nor do we want to). So we’ve been uploading them to Flickr mostly, but I wanted a slightly simpler page where people could just see a carousel slideshow of photos of our daughter. There was no good immediately-integrated-with-Flickr JavaScript carousel I could find, but I was pretty easily able to integrate it with Fotorama.

Here is the final product (and beautiful pictures of my girl). Here are the easy steps to do it yourself:

  1. Sign up for a Flickr API key. If this is a non-commercial site, it's free and instant.
  2. Grab the download or copy the hotlink markup from the setup page in the Fotorama docs
  3. Add this markup to your page:
    <div class="carousel" data-auto="false"></div>
    There's a lot of configuration options you can add besides that. Here's the full list.
  4. And now the final step, the JavaScript that populates the carousel:
      <script type="text/javascript">
        $(function() {
          var AddPhotosToCarousel = function(data) {
          var imgs = [];
          $.each(data.photoset.photo, function(index, photo) {
            imgs.push({img: photo['url_m'],
                       thumb: photo['url_sq'],
                       caption: photo['title']});
            });
            $('.carousel').fotorama({ data: imgs });
          };
          $.getJSON('[api.flickr.com/services/...](https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=XXXXXXXXXX&photoset_id=YYYYYYYYYY&format=json&extras=url_sq,url_m&jsoncallback=?',) AddPhotosToCarousel);
        });
      </script>
    

You must put your API key and your photoset’s id into that big URL you pass to $.getJSON(). If you want the photos to show up in reverse order (as I did), change imgs.push() to imgs.unshift(). You can display things other than photosets (search results and such), but you’ll need to dig into the Flickr API docs to build those queries yourself.


What Bill Belichick has done with the Patriots' first round draft picks

There’s a running joke that Bill Belichick likes to trade out of the first round of the NFL Draft, acquiring a larger number of late-round picks. This joke depends on his identity as something of a passionless rogue thinker. So after he used his first round draft pick last night to draft an actual football player, I decided to look back at his history as Head Coach (and de facto General Manager) of the New England Patriots. Here’s the full list of what he did with first round picks:

  • 2000 (#16): Sent to Jets as compensation for his own hiring
  • 2001 (#6): Drafted Richard Seymour
  • 2002 (#32): Traded up to #21, drafted Dan Graham
  • 2003 (#14): Acquired via trade for Drew Bledsoe, traded up to #13, drafted Ty Warren
  • 2003 (#19): Traded down to 2nd round plus 2004 1st round
  • 2004 (#21): Acquired via above trade, drafted Vince Wilfork
  • 2004 (#32): Drafted Ben Watson
  • 2005 (#32): Drafted Logan Mankins
  • 2006 (#21): Drafted Lawrence Maroney
  • 2007 (#28): Traded down to 4th round plus 2008 1st round
  • 2008 (#7): Acquired via above trade, traded down to #10, drafted Jerod Mayo
  • 2008 (#31): Forfeited as penalty for SpyGate
  • 2009 (#23): Traded down to #26 plus 5th round, then traded those for a 2nd and two 3rds
  • 2010 (#22): Traded down to #24, then again to #27, drafted Devin McCourty
  • 2011 (#17): Acquired via trade for Richard Seymour, drafted Nate Solder
  • 2011 (#28): Traded down to 2nd round plus 2012 1st round
  • 2012 (#27): Acquired via above trade, traded up to #21, drafted Chandler Jones
  • 2012 (#31): Traded up to #25, drafted Dont'a Hightower
  • 2013 (#29): Traded down for 2nd, 3rd, 4th, 7th round picks
  • 2014 (#29): Drafted Dominique Easley

So in the past fifteen drafts, he’s drafted 13 players in the first round (including 2 after trading downward within the round and 4 after trading upward) and got out of the first round entirely 5 times. Draw whatever conclusion you like, but that doesn’t seem like a particularly strong trend to me. From 2007-2011, however, he traded down or out with 5 of their 6 picks – I wonder if that’s where this reputation originated.


Analysis of "Gloss"

There is a short poem titled “Gloss” by David McCord, written to draw attention to English words that appear to be antonyms of words that don’t exist. It goes like this:

I know a little man both ept and ert. An intro-? extro-? No, he's just a vert. Sheveled and couth and kempt, pecunious, ane, His image trudes upon the ceptive brain.

When life turns sipid and the mind is traught, The spirit soars as I would sist it ought. Chalantly then, like any gainly goof, My digent self is sertive, choate, loof.

Which of those root words have been simply lost to history, and which never existed? You can have a word that starts with dis- and isn’t an antonym, e.g. “distance”, is that the case with any of these words?

  • (in)ept - Direct from the Latin ineptus, although thanks to Latin's complicated rules, the opposite was aptus, which survives in the English word "apt" (and aptitude and adapt and others).
  • (in)ert - Like inept, this comes from the Latin, in this case inertem. The non-negative version artem became "art".
  • (intro/extro)vert - The second half comes from the Latin vertere (to turn), and is the source of the word "versus".
  • (di)sheveled - This word originally meant "bare-headed", from the Old French des- and chevel (hair).
  • (un)couth - In Old English, this meant "unknown", the negation of the root cuð, the past participle of the word cunnan meaning "to know". It is also related to "can" (in the sense of being able to do something) and "could" and "cunning".
  • (un)kempt - Kempt is certainly less common, but it's far from dead.
  • (im)pecunious - Direct from the Latin. The root word pecunia is also the source of the English "pecuniary".
  • (in)ane - The first one that was a Latin adjective in its own right, not a negation.
  • (in)trudes - From the Latin trudere (to push). In this case, the in- prefix doesn't mean the opposite, but rather "into" (therefore: extrudes).
  • (de)ceptive - The Latin root capere (to take) took a slightly more roundabout route to "capable".
  • (in)sipid - Related, somewhat, to the word "sapient", via the Latin root sapidus/sapere.
  • (dis)traught - Distraught comes from the word "distract", perhaps modified like the past participles "caught" and "bought".
  • (in)sist - From the Latin root sistere (take a stand). Like intrude, the prefix means in/on, although the reverse never made it to English. Related to assist.
  • (non)chalantly - From the French non- and chaloir (have concern for)
  • (un)gainly - From the Old Norse un- and gegn (convenient or direct). Related to "again" and "against".
  • (in)digent - The prefix here isn't in-, but rather Latin indu and egere (need, want)
  • (as)sertive - "Assert" is from the Latin asserere (to claim). (Aside: either this is out of place, or I'm misinterpreting which word the author was using. I see no way to interpret "as-" as a prefix)
  • (in)choate - The last two are the most interesting. This word used to have a more straightforward and less judgemental meaning. From the Latin in- (meaning on) and, strangely, cohum (the strap fastened to an ox).
  • (a)loof - The prefix "a-" is similar to the same prefix in anew or afoot, and the Middle English loof is from the Dutch loef (the weather side of a ship).

Final count: 11 negations, 5 prefixes with non-negation meanings, and 3 words not constructed with a prefix.


Bouncing screensaver

We’ve all seen the bouncing screensaver. And we’ve all watched, hoping it would fall into the corner. Oh, you haven’t? Well, watch this documentary footage of the adventure you’ve been missing.

The screensaver isn’t mysterious. It moves in predictable ways, meaning we can calculate how often it’ll hit the corner (and if it will hit a corner). So let’s start with some assumptions.

  • The bouncing object is smaller than the screen.
  • It starts in the upper left hand corner.
  • It moves at a 45 degree angle.
  • It bounces perfectly (i.e. it always is moving at a 45 degree angle).

From this, we can make a few quick observations. The total distance it has traveled left and right is always equal to the total distance it has traveled up and down. And in order to land in a corner, it must have traveled a whole multiple of the both the width and the height of the screen. Or to put it mathematically:

mW=nH

We can find the lowest possible values for both m and n (which must be integers) fairly easily. The definition of the greatest common divisor of W and H implies that:

nmcalc

You can follow the same logic to calculate the value of m.

So now we know how many times the bouncing object travels the width of the screen (m) and the height of the screen (n). Each of those traversals will be followed by a bounce. We’ll need to subtract 1, because the last bounce – the impossible dream, the bounce in the corner – is counted as a horizontal and a vertical bounce. So the number of bounces necessary is:

finalvalue

Let’s find out how many times Jim and Pam and the others would have to watch the screen saver bounce to see it go into a corner. The DVD was most likely running at an effective resolution of 640x480 (equivalent to 480p). It’s hard to tell the size of the bouncing object, but it’s definitely smaller than a quarter of the height, plus it appears to have an non-bouncing border. Let’s eyeball it at 50x50. So:

answer

Left as an exercise for the reader: Which corner will the object bounce in? Is it possible for the object to only bounce in the upper-left hand corner (where it starts)?


LearnedLeague Computing

I just finished creating and presenting a Computing trivia MiniLeague for LearnedLeague. It went really really well, and I wanted to share the questions to a wider audience. Beware: it’s HARD.

  1. During World War II, British cryptographers at Bletchley Park created electromechanical proto-computers to help crack Germany’s Enigma code. What were these machines called, a reference to the ticking sound they made when they were in operation?
    Answer: BOMBES
  2. In 1996, Intel introduced a technology allowing its processors to do math on large sets of numbers extremely quickly. This technology was widely marketed, and had a well known three letter acronym, but it didn't actually stand for anything. What was that acronym?
    Answer: MMX
  3. The original Unix timestamp is stored as a number of seconds since January 1, 1970. This timestamp will exceed 231 in what year, breaking any computer systems that have not been updated to store the timestamp in more than 31 bits?
    Answer: 2038
  4. Modem is a portmanteau of what two words that describe the way it functions?
    Answer: MODULATOR DEMODULATOR
  5. The programs ed, vi, pico, and nano are most commonly used to do what?
    Answer: EDIT TEXT FILES, EDIT SCRIPTS, ETC
  6. How many rules are there in Codd's Twelve Rules, the early-1980s standard against which all relational database systems are judged?
    Answer: 13
  7. The original HTTP standard misspelled the name of the header field that identifies the address of the webpage that linked to the one being requested. The current HTTP standard still misspells it, and it will probably never be corrected. What is the name of that header field (spelled as the standard spells it -- SPELLING COUNTS)?
    Answer: REFERER
  8. By tradition, in Unix systems, many long-lived background processes have a name that ends with a "d" (for example: httpd, syslogd, telnetd, and many others). What word does this D stand for?
    Answer: DAEMON, DEMON
  9. Name the septuagenarian programmer who said: "At the time of my death, it is my intention that the then-current versions of [my two most prominent creations] be forever left unchanged, except that the final version numbers ... of the programs should become pi and e, respectively. From that moment on, all 'bugs' will be permanent 'features.'"
    Answer: DONALD KNUTH
  10. What US university does the B in the BSD family of Unix-like operating systems refer to?
    Answer: (UNIVERSITY OF CALIFORNIA AT) BERKELEY
  11. The PowerPC chip family was designed by a three-company group called the AIM Alliance. Name any two of the member companies.
    Answer: APPLE, IBM, MOTOROLA
  12. What do IP addresses that start with "10." and "192.168." have in common?
    Answer: THEY ARE PRIVATE
  13. The plugs designated D-terminal, 13W3, and DE-15 were each once used to connect what kind of peripheral to a computer?
    Answer: MONITOR
  14. What was the nickname that pioneering hacker John Draper adopted? He took it from the cereal box whose prize was a whistle that could be used to make free long-distance phone calls (among other things).
    Answer: CAPTAIN CRUNCH
  15. This man developed one of the most popular programming languages in the world while at Bell Labs. Who is he?
    Answer: BJARNE STROUSTRUP
  16. What is the long-time motto of IBM, coined by former company President Thomas J. Watson, and the source of the name of one of their most popular lines of computers?
    Answer: THINK
  17. Name the multi-platinum musician who reportedly (perhaps apocryphally?) was involved in writing the music for Sonic the Hedgehog 3. He was never officially credited.
    Answer: MICHAEL JACKSON
  18. In 1976, Kenneth Appel and Wolfgang Haken published the first ever computer-assisted mathematical proof. What did they prove?
    Answer: FOUR COLOR THEOREM
  19. Long before the rise of pastafarianism, James Parry was the central figure/deity of a popular online parody religion. What was it called?
    Answer: KIBOLOGY
  20. The acronym WIMP refers to what four main concepts used in almost all graphical user interfaces?
    Answer: WINDOWS, ICONS, MENUS, POINTING DEVICE
  21. In January 1999, Apple made the iMac available in five different colors, all named after fruit. Name any three.
    Answer: BLUEBERRY, STRAWBERRY, TANGERINE, GRAPE, LIME
  22. The now-defunct LucasArts published more than a dozen graphical adventure games using the SCUMM language originally created during the development of -- and partly named after -- what seminal late-80s game?
    Answer: MANIAC MANSION
  23. What is the last name of the famous Linus being asked about the pronunciation of his name in this clip?
    Answer: TORVALDS
  24. A human interrogator has a written conversation with each of two players -- one of which is a computer program. If the interrogator is unable to determine which is human and which is artificial, the program is said to have passed what test, named after the computer scientist who proposed it in 1950?
    Answer: TURING TEST
  25. The keyboard pictured was designed to be used to write in what IBM-created programming language whose specialty is concise array manipulation?
    Answer: APL
  26. Although virtually all modern computers store data in binary, ENIAC famously did not. In what base did its ring counters store numbers?
    Answer: DECIMAL (10)
  27. This is a screenshot from what classic educational computer game?
    Answer: OREGON TRAIL
  28. Fill in the blank in this 1997 quote from famed developer Jamie Zawinski: "Some people, when confronted with a problem, think 'I know, I'll use ___________.' Now they have two problems."
    Answer: REGULAR EXPRESSIONS
  29. Dirichlet's box principle, roughly stated as: "If you try to put n+1 items in n buckets, at least one bucket must have more than one item" is more commonly named after the roosting places of what bird?
    Answer: PIGEON
  30. What was the first .com domain ever registered?
    Answer: SYMBOLICS.COM
  31. What were the following programs used for: Wildcat!, Renegade, WWIV, Maximus.
    Answer: BULLETIN BOARD SYSTEMS
  32. The computer Deep Blue became, in 1997, the first computer to ever defeat the reigning chess world champion by beating whom?
    Answer: GARRY KASPAROV
  33. Name the commercial hardware manufacturer that was founded by Leonard Bosack and Sandy Lerner in 1984. Its name derives from the city in which it was founded, and its logo represents the most recognizeable structure in that city.
    Answer: CISCO
  34. According to popular legend, in 1983, Atari buried millions of copies of what flopped game in Alamagordo, New Mexico, and covered them with concrete?
    Answer: E.T.
  35. What early 1990s handheld device is satirized in this image from the TV show The Simpsons?
    Answer: APPLE NEWTON
  36. In January 2013, what image format became the 2nd most popular on the Internet, when it overtook GIF?
    Answer: PNG
  37. It's a UNIX system! I know this! Lex Murphy saves the day in Jurassic Park with a silly looking (but real!) experimental file manager that shipped with a major flavor of Unix. Name the file manager OR the operating system it shipped with.
    Answer: FSN, IRIX
  38. Despite the brand name, the laser used to read Blu-Ray discs, with a wavelength of 405 nanometers, is technically what color?
    Answer: VIOLET
  39. The latest major version of HTML (which, despite being in wide use has still not been officially finalized) adds integrated video, sound, vector graphics, and improves the semantic meaning of websites. What is its version number?
    Answer: 5
  40. Fill in the blank in the title of the famed 1968 journal article by Edsger Dijkstra: "______ Statement Considered Harmful".
    Answer: GO TO
  41. On July 1, Google will be shutting down its Reader service, which was a news aggregation tool that was able to read either of two similar news feed technologies. Name either one.
    Answer: RSS, ATOM
  42. What word is used to describe a function which calls itself? The same word is used to describe acronyms that refer to themselves (e.g.: PHP, GNU, or WINE).
    Answer: RECURSIVE
  43. Identify the sort algorithm represented by this pseudocode.
    Answer: INSERTION SORT
  44. The QWERTY keyboard layout is essentially ubiquitous in English-speaking countries. The mostly similar AZERTY layout is used by most speakers of what language?
    Answer: FRENCH, LITHUANIAN
  45. Micro-Soft was founded by Paul Allen and Bill Gates to create BASIC interpreters for this microcomputer. Name it.
    Answer: ALTAIR 8800
  46. In the 1980s, the Internet had seven generic top-level domains: .com, .edu, .gov, .int, .mil, .net, and .org. Since then, 14 more have been added. Name any three.
    Answer: BIZ, INFO, NAME, PRO, AERO, COOP, MUSEUM, ASIA, CAT, JOBS, MOBI, TEL, TRAVEL, XXX
  47. The B and A in BASIC stand for “Beginners All-Purpose”. What does the rest (“SIC”) stand for?
    Answer: SYMBOLIC INSTRUCTION CODE
  48. As of June 1, 2013, what was the largest technology company in the world, by market capitalization?
    Answer: APPLE
  49. Server racks have been standardized in 1.75-inch horizontal slices called rack units (or U); a server that takes up four of these slices is called '4U'. How many U are in a typical full-height rack?
    Answer: 42
  50. The most repeated interpretation of Moore's Law is that microchip performance will double every 18 months, but that isn't what Gordon Moore observed in 1965. His original observation was that every two years, what other measurement of microchip progress would double?
    Answer: NUMBER OF TRANSISTORS
  51. In the movie Office Space, Michael Bolton becomes enraged at a printer for giving him what opaque error message?
    Answer: PC LOAD LETTER
  52. In 2003, the web browser then known as "Phoenix" started a controversy when it changed its name to that of another open source project. To end the conflict, less than a year later, it was renamed Firefox. What was the short-lived and controversial name?
    Answer: FIREBIRD
  53. Name the now-famous video game character who debuted in 1981 as a carpenter named Jumpman.
    Answer: MARIO
  54. The word "pixel" is a shortening of what two-word phrase?
    Answer: PICTURE ELEMENT
  55. CmdrTaco and Hemos are the founders of what pioneering technology news website?
    Answer: SLASHDOT
  56. What 1982 Science Fiction movie was not nominated for an Academy Award for Special Effects (despite their extensive use) because, in the words of the film's director, "The Academy thought we cheated by using computers"?
    Answer: TRON
  57. The OSI model of networking describes a standardized way of separating the functions of a communication system into a set of abstract layers, from "physical" at the bottom to "application" at the top. How many layers does the OSI model have?
    Answer: 7
  58. What color does the hex triplet #FF0000 correspond to?
    Answer: RED
  59. 16-pin DIPs, 72-pin SIMMs, and 168-pin DIMMs are all form factors of what vital computer component?
    Answer: RAM
  60. A CPU has a very small amount of storage available (typically a couple of dozen locations of a few bytes each). Almost all processing consists of copying values from memory into this storage, performing a mathematical operation, and then copying it back to memory. What are these storage locations called?
    Answer: REGISTERS
  61. Pictured are the three different sizes of floppy disks manufactured, named after their respective sizes. Name the sizes.
    Answer: 8, 5 ¼, 3 ½
  62. The multimedia container format MKV can hold an unlimited number of video, audio, and subtitle tracks in a single file. Its name, fittingly, comes from what traditional Russian toy?
    Answer: MATRYOSHKA DOLL
  63. A CIDR netmask of /16 is equivalent to what network address class?
    Answer: B
  64. What fictional unit of data did the writers of Star Trek invent in response to worries that any real terms (like bit or byte) they used would eventually become obsolete?
    Answer: QUAD
  65. How many rows of punches were on the most widely used IBM 80-column punch cards (including the zone punches)?
    Answer: 12
  66. No matter how good you are at Pac-Man, it's impossible to beat the 256th screen. Dig Dug and Donkey Kong also famously contain similar bugs that prevent a game from extending indefinitely. What are these kinds of bugs called?
    Answer: KILL SCREEN
  67. Some modern programming languages (including Perl, Ruby, PHP, shell scripting, XSLT, and Transact-SQL) have a symbol preceding or following variable names, often different symbols for different variable types. What are these symbols called?
    Answer: SIGILS
  68. The terms "big-endian" and "little-endian" in the context of computing indicate the direction that binary numbers are stored in. The terms were coined as a deliberate reference to what 18th century novel?
    Answer: GULLIVER'S TRAVELS
  69. In the movie War Games, the computer at NORAD is called Joshua by its creator. What was the computer's proper name (as written on its chassis)?
    Answer: WOPR
  70. The IEEE 1394 interface, developed primarily by Apple but widely available on PCs and used largely for digital audio and video equipment, is more commonly known as what?
    Answer: FIREWIRE
  71. What operations can users who are not the file's owner perform on a file on a Unix-like operating system with permissions set to 700?
    Answer: NONE
  72. Name the popular PC first-person shooter released in 1999 that contained this notoriously super-optimized inverse-square-root function in its source code.
    Answer: QUAKE III
  73. On October 29, 1969, the first message was sent on ARPANET (the network which eventually became the Internet). What was that message?
    Answer: LO
  74. Douglas Englebart invented the first mouse in 1963 at Stanford. It had only one button, and was made out of what material?
    Answer: WOOD
  75. Fill in the missing two-word descriptor: IEEE Standard for _________ Arithmetic defines a format for storing certain values in memory. The format includes three parts: a sign, a significand (or mantissa), and an exponent.
    Answer: FLOATING POINT
  76. What was the name of the modification released for Grand Theft Auto: San Andreas revealing sex scenes previously hidden in the game, leading to a minor uproar and the recall of the game?
    Answer: HOT COFFEE
  77. There are four common ways to traverse a tree data structure. One is breadth-first. The others are all variations on a depth-first search. Name all three.
    Answer: IN-ORDER, PRE-ORDER, POST-ORDER
  78. Identify the specific pictured implementation of loop unrolling, named after the man who first posted it to Usenet in 1983.
    Answer: DUFF'S DEVICE
  79. On April Fools Day in 2001, the heads of the Perl and Python projects released a prank announcement that the two languages would be merged. The proposed name has been since adopted by a Free Software tool that allows languages (not just those two) to inter-operate smoothly and efficiently. What is it called?
    Answer: PARROT
  80. What was the first commercially-sold video game, which pre-dated Pong by a full year?
    Answer: COMPUTER SPACE

March madness bracket

Assumptions:

  • The quality of a basketball team, at the highest levels, depends more on the the ability of players to work together than their innate skill.
  • The ability of players to work together is roughly proportional to the amount of time they spend practicing together.
  • Competitive basketball is largely -- and in fact was purposely invented to be -- an indoor game.
  • Players are more likely to spend more time playing an indoor game when the weather outside is worse.
  • The perception of "bad" outdoor weather is roughly proportional to the temperature difference between summer and winter.

Therefore, if we took a list of all of the colleges in the NCAA college basketball bracket, established the August (start of the school year, usually warmest month of the year) and March (during March Madness and close to the coldest month of the year) average temperatures, we’d be able to fill in a bracket that would be as accurate (to a close approximation) as if we actually knew anything about college basketball. (As a tie-breaker, I’m using the school with the colder temperatures. If I need another tie-breaker, I’m picking arbitrarily.)

So that’s what I’ve done. Here is the raw data, and here is my bracket. (Yes, this is almost completely tongue-in-cheek.)


I cancelled my MLB.TV

For the past two years, I’ve subscribed to MLB.TV. It allowed me to stream baseball games to my computer and my TV, and was a way better value proposition than getting the expensive cable package that would have provided me with NESN (the Red Sox’s local network). But I will not be subscribing for the 2013 season. It’s not because I’m no longer a Red Sox fan. It’s not because I’m not interested in watching their games. It’s because I’m sick of jumping through hoops to avoid their stupid blackout restrictions. If I was a Phillies fan, I could watch all of their games (except when they were playing the Red Sox). If I was a Red Sox fan from California, I’d be fine, too (unless the Sox were visiting the Giants or some such).

But because I live in the Red Sox’s “home television territory”, I’m unable to watch any of their games, both at home and away, without resorting to using proxies. Paying nearly a hundred dollars a year for the right to not get to watch any of the games I care about is very stupid. These are based on ancient cable contracts, I’m certain, but MLB has the upper hand in these negotiations. Are the networks really going to say “nevermind, we won’t show your games” if MLB insists on allowing paying customers to watch even local games online?

Until Major League Baseball joins us in the 21st century with their blackout restrictions, I’m not going to be paying for MLB.TV anymore. I’ll just have to enjoy the game at a bar, where Major League Baseball will get none of my dollars.


Where should I put my Internets?

For the past six months or so, I’ve been wrestling with where to put all of my Internet content. I create various things from time to time, and I like them being available and visible (and in many cases, open for modification and redistribution, a la MIT license or Creative Commons). But I’m at the point where many of the services I’ve used for a long time are no longer doing it for me.

  • Photos: For the past six years, I've posted pictures on Flickr. The platform has been left to decay ever since Yahoo bought it, and a lot of their user base has left. The recent iPhone app upgrade is probably too little and too late. (Especially since I'm not an iPhone person.) I've experimented with some other services, including Instagram, but none seem quite as open, simple, and powerful as Flickr was (and still is).
  • Programming projects: I've got a code page here that I assembled when I was looking for jobs. I've got a lot of Greasemonkey on UserScripts.org, but I think it's been abandoned (emails are bouncing and there have been no blog updates for 18 months), and it was never that great to begin with. What I'd like is something that's useful for both technical friends (navigate my code easily, like GitHub) and non-technical ones to (download UserScripts and play with some of the interactive things I've made).
  • Minor thoughts: Last month, I found that I'd read very little on Facebook that I cared about. I've taken a bit of time away, and realized I don't miss it that much. I'm still sorta active on Twitter, but as far as network effects, it's not nearly as powerful. I'm not sure what I want from this sort of social network, but I do know that Facebook had it. It's just too bad that the downside (uninteresting noise) of Facebook outweigh it. Perhaps the answer is just a friend list purge.

I’m no longer at the point in my life where I want to reinvent the wheel for any of these things. I want a simple solution that allows me to do what I’m interested in doing. (That’s apparently: taking pictures, writing small bits of code, complaining, and moving on.) Simplifying my blog back in the fall was one part of this struggle, but it was really just a tiny step.


A bunch of sort algorithms

Whenever I’m trying to get back into the swing of building and optimizing and evaluating algorithms, my first step is always to write a whole bunch of sorting implementations. I’m also trying to improve my knowledge of the core syntax of python. So here are four sorts in python: insertion, merge, heap, and quick. (The insertion and heap sort implementations are both in-place. The other two are not.)

The second step is probably going to be to implement a data structure I’ve never done before. Last time, it was a min-max heap in PHP. I’m thinking maybe a B-tree?

Update 3 Sept: Here is my implementation of a splay tree. Far simpler than I remembered, so I challenged myself to do it without parent links in the node objects.


Expected no-hitters

When Matt Cain threw a Perfect Game for the San Francisco Giants on Thursday, he became the fifth pitcher in the last four years to do so (no, Galarraga’s game doesn’t count). Perfect Games are also No-Hitters, and there have been a startling 22 no-hitters in the past six seasons (here I am including Halladay’s post-season no-hitter two years ago).

Since the end of the Steroid Era in baseball, pitching has been under a resurgence. Last year was called The Year Of The Strikeout by some, and this year is, so far, exceeding last year’s number. In addition, runs per game and hits per inning have been in decline for the past decade, too. But this isn’t just because batters aren’t hitting as hard or fielding has improved. Walks per inning, too, are at their lowest point in 20 years.

Improved pitching means a better chance of No-Hitters and Perfect Games. Does that explain it completely? Is the recent surge in pitching gems a coincidence – in which case we can expect the frequency to revert to the mean – or a result of improving pitching? I started collecting data to answer this question myself (which you can see after the break), but during the course of my research I found an article by Rebecca Sichel, Uri Carl and Bruce Bukiet titled Modeling Perfect Games and No-Hitters in Baseball.

Expected No-Hitters on Google Docs

Excerpts from my Kindergarten report card

The Cottage School, Boulder, CO. Spring 1986

  • "He sometimes has problems controlling his energy, yet is able to listen and follow directions well."
  • "Logan enjoys reading our Public Library books."
  • "Logan gets excited about doing art projects but seems to steer away from this area during free choice."
  • "He often tires about 11:30, feels puny and wants hugs. Lunch usually brings him out of this slightly torpid .. state."
  • "His biggest drawback is his tendency to desert one work for another, leaving a mess behind."
  • "Continues to be constantly curious and able to assimilate information with amazing ease."
  • "He has finally begun to respond to requests that he refrain from always blurting out the answers during group lessons."

Sound like anyone you know?


Planetary orbital foci

Planetary orbits are not perfectly circular; in fact, they are ellipses. An ellipse is a mathematical shape approximately equivalent to what is typically called an oval. An ellipse, though, meets some very specific criteria. One is that, unlike a circle, it has two foci instead of a single center. Where a circle is defined as the set of points whose distance to the center are some constant distance (the radius), an ellipse is the set of points whose distances to the two foci add to a constant. This allows you to construct an ellipse with some pins, some string, and a pencil.

So what are the two foci of planetary orbits? Well, one is the Sun. The other one? Just some random spot in space. And because each planet has a different size orbit with a different eccentricity (a measurement of how non-circular the orbit is), each planet has a non-Sun focus in a different place. Here is a Google doc spreadsheet with information on each planet’s orbit. A visualization after the jump.

Venus and Earth have very round orbits. Mercury’s is surprisingly un-round – nearly as eccentric as (although much smaller than) Pluto’s.


Cans of beer at Citizen's Bank Park

Earlier this year, Citizen’s Bank Park (the home of the Philadelphia Phillies) began selling several different brands of beer in 24-ounce tallboy cans. Canned beer (like boxed wine) has been on a resurgence in recent years, thanks to improvements in technology and some open-minded brewers. Harpoon Brewery started canning some summer beers a couple of years ago, but now they are spending more than a million dollars to add canning machinery to their main brewery in Boston.

Canned beer at a ballpark, however, is a good idea in almost every single sense I can think of:

  • Since the beers don't have to be poured, there's no spillage and no foam to pour off, which means essentially zero waste.
  • They get cold faster than bottles.
  • The non-beer weight of these cans is far less than that of kegs and carbonation systems, which means less wasted delivery cost.
  • Lines will be shorter since all the person behind the counter has to do is pull a can out of the fridge and open it (and they did tests -- opened cans don't fly as far as opened plastic bottles). They'll also be shorter since the cans are bigger than cups -- people won't head back for more as often.
  • Aluminum is just about the most efficient thing to recycle: only about 5% of the energy required for non-recycled aluminum
  • You don't have to potentially toss any extra (like you have to do with kegs). This means that the park could carry a wider variety of beers and not have to worry about what to do with the unsold cans of the less popular brands.

And there’s just something about drinking a cold beer out of a can that says “summer” more than a bottle or a cup.

Here’s a list of what beer is available where in the park. Most everywhere has cans of Stella Artois and Yuengling, two very good lagers. I’m not sure if the Oskar Blues and Sierra Nevada brands are in the tallboys or if they’re only available in normal 12-ounce cans. I will investigate when I’m at the game against the Red Sox this coming Saturday, and report back.

Update, 21 May: The 24-ounce cans are pretty much only available in Yuengling Lager, and we only found them on the lower level. Most of the other types of beer are in more-typical 16-ounce cans (500mL in the case of Stella Artois). Still: great selection, decent price, all the above points about convenience still stand.


Bread puns

Submitted for your approval, a thread from the non-work mailing list at Wayfair, replete with bread puns:

  • This thread is now about bread. How about a NAANwork thread.
  • It was already PAIN-ful.
  • I hope they don’t banh mi for this.
  • This thread is fal-awful
  • Alright, I think you guys have taken this farl enough.
  • You’re probably rye.
  • We’re on a roll!
  • Injera glad I didn’t say bread!?
  • I’m at my wheat’s end!
  • You guys got muffin left?
  • Maybe everyone injera-ed themselves trying to come up with more puns. (..later..) Oh, man, someone already did injera. Boy do I feel like a sconehead.
  • At yeast its finally over
  • A toast to the end of this thread
  • Best WRAP this one up
  • I agree. It’s time to leave it a-scone and get back to work.
  • You all knead to wrap this up, quit loaf’n and get back to work

Choosing random keys

Say you had code that generated random keys. These random keys were 6 letters long, all caps, with no duplicates. Here’s a few, as an example:

NTCYARDHIEWMINBVTXIOELUC
RKNBJXGKRANBDRYVQUYIFKTS
VAUPSGALWPOSCERSUYWAHJVM
MTXJSZRNLFXZVFIEXTVEOKIH

What are the chances that the key that you generate will be in alphabetical order? For instance, above, there’s only one in alphabetical order (CERSUY, in bold) And then, if you think you have that, generalize: For any string of length k distinct characters chosen from a set of n, what are the chances that they will be in order? My answer after the break.

I spent several minutes trying to solve this the straightforward way. You only have 21 choices for the first letter, because if it’s anything after U, there’s no way to have five more letters that come after it. Then for the second letter, you have 22-a1 (where a1 is the index of the first letter) choices. For instance, if the first letter was E, you have only 22-5, or 17 choices – namely anything between F and V. After going through all six letters, you end up with this ungainly thing:

[21 (22-a_{1}) (23-a_{2}) (24-a_{3}) (25-a_{4}) (26-a_{5})]/n!

It’s probably possible to simplify that somewhat by looking at reductive cases – you can model a two-letter key as a grid of allowed possibilities, but even that would get pretty challenging pretty quickly. If you look at it from another direction, however, things get much easier. Consider a single key, let’s say “NTCYAR” (the first in the table above). How many possible permutations of that key are there? Simple: 65432*1, or 6!. Of those, how many of them are in alphabetical order? Even simpler: 1 (ACNRTY). In fact, this is true for any set of six letters you choose – you could have picked those same letters in any of 6! possible orderings, and only one is in alphabetical order. So there you go. Your answer is:

1/6! = 1/720 = 0.138%

The interesting thing? The probability doesn’t depend on the length of your alphabet, only on the length of the key. The generalized probability is simply:

1/k!