Thursday, July 26, 2012

A great experience with CenturyLink

I've read many horror stories on The Consumerist about customer experiences with ISPs, in particular Verizon and Comcast. I've not read any about Qwest/CenturyLink, though I am sure they exist. In my case, however, they exceeded all my (low) expectations.

I started running a backup server at my apartment for my Moonlit Consulting clients. For this to work, I needed faster speeds than 1.5 Mbps down / 768 Kbps up. So I called CenturyLink.

First, CenturyLink surprised me with how reasonable their rates are. While I was paying $40/mo for the aforementioned slow speeds, they actually offer 7 Mbps down / 5 Mbps up—a five-fold upgrade—for only $10/mo more. So I signed up.

Second, CenturyLink offers the choice of buying or renting the modem. While some companies (cable companies in particular) require customers to rent the equipment, CenturyLink offers the modem for only $100—comparable to retail prices, without the huge markup I was expecting. So I bought it.

Third, the provisioning went without a hitch. My modem shipped on time, I received it a day sooner than promised, and my new speeds went into effect before I even woke up on the day promised.

Last, the actual speed is even better than advertised, as checked with Speedtest.

Thanks, CenturyLink. That's the way to make lifelong customers!

Saturday, July 21, 2012

A naming overhaul

In my lifetime, I expect us to overhaul the way we refer to people, at least in writing. In a book I am reading, I just read the following sentence and laughed:
Michael Jackson has developed a systematic theory of requirements called "problem frames" that explains how to structure and reason about software development problems that involve interaction between a system and its environment.
Michael Jackson must've developed this theory between his album Dangerous and becoming busy with his child abuse allegations.

Unless it's not the same Michael, son-of-Jack.

But surely there cannot be two of those... Granted, there are many Michaels, but the author of the book disambiguated him for us by clarifying he's Jack's son!

The current naming scheme doesn't appear to be sustainable. Or rather it is, but for only shallow and trivial tasks.
  • "Michael, want to go to the movies?" as asked by a friend — sustainable.
  • "Michael Jackson, are you present in the classroom?" — sustainable.
  • "Michael Jackson needs to start receiving social security benefits." — not sustainable. Google search results are eclipsed by the artist, not the researcher.
Heck, there are two Philip Whites at my company. Both of us have one L in our first name. Our middle initials are different, thankfully, but we still get each other's mail, email, and instant messages.

And with inevitable globalization, the number of people we know of and who might share someone else's name continues to rise.

The Social Security Administration (and every other organization that conducts business) have known about this problem for a long time. That's why we have a slew of identification numbers: a Social Security number, a driver license number, a passport number, a university / school ID number, an employee ID number, etc. Is that our future? Is a book from 2033 going to read, "Michael Jackson, SSN# 142234221, has developed..."?

I believe the most likely outcome to be short URLs. A URL can point at a social media page like my Facebook or Google+ profile, or at a personal homepage (like mine). My homepage disambiguates me from other Philip Whites, links to my profiles on social media sites, and lets the reader contact me. It's an extended version of a business card.

The ideal solution might be a service similar to tinyurl, specializing in mapping IDs to a URL of the user's choice, and allowing the owner to change the URL at any time. (The equivalent of a CNAME in DNS.) If a responsible, long-term company starts this, we could include those IDs alongside a name. Its owner would choose whether to send visitors to the owner's homepage, or to a Facebook profile, or wherever else.

Friday, July 20, 2012

Wiping gym equipment

At the gym, there's a social contract that once you're done with a machine, you're supposed to wipe it down with a towel and a disinfectant solution.

I'd love it if this social contract disappeared.

All else being equal, it would be exactly the same amount of work for a person to clean a machine just before using it, rather than just after. But there are additional benefits from cleaning the machine before using it.

For one, you would not be counting on the stranger who came before you to have fulfilled his part. Plenty of people forget or don't bother to clean their machines. Now to be sure, you have to clean your machine twice: once before, once after your workout.

Second, some people (including me) do not care whether a machine is cleaned ahead of time. I don't think U-Iowa students are all that disgusting; a little sweat (which has evaporated a long time ago anyway) has never hurt anyone. (Has it?) So, the stranger who came before me wasted his or her time.

Third, some people want to switch off with you between your sets. Then there's the scripted exchange where I get the spray bottle and make like I'm about to spray the machine, and the person generously stops me and saves me the effort, implying "Don't be silly, stranger! What's a little sweat between kindred spirits who've chosen the same machine at the same time?"

Fourth, there's just something a little too pious about thoroughly spraying down a machine after yourself. If you feel the machine needs ten sprays from the bottle after your set, please stay home until the contagion passes.

Maybe Niles Crane was onto something after all.

Thursday, July 19, 2012

The many ways of programming Arduino

Arduino is arguably the most popular portable hardware development platform of the year. It's never been easier to create your own little device that scratches an itch. (Perhaps literally.) From controlling the temperature of a beer keg to unlocking your front door after a correct knock sequence, Arduino makes it possible, and best of all, cheap.

