mlindgren.ca

– 🕓 1 min read

Non-Myths About Programming

While browsing Reddit today, I came across a short essay by Mordechai Ben-Ari titled "Non-Myths About Programming" (PDF warning). It's only six pages long, and I found it refreshingly realistic and insightful. I would urge anyone considering a career in computer science to read it. Given its brevity (and the fact the title is reasonably descriptive), I won't bother summarizing the article—instead, I'll merely say that you should click the link and check it out for yourself.

– 🕓 2 min read

Making Samba shares accessible to Apache on OS X

As a small weekend project, I've been working on a simple Python HTTP "file server" of sorts. The basic idea is that authorized users can log in to a web interface and browse files in specific locations on my home network. The Python script is accessed through Apache on my Mac Mini, but some of the files I need access to are on Windows boxes. Unfortunately this presented something of a problem, as the Apache user on OS X (_www as of Snow Leopard) doesn't have permission to access Windows shares mounted by users.

Sounds simple enough, right? Just chmod or chown the Windows share and go to town. Unfortunately, this doesn't seem to work; neither chown or chmod have any effect on mounted Windows shares. Oddly, they don't output any errors; they just don't do anything. The only way around this seems to be to mount the shares as the Apache user (or whichever user you need to have access). Here's how to do so in Snow Leopard, with instructions modified slightly from a Stack Overflow question on the subject:

  1. Create the mountpoint
    mkdir /Volumes/Mount_Name
  2. Set the permissions on the mount point
    sudo chown _www:_www /Volumes/Mount_Name
    sudo chmod 755 /Volumes/Mount_Name
    
  3. If necessary, make a symlink from your Apache documents folder to the mount point
    ln -s /Volumes/Mount_Name /Library/WebServer/Documents/Mount_Name
  4. Mount the share as the Apache user
    sudo -u _www mount_smbfs //DOMAIN;User:Password@Host/Share /Volumes/Mount_Name

I doubt a great number of people will need this information as it's a strange sort of setup, but it's my hope that these instructions will save someone some time.

– 🕓 3 min read

Android Development Device Setup in Ubuntu 10.04

I spent part of last night setting up my HTC Desire as a development device on my Ubuntu laptop.  This was a somewhat frustrating process, because a lot of the information I came across seem to be outdated and didn't work for me.  Even the official documentation refers to a version of Ubuntu which is more than two years old.  I did eventually piece together the correct process for Ubuntu 10.04, so I'm documenting that process here in the hope that it will help out other developers in the future.  This guide assumes that you've already installed and configured the Android SDK.

– 🕓 5 min read

Android First Impressions

Like a number of disgruntled users and developers, I recently decided to trade my iPhone in for an Android device. My distaste for Apple's app store policies, design philosophy and corporate culture had been pushing me in that direction for some time.  The final straw, though, was iOS 4, which rendered my iPhone 3G almost unusably slow while failing to grant any of the most noteworthy new features. The inordinate difficulty of downgrading iOS exacerbates the problem for users who are still stuck with the iPhone 3G.  To be fair to Apple, Wednesday will see iOS 4.1 released, and they've claimed that it will fix the iPhone 3G performance issues.  For me, though, 4.1 is too little, too late.

– 🕓 4 min read

Where are all the Computer Scientists?

It's common knowledge that enrollment in computer science programs has declined significantly over the past decade. Although the trend seems to be reversing itself with enrollment increasing over the past few years, computer science educators shouldn't get complacent just yet. There's still much work to be done in order to ensure that computer science departments continue to grow and are able to meet the increasing demand for technically skilled graduates.

I've always felt that a lack of exposure is one of the primary detriments to computer science enrollment.  While I don't have any hard data, my own experience combined with an informal surveyal of friends and colleagues leads me to believe that a large percentage of North American high schools—possibly even a majority—offer little in the way of comprehensive computing classes.  While I don't dispute the importance of math, English and science, I can't help but wonder why computing isn't given an equal footing in the educational sphere, given its ubiquity today.

I've encountered a great number of intelligent and educated people who have no idea whatsoever about what the field of computer science is, or even how computers and software work.  I understand that most people don't necessarily need that information.  However, it's odd to me that basic computer literacy isn't required of college graduates (let alone high school students) in the same way that basic writing and math skills are. In the interest of meeting ever-increasing economic demand for technically skilled graduates, shouldn't we do more to expose students to computing?

– 🕓 4 min read

Puzzle Panel Postmortem: Framework

I'm currently reading Coders at Work by Peter Seibel. The book is a collection of interviews with respected and knowledgeable programmers. While the interview format can be somewhat difficult to read at times, the book is excellent. Seibel is himself an experienced programmer, and asks the sort of insightful questions no ordinary interviewer could, making for fascinating discussions. One could mine the book for weeks for interesting quotes. I'm going to try to resist that temptation, but because it relates to the topic at hand, I will permit myself to share with you one statement made by Joe Armstrong:

Being a young programmer today must be awful—you can choose 20 different programming languages, dozens of framework[s] and operating systems and you're paralysed by choice.

I think Armstrong is mistaken; it's anything but awful to be a young programmer today. However, it's certainly true that the number of choices one must make in starting a project can be daunting. The choices you make at the start of a project can have far-reaching implications. Choose wisely and your endeavour might be easy and successful, but choose poorly and you'll almost certainly regret it later.  For iPhone game developers, perhaps the most important choice that must be made early on in a project is which graphics libraries to use.

– 🕓 4 min read

My iPhone debacle

...or "Another Reason I'm Considering Switching to Android."

Yesterday evening, as I was leaving work, I was carrying on a conversation via text message with a friend of mine.  Upon arriving home, I realized that she'd apparently stopped responding, so I pulled my phone out of my pocket to check if I'd missed a message.  Instead of my usual lock screen, though, I was met a very unwelcome "Connect to iTunes" prompt.  I'd been running the beta of OS 4, and it turns out that if your developer licence expires while you still have the beta installed, Apple will remotely lock you out of your device without so much as a warning. I guess I should have expected as much.

– 🕓 3 min read

Puzzle Panel Postmortem: Introduction

Welcome, dear reader!

Although this is the inaugural post for this website, I won't bother with any introduction here.  If that sort of thing interests you, I refer you to the "about" page. For this entry, I'd like to dive right into the sort of content that this site is to be host to.  My iPhone developer program membership expires today, and I won't be renewing it—not immediately, at least.  That being the case, I think that this is a good time to reflect on my year as a so-called "iPhone developer."