Social Media
GitHub
Navigation
Powered by Squarespace

Entries in Programming (12)

Saturday
Jul212012

Finding relevant WWDC videos

As I've said before, I find the WWDC videos to be invaluable and I try watch all of them eventually. But there are a lot of them, and it can be hard to find what's relevant. And a lot of them I go back and watch again when I start working with a different part of a project.

So I've developed a trick, and I thought I'd share it with you all.

I go to the site where the videos are hosted and click on the "view all in iTunes button". From iTunes, I download all the slides (Click a track like "Essentials", then click "Slides" just above the list, and then click the "Get Tracks" button in the header).

I keep all the slides for WWDC 2010, 2011 and 2012 in subdirectories of a folder named "WWDC slides" in my Documents directory. It's indexed by Spotlight on my Mac.

From then on, when I'm working on a project, and I'm having trouble with something, or trying to remember something I might have seen, I open up that folder in Finder, and type the Class or Method names of the Classes I'm working with, and Spotlight will tell me the session names of the videos I might want to watch.

So, for example, if I type 'NSFetchRequest', the first result is "Session 214 - Core Data Best Practices" from WWDC2012. I type 'registerNib:', and I get "Session 125 - UITableView Changes, Tips, Tricks" from WWDC2011 (among others).

Then I just go to iTunes or the website, and I know which video to go watch.

It's a handy trick (and I use it to search through all my eBooks on programming, as well), and when I've recommended specific videos to people, I've had several of them ask me how I keep the videos straight.

So hopefully it's useful to some of you.

Tuesday
May172011

How can you edit, build and install iPhone and iPad Apps without being near a Mac?

XCAB Intro 011 001

I'm going to walk you through the process that XCAB uses (These steps are taken from this SlideShow).

XCAB Intro 012 001

I have a refurb mini in my Living Room that I bought to be an Home Sharing server, and it’s more than up to the task.  I’ve run it on my laptop, too, from time to time.

As far as the iOS device, an iPad is obviously better to use for editing, because of the screen real estate, but the process is the same for both.

XCAB Intro 013 001

I like Textastic for the iPad and Nebulous Notes on the iPhone, but you can use any Drop-box enabled editor that isn't locked to a particular folder in your Dropbox (and hopefully for your sake has a fixed-width font).

XCAB Intro 014 001

The way you make your changes is pretty specific, see this demo video for an example.

XCAB Intro 015 001

When XCAB notices the changes show up in Dropbox, it checks them into a Git repository.  In theory, it could use Subversion or Mercurial, but I prefer Git, so that's what got implemented first.

XCAB Intro 016 001

The script looks for new git commits and builds new ones that it finds.  Note that this can also allow you to get notifications of new builds of an existing branch of an existing project that you didn't make.

XCAB Intro 017 001

iOS-Beta-Builder is used to generate a web page that will allow an over-the-air install on an iOS device.

XCAB Intro 018 001

It copies the web pages and the ipa into your Dropbox public folder.

XCAB Intro 019 001

It sends you a Boxcar notification with the URL you can click on to install the newly-built app.

XCAB Intro 020 001

Safari hands off to the OS to do the install.

XCAB Intro 021 001

And you're done.  Feel free to lather, rinse and repeat.

 

Monday
May162011

Video Demo: How to program an iPad by using an iPad, no jailbreak required

Here's a video I put together to demonstrate how to use the code that I wrote that I blogged about last week to program an iPad with an iPad, without having to lug your laptop around with you (or jailbreak your device):

Please excuse the fuzziness, I recorded it from my iPad 2 using a setup that converted it to a Standard Definition Analog TV signal along the way. Hopefully, it is close enough that you can get the idea of how it works.

 

Monday
Jan312011

AutoJournaling with VoodooPad - moving toward Interruptible Programmer Nirvana


Since I read the Interruptible Programmer, I've been trying to do a better job of handling interruptions. Well, specifically to reduce the effort it takes me to get back to where I was before the interruption happened. I and switch to a new task very easily, but my brain isn't wired to get back to where I was, leading to much frustration (and lots of misplaced coffee cups that happened to be in my hand when I started answering a question when I was away from my desk).

I tried keeping an hand-written log, but I didn't write in it enough to be useful. I tried keeping a blank window up in an editor, but had the same problem. The trick is that you can't predict when the interruption will happen, so you have to save state periodically *just in case* you get interrupted and end up needing it.

So I decided the only way it was going to work would be to reduce the effort required as much as I could. After floundering around for a while, I finally found something that is working for me (at least so far), so I thought I'd document it here and share it.

I found this tutorial and so I decided I'd play with VoodooPad and see if it would work. After some false starts, I ended up with this script that I make into an OSX service with this and then I bound it to CMD-Opt-J (J is for Journal) in System Preferences->Keyboard->Services.

What the script does is:

  • take the currently selected text
  • open VoodooPad if it isn't already open
  • selects the open VoodooPad document that meets certain criteria (and asks if it finds more than one)
  • opens a page named "Journal ${CURRENT_DATE}" (creating it if it isn't there)
  • makes sure there's a link from the master index page to the current_date's page
  • appends the current date/time to today's journal page
  • appends the currently selected text after the current time
  • brings VoodooPad to the foreground so I can add additional context if I want


Now all I have to do whenever I remember it is to:

  • select whatever text I'm currently working with, in whatever program I'm in
  • Hit CMD-Opt-J
  • type anything else I might want (usually don't)
  • Cmd-TAB back to the previous Window
  • go back to what I was doing


So far, it's done wonders for helping me keep track of what I was doing, and, without having as much aggravation involved in picking up where I left off, I find myself less irritated when I get interrupted, which is an added bonus.

 

Thursday
Sep162010

The Value of Slow: Lessons Learned via the Golf Course

Once upon a time, I was working on a project at a high tech company in an LA suburb, and I was working for a manager that I'll call Mike (because that was his name).

Mike had once worked managing a group that put satellites in orbit, and from that experience he gathered some great wisdom, some of which he attempted to impart to me, and some smaller amount of which actually sunk into my young (at the time) head.

The most valuable thing I remember was that he always insisted we built what he called "golf course time" into his projects. It was calendar time (as opposed to time on task) for the folks working on the project to be doing something besides work (golfing, in his casef) and have that "Oh, wait, we didn't think about X" thought that can be the difference between a project going off the rails or coming in under budget.

We worked just as hard as the other groups, and got just as much done, but we would interleave tasks, so that everyone had some extra calendar time to come up with those effort-saving and project-saving ideas. And when someone did think of something, Mike would make a point of highlighting it, so that the rest of us would recognize those thoughts when we had them.

I don't always succeed in building extra calendar time into my projects these days, but I do occasionally come up with one of those ideas; for me it's usually while I'm reading, or working out.

More often though, I remember what Mike tried to teach me because I just got caught by surprise by a nasty little corner-case that I wouldn't have painted myself into - if only I'd managed to have had the time to have thought of it beforehand...