patkua@work

The intersection of technology and leadership

Category: iPhone

Articulate your Incompetence

A few weeks back, Andy and I got together to walk through all the different iPhone examples that we’ve been playing around with. We both learned a great deal.

I’ve found that teaching whilst learning is actually the most effective way of learning. There’s something about trying to put words to the things that you think you know that makes you reason actually how little you really know.

I think the best learning model where this experience fits in is the following model:

Unconscious Incompetence -> Conscious Incompetence -> Conscious Competence -> Unconscious Competence

The act of trying to explain something is trying to raise you from one level to the next. If, for instance, you think you know what you’re doing and then find yourself having difficulty explaining something, you’re perhaps you are at a stage of Unconscious Incompetence. However if you know you are already incompetence (Conscious Incompetence), then the act of explaining is helping your understanding, testing the boundaries of where your knowledge fails. You are trying to move from Conscious Incompetence to Conscious Competence.

Interestingly, articulating your competence (or lack of) is an integral part to both a software craftsmanship model and pair programming, where in both you are expected to articulate your reasoning. The benefits work at all sorts of levels including the novice-novice and even the expert-novice pairing arrangement.

Using XCode like a real IntelliJ user

One of the biggest differentiators between the users who prefer IntelliJ over Eclipse is often their dedication to learning keyboard shortcuts. The user-conscious designers of IntelliJ make as much as they can consistent, something much more difficult for Eclipse, who is dependent on a community for plugin development without any process for reviewing how well they all fit together.

On my very first ThoughtWorks project, I remember my pair commenting about how I should learn all the keyboard shortcuts for IntelliJ. Learning keyboard shortcuts is less about churning out great amounts of code, and much more about avoiding interrupting your flow. Simple actions, such as reaching for mouse have potential to break your flow. Jetbrains make it easy to learn the keyboard shortcuts, even providing a printable cheat sheet so you can put them around your workspace as you learn them.

Having said all of this, here are some of the keyboard shortcuts I find myself using all the time for iPhone development:

  • Switch to Header/Source File– ALT + CMD + UpArrow
  • Open quickly – Shift + CMD + D. This is as close to Jump to Class/Method/Symbol that I could find so far. I haven’t worked out how to search using regular expressions yet.
  • Go back/forward – ALT + CMD + LeftArrow/RightArrow. Moves back between files that you opened. Useful for cycling through a call stack
  • Go(Run) – CMD + Enter. I’m currently using this to quickly see results as a spike my way through learning about Objective C and the APIs
  • Open Console – SHIFT + CMD + R. Useful when debugging using log statements and looking at what’s going on.

I’ve also found application-wide standard keyboard shortcuts really helpful as well

  • Cycle through different applications (XCode, Interface Builder) – CMD + TAB
  • Cycle through different windows in the same application – CMD + ` or CMD + ~. These are all really useful because Apple applications have a tendency to open many many windows, not really ideal for keyboard use.
  • Open help – SHIFT + CMD + ?. This is really useful when no keyboard shortcut is mapped, or you want to access a menu and can’t remember what it was. Once you have the Help dialogue open, start typing the name of the menu item. I’ve used this quite a lot to access the Refactor menu item which pops open another window.

Of course there are many more keyboard shortcuts. These are simply the ones that I’ve found I’m getting the most productivity. I wouldn’t say all of development can driven through the keyboard alone, but it’s a pretty good start for now. What are your favourite ones?

Using Kolb’s Model to learn about iPhone Development

I’m a huge believer in accepting multiple models as different ways of looking at the same set of data. It’s just simply different glasses to see different things through. One of the glasses I’ve been putting on more consciously is that of David Kolb and his model on experience learning. Read more about it here.

It follows a simple cycle: Experiencing -> Reflecting -> Generalising -> Applying -> (Back to Beginning)

Here’s how I go about applying it. I follow one of the wonderful tutorials from Apple on their iPhone development, focused on simply trying to step through the cycle and get some visible success (Experiencing). I then spend some time thinking about what new tidbit of information I’ve learned (Reflecting) and trying to come up with some way of fitting it my general mental model of how it works (Generalising). I then try it out on my prototype application to see if I truly understood it (Applying).

Having read about the model a while ago, I think there are a few key things to focus on when using this model:

  • Keep it small – I could choose to run through all of the different Apple iPhone tutorials one after the other. This doesn’t give me any chance of reflecting, generalising or applying the material. Given my very forgetful nature, working with one tutorial at a time through this cycle is important. I try to keep this cycle in terms of a couple of hours, not a couple of days. Attempt to pick up knowledge incrementally.
  • Rinse and repeat – Going through this cycle one doesn’t guarantee you’ll actually learn everything, or even anything. I’ve found I got to the end of doing something and didn’t have any general model. Iterating lets you mine and discover new lessons. I repeat the same exercise, and as I do, I notice I pick up different things.

Interesting it is these two aspects, incrementing and iterating that is at the heart of working in an agile manner. Notice how it’s all about learning then?

Starting a new language is like spiking

I’m a big fan of XP’s practice of spiking solutions. Although I’m not currently doing TDD because I barely know enough about iPhone development to make myself dangerous, I haven’t quite dropped all practices. I still use source control (just a local SVN repository) against the root of my spikes directory.

Here’s how I’ve been structuring myself:

FolderStructure

The benefits of this let’s me quickly create new projects to learn a single lesson given the numerous tutorials out there, and then put that under source control for reference code at a later stage. I then spend some time integrating it into the MyPrototypeProject, making small incremental commits as I make progress. The best part is that if I make a mistake along the way, all I have to do is a svn revert -R . to get back to a working state if I get too frustrated or lost.

Starting iPhone development

Late last week, Andy Yates got me onto the whole Hello World application for the iPhone. Since then, I’ve been dabbling around a bit more trying to get my head around it. After having studied how people learn things using models such as Shu Ha Ri, the Dreyfus Model of Skills Acquisition, and Kolb’s learning cycle, it’s fascinating to try to understand how best to pick it up.

Here are some observations that I’ve made so far:

  • There are many different dimensions to learning how to write an iPhone application. First, there is the fact that it’s written in Objective C, so you’re learning about the syntax and intricacies of a new language. Secondly, you are learning new development tools including XCode and Interface Builder. Thirdly you are learning about the libraries, documentation, and understanding how things fit together.
  • I intentionally recognise myself as being at Shu level (in Shu Ha Ri) or a Novice (on the Dreyfus Model). This means that I want to have some quick wins, get stuff working and worry about how it all fits together in the next stage. I’ve found that repeating the same exercise (almost like a kata) has helped me understand how things relate to each other just that little bit more.
  • Writing a journal helps. I intend on blogging about some things that I’m discovering. It might help one person out but it will sure help me articulate clearly my understanding (or lack of understanding) about the topics that I’m finding. When I don’t blog, I’ve got a little text file with snippets on what things I’ve discovered and what things still puzzle me. It’s helping me organise the random things that I’ve got.
  • Interestingly, I’m less interested in following some of the practices I would if writing a production application. This means I’m not worrying too much about refactoring or testing until I get the basics down. I don’t want to confuse the concerns of exploration and learning with verifying the system works (which I can barely get going right now). When I am more confident in my knowledge, I’ll definitely spend more time thinking about these things.

© 2017 patkua@work

Theme by Anders NorenUp ↑