At its core, the Arduino platform offers reading analog data (0–5V) such as a temperature reading, reading and writing digital data (0 or 5V), pulse-width modulation for motors and such, and memory for your program. In essence, a typical Arduino program reads a pin (whether digital or analog), compares it to some value or a range, and writes some values to some other pins. Then repeat.

For example, suppose you have a mini-fridge that cools to 40°F, but you need to maintain 50°F, and the temperature dial doesn't go that high. (Problem courtesy of Jeremy.) Arduino to the rescue. Use the Arduino to combine a temperature sensor with a powerswitch. At a high level, your program would read the temperature from an analog pin (or a digital pin for a digital temperature sensor), then decide: if current temperature is below 48°, cut the AC power to the fridge by sending 0V to the pin that controls your powerswitch. Else, if the temperature is above 52°, re-enable the power by sending 5V. (Or whatever the manual for the powerswitch says to do.) Voila.

The programming tools I describe below support these basic operations like reading and writing pins. These operations appear either as functions or graphical "blocks" within the tool/language. So once you come up with the basic logic of what you want the Arduino to do, you can pretty much use any of these tools. The differences in the tools revolve around the programming methodology, strengths/weaknesses, and cost.
  1. Using Wiring, the official language of Arduino. It's basically C++. You can write this code in the official Arduino IDE.
  2. Using the QP Framework + QM modeler. Here, you design your software using UML Statecharts, then autogenerate code from that. It is free for non-commercial use, and surprisingly reasonably-priced for commercial use.
  3. Using the combination of LabVIEW and LabVIEW Interface for Arduino (LIFA). LabVIEW is a rather expensive ($1,200–4,500 for a single perpetual license) graphical development environment, and LIFA is a free add-on. The students in my Hardware/Systems course this summer used this programming method to develop fun Arduino projects.
  4. Using Simulink, a very expensive ($3,150, or $5,250 with MATLAB) graphical development environment.
Wiring is the most straightforward way to program your Arduino, if you have at least some experience with imperative programming. It's also the most "portable" way in that you can publish your code, and others can use it without any investment in tools.

The QP/QM method is my personal favorite. I am a big fan of software design, and I love having the implementation naturally flow out of the design. QP/QM, as I wrote earlier, makes it easy to develop complex yet maintainable and reliable software. Its reasonable price also makes it easy to move your hobby into commercial production. But, in my humble opinion QP/QM has a higher learning curve than the other methods I describe.

LabVIEW is a good introduction to programming. Its graphical ways are less intimidating than text-based programming. You have two screens, a front panel and a block diagram. The front panel has UI elements, and the block diagram expresses business logic. The business logic involves blocks, and wires that connect them. Data flows from one block to another. Blocks are either UI elements (source or sink) or programming constructs (such as arithmetic or Arduino commands). This approach makes two very important things easy:
  1. A versatile graphical user interface. More generally, it ingrains the separation of GUI and business logic.
  2. Understanding types, and type safety. (Thanks to wires and blocks of different colors.)
For a non-programmer, or a casual programmer, I believe LabVIEW offers the best mix of power and friendliness. My students this year, having no prior programming/robotics experience, developed some pretty impressive programs. The downside of LabVIEW, as I already mentioned, is pretty significant: the Arduino must be tethered to the PC at all times, since that's the only way to run LabVIEW programs on the Arduino.

I created a one-page LabVIEW Quick Start to help my students and anyone else who's exploring this route.

Finally, Simulink. I have not yet used this method of programming an Arduino. Simulink offers a similar graphical environment, with blocks and wires, except there is no user interface—only the equivalent of LabVIEW's "block diagram" for business logic. This is offset by the advantage that Simulink is able to deploy native code to the Arduino, so you can disconnect from the PC and run your Arduino on battery or AC power.

That's the overview of all the ways I know to program an Arduino device. If after reading the above you're still unsure which method to choose, here's a brief summary:
  • Are you already a programmer, or do you want to become one? If yes, start with Wiring and migrate to QP/QM once you feel comfortable.
  • Is a graphical user interface important for you? If so, use LabVIEW.
  • Do you need your Arduino to run standalone on battery or AC power? Use anything but LabVIEW.
  • Do you have money to burn? I mean, are you doing math more complex than I can think of a use for—on your Arduino? Use Simulink. (In all seriousness, I am not a Simulink user. If you know where Simulink outshines the alternatives, please comment here.)
Have fun!

That Moment™

That moment when you realize that it's not a valid sentence.

Tuesday, July 17, 2012

Friends of a Certain Age

I really appreciate this article: Friends of a Certain Age: Why Is It Hard to Make Friends Over 30?

It matches my experience. I had several "best friends," but these days it's more difficult. I have many acquaintances, but I no longer have people in my life that I have a tight bond with.

Monday, July 16, 2012

McDonalds sausage

Damn the English language. At McDonalds, I accidentally ordered a "sausage burrito and biscuit" instead of the more correct "sausage burrito and sausage biscuit." I ended up with a plain biscuit.

The sausage biscuit costs $1.00. Turns out, the plain biscuit costs $1.19. McDonalds pays you 19 cents to eat their sausage.