Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
Java syndrome

By Seditionary in Seditionary's Diary
Wed Nov 10, 2004 at 12:55:43 AM EST
Tags: User Diary (all tags)
User Diary

After a full day of work today, my evening consisted of:

  1. Having some good beer at a professor's expense.
  2. Crashing an Association for Women in Computing meeting.
  3. Working on a Java assignment for a few hours.

You might think that points (1) and (2) suggest a good time and would lead to an interesting story or two, but unfortunately that is not the case tonight. Instead, I will bore you with thoughts inspired by (3).


About two years ago I got into programming Python, and since then I've not been able to stand Java. Working with Java tonight has reminded me of why. I think I can also see why people get stuck in the Java mindset and have difficulty letting go and embracing programming languages that are actually useful.

When working in Java, you're constrained by a lot of rigid but well-defined rules. In order to be at all effective in expressing yourself, you have to become very clever and creative. As you finally achieve this effectiveness, after days and days of frustration, you begin to feel a fondness for the language and you have no desire to simply let go of all the tricks and techniques that you learned or invented to make Java tolerable. You've submitted to the Java way and, because of this, now have an emotional investment in the language.

Yet, because of this investment, you lose sight of the fact that it took you 100 hours to implement your project instead of the 10 that it would have taken in a language like Python. The resulting code is also about 10 times longer and 10 times as difficult to read, and you're going to have a hell of a time reusing it.

I believe this effect is comparable to Stockholm syndrome. Java is so restrictive in its rules and dominating in its philosophies that, like a teller in a bank robbery, you are forced to subjugate your will to Java's design. You do this, just so you can accomplish something non-trivial in Java, and at this point you are broken. You become yet another Java programmer, unfathomably defending and advocating a language that steals your time and your ability to express yourself. I call this the Java syndrome, although in decades past it has occurred with languages such as Pascal, C, C++, Ada, and so forth.

Fortunately I snapped out of that reverie years ago. Thank goodness for languages that are actually designed to do what programming languages were invented for: enabling a programmer to express his will to a machine. Being able to express what I need to by itself is no longer good enough for me. Given enough time and effort, I could express anything using a language like Brainfuck. But why should I bother? Today I only care about how concisely and correctly a language allows me to express myself, and any other languages are just wasting my time.

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Poll
Given my druthers, I would program using:
o Python 25%
o Java 18%
o Perl 3%
o C 12%
o C++ 6%
o C# 0%
o Ada 0%
o PHP 0%
o Ruby 0%
o Haskell 9%
o Basic 6%
o Pascal 3%
o Assembly 6%
o English 6%
o Other: write-in 3%

Votes: 32
Results | Other Polls

Related Links
o Associatio n for Women in Computing
o Stockholm syndrome
o Brainfuck
o Seditionary's Diary


Display: Sort:
Java syndrome | 60 comments (60 topical, editorial, 0 hidden)
write in (none / 1) (#1)
by forgotten on Wed Nov 10, 2004 at 01:21:40 AM EST

scheme.

i always felt like kind of a loser for not being able to do anything in scheme.

--

Manifest typing got you down? (3.00 / 3) (#2)
by celeriac on Wed Nov 10, 2004 at 02:08:09 AM EST

I find Java and Python to have a lot in common. Sure it takes N times as many characters to express something in Java, but mere typing is a tiny minority of programming effort for anything non-trivial.

Common Lisp (none / 0) (#3)
by hading on Wed Nov 10, 2004 at 08:46:19 AM EST

Possibly Smalltalk for some things

+1 FP (none / 0) (#4)
by Highlander on Wed Nov 10, 2004 at 08:56:29 AM EST

Stockholm syndrome. lol

But that can be said about any programming language.

I noticed the ML languages do well in benchmarks.

Moderation in moderation is a good thing.

reality (1.50 / 2) (#5)
by john flipping kerry on Wed Nov 10, 2004 at 09:17:28 AM EST

People who write programs for a living write in the language that is required by the architect. There is very little room for what you term creativity. The closer to you get to the business end of the profession the less creativity there is.

If you get the chance at creativity, feel sorry for the guy who has to maintain your code. Give him a clue in your comments about what your idea of good code means. He is smarter than you. He has to be to figure out what you did.

I'm guessing you probably either... (3.00 / 2) (#7)
by skyknight on Wed Nov 10, 2004 at 09:29:46 AM EST

haven't written code professionally, or haven't had to work on major projects with other people that have been written over the course of years and span tens of thousands of lines of code. There is a hell of a lot more to consider than just making life easy for the original writer of the code. What about code reuse, maintenance, extensibility, debuggability, discoverability, etc?

Java gives you a hell of a lot of Object Oriented functionality that Python just totally blows off, and it's functionality that makes life easier when orchestrating large projects that are being co-developed by many people and may hang around for years.

Writing good software is very much about learning to use a variety of tools and knowing which ones are appropriate for specific jobs. Language bigots are the kind of narrow-minded fools who will use a hammer no matter what, regardless of whether they are trying to drive a nail, saw a piece of wood, or plaster a ceiling.



It's not much fun at the top. I envy the common people, their hearty meals and Bruce Springsteen and voting. --SIGNOR SPAGHETTI
There is a reason for the structure.... (none / 0) (#10)
by claes on Wed Nov 10, 2004 at 10:04:05 AM EST

After doing a lot of work with TCL (very little structure) and Python, I too was annoyed with a lot of the Java restrictions. Some are arbitrary and could be fixed: i.e. RemoteException having to be caught, no multiple inheritence. But a lot of the structure is there to support large programming projects. Java is very resiliant to restructuring. You can make a change or re-arrange low level stuff, and until you get everything squared away, things won't compile. This is a GOOD thing. (Well you can still miss a compile and get zapped at runtime..)

I find as I work with Java, and refine code, it gets SMALLER when I add features. I still find it too "wide" for my tastes (i.e. 120 chars wide at least for good stuff). You need to use a lot of inner classes since there aren't really globals or function pointers. Once you get the hang of it things are pretty compact.

It does tend towards endless refinement and restructuring, however.

-- claes (fire away)

Women in Computing, huh? (none / 1) (#24)
by dteeuwen on Wed Nov 10, 2004 at 12:43:26 PM EST

Sounds like areal party. Was thekubrix there?

_________

Down the slopes of death he rides
The eight hooves pound like drums
Darkness reigns the crumbling sky
Invasion has begun


Java syndrome | 60 comments (60 topical, 0 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest © 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!