|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON JDJ Commentary Java 1.4 and the Rest!
Java 1.4 and the Rest!
By: Alan Williamson
Mar. 1, 2002 12:00 AM
Guess what? It’s JavaOne month. That came around fast – and don’t panic if you’re sitting there wondering where the year went; it hasn’t, well not yet anyway. JavaOne is earlier this year, with only a nine-month gap from the previous one. It’s moved back to its old March time slot, which makes traveling and staying in San Francisco a little cheaper. Early reports indicate that attendance will be down this year, but I think that’s a good thing – it was getting too big. Never enough time for all the sessions you want to attend or to talk to the people you want to meet. We’ll report next month on the jewels we uncover and you can read about the goings on at www.sys-con.com/java. Java 1.4 How Many Lines of Code? Allow me to give you an example that may send you running for the hills. There was an innocent enough question posted on the list regarding JDBC and how to retrieve the number of results in a given ResultSet, preferably without resorting to rewriting your SQL, or performing an additional SQL query such as a COUNT(*). It was a good question and since the API doesn’t actually give you a single method for this, it’s a fair enough question for someone new to JDBC. The question wasn’t the issue; it was the array of answers that tickled me at first until I read the one that scared the life out of me. Before I give you the answer in question, remember the poor guy who posted the problem in the first place. He just wants an answer and is relying on the skillset and expertise of a mailing list to guide him. If I were him, I would be so confused; he’d be better off not asking the question in the first place. The majority of the answers centered around the [while (Res.next()) noRows++;] answer, which works beautifully. It may not be the most efficient way, but it works. Somebody posted a reply and never twigged it was actually a VisualAge wrapper class (and don’t get me started on the evils of the IDE!). Using third-party tools is not a bad idea and is to be encouraged if it makes your life easier. But don’t make huge leaps of faith based on them. The post that sent shock waves through me was the one that stated that because there was only one method call being made [getRowCount()], it was much faster than all the other methods presented in this thread. Wow...major leap of the faith there, but without disparaging the poster completely, you can see the logic – well, almost! There was, of course, the plethora of posts afterwards, trying to explain to him that the third-party wrapper had no more magic at its fingertips than the JDBC driver, and therefore was probably doing the underlying [while] method of determining the number of rows. But the issue here is that this guy posted the solution in all seriousness and good faith and, at the time, really believed in what he was saying (I wonder if he was certified!). There was, of course, a major fundamental software engineering principal lacking; as I talk to more and more people, and listen on various mailing lists and newsgroups, I see this sort of example time and time again. These are people who think they know what they’re doing, and to that end have the tenacity to be advising others. Blind leading the blind. Nothing would give me more satisfaction than having Java as the number-one programming language, but to do this we need to keep the quality up and help where we can. If you’re unsure, don’t post anything – you’ll only lead others astray. Which is why there’s always the standard question: Where can I go for good quality answers? To be honest, very few places and generally only those that are moderated. I would, however, recommend www.jguru.com , which I’ve found comes up trumps time and time again. I think the moral of the tale is this: don’t believe everything you read on a computer screen! On a somewhat related note, I see Mr. Gosling headed into some controversial water last month and was quoted as saying: “IDEs are generally targeted at low-end developers – people who are not experts at writing code.” It was interesting to hear him say that, particularly in this environment where the likes of ANT and Emacs are coming back into fashion. Apparently, James is working on a new kind of IDE, which I suspect he’ll want to give another name to to distance his creation from the mainstream IDEs. So with that thought, I’m off! Catch ya next month! YOUR FEEDBACK
LATEST JAVA STORIES & POSTS
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK SPONSORED BY INFRAGISTICS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||