
Notch, WebGL, Dart, and ramping up quickly - slackpad
http://blog.tojicode.com/2013/12/notch-webgl-dart-and-ramping-up-quickly.html
======
kleiba
_Now, I haven 't seen one line of Notch's code. I have no idea if it's well
structured or spaghetti. I would make an educated guess and say that there's a
lot of the basics in this project that have been ported over from the
Minecraft or 0x10c code._

This last point is rather unlikely I think. I spent more than one or two weeks
worth of time watching the various screencasts you can find on twitch.tv of
Notch coding (I find it highly relaxing).

He usually writes everything from scratch. He doesn't copy & paste from other
projects because he's experienced enough to pretty much to just write down the
code he wants. He also hardly ever looks up documentation (besides using
autocomplete for library methods). Also, he practically doesn't write any code
comments in these toy projects.

He's extremely productive in my opinion, and can easily spend hours at a time
coding. He does a lot of play testing and small gameplay fixes, even at early
stages.

I've learned a whole lot just watching these videos. For instance that we
don't have the same taste in music :-) But thank god for twitch.tv.

~~~
Sir_Cmpwn
I've also spent time examining Notch's coding habits.

He is a terrible, terrible coder. Minecraft was (and still is) an unoptimized,
poorly designed piece of crap when he handed it off to the rest of Mojang. The
DCPU-16 he designed had many flaws and his assembler for it threw out assembly
convention. He makes very basic mistakes very frequently and his core designs
are flawed.

I say this as someone who has spent a considerable amount of my life [1][2][3]
figuring out this terrible crap and working around it. Notch is a very bad
programmer, and people only revere him because he made Minecraft.

To reply to you all at once: regardless of his ability to create or ship a
game, which is not in question, his ability to _write good code_ should not be
idolized. His failures have tangible reprecussions that have long plagued the
Minecraft hacking community and Mojang itself.

