Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

This essay was based upon the talk he gave at OSCON and I was sitting there listening to it (yesterday, as a matter of fact) and I really appreciated much of what he had to say. I do think that he overgeneralizes in some places, but the core of much of what he was saying was interesting, if you could distill it down. What I heard him say, ultimately, was that great hackers enjoy scratching their personal itches more than they enjoy searching for a back scratcher. As a result, they tend to be less inclined to look for tools that don't allow them to immediately dive into the problem.

To a certain extent, I think this is due to his love of the Lisp programming language and other dynamically typed languages that let programmers focus on the problem rather than the fiddly bits (bad stretch of a pun intended.) If I'm trying to track down that memory leak, I'm wasting time. If I really have to care about "hard drives, buffers and other things" then I'm not solving my actual problem. I'm solving problems that the language imposes.

Take Java for example. Consider one way of opening a file:

try { FileInputStream stream = new FileInputStream(myFile); + DataInputStream input = new DataInputStream(stream); + while (input.available() != 0) { System.out.println (input.readLine()); } + input.close(); } catch (Exception e) { System.err.println("Could not read from file"); }

Now really, what hacker is going to want to jump through those hoops to print the lines of a file?

open INPUT, "<", $input or die "Cannot open ($input) for reading: $!"; print <INPUT>; close INPUT or die "Could not close $input: $!";

If you're in a corporate culture, the first example might seem more appropriate because you can't forget to see if the open was successful and everything is this really cool OO stuff. The second example, though, lets you focus on the task at hand and clears away a lot of cruft. If I have an itch to scratch, I don't reach for a diesel-powered backscratcher. That, I think, is what Paul Graham was trying to say.

And no, Perl's not comparable to Prolog. The latter is a wonderful language, but it has such a limited problem domain that comparing it to Perl is comparing cheese and Wednesday. Different tools solve different problems and comparing them without a problem to contrast them against is an exercise in navel gazing :)

Side note: does anyone else see the weird newlines in the Java example? I've been seeing that a lot recently, but I don't know if it's a quirk of Firefox, my using FC2, or something else entirely.

Update: It's been pointed out that the "weird newlines" are from a bunch of whitespace at the end of some lines of code. Curiously, they don't show up in the editing textarea and they didn't come from me. Weird.

Cheers,
Ovid

New address of my CGI Course.


In reply to Re: Paul Graham on Great Hackers by Ovid
in thread Paul Graham on Great Hackers by biosysadmin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-24 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found