The First Program Language Conundrum

  • (2 Pages)
  • +
  • 1
  • 2

28 Replies - 24863 Views - Last Post: 25 January 2013 - 11:37 AM

Poll: The First Program Language Conundrum (56 member(s) have cast votes)

Which Language Should I First Focus on Becoming Proficient in?

  1. Java (19 votes [33.93%])

    Percentage of vote: 33.93%

  2. Ruby (1 votes [1.79%])

    Percentage of vote: 1.79%

  3. C++ (18 votes [32.14%])

    Percentage of vote: 32.14%

  4. Spanish (1 votes [1.79%])

    Percentage of vote: 1.79%

  5. Assembly (1 votes [1.79%])

    Percentage of vote: 1.79%

  6. C# (14 votes [25.00%])

    Percentage of vote: 25.00%

  7. Assembly (0 votes [0.00%])

    Percentage of vote: 0.00%

  8. LISP (because it sounds esoteric) (2 votes [3.57%])

    Percentage of vote: 3.57%

Vote Guests cannot vote

#16 turboscrew  Icon User is offline

  • D.I.C Addict

Reputation: 100
  • View blog
  • Posts: 644
  • Joined: 03-April 12

Re: The First Program Language Conundrum

Posted 18 April 2012 - 02:23 PM

I'd still recommend STANDARD pascal as the first language.
It's quite simple, but tough with the rules.
One has to do things right without funny tricks.
Was This Post Helpful? 0
  • +
  • -

#17 Magooguli  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 34
  • Joined: 09-April 12

Re: The First Program Language Conundrum

Posted 19 April 2012 - 08:19 AM

I have decided to learn basic JAVA. Not for any other reason but because I feel I I should know it to be able to carry on a conversation. I have also begun studying Common LISP.

I have spent between 5 to 30 hours playing with various languages over the past little while. I am captivated by LISP. I spent 8 hours reading about it yesterday after I stopped playing with it on my machine. It seems powerful, graceful and filled with potential. I want to learn to code. I am not sure I can explain it but I need to learn LISP.

Documentation is terrible -- hello world took over 2 hours because I was struggling with the environment. Yet it is so simple & useful. The simple convention of

(+ 2 3)


rather than 2 + 3

makes more sense when you stop for a moment and let yourself ponder it. I was up till 6am reading about cons and pointers and have taken the day off to play with Common LISP and try and learn some basics. Nothing has caught my attention like this. I am going to have to force myself to study JAVA - in fact I created a simple program I need to finish and will do a couple more but I already see how to rewrite in LISP. GUI is obviously an issue.

Okay so I am obviously all over the place but after all of the helpful comments I felt I owed you all an update. Also sporadic random LISP notes at http://codingwithalisp.wordpress.com

This post has been edited by Magooguli: 19 April 2012 - 08:20 AM

Was This Post Helpful? 0
  • +
  • -

#18 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 8034
  • View blog
  • Posts: 13,747
  • Joined: 19-March 11

Re: The First Program Language Conundrum

Posted 19 April 2012 - 08:56 AM

Lisp and Java at the same time? Fun. You'll have to be a bit schizophrenic to make it work, but you should be able to manage. You'll find your way to clojure* soon enough... :)

Don't worry too much about the GUI for the time being - just get comfortable with the language for now. Once you're comfortable passing functions around I think GUI programming will make a lot more sense.**

A lot of people find that EMACS + SLIME is a good environment for lisp hacking... I'm usually a vi guy, but SLIME works for me. That might be a little much to absorb all at once though. If so, just work in the clisp REPL until you get the hang of it.

There are a few books that might be useful to you.
Conrad Barski's Land of Lisp is a fun introduction to some serious ideas, using full-fledged games as the working examples. The material is deep, and I don't think Barski gets you all of the way there, but it's engaging and a good start.
Felleisen and somebody's The Little Schemer primarily deals with recursion and related topics - excellent guide to the lisp mindset, but almost no practical code - very abstract, very usful. Targets the scheme dialect of Lisp. It's close enough to common lisp that you shouldn't have any trouble, or you can run through the book in mit-scheme or racket, both of which are easily available.
Also scheme-oriented, Abelson and Sussman's Structure and Interpretation of Computer Programs is a classic. Available on the web for free, and it's the text for their MIT course of the same name, which is also available for free.



*clojure is a lisp which targets the jvm. Haven't seen Raynes around lately, but he's always been DIC's clojure maven. I'm not really sold on clojure yet, but don't let that stop you from trying it. My advice, if you were to ask me, would be to get happy with the basics of lisp (and maybe scheme) before diving into clojure, since it does depart from the core lisp in some significant ways, which might be pretty confusing to take in this early. But again, just because I said it doesn't make it right.

** one advantage of clojure, of course, would be access to java's graphics libraries. but there's other ways to do it, including ncurses for the classic feel...
Was This Post Helpful? 1
  • +
  • -

#19 Magooguli  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 34
  • Joined: 09-April 12

