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.

Gym challenge

Sue and I are leaving for the west coast in two and a half weeks. (edit: For a vacation, not permanently.) Between now and then, I've made a vow to go to the gym every day.

Vows don't tend to work for me, but this one's different: it has a definite end date.

For posterity, here are my current machine settings, at three sets of 10 reps:
  • Pull-up assist: 50 lbs
  • Dip assist: 40 lbs
  • Pec fly: 65 lbs
  • Lateral raise: 50 lbs
  • Elliptical: level 1, 1.3 mi in 15 min

These used to be much better when I had a routine in college. Andreas and I would go to the gym twice or thrice a week. The biggest difference, as I recall, was that I was able to do 30 pull-ups and dips without any assist. Andreas and I also got to the point where we could do 100 push-ups in sets of 10. I miss those days.

I am not going to waste time on leg exercises because my legs for some reason have always been sufficiently developed. I can do hip adduction at 150 lbs and abduction at about 130 lbs, and that's good enough for me.

I'll post my new machine settings on the last day of this challenge.

Wednesday, July 11, 2012

Whisky

I like everything about whisky other than its taste and smell.

Does this mean I am not refined?

Monday, July 9, 2012

I am excited about Windows 8

I agree with the most recent Coding Horror article: Windows 8 is the most exciting and revolutionary version of Windows since Windows 95.

As a programmer, I am excited all the more. Microsoft has made real strides and innovations in the ease and flexibility of developing for Windows (from .NET to Expression Blend), and developing a Windows Metro app is on my to-do list.

For an IT professional, the list of Windows 8's New and Improved Features is likewise very impressive.

And at the price of $40 to upgrade from as far back as Windows XP (now 11 years old!), it should be a no-brainer.

Will you upgrade? If not, what's holding you back?

A great blender is a thing to behold

After over a year of mulling it over, I bought an expensive blender yesterday.

Since then, I used it no less than 10 times with spectacular results. Fruit smoothies come out great, and cashew butter is surprisingly delicious.

A recipe I made today, for posterity:
  • a leaf of kale;
  • red grapes;
  • three clementines;
  • two cups spinach;
  • two tablespoons honey;
  • water.
It ended up very creamy, with almost a stout-like head, yet delightfully light! The sweetness was just enough to enjoy it, and the taste was more complex than regular fruit smoothies. I could taste the greens without being overwhelmed by them. I downed three full glasses of this smoothie.

The fridge now has a bunch of fruits and veggies, all ready for blending. I'd love to consume enough to buy them from Costco without waste.

I am excited about the possibilities!

Sunday, July 8, 2012

Costco: a more discriminating Sam's Club

A new Costco opened in Coralville this month. I am a long-time member of Sam's Club (ever since my dad added me to his membership while I was in high school), so of course I wanted to check out Costco and compare. I went today.

I was really impressed with Costco. Impressed enough to get a membership. I will most likely let my Sam's Club membership lapse.

When I arrived, my mind was blown by indoor parking. Imagine it: you drive into a giant warehouse with nothing but a parking lot. The parking lot was thoughtfully designed such that you can fit the shopping cart between any adjacent cars, as well as in that no-man's-land between cars facing each other. What luxury this is when it's raining or snowing! (Or hot enough to melt your face, like in the last two weeks.)

The store is likewise huge -- bigger than Sam's Club, and packed with customers. I felt like an Iowan in NYC: stopping, gawking, sensory overload.

The biggest benefit to Costco that I see is that it caters to vegetarians and fans of organic foods a lot more than Sam's Club. At the latter, I cannot think of a single "organic" food for sale. Whereas at the former, a surprisingly large number of foods is organic, including eggs, rice and almond milks, produce, prepackaged foods, etc. And vegetarian prepackaged foods are aplenty! Dips and hummus, vegetarian pizza, vegetarian spring rolls, and on and on.

