Re: New Year's Resolution: learn another language
by starX (Chaplain) on Jan 07, 2008 at 02:25 UTC
|
I've got a special place in my heart for C. It's more challenging than the interpreted languages that we use today because it lets you shoot yourself in the foot. The trade off is that it helps you pay closer attention to what's going on in memory, and should you ever decide you want to develop device drivers, you'll be able to do so. Also, you'll be able to write C that interfaces with perl and vice versa, so you'll be able to expand your perl fu at the same time.
I'll grant that classic C programming isn't as hot an item in the world of IT as it used to be, but it's kind of like learning Latin; you'll almost never use it directly, although the benefits of learning it will manifest themselves in other ways.
If you are interested in learning C, there's two really good books that will teach you the basics. Kernighan and Ritchie's The C programming Language, and Pointers on C, by Kenneth Reek. | [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by BrowserUk (Patriarch) on Jan 07, 2008 at 02:13 UTC
|
If you've never had any exposure to a Functional Programming language, now's a good time to take a look.
And if all the CS on that link is off-putting, it really is radically different from those things you've mentioned you've used to date, then take a look at The Q Language. I cannot thank the anonymonk that put me onto this a few months ago enough. It has really opened my eyes. And it is far easier to get into than most other FP langauges around.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] |
|
I don't know that it would be that different. He mentioned knowledge of XSL. If he's done XSLT, then he would have been fighting the language pretty hard not to do so in a somewhat functional style.
| [reply] [Watch: Dir/Any] |
|
Having been forced to use XSLT for a short period some years ago, my initial reaction to your suggesting that it is an FP language was one of complete and utter disbelief. However, I googled and found several people making a similar suggestion.
I have to say that I find it almost impossible to relate my experience of programming XSLT as anything like my experience of programming in any of several real FP languages. Indeed, I wouldn't wish XSLT upon anyone, not even my worst enemy. I see it has it's uses for performing a limited set of very specific types of transformations upon large volumes of XML encoded data, but as a general purpose programming language (IMO) it is a disaster.
The analogy that comes to mind is: Given the increasingly powerful processors available in mobile phones, and combining them with the nearly ubiquitous presence of video-capable digital cameras, it would be possible to program them to allow you to type SMS texts by placing the phone on a work surface and using Semaphore. I have absolutely no doubts it could be done, but would anyone really use it?
(IMO) XSLT is the absolute antithesis of FP. Just look at all the needlessly repetitive verbosity XSLT entails.
And whilst it supports (after a fashion) high order functions, imagine trying to do the holy grail of FP: Fixed Point Combinators using XSLT?
Aristotle demonstrated how to do the Y combinator in Perl a while back. Now compare that to the same thing in Q: _Y = \F.(\X.F '(X X)) (\X.F '(X X));
If the Perl version is an order of magnitude more complex and verbose than the Q version, I can only imagine that the XSLT would be one order more complex and two orders more verbose than the Perl. That's if it is possible to do it at all. And IMO, that totally negates any claim that XSLT is a FP language.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] [d/l] |
|
|
Re: New Year's Resolution: learn another language
by merlyn (Sage) on Jan 07, 2008 at 04:13 UTC
|
| [reply] [Watch: Dir/Any] |
|
I love Seaside, but Smalltalk's syntax makes me nauseous... Do you not have a gag reflex going from Perl to Smalltalk? If so, how do you get over it? If not, why not?
| [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by perrin (Chancellor) on Jan 07, 2008 at 04:32 UTC
|
If you've never done any Java, you should learn it. It is so ubiquitous now that a lot of the most interesting writing about programming is written using Java, and some of the most interesting tools are written in Java. You may well decide you dislike it, but being able to read and understand it will help you a lot when you go to look at the current programming literature. It may also improve your knowledge of OO modeling, since that subject gets a lot more coverage in Java books than in Perl ones. | [reply] [Watch: Dir/Any] |
|
My vote would also go for Java. I'm not a programmer by any stretch of the imagination and have only just “dabbled” in C, C++, Visual Basic, Prolog and one or two others. Being an activist pragmatist regarding learning style I found Java to be very visual in producing an output, one can actually get something up and running very quickly.
I also found Prolog gives a different perspective from other languages because of its use of procedural semantics and for anyone interested in Natural Language Processing and specifically using Perl it is well worth looking into before getting to grips with the Perl Prolog modules.
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by graffitici (Novice) on Jan 07, 2008 at 13:24 UTC
|
I'm surprised that out of all the languages that were suggested, Lisp hasn't found its place in the list. Although it may not be used very widely in the industry, it's a very important language historically. It probably was the first functional scripting language, and it first implemented garbage collection and dynamic typing, features found in Perl today. I strongly believe that it still is a very valid tool
Since you don't have a CS background, I should also point out that Scheme (a dialect of Lisp) is taught to freshmen CS majors for their first programming class by many universities (including MIT). Take a look at TeachScheme. Furthermore, there are many online textbooks available to get you started, and a very good IDE (that works under Linux). Here are some links:
| [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
|
graffitici , thanks for the info. This looks like great CS material to get some background and hope to improve my perl.
I am still consider newbie on perl but I will also be trying out SQL to interface w/ Perl as well as XML
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by kyle (Abbot) on Jan 07, 2008 at 05:02 UTC
|
As others have mentioned, functional programming is indeed interesting and worth looking into. That having been said, you don't really have to learn another language to do it. You can write Perl in a functional style. If you want to understand closures, you might as well do it in Perl, a language you already know, as learn a whole other language with its own version of print, etc.
You might look at Prolog for a programming style you really don't see in Perl (at least not until another monk comes along and points us to a CPAN module that lets you write code that way).
| [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] [d/l] |
Re: New Year's Resolution: learn another language
by Erez (Priest) on Jan 07, 2008 at 09:03 UTC
|
Read Higher Order Perl. It will give you an understanding of both Perl and programming that in many ways is akin to learning a new language.
Software speaks in tongues of man; I debug, therefore I code.
| [reply] [Watch: Dir/Any] [d/l] |
Re: New Year's Resolution: learn another language
by aquarium (Curate) on Jan 07, 2008 at 03:27 UTC
|
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by gamache (Friar) on Jan 07, 2008 at 15:14 UTC
|
Learning Lisp will teach you how to use modern dynamic languages (Perl, Python, JavaScript, Ruby etc.) in much more powerful ways. The two general-purpose Lisps people use today are Scheme and Common Lisp. Scheme is a spectacularly small language, easy to learn and extend. Common Lisp is a monstrosity, similar to how a car might look if executives from General Motors, Ford, Toyota, Peugeot, Yugo and Land Rover designed it together over the course of a decade. For a learning language, Scheme has the edge over CL. In any case, Lisp will stretch your head further than perhaps any other single computer language.
Learning C will teach you how computers work, how awesome dynamic languages are, and why Lisp compilers are usually written in Lisp. C is the best assembly language ever. It's a total pain in the ass for anything sizable, but once you grok C, you have a good sense about where every bit and byte is going in all languages. C++ adds some higher-level features to C, but still requires a lot of hand-holding to get from point A to point B. If you're not planning to use either language extensively and just want to see where it takes you, I'd recommend C. The language features in C++ which are absent from C (object orientation, template programming, generic functions, overloading, etc) are learned more easily from a language with more forgiving syntax.
Lisp and C have both aged very well, respectively 50 and 35 years old. I'd say there's more to learn at these opposite ends of the spectrum than in between, if you're a code tourist. Most people who write actual software for actual purposes aim for a language somewhere in the middle.
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by bradcathey (Prior) on Jan 07, 2008 at 12:42 UTC
|
Larry himself had some interesting comments last month. Great reading, per usual: Let's go scripting.
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by ctilmes (Vicar) on Jan 07, 2008 at 14:50 UTC
|
I could second the above recommendation for 'C'. If you program, you should know C..
Beyond that, my recommendation is SQL.
Pick one of the Open Source databases, install it and make a web site using your prior knowledge, then hook up the database to it for some favored pet project.
In particular, I would recommend PostgreSQL, and learning its stored procedure language PL/pgSQL in addition to straight SQL. (Though it now allows embedded Perl programs!)
| [reply] [Watch: Dir/Any] |
Re: New Year's Resolution: learn another language
by explorer (Chaplain) on Jan 07, 2008 at 16:26 UTC
|
| [reply] [Watch: Dir/Any] |