Re: The First Program Language Conundrum

Posted 19 April 2012 - 09:14 AM

I suspect you're right regarding staying away from Clojure from now. I'm not even going near Scheme. I find Java and LISP different enough that while concepts may merge, be delineated and merge again (which is good for concepts) the syntax doesn't overlap -- which is where I suspect the biggest problem in learning multiple languages at once would be.

I liken it to learning French, Italian & Spanish - with the similar root how the hell does one know which word belongs to which.

I am currently reading

COMMON LISP: A Gentle Introduction to Symbolic Computation
Practical Common LISP
Also reading John McCarthy's articles / essays on LISP as well as other positive & negative critiques.
Will get The Land of LISP today.

Am avoiding anything Scheme related until I have a better idea of syntax and have practised a little with Common LISP so will put those books on hold for now.

As for the practical side I took the shortest route I could find - lispbox 0.7 !

Will have longer more useful articles soon. Thanks again and feel free to keep sharing!
Was This Post Helpful? 0
  • +
  • -

#20 Magooguli  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 34
  • Joined: 09-April 12

Re: The First Program Language Conundrum

Posted 19 April 2012 - 10:29 AM

Ooops I missed out Successful LISP by David Lamkins
Was This Post Helpful? 0
  • +
  • -

#21 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 8034
  • View blog
  • Posts: 13,747
  • Joined: 19-March 11

Re: The First Program Language Conundrum

Posted 19 April 2012 - 10:36 AM

There's a ton of good stuff out there. Paul Graham's book On Lisp is available free. I'm not sure it's a great beginner's book, but it might be good to keep in mind for later.

His essays are useful, too, if you want to ratify your decision to study the ancient and noble art of paren-fu.
Was This Post Helpful? 0
  • +
  • -

#22 Magooguli  Icon User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 34
  • Joined: 09-April 12

Re: The First Program Language Conundrum

Posted 22 April 2012 - 07:42 AM

After all of the useful advice I have been given I felt an update was in order.

While I haven't given up on learning Java I have put it on the back burner. LISP however is slowly encroaching upon my entire life. It fascinates. This should be what everyone learns first. I see why they don't, the resources are spare confusing and conflicting. Just figuring out how to compile a file and which version to use is a nightmare. Regardless once the environment is worked out (and I am writing a brief introduction on how people can quickly begin with LISP) the language is intuitive, succinct and requires thought.

As at best a half-witted out dated programmer I only see surface beauty in much of these bits, I am sure the more experienced among you perceive things I don't yet conceive.

For those of you interested in what LISP code looks like and why it is practical in its elegance may I suggest reading:

Why I love Common Lisp and hate Java

P.S. I don't plan on commenting further on these boards but should any of you wish to natter LISP like with me feel free to contact me. Good luck to you all!

This post has been edited by Magooguli: 22 April 2012 - 07:44 AM

Was This Post Helpful? 1
  • +
  • -

#23 Choscura  Icon User is offline

  • D.I.C Lover


Reputation: 467
  • View blog
  • Posts: 2,228
  • Joined: 18-October 08

Re: The First Program Language Conundrum

Posted 01 May 2012 - 10:08 AM

Just a quick two cents. If you're ambitious in the sense of wanting to be able to do anything, you want to start with something solid and do a bit of everything.

...In other words, I'd start with a project you want to get done- you probably already know which one you want to do, as you're reading this, and I whole-heartedly recommend trying it if it's relatively simple, in terms of what it needs to do and what it needs to know, as well as how it is intended to know that. If you can completely explain those three parts, the rest is just details, almost no matter what language you use.
Was This Post Helpful? 1
  • +
  • -

#24 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10821
  • View blog
  • Posts: 40,342
  • Joined: 27-December 08

Re: The First Program Language Conundrum

Posted 30 July 2012 - 05:50 PM

This seems to be a "which language" thread with some good responses, so I'm going to pin this one as a resource for others. Feel free to add your constructive thoughts on each language.
Was This Post Helpful? 0
  • +
  • -

#25 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1383
  • View blog
  • Posts: 3,515
  • Joined: 28-November 09

Re: The First Program Language Conundrum

Posted 30 July 2012 - 07:37 PM

I love Ruby, but I would never start with it.

Why? If it's such an amazing language why not solely focus on it?

Ruby is a level of abstraction all its own, and in order to really appreciate and comprehend its real power you need background in a lower language like C++ or C. So much of Ruby is simple to start out and run with, but if you want to really be proficient then C should be a required prerequisite.

Now what makes Ruby so good is its ability to monkeypatch and metaprogram. You don't like the way that strings are defaultly handled? Override it. Integers? Override it. Kernel, and Object itself? Not suggested but it's possible to override.

So what does this massive Object Oriented freedom give us? Metaprogramming. Call methods by their names with a string or symbol dynamically, call a method that doesn't even exist and override the method_missing handler to intercept them. Make singleton/eigenclasses that dynamically redefine a class for one object. Generate hundreds of threads dynamically!

