

Ask HN: Java/Groovy/Scala/Clojure/Ruby for your startup? - inodeman

What JVM Language are you using for your startup? if any.
Java/Groovy/Scala/Clojure/Ruby?<p>For what layers?
And why?
======
DanielRibeiro
Not actually using any, but if scale problems come, we have the following
order: Jruby, Clojure, Scala. The reasons behind the order:

* Jruby, because we really like the level of metaprogramming of ruby, the readability, the ammount of libraries, the effort Charles Nutter put into making it a very good port of ruby, and the library support that feels like ruby (dsl-ish, easy to use, easy to change, with tests as documentation, etc), even if you are not using Rails.

* Clojure, because it is dynamic, and enforces immutable state (most of the time), it has great metaprogramming support as well (which is very important for readbility), and you can use type annotations to remove all reflection code, and use direct invoking (as fast as java).

* Scala, because it is much more convenient to use than Java (and has other advantages, <http://bit.ly/4DIKy4>), while still being compiled to very efficient java bytecode. Its static typing has issues (<http://bit.ly/asQ7FC>), as its lack of metaprogramming. Implicit conversions, on the other hand, can deal with it for most part.

*Java/Groovy: Scala should be the lowest level we would like to handle. Groovy feels a bit like Ruby, it has more metaprogramming facilities (like categories, and AST manipulations are builtin, unlike Ruby's Parse Tree, which doesn't work on 1.9). However, Jruby is the same language we use everywhere else, and Groovy is not faster than clojure. So it is a "master of none" type of language. Not to mention that its stack trace is riddled with java garbage, and it feels a lot like Java, which is really a put off.

This is mosty for backend, as with are probably sticking with Sinatra on front
end for a looong while. Twitter uses Rails on front end even nowadays, so it
seems like we won't have too much problem with it as well.

~~~
WALoeIII
I wouldn't necessarily put Clojure between JRuby and Scala (I hope I am not
misinterpreting). I think it should be more along side of JRuby depending on
the type of problem you are trying to tackle, it supports a totally different
paradigm of programming.

~~~
rossedwards
The problem is that there really isnt any definition of languages within the
java landscape right now. Meaning theres a bunch of languages but noen really
stand out for any specifc uses with the expection of people that know them
well and are using them well. So its very confusing to know which to use.

For example Grails and groovy were supposed to be big on the java framework
but due to seveeral reasons they seem to be really more niche. PArtly because
it seems the people behind both of them just arent dealing wiht the problems
such as bugs quickly enough.

Scala is an interesting language but again there doesnt seem to be a heavy
push for it. Expect for peopel that are using it and know what its strengths
are.

All of which leads to alot of confusion about which technology to use.

Then theres the issue of frameworks. Theres a million of them but none of them
really stand out. ANd personally i dont think it helps that oracle is no
running things.

On the other hand ruby is known by many people as being pretty powerful and
used by alot of startups. Same thing with php. How many startups do you know
that use java? I know foursqaure uses liftweb but thats about it.

~~~
DanielRibeiro
Just because you are not aware of what is being used, does not mean that it is
not used. Scala startups: KaChing (follow <http://twitter.com/eishay> for more
info, he talks a lot about the Lean startup practises on Kaching as well) and
Etherpad (wave-like product, bought by google last year). Eishay also gave a
great hint for startups looking for scalable technologies:
<http://twitter.com/eishay/statuses/20478841811>

Flightcaster, which is funded by YCombinator, uses clojure and Ruby on heroku
(more on their infoq profile: <http://www.infoq.com/articles/flightcaster-
clojure-rails>).

Most startups are not actually vocal about what they use. Most of them
actually are not heard, so they could be as vocal as they wanted and still
noone would hear them.

------
judofyr
I know that the University of Oslo started on a rather big Groovy project, but
after a few months ported everything over to Ruby (not sure if it runs on
JRuby though). As far as I remember, they felt that Groovy was a terrible
"clone" of Ruby: Long and Java-ish backtraces, small community and much broken
code.

<http://news.ycombinator.com/user?id=thomasfl> worked on the project, so maybe
he'll chime in with more details.

