4 ms·
Consider expressiveness. The number of lines of code that a programmer can write in a month tends to be a constant independent of language. A program in Java
by russell 17y ago
Consider expressiveness. The number of lines of code that a programmer can write in a month tends to be a constant independent of language. A program in Java takes 2 to 5 times as many lines of code as in Python. In Java you will get a lot less accomplished.
Take a look at the standard libraries and third party packages. If someone else has written it, you dont have to, unless you want the experience. Python, Java, and Perl have lots. Ruby and IO less so.
Look at job listings. If you are starting out, you might as well pick on that you can get money for.
Look at the communities. Are the people ones that you would like to hang around with. If they dont like newbies, look elsewhere. Python seems to be pretty good in that respect.
As for web development, Python has Django (I recommend) and Pylons. Ruby has Rails. Stay away from Java; everything is too damned complicated, but there are a lot of jobs.
- gdp 17y ago> The number of lines of code that a programmer can write in a month tends to be a constant independent of language Says who? Ignoring the fact that LoC is a terrible metric for measuring anything except the amount of paper it would require to print the program, I think it would be very hard to use it to quantify how much you will accomplish. Your (implied) assertion that you will not just accomplish less, but accomplish between a half and a fifth as much in Java as in Python is even more outlandish. I can't imagine you have any evidence to support this? > Stay away from Java; everything is too damned complicated What is this supposed to mean? That the hundreds of thousands of people who make their livings from doing web development with Java and being competent Java programmers are either stupid (for not programming in Python), or super-smart (because they can grok Java)? This is pretty absurd. Java is no better and no worse than pretty much any other language in wide-spread use. To its benefit, it has extensive library support for pretty much everything under the sun, and all the enterprise features which would make it relatively painless to do a whole heap of things that would become very difficult in almost any other language. Really, I think you should refrain from giving advice on specific programming languages if you are just going to resort to complete and utter nonsense to provide comparisons.
- silentbicycle 17y agoThe argument that lines of code is constant across languages is usually associated with Fred Brooks's _The Mythical Man Month_. I don't buy it, either. (Sometimes there is the added restriction of "lines of debugged code". That may be more likely.) Here is a study of how lines of code produced annually differs across languages in a collection of open-source projects: http://sequoia.cs.byu.edu/files/pubs/Delorey2007.pdf http://sequoia.cs.byu.edu/files/pubs/Delorey2007.pdf Of course, the correlation between lines of code and "productivity" is pretty nebulous. (Copy-and-paste programming is the most obvious example of a negative correlation.) LoC is an easy thing to measure, but not necessarily useful.
- russell 17y agoAs far as I know, the statement about lines of code was first stated by Fernando Corbato http://en.wikipedia.org/wiki/Fernando_Corbat%C3%B3 http://en.wikipedia.org/wiki/Fernando_Corbat%C3%B3 (Corbato's Law). "It's our experience that regardless of whether one is dealing with assembly language or compiler language, the number of debugged lines of source code per day is about the same! [http://web.archive.org/web/20080206153039/http://home.nycap.rr.com/pflass/PLI/plisprg.html http://web.archive.org/web/20080206153039/http://home.nycap....] Python is generally considered to be 2 or 3 times as expressive as Java. I did some estimation on a compiler implementation in C++ and arrived at the conclusion that it could have been done in 20% as much Python.
- silentbicycle 17y agoThanks for the source. It was probably more true then - the then-unimaginable resources available now allow very different trade-offs in language design. (FWIW, OCaml is probably a better language for compiler writing. It hits all its strengths. Failing that, I'd still rather do one in Python or Lua than C, though.)
- russell 17y ago>What is this supposed to mean? ... I didn't say anything about the intelligence of Java programmers. Like everywhere else some are brilliant and some are dumb as hammers. When I said "everything is too damned complicated", I was thinking of Java Web development which has a proliferation of one-size-fits-all frameworks which encourage bloated implementations. It could be that I have blundered into a tiny swamp and everywhere else is sweetness and light, but I dont think so.
- megaduck 17y agoI feel a need to stand up for Java here. Most of Java's nasty reputation comes from J2EE, and not the language itself. Java is a wonderful tool for a LOT of systems programming. It's got a nice object model, automatic memory management, and pretty good execution speed. Given the choice between C++ and Java, I'll take Java every time. Remember, Java was originally designed for embedded systems like set-top boxes. It's still one of the best languages out there for those kinds of applications. It's not a good fit for UI or web work, but neither is C/C++. As always, consider the type of job before selecting a tool.
- ramoq 17y agoI as well stand on java's side here. Too much of it's bad rep comes from J2EE (it's too bloated). Java has some very nice technologies written around it that are quite powerful when utilized correctly (JPA/Hibernate being one of those) Quite frankly I think Java is actually _very_ good for web programming. IFF you are using the Spring framework(autowiring and transaction handling are very strong components of this framework) along with some nice templating frameworks (tiles, sitemesh) I absolutely love the Spring (MVC) framework and this is probably why I hold java in high regard.
- jacquesm 17y ago> It's not a good fit for UI or web work, but neither is C/C++. That's so true. Java is a great general purpose language but it so terribly verbose when you're trying to do string heavy or database work. The web is both. One thing though, compared to several years ago the speed penalty has all but disappeared, it's fast enough to build some pretty impressive stuff with it.
- jhancock 17y agoI certainly agree J2EE is a travesty. Framework design by committee is wrong wrong wrong. I do not agree that Java is all that great. I classify it as "ok". I don't disparage "ok" but there were languages before Java that were better than "ok". Java isn't and never was a revolution, it picks from various things that came before and in some places make incremental improvement. During the early days of J2EE I built an app framework that ended up being about 300,000 lines of Java, we had to replace most of the core JDK classes as well due to their poor design. What we ended up with was enterprise quality but far more accessible than the J2EE equivalents. Prior to this app framework, I built essentially the same thing in Smalltalk. The Smalltalk version was much fewer lines of code, easier to maintain, easier for the end-user. And so far as Java performs great, yes it does. One key reason is the hotspot and jit stuff which were directly taken from the Smalltalk world. btw, when I'm playing up Smalltalk here, I know its hard for newcomers to see the value as Squeak is "hard to take" compared to what we had in the early 90s. [EDIT] one thing I do like about Java is it forces the programmer to think more formally about an object's interface. This is a good skill to learn and can be applied to other languages. The loose way some play with duck typing is a little much for my tastes.