What was I thinking?

 

I have been answering Java questions for people for a number years now and I have come to a conclusion, which I have already given away. The API is your friend.

Back in the days of Java 1 I had a massive reference book - now sadly sent to recycling - but one of the useful things it had was a complete listing of the Java API. While the API was much smaller in those days it was still significant and I remember spending extended periods flipping backwards and forwards through the appendix learning how these things hooked together. Then again when moving into Servlets I spent a long time wandering though the various classes finding out which class allowed which operations and how the interfaces introduced new behaviour at each level.

It isn't a secret, you know, it's available to anyone.

Now to be fair some things aren't always obvious from the API and come from experience, such as "How do you convert a collection in to an array?". However if the question is "What does methodX() do?" or "What is the difference between methodX() and methodY()?", you may be able to answer the question but in my opinion you'd be doing them a disservice answering the question directly. While it could be considered poor form saying "Read the manual" (or some variation of), at some stage they're going to need this information. The API was written and exists for a reason, it doesn't just exist so someone can distill it into a reference book. "APIs for Dummies" should not exist.

With apologies to Stephen Lockwood and Madhu Siddalingaiah, Java API for Dummies Quick Reference does exist but thankfully hasn't been updated since 1997. There already is a concise reference to the API, it's called the API.




Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 4 + 9 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/davo/addTrackBack.action?entry=1183291280720