iPhone Sample Code: Tiles

As an exercise in using the Core Animation API, I've implemented a little iPhone app that reproduces the behavior of the iPhone home screen's icon reorganization interface. (You know, dragging the wiggly icons around.) You can download my sample code to see how it works. Some descriptions of the highlights follow below.

Thoughts on the iPad

I like the iPad. A few friends and acquaintances accuse me of being stupid and easily fascinated by sparkly objects. Rather than have the same argument over and over again, I'm writing all my thoughts and predictions here. I will speak no further on the subject until I actually own an iPad.

Whenever I am on my couch at home, I have a laptop computer with me. I browse the web while my wife watches her girly TV shows. I pay bills. I deal with email. I go to IMDB to figure out where I've seen that actor before. I get directions to wherever we're going. I write blog posts.

Maybe there is something wrong with me, but I've grown dependent on having that electronic link with the world at arm's reach. Even in bed, I often have my laptop with me, so that I can read or watch a video when insomnia strikes.

But the laptop is not ideal for the job. I don't like having a hot, heavy, vibrating hunk of metal in my lap. I don't like the fan noise. I don't like the need to open it when I want it and close it when putting it aside. I don't like backing up the humongous hard drive. A trackpad is not a good substitute for a mouse. I don't like the need to memorize all the shortcut keys to be productive without a mouse. I don't like it when the dogs walk over the keyboard and mess things up.

More and more, I reach for my iPhone instead of my laptop, but the iPhone's tiny display has obvious limitations.

So, an iPad would fill a real need for me (using a First World definition of need). It looks like a tool that will let me browse the web, read, watch video, etc., without all the unnecessary clunkiness of a laptop. Believe it or not, I wanted something like this before Lord Jobs told me I wanted it.

If you don' t have that need, fine. I'm not trying to sell you anything. I'm just explaining why I would like to have an iPad, or something like it. (And there is currently nothing else like it.)

I believe a lot of other people will want one too. There are people like me who want the couch/bed experience. Anyone who has tried to use a laptop on an airplane will appreciate how much better the iPad would be for that situation. There will be people who want to take something to school, the library, or the coffee shop without lugging a laptop case around. The iPad will be a much better notebook than a "notebook computer".

For many people, an iPad will not be a good product. If you do a lot of writing and editing of text, iPad probably won't be a great thing. If you want to quickly switch among multiple applications, iPad probably won't be a great thing. If you need Microsoft Office or Photoshop or some other specific desktop application, iPad probably won't be a great thing. If you don't have a few hundred dollars of disposable income, iPad probably won't be a great thing. But that's OK—nobody is requiring you to replace your laptop with an iPad.

An iPad won't do everything a laptop does. It's not supposed to do everything a laptop does. The relationship between iPad and laptop is similar to the relationship between a microwave oven and a set of pots, pans, and cooking utensils. The pots, pans, and cooking utensils can produce more satisfying meals than the microwave can, but often you just don't want to drag all that stuff out and clean up afterward. A microwave is a good complement to a well-equipped kitchen.

Remember back when all of our moms and grandparents suddenly started buying computers? It was because they wanted to use the web and e-mail. That's still all that most of them do. They don't care about multi-tasking or writing their own software or enterprise integration. They shouldn't have had to learn the differences between left-click and right-click and double-click and control-click and shift-click. The iPad is what they needed back then. The iPad is what the original Mac was, thirty years later.

There is a lot I don't like about the iPad (What? The ultimate fanboy has criticisms?). Apple's locked-down control of the platform is definitely a problem. The iPad doesn't support a lot of functionality that it obviously should (multitasking, use of network printers, and so on), and Apple's policies prevent third-party developers from providing such functionality. The media DRM can be frustrating, but I think the content providers deserve more of the blame for that than Apple does. Objective-C is a relic from the 1980's, and Apple's development tools haven't really improved since they were NeXT's development tools.

