News for hackers. Stuff that matters.
Re:Notch live coding 0x10c by makmanalp on Saturday April 07, 2012 @01:59PM (#3811537)
Wow, maybe it's because he's done it a million times before, but it looks like he's super efficient, mainly because he's using the IDE's features to the max. He's also rapidly iterating at about 3-4 builds per minute.
Re:Notch live coding 0x10c by frou_dh on Saturday April 07, 2012 @03:04PM (#3811787)
Last time I watched his stream, he had a cool setup where he could edit the Java methods on the fly without restarting the game.
Re:Notch live coding 0x10c by JeanPierre on Saturday April 07, 2012 @03:25PM (#3811862)
Yeah, that's hotswap in practical use. When using debug mode in Eclipse, you're able hotswap - which basically means that you can change the content of a method while the program is running. When the method is called again, the new content will be executed.
Re:Notch live coding 0x10c by yellowbkpk on Saturday April 07, 2012 @04:40PM (#3812067)
Just a point of information: he can't do that here because the Java/OpenGL interface is all static Java methods (which only get loaded when the class loads the first time).
Re:Notch live coding 0x10c by julian37 on Saturday April 07, 2012 @05:12PM (#3812151)
I might be missing something, but how is that relevant? Surely there's no need to hot-swap any OpenGL API methods, right?

EDIT: Also, I googled a bit and I can find no indication that HotSwap doesn't work for static methods. Are you sure you're not spreading misinformation here? See for instance http://stackoverflow.com/a/9466778

Re:Notch live coding 0x10c by TazeTSchnitzel on Sunday April 08, 2012 @10:25AM (#3813909)
He was doing it here though.
Re:Notch live coding 0x10c by bobobjorn on Saturday April 07, 2012 @04:51PM (#3812090)
you can also do it with jrebel, which can reload alot more then debug mode.
Re:Notch live coding 0x10c by xuki on Saturday April 07, 2012 @02:09PM (#3811561)
I think the code compiles as he types so he does not waste a single second waiting for it to compile. Pretty impressive.
Re:Notch live coding 0x10c by danieldk on Saturday April 07, 2012 @03:06PM (#3811803)
Eclipse has a built-in incremental compiler (ecj), that is used to continuously give feedback.
Re:Notch live coding 0x10c by fleitz on Saturday April 07, 2012 @03:07PM (#3811805)
I use livereload for this when coding webapps, it's a massive productivity boost.
Re:Notch live coding 0x10c by edwinnathaniel on Saturday April 07, 2012 @05:33PM (#3812197)
Play Framework in the past embed Eclipse build-in Java compiler to avoid compilation step.
Re:Notch live coding 0x10c by yellowbkpk on Saturday April 07, 2012 @04:39PM (#3812057)
He's not even putting Eclipse's keyboard shortcuts to full use. If you have a passing knowledge of a few important key combinations you can move quite a bit faster than he is.
Re:Notch live coding 0x10c by jcrites on Saturday April 07, 2012 @04:47PM (#3812084)
What are some examples of shortcuts you recommend?
Re:Notch live coding 0x10c by edwinnathaniel on Saturday April 07, 2012 @05:26PM (#3812171)
Find your own workflow and memorize the shortcut keys.

Some of the keys I memorized:

F3 and F4 are must.

Ctrl + . = Go to (next) Error

Ctrl + 1 = Quick Fix (usually follow the above)

Ctrl + Shift + T = Open (T)ype (Java class/interface)

Ctrl + Shift + R = Open (R)esource (all files)

Ctrl + E = Show list of opened files in the IDE (if you type the file name it'll highlight/select it for you once this pop-up is active)

Format on Save - hook up your style with the Save action (right indentation, spaces, tabs, or whatnot).

Bind others that requires multiple steps (generate getters and setters).

If you're like me and use JUnit as a substitute for REPL:

Alt + Shift + X + T => run unit test.

Alt + Shift + D + T => run unit test in debug mode.

There are tons more if you know how to use Eclipse...

For Mac: swap the Ctrl key with Cmd.

Re:Notch live coding 0x10c by cageface on Saturday April 07, 2012 @08:46PM (#3812625)
I was doing some Java coding recently for the first time in a long time and I was really shocked at how good the synergy between Java and a good IDE can be. Java as a language is uninspiring but it's only half the story.
Re:Notch live coding 0x10c by edwinnathaniel on Sunday April 08, 2012 @12:05AM (#3813003)
Also check out Maven. Java, IDE (eclipse/intelliJ), and maven will give your productivity a turbo boost.
Re:Notch live coding 0x10c by dm3 on Sunday April 08, 2012 @06:17AM (#3813527)
A couple more not used by Notch:

Alt + Shift + i = inline variable/method

Ctrl + Shift + up/down = select the larger/smaller block of Java's AST

I also tend to create shorter keybindings for unit tests:

Ctrl + R = run unit test (from the test class file)

Ctrl + Alt + R = re-run last unit test