Live data from Hacker News

Coding Skill and the Decline of Stagnation

notch.tumblr.com

31–40 of 206 posts

Re: Coding Skill and the Decline of Stagnation

#31
post #3

"I had to work on programming more carefully and think things through before diving in, or I’d have a hard time working in a large group." This pretty accurately describes what I went through before joining a larger organization. However sometimes larger companies train you into a mentality of working fast and letting QA sort it out, which isn't always the best thing.

After watching notch code a bit, I'd say that the way he dives in and works has been very successful for him. It's a different style but I don't think it's bad in of itself. I might definitely be bad when working in large groups, but that is not the only way to work. I personally don't think working in a large group is particularly rewarding for a programmer.

It's easier to "dive in" when it's a short term project that you are working on alone and it's in a problem domain that you are familiar with (in notch's case games programming).

I'm at the point know where I can build an E-Commerce site in an MVC framework and implement Client & Admin Logins , Stock management , product search and a shopping cart without having to engage my brain because the structure to me is fairly obvious.

On the other hand if I had to design a game I would have to think long and hard about how the different components would fit together and even then I would most likely get it wrong somewhere.

Re: Coding Skill and the Decline of Stagnation

#32
post #13
post #11

"I still stubbornly believe the whole “private members accessed via accessors” thing in java is bullcrap for internal projects. It adds piles of useless boilerplate code for absolutely no gain when you can just right click a field and chose “add setter/getter” if you NEED an accessor in the future." Is this a controversial stance? It seems like common sense, unless I'm misunderstanding something. EDIT: To clarify: I…

Controversial might be too strong a word, but there is a counterargument to be made. Suppose you have a member named "x." Someday, you might want to stop storing x, and instead make it a calculated value. At which point you'll need a method. Or, when setting x, you may someday want to increment a counter, or transform the input data, or take some other action. Again, you'll need a method. Yes, it's very easy to add a…

Code bloat, at least _compiled_ code bloat, tends to be less on an issue with trivial accessors in C++ since they are generally inlined, but it does add a lot ()s. For non-trivial accessors, yeah, you can inline a lot of copies of that logic.

Vector v1(v2.getX(), v2.getY(), v2.getZ()); vs Vector v1(v2.x, v2.y, v2.z);

Re: Coding Skill and the Decline of Stagnation

#33
post #18
post #15

When watching Notch code I noticed a lot of code smelly habits, relying on inheritance over composition is one example. But my god his level of productivity and ability to get shit done is lightyears ahead of your average programmer, and you got to respect that more than anything.

Is Notch's coding habits supposed to be common knowledge? Got any links?

http://www.twitch.tv/notch/b/302823358

This is the start of the 48 hour video showing him building a 2d game for the lundum dare compo.

Re: Coding Skill and the Decline of Stagnation

#34
post #13
post #11

"I still stubbornly believe the whole “private members accessed via accessors” thing in java is bullcrap for internal projects. It adds piles of useless boilerplate code for absolutely no gain when you can just right click a field and chose “add setter/getter” if you NEED an accessor in the future." Is this a controversial stance? It seems like common sense, unless I'm misunderstanding something. EDIT: To clarify: I…

Controversial might be too strong a word, but there is a counterargument to be made. Suppose you have a member named "x." Someday, you might want to stop storing x, and instead make it a calculated value. At which point you'll need a method. Or, when setting x, you may someday want to increment a counter, or transform the input data, or take some other action. Again, you'll need a method. Yes, it's very easy to add a…

Gosu supports a property syntax that lets you use = to assign things to get/set method pairs. In fact, when you load existing Java code, it replaces getFoo() and setFoo(foo) methods with a property.

This makes the code neater and enforces the abstraction--the user of the property does not need to know whether you've implemented it as a simple variable or a complicated method.

A bunch of other language let you do this as well.

Re: Coding Skill and the Decline of Stagnation

#35

