Author Archive


February 7, 2015 Leave a comment

I saw someone on Reddit recently say that there are four stages to learning to program. I can’t find the link so I’m going from memory, but roughly, they are:

  1. The rush of excitement in learning something new – In this stage, you there are plenty of tutorials and hand holding. 
  2. Venturing out – You are newly confident after having grasped the basic concepts. You can read (some) code and get an idea of what it means, and if you are not sure, you expect that you can look it up and figure it out. Sure, there are some areas of code that look impenetrable, but you are confident that you’re just missing a few more basic concepts and you’ll be able to understand them easily enough. 
  3. The Wasteland – Now you want to do something non-trivial, and all the documentation still seems over your head. Everyone seems to know more than you do, and none of the tutorials are aimed at your level. They are either directed to newbies at stage 1, or they are directed to experienced programmers and assume that the reader has already worked with something similar, so they explain only what is unique about their implementation. 
  4. Actually having some idea of what you’re doing – If you manage to somehow get pas the Wasteland, your confidence builds again, and one day you realize that you actually are able to build non-trivial systems. 

I think the first three stages make a lot of sense. I’m not sure at this point if number four actually exists, or if it is just a cruel joke. I will say that there does seem to be a huge gap between the trivial (“Hello World!”) sort of programming and the more complex programming required to make what the average person on the street would recognize as software. 

Modern software is complex. It does a lot, and everyone has expectations from years of using professionally created applications. This applies to mobile as well. It’s crazy to think that the iPhone launched 8 years ago. Everyone who’s been using a smart phone for even a fraction of that time has an idea of how an app on their preferred platform should look, act, and, more importantly, feel

So what I’ve learned this week is that building GUI is really hard. Sure, you’re probably working with an SDK, so at least you’re not reinventing the wheel, but this is still hugely complex, with a lot of nuances. It’s hard to keep all of that in your brain at once. 

Right now I’m working my way through the Big Nerd Ranch’s book on iOS Programming. They do a fairly good job of speaking in plain English–of helping you past the Wasteland. But it’s tough. I just finished the chapters on UITableView, a super common and relatively basic design. No bells and whistles here. Just a pretty standard list. And I’ve spent a good week trying to figure out a few challenges they give you. Move the items around the list. Create one item at the bottom that doesn’t move. You wouldn’t think this would be so hard. But because you’re not just dealing with variables and simple operations, but instead a whole mass of interconnected objects, things don’t behave the way they do in those first few tutorials. Intuition goes out the window. You’re basically left with trial and error. 

Sometimes that’s good enough. And I get a feeling that more programming—real programming—is trial and error than anyone would ever admit. And through that method, I have almost completed the challenges. Now I have just one more simple method to master. 

Categories: Computer Blue


The big question today on the tech blogs is has Apple lost it? You can rephrase that question several ways. Is Apple’s schedule of yearly iOS and OS X releases too ambitious? Are their priorities in the right place? Can any company reasonably expect to simultaneously grow platforms as complex as OS X and iOS and introduce a new watch platform while keeping software quality high? 

I don’t know the answer to that. But I can tell you that I don’t see Apple slowing down any time soon. 

Imagine a world where Apple held back several years between releases. We would all be using, what, Mountain Lion and iOS 6 today? Sure, it would be stable. But it would feel stagnant. Lacking of ideas. Your iPhone 6 would look antediluvian running a two year old OS, especially next to Android’s new Material design language. The “Apple bit off too much–is doomed!” argument would be replaced by “Apple is out of ideas–is doomed!”.

Apple are in a tough spot. On the mobile side, their competition is stronger than ever. Microsoft has stumbled on the desktop, but that doesn’t matter because the Mac is being measured against its younger siblings now. We expect our devices to work seamlessly together. 

As a customer, I do think now would be a good time for a “Snow Leopard” type release. Fix the weird little bugs. But I don’t think Apple can get away with that. A year is a long time to tell the world that you’re busying working on bug fixes. 

And frankly, while I do have complaints about the software I’m running today, I sure wouldn’t go back. 

Categories: Computer Blue Tags: , ,

Standing In The Way Of The Future

