8 ms·
On a similar note, Minecraft is written in... get this ... Java Which seems to be the dorkiest and most uncool language on the planet if you were to ask HN.
by nihilocrat 16y ago
On a similar note, Minecraft is written in...
get this
...
Java
Which seems to be the dorkiest and most uncool language on the planet if you were to ask HN.
- derefr 16y agoEh, a good programmer can just treat Java as an object code format, compiling it in their heads from something like Scala or Clojure. The real problem isn't that Java is spent, it's that (most) Java programmers are dorky. I avoid the language mainly to avoid associating with the community.
- ido 16y agoFunny, the java community is one of the best and most helpful I've encountered. Much better experience than I've had with the supposedly enlightened lisp community. Also, Markus programs in straight java, not scala or clojure.
- derefr 16y agoI didn't mean to imply that Notch doesn't program directly in Java—just that, like a C programmer writing assembler will write assembler with C conventions (like almost always passing parameters on the stack, etc.), a programmer who knows [any other non-Blub language] writing Java will think of things in terms of higher-order functions, duck-types, etc., then just type it in in a way java understands (many small anonymous classes, wide hierarchies supporting simple interfaces, etc.) Let me restate the problem another way: there are many more programmers who only know Java, than programmers who only know [other language X]. Single-language programmers usually aren't familiar with very much theory, and don't know any design-pattern-like abstractions, borrowed from intrinsic features of other languages, that they can put in place instead of just writing tedious, repetitive, dorky (er, I mean, "enterprise") code. 90% of Java's libraries are very, erm, "enterprise."
- cscotta 16y ago> 90% of Java's libraries are very, erm, "enterprise." Are they? Apache's Commons collection of libraries such as ArrayUtils, StringUtils, IO, and the like, along with JSON-Simple/jvYAML, the servlet API, any database driver, Log4J, and just about every other library I use on a daily basis has a clean, focused, well-designed, and impeccably well-documented API. I'm sure there are no shortage of "enterprise-y" libraries and APIs, but could you offer a few examples of common, popular libraries used in a large portion of J2SE (not EE) projects whose APIs are poor on a level beyond that which may offend your aesthetic sensibilities? Some that come to mind for me might be Swing (I don't write GUI apps), but am curious to hear what you've encountered.
- ido 16y agoLet me restate the problem another way: there are many more programmers who only know Java, than programmers who only know [other language X]. Is this little bit of personal opinion by any way confirmed by evidence? I know many more programmers who only know php, actionscript, or perl than programmers who only know java. I know you're not one of the cool kids around here if you don't build compilers in haskell, erlang or some dialect of lisp but this unsubstantiated anti-java sentiment is ridiculous. I've programmed in a dozen+ languages (including scheme and python, which seem to be considered acceptable with the cool language crowd) and consider myself proficient with 4 of them (as in - I would have no problem starting a new project in those languages and will not often need to look up language docs) and for many uses I still prefer Java. I suspect I am not the only one who shares that sentiment.
- derefr 16y agoAgain, I'm not saying Java-the-language is bad. Java can be the best tool in a programmer's toolbox for many things. But, overwhelmingly, Java schools make Java programmers that only wield the Java hammer on every nail they find. If your first language is PHP, or ActionScript, or Perl, it is very likely that you picked it up on your own—and thus are interested in the topic of programming in general, and will continue to learn from there, picking up bits of programming theory and new languages as you go. However, if your first language is Java, you learned it in school, because that's what they taught—you didn't yearn for anything more—and then there was a big bubble of EE employers ready and waiting to insulate you from the rest of the programming universe. Straight out of school, you start work for one Java company, and then transition to another, and pretty soon you're 32 and don't know what a combinator is or how you could possibly implement something like the JVM. Having attended one of these Java schools for a semester, I can guarantee you that no one who graduated from there will ever learn another language. They know what they know, and they're happy with that. That what they know is Java is immaterial, except that that means that only knowing Java, by Bayes' law, becomes a positively-weighted-feature in the detection of these work-a-day programmers who need to be avoided at all costs if one wants to hire in a startup.
- elai 16y agoMost of the pain of java comes from its library and developer culture. It tends to so much verbosity and unnecessary stupidity. Look at the nightmare of the Java Calendar/Date classes. If you got the right libraries and code base it isn't that horrible. The game industry standard is mostly C++/C with content scripting in lua/python.
- raganwald 16y agoA plumber climbs out of a manhole, and his arms are covered with - guess what? - excrement! A beautiful little girl in a beautiful white dress happens to pass by. The plumber seizes the opportunity and quickly, but firmly sweeps his hands over the girl’s white dress. Little girl (appalled): AAAH!! Plumber (outraged): Oh yeah? I bet you love to take a shit though. http://www.yosefk.com/blog/the-cardinal-programming-jokes.html http://www.yosefk.com/blog/the-cardinal-programming-jokes.ht... So yeah, Java is dorky and uncool, but I bet we love to play Minecraft (I don't know, since I haven't played a video game in at least a decade).
- lrm242 16y agoThe poop leaves my bottom and goes into the toilet. I never touch it. Do you?
- yafujifide 16y agoActually, you do touch it.
- Groxx 16y agoWith your arms?
- billybob 16y ago20 years later, the girl is still in therapy.
- deleted 16y ago[deleted]
- ojbyrne 16y agoI suspect that the Lightweight Java Game Library is seeing a spike in downloads.
- SwellJoe 16y agoI hate Java and I haven't done any game development since I was a kid, and I thought, "Hmm...I should check that out!"
- city41 16y agoIt's a well written library, however it's not an engine or a framework. All it does is enable OpenGL, OpenAL and game pads in Java. The LWJGL team just calls it an "enabling" library.
- p0nce 16y agoDerelict is an enabling library for D which provides more bindings than LWJGL, on Linux, Mac OS and Windows. You get native code and no plugins are needed. Just sayin'.
- city41 16y agoThank you for pointing this out, I had no idea. I've always been curious about D and at the same time am looking for the ideal toolset for cross platform game dev. Definitely going to look into this.
- metamemetics 16y agoIf you hate Java check out SFML: Simple Fast Multimedia Library It's in C\C++\.NET but also has bindings for Python, D, and Ruby. http://www.sfml-dev.org http://www.sfml-dev.org If you want to do 3D but aren't up for writing OpenGL, check out OGRE3D. Open-source and former Diablo 2 developers from Bizzard North released a game called Torchlight with it recently. http://www.ogre3d.org/ http://www.ogre3d.org/
- 16y ago
- msie 16y agoI wonder if this will get more people doing 3d games in Java. It certainly is a ringing endorsement. Java has some nice features over C and C++ and the performance is good enough as demonstrated by the game. Plus it has a very good collection of libraries.
- msie 16y agoForget Valve or Bungie, pretty soon Oracle will come knockin' on his door. ;-)
- cynest 16y agoHis Swedish door. I'm pretty sure the pirate party would have a field day were that to happen.
- masklinn 16y agoOracle?
- whatusername 16y agoFor using Java. The joke being that Oracle are suing Google for the Java in Dalvik/Android -- next they'll be after Minecraft. Dear HN: If someone asks a serious question in the comments -- there isn't a need to downvote them. Downvote crap like "f1rst p0st" - leave questions as they are.
- varjag 16y ago..so that's why it renders like a hog ;)
- steveklabnik 16y agoWhile I agree that this should be downvoted, just be aware that there is some truth to this: Minecraft makes my current generation (well, technically last, but the 13" model barely changed) MacBook Pro run hot enough that I cannot leave it on my lap. The only other thing that makes it do this is encoding video; I'm not really sure why, exactly. There is a decent amount of background processing going on, but it's limited to a 300x300x128 (I think? in Z? 300x300 XY for sure) block area, so... You wouldn't be able to guess this from the graphics style. EDIT: Upvotes for both responses. My love of command line is showing; I know next to nothing about graphics and what it takes to make them perform well.
- blasdel 16y agoOn the contrary — it's enterely because of the graphics style and atomically destructible environment. Voxels are hard.
- NickPollard 16y agoCaveat - I've not played minecraft - but I suspect that the graphics are not the problem, but the simulation (the atomically destructible environment and also AI). Modern 3d games involve using both the CPU and GPU, and most intensive graphic computation is done on the GPU. Graphical elements like having complex models, shader effects, filter passes etc. all put strain on the GPU, but don't touch the CPU too much. Game logic elements like destructible terrain, AI, pathfinding, physics, and generally extensive game rules all put strain on the CPU. Different games have a different balance between the two (but eventual framerate and performance is determined by the slowest side), a highly detailed FPS (say, Halo) is likely to be GPU-bound, whilst a complex strategy or simulation (eg. Minecraft) is more likely to be CPU-bound.
- jomohke 16y agoIt's pretty difficult to do language performance comparisons based on a single game. Dwarf fortress, another great indie game involving mining and crafting, is written in C++, has no 3D (it's simply a 2D grid), and uses up a lot of CPU. That doesn't mean that C++ is slow. It means we have no idea how much these custom indie game engines have been performance tuned, and how much logic is being performed in the background (DF is a hugely deep game). They are both written by a single programmer, not a team of game engine developers. Edit: I don't doubt that performance tuned C++ is faster than Java. But for a small development team, who aren't building a graphically taxing game, performance optimisation is well down the list of priorities. They are usually better off spending the time expanding their game.
- heresy 16y agoIt's not the language, it's what you do with it. Everything else is just hot air.
- abp 16y agoSure, but nonetheless submissions containing "java" in the title will get less upvotes then many other submissions with language names in the title, i think.
- syaz1 16y agoExcept in dzone. Almost all java-related submissions get high upvotes.
- Goladus 16y agoTo the extent that's actually true (and I'm not convinced it is, because Java can mean a few different things) that's largely because there's not a whole lot that's interesting or new in the Java Language compared to many others, and Java does not lend itself well to "cure heart disease in 20 lines of Python" style blog entries. But the JVM is an important platform and Java is the native language. There are lots of interesting applications written in Java.
- martingordon 16y agoThis has more to do with Java being uninteresting than with Java being the best tool for certain situations.
- statictype 16y agoJava as a langauge is generally uninteresting to talk about. There are vary few "wow, that's a clever hack" constructs to be made in the language. But certainly, that doesn't mean software created with it can't be great. See also: PHP
- abp 16y agoI think you actually wanted to say something like "most of javas libraries are uninteresting". The language itself is interesting, i think. It lacks some modern and no-oop concepts for sure, but that don't make it actually bad. The verbose libraries and configuration addiction of many java library vendors, including nearly all Sun libs i know, is the real problem. You can, on the other hand, find a massive amount of really nice and concise libraries that make java feal great for many tasks. Even custom compiler extensions for language simplifications or cross breeding with groovy etc. aren't uncommon. Also if you look at the JVM as a platform and java as the beginning of learning to work with a platform, you've got a great pool of languages to choose from, too. That wouldn't be possible without java. I sometimes dislike java myself, but then i abstract the verbose parts behind some static builder methods, for example and write a lot less with great outcome in java. The real shortcomings in the language design itself can suck hard. By ignoring these parts and using libraries for it and knowing what to watch out for, you can really get proficient with java. Keep Blochs "Effective Java" in reach and everything will be fine. Actually i'm not programming in java that long. But I've written some desktop apps and some little JSP pages. Besides that i enjoy learning and following frameworks like the Play framework, because i think it's really promising and valuable for web development. Also getting to know many open source libraries is nice.
- deleted 16y ago[deleted]
- sabat 16y agoMeh, Java is just fine, and if you really like it, I'm happy for you. (I find it an interesting but somewhat cumbersome language. Still, if it's the right tool for the job ...) Maybe this guy's amazing success will serve to change some minds here, tho.
- Dove 16y agoColor me unsurprised. I dislike Java as much as the next person, but for a certain class of problems -- particularly in game programming -- it is a tool I often reach for. Java is a painfully verbose language that does not trust me with any power tools. When I work in it I wind up cursing its name approximately twice per hour. But the combination of Extreme Portability and Libraries For Absolutely Everything and maybe a little bit of Everybody Understands It often draws me in anyway. I don't love it, but sometimes it is the right tool for the job.
- swannodette 16y agoAnd if you don't like Java you can still target the JVM with a fast but more expressive JVM language - Clojure or Scala.
- mambodog 16y agoThe main problem with Java for games is that you have to do graphics through a wrapper written in another language (AFAIK Minecraft uses LWJGL's OpenGL wrapper) and working from a language like Java, you lose some fine control of memory management. On the upside, it allows him to do rapid development, and you can even try Minecraft in the browser.
- swannodette 16y agoIn this case Java also greatly simplified distribution. Want to serve an OpenGL game over the web with Python, Ruby? Until HTML 5 Audio and WebGL take hold - good luck with that.
- recoil 16y agoI don't think there is another language out there that could have given Minecraft the kind of success that it's had (The same applies to Runescape). Many Windows users have a JVM + the Java plugin installed already, and the only other widely-known plugin that gives the kind of 3D performance that you can extract out of Java is Unity3D. While Unity is easy enough to install, it's been around for a lot less long and it's less widely known and developed for. Most users would have experienced a jarring "please install this plugin" moment before they got to play, and I'm pretty sure that the immediacy with which players have been able to get into Minecraft has been a big part of its success. Contrary to what you repeatedly hear about Java, it actually has very decent performance. Sure, the ME edition is horrible (if that was somebody's only exposure to Java game programming I'd forgive them for never wanting to touch the language again), and some years ago applet performance was awful (which seems to have left a bad taste in the mouths of a significant number of hackers), but these days if you avoid Swing (and why would you want such a toolkit for a 3D game like Minecraft anyway?) and use a library like LWJGL then you can produce a game with decent performance and graphics. Minecraft is a bit of a mixed bag when it comes to scaling down to older machines, but it still runs reasonably well on quite a lot of older hardware (up to about 5 yrs old, or thereabouts). That leaves you with a very large potential userbase. Also contrary to what you might hear, Java's actually not that shabby of a language either. Sure, you sacrifice some of the features and syntactic sugar found in higher-level languages like Python & Ruby (in return for performance), but garbage collection and higher-level features like reflection that are not found in C/C++ mean that development speed is still pretty good. There are a wide variety of available libraries to help you out too. Lastly, much of Java's reputation for verbosity doesn't apply to games development. You don't have to use any of the libraries that require XML-heavy configuration like Spring or Hibernate, nor any of horrifyingly verbose stuff like EJBs or JDBC (actually there's nothing forcing you to use those for enterprise stuff either). Once you've taken care of the performance-intensive graphics stuff, you're "only" left with the core game logic. While a higher-level language like Python, Ruby or Lua could reduce the amount of code you need to write by a certain amount, the difference is not as pronounced as it is between, say, C++ and Lua, due to Java's automatic memory management. And seriously, who gives a toss about whether something's dorky and uncool? I didn't care back in high school that people thought I was a dork for programming or even just for using computers (this was before the internet and Apple made computers cool!) and nobody should have to give a shit what programming language snobs think of their choice of language either, as long as they're getting the job done.
- lelele 16y agoUncool when it comes to up-voting, but quite cool when it comes about hiring, it seems.
- deleted 16y ago[deleted]
- nivertech 16y agoJava is still much better language, than antiquated Objective-C. And you know how many apps are written in ObjC. When you show a real programmer the path to financial independence, he will code even in brainfuck.