×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Bitter Java

timothy posted more than 11 years ago | from the tea-is-smoother-but-harder-to-program dept.

Java 427

Peter Wayner writes: "There are 1693 books for sale at Amazon.com with the word "java" in the title and almost all of them are earnest, chipper books that promise real programmers, dummies , and nuts that learning Java is easy. Bruce Tate's, Bitter Java , is not one these books." Read on to see if you'd like to experience Bruce Tate's bitterness first hand.

Writing and reading technical books is both a pleasure and a chore. Programming computers can be great fun, but doing the job well requires almost impossible amounts of discipline, attention to detail, and pure drive. The machines churn through billions of operations per second and a mistake in just one can send everything tumbling out of control. Most authors tend to gloss over the difficulty by tossing in a spoonful of Mary Poppins because it does little good to grouse. It's just so simple and straight-forward to toss in optimistic words like "simple" and "straight-forward."

Tate's approach is looks a bit different. He wants to follow in the tradition of Frederick Brook's Mythical Man Month and talk about software development with an honest voice. Microsoft executives, Objective C devotees, and assembler lovers will be disappointed because the title is a bit misleading. He's not really bitter about Java in the way that Princess Diana was bitter about the British Royalty, he's just had a few bad experiences and he wants to help us learn from them.

In fact, he's not even writing about Java in the general sense. The book concentrates on the problems that often arise with most popular and complicated applications for the technology like servlets and enterprise Java beans. If you're building a web site based on Java, then you might want to read through this book.

The structure itself is devoted to uncovering antipatterns , a term Tate uses because it plays off the way that Sun offered Java patterns to help programmers use the new tools efficiently. Most of the chapters show the wrong way to build something and then show how to correct it.

Chapter 8, for instance, demonstrates a bulletin board that seems to be well-designed on the surface. The parts of the data structure are broken up into suitable objects and every object comes with a collection of methods that act as gatekeepers for the data inside the object. It all looks elegant, but it performs badly especially on large installations when the objects live on different servers. Suddenly, all of the extra well-meaning object-oriented engineering starts jamming the flow. Wrapping every object with so much glue code is like hiring more workers to speed up a bureaucracy. Tate shows how to aggregate the calls and speed things up dramatically by cutting through the misapplied object-oriented concepts.

If you step back a bit and think about the book from a distance, the right title starts to look like "Bitter Object-Oriented Programming". Most of the problems in the book emerge when seemingly good uses of OOP turn out to be terribly slow when implemented. While all of the problems are practical hurdles awaiting Java programmers, they must have cousins in the world of C++ and the other OOP languages. Splitting things up into many objects is plenty of fun at the beginning, but when the messages start flowing, the code becomes a swamp.

After a few chapters it becomes clear that object-oriented programming is starting to reach practical limits. The theory may be elegant, but programmers can only make it work if they use guidebooks like Tate's. The object-oriented toolkits are too easy to use dangerously. So what is the solution?

This kind of guidebook filled with antipatterns may be the best we can do for now. Tate himself says that the book is filled with "merc talk", the kind of chatter about hair raising experiences he says that mercenaries trade when they're sitting around the fire. This is an apt description. If you're a hired codeslinger creating J2EE applications or servlets, then this is a good book for your shelf.


Peter Wayner's latest two books are Translucent Databases , an exploration of how to create ultra-secure databases, and Disappearing Cryptography: Information Hiding, Steganography and Watermarking , a book about mathematical parlour tricks, sleights-of-hand, and subversive things you can do with bits. You can purchase Bitter Java at bn.com, and you can join Peter in reviewing books by submitting reviews after reading the book review guidelines.

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

427 comments