December 20, 2014 Leave a comment

Via Jason Snell at Six Colors, it’s becoming apparent to many that if a la carte programming is the way of the future, the math doesn’t add up for professional sports. My initial thought is… good.

It’s clear that there is a ton of dead weight in professional sports right now. People complain about athlete’s exorbitant salaries, and sometimes rightly so, but in general let’s remember that they are the reason we watch sports. Without them the whole system falls apart. Still, if demand lowers to some sort of natural plateau (without the artificial inflation of cable companies subsidizing them), eventually we’d reach some equilibrium. Player salaries would lower. The owners would either take a pay cut themselves, or sell to some other one-percenter who just wants the prestige of owning a ball team. And the teams would be forced to find ways to make the games more appealing and actually draw in enough viewers to sustain itself. 

My point is that we all have a lot more entertainment options right now. The movie and music industries are similarly being forced to question what is really necessary to sustain themselves. They’re sliming down, and that’s tough. Peoples jobs are going away, and I don’t want to diminish that. But I do think that these industries will come through stronger once they learn to pare away some of the excess and focus on what made them popular in the first place. 

Categories: Uncategorized Tags: , ,

Learning By Doing

November 30, 2014 Leave a comment

Several months ago I made two resolutions. One was to learn how to program, the other was to write about it more on this blog. I’ve partly kept one of those. The other, not so much.

Part of the reason is that I don’t feel that I had quite as much to say as I expected I would. I was reading some books and following along in some online communities, and that didn’t really sound interesting.

Now, though, I have a project. A personal itch that needs scratching. It’s small, and it’s pretty banal in the scheme of things, but it is kind of gnawing at my brain.

For my job, I find myself sorting large numbers of PDFs pretty often. The details aren’t important, but suffice it to say that this is something I’m sure a computer can do much more quickly than I can. So I set about figuring out how to get this done.

My first inclination was to come up with a Python script. I’m sure that it is possible in Python, but if I wanted to get into the raw data inside the PDF, I thought I’d need something more powerful. My next thought was to write something in C. This seemed like it would be way more effort than it was worth, since my knowledge of C is… well, lets just say I read a book on it once, and still own that book, so at least I have that.

My next thought was Swift, but again, there’s a serious learning curve there. Finally, I decided on Objective-C. Xcode offers an option for “Command Line Utilities”, so why not actually create one?

This is exciting because it’s my first time diving into an Objective-C project without a net. I honestly have no way of knowing how far above my head this project is until I hit a wall, and at that point there’s no flipping to the back of the book.

I started my project on Wednesday, after preparing for Thanksgiving. After working for a few hours here and there over the weekend, I currently have two classes totaling a couple hundred lines of code. I roughly sketched out the plan. The first goal was to find all of the PDFs in a directory. I got that part down. It took me a while, figuring out when to use NSArrays and when to use NSMutableArrays.

Beyond that rather basic syntax, my biggest confusion so far has been navigating the file system from inside an app. You have NSFileManager available to you, but some methods take NSURLs, and some take paths. How exactly do they work? Can I convert between the two? Are they really giving me what I want? How do I check?

I think I have that more or less sorted out. But now comes the hard part. Digging into a PDF file and seeing what I can pull out. I know the raw bytes I’m looking for are there. My worry now is separating the signal from the noise.

Categories: Computer Blue

A Turkey By Any Other Name

November 27, 2014 Leave a comment

Thanksgiving is in trouble. First, there’s the unpleasantness of its origins. We’ve so tied Thanksgiving to Americas founding myth that, as we become more conscious of the atrocities committed against the Native Americans, it becomes harder to stomach. Secondly, the meal has become, for some, a chore. Many love turkey with all the fixings, but having to produce that for a dozen or more relatives can be stressful. Finally, Thanksgiving has become stale. It is a day of feasting, but the meaning isn’t clear, and except for grand dad’s speech before digging in, we don’t really take the time to be thankful for what we have. When do we have the time? The potatoes are going to burn, the kids can’t decide on a movie to watch, and uncle Harry is hitting on his sister-in-law again.

Thanksgiving needs a makeover. A rebranding. Here’s what I propose.

