They outdid themselves - <AUTHOR> http://geekblog.oneandoneis2.org/index.php/2009/06/13/they-outdid-themselves <comment><USER2> This is related to Window's Data Execution Prevention (DEP) security feature. A detailed description can be found here:

<http://support.microsoft.com/kb/875352>

IE8 and Google Chrome interact with this feature for process isolation. I've seen reports online of this feature affecting both:

[http://activerain.com/blogsview/763323/data-execution- preven...](http://activerain.com/blogsview/763323/data-execution-prevention- crashes-google-chrome-when-print-just-disable-dep)

I'm sure Microsoft discovered this problem during the very thorough testing of IE8 and added some code to fix/defend against this problem by editing the boot.ini. Clearly this is an issue which affects a very small number of users, so it is reasonable to expect that the fix can itself break for an even smaller number of users.

 _sigh_ So in the end, this is more mindless, ignorant Microsoft bashing. It simply isn't justified. There are many things to dislike about them, such as weak leadership and lack of "taste". But certainly not incompetence or malice.

<comment><USER3> _sigh So in the end, this is more mindless, ignorant Microsoft bashing. It simply isn't justified._

Cut the guy a break. He's letting off some steam about something absolutely ridiculous that has happened to him. Don't always expect people to comment on their unpleasant personal experiences with a detached, unbiased, global, balanced, carefully worded judgment as though they had the full attention of an entire nation.

<comment><USER4> Not of an entire nation. Of the whole world!

It's one thing to be spiteful in public, but quite another to be spiteful in a medium that publishes immediately to the whole planet.

<comment><USER3> Let's be realistic here. Just because you can technically view a rant on some blog somewhere from anywhere in the world doesn't mean it's going to be on the minds of millions of people. This whole "publish to the world" idea is a kind of delusion.

<comment><USER5> So if we all read it, it's an intemperate, unjustified, mildly idiotic anti-M$ rant that wasted our time. But if we don't read it, it's just one understandably frustrated guy letting off a little steam. And that means whoever posted the link to HN transformed him from a normal guy into a global idiot.

<comment><USER3> The point is that it is a rant on a blog, and the real idiots here are you and I sitting here in a forum discussing its merits as a literary contribution to society.

</comment></comment></comment></comment></comment></comment><comment><USER6> See, that just proves that the browser _is_ an integral part of the operating system.

<comment><USER7> I guess we'll know that the browser has replaced the operating system when it starts deleting kernel32.dll.

<comment><USER8> "I'm sorry XP, I'm afraid I can't let you jeopardize the mission"

</comment></comment></comment><comment><USER9> Sounds like a story Raymond Chen would tell. I don't know how an IE8 installation would somehow mess with boot.ini, but it would be interesting to find out the true cause of such an odd bug.

<comment><USER10> Someone pointed out that this:

[http://activerain.com/blogsview/763323/data-execution- preven...](http://activerain.com/blogsview/763323/data-execution-prevention- crashes-google-chrome-when-print-just-disable-dep)

Is the bug they were trying to prevent by editing boot.ini, which apparently went wrong. So this is a bug in the code that's there to try to disable a piece of buggy code by editing boot.ini _facepalm_

</comment></comment><comment><USER11> I'm _sure_ there's no good reason why IE8 messes with this file. I'll take this random bloggers word over the thousands of smart geeks working for Microsoft any day.

<comment><USER12> From poking around some support forums, it looks like the beta versions of IE8 would not function properly if you had certain non-default options in your boot.ini file. I'm guessing that in the RC, they tried to fix this by rewriting the boot.ini to a default state. Perhaps this process failed due to non-default permissions on that file.

<comment><USER13> You might be on to something here. It wouldn't surprise me if there is a boot flag (PAE is a common troublemaker) that causes some sort of problem for IE's new process isolation feature, which I understand to be a real rabbit hole.

</comment></comment></comment><comment><USER14> I'm not wild about Mac OS (no focus-follows-mouse, no davidw), but it's a fantastic OS for parents. Mine use it, like it a lot, and have a generally pleasant time using it.

<comment><USER15> When my mother decided her Power Macintosh was too slow for her, I decided she would use Linux.

I wanted her to have no trouble with viruses, malware and, most of all, I did not want to have to fix her computer and, if I ever had to, I wanted to be able to do it remotely from a remote terminal (I have ssh on my phone). I also wanted to use cheap commodity hardware and grabbed an inexpensive IBM desktop (built like a tank) for her.

She is very happy with it and she is enjoying her third major OS upgrade. She never noticed them.

<comment><USER16> Yay for Linux for mums! Put my mother on Linux, too, and she is doing fine.

Explaining how to do stuff in OS X would have been a nightmare. Start with "actually clicking the 'x' does not close the application".

Everybody should have a mum to explain computer apps to, puts things into perspective.

</comment></comment></comment><comment><USER17> Never, ever trust M$. They have no interest whatsoever in doing things right, on purpose or by ignorance. That's imprinted in their dna.

</comment><comment><USER18> What a spiteful post about a _bug_. Flagged.</comment>


Techshop is out of business - <AUTHOR> I went by Techshop SF this morning and was turned away at the gate.  The manager told me that they shut down the business and that he was just notified last night.  There has been no notice to members yet.  He said that he doesn't know how it's going to work out with refunds for existing members.<p>Relevant article:  https://makezine.com/2017/11/15/techshop-closes-doors-files-bankruptcy/ <comment><USER2> I decided against getting a membership to the one in San Jose because it was just prohibitively expensive. We are talking about thousands. Hopefully local libraries/schools can get the equipments on the cheap and create a program so everyone can go.

</comment><comment><USER3> Chapter 7 is an asset sale or liquidation and does not contemplate a re- organization and continuing operation.</comment>


Rtop-Vis: Ad Hoc Cluster Monitoring (Load+Memory) Over SSH - <AUTHOR> http://www.rtop-monitor.org/rtop-vis/ <comment><USER2> Nice. Does it do only load average and memory?</comment>


Why IPy: reasons for using IPython interactively - <AUTHOR> http://fastml.com/why-ipy-reasons-for-using-ipython-interactively/ <comment><USER2> IPython's built-in notebook mode (ipython notebook) entirely changed how I use Python. It's like an interactive session you can go save, reproduce, and publish.

<comment><USER3> Yes, and a hundred times yes for teaching.

</comment></comment><comment><USER4> IPython is great, but that was the most unconvincing article I've ever read.

</comment><comment><USER5> i've been a moderate fan of ipython; it's the ipython notebook that changed everything for me.

i can have everything inline: syntax-highlignted code, markdown, dynamic plots, and LaTeX equations.

(some examples: [http://nbviewer.ipython.org/github/ipython/ipython/blob/mast...](http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/SymPy%20Examples.ipynb))

what's more, you can share you work as a static .ipynb document or dynamically via a server (rather than your localhost, which is the default).

</comment><comment><USER6> The shell exec magic, especially when combined with notebook mode and pylab inline, can make some simple analyses of text data really dead simple. You can, for example, do something like:

        my_data = !find . | grep .log | xargs grep interesting_event | awk '{print $3}'
        map(float, my_data)
        hist(my_data, 12)

Which will dump out a nice pretty 12-bin histogram of whatever the numeric data in the third column of output, of messages containing interesting_event was. To get this sort of fancy, run `ipython notebook --pylab=inline` and enjoy!

EDIT: for context, I wind up using this all the time to tease out information from Riak logs, like how long Bitcask merges take, in aggregate, and for locating particular events in time and characterizing their frequency.

</comment><comment><USER7> I don't get why is this on front page. IPython is awesome, enough said. If you are not using it, you are doing it wrong.

<comment><USER8> The IPython debugger ipdb also makes a great replacement for the builtin pdb.

</comment></comment><comment><USER9> I use IPython whenever possible. But I recently started looking at DreamPie ([http://www.dreampie.org/](http://www.dreampie.org/)) because I was getting tired of the interpreter line break mode. I'd like to write in a text-file mode and then run. I know I can do this with Vim already but maybe I am just too noob running Python from vim sometimes crash my program or accidentally enter some hell state I can't re-enter my file. I am giving DreamPie a try now.

</comment><comment><USER10> I use IPython for the interactive python part of [https://coderpad.io](https://coderpad.io) \- being able to run a block of code and drop you into a REPL on an exception with full syntax coloring and context is killer.

</comment><comment><USER11> How does ipy work with virtual envs? I've always admired the feature list, but my assumption is that it doesn't really run in a virtual env, would that be accurate?

<comment><USER12> it works fine with virtualenvs, on osx, you can do

        virtualenv env
        . ./env/bin/activate
        easy_install readline
        pip install ipython

on linux, you can avoid the readline install. i have no idea what the windows scene is, but at least for the past four or so years, i've never had a problem with virtualenvs and ipython.

<comment><USER13> On windows it's the same. Although I think I usually install ipython outside of virtualenvs, because I tend to always use it.

</comment></comment></comment><comment><USER14> %paste is a nifty but simple trick that I find really useful

</comment><comment><USER15> One of my colleagues hates IPython for no particular reason, he prefers using the standard python shell.</comment>


Children Born to Older Fathers and Grandfathers May Live Longer - <AUTHOR> http://extremelongevity.net/2012/06/13/children-born-to-older-fathers-and-grandfathers-may-live-longer/

<comment><USER2> (edit:) As quite rightly pointed out by stiff, this summary article is actually not lying to us, as its final sentence _does_ explicitly and correctly pointed out that this paper's goal was actually not to attempt to establish any kind of causation here. I will not delete or edit the rest of my comment here, but I would recommend disregarding it.

People who live longer are more likely than people who die young to have children while they are old. People who are children of people who genetically live long are more likely to themselves genetically live long. Thereby it would be surprising--downright shocking (in the scientifically-exciting "time to reevaluate what kinds of traits can be passed down by genes" sense)--if we did not find the statistically significant correlation that people born to older people tend to be genetically able to live longer than people born to young people.

FTR, The paper even admits the possibility of this selection bias, but then seems to just disregard it with a "regardless" as, despite this headline and summary, the paper seemed more excited by the increased evidence that TL was a good marker of longevity. I hate the way people describe science. :(

<comment><USER3> It's all well and good to question statistics, but:

> People who live longer are more likely than people who die young to have > children while they are old.

That's a statement with pretty poor support. Certainly the median childbearing age is _well_ within the lifespan of even short-lived people. The relative population of fathers who have children at 40 is not meaningfully increased by the number of people who died before 40 of correlating/age-related illness (staying with the hypothesis from the article: people basically don't die before 40 because of the length of there telomeres). Frankly my intuition says that the effect you posit is going to be near-zero. Do you have any numbers?

If you're going to criticize, do it right.

<comment><USER2> Actually, no: I will contend I am "doing it right". I am not arguing that my explanation is true (if I were, I'd be just as bad as these people I'm ranting about); I only will claim that my explanation is obvious and reasonable and thereby has to be considered and explicitly countered or controlled for before you can just assume that it is due to something else.

I totally accept that it /might/ be true that if you are older when you have children, the children will live longer, but this paper does not demonstrate that. That said, I don't even think the researchers of this paper were /really/ attempting to demonstrate that, and so I will put the blame squarly on this "Extreme Longevity" site for not paying enough attention.

(edit:) Actually, while I maintain that ajross' commentary was unhelpful (as I stand by my first paragraph in this comment), as pointed out by stiff this article does conclude with an explicit note discounting the notion that this article is establishing causation.

<comment><USER3> Except that, as I point out, your explanation is neither obvious nor reasonable (frankly, I'd say it's flat wrong). Yet you introduced it without evidence anyway as a way of saying "What about this?". That's the same technique creationists use to "challenge" evolution. You can't make that argument, logically, with a flawed counter hypothesis.

The only reason I posted is that you got uppity in your final sentence, complaining about journalists lack of statistical sense. Frankly, yours is no better.

<comment><USER2> As I explicitly stated, the authors of the paper actually agreed that this was a sufficiently interesting selection bias to note (although not to bother refuting, as far as I can see; they just say that that if that were true then sperm TL would be an interesting marker, and then move on with a "regardless").

> It is possible that older men who volunteer to donate sperm have better > reproductive health and longer sperm TL _and that a similar selection bias > results in men with longer sperm TL tending to reproduce at later ages_.

For more context on my general crusade against poor science reporting, I encourage you to read my comment history. (In which case, I will claim your snark about believing in evolution is ironic. I contend and argue that it is publishing summary headlines like this that makes people not believe in other science, such as evolution.)

<http://news.ycombinator.com/item?id=4082886>

</comment></comment></comment></comment></comment><comment><USER4> You might look on this in the context of work on selective breeding of flies at older ages by Michael Rose:

[http://www.fightaging.org/archives/2011/04/the-work-of- micha...](http://www.fightaging.org/archives/2011/04/the-work-of-michael- rose.php)

Variability of longevity in response to changing circumstances persists across generations for calorie restriction and age of childbirth in a range of laboratory species, so we should not be completely surprised to see some signs of that in human populations. The trick has always been to be able to peel that away from the confounding factors. (And you can argue over whether this paper manages to do that sufficiently well).

From an evolutionary perspective it makes perfect sense for organisms to adjust for longevity or a fast burn in response to environmental changes. Species that are able to do this should be more successful, and this is an old, old set of machinery - as shown by the fact that is shared with flies, yeast, and so forth.

</comment><comment><USER5> This story was submitted two days ago: <http://news.ycombinator.com/item?id=4099940>

</comment><comment><USER6> I'd like to see an explanation of how this matters in plain English. I'm not sure what 0-1 in telomere length is, in relation to years, but the difference the chart reveals is less than 1/10th of a percent. The bias in the chart alone makes it seem huge.

Then I'd like to know if the telomere "consumption" rate is constant (I doubt it). Because unless its constant, this just leads to our potential maximum lifespan—not the expressed lifespan (due to stress, diet, etc). Like genotype/phenotype differences.

</comment><comment><USER7> I once read somewhere that the after a certain age, like 50 or something, the less quality you sperm is and hence your kids. So would this be the trade off?

</comment><comment> excuse-me "people in the Philippines"

So no chance that older father = more education = better job = more money = better healthcare, compared to teenage parents?

<comment><USER8> I just quickly skimmed the published paper, but it looks like they controlled for standard demographic variables.</comment></comment>


Holiday favor: looking for logo feedback - <AUTHOR> https://www.surveymonkey.com/s/B78JWJM

<comment><USER2> Oh, I need to add two things. First, why no color? The outcome may have been different. Second, I wonder if the order they are displayed would affect the outcome. I say this because I think in hindsight that I was more likely to dislike a logo the further down the list it was. Food for thought.

</comment><comment><USER2> merry christmas!</comment>


Grasshopper problem yields insight into quantum theory - <AUTHOR> https://phys.org/news/2017-12-grasshopper-problem-yields-insight-quantum.html <comment><USER2> A useful if comparatively unsophisticated application might be in urban spatial and transport network analysis/planning.

Typically, spatial models use a basic circular catchment geometry to approximate random travel patterns across a city or suburb or neighborhood. That invariably influences a network's or neighborhood's real-world shape when it gets built/modified.

For example, consider the area of influence ("walkshed") of a bus stop or train station, and how perhaps walkability improvements across surrounding streets might be prioritized as a result of modelled demand distribution. A grasshopper solution could apply if the bus/train trip is the first hop and the last-mile walk is the second hop and the street grid or neighborhood is the lawn.

A more refined initial catchment geometry based on these grasshopper solutions could ultimately make a difference in how scarce resources for urban/transport infrastructure get allocated, lifting net benefits on average. It should at least make for more realistic predictions as well as more accurate explanations of real-world observable travel/development patterns.

The paper mentions the "ant problem" as an extension of the grasshopper problem, i.e. excluding disconnected shapes. That would be even more useful for the application above.

Of course, as a first order approximation, a simple circle catchment geometry isn't necessarily terrible (being not that far from a cogwheel), but there's probably a category of analogous distances in urban life where non-circle-like shapes would make a marked difference.

</comment><comment><AUTHOR> Preprint at [https://arxiv.org/abs/1705.07621](https://arxiv.org/abs/1705.07621)</comment>


Arizona surges ahead with new $1B solar plant - <AUTHOR> http://venturebeat.com/2009/04/20/arizona-surges-ahead-with-new-1b-solar-plant/

<comment><USER2> I like this plan, but I just did some quick math.

Source: [http://18.104.22.168/search?q=cache:jhpcqZRwpl0J:www.eia.do...](http://188.8.131.52/search?q=cache:jhpcqZRwpl0J:www.eia.doe.gov/cneaf/electricity/esr/table5.xls+average+electric+bill&cd=2&hl=en&ct=clnk&gl=us&client=safari)

The average monthly electric bill in AZ is about $110.

60,000 households X $110 per month is 6,600,000. Per year that's 79,200,000.

One billion / 79,200,000 = 12.6.

Add the cost of 100 employees per year and it's about 14 years before the plant breaks even.

Is this usual for a power plant?</comment>


Why isn't Java used for modern web application development? - <AUTHOR> http://programmers.stackexchange.com/questions/102090/why-isnt-java-used-for-modern-web-application-development <comment><USER3> Part of the answer is Java itself. It's verbose, static typed, and requires a lot of boilerplate code to do properly. The fact that classes are a compile- time concern, rather than a runtime concern, is just such a drag. You end up with interfaces you don't really need, only so that you can inject them into constructors so that your app is properly decoupled and testable.

Part of it is a framework issue. Struts is horrible...absolutely, stunningly horrible. Your controller is an XML file (seriously). Freemarker (the main templating language) makes ColdFusion look awesome.

Play is better, but it seems built for the way websites were created in mid-2000. JSON is still a second-class citizen. Static actions are a weird choice given IoC is achieved via DI in a static language.

Edit: I should add that there's also the persistence story. Anyone who's done [n]Hibernate knows that it's, at best, a mixed blessing. Even Java's NoSQL drivers are verbose compared to their dynamic brothers (first-class hash support is a big issue here, for some drivers in particular). I'm not sure something like Sequel would even be possible to write, and the AR implementations are, again, limited by the compiled-time nature of the language and the inability of bend the syntax into a nice DSL.

Java also lacks lambdas, and generic support is weak. And what's up with int vs Integer...the list goes on and on.

<comment><USER4> why does a language designed around an OOP perspective need a lambda (which comes from a functional programming perspective)?

<comment><USER5> Because otherwise you get a bunch of

        new Callable<Integer>() {
          @Override public call() {
            return 1;
          }
        }

<comment><USER6> Or even better,

        for(final Iterator it = container.iterator(); it.hasNext();) {
            final Object o = it.next();
            println((Integer) o);
        }

compared to:

        container do: [:o |
            Transcript print: o; cr.
        ].

<comment><USER4> this explanation made the most sense to me. thanks.

</comment></comment></comment></comment></comment><comment><USER7> I spent three long years doing Big Freaking Enterprise Java web apps. You can certainly do modern web dev in a Java stack (we were Struts, Hibernate, Spring, and an internal framework). It just fought us every single step of the way, and every time we had to do something new (that couldn't be templates off of working code) they'd have to get one of our three best engineers to spend a week fighting the new library into submission. Sometimes the libraries won.

The easiest way I can describe it is that everything you like about e.g. Rails was designed as a specific dig against the Java stack. I am told Play is less painful.

On the plus side: Java devs are plentiful, the library support is worlds deeper than the ruby ecosystem (particular around enterprise-y needs), and it plays well with teams of dozens (which you will probably need). I honestly think "restricts your developers terribly" is not a bug for typical Java projects, since the outsourcing shops contributing lots of our code base would have been even more dangerous if the code didn't restrict what modules thy could break.

<comment><USER8> Incidentally, the bit about many of Rails' features being a dig at Java isn't poetic license. Rails' original marketing angle was essentially "Look how different we are from Java!"

I think that's why the difficulty of deploying Rails apps in those days wasn't much of an obstacle — they positioned themselves not against PHP or Perl, but against Java, so the difficulty of deployment didn't look like so bad.

</comment></comment><comment><USER5> I've been hacking Rails since 2004, and I've made the switch to Java (dropwizard+mustache) for basic web development this year (sometimes with a meteor-like micro-framework I rolled myself).

Benefits:

\- Higher quality code. Java is easier to refactor than Ruby, which makes up for the lower language power.

\- Performance!

\- Actual concurrency!

\- Faster server spinup and incremental changes. Rails with 20 gems in development mode is super sluggish.

\- Better library ecosystem!

\- Better dependency management system (maven > rubygems)

\- Better debuggers

\- Better profilers

\- Easier deployment and ops environment(java -jar myjar, vs bundle install, ruby/passenger/unicorns)

\- Reasonable in-process metrics

<comment><USER9> > Higher quality code. Java is easier to refactor than Ruby, which makes up > for the lower language power.

Let me rephrase:

"It's easier in Java to _rename_ identifiers than ruby, because my IDE does it for me."

Now that's fine, but I don't see how do you conclude:

Easier to rename identifiers => Higher quality code. How on earth?

Easier to rename identifiers => Makes up for lower language power. What language deficiencies does renaming identifiers make up for?

Other than renaming(which can be done for ruby, though it requires manual effort), there is _no refactoring_ which Java does better than Ruby.

> Actual concurrency!

Am curious. Where in basic web development does concurrency help? As far as servers go, evented servers(thin, mongrel) will perform as good as, if not better, than a threaded server. And evented servers can handle much more concurrent requests than threaded servers.

As far as concurrency at language level goes, very rarely have I needed to spawn a thread(I go for gevent) in the controller. Controller's job is to dispatch ASAP - everything else goes in the queue where you use EventMachine or gevent or whatever if you need concurrent processing.

> Faster server spinup and incremental changes. Rails with 20 gems in > development mode is super sluggish.

Rails is more sluggish compared to "stop the world. I am compiling" Eclipse?

> Better library ecosystem! > Better dependency management system (maven > > rubygems)

As long as we are just throwing out claims without backing them, ruby library and bundler/gem are 1000x better than mvn.

> Better debuggers > Better profilers

Not everyone is a fan of graphical everything. Going by this line of reasoning, Windows has better support for git because gui?

> Easier deployment and ops environment(java -jar myjar, vs bundle install, > ruby/passenger/unicorns)

`java -jar myjar` starts your app server, your web server, minifies your css, js, migrates the db....? You can very well bundle the dependencies along with your app for rails, but I don't see why I would do it for a webapp. Also, your jar works only when you don't have java calling into native code. If you don't have native extensions, ruby is platform independent as well(i.e can be bundled).

> Reasonable in-process metrics

No ideas. What's that?

<comment><USER10> Your Java IDE also lets you move methods and fields, extract interfaces from concrete classes, push members up or down, find all references to a member (reliably), view inheritance relationships, and much more. And it can do all of those safely, warning you if you'll shadow another name. I wish I had that stuff in a Ruby IDE.

I've used Eclipse for a long time, but not for JEE projects, and I don't see any "stop the world" behavior when it's compiling Java. Java compile jobs run at a low priority and rarely block another workspace job. If you want to save a file that's being compiled, Eclipse will let you and restart the build. Maybe you mean "stop the world I'm launching a JEE app?"

<comment><USER9> > Your Java IDE also lets you move methods and fields, extract interfaces from > concrete classes, push members up or down, find all references to a member > (reliably), view inheritance relationships, and much more. And it can do all > of those safely, warning you if you'll shadow another name. I wish I had > that stuff in a Ruby IDE.

Some of it isn't applicable to Ruby, and some of it has to be done manually. True that you will have to rely on tests or something to make sure you didn't shadow anything, or you renamed at all places, or you didn't rename something which shouldn't have been renamed.

> I've used Eclipse for a long time, but not for JEE projects, and I don't see > any "stop the world" behavior when it's compiling Java

What machine do you use? I was using a 4 gigs, dual core machine, and eclipse regularly stalled while compiling and launching.

<comment><USER10> I'm usually in a 64-bit Linux VM (in VMware Workstation) on a 4 core i5 Xeon from about 3 years ago. 5 GB RAM total, Oracle Java 7 with -Xmx800M for Eclipse. My workspace includes 50 projects, most of them are Eclipse plug-ins themselves.

In my experience, if Eclipse "stops the world", Java is collecting garbage. Java 6 and 7 have become much better at doing incremental collection more often (maybe parallel is the default now?) and the result is a more responsive UI. To me, Eclipse itself feels snappier over time (each release from 3.3 to 3.7 has felt better on similar hardware).

Another thing I've noticed is that Eclipse is significantly faster cleaning/building large workspaces on Linux compared to Windows on the same hardware. I assume this is a result of Linux's aggressive filesystem caching.

<comment><USER11> I thing the core point is, Large Java application development seems to be possible/doable only because eclipse is doing 90% of the work for you.

Without eclipse 90% of the Java dev work would come to a grinding halt.

And that says a lot of about Java and its ecosystem. And not to mention its developers.

</comment></comment></comment></comment></comment></comment><comment><USER9> > why the hate toward Java for modern web applications?

Verbose language. But more importantly, needlessly verbose and badly designed apis.

JSP:

        <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
        <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

        <c:choose>
            <c:when test="${emails.unread != null && fn:size(emails.unread)}">
                You have ${fn:size(emails.unread)} unread email(s)!
            </c:when>
            <c:otherwise>
                You have no unread emails!
            </c:otherwise>
        </c:choose>

Saner templates:

        You have ${emails.unread ?: 'no'} ${emails.unread?.pluralize('email')} !

[http://paulbuchheit.blogspot.in/2007/05/amazingly-bad- apis.h...](http://paulbuchheit.blogspot.in/2007/05/amazingly-bad-apis.html)

> But I can't help thinking to myself, "I could do this much faster if I were > using Java," primarily due to my relative experience levels.

If you are more comfortable with Java, and are just beginning with Rails, it goes without saying you will miss Java. That's not a very useful metric. Give rails 4 weeks, then compare them for ease of use and expressiveness.

If you don't have a month to learn rails, then stick with Java.

> But also because I haven't seen anything critical "missing" from Java, > preventing me from building the same application.

"It can be done with Java" isn't the same as "It can be done concisely with Java".

I would say learn Rails/Django. Use them for CRUD. I have checked Java ecosystem recently, and they are still far behind in terms of expressiveness when it comes to regular web programming. Play framework is close - I haven't used it personally apart from toy examples.

For long running services, depending on your needs, you can either write it in Ruby/Python on top of some infrastructure tool(resque, zmq, celery....), or you can write in in Java if your service is CPU intensive.

<comment><USER12> "Saner templates: You have ${emails.unread ?: 'no'} ${emails.unread?.pluralize('email')} !"

At the cost of throwing internationalisation out of the window. At least the example you led with is more conducive to localisation.

<comment><USER9> > At the cost of throwing internationalisation out of the window. At least the > example you led with is more conducive to localisation.

Right. i18n is the reason you have to import two taglibs and the template doesn't support basic conditionals. /s

JSP is horrendous. There is not a single reason for its existence, and it should be quarantined.

As far as i18n/l10n goes, the example I quoted was from play framework. This is how an internationalized version will look like:

        # Messages file

        unread_emails=You have %s %s
        no_email=You have no email

        # Template

        #{if (emails.unread) }
            &{'unread_emails', emails.unread, emails.unread?.pluralize('email')}
        #{/if}
        #{else}
            &{'no_emails'}
        #{/else}

Are you arguing internationalized jsp is somehow better than this? I tried really hard, but I failed to think of a single templating engine that's worse than JSP.

<comment><USER13> I like JSPX. Designers and HTML front-end engineers intuitively understand custom tags, and any imperative non-declarative logic should ideally be pushed back into Java or a custom JSP tag, such that you rarely see it.

<comment><USER9> > Designers and HTML front-end engineers intuitively understand custom tags, > and any imperative non-declarative logic should ideally be pushed back into > Java or a custom JSP tag, such that you rarely see it.

Have you used other templates say Jinja2 or Django templates? The traits you listed aren't unique to JSPX. Jinja2 is designer friendly, doesn't have non- declarative logic, and is pleasant and concise to use.

ERB(or slim or haml) allows embedding code in templates, but that doesn't mean you are mandated to do it. Java will allow you to put n non-public classes in one file - that doesn't mean you code your whole app in a single .java file. Just because it's possible is hardly an excuse for it being bad.

There are use-cases where code in templates are useful. I would rather not jump through the hoops of defining a custom tag for an one-off use-case.

</comment></comment></comment></comment></comment><comment><USER14> Google (at least Gmail), LinkedIn, etc are to me modern web applications & AFAIK they are written in Java (or at least partly in Java) and I'm not counting countless enterprise web apps.

Java is what they call mature technology. It's past the hype and language flame war phase. Those who know its value, just use it to GTD without any ceremonies.

</comment><comment><USER15> I've worked with PHP for 16 years, and with Grails for almost 5. There are some aspects of Grails and Groovy that make me more productive than developing in PHP. GORM simplicity and expressiveness, and CriteriaBuilder stuff, combined make using direct SQL very rare (required in a few cases, but rare).

However, there are aspects of PHP that make things more simple, and this gets down to somewhat of a cultural thing. Of the PHP people I know, many (most?) of them have done some server setup and understand the entire request stack. I know a lot of PHP people don't grok all that as well, but of the people I know personally, many do. That number is far higher than the number of Java folks I know who really grok the full web stack. I'm not saying none do, but... many don't have to as much as PHP folks.

A friend of mine who's done Java for a decade (and Groovy some too) was confused by a complaint I was having about Java web stuff. Specifically, I was (am?) having some trouble getting session replication stuff working. We need to load balance web servers, and I really want to avoid server affinity on a load balancer. In PHP, sessions are serialized to disk, but serializing to memcache or some other database is pretty simple. Java... not so much.

My friend's confusion was "why are you doing that? just tell the ops guys to set it up". Well... I _am_ the ops guy. Which gets to the culture of dev stacks. Historically, the Java shops I've seen inside are larger, and there's a bigger separation of concerns - the server/ops person often isn't even much of a developer, they just drop in a war file and keep websphere running, etc. Again - YMMV, but that's been mostly what I've seen.

The 'separation of concerns' here is the heart of the issue. In PHP, all session stuff is handled in code. In Java... well, your app server takes care of that for you - 'out of the box' you don't have any real direct control over how they're handled, and configuration of such is never done in code, but at the server level.

I'm reminded of PHP in 96/97. If you were doing PHP back then, it's because you really loved it, not because it was your job, and you really needed to grok everything about everything to get it set up and working (locally, anyway). If you're really set on using alt.java tech, you likely have a greater commitment to getting your hands dirty in multiple levels.

disclosure - i run groovymag.com and have a bias towards all things grails and groovy :)

<comment><USER16> I can't see why you can't serialize session to database or memcache or anything else if you want. The amount of code involved is almost zero... Also I don't see a reason to have a shared storage for session objects in a scalable distributed application you are trying to build.

In Java you could, for example, use ehcache with out-of-box replication - simpler than using external C-based application like memcache.

And in Java world you have to deal with different applications servers (Weblogic/WebSphere/JBoss etc.) where apache http and nginx installation and configuration is very primitive in comparison. Yes, it involves sharp skills when it comes to huge loads and replication, but that's another story.

Your friend is probably a young junior developer, you can't be a serious java developer without a decent server skills - there is no ops team at home to do it for you and you can't really gain a lot of knowledge only doing stuff at work.

<comment><USER15> Friend in question is certainly not a young junior dev - >10 years of dev experience, 8 in java, and does java training. Trainers may be more focused on language stuff vs admin stuff, so I cut some slack there. But.. the majority of java people I've known have been developers only, who don't do any server admin. Again, not saying java devs who know sys/server admin don't exist, but, the ones I know who do that aren't 'java devs' in the sense of only doing java, but tend to be polyglots with experience from multiple backgrounds.

I'm not sure why you'd _not_ have a shared storage for session data in a multi-server system. What else do you suggest?

<http://ehcache.org/documentation/configuration/configuration> \- that's an insane amount of configuration it looks like compared to something like PHP. It also looks like you're tying yourself to a specific caching solution vs having generalized session data.

</comment></comment></comment><comment><USER17> Java is a language that is in a weird space.

It doesn't compile to binary like C/C++ and it isn't high-level and interpreted like a Ruby or Python.

It's a weird middle-times language. It originally appeared in 1995 and is somewhat pioneering in the web space. But it isn't as clean as C# since C# appeared in 2001 and was able to learn from the mistakes of Java. It's definitely not as clean as Go which appeared in about 2009 and was able to learn from the mistakes of C, C++, Java, and C#.

The framework choice is probably more important than the language choice.

There is a fragmentation of frameworks. Starting a greenfield project with Spring, Struts, Stripe, WebObjects, etc would probably be a bad choice. Play is probably a reasonable choice.

But this is not an issue with Ruby or Python. You're probably going to pick Rails or Sinatra as your choice if you go with Ruby. You're probably going to go with Django if you go with Python.

Tyranny of choice is a problem with Java frameworks.

<comment><USER18> Spring is a bad choice?

<comment><USER19> Yes. Endless XML configs, and a ton of overhead to get started. Anyone can get productive with Play in 5 minutes. Spring + Hibernate were smart choices in 2003, but no longer the case.

</comment></comment></comment><comment><USER20> When starting web development, I found it easier to learn Ruby and the Rails Framework from scratch than to use Java which I had several formal classes in. I think that says something about Java's documentation/community support.

Ruby/Rails has railstutorial.org, tryruby.org, rails for zombies/code school, and railscasts. All these high quality beginner resources made using Ruby instead of Java an easy choice.

The other reason for me is that I find the code I write in Java to be too wordy and found the more concise syntax of Ruby refreshing and fun.

<comment><USER21> I don't think the problem is Java documentation/community support.

It's really that with the exception of Play/Grails/Vert.x the frameworks are horrifically over-engineered by developers who live and breathe in the enterprise space. Nobody has ever really cared much about smaller, more startup land developers. So Java has required so much knowledge and involvement just to do the simplest things.

I would take a look at frameworks like Play for the future of the platform.

</comment></comment><comment><USER22> Here's an old HN thread: Any web startups using Java? - <http://news.ycombinator.com/item?id=1932821>

</comment><comment><USER23> I work in an industry where C++ still rules. I haven't ever written more than a few lines of Java. However, here's a job posting from our web team: [http://us.blizzard.com/en- us/company/careers/posting.html?id...](http://us.blizzard.com/en- us/company/careers/posting.html?id=120000E)

Java is the only language mentioned by name. Last time I talked to them about a thing I was working on and mentioned I would soon have (now actually do have) a Python implementation, the response was basically "That's neat, but can you do it in Java too?"

So, in my little world at least, web development is the only place where Java actually does get used.

</comment><comment><USER24> I programmed java web apps for 10 years before I switched to python, 4+ years ago. I feel that I'm much more productive using python and can get much more done in a shorter period of time, and to be honest, I'm much happier when I develop in python. Here are some of the reasons why I think python is better then Java based on my personal experience, your milage may very.

Web Frameworks:

When I first start programming web apps in Java, Struts just came out, and it wasn't great, but it was the best thing available. I created a bunch of struts apps, and a few in other frameworks along the way. Whenever a new framework came out (Tapestry, Wicket, GWT, stripe, grails, AppFuse, Play, RichFaces, Spring, etc), I would try it out and see if it was any better, and most times it was only a little better, and sometimes not better at all. I do have to say the play framework is a step in the right direction.

Batteries not included:

One of the most annoying parts of Java was the fact that most of the libraries that you use were not included in java itself, you had to include a ton of 3rd party libs from places like apache commons. If you use something like hibernate with any other large library, you end up in Jar dependency hell, where hibernate needs one version of a jar, and something else needs another version. If you load the jar files in the wrong order, you are out of luck. You need to depend on tools like maven, and ivy to manage your dependencies, and this just brings in more dependencies into your project which results in projects being huge. I had some war files 100MB+ war files for the simplest web apps.

Too many options:

For some reason there seems to be way too many different ways to do the same thing in Java. There are over 38 different web frameworks for java according to wikipedia ([http://en.wikipedia.org/wiki/Comparison_of_web_application_f...](http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java)) and 23 different ORM's ([http://en.wikipedia.org/wiki/List_of_object- relational_mappi...](http://en.wikipedia.org/wiki/List_of_object- relational_mapping_software#Java)) just to name a couple of examples. If you look at other languages they have a more reasonable number. Some people think that having lots of options is a good thing, but it isn't it leads to a lot of wasted effort in the developer community, everyone is reinventing the same wheel, and if you are a new person to the language you have too many option to pick from.

App servers:

Java web applications are really heavy, and require a lot of resources to run. They are especially memory hungry. Like any piece of software they can be tuned to reduce their resource footprint, but compared to other languages their out of the box setup is horrible. In my past I have used weblogic, websphere, Jboss, tomcat, and jetty. I only used the first three when I was forced to use EJB's, but even if you aren't using EJB's they were large app servers and sometimes hard to configure and get running correctly. Tomcat and Jetty are much better and easier to setup, but are still resource hogs.

App Hosting:

If you aren't running your own server it is real hard to find shared hosting for your java apps at a reasonable price. The main reason is because java apps require much more memory compared to other languages, so it doesn't make sense for a shared hosting provider to spend their valuable RAM running a java site, when they could run 5 php sites in the same place. That means there are less providers offering java hosting, which in turn means higher costs to run your website.

Development Time:

When I developing in java, I found myself much slower then what I can do in python. I would need to make a change, compile, redeploy and then test, and this slows down the iterative process. I know there are ways to make this faster, but even at it's best, I felt much slower then what I can do in python.

There is also a lot less boilerplate code to do the same thing in python, so I spend less time developing the code as well.

Java just feels over engineered in a lot of parts, A lot of the API's and interfaces are just way to complicated for what you want to do. And everyone and their brother thinks they are a java architect and this results in big complicated systems that are hard to use and develop with.

IDE:

When I was developing in Java, I felt stuck to the IDE, I was lost without it. IntelliJ is the best IDE's on the market, and it was hard switching to python because there wasn't anything like it for python. So instead of an IDE, I just used textmate, which is just a normal text editor. It was hard at first, but because it was just a text editor, it was a really fast and responsive application. I could open my whole project in a few seconds, whereas when I want to open a project in an IDE it could take a minute or more, with a machine with a ton of RAM. The makers of IntelliJ came out with a python editor called pycharm, I bought it when it first came out, and it is great. But what I realized is that I don't need an IDE for python, I'm fine with a text editor. When I go back to working on Java web apps which I have to do from time to time, I try to use the text editor, but I haven't quite mastered that yet. I personally need the IDE for Java more because If I mess up something it takes longer to recompile and redeploy, which slows me down.

ORM:

When I first started using Hibernate as an IDE, I thought it was great, it had it's problems, and it wasn't perfect, but it was better then what I was doing before. I was happy with it, until I did an application with Django's ORM on a python project, and that opened up my eyes, that is how an ORM is suppose to work. After that project I went back to hibernate, and I just felt disappointed, and longed for going back to Django's ORM. Another great python ORM is sqlalchemy, which is similar to Django's ORM, but a little different. I have limited experience with ROR's ORM, but from what I remember, it was pretty good as well.

Templates:

The web templating systems in Java aren't that good, and I think I have tried them all (tiles, freemarker, velocity, etc). Most of them offer only basic functionality and are a pain to work with. On the Python side, my two favorites are Django templates and Jinja2, they have everything that I could need in a templating engine, and are really easy to use.

<comment><USER25> I think all of this was true 4 years ago. But Java EE 6 has changed a lot of this. My main experience has been on the Microsoft stack, but I have learned and worked with a lot of tech, including Rails and Django. Last year I worked on a project for which we chose Java EE 6.

There's a lot of good stuff there; for instance simple, bloat-free architecture, JPA (the new persistence architecture), CDI (context and dependency injection), JAX-RS (REST), JSF + PrimeFaces (very productive front- end development) and lightweight, fast web application servers (Tomcat 7, Glassfish).

And you have access, when and if you need it, to a very mature, stable and capable set of libraries, open source projects and tools. Plus the ability to deploy to almost anywhere including PaaS platforms.

So I think there's a lot to like in modern Java.

<comment><USER24> For what it is worth, I have used Java 7, JPA (with hibernate), tomcat 7 and glassfish, and I didn't notice much difference. Jersey (JAX-RS) is pretty nice, one of the better libraries to come out of Java in a while.

I do agree that Java is moving in the right direction, but it is a very slow progression. I think the major cause of the slowness is because of the fact that SUN was bought by Oracle, and it took a little while for that to settle down, and now things are slowly moving forward again.

One of the things that Java did right was their WAR files. It is the envy of most other programming languages. You compile your WAR file, and deploy anywhere assuming it is a compliant servlet container. I wish Python had something like this.

You are right the popularity of PaaS's like dotCloud make it much easier to deploy and run your application. On dotCloud you just need to push up your WAR file, and you are running, by far the easiest of all the languages to deploy.

I really like Java as a language, I just think it has a long way to go on the web application front, before it can catch up to the features and speed of development of the other languages.

<comment><USER26> For folks outside of JavaEE, its common to deploy jars though. I have never run the software that takes .wars.

<comment><USER24> You deployed jars for web applications?

War files are not JavaEE, you might be thinking of EAR files.

A war file is just a jar file with a different name and manifest, and expects a few things, WEB-INF directory with a web.xml and that is about it.

More info can be found here: <http://en.wikipedia.org/wiki/WAR_file_format_(Sun)>

<comment><USER26> Sorry for my mistake, I associate WAR files with Application containers like JBoss and (IIRC) Tomcat. I only deployed with embedded jetty :)

</comment></comment></comment></comment></comment></comment><comment><USER27> Just remember when you talk about "cool" and popular that, Google+, GMail, LinkedIn, and many parts of Twitter are Java.

<comment><USER28> For twitter: JVM != Java

Also remember that Google uses C++ as well for their infrastructure

LinkedIn, yep

<comment><USER19> Google is heavily reliant on Java. LinkedIn and Twitter both use Scala and Java. I'm not really sure that pointing out that Google has some C++ code really disproves that Java is used heavily at google. Java is still very widely used, more so than more fashionable languages like python and ruby, but the syntax is a bit long on the tooth, hence the popularity of Scala, Clojure and Groovy.

<comment><USER28> " I'm not really sure that pointing out that Google has some C++ code really disproves that Java is used heavily at google. "

Of course not

"Java is still very widely used, more so than more fashionable languages like python and ruby""

Yes, but "widely used" is a tricky term, I'm sure cases both for and against can be found.

But to talk about Google, last I heard it's only possible to develop application there in the following languages: JS, Java, C++, Python (there are exceptions of course, for specific libraries or things like ObjC for iOS)

</comment></comment></comment></comment><comment><USER29> As a young developer (early 20's) I think Java's lack of usage in webdev has to do with several "problems". 1.) Java has the rep of being bloated and slow. (At least when compared to C/C++) 2.) Related to #1, almost all the tools the majority of webdevers use are written in C/C++ and not Java. For instance, Apache, Nginx, Redis, MongoDB, MySQL, SQLite, Webkit, V8 - which gives me the feeling that using/improving C/C++ gives me a better understanding of my toolset whereas Java doesn't have any perceived added benefit. 3.) For Application Development itself, using scripting languages like Ruby/Python/PHP makes for BLAZING fast development especially when using a framework like Rails. 4.) The LAMP Stack (if implemented correctly) can handle a LOT of traffic, I'm talking millions of daily users.

So this leaves almost every web developer (I'd say around 98%) with no reason to use Java - ever. Why should they? With the current tools, I can build highly scalable apps extremely fast and because I'm using scripting languages I'm free to experiment, mix/match, combine, and build new tools in innovative ways. Also, I think because Java is associated with the group of C/C++ and "lower level" languages it really does loose cred simply because it can't compete in effeciency terms with those languages.

Personally, as a programmer who loves C, Ruby and Haskell (so yea I'm biased but who isn't?) just looking at the Syntax of Java makes me seriously wonder what Sun was thinking.

<comment><USER19> You're criticizing Java for being slow, and then presenting Ruby as an alternative. You do realise that Java is up to 100 times faster than Ruby: [http://shootout.alioth.debian.org/u32/benchmark.php?test=all...](http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=yarv&lang2=java). And on multicore systems Java up to 300x faster than Ruby: [http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...](http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=yarv&lang2=java)

...alternatively combine the performance of Java with a highly expressive language e.g. Scala

<comment><USER29> yes, but if you noticed I'm comparing Java to C in terms of program language speed. I'm comparing Java to Ruby in development speed NOT language speed, I thought this was obvious... sorry, If I wasn't clear enough above.

<comment><USER19> You were clear, but if you're going to compare languages you can't cherry pick which features to compare. You compared Java to C performance and then Java to Ruby in terms of expressiveness. Since Ruby does not have the performance of C and C does not have the expressiveness of Ruby it's not really a fair comparison to Java.

</comment></comment></comment></comment><comment><USER30> I do a lot of work in Python now, which is great. But the one thing that I really really really miss from Java is better dependency management and packaging.

I wish I could just create a .war file for my Python project and copy it to a deploy directory on a server to get it going.

Using a virtualenv and pip or easy_install works ok but a simple maven config to define my project and it's dependencies is still lightyears ahead of the mess we have in Python now.

It is _really_ difficult to beat: 'mvn package && scp target/my-app-1.0.war server:~/deploy/'

I hope Python will get there.

<comment><USER31> ... and if you wouldn't mind to spend some more time...

<http://maven.apache.org/plugins/maven-deploy-plugin/>

"mvn deploy" is probably all you need? :D

</comment></comment><comment><USER32> We (plumgine.com - in private beta) have been using Java with a success with Play Framework and asynchronous AJAX fronted (some parts with Backbone.JS).

I have been using Java for a while (8 years - J2EE, Android, some desktop utils) and back in the JSF days I used to hate the Java web with a passion. Then I found Stripes (step in a good direction) and Play Framework (absolutely awesome Java web framework).

These days I can whip out prototype in Java+Play Framework faster than anything else.

Some of the reasons:

* I don't have to worry about naming methods/members because I can safely rename them later

* I can easily map Java objects to JSON and back using Jackson

* most of the time I don't worry about database schema - Hibernate (JPA) generates it for me

* Play Framework works in the "hit refresh" mode to see changes

* deployment to Heroku is as seamless as any other.

There is increasingly more action going on in the browser in JavaScript and I think Java (with Play Framework) is a great tool for building backend APIs that will be consumed by your JavaScript client.

</comment><comment><USER33> Who says it isn't?

Spring MVC + Spring Data JPA or Mongo + Thymeleaf for templating + coffee- maven-plugin for Coffee to JS transpiling and you're good to go.

I think the first comment on the question is very true:

> "I think you're incorrect: it is still used, it's just lost cool factor."

</comment><comment><USER34> Some syntax issues (no function pointers, no lambda, no rich literals, enforcing everything to reside in an object) endears it to Enterprise OO mindset where you want large teams of programmers working "efficiently" - <USER2> ultimately a risk conscious and ego driven manager just wants a large team of developers to further their career - and doesn't care how much boilerplate is present or how few lines of code actually do something productive. These are slowly being addressed with newer versions of Java, but it's a long hard road out of hell... and the mental association of Java as enterprise VB is here to stay.

I'd say it's guilt by association with the early years of a java. It reminds lots of people of the bad old days of programming. Getters and setters instead of pure data. Using java objects to hardcode schemas in the middle tier. Horrendeous death by meaningless patterns (form over function). Gigantic libraries configured by XML (how can you take a modern language seriously that doesn't have rich literals). Build dependencies and process that again can't be efficiently specified in the native literal forms of the language.

Finally Java has no useful pedigree as a client side or UI language. Thus the J2ME fiasco. The AWT fiasco. The android sluggish UI fiasco.

You can write a modern web app in BCPL, or Java. But for many people the other options are simply more appealing.

</comment><comment><USER35> Many Google services are backed by Java on the backend, and Closure compiled JS or GWT on the frontend.

<comment><USER35> To flesh this out a little more:

The question should be "Why isn't Java used by startups or for small projects?". Java certainly used for "modern Web apps" at more established companies. The issue is one of speed vs scale. Startups need to get to minimum viable product. They are usually small teams of 1-3 engineers, and value iteration speed over performance or maintainability. Running up against scalability issues or team code code maintenance issues is a problem "you'd like to have", that is, by the time you reach that stage, it's a sign your initial implementation helped you over the initial hump of getting customers or investment. You can afford to rewrite the app at that point.

A company like Google can afford the luxury of building things for scale up front, even though they may be wasting their time implementing scaling for something that might get no users, because they can absorb the loss.

At least, that's my opinion, that many many "cool", "hip", "modern" companies build small apps with small teams where iteration speed and simplicity are the greatest requirements.

<comment><USER36> Correct but also a company like Google knows that the moment they put up a link in the frontpage they can drive vast amounts of traffic towards the new property. Secondary reason is that a web app from Google that doesn't scale is really bad PR and draws comments like "omg, lulz it's Google and they can't handle traffic???!!!1!"

Hence, they build with scaling in mind. A startup has none of these concerns and just cares about time to market and making some money to convince VC's that it's worth investing.

</comment></comment></comment><comment><USER37> I think because of it's age, the pitfalls and limitations of the language may be more well understood, so it may suffer from a sort of 'grass is greener' effect.

<comment><USER23> Its age relative to what? Python is older by any measure, and the first public release of Ruby was only 7 months after Java's. Java certainly had a higher profile than either at the time, but they're all from essentially the same period.

[http://en.wikipedia.org/wiki/Java_%28software_platform%29#Hi...](http://en.wikipedia.org/wiki/Java_%28software_platform%29#History)

[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29...](http://en.wikipedia.org/wiki/Ruby_%28programming_language%29#Ruby_1.0)

<http://en.wikipedia.org/wiki/History_of_Python>

<comment><USER38> Age in the spotlight doing web development.

Not age since the development of the language.

Mid-nineties it was CGI and mostly Perl.

Then Perl started to fade, and in the late nineties, early '00s, it was all Java and PHP.

Then Ruby/Python etc co started to catch on in the mid-00's.

And already Ruby and RoR is considered "passe" and old, and fadsters turn to Node.js and such.

Seems to be a 5-7 year cycle.

</comment></comment></comment><comment><USER39> This is just my experience but if there has existed a common line of thinking with the rabid Java fans I've worked with, it would be closed mindedness to the point of being its own brand of Stockholm syndrome. The thinking that whatever the project at hand may be, a Java based solution is always the correct answer and there is nothing to learn from alternative platforms. I've heard "Why would anyone want to use anything other than Spring?" or "C# is shit" more than once. However, if you were to compare the experience of using Spring + Eclipse to C# + ASP.MVC + Visual Studio, you'd have to be pretty set in your ways not to admit that the latter is a much nicer platform to work with and that the Java eco-system shouldn't take something away from it. Having a standard web framework (ASP.MVC) makes .NET teams miles more efficient than the framework fragmentation that is Java web dev.

And if you're comparing it to Rails or Django, I honestly don't think you can easily find a 3 or 4 engineer Spring team that could deliver a product as good (or scalable) as Instragram in the 2 years it took them to do it in Django. You just can't iterate as fast.

<comment><USER40> >>the rabid Java fans I've worked with [closed mindedness]

It is hard to argue against anecdotal evidence, but of the cases you mention -- java, Rails, Django -- imho, it is not exactly the Java people who seem to be the worst language/framework fanatics...

(That said, scripting languages eat static languages' lunch for development speed in most every case I've seen.)

<comment><USER39> That kind of framework enthusiasm doesn't really stem from the closed minded mindset I was referring to. Most Ruby & Python devs I've met would admit that Java is a much better choice than their perspective languages for something like that requires distributed concurrency and speed (like Cassandra or Redis). The people I'm talking about are the ones that wouldn't look seriously at RabbitMQ because it's written in Erlang, not Java.

<comment><USER40> I got your point, I wrote that according to my personal experience the other cases are quite a bit worse. Which is worth as much as your personal stories.

</comment></comment></comment></comment><comment><USER16> It is not used for 'Show HN my useless toy I built last weekend'. It is widely used in many start-ups.

</comment><comment><USER41> This assertion is simply wrong. Java is number one for Enterprise web application development.

[Edit] Statistics: [http://w3techs.com/technologies/overview/programming_languag...](http://w3techs.com/technologies/overview/programming_language/all)

</comment><comment><USER42> Because Web is type-less, purely text-based, and dynamic. And Java is not. I remain a Java aficionado, but would reach for it last in the Web tier. Put a dynamic language upfront and hook it to a SOA-based Java backend.

</comment><comment><USER43> I actually think the IDEs for Java, e.g. Eclipse and IntelliJ, are quite evolved and help speed webapp development, and they do it in ways that make up for Java's verbosity and boilerplate.

For me a lot of the web frameworks for Java felt cumbersome and I found that Java worked better when functioning as a high-throughput backend service instead of handling front-end UI. Oddly, with Java, I was more concerned with concurrency issues, GC tuning, threading, and other systems-y problems, and with Python I was more concerned with concise and Pythonic syntax and faster iteration.

</comment><comment><USER44> I think that Java still has a strong role for writing REST web services and heavy lifting back end stuff because of the robustness of the JVM and lots of great tools and frameworks.

That said, most of the web services I have written this year are in Ruby (with some Python in the last few weeks).

For web app front ends I really prefer lighter weight tools like Rails.

</comment><comment><USER45> No it is not the coolness factor, it is the paradigm. Java forces you to use OOP and OOP is not very fit for web development: you want to answer fast to a stateless request by checking some data trough different filters (eg a template), you don't want to recreate a full world of objects and pass along some messages.

<comment><USER46> Hmm, last time I checked all the "new" frameworks were OOP too. Be it rails or django - they all have some kind of OO paradigm they adhere to.

<comment><USER45> Yes, and there is this ORM impedance mismatch thing. I stopped writing classes for all tables and it removed many useless code and many issues related to stateful methods. Just one example: if you delete a book with book.delete() then how come you can two or many lines later change its title with book.title = Foo?

</comment></comment></comment><comment><USER47> We use Java to develop web apps because while we could use anything ( I run a research team) I know that I will face problems downstreaming the work if we do. The application support groups can get a Java developer with a whistle, the same is just not the case for any other language, apart from possibly PHP.

</comment><comment><USER48> Framework of the month fatigue.

</comment><comment><USER49> imho, Java is a great tool when it is deployed for its original goal: Platform independent GUI clients. Unfortunate its now mainly used on the server side, where it fits badly.

The main reason I'm not using Java on server side is memory footprint. A typical Lighttpd, fastcgi, Rails, MySQL stack runs well within 256mb of memory on a Xen instance. A typical Apache, Tomcat, JBoss, Hybernate, Spring, Oracle stack requires 4GB or more on a root server.

I think most startup coders shy Java, because they know it mainly by maintaining enterprise dead horses and bloatware.

See: Tate, Bitter Java, ISBN: 193011043X

<comment><USER50> I seriously recommend that you re-look your stack. Java is simply the most performant (RAM and CPU) stack vs Rails in a pure apples-to-apples comparison.

The two stacks you have compared are apples to watermelons - here are a couple of questions:

1\. Why both Tomcat and Jboss ? Choose one or the other. In fact for the best performance you can run your application on Jetty.

2\. Mysql vs Oracle ? you need to compare equally. I hope you do realize that JDBC/JNDI are perfectly compatible with Mysql - more so, since they are the same business entity.

3\. Lighttpd vs Apache is again an unfair comparison. You can perfectly run Lighttpd in front of Tomcat.

I seriously suggest you re-evaluate Java if you are purely looking for performance. Developer productivity is a whole different story altogether.

<comment><USER49> all true - but my unfair comparison was between the typical java enterprise dead horse, and a typical startup stack.

I did not compare Java best practice for one reason: The enterprise bloat is how Java is perceived. Its not about why Java is not suited for startups, but why Java is not choosen by startups.

</comment></comment></comment><comment><USER51> Disclaimer: This is cribbed from my upcoming "The Well-Grounded Java Developer"

\</comment><comment></comment><comment></comment><comment>---

If you investigate Ola Bini's pyramid where languages fall into static, dynamic and DSL layers you'll see his arguments for what type of programming tasks suite which layers. Java sits firmly in the stable layer, and so do all of its various web frameworks.

As expected for a popular and mature language, Java has a large variety of web frameworks, such as these:

Spring MVC, GWT, Struts 2, Wicket, Tapestry, JSF (and other related "Faces" libraries), Vaadin, Play, Plain old JSP/Servlet

Java has no de facto leader in this space, and this partly stems from Java simply not being an ideal language for rapid web development.

The former leader of the Struts 2 project, a popular Java-based web framework, had this to say on the subject:

"I've gone over to the dark side :-) and much prefer to develop in Rails -- for the conciseness mentioned above, but also because I don't ever have to do a "build" or "deploy" step during my development cycle any more. But you guys and gals need to be reminded that _this_ is the kind of thing you are competing against if you expect to attract Rails developers ... or to avoid even more "previously Java web developer" defectors like me :-). Craig McClanahan, Oct. 23, 2007"(<http://markmail.org/thread/qfb5sekad33eobh2>)

Java is a compiled language, and as alluded to previously, this means that every time you make a code change to a web application, you have to go through all of these steps:

1\. Recompile the Java code. 2\. Stop your web server. 3\. Redeploy the changes to your web server. 4\. Start your web server.

As you can imagine, this wastes an awful lot of time! Especially when you're making lots of small code changes, such as altering the destinations in a controller or making small changes to the view.

If you're a seasoned web developer, you'll know that there are some techniques you can use to try and solve this problem. Most of these approaches rely on some sort of ability to apply code changes without stopping and starting the web server, which is also known as hot deployment. Hot deployment can come in the form of replacing all of the resources (such as an entire WAR file) or just a select few (such as a single JSP page). Unfortunately, hot deployment has never been 100 percent reliable, and the web server often still has to perform expensive recompilation of code.

If you must use a Java-based web framework, I highly recommend products called JRebel and LiveRebel (<http://www.zeroturnaround.com/jrebel/>). JRebel sits in between your IDE and your web server, and when you make source code changes locally, they're automatically applied to your running web server through some genuinely impressive JVM trickery (LiveRebel is used for production deploys). It's basically hot deployment done right, and these tools are seen as industry standards for solving the hot deployment problem.

Generally speaking, Java-based web frameworks don't reliably allow you to have a fast turnaround time for your changes. But that isn't the only concern with Java-based web frameworks. Another factor that slows down rapid web development is the flexibility of the language, and this is where static typing can be a drawback.

In the early stages of developing a new product or feature, it's often wise to keep an open-ended design (with regards to typing) of the user presentation layer. It's all too easy for a user to demand that a numeric value have decimal precision, or for a list of books to become a list of books and toys instead. Having a statically typed language can be a great hindrance here. If you have to change a list of Book objects into a list of BookOrToy objects, you'd have to change your static types throughout your codebase. Although it's true that you can always use the base type as the type of objects in container classes (for example, Java's Object class), this is certainly not seen as a best practice—this is effectively reverting to pregenerics Java. As a result, choosing a web framework that's based on a language in the dynamic layer is certainly a valid option to investigate.

<comment><USER14> "1. Recompile the Java code. 2. Stop your web server. 3. Redeploy the changes to your web server. 4. Start your web server. ... Unfortunately, hot deployment has never been 100 percent reliable, and the web server often still has to perform expensive recompilation of code."

\- Last I checked i) the hot deployment in Tomcat/Jetty/SBT/etc is pretty solid, especially if we are talking development. ii) Java supports incremental compilation which means you only need to compile what has been changed, especially if we are still taking development phase again. Unless you compile after making changes to 100+ files, I don't see how expensive this step can be.

"Generally speaking, Java-based web frameworks don't reliably allow you to have a fast turnaround time for your changes. But that isn't the only concern with Java-based web frameworks. Another factor that slows down rapid web development is the flexibility of the language, and this is where static typing can be a drawback."

\- This argument about dynamic typing faster/better than static typing is just BS. Each offers it's own advantages and can be better/faster depending on where/when/how you apply it and how good a developer are you at actually using their power. Your first example of changing number value to have decimal precision can be achieved in static typing languages like Java/C# just as fast and reliably when one uses refactoring. Your second example of changing list of Book objects to a list of BookOrToy objects, could have been avoided all together by coding to interfaces and not concrete objects. If that has failed, refactoring again solves this.

<comment><USER52> Not only does hot deployment work almost always, so does in-place compilation of modified code within deployed modules while connected to a remote application server in debug mode.

<comment><USER51> To both of these points, you still have classloader issues which cannot be resolved (App/Web server vs application classloading). This is one of the reasons that Java 8 is going down the modular Jigsaw route (taking ideas from OSGi along the way). Some web/app servers have put together clever tricks over the years and JRebel also helps, but it's certainly not foolproof.

I'll concede that the static vs dynamic language gap is narrowing in terms of flexibility (and yes BookAndToy is a _very_ contrived example), but dynamic language fans love the fact that you don't have to refactor at all.

</comment></comment></comment></comment><comment><USER53> Modern web application development process is not limited to only one language or one framework.

</comment><comment><USER54> Because Java sucks. Please, for the good of our industry, please stop using it.

</comment><comment><USER55> It's mainly the coolness factor. Oracle's ridiculous Java lawsuits also contributes to that.

<comment><USER21> I don't think that the Oracle lawsuits have made a single bit of difference to anybody.

Oracle isn't the only big fish in the Java space.

<comment><USER56> But they own Java.

I'm sorry, but as a Java developer seeing Oracle pick it (anything Java) up like a dead fish and try to see who they can smack big money out of is horrifying.

It goes against the culture of Java that I'm familiar with. I've been learning other languages on the JVM for the express purpose of being ready to jump ship if I need to with those other languages. (Jython can jump to Python, JRuby to Ruby, Java to C#/C++, and Scala can be mapped to something I'm sure).

<comment><USER57> Don't forget IBM. (Not that they might seem any better than Oracle...)

They own a large chunk of the enterprise Java space with WebSphere. And they're also are a large driving force for Eclipse (was also their original code).

</comment></comment></comment></comment><comment><USER21> It IS used extensively for modern web application development just not by a lot of startups. In the enterprise space you really only see Java and .Net used for the core pieces.

One reason that Java is becoming less popular is that you don't need to use Java (the language) to be a part of Java (the ecosystem). You can use Groovy, Scala, Python, Ruby etc which are often less verbose and have more exotic features. So developers can try new languages out but don't need to abandon their existing libraries. Best of both worlds.

This is the approach that companies like Twitter and Etsy have taken.</comment>


Sex Comes to the Micros (2012) - <AUTHOR> http://www.filfre.net/2012/02/sex-comes-to-the-micros/ <comment><AUTHOR> FYI, the abstract for the New York Times article that is purportedly the first nude the NYT has ever printed (even counting classical art?) is here:

"Art and Science Proclaim Alliance in Avant-Garde Loft"

[http://query.nytimes.com/gst/abstract.html?res=980CEFDA173EE...](http://query.nytimes.com/gst/abstract.html?res=980CEFDA173EE63BBC4952DFB667838C679EDE&pagewanted=all)

The full article is behind a paywall so here's a screenshot of the spread...slightly NSFW:

[http://imgur.com/3FfKlyM](http://imgur.com/3FfKlyM)

</comment><comment><USER3> This blog is an absolute treasure. In terms of capturing a sense of time and place, it's right up there with folklore.org.

As a person who grew up on graphical adventure games, and as a person who still misses the genre, I love getting to walk down memory lane with the author. I've learned so much about the games I loved.

I highly recommend reading through the entire blog.

</comment><comment><USER4> Related: [http://motherboard.vice.com/read/before-there-was- internet-p...](http://motherboard.vice.com/read/before-there-was-internet- porn-future-sex-brought-cyberpunk-sex-to-the-masses)

</comment><comment><USER5> and it continues...

[http://www.engadget.com/2016/04/19/vr-porn-room-service- las-...](http://www.engadget.com/2016/04/19/vr-porn-room-service-las-vegas/)

</comment><comment><USER6> Mentioning text adventures without Leather Goddesses of Phobos? Unacceptable!

<comment><USER7> This is 5 years before Leather Goddess of Phobos.

<comment><USER8> And the blog also has a good post on LGoP: [http://www.filfre.net/2015/03/leather-goddesses-of-phobos- or...](http://www.filfre.net/2015/03/leather-goddesses-of-phobos-or-sex-comes- to-the-micros-again/)

(and lots of other 80s adventure games and RPGs. I love this site and am very glad Jimmy Maher is out there researching this stuff)

</comment></comment></comment><comment><USER9> Might be worth having a 2012 in the title.

<comment><USER10> Good catch. Added.

</comment></comment><comment><USER11> (Text Hidden, waiting for a explanation from dang on "Please don't do this here.")

<comment><USER10> Please don't do this here.

<comment><USER11> Please explain, thanks.

<comment><USER10> Your comment was "TLDR (look@pics)". That's the most unsubstantive, unwelcome comment I've seen so far today. You managed to be dismissive, glib, lurid, and stoopid all at the same time. And that's not even everything that was wrong with your comment.

If you don't have a thoughtful reaction to offer, please don't post here.

<comment><USER11> Realize you're a mod, beyond that, do not know you, your opinions, experiences, etc.

Given your not saying what was wrong, just calling me names, I'll expand on what I said.

(Re: TLDR) I personally dislike long-form, especially if it's on a topic I find interesting, but to me, not worth reading; clearly my opinion, but that I would hope is obvious.

(Re: Look at the photographs.) I found the photos interesting and worth looking at; if you have an issue with this, you need to explain why.

Please don't take my response as anything other than trying to understand how you feel and why.

(On a side note, which users are mods? Ask since I plan to follow them to get a better since of how mods deal with issues.)

<comment><USER12> Think about this way: Why would anyone care to read the mere facts that you dislike the longer form, or that you "found the photos interesting"?

Actually writing a "TLDR" is a fairly useless convention if you are attempting to have a useful discourse - but actually telling people that you found it "too long and didn't actually read it" is just insipid in nearly any context. You're saying you couldn't be bothered to read and summarize the article, and for some bizarre reason you want us to know that.

 _what_ you found interesting about the photos might be of value... or anything else substantive that you might add to the conversation - <USER2> demonstration, say, of how the point(s) could have been make more efficiently.

If you can't convince yourself you have something intelligent to add, just don't hit reply, it's a good filter. You'll still get false positives (or at least I do) but it's worth a shot.

<comment><USER11> Reflected on your comment and though had been my intent, it might not be obvious - that being, unless I'm missing something, it is not possible to downvote a submission; which in this case, I would have. To be even more clear, my comment expressed what I'm unable to due via the existing interface.

I didn't plan to be disruptive, but I don't mind it either.

I'll assume the "missing" downvote button is by design and will refrain from using comments as "expressive" downvotes.

<comment><USER13> You must be new here. The ability to downvote is given after acquiring a certain amount of HN karma.

<comment><USER11> Thanks, my rep is currently over 1000 and I do not see a downvote option for submissions.

At 500 rep, you get to downvote any comments that are not directly to a comment or submission; meaning you can downvote a comment to a comment to a of submission or comment you post.

If you know a source for rep related privileges, please let me know; tried to find info on this, but haven't seen anything yet.</comment></comment></comment></comment></comment></comment></comment></comment></comment>