Live data from Hacker News

Is java dead for startups?

news.ycombinator.com

61–70 of 101 posts

Re: Is java dead for startups?

#61
post #54

Earlier quoted context omitted.

another groovy on grails fan here... I wish more people would give it a try.. its surprisingly expressive like ruby or python , scales with the JVM, backing of all currently java libs, and great web framework like rails.

This may sound ignorant, but if you're going to use another JVM language, why not use JRuby (if you want to stick with a Smalltalk/Modula-3 derivative), Clojure (if you like Lisp and want STM) or Scala (if you want the static type checking, speed, built in support in IntelliJ)? This is a serious question: several people I respect (who are smarter than me and thus well capable of learning new languages) are using Groo…

Of those languages you mention, Groovy has the most java-like syntax. So maybe since its easy to pick up and does what they need, there is no need to learn/use those other languages.

Re: Is java dead for startups?

#62
post #55
post #37

Earlier quoted context omitted.

I guess this is the reason why Scala gets a lot of attention: same speed as Java (on JVM), fully compatible with Java, it has static typing, and it's productive like RoR or Python. BTW, both the Java (javac) and Scala compilers were written by the same person.

I have not read where Scala is the same speed, citation?

its not real "proof", but check out the Computer Language Benchmarks Game: http://shootout.alioth.debian.org/

Re: Is java dead for startups?

#63
Maybe, as others have said, it's due to the nature of most startups talked about here are web-centric. I had to write something in Java two days ago (not web related, but image processing) - it was my first real intro to java, sort of a crash and burn intro.

Not only did I write the stuff, it worked, it was FAST (unlike I expected, because you know "java is slow" - I found out it isn't)... and I was damn fast in changing code around, toying with it basically. All of that from zero to hero in a single day (not even an 8hr session).

I'm impressed, and I'll probably look into prototyping work with java in the future. I especially like zillion of libraries out there - great stuff if you are trying to make something fast, prototyping for example.

I've been driving python for the last couple of years for prototyping (I develop in C later), but I found out that python code of any reasonable scale is really REALLY hard to manage (at least for me), not to mention speed issues (which I sometimes need in prototypes due to the nature of image processing).

Re: Is java dead for startups?

#64
post #57
post #47

Earlier quoted context omitted.

Not sure if it's only that - the static typing is more or less cared for by the IDEs and their refactoring tools. I would like some Java developer to chime in on this.

I think it comes from a too-literal understanding of design patterns. E.g., for the factory pattern the common practice (outside of some well designed APIs e.g., google collections) the common practice is: public class Image { public Image(byte[] data) { // create the image from byte array } } public class ImageFactory { public Image createImage(File file) throws IOException { // read data then create an image } } vs…

At runtime you can provide a different implementation of ImageFactory. For example, a unit test can define MockImageFactory which ignores the filesystem and just returns a canned Image object. If code everywhere calls the static Image.open method, there is no way to redefine it short of editing the source or the bytecode.

Re: Is java dead for startups?

#65

Java is an avowedly corporate language. It isn't built to be fun or elegant or beautiful or especially powerful - it's built to be robust, idiot-proof and flexible. For startups, it just seems very poorly suited for the task. I think most of us would agree that the main advantage any startup has is speed and agility. Java isn't that well suited to rapid development, at least not compared to Python or Ruby. It doesn't…

Remember to separate the JVM from the Java language. Java the language is getting old - its not that Java is bad, its that languages like Ruby & Scala are better - programming languages have evolved since the early 90s.

A startup has to do all that you said, plus one more thing: dont reinvent the wheel. With languages like JRuby and Scala built on the JVM you can reap the benefits of the agile philosophy and still make use of the available solid java libs (Apache Commons comes to mind), and not have to reinvent the wheel, saving the startup a ton of time.

Re: Is java dead for startups?

#66
post #57

Earlier quoted context omitted.

I think it comes from a too-literal understanding of design patterns. E.g., for the factory pattern the common practice (outside of some well designed APIs e.g., google collections) the common practice is: public class Image { public Image(byte[] data) { // create the image from byte array } } public class ImageFactory { public Image createImage(File file) throws IOException { // read data then create an image } } vs…

At runtime you can provide a different implementation of ImageFactory. For example, a unit test can define MockImageFactory which ignores the filesystem and just returns a canned Image object. If code everywhere calls the static Image.open method, there is no way to redefine it short of editing the source or the bytecode.

Good answer. That actually makes sense with the Image example, but OTOH there's still cases where a separate factory class is used where a static method would work.

Re: Is java dead for startups?

#67
post #54

Earlier quoted context omitted.

another groovy on grails fan here... I wish more people would give it a try.. its surprisingly expressive like ruby or python , scales with the JVM, backing of all currently java libs, and great web framework like rails.

This may sound ignorant, but if you're going to use another JVM language, why not use JRuby (if you want to stick with a Smalltalk/Modula-3 derivative), Clojure (if you like Lisp and want STM) or Scala (if you want the static type checking, speed, built in support in IntelliJ)? This is a serious question: several people I respect (who are smarter than me and thus well capable of learning new languages) are using Groo…

well the main reason I wouldn't use JRuby is because .. by programming in just Ruby, you get benefit of all the c extensions that you aren't able to use in JRuby and not sure about rails support on jruby. I would just use it without jvm. The other reason to go with groovy/grails is the grails plugins community is very active.

Re: Is java dead for startups?

#68
post #54

Earlier quoted context omitted.

another groovy on grails fan here... I wish more people would give it a try.. its surprisingly expressive like ruby or python , scales with the JVM, backing of all currently java libs, and great web framework like rails.

This may sound ignorant, but if you're going to use another JVM language, why not use JRuby (if you want to stick with a Smalltalk/Modula-3 derivative), Clojure (if you like Lisp and want STM) or Scala (if you want the static type checking, speed, built in support in IntelliJ)? This is a serious question: several people I respect (who are smarter than me and thus well capable of learning new languages) are using Groo…

Well, Groovy has been around longer than Clojure, IIRC, and maybe longer than Scala, or about as long. So I'd guess that quite a few Java people who were interested in alternatives got exposed to Groovy before Scala and Clojure started gaining traction. And since there are only so many hours in the day... at some point you have to start building stuff instead of just learning new languages.

Also, Groovy's syntax is very Java like. In fact, Groovy is pretty close to a superset of Java, so you can often - if not always - rename a .java file to .groovy, and compile it with groovyc and run it. This makes it easy to leverage your existing knowledge of Java, while slowly working in the idiomatic Groovy.

All of that said, I personally plan to learn both Scala and Clojure as well; and will probably take my Scala book to the Triangle JVM Hack Night meeting tomorrow night and spend a couple of hours poking at Scala.

Re: Is java dead for startups?

#69

Earlier quoted context omitted.

I was under the impression that much of googles code base is python.

Most of the core code is C++ or Java, though there is plenty of Python.

Indeed. Most of the server-side code for youtube is written in python.

Re: Is java dead for startups?

#70
post #17

Earlier quoted context omitted.

The play framework sounds like something you'd be interested in. It abandons the Java conventions for a more rails like experience. http://www.playframework.org/

playframework is way better than rails in my opinion

No comments about the Lift framework ? FourSquare uses it
Post reply on HN