Thanksgiving Day

After umpteen repetitions, words and images tend to lose their meaning. That is why Pepsi has a new logo every 5 years. Traditions can be the same thing. What was once a comforting ritual can become repetitive, to the point where you are going through the motions. A slight change of emphasis can make all the difference. Imagine that the day isn’t named “Thanksgiving”. Instead it is designated to giving thanks. Just as Veterans Day isn’t named “Veterans”, having a slight twist here will change the way we think of it.

Also, it will relieve the burden on on the feast. We are no longer a country of farmers, and celebrating the harvest seems a little antiquated. Yes, farms are important, even in post-industrial America. In fact, farms large and small might be more important now that they have been in generations. But there are plenty of things to be thankful for. We all have our own list. Why shouldn’t we each have an opportunity to appreciate those things the way we want. Thanksgiving was about turkey. Thanksgiving Day is about whatever allows you to grateful for what you have. If that is turkey, then so be it. If that is a polar bear plunge, more power to you.

Finally, the new Thanksgiving Day will shift focus away from the original “pilgrims and natives” narrative. I’m not saying we should whitewash history, but we’ve got Columbus day to feel terrible about the raping of an entire continent. Thanksgiving Day can be more about the now. Every year’s celebration can be different, because as long as we’re on the right side of the dirt we always have new things to be thankful for.

Don’t get me wrong. I love Thanksgiving the old fashioned way. But we’ve done that. And lets face it, they sell turkeys 365 days a year. We can eat those any time we like. Lets bring this holiday into the 21st century by shifting the focus from the meal to the toast.

Categories: Uncategorized

My Week With The iPhone 6

September 28, 2014 Leave a comment

I know you’ve been thinking about getting an iPhone 6, but have been holding off. When is the official Nothing Was Delivered review going to drop? you ask. Well wait no more. 

The first thing you notice about the iPhone 6 is that it’s big. Not enormous, but it fills your hand in a way previous iPhones never did. One thing to remember is that the iPhone width has stayed pretty much the same for the past 7 years. Your fingers would wrap around the iPhone 5S nearly the same way as the original. 

The 6 changes that, adding width while shaving off depth. Apple tries to distract from the increased size by moving away from the monolith shape. The new phone is rounded on all sides. Even the glass on the front curves down to meet the front. It feels really nice but also really slippery. I am afraid I’m going to drop the 6 in ways I wasn’t afraid before. In practice, I have only dropped it once so far, but it will take some getting used to. 

The larger screen still seems wasted. Nice for looking at photos or watching videos, or even for the occasional responsive web site. But most of my apps still seem to be just scaled up versions of their iOS 7 predecessors. Even among those that have updated their apps for the new iPhones, no one seems to be doing much with the extra real estate. 

My big complaint, however, is with one-handed use. My hands seem fairly unremarkable. They’re not particularly large, no are that especially dainty. I grip my phone somewhat loosely with my right hand, the right side nestled in my palm, my pinky providing support in the lower left hand corner, my ring and middle fingers gripping around the side, and my pointer finger propping up the back. The entirety of the screen that I can therefore comfortably interact with is within the arc of my thumb. 

If I position my phone in this usual set up, then I can easily reach the home button, the dock, and all but the top rows of apps. I can (barely) reach the top right app, but the top left is an app too far. Apple’s primary solution is Reachability, which is, unfortunately, kinda gross. What I used to be able to reach easily with my thumb now requires two taps on the home button, then a swing all the way back towards the top of my reach. What was one motion is now three. A terrible kludge. 

Luckily, the item that is most often in that upper left corner is a “Back” button, and Apple had one last trick up their sleeve. Swiping in from the left edge of the screen is now generally treated as a “Back” gesture. Still, I am going to make sure my most useless apps fill that top corner, because it’s generally not worth the effort. 

(note to self – come up with a placeholder app that doesn’t do anything, just sits in the top left corner of your iPhone. Step 3, profit). 

