Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: What do you write when learning a new language?

by w-ber (Hermit)
on Jul 02, 2008 at 17:59 UTC ( #695162=note: print w/ replies, xml ) Need Help??

in reply to What do you write when learning a new language?

I program because I have problems. (No, not that kind of problems.) There is some task I can make the computer do for me, so I start programming. Picking the programming language comes after having a problem to solve. Most often it's Perl, since it's a pragmatic programming language and available on most computers I have access to (including in particular $work). Sometimes I pick C if I need better access to hardware or libraries or manual memory control. Sometimes I pick $functional_language[rand @functional_language] because the solution may be more easily expressed in it. Sometimes the environment the program must execute in limits the choice (e.g. Javascript).

Of course, this kind of an approach presupposes that you know the programming language very well, or at least are familiar with a wide range of different concepts.

When I was still taking first steps into programming in Pascal and C, I used to write a program that queries the user for a radius, then prints the circumference and area of a circle or sphere. But that was a decade ago.

I mean no offence, but "learning how to write a subroutine or function" in a new programming language sounds silly. It's a matter of syntax, if the programming language has some form of functions or goto. (If it doesn't, this is an interesting problem, but it was already solved in 1950s.) It's much more worth your while to learn a new concept through exposure to a new programming language.

print "Just Another Perl Adept\n";

Comment on Re: What do you write when learning a new language?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695162]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2015-11-26 07:47 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls