348 points · by slackpad · 12y ago · 196 comments
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.
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
I've had an idea brewing in my head for quite some time, and while I still don't quite have the words to express it completely, it more or less boils down to this:
There isn't necessarily a correlation between being a good programmer and shipping a successful product.
Now of course we can argue over the definition of "good programmer" and "successful product".
I started as a hobby programmer in my childhood and teens, then went to college, and since then have written code for various companies. For several of the earlier years (including college), I had this wide-eyed fantasy of the brilliant, beautiful code that I would work on once I became a "Real Programmer" (whatever that means).
My hopes and ambitions shattered once I got into the workplace and discovered some of the slop that I had to maintain. Then for a few years I was on a crusade to banish all ugly code from whatever project I happened to be working on at the time.
Lately I've realized that having pristine, elegant code is NOT the goal. The goal is to ship software that people actually use. I don't really know much about the internals of minecraft, but I do know that nearly half of the teenagers in my neighbourhood spend hours and hours playing minecraft.
I have to admit that I'm still an idealist at heart, and of course the best situation would be to have a project that is both externally successful and well-designed (making it simple to fix bugs and add new features and such), but I'm constantly having to remind myself to stop trying to get everything perfect and just write code.
It depends on the use case and business model of your software.
If you want to ship a single version of something then don't worry about code quality. If you're market testing and will get resources for a rewrite if the product takes off then again speed to market is more important than code shape.
But if you want to enhance the software or tune its performance then you need good code structure.
Does it work and will you maintain it?
In my experience I often had to often fix dozens of critical bugs of "getting things done" programmers.
I often hear "I will fix this later", "I will refactor it later", "but it works", "we can write tests later", "I will comment/document later", "I will clean up later" from these people giving it to maintenance programmers who rewrite the stuff, cause it is too ugly to deal with.
That's a big problem. People write code and other people have to fix this "but it works" code. Great, when you have a node.js application only running cause there is try catches around things hiding all the errors, killing the logging back end.
If you are the only one to read the code than it's fine to do whatever you want with it, as long as it works. But usually code that really works is well-written, well-commented, tested, etc.
Now, frequently, a game-designer may also be a game-developer (someone who takes a ruleset that's already known to be fun, and builds a solid game engine to enshrine its behaviors), and a game UX designer besides. But this doesn't have to be the case. Miyamoto doesn't code or do UX. Will Wright doesn't code or do UX. And Notch should be in roughly the same category.
Obviously, there might be some dysfunction at Mojang that results in prototypes getting shipped instead of developed—but that's a separate issue.
Probably not much now, but Will Wright did code his early games (eg. Raid on Bungeling Bay , SimCity, etc).
Notch is inspiring to me the way people like Carmack are not, because I know I'll never be a Carmack -- he's operating on an entirely different level than me. But Notch was able to change the world as a regular programmer plugging away. What he does not seem hopelessly out of reach of my capabilities. You can have a huge impact just being 'good enough'!
(and 'terrible' is hyperbole -- certainly most of the programmers around me at work could not get a 3D engine with Dart up and running in a week, or design a cpu and assembler -- even bad ones.)
Fuck, most of those I know couldn't get a basic CRUD app up and running in a week...
When I listen to Toots, I'm thinking, "This is amazing, and wonderful! Aw man, I could never do anything like that."
When I listen to Stevie, I'm thinking, "This is amazing, and wonderful! Wait a minute... It's not that complicated. Maybe I'll never have the soul Stevie does, but if I can't do exactly that, maybe I could do something like that!"
Notch isn't in the same league as a John Carmack, for example. The most recent release of Minecraft saw massive changes to the underbelly of the game, all of which is being done by Mojang staff other than Notch. The game does have a ton of warts, especially where modding is involved, which can be traced to some of Notch's technical decisions.
Does that mean that Notch is a bad person? A fool? No, neither. Notch had a vision for Minecraft, followed it, and because of that work is now a very rich man who can afford to play with whatever technology he wishes. I wish I was like Notch.
Let's not shoot the messenger here.
The modding API consists of decompiling the entire thing and monkey-patching it. Does anyone else see a problem with that?
It's such a fantastic game but it's really unfortunate.
> "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."
Take it for what you will.
So, he's a pragmatic programmer that gets shit done -- to the point of being able to design his own toy CPU architecture (which already puts him above 90% of the programmers out there, including people that HAD hardware architecture classes at university).
Sorry if he doesn't live up to your standards...
Not sure what the CS curriculum is in other countries but back where I'm from they had basically taught us enough by the middle of the second year for one to be able to design something like DCPU16 using only that knowledge.
In other words, it isn't that hard, especially when you're surrounded by examples. I would expect a second-year undergrad to be able to accomplish that.
Yes, but then you are also dead wrong.
Notch writes terrible code.
Coming in years later when everything has grown tremendously and saying that many of the early design decision were wrong, is so ignorant it infuriates me.
http://tech-beta.slashdot.org/story/13/11/01/1324209/larry-p...
The Instagram founders didn't have a programming background:
http://thenextweb.com/2012/04/10/instagrams-ceo-had-no-forma...
My take away is that beyond getting the job done, joining the priesthood of programmers is pretty low on what's important.
If you want to be successful, focus on the other things then hire a bunch of programmers to continue your dream once you hit it big. By the way, make sure the interviews are insanely difficult and keep your geeks out of the weeds (e.g. HN). Geeks love to play in the weeds!
Are we on the same site? I've been reading HN since it was called Startup News, and I have never felt such a disconnect before.
> The Instagram founders didn't have a programming background
Instagram could be worth a trillion dollars and I wouldn't give a shit about it. Show me the code. Satisfy me intellectually. Not everything is about money, and that is part of the reason I call myself a hacker--coding for the sake of coding and what not.
Mike Krieger got a degree in Symbolic Systems, which requires quite a few CS courses.
If you spend your evenings learning to program, as the article claims, how do you not have a programming background? John Carmack, who is considered a programming god by many, which can even be seen in this very discussion, also has very little formal training. I don't think that means he doesn't have a programming background.
I don't think just saying that makes it true
I don't know Notch's abilities, but from one of his LD videos I can tell he's very focused and knows his craft.
He's your tech co founder when you want to flip fast. Not your first engineer hire.
everyone wants another Carmack, but while productive, he is not (yet?)
anyway, i haven't shipped any blockbuster game (it is not even my job to do so) so i will see myself out now.
Because he programmed game play routines a lot and dealt with everything involved (i.e graphic rendering and such) more than the average Joe it looks like he is a good programmer because he just shakes it out live on some streaming website. Those concepts are language-agnostic and you can remember them.
what you would consider 'good code' wasn't Notch's goal, doesn't mean he isn't capable of it
You sir, are the kind of person who honestly believe that you're better than everyone else, and quite frankly mate, you aren't.
Are you a multimillionaire? Sometimes it's not about the code quality, it's about the ability to produce a product.
I don't revere Notch, but I do think he's a better developer than most, especially you.
He uses poor OpenGL practices, and sees poor performance as a result. He also designed the entire product in a way that makes it cumbersome to mod, without a consistent interface or a logical way for mods to work together. Modding Minecraft as a whole is one big hack.
I'm more familiar with the networking side of things. The Minecraft networking protocol is a mess. There are 9 or 10 different ways to encode a vector in the protocol. He made up "Named Binary Tags", a dictionary serialization format, which could have better been served with existing tech. He frequently misuses signedness in the protocol. He made up another obtuse dictionary format for describing entity metadata. He screwed up backwards compatibility for the only thing that needed to be backwards compatible - three times. His colleagues later screwed things up even more.
Terraria is currently a good example to compare with the situation of Minecraft. I don't know how both is made (except some stuff that my friends told me about Minecraft) but all I know is that most Terraria player made fun of Minecraft in the last big updates because they had SO MUCH content added when Minecraft had nearly nothing more.
If he's trying to write fun games that won't be updated, yeah, it's fine. Except that it's not the goal of Minecraft (at least I hope it's not...).
In the interest of my own self-improvement, could you elaborate a bit on this?
EDIT: I see that you've already talked about this a little bit, but if you'd like to elaborate further I'd be OK with that.
If modding was high on their list of priorities, I'm pretty sure they would get it right.
"Minecraft is not officially affiliated with Craft.Net."
Oh come on.
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?
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.
There is a middle area here, where one doesn't worry about perfect code, but still takes a moment to consider design. However, you don't hear that often on HN, because it loves a good "Such coding, so productive!" circle-jerk. The reality is that a lot of "get it done fast" programmers could use a maintenance project or two, and develop the habit of actually thinking about what they write.
But no, lets hate on maintenance programmers and people who want some thoughtfulness in their development. They're just not agile enough. eye roll
If his goal is to create code that other programs will love to read, then maybe he is terrible.
If his goal is to create software that millions of people will enjoy, then he is amazing.
My guess is that he would describe his goal as the latter. Maybe his goal is different from yours.
Nothing -> something that works (in any way possible, spaghetti code, written quickly) -> something that works (clean refactored code that can be maintained/improved/changed).
You can't skip step 2. If you do, you will likely spend more time overall.
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!
A computer SCIENTIST should scorn the use of the "blub" notion as something that holds a priori.
DJGPP and RHIDE as well.
It was not common to use a separate editor apart from the "programming environment"
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.
"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.
I'd guess because it offers more structure than JavaScript. You have classes, packages, and you can just `import` things. You also get proper tooling. You can also overload operators, which is kinda nice for games (vector math).
He wrote a lot of Java and AS3. Dart is very similar. Just a bit terser and a bit "scriptier".
The Norvig quote sounds more reasonable.
John Carmack: "Thoughts on Haskell" https://news.ycombinator.com/item?id=6278047
1. He investigated it long after he had already been successful using something more mainstream. If you are starting something up then I think it would be good advice to use what you know and get on with it. If that's Haskell then good for you. If its not then don't waste your time. Get on with the product.
2. Even then he didn't finish rebuilding his game because he was drawn back to his day to day work. The guy is just product focused.
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.
(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.)
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.
The hard part is always the details and the new stuff.
You probably haven't been writing games as long, or written as many, or entered as many game contests/competitions as he has.
It'd probably take him a while to write a database or word processor since he likely doesn't have the domain knowledge and experience.
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.
I have several still-unfinished Game Maker apps which more or less died because I got so bogged down on the "engine". So yeah.
(I've never really gotten far writing a 'from-scratch' engine here but I'm also thinking of things like integrating a scripting system into an existing engine, which is something I've done before).
With an engine, you don't start with such a nebulous spec. You know, for example, the various pieces that your engine will need and it's easy to get started. You can say "well I need an asset importer", "I need to integrate a scripting system for gameplay", "I need some kind of rendering pipeline", etc. These are generally well-defined things.
With a game, well, what is there? You start off with the question "what is a fun game idea?" but in comparison it's so free-range. The ideas of where to head next just don't come as easily. Not to mention a lot of the non-programmer things that need doing - drawing the graphics, writing the music, writing the dialog if appropriate, etc. These can be intimidating things to attempt to do.
Minecraft just got a little bigger than I imagine he was interested in playing with.
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
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 :)
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.
Rectangle(100, 100, 400, 400)
That or something very similar [1] draws a rectangle from pixel position (100,100) to (400,400) in many high level 2D graphics environments. Just posting this to point out that you do not have to make things more complicated than necessary.OpenGL is a standard for hardware accelerated 3D graphics and it is inherently complex because of that. If you just want to do 2D do not bother with it.
(It's not literally just for kids.)