get this
...
Java
Which seems to be the dorkiest and most uncool language on the planet if you were to ask HN.
get this
...
Java
Which seems to be the dorkiest and most uncool language on the planet if you were to ask HN.
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.
Everything else is just hot air.
But the JVM is an important platform and Java is the native language. There are lots of interesting applications written in Java.
See also: PHP
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.
Java is too verbose? So what's Eclipse for? Sometimes, a bit too verbose can be good in terms of maintenance and readability.
It's in C\C++\.NET but also has bindings for Python, D, and Ruby. 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/
One thing to watch out for if you use the unreleased 2.0 branch of the library, is that the OS X port is not quite there yet. So if you want to target that platform it may be better to use the stable 1.x branch.
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.
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.
When you show a real programmer the path to financial independence, he will code even in brainfuck.
On the upside, it allows him to do rapid development, and you can even try Minecraft in the browser.
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.
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.
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.
4. Shock-value asks- How do you like Java as a language? In what ways is it a positive and in what ways is it a negative compared to a lower level language like C/C++, especially as related to the development of Minecraft? Alphakamp asked a wonderful followup question- Do you think you will stay with java or will you ever restructure the code base with a different language?
I love java! I'm a bit worried now that Oracle owns it, and they haven't exactly shown any great interest in the client side of it. Sun used to speak to me all the time, even way back when me and Rolf made Wurm Online, but Oracle hasn't said a word to any game developer as far as I've seen. The biggest technical advantages with java is that the development speed is extremely fast with almost no compilation times and an excellent code hot-swapping in debug mode. The disadvantages is a slightly lower speed than C/C++, and less than perfect support for OpenGL. The LWJGL guys have done a great job with the binding, but java still suffers from rather large per-call overhead in JNI. Or in English; OpenGL calls are slow in java.
Maybe this guy's amazing success will serve to change some minds here, tho.
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.
Much better experience than I've had with the supposedly enlightened lisp community.
Also, Markus programs in straight java, not scala or clojure.
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."
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.
Let 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.
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.
By coincidence—not by any flaw of Java or the generalist programmers who happen to know it and like it—the language that will most frequently appear on the resume of a single-language programmer is Java. This means—in the same way that given races of people get tested for given congenital diseases because they are statistically more likely to be afflicted by them—that if you're interviewing a programmer and all the previous projects listed on their resume are Java projects, it becomes more important to ascertain whether they know any other languages, because they are statistically less likely to.
This point is just a combination of the famous and well-received "programmer vs [language X] programmer" rant, and a bit of Bayesian analysis to determine which people applying for "programmer" jobs (i.e. generalist jobs, of the kind needed in startups) are most likely to actually be "[language X] programmers" instead. If you trained a spam filter on generalist-y-ness, it would flag Java as having a high correlation[1] with non-generalist-y-ness—that's all I've been trying to say.
[1] ...which is very explicitly not causation, I think I have to remind everyone at this point.
That's language prudishness, right there.
I also find your assertion that if someone learns PHP as a first language they're likely to end up a "better" programmer than someone who learns Java as a first language absurd. There are good schools teaching Java, and smart, inquisitive people studying it. Many of the best programmers I know still use Java for pretty much everything since it allows them to get their jobs done. Some know other languages, some don't. It's a purely pragmatic choice, but to say that those people would not be valuable to a startup is crazy.
Maybe the process you use when interviewing is good enough to separate these people from others who really don't know how to program, but it seems like they're going to be starting at a significant disadvantage if you're interviewing them.
Couple days ago I decided to shut my eyes off articles that compares programming languages and decided to stick with Java and Ruby. I don't plan to learn 10 different programming languages for the rest of my life unless I happen to get an offer in a company where they would want to train me in their technology. I have no plan to be a software developer for the rest of my life because that is a bottom-line job. It's useless really. Especially when there are too many effing opinions in our industry such as:
- We prefer young people (remember, y'all going to get old at some point, you'll be out of the game soon)
- We prefer TDD, Scrum, and Agile (those of you who dislike TDD will be crossed out from this list)
- We only do games (those web developers are out)
- We only do web-development (don't know HTML/CSS/JS? get out)
- We only do internal IT (you're a software product guy, you won't last long here)
- We do "Digital Social Media Marketing Branding SEO" (you're just a PHP developer, go make something)
- We do SAP, PeopleSoft, and Oracle Financial (you're not qualified even though you know .NET)
- We do embedded (web developer and enterprise developer, the door is right there)
- We only use Apple (not an Apple fanboy? doesn't worship Jobs? out please)
I'd rather spend my time learning the business domain, leadership, management, networking and how to live a life and achieve happiness than learning LISP, C, C++, HTML, CSS, Python (I know a few things about Python but by no means I can be qualified to work in a startup that uses Django).
I don't want to be 50 years old hacker unemployed (due to age) and have no social skill to convince people that I'm still worth. Besides, I want to have a retirement that doesn't bother my kids's financial situation.
Do you have any idea how long it takes to learn and master a programming language and the ecosystem (libraries, tools, the community, etc)?
It's a life choice that I decided and I don't think you should look down at other people choices.
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.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).