Is java dead for startups?
It seems that RoR, PHP & scala are the "hot" languages for startups. I know that java is old, but it lends itself to better engineering
IMO. Especially in NYC, where there is a robust market for high-
paying java jobs at investment banks, it is hard to find lean
startupers.
Are there theoretical or practical reasons to avoid java in lean startups? Any ideas where to find folks at the intersection of java + lean startups + NYC or is it hopeless?
Many thanks!
Cheers, Mike
PS Here is the job description. Applicants and feedback on the description are welcome too: http://www.socialfeet.com/2010/05/got-java-chops/
100 comments
[ 3.2 ms ] story [ 169 ms ] threadAt least, that's been my experience in places that lure with something glamorous and then do only a very small amount of it.
I think the reason you don't see Java in startups as much anymore is that it's neither rapid nor enjoyable to code in. It's also more difficult to deploy in production and more expensive (it requires more RAM to run well in my experience). Continuous deployment is more difficult with Java. Ruby and PHP you can just push code and restart the server almost instantly, Java takes longer.
Java is getting better, but not fast enough, and it's still not a fun language to write in. If I'm going to spend 12 hours coding, I'd like to enjoy it. I can think faster than I can write Java. I'm just able to get more done with other languages.
Agree that Java is verbose though. Java7 will improve things only slightly.
I've actually gotten to use groovy/grails for a lot of new projects/enhancements and that is making my job much nicer.
Of course that is a non-scientific anecdote and there are times that the REPL is just awesome (especially for web app development).
Sure, Java has some baggage, but it has a lot of benefits too, such as much better tools for deployment, performance profiling, libraries galore, the JVM, and more. I find it's often the best tool for the job when there's heavy lifting to be done.
Any non-FP languages?
Edit: BigForth is an implementation of Forth that seems to be pretty close to Java in speed. Forth is not a functional language. D is a fast language intended as a C++ replacement. Despite looking a bit like C++ or Java, it can be quite a bit more terse than either. D 2.0 adds quite a bit of FP support to make concurrency and parallelism easier, but you can still write C in D if you so choose.
Groovy appears to be potentially as fast as Java. It can call Java easily, which means you always have the option to rewrite something that's too slow in Java itself.
BTW, both the Java (javac) and Scala compilers were written by the same person.
Languages aren't fast, code + data + implementation combinations are.
The current Google Go compiler implementation produces slow code, but there's a potential to make it as fast as C. The JavaScript implementation can be made better, but it will never be close to C.
Scala running on JVM will produce similar efficiency to Java. On multicore the Scala compiler will likely produce a faster code by default, but that advantage can be matched in Java with extra work.
Scala running on .NET will likely perform similar to C#.
Now it's up to the developer to create efficient source code for the given language. It is possible to write slower code in C than in JavaScript, but the focus should be on "normally".
Normally Scala gives you the same end-result with less work than Java. There are exceptions.
More: http://www.scala-lang.org/node/25 (Look for "Scala Compiler Performance")
An older measurement: http://fupeg.blogspot.com/2008/06/scala-vs-java-performance....
With type specialization in Scala 2.8 it will be even faster than Java in some cases.
There are some decent platforms for the JVM though.
Tapestry 5 has done away with this and does not require interfaces or superclasses anymore in order to avoid breaking the API in future releases, they should have learned from that.
http://news.ycombinator.com/item?id=898738
http://groups.google.com/group/play-framework/browse_thread/...
With the clean separation of discipline that this creates, Java and a multitude of other languages are fine for providing the data and business services that said UI application communicates with.
Given Java's plethora of libraries available in the middleware layer, I do not know why someone would not consider it as a potential candidate for their service layer.
To be clear though, it is not only Java but the entire concept of assemble a screen on the server, push it to the client and then every action on the client requires a trip to the server to make a decision, was just plain bad design. All of these server frameworks are designed to write applications in that manner.
The web started as some people putting up pages, HTML forms where bolted on and then someone backed it with CGI/POST and the web application was born. Unfortunately, until the JavaScript/RIA frameworks came along, we had not moved the needle much past CGI/POST we just put some window dressing on it.
The decoupled JavaScript / HTML5 / CSS UI is now breaking the constraints of the old page-post model and the reality is the server side frameworks are rooted in the page-post model and are no longer a necessity.
I think in the big picture of a increasing speed supply (courtesy Mr Moore, for cheap cycle farms and cache; but also JIT compilation techniques), and comparatively fixed user speed demand (a gui only needs to be fast enough; network latency swamps many other delays), Java is now much faster than it needs to be (faster meaning performance, not development time).
Back then, you had compiled languages (C, C++) that were fast, and scripting languages, like python, that were not. Python was touted as a glue language. Anyway, Java was mid-way in terms of speed (being partly compiled and partly interpreted), and mid-way in terms of dynamic benefits (eg. garbage collected and runtime array bounds checked - but requiring static typing). That combination of ease of use and performance was a good fit for some tasks, at that time. As the speed supply moved up, Java became usable for more tasks. But as speed kept increasing, Python and Ruby and even PHP also became fast enough - and they had the ease of use of being fully dynamic.
To give a direct answer your question: agile/iterative prototyping is how startups compete these days (not on performance), and ruby, php etc are better than Java on this particular attribute. Another aspect is that many cool new things are happening in languages other than Java - they have more interesting tools (eg. Sinatra), and more interesting energy in the community, because they attract those crazy, eager, young, passionate, enthusiastic early adopters.
Exceptions: where more performance is required (eg. Google uses a lot of Java; and it's the basis of the Android platform and others); and for the Enterprise; and also where type-safety (for reliability) is more important than agility (though ML-based languages have some of this market).
Note: a startup can tackle any problem, not just consumer-facing webapps. I think webapps get disproportionate publicity (because they're on the web); and web forums (like this one) favour them.
btw: I remember Java's younger years, I'm still a fan, and I'm using it in my product development. Java... some one still loves you.
> in languages other than Java - they have more interesting
> tools (eg. Sinatra), and more interesting energy in the
> community, because they attract those crazy, eager,
> young, passionate, enthusiastic early adopters.
Of all the comparisons I've heard, this is one I'd say I'm dubious about. There is still a LOT of activity in the Java space, and lots of cool and interesting tools and libraries continue to be written in Java.
Off the top of my head, I'd mention Lucene, Hadoop, Weka, Mahout, Tika, HornetQ, UIMA, GATE, Camel, Jackrabbit, DERI Pipes, etc., etc. This isn't too say that other languages don't also have lots of activity in tools and libraries and frameworks, but I think Java is still in pretty solid shape in this regard.
Anyway, I'm not arguing that Java is the most active in this regard, just that this particular criticism - of all the ones one could level - is, in my humble opinion, relatively weak.
True development is happening within the Haskell community, for instance, where they're taking concepts from various fields of mathematics and applying them to software development in ways that haven't really been done before.
Most Java-based projects are merely reimplementing something that somebody else has already done, or they're making minor, incremental improvements to a well-aged piece of software.
It would be interesting to graph the average ages of the users of the popular languages; youth being a proxy for the (perceived) current best thing. When you're starting out, why wouldn't you choose that?
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 offer any potentially game-changing technical advantages over the mainstream like Scala, erlang of JavaScript might. Java is a sturdy, reliable language that is very well suited to fairly boring corporate work. It's just not rock and roll though, is it?
Think about the standard startup rhetoric - do one thing and do it well, start small and iterate rapidly, split the market with something unique. If you're going into battle against an incumbent, you need to change the rules of the game - you don't want an AK47, you want an IED. If you're trying to build disruptive technology, it seems obvious that you'll be better off using tools that are themselves disruptive.
OTOH, tools themselves don't how disruptive your product is. The iPhone and Android are disruptive, even though Java and Objective-C are as boring as tools get (although the Dalvik VM is quite wicked).
Find the best developers you've worked with and let them choose whichever tools they like. That being said, some of today's best Java developers will likely end up choosing Scala for a project they're building from scratch.
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.
I would like some Java developer to chime in on this.
It's so nice to be able to provide a different GadgetFactory during tests or at different moments that some developers decide it would be cool to have the possibility to provide different factory implementations for every class, just in case they need it afterwards.
My experience is that static typing makes things harder to change, and therefore you try to avoid change by getting it right in the first place. Refactoring tools are not magic pixie dust (wish they were).
Though I use vi + homegrown tools, so I guess I'm not the IDE java developer you were looking for.
But you got exactly what I was going for: a typical Java IDE user would be able to add a lot to the discussion.
While I use Python more than any other language, I write some Java, but can't call me typical either - I use emacs for that.
The advantage Java has over C is that, in that comparison, Java is really nice to work with.
Edit: oh, and also many, many times faster.
That being said Java still plays a very big role in backend systems and don't forget that some important backend tools i.e. Hadoop and Cassandra are written in java. So I wouldn't write it off just yet.
Derek
http://nosqldatabases.com
good programmers can probably program in java but given the choice would they use it at home or on side projects?
Much of the site is frequently focused on web development. Keep in mind, however, that the web is just a UI layer. What is the UI _for_? It really irks me to see Ruby mentioned _only_ with Rails next to it, as if it wasn't an a very interesting language even without it (the combination of ideas from Perl and Smalltalk).
Statically typed languages feel awkward for web development (but then again, I haven't done much web development, so perhaps I am missing some of the better options e.g., Lift), but there's all sorts of interesting libraries for Java/JVM when it comes to:
* Middleware/services (Jersey/JAX-RS, Grizzly)
* Socket communications (Netty, Mina, Grizzly)
* Distributed coordination and communication (JGroups, ZooKeeper)
* Search and data processing (several "NoSQL" systems, Hadoop, Lucene and Katta for search)
* Threading and concurrency: actor libraries like Killim and Jetlang, java.util.concurrent and jsr166y/fork-join framework.
It should be noted that you could also use them with Scala. If liked using Java, you'll like Scala even more. Unless, of course, you've already got a predominantly Java project and have a specific reason against mixing/matching Scala (e.g., don't want to have a require having another jar in a servlet container which may be incompatible with the existing Scala jar in that container).
Clojure is yet another example of something very interesting that's happening on the JVM, but to me the big pull of Clojure isn't related to it being on the JVM: I like the fact it's a Lisp-1, its STM approach, first-order data structures - with syntactic sugar - beyond lists. Even if you viscerally hate Java and the JVM, you should give Clojure a try.
Of course there are a couple of JVM specific issues that are annoying and knee-cap all the JVM languages (in comparison to C, C++, Scheme/CLisp, OCaml and Haskell): lack of unsigned types, lack of ability to create user defined "primitive types", erasure with generics (mitigated through work arounds like Scala's implicit) and other artifacts of the JVM imposing a type system on you.
Personally I was dismayed by Java's smell (associated with the enterprise CRUD web development that went on in Java in the late 90s/early 2000s, Java's design by committee, etc...) and didn't even touch it until a few years ago; I squarely believed that all _real_ programming could only be done in C or C++ (while Lisp could be used for prototyping algorithms). I found that despite Java's _many_ annoyances, it's a language that could be practical for many non-trivial programs (rather than the usual "enterprise" apps which crash when you click the wrong button). Subsequently, I also discovered the same about Erlang, OCaml, Scheme, Common Lisp and languages I previously ignored as toys/glue languages (Python, Ruby, Perl).
But what I have done is built a framework for a website which I can easily extend. The framework is robust and easy to adapt, so once I get my first startup up and running, I can punch out more in a much quicker turn-around.
I refrained from using a bunch of existing java frameworks/technology to speed up development because I didn't know what the end product would look like and don't like the way frameworks railroad you into a particular solution and prevent you from "thinking outside the box".
So it's very old school - Servlets and JSP.
I achieve agility by now just focussing on delivering new services, and calling those services from either JSP or AJAX calls. This gives me some flexibility in the UX.
I prototype very rapidly to prove that I can do what I want to do, then round off the edges if I'm happy that it's functionality that I want to include in the pool.
I can turn around new functionality in a matter of hours for the most part.
Pete.
I wasn't (and am not) running a startup so I asked some friends who were (and were using Java). I never got a satisfactory answer (but I got some surprising answers including "If I were 5 years younger I would be using Scala or Clojure but I am very productive in Java and don't have the energy to learn new languages"(!!)). Another interesting answer I got was that their startup focused on business value but needed only average programmers (I am just reporting what people said) and could very well work in Java. All answers tended to "Sure Java is inferior but there are mitigating factors."
Fwiw, If I were to ever start a business where software was a differentiator I would use (a) Scala (if JVM/libraries were important) (b) Haskell + C or (c) use a custom Scheme variant I've been hacking on for many years + C.
I personally think the fears of not getting good programmers if you build in unusual languages is overblown. Even in Bangalore, good programmers would jump at an opportunity to work on interesting systems and interesting languages. I am not looking for work but I would still consider a job offer from a startup using interesting languages very seriously.
[1] I was trying to figure out stuff by writing and so these posts are not polished, but if anyone wants to read, here they are
http://pindancing.blogspot.com/2009/07/why-do-startups-still...
http://pindancing.blogspot.com/2009/07/why-do-startups-still...
http://pindancing.blogspot.com/2009/07/why-do-startups-still...
http://pindancing.blogspot.com/2009/07/why-do-startups-still...
It's quite puzzling why the author of the parent article lumps it in with Ruby as the two aren't very similar.
On the other hand, I've seen a friend who's a good (but not great - and he's well aware of it) developer, but is rather entrepreneurial (quit a very well paying job to work on his own project with no external funding) was very surprised after I told him Scala is statically typed. Apparently Java developers almost develop a sort of a Stockholm syndrome that leads them to believe that "if it isn't verbose and limiting, it must be dynamically typed and slow".
Same for knowing any of {Perl, Python, Ruby} and being able to easily pick up the other. Some of the more advanced idioms may take longer to learn, but it's a fact of life that you'll have to learn new languages as you go.
On the other hand, if you need to hire average but experienced programmers (e.g., if you're doing outsourced CRUD app development) then you might have an argument.
Google would disagree. As would Microsoft (they were very interested in interviewing me, even though I've never done Windows or C# programming and made that clear on my resume), Facebook, Amazon (http://groups.google.com/group/mi.jobs/msg/d81b6c1fa8f361fc) and other serious software successes.
Sounds like you want coders, not developers. What reason would talented developers (the ones with offers from all of the above, plus start-ups competing with you) to join you?
Eclipse is a great IDE that has been an awesome productivity booster, but the Scala Eclipse plugin kept throwing Exception.
If it worked for me, then I would have tried it out, and then I would have gotten my teams feedback, then we would have considered switching. i.e. I do see non Java languages running on the JVM to be the future, but they are not the present yet.
Twitter seems to manage fine with the "limited tooling" for Scala and is the existence proof that Scala works fine in startup/production environments. I suppose they must be using ancient editors like Emacs or Vim and unix command lines? Sure, "tooling" like that existing for Java would be nice to have, but if that stops you from using Scala in a startup, you are not the target audience for it.
That said, I concede that your startup/developers may have had special needs that the folks Twitter didn't and so you shouldn't use Scala - or Clojure. Or Haskell. Or even Ruby or Python- all of these have "limited tooling" as compared to Java.
The reason for the IDE argument is again, a continuation of the "Stockholm syndrome" argument. The whole reason the IDEs are considered "required" for Java developers is because the language is verbose. You don't need an IDE to write Scala: type inference means less typing (pun intended), having a REPL means you can evaluate code before compiling.
I haven't seen CDT and PyDev Eclipse plugins (which are reportedly well written, supported by large companies) get very much traction as you simply don't need Eclipse to program in C or Python: the languages are terse, the APIs (Python's standard library, C's stdlib and UNIX network APIs) are easy to keep in your head.
That being said, as Scala is more statically typed than Java (but at the same time supports a REPL) it's theoretically possible to have better IDE support for it then Java. IntelliJ's Scala mode works very well (and is free) and ensime (for Emacs) is simply incredible: http://www.youtube.com/watch?v=A2Lai8IjLoY
On the other hand, the sort of tooling that actually solves difficult problems is just as available to Scala as it to Java: YourKit profiler, JVisualVM (and other JMX consoles), etc... In some cases there tools available (e.g., sbt, ScalaSpec/ScalaTest, Slime for Clojure) that are superior to the ones for Java.
Personally I'm using Groovy on Grails for the web front-end part(s) of my current project, and even using Groovy for some of the "backend'ish" parts just to get through the initial prototype. Grails and Groovy are amazing in terms of developer speed - compared to Java anyway. But since it's all still on the JVM, I can just drop in existing Java libraries and - if, or when - I need to, it'll be fairly easy to transition bits to Java. For my money, it's the best of both worlds at the moment.
Then again, the stuff I'm doing is somewhat "enterprisey" so being on the JVM will probably actually be a selling point down the road.
This is a serious question: several people I respect (who are smarter than me and thus well capable of learning new languages) are using Groovy for their projects and I am wondering why?
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.
If you are assuming startup == web app, then sure Java is probably dead, in other contexts not so much. Using Java was advantageous for Bug Labs for a number or reasons - among them available open source libraries, widest adoption among customers (their business almost requires customers to touch source code and while Python would have brought in more enthusiasts, Java brings in more enterprise customers and thats where the money is), performance of the JVM, and portability across both the ARM platform and x86 stuff.
(Oh and BL is in NYC)
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).
I'm a Java developer, but I also recognize the amazing influence that more dynamic languages have had on my way of thinking. I'm hugely indebted to the SICP train of thought. That makes me a better Java programmer too, to get around some of the stupid practices many other use.
That is, are you simply observing that startups who make a big deal about the language they're using are more likely to be using one of the "hot" languages than a stodgy old language like Java?