FPSP (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#3529562)

[first post smoking post]
-ftm

first interesting post ! (-1)

Adolf Hitroll (562418) | more than 11 years ago | (#3529590)

I have a simple idea regarding slashdot moderation :

It should cost more moderation points to upmod an already highly modded (>=+3) post or to downmod a post that has already been modded to 0.

perl code :

#!/bin/perl

print "From Vote Cost From Vote Cost\n";
for ($i = -1 ; $i 6 ; $i ++) {
print " $i +1 " . cost($i, 1) . " ";
print " $i -1 " . cost($i, -1) . "\n";
}

exit 0;

sub cost {
$from = shift;
$vote = shift;
$cost = int(abs((3 + $vote * ($from - 1.5)) / 4) +1 );
return $cost;
}

which displays as a result:
From Vote Cost From Vote Cost
-1 +1 1 -1 -1 2
0 +1 1 0 -1 2
1 +1 1 1 -1 1
2 +1 1 2 -1 1
3 +1 2 3 -1 1
4 +1 2 4 -1 1
5 +1 2 5 -1 1

All I want to know is.. (2, Funny)

coryboehne (244614) | more than 11 years ago | (#3529564)

How many of those results are for coffee or the island?

Re:All I want to know is.. (3, Insightful)

sputnik73 (579595) | more than 11 years ago | (#3529615)

Well, that's a really intelligent question - very entertaining as well. In a post that actually relates to the book, I think that Tate does a nice job in this book of really showing proper object oriented programming. So often OOP gets used as such a buzzword that if you, as a programmer, don't embrace and beat it into the ground, you're somehow seen as substandard or writing poor code. There are tools for every job. That's why people need to get a better grasp on OOP and understand when it should and shouldn't be used. One thing that this review did not mention is Tate's crisp writing style. He writes with a slightly conversational tone but one that won't become annoying by the 50th page or so. This is a very good book and I suggest you pick it up if you believe that OOP is the cure for all of society's ills.

Re:All I want to know is.. (0)

Anonymous Coward | more than 11 years ago | (#3529634)



Does it have to be EITHER / OR?

Re:All I want to know is.. (2)

Innominate Recreant (557409) | more than 11 years ago | (#3529646)

A search for "java + coffee" returned 4 results (one of them misleading because it's a java programming book edited by a guy named Coffee). A search "java + island" returned 15 results.

What does this mean?

  • Islands in the South Pacific are more popular than caffeinated beverages (unlikely)
  • Not that many coffee drinkers refer to coffee as "java" (more likely)
  • If users want to quote search statistics from Amazon for books on a particular topic, then Amazon needs a better search engine [google.com] (bingo)

Re:All I want to know is.. (1)

virve (63803) | more than 11 years ago | (#3529857)

Islands in the South Pacific are more popular than caffeinated beverages (unlikely).

What has Java got to do with islands in the South Pacific?

I am puzzled as often before. ;-)

--
virve
(please think before posting...)

sperel the goose (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#3529576)

first 'long live the goose' post!

Anakin gets his head cut off by Tuskin Raiders! (-1, Troll)

Anonymous Coward | more than 11 years ago | (#3529582)

Fist Sport!!!

help! (-1, Offtopic)

CmdrTaco on Thursday (557269) | more than 11 years ago | (#3529584)

hi,
I want to update my knernel 2.4.7-10 to 2.4.15,but there are some
errors!
1. I download kernel linux-2.4.15.tar.gz, and unzip it to a direcoty
/usr/src/linux-2.4.15.
2. cd /usr/src and creat a new dir linux
3. ln -s linux-2.4.15 linux
4. make xconfig and select and some options I need.
5. make dep
6.make clean
7. make bzImage
8. make modules
9. make modules_install
10 modify /etc/lilo.conf
11 lilo -v
12 reboot from new kernel

my machine can boot from new machine, but there are still some errors:
1.when almost boot completely, it show that run level change from 5 to 3
2. can't find some dir.
3. can not go to xwindow
I don't know why, and can you tell how can i do?

bwahahaha... (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#3529587)

(fp)

Development Processes be damned.. (5, Insightful)

TechnoVooDooDaddy (470187) | more than 11 years ago | (#3529593)

After years of listening to manager preach about "repeatable processes" and "the replaceable engineer" it's about time someone focused on skillsets. Appropriate and judicious use of OO concepts, design patterns does not a cookie cutter make.. Component design kludged up with so much glue that software engineers these days are nothing more than component assemblers.

Development prowess and productivity is determined by how well your code works, not how many widgets you can crank out and connect together in "internet time". It's knowing how things work, and if they'll work together well or not. It's knowing when it's better to write the damn thing yourself, instead of spending 2-3x more time and resources gluing off the shelf components together..

I'm heading off to buy the book, if not just for the reason to support the author courageous enough to go against the grain and give this topic a voice.

You are clever. (0, Insightful)

Big Dogs Cock (539391) | more than 11 years ago | (#3529645)

Please stop posting to /.

Anyone who tells you that a tool/language/methodology will make programming easy is a liar/fuckwit. Doing difficult things is hard. There comes a point where a system is so difficult that it makes very little difference whether you program it in VB or assembler. It's still going to be hard.

I though perl was a girl's language but look how hard it is to fix the page widening bug.

Re:Development Processes be damned.. (3, Interesting)

Anonymous Coward | more than 11 years ago | (#3529667)

design patterns does not a cookie cutter make..

The only programmers using design patterns are C++ and Java programmers. Do you know why? Because the "patterns" are meant to overcome language hurdles that dont occur in lisp and strictly functional languages.

How many language designers besides Stroustrop constantly defend their language on usenet by appealing to C's popularity? He's a brilliant guy, but that argument is a crock.

Re:Development Processes be damned.. (2)

William Tanksley (1752) | more than 11 years ago | (#3529847)

I agree that Lisp &c are great languages and C++ is a crock, but you're wrong that the only programmers using DPs are C++ and Java programmers. They're simply the only ones who have a commonly known shared vocabulary for talking about their language's needed design patterns.

As you can see from the discussion of the Visitor pattern, design patterns are native to languages; Lisp removes the need for the Visitor pattern with CLOS's multiple dispatch. However, by doing that Lisp doesn't reduce the total number of design patterns available to it; instead, it makes higher-level design patterns easier to express.

So in a sense some of the DPs you see in the book are meant to cover language weaknesses -- but before you get to proud about not having _those_ weaknesses, remember Godel's principle: you also have weaknesses. C++ is not a weaker language simply because it needs the Visitor design pattern; it's weaker for many other reasons, involving complexity and impetuous design (or lack of design).

Consider before you assume that DPs are signs of weakness: Smalltalk also uses DPs, and Smalltalk is _far_ from being a weak language.

-Billy

Re:Development Processes be damned.. (2, Insightful)

Anonymous Coward | more than 11 years ago | (#3529849)

The only programmers using design patterns are C++ and Java programmers. Do you know why? Because the "patterns" are meant to overcome language hurdles that dont occur in lisp and strictly functional languages.

Uhh yeah. Now let's see how easy it is to maintain and upgrade your amazing functional language code over the next 10 years. Man, people who hate OO languages are funny. They just don't like OO cause they can't figure out how to program OO.

Re:Development Processes be damned.. (0)

Anonymous Coward | more than 11 years ago | (#3529740)

Is this your guide to job security?

"You can't fire me I wrote everything myself and none of it is transportable! Mwa ha ha ha haaa!"

Sun invented patterns? (3, Funny)

joib (70841) | more than 11 years ago | (#3529599)


The structure itself is devoted to uncovering antipatterns , a term Tate uses because it plays off the way that Sun offered Java patterns to help programmers use the new tools efficiently. Most of the chapters show the wrong way to build something and then show how to correct it.

And Al Gore invented the internet. Or was that Bill G again?

Re:Sun invented patterns? (1)

sylvester (98418) | more than 11 years ago | (#3529650)

The structure itself is devoted to uncovering antipatterns , a term Tate uses because it plays off the way that Sun offered Java patterns to help programmers use the new tools efficiently. Most of the chapters show the wrong way to build something and then show how to correct it.

And Al Gore invented the internet. Or was that Bill G again?


Uhh..where in the quote does it say that they invented them?

If I offer you a wheel, does that mean I invented the wheel?

Re:Sun invented patterns? (0)

Anonymous Coward | more than 11 years ago | (#3529668)

Probably just karma whoring by pretending to find an error and responding with an overused snide comment.

Re:Sun invented patterns? (1)

clion999 (565741) | more than 11 years ago | (#3529710)

Yes, but it's a great snide comment. Al never really claimed to invent the Internet either. In most cases, political gaffes are never as bad as they seem to be, once Jay Leno starts up.

Re:Sun invented patterns? (1)

THEbwana (42694) | more than 11 years ago | (#3529777)

Well...the sentence:

The structure itself is devoted to uncovering antipatterns , a term Tate uses because it plays off the way that Sun offered Java patterns to help programmers use the new tools efficiently

makes it sound as if Tate invented the term antipatterns to counter something (patterns) that was started by sun. Does Tate really use the term antipatterns to play off suns offering of patterns? I would be surprised since the concept and practice of patterns _AND_ antipatters existed long before sun decided to provide them to developers. Tate did not invent the concept of Antipatterns - antipatterns make up an established way of learning from other peoples mistakes in a more structured way. The first antipatterns book that I saw was in 1998 (http://www.amazon.com/exec/obidos/ASIN/0471197130 / id=1021560084/sr=8-1/ref=sr_8_1/104-1927364-003916 8) well before sun started offering patterns to dev's.
/m

Re:Sun invented patterns? (1)

kubrick (27291) | more than 11 years ago | (#3529792)

It doesn't say they invented them, just that they offered Java versions of them.

linux (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#3529600)

Microsoft refused to go into the hardware business, insisted on making its software run on hardware that anyone could build, and thereby created the market conditions that allowed hardware prices to plummet. In trying to understand the Linux phenomenon, then, we have to look not to a single innovator but to a sort of bizarre Trinity: Linus Torvalds, Richard Stallman, and Bill Gates. Take away any of these three and Linux would not exist.

Some patterns to live by... (3, Insightful)

Glock27 (446276) | more than 11 years ago | (#3529603)

"Make it as simple as possible, but no simpler." - Einstein

"Keep it simple, stupid." - anonymous

"Limit temporary object creation." - any smart Java programmer

Java does a pretty good job of providing much more functionality for a little more overhead. There are areas in the Java libs which seem over-engineered and slower and bigger than they should be (Swing!). Don't throw out the baby with the bath water, though...Java is good and the crufty parts will evolve into something better.

Re:Some patterns to live by... (-1)

Genghis Troll (158585) | more than 11 years ago | (#3529659)

Einstein: was a Jew. Enough said.
Anonymous: If his saying had been any good, he wouldn't have been too ashamed to take credit for it.
Any smart Java programmer: let's stick to reality for now, ok?

Re:Some patterns to live by... (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#3529692)

Einstein wasn't a Jew. Fucktard.

Re:Some patterns to live by... (0)

Anonymous Coward | more than 11 years ago | (#3529697)

Keep it simple stupid -- anonymous mechanical engineer

Simple, stupid but not efficient (1)

Latent Heat (558884) | more than 11 years ago | (#3529735)

I think the point is that the simple, stupid (i.e. clean) use of objects in Java can make it slow.

Roger Session (COM and DCOM: Microsoft's Vision for Distributed Objects, Wiley, 1998) (OK, this is from the pre-C# days when MS was going to have you do your GUI in VB, your business logic in the MS Java dialect-du-jour) goes on about "object pools", about how you don't create a new taxi cab everytime you need a ride from the airport.

I always wondered, what is so expensive about object creation anyway, and in C++ with "auto" objects, it is just about free. Java object loading, however, is expensive because unlike C++, they do not use a static VTABLE but have to check character string names against what is in the object. Java object loading is what makes you sit there twiddling your thumbs when an good sized Java app fires up.

So, to optimize a Java app, one has to leave clean, textbook OO behind and resort to tricks like OO's that "lazy load" classes as they are needed instead of at application start time, like the use of "object pools" to create object instances once and keep reusing them.

The word on the street is that Java is dog slow unless you optimize, it is slow because of class loading, and the way you optimize is that you use object creation sparingly in your inner loops, even if it makes your code look ugly.

Re:Some patterns to live by... (1)

Avumede (111087) | more than 11 years ago | (#3529844)

According to many of Sun's Java engineers, with the latest hotspot, it is not necessary to be paranoid about object creation. The hotspot compiler is optimized to deal with many short-lived objects.

This book is right on the money (1, Informative)

PhysicsGenius (565228) | more than 11 years ago | (#3529607)

You neglect to mention the conclusion, probably for fear of reprisal by Slashbots, but I have no such fear. He advocates the total abandonment of Java. His final chapter is scathing (words like "worst" and "language" and "ever" all pop up) but is entirely factual. The fact is Java is good for nothing but web applets and only then if you don't care about uptimes.

Re:This book is right on the money (3, Insightful)

Glock27 (446276) | more than 11 years ago | (#3529689)

You neglect to mention the conclusion, probably for fear of reprisal by Slashbots, but I have no such fear. He advocates the total abandonment of Java.

Oh, then he's an idiot. ;-)

His final chapter is scathing (words like "worst" and "language" and "ever" all pop up) but is entirely factual.

Sounds like flamebait...er...'opinions' to me. Not facts.

The fact is Java is good for nothing but web applets and only then if you don't care about uptimes.

Nice assertion...now back it up with some facts. You might want to start by explaining how all those application servers out there do so much useful work running Java. Then go download Eclipse (www.eclipse.org) or JBuilder and then explain how such great IDEs could possibly be written in Java. There are also plenty of great Java-based websites out there, StockCharts.com [stockcharts.com] being one example.

Fact is, Java is very good these days. Like anything, it has it's warts...but the good far outweighs the bad. Being able to target Windows, Linux and MacOS with a single code base is sweet.

There may be issues with specific Java libraries and frameworks. Don't confuse those with the language or runtime, which are both fairly clean.

Re:This book is right on the money (1)

PsimanX1 (575046) | more than 11 years ago | (#3529808)

Nice assertion...now back it up with some facts. You might want to start by explaining how all those application servers out there do so much useful work running Java. Then go download Eclipse (www.eclipse.org) or JBuilder and then explain how such great IDEs could possibly be written in Java. There are also plenty of great Java-based websites out there, StockCharts.com [stockcharts.com] being one example.

My memories of JBuilder contradict this. JBuilder was very prone to crashing and taking the OS with it..

Just to add my .02 but I don't think Java is the best tool for the web. Its one niche IMHO is for applications with GUI frontends that need to be portable. If you don't need portable and you don't need GUI then don't use Java.

For web stuff - what could be better than Perl? :)

JSP vs mod_perl = no competition.

Re:This book is right on the money (1)

THEbwana (42694) | more than 11 years ago | (#3529824)

The world is full of people who are desperate to find an excuse for not putting in the effort of actually learning something that is new to them.
PhysicsGenius sounds very much like one of them.
/m

Well hell yeah! (0, Flamebait)

Kickstart70 (531316) | more than 11 years ago | (#3529613)

Java made me bitter right from the start. It never worked as it should (It's cross-platform! Oh wait, it's cross platform if you tweak things for the specific OSs you're going to run this under and take into account differences in the compilers. Oh yeah...it's all unstable as hell in browsers. And it might just piss off all the visitors to your webpages).

I would love it if someone would replace Java with something that worked. I'd even accept something from Microsoft.

Kickstart

Riiiiiight (0)

Anonymous Coward | more than 11 years ago | (#3529640)

You're still stuck in the Java = Applet mode.

A lot of non-technical people are stuck in this mindset. If you start approaching and talking to technical folks, you'll learn the real Java story.

For now, I suggest learning the "Macro" function whatever version of Microsoft Office you're misusing.

Cross platform (3, Insightful)

Chris Burke (6130) | more than 11 years ago | (#3529676)

Advertising cross-platform code as being one of the major benefits of java was a mistake by Sun. They should have realized that a language written for a generic VM is cross-platform only if the implementations of that VM and the system interfaces it uses on each platform are 100% compatible. That's a challenge even if all the implementations are written by Sun! Considering that they are not, and that some of those implementations were written by people with a somewhat vested interest in ensuring that cross-platform operation never comes to pass, it should have been obvious that it would never come off without a hitch.

Making "Write Once, Run Anywhere" a Java mantra was a huge mistake. It should have been more like "Write once, tweak a little, maybe it'll run... But it's easier than porting C code!" A more modest claim would have been much better.

Re:Cross platform (1)

goldenfield (64924) | more than 11 years ago | (#3529823)

Making "Write Once, Run Anywhere" a Java mantra was a huge mistake. It should have been more like "Write once, tweak a little, maybe it'll run... But it's easier than porting C code!"

Hmm...that doesn't have quite the same ring to it.

When it works, though, its a pretty awesome thing. I did my thesis in Java - a visualization of some simulations. I did all the development on SGIs, but I gave demos on Windows in another lab. That first time I ran the program on Windows, I was fairly shocked that it worked so well without me having to rewrite a single line.

Re:Well hell yeah! (2)

sahala (105682) | more than 11 years ago | (#3529681)

I would love it if someone would replace Java with something that worked. I'd even accept something from Microsoft.

Not to be rude, but if you're so "bitter" about Java why don't you design something better? I agree that Sun overmarkets Java's cross-platform capabilities, but for the most part it DOES work. I don't know of anything else (commercial-quality, that is) that works across as many hardware platforms, especially for server-side apps, which is the area where Java has really done well. Most of the examples in the book seem to revolve around J2EE and Servlets.

Yes, applets suck for the most part. Oh well...big loss there. Then again, most crappy applets I've seen tend to be the ones where someone implements a menu-bar or some retarded visual gimmick.

So Java has it's problems, but there's no more reason to be bitter about Java than any other software platform.

Re:Well hell yeah! (0)

geeky-troll (552499) | more than 11 years ago | (#3529699)

Hm, try C#. It is better than Java because:

* It comes from Microsoft
* It allows 'unsafe' constructions with pointers etc.
* when the .net runtime is ported 100% (see go-mono.com) it will be *truly* cross platform.
* If you don't like the syntax of a certain module, you can rewrite it in your favorite language (C++, Basic) and still use the compiled code!!!

hehe.. let's keep the baby (source) but throw the bathwater away(Java) ... :)

Re:Well hell yeah! (0)

Anonymous Coward | more than 11 years ago | (#3529703)

Funny; I've never really had a problem writing portable Java code. Maybe it's because I write code according to what the language offers, and I don't pretend that special features of the OS are going to be portable... and I also don't pretend thick clients are worth a rat's ass.

I can't wait until people give up this stupid idea that general-purpose applets are an acceptable idea.

Re:Well hell yeah! (1)

Vengeance (46019) | more than 11 years ago | (#3529810)

Hehe. I suppose they'll be sorry to hear this here... We do Java development against NT, AIX, Linux and OS/390. One code-base, One deployment strategy. And I can promise you this, the only OS-specific stuff in my code is... well, nothing.

Mind you, this is all related to server-side processing. Bringing in Swing/AWT and browsers just makes a mess of things.

OOP can be oops! (1, Insightful)

mbone (558574) | more than 11 years ago | (#3529617)

There is something about OOP that I have learned makes people want to over-apply it. The result is frequently bad, as project development times stretch out to infinity. I know of a number of OOP programming projects that got canceled because of implementation issues (speed of development, speed of use, etc.), and that is rare now-a-days in older programming languages.

I want to read this book. I have a feeling it may be instructive in avoiding this moral hazard of OOP.

My Gripes about Java &tm; (5, Funny)

Anonymous Coward | more than 11 years ago | (#3529626)

Hello fellow coders,

I'm a first year programming student at a local community college school and I've just finished my Visual Basic classes. This term I'll be moving onto Java. However I've noticed some issues with Java that I'd like to discuss with the rest of the programming community. Please do not think of me as being technically ignorant. In addition to VB, I am very skilled at HTML programming, one of the most challenging languages out there!

Java is based on a concept known as Object Oriented Programming. In this style of programming (also known as OOPS in the coding community) a programmer builds "objects" or "glasses" out of his code, and then manipulates these "glasses". Since I'm assuming that you, dear reader, are as skilled at programming as I am, I'll skip further explanation of these "glasses".

Please allow me to make a brief aside here and discuss the origins Java for a moment. My research shows that this language is one of the oldest languages in existance, pre-dating even assembly! It was created in the early 70s when AT&T began looking for a new language to write BSD, its Unix Operation System (later on, other companies would "borrow" the BSD source code to build both Solaris and Linux!)

Back to the topic on hand, I feel that Java - despite its flaws - has been a very valuable tool to the world of computers. Unfortunately its starting to show its age, and I feel that it should be retired as C++, Python and Perl seem to have been. Recently I've become aquainted with another language that's quite recently been developed. Its one that promises to greatly simplify programming. This new language is called COBOL.

Although syntactically borrowing a great deal from its predecessor Ruby, C greatly simplifies things (thus its name, which hints at its simpler nature by striping off the klunky double-pluses.) Its biggest strength is that it abandons an OOPS-style of programming. No more awkward "objects" or "glasses". Instead C uses what are called structs. Vaguely similiar to a Java "glass", a struct does away with anachonisms like inheiritance, namespaces and the whole private/public/protected/friend access issues of its variables and routines. By freeing the programmer from the requirement to juggle all these issues, the coder can focus on implementing his algorithm and rapidly developing his application.

While C lacks the speed and robustness of Java, I think these are petty issues. Given the speed of modern computers, the relative sluggishness of C shouldn't be an issue. Robustness and stability will occur as C becomes more pervasive amongst the programming community and it becomes more fine-tuned. Eventually C should have stablity rivalling that of Java.

I'm hoping to see C adopted as the de facto standard of programming. Based on what I've learned of this language, the future seems very bright indeed for C! Eventually, many years from now, perhaps we'll even see an operating system coded in this langauage.

Thank you for your time. Your feedback is greatly appreciated.

Re:My Gripes about Java &tm; (0)

Anonymous Coward | more than 11 years ago | (#3529675)

If you are having trouble with Java, I can wholeheartedly recommend the best Java version that I know of! [microsoft.com]

Finally, an implementation of Java that just works!

Re:My Gripes about Java &tm; (0)

Anonymous Coward | more than 11 years ago | (#3529684)

Dear Reader,

Your commentary was a not only educational, but entertaining to read. The only mistake I would like to point out is that Richard Stallman did not steal the source codes from BSD to write Linux. As a matter of fact, he never took anything from anyone and the whole thing was his idea and no one else's. He may even open source java someday.

Re:My Gripes about Java &tm; (1, Interesting)

Anonymous Coward | more than 11 years ago | (#3529691)

Mmm, trolling. This is the second time I've seen this exact post.

I suppose that this provides an interesting commentary on karma: I've seen a fair bit of people posting the exact same post as many times as possible to try to maximize karma with minimal effort.

- Coffee (using a cow orker's terminal)

Re:My Gripes about Java &tm; (0)

Anonymous Coward | more than 11 years ago | (#3529765)

Hey, at least this asshole posted as AC. Can't be a karma troll, just another goatlicking crapflooder.

Re:My Gripes about Java &tm; (1)

Kindaian (577374) | more than 11 years ago | (#3529731)

The problem of Java is that is taught in old platforms, deprecated platforms and with old methods of programming and learning (respectivly, unix, windows and mainstream programming methedology).

That is a pity because i feel Java aims for a bigger future.

Cheers...

Re:My Gripes about Java &tm; (1)

SirTreveyan (9270) | more than 11 years ago | (#3529793)

How can anyone take this post seriously?? I dont know about most of you, but "glasses" are worn on the head to help one see while writing OOP "classes".

Re:My Gripes about Java &tm; (2, Funny)

AppyPappy (64817) | more than 11 years ago | (#3529821)

Note: C is a subset of COBOL. C++ is merely a faster version of C.

Not to rain on your parade... (0)

Anonymous Coward | more than 11 years ago | (#3529829)

I am very skilled at HTML programming, one of the most challenging languages out there!

HTML is not a programming language. Ever try to implement a double-linked list in HTML?

nuff said!

Modding (1)

hendridm (302246) | more than 11 years ago | (#3529835)

How did this troll get modded up? Why don't you mod up the Recipe Troll while you're at it (browse at -1 for details).

Re:My Gripes about Java &tm; (1)

cosmicpossum (554246) | more than 11 years ago | (#3529848)

The problem with satire is that sometimes (often) there will be dim people who think it is serious.

So many books on java... (5, Insightful)

sisukapalli1 (471175) | more than 11 years ago | (#3529627)

It is sometimes very scary when things are so, ahem, much marketed. In many places, there seems to be more emphasis on the tools and techniques used than what the product is supposed to do.

For example, "We clinched the deal because we promised to use the J2EE/EJB framework" -- as opposed to, "Our product is good, and the guys liked our technical expertise and design." This is a "sort of" true story!

S

Re:So many books on java... (0)

Anonymous Coward | more than 11 years ago | (#3529730)

I can second this, and your're quote is off by about one or two words. This is no shit, I remember sitting in on one of those analyst calls, listening to the ceo tell the wall street guys that we where re-writing everything in j2ee, and they all applauded. i thought to myself...is it really that easy to be the ceo?

Re:So many books on java... (1)

Liora (565268) | more than 11 years ago | (#3529806)

I am not going to go get the book because I wouldn't understand it very well anyway (I'm a really awful programmer), but I really respect the guy for writing it. I have a java book on the shelf (won't name any names, but there are some dancing figures and it features with Java swing), and it is what I pull out when I need a clue. What makes me upset though is the number of things in it I don't understand. I am not a programmer, but occasionally I have to write a few lines of code for something. And when that happens, I do not need the words simple or straight-forward to appear anywhere.

I understand that maybe there are people who actually understand it if someone says we promised to use the J2EE/EJB framework, but I don't. My major problem is that I tend to figure out some intuitive way of doing something, but then I realize that it is terribly inefficient and it takes me all day to figure out what a good programmer could do instead in five minutes. Does anyone know of a good Java book for idiots who know they're idiots but still want to do things the right way?

Mm.... Bitter java... (2)

Chris Burke (6130) | more than 11 years ago | (#3529631)

That's how I like it. Nice and bitter. And strong.

Certainly problems arising from OOP are not specific to java. It's quite possible in C++ (and presumably other OOP languages) to write a class with an interface that would make Stroustrup proud but that runs like me before my morning coffee. One of the issues I've had with OOP is the extreme care needed in design, disproportionate to the benefits. Still, it does have benefits, so I use it.

Now while the reviewer relates the issues in the book to other languages, does the author? It sounds like it might be a good book for a non-java programmer, but it isn't clear that it is.

Re:Mm.... Bitter java... (0)

Anonymous Coward | more than 11 years ago | (#3529737)

That's how I like it. Nice and bitter. And strong

.....Just like your men.

Re:Mm.... Bitter java... (0)

Anonymous Coward | more than 11 years ago | (#3529743)

>>It's quite possible in C++ (and presumably other OOP languages) to write a class with an interface that would make Stroustrup proud but that runs like me before my morning coffee.

Yeah and it's in libcomplex.a. Real life experience calculating some quantum mechanical wave functions that are heavy on the complex --- re-code critical sections in c avoiding c++ complex and you can buy yourself 1.5 orders of magnitude in execution speed. Moral of story: temporary objects bad.

Re:Mm.... Bitter java... (2)

TWR (16835) | more than 11 years ago | (#3529836)

I've got the book. Just bought it last week; it's very good.

It is pretty Java-specific (there's a chapter devoted to JSP, for example), but in the memory leak chapter ("Bitter Memories"), he covers the C++ memory model, as a comparison to the Java one.

If you are capable of understanding the meta-pattern, then "Bitter Java" is useful for non-Java developers. The JSP examples could certainly apply to any HTML scripting language (the horror of seeing bad ASP programmers converted into even worse JSP programmers is something that should be outlawed).

BTW, there is an associated web site: www.bitterjava.com.

-jon

Here's a book title... (2, Funny)

Yoda2 (522522) | more than 11 years ago | (#3529633)

"Practical OO Programming In Binary"

Re:Here's a book title... (2, Funny)

gnugnugnu (178215) | more than 11 years ago | (#3529679)

> "Practical OO Programming In Binary"

intersting book title, but it would get called POOP for short

Edited for the "for dummies" series: (3, Funny)

TheFlu (213162) | more than 11 years ago | (#3529690)

I can see it now:
Chapter 1
The joys of 0
Chapter 2
The joys of 1
Chapter 3
0 meets 1

Re:Here's a book title... (1)

_xeno_ (155264) | more than 11 years ago | (#3529720)

Reminds me of a book I saw while walking along the bookshelves in Barnes and Noble... Java Principles of Object Oriented Programming [barnesandnoble.com] . It was a green book as I recall with large, yellow (or maybe white) letters running down the spine:
"POOP"

There was a (extremely small, relative to the huge "POOP") "Java" oriented perpendicular to the POOP as well, but walking down, looking at books and seeing one entitled "POOP" was just... well, weird.

Re:Here's a book title... (2)

kubrick (27291) | more than 11 years ago | (#3529770)

It's possible... just spend several years working on paper before you even go near a computer. :)

Examples, please! (2, Interesting)

Shimmer (3036) | more than 11 years ago | (#3529637)

Before we get out the brickbats, can someone please post an example of the horrors of OO technique that are referred to here.

As someone who has used OO successfully for 10+ years, I'll have a hard time accepting these OO "antipatterns" without concrete examples.

-- Brian

Re:Examples, please! (0)

Anonymous Coward | more than 11 years ago | (#3529701)

Trivial one:

Go figure out why you'd better not use "cout" or "cerr" in a multithreaded process running on a Solaris machine.

Re:Examples, please! (0)

Anonymous Coward | more than 11 years ago | (#3529809)

One example you find in C++ books (from Bjarne, at that) is the OO tree, where you have to destroy objects to change their state, for example when an employee changes to a manager, etc. Yeah, that's great, Bjarne... explain how OO works with an example that blows chunks once you get in the real world.

The solution (3, Insightful)

Larne (9283) | more than 11 years ago | (#3529648)

After a few chapters it becomes clear that object-oriented programming is starting to reach practical limits. [...] So what is the solution?
Some people have been saying for years that the solution is functional programing [chalmers.se]. In some functional languages, wierd run-time errors become type errors caught at compile time, the absence of state makes programs much easier to reason about, and so on.

Of course, there is no magic bullet to make software suck less, but I would strongly encourage all developers to at least look at what FP offers.

WARNING!!!! GOATSE LINK. (-1, Troll)

Big Dogs Cock (539391) | more than 11 years ago | (#3529693)

The parent is a troll.

Re:WARNING!!!! GOATSE LINK. (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#3529795)

Yes, but only for certain values of goatse, like "chalmers.se". This is why type checking is so important.

You smell funny, too. I fucked your mama. She smelled of grease and crisco.

finally (0)

Anonymous Coward | more than 11 years ago | (#3529655)

It's good to see a book which devles into the frustrating part of languages. Whether you like it or not, all languages have parts which can be a pain to use. It's good to see a book that acknowledges this.

Amazon.com? (1)

rob_horton (118331) | more than 11 years ago | (#3529662)

I seem to recall being urged to avoid Amazon at all costs not so long ago due to their patent of 'one click' purchasing? Is this still on? Just in case here is an alternative link [bol.com].

distributed programming != OO (1)

oogoody (302342) | more than 11 years ago | (#3529670)

It's not clear what "nicely wrapped" objects
have to do with distributed programming. OO doesn't make distributed programming any easier or harder. They are separate issues. If it
didn't work it's because they didn't solve the
right problem.

anti-antipatterns (4, Interesting)

graveyhead (210996) | more than 11 years ago | (#3529677)

If design patterns are used correctly, they accomplish one of 2 things, but rarely both:

they speed up the development of a system
or

they speed up the execution of a system

This is, of course, one of the fundamental trade-offs that us computer programmers make all the time. The important part is choosing a pattern that is appropriate for the system. For example, the flyweight pattern is used to limit/reuse objects in a system. It is appropriate to use this pattern when top execution speed is necessary, but the price is the complexity of implementation.

The facade pattern, OTOH, is designed to make life simpler for programmers, potentially at the cost of execution speed.

It sounds to me like this guy has trouble picking the appropriate patterns from the start.

There is one universal law (0)

Anonymous Coward | more than 11 years ago | (#3529780)

Speed
Size
Cost

You may choose only two.

Antipatterns (5, Informative)

Frums (112820) | more than 11 years ago | (#3529687)

The structure itself is devoted to uncovering antipatterns , a term Tate uses because it plays off the way that Sun offered Java patterns to help programmers use the new tools efficiently.

Actually, "antipattern" is an accepted term in the pattern commnunity for describing a bad process or design that on the surface looks like a good idea. If a Pattern is a good practice distilled from the experiences of many good develoeprs, then an antipattern is a "gotcha" thathas been distilled from experience common to many good developers. This book describes it, but th ename really has nothing to do with Sun's practice of describing things in terms of patterns.

-Frums

This is a great book idea for beginners (1)

geneshifter (411883) | more than 11 years ago | (#3529698)

I'm a beginning programmer and it is a great idea to have a book showing the wrong way to do something for someone like me. It is near impossible for a beginner to go grab an Orielly guide and start learning from scratch. Also, most beginner's guides are full of directions and facts, but have no real-world examples. Usually, you get a 3 line example and that's it! Something like this should help beginner's to understand by showing what's wrong in a real programming example.

Antipatterns? (2)

blirp (147278) | more than 11 years ago | (#3529704)

Antipatterns is probably the dumbest word ever. It's supposedly showing how you do something the wrong way. Well, there are a gadzillion ways to do something the wrong way! Do we really want to focus on those?

Anyways, the book shows a bad way, then corrects it. Much like any "optimizing" books of the 1980's. It seems that the book with a little effort could provide patterns instead, mainly by focusing on the solutions instead of the problems.

M.

Mistaken (1)

Codex The Sloth (93427) | more than 11 years ago | (#3529832)

While it's true that there are an infinity of bad ways of doing things, Anti-patterns is about the most common way of doing things badly (Patterns are about the optimal way of doing things). In particular, it focuses on things people do wrong (commonly) that seem like good ideas -- typically an solution to the design problem is also offered.

If anything, Anitpatterns are more useful than patterns.

A T*roll.... (0, Troll)

WetCat (558132) | more than 11 years ago | (#3529708)

The best antipattern to java:
DO NOT USE JAVA!
It's ugly and slow.
Even C# with .net is better - it allow people to use whatever language they want on the same CLI...

I hope more people read this... (2)

sahala (105682) | more than 11 years ago | (#3529725)

...in addition to all those "Learn Java in 21 Amazing Days" books.

Java is often pitched as being a breeze to learn. And it is relatively easy since things like memory management is taken care of for you and the libraries tidily abstract a lot of details for you.

But I've seen a lot of budding Java programmers program away with little awareness for what's going on in terms of efficiency and good system design, and this book seems to address these qualities well. Just because Java's slightly easier to program doesn't mean that programmers can be clueless.

Dunno about this... (1)

BrokenHalo (565198) | more than 11 years ago | (#3529727)

I still find I really prefer the taste of FORTRAN :-) OK, I admit it, I've dated myself by saying that, but who cares? :-)

In other words - programming is hard! (2, Interesting)

putaro (235078) | more than 11 years ago | (#3529739)

So, if you write a system that runs across multiple servers you can end up with a poorly performing system if you don't know how to separate functionality out properly. From the Unix Hater's Handbook:

If C gives you enough rope to hang yourself, then C++ gives you enough rope to bind and gag your neighborhood, rig the sails on a small ship, and still have enough rope to hang yourself from the yardarm.

I would say that Java shortens the rope but then lets you hook it up to a power winch. Modern toolkits and languages are really powerful. Being able to write a distributed application so easily that YOU DIDN'T NOTICE HOW DAMN MANY CROSS SERVER CALLS YOU WERE MAKING is pretty amazing. On the last large project I did we used Java and I noted that Java made locking so easy that we swept right past the easy locking problems (like, did you remember to release the lock) and straight into the really nasty ones. I think that going beyond "Learn Java in 21 Days" into how to break your functionality out properly is a wonderful topic for a book but the gratuitous swipe a Java doesn't seem useful. Just remember, "Power tools for power fools."

Nothing more to see here. Move along. (2)

Innominate Recreant (557409) | more than 11 years ago | (#3529744)

Call me jaded, but do we really need another book explaining that it's possible to poorly design an OOP solution, or that not every problem can be solved with some implementation of an OOP tool - be it Java, C++, C# or B_Flat?

Quoth the reviewer:

If you're a hired codeslinger creating J2EE applications or servlets, then this is a good book for your shelf.
If you're a hired codeslinger creating J2EE applications, shouldn't you already know how to create a scalable application and whether or not Java beans/servlets is correct tool or methodology for the problem at hand? It seems that this book should be recommeded more for Java newbies (which is fine) than Java veterans.

<DISCLAIMER>I am not a Java programmer, but I am a grizzled veteran</DISCLAIMER>

Blame Colleges (1, Insightful)

Anonymous Coward | more than 11 years ago | (#3529748)

Te overuse of OOP stems from the shift in the american education system from the late 1980's on. In the good 'ol days, programmers for the application world could learn how to do things as a tradesman, but now everyone has to go to college. The result is that people graduate with CS degrees that have no idea how to do things that are not for academic exercices, and some people just don't know how to do anything. So they make giant OO classes that have worthless getter and setter methods for fields that do not need to be accessed, and other worthless crap that they teach you nowadays.
I say down with CS because daddy said it was a good idea.
The world needs less CS graduates and more people that are compitent in the field.
If you don't like this because it describes you, good I hate you.

Over-Design (2, Insightful)

supercytro (527265) | more than 11 years ago | (#3529750)

One the problems with OOP is that systems tend to be over-designed and overly-abstracted out. Whilst the result may be elegant, what generally results is a convulated solution which requires a lot of work to utilise practically and efficiently. However, this in no way means OOP is 'flawed'; merely that experience and intelligent design is required instead of applying OOP as a magic bullet or as some systems are applied, a magic rocket.

A book on real world programming (1)

jmertic (544942) | more than 11 years ago | (#3529762)

Finally, someone looks at OOP in a real world light. So often in books/classroom they push these ideas into your head so much that you forget about the real world constraints of using them. This book appears to bring those to life. This looks like a must read for any CS student looking to get another viewpoint on OOP.

OO toolkits & templates (2)

reachinmark (536719) | more than 11 years ago | (#3529772)

The object-oriented toolkits are too easy to use dangerously. So what is the solution?

At least in the world of C++ you do have the STL - hard to use, but hard to use dangerously. I think that templates are a somewhat undervalued addition to OOP - they allow for an extra level of abstraction(?) without the penalty of slower code.

Over engineered... (1)

f00zbll (526151) | more than 11 years ago | (#3529776)

Every programmer has done it at one point. Making sure those lessons are cemented into one's head is much harder than it would appear. The balance between strict adhearance to OOP principles and practicle designs is more of an issue of scope negotiation with management. Lots of OO projects fail because the scope and requirements fluctuate wildly. Lots of projects fail for that reason. It's not unique to OOP. By virtue of OOP dominance, there's going to be more failures than other languages that are used less or used in environments where requirements are more stable.

Take for example writing serial driver. The functional specs are finite and limited by the hardware. Building a business application is influenced by what sales, marketing, management, QA, programmers and customers think is important. Don't mod me up or down, since this is freakin common sense.

there was an island between Sumatra and Bali... (4, Funny)

danny (2658) | more than 11 years ago | (#3529791)

The island that used to exist between Sumatra and Bali seems to have been wiped off the Net... At least, I went through the top 200 results of a Google search for "Java" a while back without finding any pages about it and, while some of the 1294 books at Amazon must surely be about the island, none of them make it into the first 200 results.

Danny (who plays gamelan [danny.oz.au] and is interested in Indonesia [dannyreviews.com]).

Way to proof-read (0)

Anonymous Coward | more than 11 years ago | (#3529817)

Tate's approach is looks a bit different

Nice to know someone bothers to proof-read this stuff before posting it on slashdot.

Thinking in Java (5, Interesting)

garoush (111257) | more than 11 years ago | (#3529859)

The best Java book that I have seen so far is "Thinking in Java" by Bruce Eckel. Here is why.

While Mr. Eckel's book does covers the syntax of the language (java in this case) et. al, it also cover the meaning of the language and most of all, it covers how to think in the language (hence: the title).

Almost any developer can pickup a language and become knowledgeable with it by working on one or two projects. However, being *proficient* at your domain, and understanding coding-principles of the language for your domain, and understanding the business of being a programmer is much more difficult goal to achieve -- only time, experience, and dedication will ever get you there. It is this quality that I look for first, the knowledge of a language comes third.

Here is a link that I point people at to high-light my point: Chicken Soup for Your Modeling Soul [sdmagazine.com] -- I specially like item 21: "A fool with a tool is still a fool".
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...