When all is said and done, this is a great phone, but the compromises are clear. Apple decided that the public wanted bigger phones (don’t get me started on the 6 +). And judging by their opening weekend sales, they’re probably right. But honestly, I kind of wish they made a phone with the 6’s internals and a 4” screen. That’s not going to happen this year, so I’ll have to somehow get by with a magic 4.7” computer that fits in my pocket. If there’s any lesson to be learned here it’s that screen sizes are going to keep changing. One day the fashion will no doubt swing back to smaller screens (iPhone Nano, anyone?). Till then, I welcome our new gigantic iPhone overlords. 

Categories: Computer Blue Tags: ,


September 7, 2014 Leave a comment

I’ve been reading Brook Wilensky-Lanaford’s enjoyable and detailed Paradise Lust, about the modern search for a physical Garden of Eden. It’s interesting that the story revolves around the 19th century and its aftermath. This was a very strange transitional time in the relationship between science, history, and religion. The importance (and practicality) of proving the stories from the Bible were real, literal history seems new, or at least newly resurgent. 

While I am not an expert in history, or religion, or the history of religion, or the religion of history, this is the internet, so I I feel free to speculate. My guess is that we are seeing a hang over of sorts from the Enlightenment and the Age of Exploration. While men traipsing off in search of legends was nothing new, by the 19th century the map had been more or less filled in. The great explorers of this time had only the past left to challenge them. Some saw this as an opportunity. These men were seized with the notion that, the word map being the height of mankind’s achievement, surely Eden was somewhere right under their noses. 

Some pointed to the areas of map still left unexplored at that time, while others looked in locations of varying degrees of obviousness. But one explanation I didn’t see anyone mention is the possibility that Eden was just a story.

Somewhere along the way, Western Christendom seems to have completely lost the idea of the allegory. Maybe it was never there to begin with. Pedantry is a hallmark of religion (Paradise Lust describes one group of Protestants as being persecuted for believing that new members should be baptized face first, rather than bending backwards). But this seemed different. Suddenly the tools of science were being used to marry fact and religion. New theories came as easily from the halls of Oxford as from midwestern preachers. The distance between the two narrowed to unprecedented proportions. 

We still haven’t learned to balance the competing needs of religion and science. It does not speak well of ours as a culture that something like the Creation Museum exists. Before we can truly get a grasp of fact, we need to learn to accept fiction. 

Categories: Uncategorized

An Index In Your Head

It’s been a month since I said that this blog would have a new direction and I haven’t posted anything meaningful on the subject. Let that not reflect on the subject matter, since there has been plenty that I meant to write about. I just… got side tracked.

So what have I been doing? Well, summer is never the most productive time of the year, but I have found some time to sit myself down and try to figure this thing out. 

My main study guide has been Aaron Hillegass and Mikey Ward’s Objective-C Programming (2nd Edition). I found this to be a good place to start due to what it is not. It is not a book on how to make iPhone apps. The arcane incantations that get Xcode to work are only touched on briefly. Mostly this book aims lower. Start at the language. How does Objective-C work? What is Object Oriented Programming, and how does Apple want you to use it? What is going on in memory while your code is doing its thing? How the fuck do blocks work?

It remains to be seen whether this detour was worth it. There’s still plenty I don’t quite grok, but I’m betting that once I’m done with the text books and sample code, just having read these books and having a rough index in my head will be helpful. 

Whose Rights Matter

Religion and sex. It never fails. When these two forces meet, things are going to get sticky (if you’ll pardon the expression). Both are deeply ingrained in our lives, we don’t know how to talk about either of them, and they intersect at strange and discomforting places—just look the different ways we use the word “ecstasy”.

Unfortunately, unlike with sex, we have not yet come to a consensus that religion should be practiced only among consenting adults. Instead, we see an incessant drum beat from those on the religious right to force their morality on the rest of us. Among the stomach-churning aspects of yesterday’s Hobby Lobby decision is the glee that the right feels in being able to impose their religious practices on the rest of us. The basis of the lawsuit was the belief, ostensibly held by a corporate entity that certain types of birth control are, in fact, abortion, and that abortion is bad. Never mind that these beliefs are horseshit. This horseshit is tied up in their identity as Christian dead-enders, and maintaining that status priveleged in our society above all else. It is more important than womens health or emotional well being, more important true religious freedom (you know, the kind where others religious views don’t dictate your medical options), more important even than consistant application of the law (this ruling explicitly exempted medical procedures such as blood transfusions—you know, the kinds that 6 elderly male Supreme Court Justices might end up requiring—from being subject to the religious belief test).