It doesn't run Flash, but that doesn't bother me. While I do think it would be a more useful device if it did, and users should be able to install whatever crap software they'd like, I think websites that require Flash are like websites that require Internet Explorer 6. If Apple is hastening the day when we all laugh at such sites, than I applaud them.

It doesn't have a camera. So what? A computer needs a camera like a fish needs a bicycle.

Regarding multi-tasking: I actually like the idea of having a single app running at a time. That fits my own preferences for using my laptop; I often use the "Hide Others" menu item to minimize distractions. It annoys me when I have to open Activity Monitor to figure out which app is using 200% CPU. However, it would be really nice if Pandora or instant messengers could run in the background. If Apple won't give us full multitasking, I hope they will at least provide some sort of support for third-party background tasks in the near future.

Now on to some predictions. I do think Apple has created a new product category. Notice that every new smartphone looks a lot like an iPhone? The same is going to happen in this market segment. I think you'll see the netbook and e-reader markets shrink, and more vendors will provide things that look like the iPad.

I hope a strong competitor emerges, because we need choice. Apple is first out of the gate, and as with the iPhone, it will take a while before anyone else produces anything with the level of polish needed to be considered an alternative. The surprisingly low price is going to give Apple a pretty big user base pretty quickly.

The strong competitor won't be a Windows-based machine. Microsoft still thinks everything, from the smallest smartphone to the biggest enterprise server, should have a desktop-style Windows UI, with all of its complexity and anachronisms. Apple was very smart to base the iPad on the iPhone UI, rather than on Mac OS X UI. The consistency of Windows- and Mac OS-style UIs was a great thing 20 years ago, when people were first learning about personal computers, but experience with smartphones and videogame systems shows that people can pick up different UIs quickly, without need for a mouse, windows, menus, and other such things. UIs can and should be designed specifically for each different type of appliance, but Microsoft is going to keep giving us the Windows 95 UI everywhere. So we're going to see a lot of tablet-pad knockoffs that run Windows 7 Basic, and they will all suck.

Putting a desktop-style OS on iPad-style hardware is not a solution. Cool as the iPad hardware is, it's the OS that makes it what it is. If your OS is designed for a keyboard and mouse, then you are not competing with the iPad.

Maybe someone will make a good Android-based alternative, or maybe Google's Chrome OS on iPad-like hardware will work. Maybe someone will make Ubuntu touch-friendly. I'm doubtful, but we'll see.

Some say that the iPhone and iPad are the first steps on a path to a world where we will all be limited to using locked-down narrow-use devices, and nobody will have access to an open platform. I can't see this happening. Buying an iPad doesn't require you to turn your laptop in to the authorities. You can continue to do everything you could do before you had an iPad. There will always be Google, Microsoft, Linux, and/or other alternatives available if Apple does to its computers what it has done with its mobile devices. And more of our applications and data are going to live in The Cloud rather than on our devices, so it won't matter what rules the devices follow.

Ten years from now, I think the computers we use will look a lot more like the iPad than like the Macbook or a Wintel laptop, both in terms of hardware and software. Apple may not dominate the industry then, but the heritage will be obvious.

You can hop on the bandwagon now, or wait and hop on later. I don't care what you do. I'm not ashamed of being an early hopper.

43

Another year older. I'm solidly in my forties now. It's not too bad.

We've had a few additions to the family in the past year: we bought two more Yorkshire Terriers, named Boo and Tweezer. About a week and half ago, Boo gave birth to a puppy whom we've named Sparky. He hasn't opened his eyes yet, but he's growing fast. So we now have four dogs, which is more than we really want, but I doubt we'll be able to part with any of them.

I've lost thirty pounds this year. I'd like to lose another twenty, but I'm glad I haven't regained what I've lost. As a result of the weight loss and diet, I no longer need medication to control hypertension or cholesterol. So I'm healthier than I was last year, and I hope that trend continues.

