how to get better

I’m trying to figure out how to be a better coder.  I’m looking for suggestions.

I have a couple of apps on the app store.  Some I did solo, some as part of a team, some as contract work.  Even when working on a team, I did my portion of the work by myself.  Occasionally another guy from the team would review the code, but if it worked there wasn’t really much concern.  I have a few books that I refer to and browse the topics where I am weak.  I read lots of tutorials in blogs and watch videos.  I attend developer meet-ups from time to time.  I went to 360iDev last year and plan to attend this year.

All that stuff is great and very helpful and I have learned quite a bit, but I know my code is still shit.  Other people know it too.  I was looking at doing a contract last week and I didn’t think the first interview went well from a technical perspective.  As far as a culture fit, I felt pretty good and we had some good conversations about what makes the app store difficult, marketing, and just general iOS banter.  I didn’t expect a call back, based on the technical portion of the interview, and was surprised when I received one.  They were interested in having me do some work but wanted to see a code sample.  I sent a code sample and never heard from them again.  Before seeing my code:  interested.  After seeing my code:  not interested.  Ugh, pretty telling.

At this point, I’m trying to figure out what to do next.  I know that with practice and experience comes expertise.  Doing development in my spare time outside of my day job makes that difficult and presents something of a Catch-22 situation.

I’m curious what others do for self-improvement?

This post is part of iDevBlogADay, a group of blogs by indie iPhone developers featuring two posts per day. You can subscribe to iDevBlogADay through RSS or follow the #iDevBlogADay hash tag or @idevblogaday on Twitter.

10 Responses to “how to get better”

  1. Doug Sjoquist Says:

    Aaron,

    One thing that helps me is to read and study how other people solved some problem, hopefully most of it good examples! (Even Apple has bad code in some of their examples.) What is really useful is being able to see how different people solved the same problem — gives you a chance to compare and contrast.

    Also, a fairly new book that has some great examples is “iOS Recipes: Tips and Tricks for Awesome iPhone and iPad Apps” by Paul Warren and Matt Drance. http://pragprog.com/titles/cdirec/ios-recipes

    Doug

  2. David Parker Says:

    1) Practice. And by practice, I mean code. A lot. Learn the idioms that people use. Know the APIs/SDKs inside and out.
    2) Collaborate (more). Specifically, if you can find an expert X developer, where X is the type of development you would like to do, see if they could pair with you once a week, etc. Listen and practice, intently.

    You said for yourself that you know that practice and experience is required. There is no shortcut, but at least you already recognize it, so you should be fine.

  3. Matthijs Hollemans Says:

    You get better at coding by doing more of it. Every once in a while you’ll suddenly get this new insight that changes the way you think about things and you’ll realize that how you programmed things previously was a really convoluted and roundabout way. This has happened to me many times over the years and I hope it will happen a few more times as well. ;-)

    I believe that the simpler the code, the better it is. If you strive to always be simplifying what you wrote then you’ll automatically become a better programmer. Write code as if others are going to read it. That doesn’t mean you should sprinkle it with comments but it does mean you can’t get too clever and take shortcuts that make the code harder to understand.

    Maybe if you post that code sample you sent to the prospective client, the readers of your blog could comment on it. There’s a chance that your code is just fine and they didn’t call you back for other reasons.

  4. Daniel Marques Says:

    Hi,

    That’s very good that you are worried on how to be a better coder. I believe there are some books that EVERY programmer/coder should read. Some of them are:

    1 – Design Patterns by GoF: This is started it all. It’s the book that throw in our faces like 20 years of expertise, showing code patterns that we see in a lot of framework still in those days, like in Ruby, Java, Cocoa and cocos2D. In the beginning you feel dumb for not knowing it already. In the end, you feels like superman. ;)

    2 – Refactoring by Martin Fowler: In Design Patterns you know how this should work, but it’s in this prime work of Fowler that you goes deep. This is a detailed and very explained by examples how simple code should be, like when we should remove a method or made a new class from another.

    3 – Effective Java by Joshua Block: The seconde part of this book focus on java, but the first is something more generic, and follows the same line as Design Patterns and Refactoring.

    This is some book that made me a better coder. There is a lots and lots of another books and methodologies that makes us much better, but this 3 books is a very good start.

    Anyways, stays humgry. ;)

  5. Brett Park Says:

    I believe one of the best ways to improve coding ability is by viewing code built by others. Find a few programs that post their code to sourceforge or gitourious or some site like that. Take a couple hours and sit down with a cup of coffee. See how other people code and learn better ways of doing things. If you want. To improve more yet, contribute to an open source project. Lots of people to comment on your changes.

  6. Tim Says:

    Maybe try finding a nearby code retreat (http://coderetreat.com/).

  7. Alexander Hartdegen Lee Says:

    Work with a more experienced, established programmer and learn from him/her. It would be even better if the experienced programmer is willing to share knowledge. Many often, it is better to learn things from experience and mentoring by other people than self-learning.

  8. Aaron Says:

    This is one avenue I have considered, but not been able to try. One idea I had was working for free for an experienced developer with good coding habits, willing to teach, with so much work to do that they need help, and are willing to work evenings and weekends. I just need to figure out how to find such a person in my area.

  9. Marcio Andrey Oliveira Says:

    Hi, Aaron.

    If I were you I wouldn’t work for free for an experienced developer. I’d prefer to get involved into an open source project.

    Why? It’s a win-win situation.

    You win:
    – My experience shows that usually the best open source project have better coding standards.

    You will learn a lot of stuff ranging from tools, collaborative work, coding standards, algorithms to communication skills.

    The community:
    - Your contribution, no matter how tiny it will be at first, will help a lot of people.

    And as said by the other friends above: read good books, practice, practice and practice.

    Lack of time should not be an excuse (despite the fact I use it a lot ;)

  10. Tom Ortega Says:

    I know what you mean. There’s even basic stuff like this:

    UIImage *myImage

    or

    UIImage* myImage

    or

    UIImage * myImage

    I know that’s probably more preference than anything, but still I bet which one you use says a lot about you.

    In my day job, I’m a Adobe Flex developer and I help people sorta bridge the gap your in. However, I’m not “expert” enough yet in iOS to actively do the same in this domain.

    I know in the Flex world, a lot of it has to do with encapsulating your objects better, i.e. utilizing events to communicate vs passing in shared vars that create rigid dependencies. Learning to use a application framework outside of the Flex framework holds a lot of weight there, but with iOS Cocoa is robust enough so that you never need another framework, so that doesn’t translate.

    What’s helped me a lot lately was reading “Coders at Work.” It shows that a lot of what we think “great coders” do aren’t really what they do. You’ll see that you do some things that they do and others they’d like to do. Above all else though, it helps you see how you should be thinking about your code.

    Hope that helps!

Leave a Reply