The beauty of it has really captured me. Combine the raw power of Object Oriented with the elegance of Functional Programming and you have even more to wrap with.

Closures to dynamically warp scope, blocks lambdas and procs to make anonymous methods, and more that I haven't even begun to stumble upon. I apologize, but my Functional is rather weak as compared to my OO experience.

Here's an example of one of my favorite little toys in Ruby (using Windows):

def ping(ip)
  return system "ping -n 1 -w 1000 #{ip} > NUL"
end

def hyperthread(method_name,ip,number)
  threads = []
  number.times do
    threads << thread.new{method.call(method_name,ip)}
  end
  threads.each{|t| t.join}
end



I need to work out passing args more efficiently, but you get the general point of that. You can pass a method name to method.call and dynamically call a method inside a thread and generate multiple threads. The result of this? 50 pings in .68 seconds on an i7 with 8gB of RAM that can be looped. Stress test anyone?

I'm still thrilled to get into the functional aspects and really find some new toys to play with as I go along, but we'll see how that one goes.

Ruby is a great language for a seasoned vet, but a crutch for a newcomer.

This post has been edited by Lemur: 30 July 2012 - 07:37 PM

Was This Post Helpful? 0
  • +
  • -

#26 gonzaw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 18-December 12

Re: The First Program Language Conundrum

Posted 19 December 2012 - 12:12 AM

I'd say start with C.

It teaches you how to handle all the low-level stuff, which makes it easier to understand how programs and systems work better (although I guess use C++ instead since it has the "new" function which is easier to understand than "malloc" I think, and other tiny bits that they add onto C).


Once you learn how the low-level stuff is handled (references vs memory data, etc), you can understand better higher-level stuff, like in java.
For instance, the whole "Does java let you pass parameters by reference?" question is pretty easily answered if you already know how references are handled in C and just think of java variables as "C references without the * ".

After you get past that point java makes things SO MUCH easier though. Seriously. I'd recommend learning it at one point or the other.


Haven't really used scripting languages other than Perl or octave for some computation classes. I guess they fulfill their purpose of being "easy" and "fast" to use in those environments.
If you just want to do some methodical computation or math operations and the like I'd recommend those scripting interpreted languages instead (haven't really seen a compiled scripting language before though).

^^^Can't you use metaprogramming in java as well?

I know it's like 100 times more hard to do, and would require a lot of previous design, but if you plan on doing more "advanced" systems with lots of interactions and the like but still want metaprogramming it could be done I think
Was This Post Helpful? 0
  • +
  • -

#27 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1623
  • View blog
  • Posts: 5,714
  • Joined: 03-August 09

Re: The First Program Language Conundrum

Posted 19 December 2012 - 07:18 PM

Best? Not sure there is a right awnser. I'd say start with something there is plenty of documentation for and doesn't give you too much of a crutch, C++ would be my pick. After you learn to program I recommend doing something as completely different as possible from anything you've done before. If you've done C++, try Haskell or Lisp. Tried one of those? Try prolog. Tried that? Try ruby. Keep trying new things as much as possible.

Quote

^Can't you use metaprogramming in java as well?


not like in lisp, not even like in C++. Heck, C with it's macros has better meta programing capabilities than Java as far as I know. Java has reflection I suppose but that's not really metaprogramming.
Was This Post Helpful? 0
  • +
  • -

#28 gonzaw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 18-December 12

Re: The First Program Language Conundrum

Posted 19 December 2012 - 07:44 PM

View Postishkabible, on 19 December 2012 - 11:18 PM, said:

Best? Not sure there is a right awnser. I'd say start with something there is plenty of documentation for and doesn't give you too much of a crutch, C++ would be my pick. After you learn to program I recommend doing something as completely different as possible from anything you've done before. If you've done C++, try Haskell or Lisp. Tried one of those? Try prolog. Tried that? Try ruby. Keep trying new things as much as possible.

Quote

^Can't you use metaprogramming in java as well?


not like in lisp, not even like in C++. Heck, C with it's macros has better meta programing capabilities than Java as far as I know. Java has reflection I suppose but that's not really metaprogramming.


I know there are some APIs that let you:
1)Handle .class files and create/get byte-code or create new .class files with the byte-code and constants you want
2)Handle .class files using source code.

I don't remember which ones, but I do remember ones that allow you to create a class with it's methods/fields/etc from scratch using source code.
Again....is not that easy to use, specially not in the middle of a program


JavaAssist is one of them, dunno about the other one.
Was This Post Helpful? 0
  • +
  • -

#29 animaguy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 18-August 12

Re: The First Program Language Conundrum

Posted 25 January 2013 - 11:37 AM

In my opinion Java has always been a good place to start. Java is strict and Object Oriented.

If a student who is starting to learn Java and gets confused and decides to try another language, not only is tha "normal" but should be deemed as a good thing.

C++ is a good language to go to next because it is very similar to Java.

I would also recommend you consider learning Python too.

I have never studied Lisp so I have no opinion about it.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2