My wife decided to put a patio in the backyard this summer. The project grew a little beyond its initial scope, but the result is that we have a really nice backyard now. I like to go out there and read on weekends. It makes our little house feel a little bigger. I still really like it in Dahlonega.

I notice in my "42" entry that I said my career was in a rut, and it still is. However, I will have some opportunity to learn new things at work this year, so while it's still not what I want, at least it won't be completely boring.

Usually when I write my birthday blog post, I can review the last year's worth of blog postings to remind me of the things I did during the year. Unfortunately, this year I decided to limit my blog postings to programming- and technology-related topics, so I don't have a record of the really interesting things that have happened. But I do know that I'm happy, and that's all that really matters.

Objectified: Great Documentary

I just finished watching Objectified, and can wholeheartedly recommend it to audiences of all ages.

Objectified is about industrial designers. Those are the people who design all the stuff we buy. Look around you: that desk you're sitting at was designed by somebody. The mouse and keyboard were designed by somebody. That lamp was designed by somebody. The chair you're sitting in was designed by somebody.

We often think that consumerism and mass production takes the human element out of life, but Objectified will make you look at all those little works of art that surround us. Sure, there may be ten million copies of each thing, made by people in sweatshops, but somewhere there was a person who thought about it and made a lot of decisions. What shape should it be? What color should it be? What texture should it have? Should the edges be sharp or rounded? What should it be made of? How will it be manufactured? How much will people pay for it? What should the packaging look like? How can it be disposed of?

Objectified presents interviews with the people who do that. It may be a little geeky (how many people really care?), but it will give you a new appreciation for all that stuff you buy.

I rented it from iTunes. Next I'm going to watch Helvetica, which was directed by the same guy.

JacksOrBetter as a Web App

A little over a year ago, I created my first iPhone app, JacksOrBetter. As an exercise in learning CSS, JavaScript, and jQuery, I've created a web-based version of JacksOrBetter.

Bruce Schneier on Aviation Security

Computer security expert Bruce Schneier has a really nice opinion piece on CNN:

One could wonder whether a computer-security expert is qualified to write about aviation security or national security, but what he says makes a lot of sense.

Despite fearful rhetoric to the contrary, terrorism is not a transcendent threat. A terrorist attack cannot possibly destroy a country's way of life; it's only our reaction to that attack that can do that kind of damage. The more we undermine our own laws, the more we convert our buildings into fortresses, the more we reduce the freedoms and liberties at the foundation of our societies, the more we're doing the terrorists' job for them.

Ten New Year's Resolutions for Everyone

Being the arrogant lummox that I am, I've taken it upon myself to make a list of ten New Year's resolutions for everyone to follow.

  1. Be a better parent. Make time to spend with children (even if you have no children of your own).
  2. Be a better spouse. Are you the partner you promised you would be?
  3. Be a better friend. Your life isn't all about you. Reach out to others.
  4. Be a better citizen. Educate yourself about what's going on in your city, in your nation, and in the world. Ask questions. Respect those who disagree with you.
  5. Take care of your health. Prepare healthy meals, get some exercise, take your prescribed medications, get a physical exam and vaccinations.
  6. Put more into your work, but don't let your work take anything out of you.
  7. Correspond with people. This doesn't mean forwarding e-mail jokes, posting your status on a web page, or ranting about what some politician has done. You need to write about meaningful things, and carefully read what others have written.
  8. Examine your beliefs. How did you get them? What are they based on? Do they still make sense to you? Can you imagine what it would be like to hold different beliefs? Talk to someone who does have different beliefs.
  9. Get rid of what you don't need, literally and metaphorically.
  10. Relax more. You really do have the time.

Now you'll have an answer when annoying people ask you what your resolutions are.

Detecting Bullshit on the Internet

It's amazing what people will believe. At least once a week, I'm forwarded a piece of information from a seemingly intelligent person that seems fishy. Obama is not a US citizen! Obama is a Muslim who hates Christians! The Department of Homeland Security is setting up death camps! Eat whatever you want and still lose weight! Cancer cured by prayer! Etc., etc., etc.