The fresh produce section is larger than at Sam's, too. Here, fresh produce is actually in a walk-in refrigerator. The doorway blows freezing air to keep heat out, and once you're in, all you think about is grabbing what you need and jumping out. Some package sizes for your reference: strawberries in 4 lb packages, spinach in a 2 lb package, carrots in a 10 lb bag, or organic baby carrots in a 5 lb bag for the same price as the former.

Costco is more discriminating for meat eaters too. Sam's has only USDA Choice meats, whereas Costco carries a range including USDA Prime.

All in all, I am thrilled that Iowa City / Coralville is a large enough market for stores like Costco. I plan to make the most of my shiny new membership!

If you're familiar with Costco, what are you favorite finds there?

Saturday, July 7, 2012

Large downloads are still unreliable

It's 2012. Yet large downloads are still hit-and-miss.

Most of the time, in my experience, Firefox's built-in download manager is unable to resume a partially downloaded file. It simply restarts the download. On Linux (and Cygwin), wget and curl allow reliable resumption of a download, but on Windows there's no built-in reliable way!

BitTorrent solves this problem (and many other problems) beautifully, but some companies that offer CD and DVD images still don't provide them via BitTorrent! BitTorrent has been out (and immediately popular) since 2001. What's the deal?

If you're going to offer a large download, please make it available via BitTorrent. It works great for Linux distributions and LibreOffice.

Friday, July 6, 2012

Sunday, July 1, 2012

Can and bottle deposits

Sometimes an idea might be good in theory, but the way it's implemented ruins it. Let me tell you about can and bottle deposits in Iowa.

When I moved to Iowa, I learned that stores charge you 5¢ per can or bottle they sell you as a "deposit". Then if you bring them back, you get the deposit back. In fact, many stores have machines that take your cans and bottles and give you a ticket you can redeem for cash in the store.

I didn't mind. I thought it's a decent social program to help keep bottles and cans out of the landfill.

But over time, I learned the darker side of it.
  1. Not all cans and bottles are eligible. Cans and bottles that store non-carbonated beverages (like iced tea and water) are exempt. Alcohol containers are an exception to the exemption -- there's a deposit on those.
  2. You may receive a refund only for cans and bottles that you bought in that state. Michigan pays out 10¢ per can, but it's illegal for an Iowan to try to submit cans and bottles there. Michigan checks ID.
  3. Cans and bottles must be rinsed, dry, and undamaged to receive a refund. If a can is too damaged, it won't go through the machine. This is ironic considering as soon as the machine accepts your can, it crushes it.
  4. Stores put their can/bottle sorting machines into a separate room. That's where you must go to submit your cans and bottles for deposit refund. These rooms are the most disgusting place I've ever been in. Imagine a slaughterhouse, complete with the wall of stench and blood-soaked floor. Except here the stench is from spoiled and warm wine and beer, lazily evaporating from the floor. The floor appears never mopped, and my shoes stick. After sorting through dozens of cans and bottles, my hands are sticky, and there's no faucet.
  5. The onus of returning the deposit is on the store that sold you the product. A store is obligated to take back only items that it carries. It's not uncommon for half of my cans and bottles to be "unauthorized at this location" when I take them to a store. When this happens, I must take the rejects to the customer service counter and have an employee count them and sort them manually.
  6. Walking in with two large garbage bags of cans and bottles, I walk out with a grand total of $3.60. That's three dollars and sixty cents.
  7. From the store's perspective, the expense of managing this program seems to outweigh the benefit. The slaughterhouse room is constantly staffed by someone responsible for unjamming sorting machines and emptying them. (A candidate for Dirtiest Jobs?) The store's customer service also has to spend its time on people bringing in their recycling. A portion of the customer service counter is dedicated to cans and bottles, and there are giant bags of cans and bottles behind the counter.
Given all this, I've decided to not bother trying to get my deposit back. Of course, that's what the state is counting on anyway. The harder the state makes it for people to get their deposit back, the more money they keep. So let's call it what it is: a tax.

If you're an Iowan, I hope you agree with me that Iowa's deposit system is very flawed and should be either improved or scrapped entirely. I prefer to scrap it.