Brian Baquiran <[EMAIL PROTECTED]> writes:

----- Short version -----

APIs are useful. Open source makes it easier for me to learn about APIs.

How do people here keep up to date with APIs and libraries that could
possibly help them do their work faster or more effectively? How do
people keep their skills up to par?

----- Long version -----

> Oh there's lots to learn, believe me. And besides, you don't use APIs
> to learn. You use them to create useful applications. That's what
> they're there for. At some point, you may have to bypass them to get
> useful work done, but that doesn't invalidate their usefulness.

Well. Hmm. Bypass APIs? There's... ummm... There's machine code,
right.  But isn't Windows fairly strict about what you can and cannot
do? I could be mistaken, of course. I tend to prefer the Unix
philosophy of combining many small tools together, so I haven't
written code that makes heavy use of some API lately. ('Cept for the
Emacs stuff I hack on - does that count? ;) )

Undocumented or badly documented APIs do, however, make it difficult
to figure out what's possible, or find neat, elegant ways of doing
something - maybe you can use one function call instead of a kludgy
workaround. Open source has this fault as well. In fact, I suspect
that there's less higher-level documentation for open source because
one can, after all, just read the source code. At least if there's
ever any difference between what the docs say a function does and what
it actually does (haven't we all run into stuff like that?), or
peculiar little side-effects that introduce subtle bugs into your
program, you might be able to figure out where the problem is and how
to properly work around it.

(Anecdotal evidence: One time I was trying to use this Java AWT
method. The API documentation said it was the kind of method I was
looking for, but it just wasn't working. So I extracted the relevant
.java from src.jar, took a look at it... and saw that the method was
_empty_, with a little comment about it not being implemented yet.
That was really more of bad documentation than anything else, but it
was nice to be able to know that it wasn't my fault. =) )

APIs can be fairly overwhelming. It's hard to pick out that one
function you need out of a multitude of other functions. Sometimes I
already know what I'm looking for, but most of the time I don't.  A
Google search is helpful if I have a general idea of what I need -
terms, for example - but I find that source code is immensely useful,
because I get to:

  - see related functions and constructs

  - see the code working in context instead of as an isolated function

  - pick up a few programming idioms and tips along the way

Hence my preference for free, open source. I may look at a closed
source program and say, "Oh, wow, that's pretty neat - I wonder how
they did that?" but I can't browse the code and get clued in. I know
much of the code will probably be over my head - like I can't hold all
of X or GNOME or KDE or even emacs/lisp in my brain - but I still
might be able to get something out of it. This is one of the things I
like the most about open source - I can learn from what other people
have done. Not that open source projects always do things the best way
possible, but at least it's a way I can consider using.
  
I frequently begin a programming project by searching Freshmeat to see
if a similar project has already been written. Sometimes the posted
project will be enough for my needs, or even more featureful than I
had originally planned. Whether or not it precisely fits my needs,
related source code still makes it easier for me to pick up ideas and
learn about the available functions.

That said, I still browse API documentation for fun. However, it can
get fairly tedious. For example, there are ~ 6572 docs in the J2SDK
1.4.0 API specification - just the API specification, mind you. I'm
only familiar with a tiny fraction of the classes. What about the huge
number of C and C++ libraries one can link against? And I'm just
talking about the free libraries here - there are lots of commercial
toolkits that promise all sorts of benefits, too.

And I do learn a fair bit when I read APIs. I already know what is
possible (yeah, any computable function), but many things are
impractical because I do not personally have the knowledge to do it. I
am not about to sit down and rewrite X or gcc. However, by reading
APIs and source code, I learn what is convenient, or at the very
least, what is not as difficult as I thought it was. That for me is
the value of APIs - code libraries that I can use to do things I may
not personally know how to do or may not have the time or knowledge to
reimplement in a better way. Keeping up to date on the power of APIs
is essential, then, especially since our field changes so rapidly.

How do people here keep up to date with APIs and libraries that could
possibly help them do their work faster or more effectively? How do
people keep their skills up to par?

-- 
Sacha Chua <[EMAIL PROTECTED]> - 4 BS CS Ateneo geekette
interests: emacs, linux, wearables, teaching compsci
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to