[1]
[https://github.com/SirCmpwn/Craft.Net](https://github.com/SirCmpwn/Craft.Net)

[2] [https://github.com/SirCmpwn/Tomato](https://github.com/SirCmpwn/Tomato)

[3] [https://github.com/SirCmpwn/organic](https://github.com/SirCmpwn/organic)

~~~
corresation
_Notch is a very bad programmer_

I despise this sort of single-dimension haughty evaluation of programming
"goodness": It is garbage, and is the dismissive grenades that a particular
type of maintenance programmer tosses to feel better about themselves as they
try to feed the family with sloppy seconds.

I single out maintenance programmers because there is a stark difference
between creating something out of nothing, and being the guy who looks at that
something and -- with all that is laid in stone in front of you, all of those
unknown lands revealed and detours and dead-ends made evident -- can say "Oh
clearly you should have A->E->Z: What a dummy!".

All novel works can be improved in countless ways, iteratively. This is a
given of software development, and the fear of having to go through this
inevitable process has stopped most projects before they've ever begun.

"His failures have tangible reprecussions that have long plagued the Minecraft
hacking community and Mojang itself."

There is so much irony in this statement. Do you even realize?

~~~
vectorpush
Agreed. A programmer maintaining a new project is going to feel frustrated
when the application cannot be easily extended in a way that they expect, but
the original author should be forgiven for not predicting every possible
future permutation of their existing code base. The best design decision might
seem obvious from the maintainer's perspective, but given 100 different
maintainers, you'll end up with 200 different solutions, half of which will
make the original application seem ridiculous when framed in the context of a
massive rewrite that takes into account every business decision that time and
experience has yielded since the start of the project.

Further, there are times when a good programmer must _deliberately_ exclude
forward thinking solutions because a _non-functioning product_ precludes a
successful business. Yes, it should still be a secure solution. Yes, a TODO
label may be warranted, but a surefire way to get yourself labeled as a bad
programmer is to spend weeks working out "future proof" solutions while the
competition is shipping an application that can be successfully executed.

~~~
Jormundir
Though there are some good points here, my experience has been that this "just
get it done" above all else principle has sunk just as many projects as it has
launched.

Getting it done is a bare necessity of a good programmer, but what separates
the mediocre programmer from a good programmer is whether they get it done in
a more maintainable fashion.

It is completely ridiculous to say as long as one can get a product launched,
they are a good programmer, because you're likely praising a group, half of
whom are good programmers, and half of whom are sinking the product more and
more over time. This is a common happening I see with praise of engineers from
a management perspective, and why so often companies sink without knowing
where exactly they went wrong.

You can judge if a programmer is good, not by tearing apart and poking at the
mistakes they made in a new project, but if they proceeded to code using
strong abstractions and decoupled code. The easiest programmers to fire are
the ones who don't ship, and the programmers that tend to be the costliest to
a business are the ones who ship crap code.

~~~
vectorpush
I didn't say above all else, but I take your point. Of course, this is a
balancing act, and I suspect we're both facing some selection bias, but I have
to disagree that creating maintainable code is necessary for being described
as a good programmer. At the end of the day, all programs are maintainable, as
long as the source can be read and understood by a programmer. There is a huge
advantage to having a well designed application structure, but there is no
replacement for an application that meets its functional specification.

------
discreteevent
I don't want to criticise the blub essay too much because there were some
valid points in there. But in fairness as soon as I read it I thought of John
Carmack. He uses C++. Given that the perspective of the essay is Lisp then if
C++ isn't a blub I don't know what is.

 _But John Carmack is really productive._

Also he doesn't use vi or emacs. He uses an IDE! He used it even before it had
any bells or whistles at all. (He also uses Windows!)

So is it because he's a genius and he does it in spite of using blub? Or is it
because:

"Peter Norvig here. [....] In terms of programming-in-the-large, at Google and
elsewhere, I think that language choice is not as important as all the other
choices: if you have the right overall architecture, the right team of
programmers, the right development process that allows for rapid development
with continuous improvement, then many languages will work for you; if you
don't have those things you're in trouble regardless of your language choice."

As for Notch. He uses Java and wait for it..

Eclipse!

~~~
melling
So, why do you think he went with Dart? You're kind of telling us that what he
chose didn't matter, but he must have had his reasons for jumping into a new
technology.

We probably can't infer much from Notch's use of Dart beyond the fact that the
technology is baked enough for real world use. I guess someone could always
ask Notch for his opinion on Dart, after he's used it for a few more weeks.

~~~
discreteevent
The primary reason no doubt is because it enables him to deliver over the web.
There are other languages for this but I have no doubt that in Notch's case I
have no doubt its because he feels he can be productive in it and that is
because it is similar to what he knows. He was asked on reddit why he chose
java and he had a really simple answer:

"Because I know it"

Given the massive language debates that are out there I thought this was
pretty refreshing and indicative of a successful person whose focus is
elsewhere.

Myself I think Dart is a massive improvement over java and I could probably
debate it all day. But then again I'm not as successful as Notch, maybe I
should ease up on the debating.

------
barrkel
This is less a matter of only writing what's needed, than having written the
same thing in lots of different variations, until you know the essence of the
problem, and which are the most elegant paths to take.

A beginner in any discipline can't accomplish so much with so little effort.
And it's wrong for a beginner to start out trying to do so, IMO; it's too easy
to get discouraged if you think from the start that you should be able to do
it with so little effort.

Writing your first game loop is a bit clunky, trying to fit it in with
whatever framework / language / API is hosting you, and the sequencing / setup
of everything. The tenth time, you know exactly what you want from an API, and
have a good idea of what bits you need to build to get the effect you need.
The hundredth time, you can look at a new API / framework and see the what it
enables you to build most efficiently, and you can let that inform the design
of what you create. Then, very little effort is needed. But that's only
because you've already done the "really complicated system for loading meshes
and shaders" or some equivalent in the past.

It's hard to get really efficient without having done things the inefficient
way to begin with, if not earlier in the current project, then in previous
projects.

------
xradionut
I don't know why the blog poster is impressed. This is Notch's domain, writing
code of this ilk. He's probably got over a decade or more dealing with games
and graphics, the hard part is dealing with a API that's unfamiliar.

(I have ported familiar code from a Python script to a C# desktop application
in similar time, the hard part was dealing with various .NET quirks.)

------
ps4fanboy
"Just saw a nerd flamewar debating if I'm a bad programmer. I'm self-taught,
prefer working along, and program for fun. Don't learn from me."

[https://twitter.com/notch/status/408011329237049344](https://twitter.com/notch/status/408011329237049344)

Gotta feel sorry for him, he didnt ask to be or not to be an idol, must be
disconcerting to have a bunch of random strangers talking about how good you
are.

------
dicroce
I agree with his main point, but to be honest, on most of the games I've
worked on I've had something playable very fast (1 or 2 weeks)... Its all the
details beyond basic gameplay that take all the time and really make
delivering a game hard.

~~~
RyanZAG
Agree completely. Basic little 3D engine is easy to do because it's been done
so many times before. Any of the complexities are well known and it's not like
Notch hasn't made a similar block based 3d engine before. The author talks
about not making an engine and just making a game.. but there's no game here
yet?

The hard part is always the details and the new stuff.

------
HeyChinaski
Now I feel bad for slowing up my current pet project by getting bogged down
writing polygon collision detection when axis aligned bounding boxes would
have done for prototyping. (I'm not as quick as Notch!)

~~~
Djehngo
My understanding is that usually you want both because AABB is good for broad-
phase because it's so quick then true polygon collision can be done in a
narrow phase.

~~~
HeyChinaski
Absolutely.

------
cromwellian
Dart syntax is very similar to Java in many respects, but simpler, so is it
really any surprise that Notch would try out Dart, given his history with
Java?

People like what's familiar. One of the reasons Java took off is because of
it's similarity to other ALGOL type languages. C/C++ programmers could learn
Java quickly for example.

------
ntide
You know, I read Hacker News less and less precisely because the posts are so
damn negative. For those debating whether Notch is good or bad, I suggest
reading every article from programming in the 21st century.[1]

[1]
[http://prog21.dadgum.com/archives.html](http://prog21.dadgum.com/archives.html)

------
krapp
>Don't build an engine that you will someday build a game on top of, because
you will never get past step one.

I have several still-unfinished Game Maker apps which more or less died
because I got so bogged down on the "engine". So yeah.

~~~
aidenn0
In this case, I see an analogy with the whole "Do it manually with a few
customers" advice for startups that pops up from time-to-time. You write the
damn code from scratch and see what gameplay is interesting, then you can
write tools within that domain.

~~~
krapp
Now that html5 is a thing that would definitely be doable.

------
jdonaldson
Ultima Underworld continues to blow my mind. Happy 22nd birthday.

------
detritus
ahha, thanks for this! I'm really pleased to see Notch doing what I always
thought he did best - messing around with wee projects and coming out with
joyous little playthings.

Minecraft just got a little bigger than I imagine he was interested in playing
with.

------
missing_cipher
Where would a noob to this kind of stuff start? I'd like to draw a rectangle
to the screen. :)

~~~
habith
I found NeHe's tutorials to be easy to follow especially since code that's
ready to compile is provided at the end of each lesson:
[http://nehe.gamedev.net/](http://nehe.gamedev.net/)

Most of them focus on OpenGL for windows.

I just searched and found this WebGL tutorial which says it's based on NeHe's
so it's hopefully good:
[http://learningwebgl.com/blog/?p=28](http://learningwebgl.com/blog/?p=28)

Disclaimer: I'm not a game developer and I barely dabble in the 3D world, so
take my links with a huge grain of salt :)

~~~
exDM69
Stay away from NeHe tutorials, they are badly written and really old. Pretty
much everything they cover is deprecated and done in otherwise old fashioned
ways.

This is a big problem with OpenGL tutorials in general, a lot of them cover
old stuff that shouldn't be used any more.

The entire OpenGL fixed function pipeline is deprecated, replaced by
programmable shader pipeline. It's a lot more work to get simple stuff done
with shaders but it pays off in the end.

If you're looking to write a game (and not an engine) it may be a good idea to
get an engine and not write "raw" OpenGL at all.

~~~
BlackDeath3
If all you're looking to do is simple stuff (like get a rectangle on the
screen), shaders are not required, correct?

~~~
Narishma
They are, unless you use old deprecated versions of OpenGL.

~~~
BlackDeath3
So the simplest program using the simplest shader would use a pass-through
shader that doesn't modify the inputs?

------
Xdes
All that stuff sounds so cool, but I have no idea of how I would implement it
in code. One of these days I'll learn 3D graphics programming.

~~~
agentultra
I recommend [http://www.amazon.com/Math-Primer-Graphics-Development-
Editi...](http://www.amazon.com/Math-Primer-Graphics-Development-
Edition/dp/1568817231/ref=sr_1_1?ie=UTF8&qid=1386098622&sr=8-1&keywords=3d+math+primer)
when you're ready

