Live data from Hacker News

Java for Everything

teamten.com

211–220 of 344 posts

Re: Java for Everything

#211
post #51

I like how the author made the point about the commenting. I never realised it until I started my work training at a big company. I'm reading my colleague's C# (ASP.NET MVC) code and find it requires no commenting to understand even though I started learning C# pretty much on the job. I then had to laugh when I needed to explain some JavaScript (and jQuery) I wrote to him and exclaimed, "What the hell is this doing!"…

PHP vs ASP.NET hosting prices are close to parity now.

Some ASP.NET web hosts offers $10/mo plans (a bit more if you want to use SQL Server). Or go with Azure Websites (Shared), starting from ~$15/mo if you think you need to scale up real soon.

The same goes with development costs as well (if you are using a Windows machine already).

Visual Studio Community edition is free and has support for extensions (where Express does not). They are great for freelancers. Do note that commercial licensing kicks in for > 5 developers.

Re: Java for Everything

#212
post #169
post #28

Earlier quoted context omitted.

And all the fast ones aren't implemented in Python....

So what? For most problems there are fast, well-designed libraries available with idiomatic python interfaces; why would you care about the implementation details?

Note, this is coming from the same guy who programs in x, which was also implemented in C(++). Like the JVM, CLR ad nauseum. :)

Re: Java for Everything

#213

> You can complain all day about public static void main, but have fun setting up 500 servers. The downsides of dynamic languages are real, expensive, and permanent. Love this quote. This is a thought-provoking article, even if you don't agree with everything as stated.

500.times {ec2.instances.create(:image_id => "ami-foobar")}

Or if you want to own the hardware, you can do the equivalent with a Chef script, or a Puppet script, or..

No one is going to set up 500 servers by hand.

Re: Java for Everything

#214

Ok, now your boss asks you to write an iPhone client. Or web client with a lot of logic in the browser. Or even a custom, native windows client. (Ok, Swing or SWT, but, ...really?) " Language X for Everything" is simple not possible, regardless of the value for X .

  * C# (and/or F#) to build iPhone, Android, and Windows Phone apps [1] 
  * F# code that compiles to JavaScript for front-ends [2] 
  * C# (and/or F#) code for Windows and *nix clients [3] 
They are not perfect (nor the tooling are free), but it is possible.

[1] - http://xamarin.com/

[2] - http://websharper.com/

[3] - http://www.mono-project.com/

Re: Java for Everything

#215
post #65

Earlier quoted context omitted.

In current version of Groovy you can mix static and dynamic typing in different sections of code by telling the compiler what are your preference.

Why would you ever _not_ want typechecking?

Generally people that don't like explaining what they mean to a computer.

Re: Java for Everything

#216
post #173
post #53

Does anyone know a good starting point for learning not just Java, but how to install everything I need? I consider myself the Neo of OOP and a master devops, but every time I tried to use Java I hit a wall of unreadable manuals/guides , software impossible to install/maintain, and mixed opinions among Java devs. Like it can't be used without a dedicated sysadmin.

My opinionated viewpoint, if you want to learn this stuff for a job: Install eclipse. Get a non-JavaEE version - probably "eclipse for java developers". It's flaky software and you will have to babysit it sometimes, but it's still the best choice. Use maven, then you don't need a sysadmin to maintain your libraries. You just add libraries as dependencies (you can even use a search wizard in Eclipse) and it Just Works…

I'm confused. Is there something else in another language with better solutions for IDE, dependency management, dependency injection, etc.?

Honestly, you just listed some of the best reasons to use Java.

Re: Java for Everything

#217
>> Whatever time was saved by the developer when writing the Python code (if any) were lost many times over as dozens of users had to wait ten times longer each time they fished through the logs.

I was first exposed to Python in 2002. The sentiment in the quote above is reminiscent of the reasons I came back to Java. With a little Bash and some Java or a little Python and some Java I can do pretty much anything I need from system services to web to rich clients.

Edit: Great article.

Re: Java for Everything

#218
post #53

Does anyone know a good starting point for learning not just Java, but how to install everything I need? I consider myself the Neo of OOP and a master devops, but every time I tried to use Java I hit a wall of unreadable manuals/guides , software impossible to install/maintain, and mixed opinions among Java devs. Like it can't be used without a dedicated sysadmin.

That...sounds surprising. Basically you need: 1. An IDE (I highly recommend IntelliJ IDEA) 2. A build and dependency management tool (I prefer Gradle, but Maven is a reasonable choice - though way more verbose) Beyond that point, a lot depends on what you want to do. Some of my preferences (YMMV): * logging: slf4j over logback * json serialization/deserialization: jackson * db access (if you don't need or want ORM):…

Great suggestions. Do you have a web framework suggestion, e.g. something with templating?

I like Play, but that's 'cause I use Scala. It has a Java version, but IDK how good it is.

Re: Java for Everything

#219
post #158

The same argument can be made for any mature language with a solid ecosystem of tools and libraries. Except the part about scalability, that's just BS. It has little to do with language and is all about architecture. Sure, at some point language can help you squeeze every ounce of performance out of the hardware (although my money would not be on Java for that), but that's only in cases where either performance is cr…

You forget just how much difference there is between languages. Comparing Python and Java for example, it's easy to find things that take 1-2 cpu cycles in Java (or even 0), that take thousands of cpu cycles in Python (e.g. function calls). http://benchmarksgame.alioth.debian.org/u32/python.php I mean, I would agree that 1s versus 1.3 seconds doesn't really matter. But look at those numbers we're talking 40-50 TIMES…

Yes, AAARGH indeed.

Re: Java for Everything

#220
post #150
post #81

A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it. I can make the same argument for Python _for me_. And for my company too; we have a ton of Python developers already, so it makes sense to write things in Python if possible in case someone needs to change or improve anything. The author also talks about how Java's verbosity is a tr…

> There are some valid points raised too, such as concerns about Python's scalability But if you think about the two python scalability problems : 1) speed 2) programs become unmaintainable as they grow way quicker than they do in java and the like Nobody's arguing to write shell-scripts in Java. Why are people arguing writing websites that will include more than a trivial amount of functionality in anything but Java…

(1) isn't really something that's terribly arguable one way or another (In my experience Python is plenty fast for most tasks, but my tasks differ from your tasks).

I question (2) though. Why do you think that a Python program will become unmaintainable faster than a Java program? Is it type errors? Or maybe you think it's difficult to figure out what values are expected in a given variable? Or is it something else?

Post reply on HN