Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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

by vrk (Chaplain)
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";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695162]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-06-24 23:05 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.