News for hackers. Stuff that matters.
Re:What programming languages should I learn and why? by mhidalgo on Saturday May 19, 2007 @06:56PM (#23301)
I have been teaching myself how to hack. I see that the first real software engineering classes in most schools is taught in JAVA, usually a data structures class. Should I even bother.... I see the merit of learning ground level stuff , like memory management seen in C/C++ but with JAVA is it useful to learn even if majority of web development is done in LAMP ( I should say majority of web development interesting to me, I know there is alot of JAVA out there) Does anyone know of a good book/tutorial to learn data structures with languages such php/ruby/python.
Re:What programming languages should I learn and why? by gibsonf1 on Saturday May 19, 2007 @07:37PM (#23303)
I only know Lisp and absolutely love working with it and the results we're getting with our web application (I was not a CS major), but my partner who is a Software Architect by profession tells me that programming in Lisp takes about half the code and effort of Java with more impressive results. (See Paul Graham's essays on Lisp: http://www.paulgraham.com/lisp.html)

If you are going to learn a language, learn the most powerful and efficient language you can find so that you can reach your goals faster. As far as I can tell, until ARC comes out, that language is Lisp. A lot of people complain about the lack of Lisp open source out there, but in fact, our application is loaded with great open source Lisp libraries. See: http://news.ycombinator.com/comments?id=20010 http://news.ycombinator.com/comments?id=12619 http://www.google.com/search?q=site%3Aycombinator.com+lisp http://www.cliki.net/index http://common-lisp.net/

Re:What programming languages should I learn and why? by gyro_robo on Sunday May 20, 2007 @01:11AM (#23341)
You only know Lisp? That's like only knowing gourmet cooking. Here, have some gruel like the rest of us lived on for years.
Re:What programming languages should I learn and why? by staunch on Saturday May 19, 2007 @09:22PM (#23322)
Your title is broad but here you say you want to do web development. Many of the people here are interested in programming for programming's sake, so a lot of the advice will be computer sciency. That's great, but if you just want to make stuff you can safely skip theory for now and get your hands dirty producing real stuff and fill in the gaps over time.

The key is to learn best practices of whatever language you choose. Don't learn bad habits. Read the authoritative books and don't take short-cuts. Don't be the guy writing code people cry at having to maintain. Avoid "cargo cult" programming, where you just paste code you find into your programs without fully understanding it. I recommend never pasting at all in fact. At the very least re-type everything as you're learning and try to understand it as best you can.

You can safely skip haskell, lisp, prolog, and all those languages you will never get friends to help you with, many books to read, or libraries to leverage. At least until you've got enough experience to be mostly independent of assistance.

With the use of best practices it doesn't really matter if you choose: Ruby, Perl, Python, or PHP. I'd ignore Java because it has so many training wheels, and the others don't. These can all work extremely well for web development and anyone who says different is selling something. The Truth™ is that Perl5 is the best and Perl6 will make them all obsolete :-)

Re:What programming languages should I learn and why? by SwellJoe on Saturday May 19, 2007 @09:43PM (#23324)
Great to see Perl is coming back into vogue in these kinds of conversations. It's gotten a bad rap for a while, because it's so easy to write really messy and ugly code...but it's also extremely expressive, and contains more functional constructs than even Ruby or Python. Perl 5 didn't get objects right, but they aren't awful (not nearly as big and clunky as Java/PHP). Perl 6 really will be a killer. I watched Audrey Tang's recent video about it, and it was just astounding how far they plan to leap with Perl 6...I must have known it was coming, since I read the apocalypses years ago, but seeing the example code blew me away. It's still a pretty good learning language, and an unbeatable "get things done" language because of CPAN, but if pressed I would have to recommend Ruby or Python for first time programmers.
Re:What programming languages should I learn and why? by jamongkad on Saturday May 19, 2007 @11:58PM (#23331)
I was about to chime in Perl but I read down to this. I'm currently using Ruby now but my first step into hacking was Perl. So I have a soft spot for it. If Perl 6 can live up to it I will not have any qualms hacking in Perl again.
Re:What programming languages should I learn and why? by jaggederest on Monday May 21, 2007 @04:18AM (#23556)
Ruby is so perlesque if you use all the $ variables, it's almost a push.
Re:What programming languages should I learn and why? by SwellJoe on Monday May 21, 2007 @06:20PM (#23716)
True on the surface. But Ruby's everything-is-an-object is a big difference in the way you think when working in each of the languages. Ruby definitely guides you into an OOP mindset, while Perl leaves all paths open...I don't necessarily consider this a win, but it is a pretty big difference in the way one thinks, even if the syntax of Ruby is immediately comfortable to a Perl programmer.

We almost never use OO in our Perl codebase, except where bolting on OO makes a lot of sense (specifically, the UI functions, some CPAN modules that have a more natural OO interface), but in the Ruby code I've written it's all objects and it never feels forced or bolted on. Partly, it's the tasks we're doing where functional programming makes more sense, and partly it's due to having a large codebase that pre-dates Perl 5. Oh, yeah, we also have a huge swath of disparate data being passed around amongst different systems and services, and it's very natural to pass them around as arrays and treat them similarly to lists in lisp. map, grep, shift/unshift, and pop/push get a lot of use in our code. I'm pretty certain we'd do it differently in Python and we'd probably do it differently in Ruby. It'd probably take quite a bit more code in either of those languages, but it might be more readable on first (and second) glance.

Perl 6 will change some of our practices (in three or four years when Perl 6 is wide-spread, anyway), but not all of them. Objects will be beautiful in Perl 6, so we won't avoid them, and argument passing will be much cleaner (right now we pass around refs to arrays a lot, which is somewhat fragile when API changes happen), so those things will change, but our treatment of data will probably remain similar.

So, I agree with you about Ruby syntax. It looks very similar, and is very comfortable to me, as a long time perl coder. But when you actually start building things, the comfortable paths diverge quite a bit.

Re:What programming languages should I learn and why? by rms on Saturday May 19, 2007 @07:47PM (#23304)
Lisp is great but Python/Ruby are a great halfway point between C and Java and the purely functional Lisp type languages. It's tough to say whether you're better off learning Ruby or Lisp first. It would probably make a good PhD project for someone to compare the teaching of programming to first-time students with Pascal, Java, Ruby, and Lisp.

Anyways, www.hacketyhack.com is a great integrated IDE for learning the syntax of ruby.

Re:What programming languages should I learn and why? by JamesT43 on Saturday May 19, 2007 @08:41PM (#23314)
Thats actually going to be at www.hacketyhack.net.
Re:What programming languages should I learn and why? by gibsonf1 on Saturday May 19, 2007 @07:58PM (#23307)
"purely functional Lisp type languages" I think Common Lisp actually has one of the most powerful Object Systems: CLOS
Re:What programming languages should I learn and why? by rms on Saturday May 19, 2007 @08:05PM (#23310)
Sorry, I meant languages that actually allow for functional programming, not languages that are exclusively that way.
Re:What programming languages should I learn and why? by euccastro on Monday May 21, 2007 @11:08PM (#23778)
Just to nitpick, any language that allows functions 'allows' functional programming to some extent. More seriously, any language with higher order functions, lexical scoping, and closures can be considered appropriate for functional programming.

You probably meant languages that are biased primarily towards functional programming, as opposed to others where FP is not the dominant paradigm. You have to specify that much if you are going to include the Lisps but leave Python out.

Re:What programming languages should I learn and why? by BrandonM on Sunday May 20, 2007 @07:21PM (#23473)
Lisp is not at all exclusively functional. The best Lisp is, but you can easily write iterative code in Lisp as well. It's just that most Lisp programmers don't because they realize that the functional paradigm is usually superior in terms of creating clean, simple code that is easy to understand later.