Don’t take my word for it, though. They’ll tell you right to your face. Their true, deeply held religious belief is that you’re a slut and fuck you.

It’s all there in one gloriously sociopathic sentence. His religion (not religion in general, mind you. Specifically his religion) is the primary concern here. If some woman out there was having sex without his say so, then he might have his feelings hurt, and that is unacceptable. Better, then, to open the door to employers getting to determine how you spend your earned compensation. Your boss finds out you went to see raunchy rom-com over the weekend? Maybe they’ll dock you $10. Sound crazy? Well so does fighting your employees all the way to the Supreme Court just to keep them from accessing doctor prescribed health care that you find distasteful. But that’s just what happened. In America. In 2014.

Parlez-vous Swift?

So here I am ready to make an iOS app from scratch, except that I have no idea how make iOS apps (or apps of any other kind, for that matter). But I do know that you need to program in Objective-C, a language developed largely by NeXT in the late 80’s, adopted by Apple in the early 2000s, and used today mostly to make apps for the iPhone. So I bought a couple of books and set to work learning the basics. 

Every year, just as summer is getting under way, Apple hosts their World Wide Developers Conference, where they lay out their current thinking on the best way to make apps. There are new technologies introduced, lessons available, and for those of us who can’t take a week off to fly to San Francisco, they put videos of everything up on line. Knowing this was coming up, I thought I could focus on learning the basics of the Objective-C language, as the higher level elements were likely to change.

Then Apple upended everything. Objective-C, they said, is no longer the only way to make apps for their devices. Swift was a brand new language created in secret by small team inside Apple. It was modern, they said, and apps built using it would be less likely to crash. 

That’s all well and good, but I was just starting to get a hang on the old way! Did I now need to start from scratch? How would I even do that? Swift was brand new, and the only way to learn it was an ebook that Apple released that was clearly aimed at people with a better understanding of how computing worked. 

After spending roughly a week paralyzed with indecision about which path to take, I picked back up the book I had been working on. For the time being, I’m making this app the old fashioned way. A couple of points factored in to this decision. 

  • Swift is really new, and was created by a very small (though I’m sure very smart) team inside Apple. Now that there are hundreds of thousands of developers poking around through it, I’m sure they’re going to find bugs. And I’m sure that Apple is going to fix some of those bugs, meaning that the language is going to change quickly. Behaviors you can expect today might not apply a year or two down the road. That could cause problems that I’m not confident I’d be able to detect. 
  • Objective-C is old. In some sense, that means it’s creaky, and there are some difficult concepts to grok that are papered over in newer languages like Swift. But it also means that it is well tested, and that it’s peculiarities are well documented. If I have questions, it’s pretty easy to google the method names I’m working with and find explainers, and other people who have had the same issues. Answers are abundant, and if I can’t find them already existing online there are tons of people with experience working with these technologies that I can ask. 
  • I already have the books.
  • Swift and Objective-C code can live side by side. Apps are written as smaller files that are compiled and combined into that neat little icon on your phone. You will be able to Objective-C and Swift files together in the same app to solve different problems. That is exciting because it means I can start today in Objective-C, and then start adding Swift files in the future once I see that it is starting to mature, and I won’t have to go back and redo everything I had already built. 
  • Swift is clearly the future, but Objective-C is not yet the past. It’s still being used by Apple itself for most everything, and likely will be for years to come. That means it’s not going to go away any time soon. I don’t think we have to be afraid of Apple coming in next year and saying that all submissions must be Swift-only. This is going to be a slow transition, and the end state is going to be a world where Swift is the preferred, but not only language.  

So on a beautiful Saturday like today, I am hashing this around in my head, and I think I’ve finally convinced myself. Now that I’ve gotten this off my chest, I can go enjoy the day.

Categories: Computer Blue Tags: , , ,