Live data from Hacker News

My first six months of programming: from man-rodent to partyman

whitakerblackall.com

21–30 of 37 posts

Re: My first six months of programming: from man-rodent to partyman

#21
post #13

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) { programming…

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.

Re: My first six months of programming: from man-rodent to partyman

#23

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.

Re: My first six months of programming: from man-rodent to partyman

#24
post #22

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.

Re: My first six months of programming: from man-rodent to partyman

#25
post #21
post #13

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) { programming…

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.

Re: My first six months of programming: from man-rodent to partyman

#26
post #2

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.

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

Re: My first six months of programming: from man-rodent to partyman

#27
post #26

Earlier quoted context omitted.

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

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/wi…

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.

Re: My first six months of programming: from man-rodent to partyman

#28
post #27
post #26

Earlier quoted context omitted.

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/wi…

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.

Re: My first six months of programming: from man-rodent to partyman

#29
post #21
post #13

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) { programming…

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.

Assuming that's in his init method, he left

-(void) dealloc {

  self.newProgram = nil;
}

as an exercise for the reader.

Post reply on HN