Hacker News new | past | comments | ask | show | jobs | submit login
My first six months of programming: from man-rodent to partyman (whitakerblackall.com)
179 points by nitefly on April 13, 2011 | hide | past | favorite | 36 comments



This is a great write up on the experience! Truly inspirational.

I especially like the following quote:

It truly is amazing how much practice helps. Every time I write a new program, I run into a ton of unforeseen problems and bugs. While frustrating at the time, I usually plan around them the next time I program. This makes me feel like I’m in my very own while loop:

  while (stillPrettyBadAtProgramming) {
  programmingPracticeTime++;
  Program *newProgram = [Program programWithType:ProgramTypeGame];
  if (
    newProgram.isReallyGood == YES && programmingPracticeTime >= A_HUGE_AMOUNT
    ){
      stillPrettyBadAtProgramming = NO;
     }
  }


Isn't there a huge memory leak? Creating a new pointer on each iteration without keeping track of them.

I might be wrong I've been doing games in CL for some time now.


With a few exceptions, pointers returned by methods in Objective-C are assumed to be autoreleased. That means their reference count will be decremented at the end of the event loop.

But if OP is expecting a lifetime of learning, he might want to push a new autorelease pool for each iteration.


Or just release it. If you're sure it's autoreleased then retain/release it. If you're not sure, just set it to autorelease before you retain/release it.


retain/release on an autoreleased object won't make it get destroyed any faster. You still have to wait for the event loop to cycle (or push/pop your own autorelease pool).


That's correct. That's something I read, have repeated but never bothered to actually test.


Assuming that's in his init method, he left

-(void) dealloc {

  self.newProgram = nil;
}

as an exercise for the reader.


Glad you liked that. It was fun to write.


I'm a mechanical engineer and don't know anything about coding except basics of C. This has inspired me to learn programming. I just downloaded Python and that free ebook mentioned in the post. I've finished the 'guess the number' program and 'dragon realm' program. Interesting stuff.


Fantastic! Shows you that good motivation is the key, in his case game programming. Also, encountering good books and some expert early on is a big boost. This is what a lot of professors lack: a sense of direction where you're headed so you get motivated.


This is a great article to show business cofounders who might be reluctant to learn how to code. Wonderful evidence that even folks with 0 experience can increase their coding knowledge (and thus ability to work effectively w/ hackers) by great strides in a short 6 months.


You've had some amazing progress, and really impressive for a beginner after only 6 months. Wow, keep it up!


Thanks for the encouragement!


Best submission title I've seen on HN in a long time. The actual article isn't bad, either. I salute you.


Haha I know it was fun writing that title.


Fantastic progress - keep it up and thanks for sharing! I'm looking forward to buying one of your future games on the app store.


How did you decide what type of projects to work on (ie how did you come up with your man-rodent game / what was the inspiration)? How much time did you spend every day programming?


From the comments on his article:

Some days I code for an hour or two, some days none, but sometimes all day long. Actually last weekend I pretty much never left the house. I coded the entire Friday-Sunday basically.


The games are still quite rudimentary, but it's nice to see him coming along. I wonder how far he will have come another six months down the line.


Yup, I'm hoping to get into more complex stuff the more I learn.


Great writeup. Looks like you've got some predisposition to programming since you've already learned a whole lot in a short timespan. Hopefully, we'll see some original indie hits from you in another six months or so.


Have you tried reading other people's code?

There's Knuth Literate Programming version of the classic Adventure [0] which you can read almost like a novel, and the source code for Spelunky [1] has also been released [2]. (I don't know whether Spelunky has good code, but it's a good game.)

Good luck!

[0] http://www.literateprogramming.com/adventure.pdf [1] http://www.spelunkyworld.com/ [2] http://spelunky.wikia.com/wiki/Source_code


Spelunky is made in Game Maker, which lets you script on top of a pre-existing engine and IDE. It's hard to apply to "bare-metal" coding.

I would point to open source games such as Nethack, Stepmania or Battle for Wesnoth for some ideas.


Nethack is probably a mess. Battle for Wesnoth sounds like a good idea.


Yes, this is truly inspirational (and a kick in the pants for me as well). Would love to see your progress in another six months.


Congratulations. You've certainly accomplished a lot in 6 months. Can you tell us how much effort this took? hrs/day days/week.


From the comments on the article:

Some days I code for an hour or two, some days none, but sometimes all day long. Actually last weekend I pretty much never left the house. I coded the entire Friday-Sunday basically.


After 15 years in the corporate world I've almost forgotten those exciting early days of programming. This article brought back the joy I felt when I figured out how to make the bad guy "home in" on the good guy - that was a turning point for me!

I need to do some true recreational programming again - just for the pure joy of it.


This is great. I'm working on learning objective-c in pursuit of making ios stuff as well and i can relate to many of the hurdles you've faced since I'm going through them now. It's frustrating but it's good to see someone come out the other side.


Welcome wblackall to HN. Inspiring journey. I hope you keep up with it and go far with your efforts. Inspires me to look at all the things that we coders are not familiar with and approach it with the same enthusiasm as you do.


I had a lot of fun reading through and seeing the progression of the games. I hope to start something like this someday. Keep it up!!


I took a course on iOS dev with Ray Wenderlich (mentioned there for his Cocos2d tutorials), and highly recommend his work.


link?


it's in the OP. But also http://ray.wenderlich.com


Seems like you had a lot of fun and good progress. Keep it up!

Did you submit any game to the app store, yet?


So you can program, but you should hire a designer.

Edit: this is not a barb at the OP, just a recommendation. I think his drive is in building, so why not make it easier on yourself by getting some help?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: