Live data from Hacker News

Hate Java? You’re fighting the wrong battle.

javacodegeeks.com

131–140 of 186 posts

Re: Hate Java? You’re fighting the wrong battle.

#131

I'm going to cite Steve Pavlina here: http://www.stevepavlina.com/blog/2005/07/how-to-get-from-a-7... Some snippets: A 7 seems very close to a 9 or 10, but often a 7 is a local maximum — you can’t get any higher by continuing to follow the same path that got you to that 7 in the first place. A 7 is pretty good. At this level you feel generally content. It’s OK, fine, acceptable, satisfactory. What you’ll find when yo…

"This is what switching out of the Java paradigm, into Ocaml or Haskell, is like." If you try to do real, production programs in Haskell or Ocaml, you find that they have a lot of problems too. I've written some reasonably cool stuff in Haskell (like one of the top tutorials that people use to learn it). My teammate got his Ph.D under Simon Peyton Jones and did his doctoral thesis in Haskell. We were talking one day…

While I appreciate your experience, you basically are saying that it would be hellish because of two features. Haskell and/or OCaml have many incredible benefits, and many of them do not rely on laziness to work. Sure it allows you to write some incredibly elegant, generic solutions - but I don't think it is necessary to have it as the default.

I think things like the record system could be fixed up with simply more eyes on the problem. Lets face it, the Haskell community and contributor base is relatively small. If it had the resources of say C++ or Java behind it - a lot of these small problems could be tackled.

But when it comes down to it these are minor details, not fundamental flaws of the platform such as the ones discussed with Java.

Also I do program solely in Haskell during my free time (ok, maybe some matlab on the side haha). While the learning curve has been incredibly intense - it is so damn rewarding that I keep coming back. The solutions are incredibly generic, elegant, testable, and even quite fast with a little performance optimization work (with experience the amount of effort required for this tends to go way down as with anything). I guess I would rather write the correct code first, and put a little time into optimization than write highly optimized incorrect code and spend a lot of time fixing bugs.

But far and away the largest problem that Haskell goes a long way towards solving is composability. Many may argue this point but I really believe this is the largest challenge we face today in software. So many issues boil down to this. The vast majority of bugs, re-writing, etc... comes from software that was not designed in a composable manner. Because let's face it - with the current tools like Java/C++ it is incredibly hard!

Re: Hate Java? You’re fighting the wrong battle.

#132

I don't hate the Java language or the JVM. However, I hate many of the Java APIs, specifically most "JEE" crap, such as EJB, JMS, most third party ORMs (Hibernate), most Java "web frameworks" (too numerous to list). Java IDEs are bloated, slow, and often unstable with extra plugins (Eclipse)

Have you looked at JEE6 ? They've really pared down a lot of the boilerplate you had to do, and the reference implementation Glassfish is a snappy customer.

ORMs, i feel, are a misguided adventure, and Java on the desktop (eg IDEs) are a really easy target. That said, a faster disk and gobs of memory make IDEs really fly.

Re: Hate Java? You’re fighting the wrong battle.

#133
Java the language is OK. The only downside to it (in my opinion) is forcing OOP on everyone. Other than that, it's fine.

Java the virtual machine (JVM) is what I dislike more. It's a platform (like Windows) and within its virtual world, things are just not real. It's all pretend and I guess I should expect that from a "virtual machine".

Both the language and the JVM are mainstream and used heavily now... mostly in big, corporate environments. Devs can make a good, safe living writing Java, and there's nothing wrong with that.

If you hate Java or the JVM, do your hobby projects in a language you enjoy more. If you have no hobby projects or strong feelings (one way or the other), I'd argue that you're in the wrong business.

Re: Hate Java? You’re fighting the wrong battle.

#134

I'm going to cite Steve Pavlina here: http://www.stevepavlina.com/blog/2005/07/how-to-get-from-a-7... Some snippets: A 7 seems very close to a 9 or 10, but often a 7 is a local maximum — you can’t get any higher by continuing to follow the same path that got you to that 7 in the first place. A 7 is pretty good. At this level you feel generally content. It’s OK, fine, acceptable, satisfactory. What you’ll find when yo…

"This is what switching out of the Java paradigm, into Ocaml or Haskell, is like." If you try to do real, production programs in Haskell or Ocaml, you find that they have a lot of problems too. I've written some reasonably cool stuff in Haskell (like one of the top tutorials that people use to learn it). My teammate got his Ph.D under Simon Peyton Jones and did his doctoral thesis in Haskell. We were talking one day…

I've been playing around with Haskell recently (actually have been for years, off and on) and have been thinking about doing a real production system in it in the near future.

What is going to be so hellish? Space leaks? That doesn't seem like the worst thing in the world to me. Lots of scripting languages tend to bloat over time and the usual answer is to kill and restart the process every now and then. Even Apache does this to its children.

If I have to kill some daemons every now and then, but I get the robustness that Haskell seems to offer, it sounds like a great tradeoff to me.

I don't think laziness by default is all that useful in practice, but neither does it seem to be a fatal problem.

I'm not all that impressed with the web platforms for Haskell, but I'm thinking of doing Haskell in the backend, and Python in the frontend.

So... go ahead, pop my bubble; tell me how I'm being stupid...

Re: Hate Java? You’re fighting the wrong battle.

#135
post #87

Earlier quoted context omitted.

C / C++ are fun :)

Indeed. I implemented a linked list in C the other day, and it's the most fun I've had programming in years. as an aside, I feel old being able to talk about having programmed for years.

Coding in VB6 keeps you forever young

Re: Hate Java? You’re fighting the wrong battle.

#136
I'm working towards an MVP that uses Java (on Android), C#, and JavaScript. It's interesting comparing and contrasting the languages while using them all at once.

Java is a workhorse of a language. It's stable, gets the job done, and is reasonably sane. It's also readable, which in my opinion is one of the most (if not THE most) important traits of a software product. Readability. Simplicity.

The problem I have with Java is that I feel like it never evolved to meet its potential. It feels like C# 1.1 to me.

These days however I think the most interesting programming topic is not Java vs C++ or Java vs C# or any of these tired old debates.

What's most interesting to me is the notion that dynamic languages are somehow more productive or superior to strongly typed ones. It seems to be a commonly held view in the startup scene especially. It just doesn't make sense to me.

Re: Hate Java? You’re fighting the wrong battle.

#137

Earlier quoted context omitted.

"This is what switching out of the Java paradigm, into Ocaml or Haskell, is like." If you try to do real, production programs in Haskell or Ocaml, you find that they have a lot of problems too. I've written some reasonably cool stuff in Haskell (like one of the top tutorials that people use to learn it). My teammate got his Ph.D under Simon Peyton Jones and did his doctoral thesis in Haskell. We were talking one day…

While I appreciate your experience, you basically are saying that it would be hellish because of two features. Haskell and/or OCaml have many incredible benefits, and many of them do not rely on laziness to work. Sure it allows you to write some incredibly elegant, generic solutions - but I don't think it is necessary to have it as the default. I think things like the record system could be fixed up with simply more…

Oh, I think that nearly all of the problems with Haskell could be fixed up if it had the resources of C++ or Java. The problem is that in getting those resources, it would create new problems that would end up looking a lot like the whining about C++ or Java.

Java, as a language and a platform, is not fundamentally that bad. It was certainly done by very smart people with lots of experience.

It sucks because it has several design decisions embedded into it that were necessary for it to gain broad adoption and yet ultimately pretty annoying in the long run. Take closures, for example. The reason Java doesn't have closures is because it had a design constraint that all heap allocation must be indicated by the "new" keyword (same reason it didn't have autoboxing until Java5, and why classes aren't factory functions they way they are in Python). The reason for that was that at the time, the majority of programmers believed that heap allocation was slow and unpredictable, and in order for a new language to gain adoption, programmers needed to be able to control heap allocation and ensure it was used predictably.

This is actually still true - in domains like avionics and other "hard real time" areas, heap allocation is generally banned because it introduces nondeterminism into a program's run-time characteristics, and even with tuned incremental GCs, Java programs still spend a non-trivial amount of time in the GC. It just doesn't matter all that much, because Java started being used for applications where a few hundred millisecond pause for GC just gets lost in network latency.

Haskell faces a similar uphill battle. In order to get the critical mass of people needed to build out the ecosystem that C++ or Java has, it needs to be useful for the programs that people write today. But in order to do that, it needs to accommodate all these wonky developers with their weird ideas of what's necessary and what's not. Chances are, if it did that, there would be some design choices made that make Haskell nearly as lame as Java. And even if there aren't, and Haskell remains exactly the same as it is today, it'd soon be pushed into domains it wasn't appropriate for, just like Java, and people would be cursing it out for its flaws.

As Simon Peyton Jones says, "Avoid success at all costs."

There's a two-edged sword to every design decision that you make. Yes, Haskell gives you a lot of composability through lazyness, type inference, and nearly everything being first-class. Lazyness grants this through "pay for only what you use" - if a caller never uses the result of a library, the parts of the library's code that generate that result will never be invoked. The flip side of this is that if you suddenly use one more field in a tuple, way down the line in some unrelated portion of the code, you might trigger a very expensive computation. This is unacceptable in many large apps written by multiple people; you shouldn't have to worry that a tiny field reference can bloat the program's memory consumption by orders of magnitude.

(I have example trade-offs for type-inference and first-class everything, as well, but this post is already getting too long, and I wanna go do other things with my Saturday. ;-))

Re: Hate Java? You’re fighting the wrong battle.

#138
post #38

Earlier quoted context omitted.

>>I've been in the situation several times where technology decisions are made based on brand I've personally seen a scripting language been thrown out and everything rewritten in Java. After a couple of years they had to go back to scripting languages for a big part, for productivity. So they would ship sometime... (To minimize embarrassment, they used a different scripting language. [Edit: Yes, the second scripting…

We went PHP->Java a couple of years ago, because we'd need thousands of app servers if we didn't. We recently agreed that when we replace the stuff that isn't performance-critical, we don't need to take the productivity or morale hits to do that in Java, but we'll be damned if it's staying in PHP.

Did you happen to write/blog anywhere about the scenario and the reasons for the move from PHP to Java? It would be an interesting case study.

Re: Hate Java? You’re fighting the wrong battle.

#139

Earlier quoted context omitted.

... and yet Steve Pavlina was a Windows developer. Do we have to quote cult leaders on Hacker News? Steve Pavlina is the guy who writes blog posts about winning blackjack through ESP. His wife is a professional psychic. He sells magic CDs for hundreds of dollars that will give you psychic powers when you listen to them in bed. There's no credibility to be found here.

I'd rather we consider what's being said rather than who is saying it.

The truth of a statement can be determined by two things:

1. If the person is an authority or expert on the topic being discussed. In this case, the person has credibility and it is smart to give them a level of trust.

2. If the person is providing a reference to some objective, public evidence that can be independently evaluated to determine if the statements are valuable.

The post in question did not provide either #1 or #2.

Steve Pavlina is popular because he's a good writer, not because his ideas are supported by evidence or because he has credibility or legitimate authority.

With the general public, all it takes to be influential is good writing. e.g. Jesus Christ is popular.

Hacker News should aim for a higher level of discourse: discourse based on verifiable facts, or based on credible authority. Not sophistry by well-spoken demagogues.

Re: Hate Java? You’re fighting the wrong battle.

#140

Earlier quoted context omitted.

... and yet Steve Pavlina was a Windows developer. Do we have to quote cult leaders on Hacker News? Steve Pavlina is the guy who writes blog posts about winning blackjack through ESP. His wife is a professional psychic. He sells magic CDs for hundreds of dollars that will give you psychic powers when you listen to them in bed. There's no credibility to be found here.

Steve Pavlina has one essay, in particular, which changed the way I thought about my business and directly contributed to my later success. (The five-second version: improvements in your funnel are multiplicatively effective. Does that sound obvious? It wasn't obvious to me, and it set me down the road of A/B testing and other hillclimbing, and I climbed my way right out of my day job.) Yes, he later went seven flavo…

Since Steve Pavlina makes something like a million dollars per year on his magical blog, he has credibility when it comes to making money.

The real question to ask about Steve Pavlina though is whether his blog posts are designed to help YOU make money, or to help HIM make money. He typically doesn't provide objective evidence indicating you will be helped. And if he wanted to, he COULD get this evidence.

So for instance he claims that using various magical powers you can make money. He could invest $50,000 in running scientific trials of these methods and objectively prove to his readers that it works.

THAT would be worthy of Hacker News.

But if Steve Pavlina is fair game to be quoted on HN, I am gonna start quoting Jesus. Cause they have about the same level of credibility.

Post reply on HN