Known for my promptness, it is no surprise that I've taken approximately 28 days to reply to the indubitable Anne K. Halsall's tagging of myself and several esteemed others to give the wonderful world of the internet my story (of all people!). Not only that, but to be listed with the people she listed me with! I can cross off "Appear in a list with Mark Dalrymple and Aaron Hillegass" off my life's to-do list.
Without further ado, I present the story, as requested, many moons ago.
How old were you when you started programming?
Ah. This is an interesting question. Normally here, you'd get a fantastically woven tale of discovering a UNIX machine deep within the bowels of your college, and plugging away for hours and hours learning as much as possible, or even having an Apple ][ as a child, and pecking away at sweet BASIC programs.
I did not do this. Not at all.
I started programming when I was 17.
The Setup.Most of my pre-programming life was spent enjoying other people's hard work -- I played video games. A lot of video games. I played a bit of baseball growing up, but by the time third grade rolled around, I had two loves in my life: Playing Oregon Trail in Typing class, and music.
My father was a trumpet player in his younger days, and coincidentally, also one of the first computer programmers at his university. Despite being a architecture major, he loved computers and got involved with them as much as he could. When I came to live with my father in Texas when I was 8, he began influencing my childhood with his love of computers, and I was hooked. My dad and I bonded over computers, and he taught me everything I could possibly absorb.
Back then, we were Microsoft men. We anticipated the release of new versions of Windows and Office with great anticipation, so that we could pick them apart and learn everything about them. We got the internet in 1994 or so, good old AOL. We jumped ship to cable internet as soon as it was possibly available, learning about ethernet and Windows networking (ugh), and everything as we went.
However, I really knew nothing about software. In fact, I knew more about interrupts, device communication, and USB long before I ever understood what a pointer was. As I grew up, I cared less and less about about what came out of Redmond, and more and more about what my computer could actually do. I embraced software in the form of computer games, eventually playing at a pretty high level in a couple of my favorites (competitive gaming, ugh). I was also into music a lot, playing trumpet, baritone/euphonium, tuba, and finally trombone throughout my childhood and into high school. I played with various pieces of musical software in my later years: Reason and Fruity Loops mostly, and somewhat enjoyed that.
By my senior year, I was pretty sure I'd be majoring in music, Trombone Performance I believe, and that computers were just a hobby.
How I got started programming (and changed my complete life plan)Two things, or maybe, more specifically, two people completely destroyed that idea.
A good amount of my time was spent playing text based games oddly enough. My friends and I were into MUDs big time, which was rather odd in a time where Everquest was insanely popular. One friend, in particular, really liked MUDs, enough to learn how they work, and began work on one himself. At some point, I joined the fray. I had a bit of experience working on a MUD we all played, doing text-based level design. It was rather basic, but involved a lot of writing, and I enjoyed it a lot. So, I went about sitting next to him, writing room after room after room. Every now and then, I looked over and saw it - a stark black background with bright glowing white letters, arranged haphazardly in weird patterns on his screen. It was code.
My quick looks slowly became long stares, and as I saw what he was doing, and what it became, I was blown away. I guess I had never really though about software, and how it was made. I recalled back to my excitement over software releases, and realized how much excitement throughout my entire life was completely based on software. This was awesome, and I wanted to be able to do it. The next day, I went to the local Borders and picked up my very first programming book: Practical Programming in C++. I read the book every day. I ended up reading it around five times before I graduated high school. I loved it so much, I ended up taking a computer science class my senior year, which was a joke at that time. I excelled, helped other people understand, and loved every second of it. I had only ever been really good at one other thing: music, and it was awesome to have something else to join the party. Little did I know, I was a terrible programmer, but no matter, it was an amazing feeling.
No, there is another...I love skateboarding video games. I mean really love them. I absolutely adored Tony Hawk's Pro Skater, and pretty much everything about the series of games.
A friend of many of my friends, let's call him Andy, since that's his name, played this game at an insane level. I never knew this mind you, all I knew is that one day, I heard that Andy played Tony Hawk so well, that Neversoft wanted to hire him to test Tony Hawk. This was it. At this point, I realized that video games were a major industry, and that computer software of all kinds, was an even bigger industry. It all brought me to the realization that music needed to be the hobby, and that I needed to make software for a living. After some careful thought, I realized that this plan was much more feasible than using money made from music to fund my software plans. I graduated high school, and enrolled in college as a computer science major.
Coincidentally, Andy was on stage during the premiere of Guitar Hero World Tour, playing drums, which caused me to freak out. He's now a designer at Neversoft, and I LOVE Guitar Hero.
What was your first language?I guess C++, which is really quite bad. Never ever use C++ as the language you learn programming with, it's awful. When I graduated, I got a Powerbook G4, much to the bickering of my father, who wanted me to get a Dell or something, but I knew what I was doing. :)
That was the first machine I owned that I ever programmed on, and I refused to write a line of C++ on it. I bought Cocoa book after Cooca book, taught myself Objective-C with the help of Steven Kochan, and Cocoa with the help of Aaron Hillegass, and never looked back.
What was the first real program you wrote?Jeez, this is a hard one to answer.
There were tons of little one-offs, and the projects from Aaron's book, not to mention five years of CS assignments. Adium is the first I ever shipped any code, so I'll say it was that, though of course, I didn't write all of that.
The first thing I actually wrote and finished all by myself and could be called a real program was actually Photo Touch. All the real experience I had up until then had been on teams, because I love working on teams of amazing people.
What languages have you used since then?Well, Objective-C primarily. However, I've dabbled in all kinds of stuff: C, [C++], Java, Javascript, Python, Ruby, and Prolog.
What was your first professional programming gig?This is a hard one to answer.
In November of 2006, I decided I wanted to work on an open source project, in what I will call the best decision I've ever made in my life. I chose Adium, and was asked to join the development team in December of the same year. Despite the fact that since that initial flurry of activity, I haven't gotten to work on it nearly enough due to the insanity stemming from my association with the project, leading to my actual first professional programming gig. I hold Adium in high regard, and will never forget the impact it's had so far.
I accepted my first professional gig in May of 2007, as an intern at a little fruit company, who's work I'm quite partial about. I worked on a pretty secret project, that would eventually become MainStage. I had the incredible luck to land my dream job of working on the Audio/Music team at said fruit company, which had been my dream since getting my first Mac out of high school, which came with Garageband 1.0, which I loved to death.
If there is one thing you learned along the way that you would tell new developers, what would it be?NETWORK. I try to kid myself that I got really really lucky, but ultimately, my networking decisions (combined with a ton of luck, seriously) are what got me where I am. Take the time to get to know people, I am still around 9,999,999 beers in debt to Colin Barrett at this point.
Find smart people. Surround yourself with them. Most importantly, show off anything you think is cool. Everyone loves something cool. Not only will you inspire yourself to keep doing what you do, but you'll inspire hundreds, if not thousands of others, to keep at it as well.
What's the most fun you've had programming [that I can talk about]?A tough one! ;)
I quite enjoyed writing Photo Touch, and showing it to my fellow students at school. Despite it being rather simple, I had a gigantic group of younger students surrounding me asking me questions about it, Mac programming, and working for fruit companies.
It was a real turning point, that let me know I was on the right track, and vindication about your life choices is extremely important.
Corollary: Why aren't you writing video games?Great question!
I got into application development for some unknown, odd reason. I realized that applications make the world go round. Every day, we use a multitude of applications to make our lives work the way they do, and that writing these applications posed a unique challenge: How do you write something that someone wants to use every day of their life?
I'm still not really sure, although I suspect that I'm at the right place to find out, all things considered.
I imagine someday, I may make a foray into game programming. I've certainly given it some thought lately, but my love for user interfaces is what keeps me here, and doing what I do, and hopefully making apps that people use every day of their lives.
Thanks to Anne, Colin, Steve Kochan, Aaron Hillegass, Mark Dalrymple, and well, pretty much everyone involved.
FCC to turn down Skype's mobile open access plea: "The FCC plans to dismiss a request from Skype that would require mobile operators to open their networks.
Skype? Wanting someone to be more open? Are you serious? Get back to me when you open your own software up to third parties, then you can go back to writing petitions for other people to open up their own.
(Via Macworld.)
MultiClutch is a great program by Will Henderson which allows you to assign a keyboard shortcut to be executed when you perform a gesture on the trackpad. This proves immensely useful for providing improved gesture functionality to applications.
It should come to no surprise to you dear reader, that the initial functions for the gestures currently in Leopard slightly...well, dissatisfy me. I'm of the opinion that multitouch should be more than just bindings for keyboard shortcuts, but since I have no control over that, I'd at least like the shortcuts to be useful ones. So, with that in mind, I offer up my highly improved (in my own opinion of course) bindings for WebKit/Safari (They will work for both, but you have to bind them for both.)