It is usually very easy to debunk these claims:

  • Is this story being reported by any reputable news sources? If not, you should be skeptical.
  • Try Googling the first sentence or two of the story. This often brings up pages that demonstrate the story to be a hoax.
  • Try searching websites like http://snopes.com/, http://www.factcheck.org/, or http://skeptoid.com/, that have smart people who investigate suspicious claims.

For some stories, a tiny bit of research and critical thinking quickly leads to the conclusion that they are bogus. But it amazes me that people accept these stories without even considering that they may be untrue. Their "bullshit detectors" just don't work. They accept any negative story about people they don't like, and any positive story about people they do like. They reject mainstream media and other reputable sources in favor of quacks, cranks, and conspiracy theorists.

It is very easy to accept stories without question if they fit your existing beliefs, but we must always be on guard against such acceptance.

The first principle is that you must not fool yourself — and you are the easiest person to fool.
Richard Feynman

Carl Sagan, in his book The Demon-Haunted World, presented what he called his "Baloney Detection Kit". It's a simple set of guidelines for testing the believability of assertions and arguments. If you haven't read it, please do, and apply it both to new stories and to your existing beliefs.

And, please, stop sending me this crap.

Are Web Apps the new BASIC?

I often wonder how kids today get into programming. When I was a kid, and got my first computer, I spent a lot of time typing in the programs from David Ahl's BASIC Computer Games. After typing in the code for the games and playing them a bit, I'd start changing them. Eventually, I got into 6502 assembly language and higher-level programming languages, but that early exposure to a bunch of simple BASIC programs is what got me started as a coder.

Today, kids are surrounded by programmable computers, but few of them learn how to write code. Most kids are no more interested in programming a computer than they would be in rebuilding a car's engine. I don't see a lot of simple projects like those in Ahl's book that they can play with and start hacking on. How does a kid get started?

There are programming environments that are intended to teach kids programming (Scratch, Alice, etc.). But use of those is not widespread, and I question their usefulness. All the good programmers I know started with something primitive, like BASIC, Fortran, Perl, or command.com. I wonder if somebody can really learn how computers work by working with fancy 3D "authoring environments" like Alice and Squeak.

It's occurred to me that web applications might be one way to get into programming. Web browsers are as ubiquitous as BASIC was in the 80's. It's relatively easy for a kid to set up a web site with Drupal or some other off-the-shelf CMS, and then start customizing it. All they need is Notepad and an Internet connection. They learn a little CSS here, a little JavaScript there, and pretty soon they'd rather be coding than playing games.

Is there a web-app equivalent to BASIC Computer Games? If not, there should be.

Playing Catch-Up

Early in my career, I prided myself on my ability to absorb a lot of information and stay up-to-date on programming tools and techniques. I learned C++ before any of my colleagues did, and knew more about its intricacies than they did. I implemented ActiveX control containers before most people knew what "ActiveX" or "COM" was. I dug into CORBA. I played around with Java 1.0.

In short, I liked being an expert on new stuff. I enjoyed being on the bleeding edge. I liked being able to answer everyone's questions.

However, now I find myself on the other side of things. I'm bringing myself up to speed on some relatively "old" stuff: Java, JavaScript, and Cascading Style Sheets (CSS). It sometimes feels like I'm the only person who doesn't already know this stuff, and I'm not comfortable being the newbie.

There are benefits to jumping on the bandwagon late. For example, JavaScript actually works now, and most people have browsers with decent implementations of DOM and CSS. A lot of that J2EE silliness has quietly faded away. I can take advantage of lots of libraries written by experienced people, and there are plenty of people who can answer my questions.

Still, I'm nagged by the feeling that I'm behind, and won't ever be able to be one of the foremost experts or significant contributors to the communities. Maybe someday I'll be mature enough to accept that, but I'm not there yet.