~~~
cmars232
I'm not at a startup (anymore... we got bought), but we're using Groovy for
unit/functional testing.

It's a nice compromise when you want something that cuts through boilerplate
with metaprogramming/duck typing but can keep tight interop with Java where
you need it... and you need a quick learning curve for Java devs.

That said, stack traces are _horrible_ , debugging in Eclipse is difficult to
impossible depending on how "dynamic" you get, there's no interactive debugger
like pdb.set_trace() (that I know of) and the flexibility of the syntax can
get out of hand quick. Great for limited use, like making mini-languages and
glue for testing. Wouldn't want to support a large application written in it.

~~~
vorg
Groovy also has a faster static version, Groovy++ at
<http://code.google.com/p/groovypptest> which can intermingle with the more
scripty Groovy code using annotations.

------
ww520
You should use what you are comfortable with and most productive. If Visual
Basic make your product work, go with it.

------
babo
Avoid to use Java directly, if you need any Java libraries choose Clojure to
wrap it, that strategy works well for me. Scala is another alternative here.
It's a bit more complicated to work with Java libraries but great for writing
code.

For a general programing task my choice is Python, stable, mature, well
documented with an extensive library support. iPython is a fantastic shell for
it, that's my interface to Python libraries and programs, good for developing,
running code, debugging or for a quick peep to the documentation. Highly
recommended.

~~~
wlievens
I know that dissing Java is cool these days, but some arguments would've been
neat.

~~~
babo
From my experience Java programming is too slow and inflexible for a startup
while there are good and important libraries, that's why I suggest clojure to
use them. That's based on first hand experience using various Java projects
for a large traffic site, including Cassandra, Solr, hadoop, restlet, etc. We
started with java for coding all of these but replaced most of the code later
and not for fun. :-)

~~~
wlievens
That's just too general a comment, in my opinion. Saying "java is too slow for
a startup" is like saying "Windows is too primitive for a startup". What if
you're making Windows-specific desktop software? Or are we only allowed to
talk about ruby-on-rails twitter mashups here anymore?

------
johnayres
If you do decide to go with Java directly consider including Guava (Google's
open source common library).

<http://code.google.com/p/guava-libraries/>

We really like the support for higher-order functions, like
Iterables.transform (aka map) and Functions.compose amongst others. There are
loads of useful tools including MapMaker, which is great for building caches.
The downside is that Function<X,Y> is an interface and implementations are
often inner classes, which can be syntactically quite messy.

We've recently open-sourced our common library, which extends Guava with a few
additional features we've found useful:

[http://github.com/mbst/common/tree/master/src/main/java/com/...](http://github.com/mbst/common/tree/master/src/main/java/com/metabroadcast/common/)

------
durbin
python. python beats ruby in community imo. if you're just doing a webapp then
rails wins, but with scipy conferences and researchers from astronomy to
biology putting out python packages, if you're doing something outside the
normal webapp you'll probably find a more useful community with python.

~~~
mdwrigh2
This opinion sounds very one sided. Do you have any experience within the ruby
community, personally?

~~~
durbin
It is very one sided as almost everything I've seen about Ruby is Rails
focused, especially outside of japan. Please fill me in where you think the
Ruby community has more to offer in a scientific environment.

~~~
mdwrigh2
This is a completely different statement than your original one. I think
there's plenty of support for non-webapp Ruby, and that its very competitive
with Python outside of web application arena (look at Chef or Puppet for a
couple examples). But Python is _clearly_ the dominant language in a
scientific environment, at least between it and Ruby. But like I said, that
wasn't your initial statement.

------
zavulon
I'm really curious for the purpose of this question. Are you trying to find
the most popular language of choice among HN hackers that have their own
startup? Shouldn't you at least mention "and what does your startup do"? Or at
this point, "startup" is automatically assumed to be a "webapp"?

My startup specializes in bringing other people's ideas into life. Most of our
clients are also startups. Depending on their needs, we use Ruby on Rails,
PHP, Java, Objective C/Cocoa, or C++. For my other startup, which is a webapp,
I use Ruby on Rails.

------
damoncali
Ruby, because it's relatively easy to find Ruby developers who want to work in
a startup environment.