Let me translate for you dear reader.
Zoom In is the pinch gesture, and it closes the current tab, or window if there is only one tab. This is the only dangerous one, since it's pretty easy to do the pinch gesture when you are scrolling. This can cause some faulty tab closures, which is annoying, and I'm habituated to hitting Cmd+W, but sometimes when I click and link and get a new window, it's really nice to be able to pinch it away.
Zoom Out is the zoom/expand gesture, and it opens a new tab. I use this ALL THE TIME, and really think it should be the Safari default instead of text size, but hey, what do I know?
Swipe Up and Swipe Down go Forward and Backward respectively. I liked these at Left/Right, but not as much as I like changing tabs (What Swipe Left and Swipe Right are bound to) with left and right, and I do that a lot. I understand that the gesture mimics the buttons, but again, I think Forward (Up) and Back (Down) make more spatial sense.
Finally, my favorites. Rotate Right is Cmd+R, which is Refresh. I maintain that I came up with this independently of Jesper, but whatever. It's awesome, and every app that has refresh should use it.
And now, the trump card. Safari 3 added a menu option called "Merge All Windows" which merges every open window and all their tabs into a single window. Similar to above, sometimes I use those pop-up'd windows to continue my browsing, which means I get several windows with several tabs each. This is annoying, and happens frequently enough. However, this has no keyboard shortcut! So sad.
Mac OS X makes this easy however, using "Keyboard Shortcuts" under Mouse/Keyboard Preferences.
You can see that I've added a keyboard shortcut "Cmd+Shift+M" to merge all windows to Safari. NOTE TO WEBKIT USERS: IF YOU USE WEBKIT NIGHTLIES IT STILL GOES UNDER SAFARI. THAT IS ALL. After I've done this, I can easily bind a MultiClutch gesture to do this, and that's just what I did.
So that does it. Let me know what you think in the comments, or on Twitter or something. Also, let me know what other bindings you have for applications.
BONUS: Adium implements gestures in 1.3. They are awesome! Thanks to Zac West for them.
Long time no see blog!
However, I've been busy. Today, I'd like to show everyone one of my final projects for school, which happens to be a multi-touch demonstration using my new Macbook Air (awesome) and Core Animation (also awesome). It's called Photo Touch, and I'll go ahead and let the video do the talking.
Hope you enjoyed that. I'll be back with more real soon. Like I said in the video, hopefully the code will be available after the presentation on the 11th of April. Wish me luck!
Thanks again to Patrick Gibson, Jefferson Han, and Scott Stevenson for their contributions to Photo Touch. (Photos, Ideas, and NanoLife Random Path code respectively).
Continuing my theme of Macbook Air trackpad related posts, today we're going to look at some intriguing differences in behavior between the trackpad and the device that made multi-touch all the rage -- the iPhone. The particular behavior I'm talking about is the swipe behavior in Preview.app. The behavior in Preview is obviously an attempt to mimic how the iPhone allows one to browse through all of the open documents in Preview. In this example we'll use a group of photos to exhibit both behaviors.
Let's start with the iPhone.
On the iPhone, the idea is that the user is reaching out and touching the photo, and "flicking" it to the left or right. So, let's say you reach out to the right side of a photo, and slide your finger to the left. The image then follows your finger, sliding off to the left, and the next image slides in from the right. This is pretty expected -- you have flicked the photo off the screen to the left, and it follows your finger off the edge of the screen. Even if you reach out and touch the middle of the photo and flick just a little bit to the left, the same expected behavior happens. You've grabbed the photo, pushed/flicked it off to the left, and a new image comes in from the right. Of course, the images aren't unlimited and if you attempt to do this when there is not a next image the image attempts to move off to the left, and then bounces back to show you that no image to the right exists, and that you are at the end. This all makes perfect sense, is pretty intuitive, and seems like the logical behavior to model the swipe behavior in Preview after, right?
Apparently not.
As an iPhone user, I approached the Macbook Air with a great bit of excitement. While the applications that currently support gestures don't exactly make me jump for joy, the potential for these gestures in third party applications is simply put, awesome. However, I'd at least expect some consistency between the two platforms.
Unfortunately, Preview falls short.
In Preview, swipes aren't as sophisticated, and in my opinion, not as well thought out as on the iPhone. Instead of the reaching out, touching, and flicking metaphors that work so well on the iPhone, swipes on the Macbook Air's trackpad simply move in the direction of the swipe rather uninterestingly. Sure, they animate nicely, taking full advantage of Core Animation, and when they reach the end of the set the image bounces back. However, Preview decides that reality, and thus platform parity, should fly out the window.
A swipe to the right in Preview, moves to the photo to the right. A swipe to the left in Preview, moves to the photo to the left. This is the opposite behavior you'd expect if you've ever used an iPhone, and sure enough, the opposite behavior I think you'd actually want. Using a multi-touch trackpad is not analogous to using the arrow keys. I'm not trying to arrow through my pictures, my mind is expecting a higher level experience -- I am reaching out and literally swiping through my photos, just like I might turn the pages of a book. Similarly if I rotate, or magnify my pictures, I'd be expecting the computer to act like I'm picking up a photo, and pulling the photo closer to me respectively, and indeed this is what happens.
Now then, it's possible that this functionality is actually intended. If we look at another application that implements multi-touch capability, the current behavior is actually correct. In Safari, moving to the right should in fact send us forward, and moving to the left, should send us backwards. That makes sense after using it a couple of times. There are thus two arguments that can be leveraged for the case of Preview's behavior. The first is system parity. Other applications act this way, thus, Preview should as well. I'm guessing that's the one they chose, and that's why it's implemented this way. I argue that is should be changed, because it just feels wrong. Even more so after you've used an iPhone for about two minutes. The second reason, is that Preview is not necessarily running a full screen context. Thus, the idea of flicking pictures isn't especially clear. However, I get the feeling that's exactly what they were attempting to mimic. When you reach the end of a set of photos, the image has a nice bounce effect, just like on the iPhone. However it bounces the wrong way! That's right, when you get to the end of a group of photos, and continue to scroll as if another photo should be there, the image slides to the right and then bounces back. This is completely wrong. Since the photo should be sliding off to the left, it should do so, and then bounce back, very similarly to how the iPhone works.
I think this ultimately shows one of the interesting aspects of these trackpads being integrated into our computers. It's very easy to get confused about how they should work. Multi-touch shouldn't be just an alternative way to arrow through things. It's an advanced and sophisticated input method, and requires programmers to really think about how users are going to interact with their computer when using gestures. Assuming Apple continues to integrate this technology into their laptops, we will soon be at a point where multi-touch is a big deal. Both platform parity and system parity need to be considered, but more importantly a great deal of thought needs to go into this process, and whether through guidance from the top as to how users should be expected to interact with the multi-touch trackpad, or through a standards system of our own, right now it's up to the developers using the technology to shape the way users use this technology.
All in all, there are far more iPhones and iPod touches around than Macbook Airs. Far more people are going to be used to using these devices, rather than a Macbook Air, and thus I think it's clear the paradigms we should strive to mimic.
Peter Hosey has pointed out, and I agree with him really, that Safari should mimic the iPhone behavior as well. After all, who doesn't want to flick through webpages?
Bugs have been filed on Preview and Safari: here and here.
Ciaó
Luckily I used to work with this insane genius named Lucas, who discovered that if you put a very small value into "m34" of Core Animation's CATransform3D struct, then scale the layer just right, you get a decent facsimile of the iPhone flip.
Since m34 doesn't sound very good in conversation, I think of this at the "Newman factor." The resulting distortion is, therefore, "Newman distortion," and the units in which it is adjusted are Newmans. One Newman is equal to the inverse of the distortion, which I'm pretty sure is math-speak for transform.m34 = 1/distortionInNewmans. In other words, the more Newmans you have, the less the distortion.
For the translation. Notice, still rocking the positive 1/DN. However, if you pull out that dusty old Linear Algebra textbook, and run matrix multiplication on these two matricies, you will notice that the negative values in the rotation matrix cause the 1/DN to become negative. In this case, this is interesting because we happen to have a positive Z increase from our Y-axis rotation that is being unrealistically removed from due to the projection onto our display. This, as Mike puts it, is fine when you are not rendering at full screen, but because you will clip over the edges on full screen, completely ruins the experience on a device like an iPhone.
ND = 1 / ((Layer.Height / Layer.Width) / 1000)
This equation is a general equation, meaning it will work on all displays. However, rendering as an art is derived from the aspect ratio of the screen you are rendering on. In addition, we must have a consistent aspect ratio from the layer. With this in mind, we can actually derive a much more precise equation, which can be fine tuned for precise animations.
float layerRatio = 0.0;
if(Layer.Height > Layer.Width)
layerRatio = Layer.Width / Layer.Height;else if(Layer.Height <= Layer.Width)
layerRatio = Layer.Height / Layer.Width
float maxScreen = 0.0;
if(Screen.Height > Screen.Width)
maxScreen = Screen.Height;if(Screen.Width > Screen.Height)
maxScreen = Screen.Width;ND = 1 / (layerRatio / maxScreen);
Let's just plug in some values, based on my own display resolution (1440x900), and the size of the test image (300x400).
ND = 1 / (0.75 / 1440)
ND ~= 2000;