There is no "Gospel" when it comes to programming. There is a lot of code out there that isn't pretty, but it works and brings money into businesses. I think we can all agree that Notch didn't make any mistakes. Minecraft is a huge success. They are called "best practices", not "the only practices". But good for Notch to want to be like everyone else.

I think he wants to improve his design skills , not necessarily "be like everyone else"

Just because minecraft is a success does not mean there are not going to be parts of it's codebase that could be improved in such a way that it would improve their ability to iterate and add more features quickly in future.

Re: Coding Skill and the Decline of Stagnation

#36
post #12
post #9

I think the biggest thing he emphasized is the fact that you can never be "The Best Programmer" because there is always something to learn and ways to grow. That is probably one of the keys to a good developer, they know that there is still plenty for them to learn.

Yeah. A couple of times, I've met people who have "dabbled" in programming - maybe done it for a year or two professionally - and said they left the profession because they's pretty much learned everything there was to know about programming. I'm always impressed with their capacity to absorb so much, since I started programming when I was 8 (on a ship, in the middle of the Atlantic, without a computer) and I'm now 3…

Well it depends. You could probably never stop learning the tools or the new languages; they're continually re-invented. However you can certainly become bored with it; learning new tools and languages becomes a skill in its self. At which you think i've learned a new tool, so what?

Re: Coding Skill and the Decline of Stagnation

#37
post #11

"I still stubbornly believe the whole “private members accessed via accessors” thing in java is bullcrap for internal projects. It adds piles of useless boilerplate code for absolutely no gain when you can just right click a field and chose “add setter/getter” if you NEED an accessor in the future." Is this a controversial stance? It seems like common sense, unless I'm misunderstanding something. EDIT: To clarify: I…

[deleted]

Re: Coding Skill and the Decline of Stagnation

#38

Earlier quoted context omitted.

Eh, using protected/private members is one of those things that makes sense only insofar as you are paranoid that you can't just access internals directly. That said, consider the following. I've got a renderer that accepts a sprite to draw. Version 1: I pass the sprite object to the renderer, and the renderer gets the texture contained in the sprite and draws it, scaling it according to the sprite's size and positio…

Oh, and for good measure--everytime you force yourself to use an accessor, you are providing the opportunity for somebody down the line to add debug and validation code. Or to add locking and critical sections. Or replace a dumb get and recalculation with caching. Or replace caching with a dumb get. Or a database access. This flexibility is not something you might think you need. You might also never need to debug yo…

> Oh, and for good measure--everytime you force yourself to use an accessor, you are providing the opportunity for somebody down the line to add debug and validation code.

So add it then. Don't pre-generalize everything just in case.

Re: Coding Skill and the Decline of Stagnation

#39
post #11

"I still stubbornly believe the whole “private members accessed via accessors” thing in java is bullcrap for internal projects. It adds piles of useless boilerplate code for absolutely no gain when you can just right click a field and chose “add setter/getter” if you NEED an accessor in the future." Is this a controversial stance? It seems like common sense, unless I'm misunderstanding something. EDIT: To clarify: I…

The getter/setter stuff in java is a huge waste of space and time. However, at least in the enterprise space, all of the tooling and frameworks assume your code follows the java bean naming conventions. For this reason alone I always make sure all my classes follow the pattern and whenever I train new developers I make sure they get a large amount of experience building out bean definitions and understand how much time is saved with Spring and Hibernate as long as the conventions are followed.

But yeah, its a bunch of ridicules, generated spam.

Re: Coding Skill and the Decline of Stagnation

#40
post #15

When watching Notch code I noticed a lot of code smelly habits, relying on inheritance over composition is one example. But my god his level of productivity and ability to get shit done is lightyears ahead of your average programmer, and you got to respect that more than anything.

Show me someone who doesn't have code smelly habits and I'll show you a book author or a pedantic blogger -- not a production coder.
Post reply on HN