
-----------------------------------
wtd
Thu Oct 28, 2004 6:11 pm

Where to go next?
-----------------------------------
It seems a popular question here is, "I've got a decent grasp on Turing, but I find it limiting, so which language should I learn next?"

With that in mind, I think it'd be a good idea to just tackle that issue head on in one central place.  Perhaps this topic could be stickied.

There are several options out there.  Good, solid programming languages.  Many of them even have free (either no cost, or open source, or both) compilers or interpreters.

It'd be interesting to hear from the people here about where they think Turing programmers and students should go when they want to move on and learn another programming language.

Some options (not in any particular order):


C - compiled
C++ - compiled
Java - compiled
C# - compiled
Objective-C - compiled
Perl - interpreted
Python - interpreted
Ruby - interpreted
O'Caml - both compiled and interpreted
D - compiled
Eiffel - compiled
Pascal - compiled
Ada - compiled
Visual Basic - compiled
Javascript - interpreted

-----------------------------------
Tony
Thu Oct 28, 2004 11:59 pm


-----------------------------------
In my opinion : ether C++ or Java (as long as latter is not one by HoltSoft.. do not fall for that)

Both languages are mainstream and would offer a glimps into what real world programming is all about. Both have an unbelivable amounts of information available due to their popularity, so it will be easy to get a hold of solutions to problems encountered during the learning profess. Furthermore many other languages borrow from the structures of this two, so moving on to another programming language would be even easier afterwards.

-----------------------------------
wtd
Fri Oct 29, 2004 6:32 pm


-----------------------------------
Note: I really like the convention of bolding the names of programming languages here.

Both C++ and Java have the advantage of being standardized.  For C++, those standards are open, and thus a bit nicer, but Sun's de facto Java standard is equivalently useful for students.

On the other hand, I don't think either are particularly good "next step" languages.  Programmers accustomed to Turing are relatively ensconced in a mostly procedural world.  There are many other methods for programming out there, though.

My own personal experience has been that one learns something best by experience.  I looked at Java code for years and the idea of object-oriented programming made my head hurt.  I even went so far as to proclaim that I'd never need or want it once, when arguing with a friend who'd been seduced away from Perl to Java.

I didn't begin to get a handle on it until a friend of mine (the very same one who introduced me to Perl), gave me a link to some Python tutorials.  Being the impressionable young guy I was, I downloaded a copy of MacPython to my PowerMac 6500 and started typing away.  I was initially most impressed at the interactive interpreter.  Write some code, and as soon as you hit enter it runs and spits out a result.

As I kept dabbling, though, I ran into classes.  I initially was hesitant.  I'd seen "class" before in Java and it drove me nuts.  But then Josh showed me a trivial Name class and it began to click.

Instead of being faced with:

import java.lang.*;
import java.io.*;

public class Main {
   public class Name {
      private String first, last;

      public Name(String first, String last) {
         this.first = first;
         this.last  = last;
      }

      public String toString() {
         return first + " " + last;
      }
   }

   public static void main(String[] args) {
      Name bob = new Name();
      System.out.println(bob);
   }
}

I saw:

class Name:
   def __init__(self, first, last):
      self.first = first
      self.last  = last
   def __str__(self):
      return self.first + " " + self.last

bob = Name("Bob", "Smith")
print bob

That kind of simplicity made it so much easier to delve in and start changing things to see what was possible.

That said, I think Ruby is an even better example of this, and it shares some similar syntactic roots with Turing, so it might be even easier for Turing programmers to catch on.  Plus it implements a better OO model than Python.

class Name
   def initialize(first, last)
      @first = first
      @last  = last
   end

   def to_s
      @first + " " + @last
   end
end

bob = Name.new("Bob", "Smith")
puts bob

In summary, the best "next step" language should make it easy to experiment.  Ruby does this exceptionally well.

-----------------------------------
rizzix
Sat Oct 30, 2004 11:30 pm


-----------------------------------
ehmm yea but from what i see, i think ruby gives a wrong/mixed impression of object properties and method variables.

-----------------------------------
wtd
Sat Oct 30, 2004 11:35 pm


-----------------------------------
How so?  

Ruby has a very simple rule: all instance variables are private.  Accessor methods are required to make them visible.

Those accessors can either be coded manually, or automatically generated with:

attr_accessor
attr_reader
attr_writer

-----------------------------------
MyPistolsIn3D
Tue Nov 02, 2004 6:37 pm


-----------------------------------
What languages does your guys schools offer? Ours only has turing and java.

-----------------------------------
wtd
Tue Nov 02, 2004 6:50 pm


-----------------------------------
What languages does your guys schools offer? Ours only has turing and java.

There's nothing preventing you from learning on your own.  :)

-----------------------------------
apomb
Wed Nov 03, 2004 1:02 am


-----------------------------------
There's nothing preventing you from learning on your own.  

except for the immense complexities of C++ ... trying to learn that on your own is a pure nightmare if youre used to turing's simplicity

-----------------------------------
wtd
Wed Nov 03, 2004 1:23 am


-----------------------------------
There's nothing preventing you from learning on your own.  

except for the immense complexities of C++ ...

Then choose a different language.  I put plenty others on that list, and that's by no means complete.

My suggestion would be going with an "easy" language after Turing.  You will get better with each language you learn and each language makes the next one easier to learn.

Learn a few languages you can pick up in a matter of weeks.  I believe people could get the basics of languages like Python and Ruby down in days.  Being conservative, stretch that out to a month.  That's not a long time in the grand scheme of things, and it will make it immensely easier to learn languages like C++.

-----------------------------------
rizzix
Wed Nov 03, 2004 7:38 pm


-----------------------------------
How so?  

Ruby has a very simple rule: all instance variables are private.  Accessor methods are required to make them visible.

Those accessors can either be coded manually, or automatically generated with:

attr_accessor
attr_reader
attr_writer

i was refering to the fact (maybe) that by inspection of scope specially, you get a mixed and confused impression in the difference of object properties and local method variables, assuming ofcourse the initialize method is not a special method.. (like a constructor in c/c++ or java) but rather an ordinary method playing the role of object state initialization as in obj-c and the likes.

-----------------------------------
wtd
Wed Nov 03, 2004 7:47 pm


-----------------------------------
How so?  

Ruby has a very simple rule: all instance variables are private.  Accessor methods are required to make them visible.

Those accessors can either be coded manually, or automatically generated with:

attr_accessor
attr_reader
attr_writer

i was refering to the fact (maybe) that by inspection of scope specially, you get a mixed and confused impression in the difference of object properties and local method variables, assuming ofcourse the initialize method is not a special method.. (like a constructor in c/c++ or java) but rather an ordinary method as in obj-c and the likes.

The "initialize" method is a regular old method.  As is "new" for that matter, though "new" belongs to the class, is inherited from Object, and is very rarely overloaded.

I think I can see where you'd be seeing confusion.

class A
   attr_accessor :a

   def initialize(n)
      @a = n
   end

   def foo
      a = 5
      puts a
   end
end

The question is, in the foo method, what's happening?

Does "a = 5" create a new variable local to the method, ordoes it call the accessor method for @a?

The answer is that it creates a new variable.  To use the accessor a= method, you'd have to write:

self.a = 5
Does "puts a" refer to the accessor for @a, or does it refer to the local variable?

A variable "a" has already been defined, so this overrides the "a" name in this method.  To refer to the accessor you'd have to use:

puts self.a

-----------------------------------
bugzpodder
Wed Nov 03, 2004 9:38 pm


-----------------------------------
There's nothing preventing you from learning on your own.  

except for the immense complexities of C++ ... trying to learn that on your own is a pure nightmare if youre used to turing's simplicity
i picked up turing and then C++, there were no problems for me.  jumping straight into C++ without getting into turing is more painful in my opinion.

-----------------------------------
zylum
Wed Nov 03, 2004 10:16 pm


-----------------------------------
i agree, once you learn the basics of programming it's fairly simple to go to another language, its just a matter of learning the syntax along with some language specific stuff. going from turing to java was no problem at all for me.

-----------------------------------
apomb
Thu Nov 04, 2004 12:16 am


-----------------------------------
you _are_ leet ...  come on! im just a wiz! hah , well self- teaching is hard, if i was taught it, in a sequential fasion, i would prolly get it better than just diving in not knowing which end is up... ya know? ne way, i understand the conceps, but im not confident enogh to actually try to write code in C++, thats kinda what i was getting at , not the not getting the concepts.

-----------------------------------
wtd
Thu Nov 04, 2004 12:30 am


-----------------------------------
you _are_ leet ...  come on! im just a wiz! hah , well self- teaching is hard, if i was taught it, in a sequential fasion, i would prolly get it better than just diving in not knowing which end is up... ya know? ne way, i understand the conceps, but im not confident enogh to actually try to write code in C++, thats kinda what i was getting at , not the not getting the concepts.

OK, I'll tell you what I've told many others.

Experiment!

C++ compilers are free, and generally pretty easy to install.  You're not out any money.

Compile something and run it.  If it doesn't work, ask someone here why.  

What's the worst that's going to happen?  Is the universe going to implode if you compile something and it blows up in your face?  Is it going to format your hard drive and turn all of your personal information over to online Viagra salesmen?

No.  There's no risk, so go in and get your hands dirty.  :)

-----------------------------------
[Gandalf]
Tue May 24, 2005 8:22 pm


-----------------------------------
Well, I was looking, and I realize this is a pretty old topic, but...

I find it easier to do things straight from the environment, not switching back and forth from editor to command prompt.  The way I tried java, I use CrimsonEditor, a good program for java, includes and editor and a compiler build it.  All you do is "compile" then "execute".  Later on, if you want the .exe, you just find it in the folder where the .java files are.

-----------------------------------
StarGateSG-1
Wed May 25, 2005 7:37 am


-----------------------------------
I think the best language mix to aim for is for a strong base in C++
added in with java (not holtsofts version, same reason as above), then throw in a little python which is popular in the gaming world. Not to dicourage ruby but it doesn't have much potenial outside of interest learning, although if you want to have fun go ahead. I am sorry wtd that you support it but this is what I think. The languages I have methiod is mostly not my opinion but a collection of research into what employers what in a programer, in turn this reflects what courses university/ college offer. 

Thats my 'bit'

-----------------------------------
apomb
Wed May 25, 2005 3:27 pm


-----------------------------------
the cool thing about C++ is that it too, is good for gaming, like little cellphone games and stuff, little side projects, i think im gunna look into that for some like extra cash ... iunno, need a bit more C++ tho

-----------------------------------
wtd
Wed May 25, 2005 4:08 pm


-----------------------------------
I think the best language mix to aim for is for a strong base in C++
added in with java (not holtsofts version, same reason as above), then throw in a little python which is popular in the gaming world. Not to dicourage ruby but it doesn't have much potenial outside of interest learning, although if you want to have fun go ahead. I am sorry wtd that you support it but this is what I think. The languages I have methiod is mostly not my opinion but a collection of research into what employers what in a programer, in turn this reflects what courses university/ college offer. 

Thats my 'bit'

I think you misunderstand me.  While I do think Ruby has employment potential, I don't recommend languages based on that criteria solely or even primarily.

As I've said before, and I'll say again a million times, each language you learn makes the learning process easier.  You learn not just programming concepts, but how to learn.  It makes sense to start out with languages that are straightforward and accessible (how many obstacles does the language throw up to getting started).  C++ and Java are neither of these things.

Secondly, trying to learn "commercially relevant" technologies now as a student is absurdity.  By the time you're out in thw world, everything will have changed.  Technology moves too rapidly to put too much effort into any one buzzword, because tomorrow it might be meaningless.  Additionally... you're students!  You don't have balding middle-aged men who can't tell a motherboard from a megabyte telling you what programming languages and tools you can use.  You're free to experiment.  Take advantage of it.

-----------------------------------
StarGateSG-1
Wed May 25, 2005 4:39 pm


-----------------------------------
[quote]Secondly, trying to learn "commercially relevant" technologies now as a student is absurdity. By the time you're out in thw world, everything will have changed. Technology moves too rapidly to put too much effort into any one buzzword, because tomorrow it might be meaningless. Additionally... you're students! You don't have balding middle-aged men who can't tell a motherboard from a megabyte telling you what programming languages and tools you can use. You're free to experiment. Take advantage of it.[/qoute]

The best wya to learn is go for the "commercially relevant" languages becasue then when and if they do change you will be able to get right on track learnign the changes. Honestly, Java hasn't changed much, nethier has python, and C++ with the new addition of C# there are mainly no differences except in there purpose, there are always a few chnages but nothing that wil amke your knowledge useless.

I maybe a student, I am going off to university and I need to know what courses to take and how they will help me later on. Also, I  don't what to be a mindless drone who knows nothing about the language before he takes a 5-20k course. I still I think and strongly suggest to any programers who are serious to push for C++ even with only a turing background, becasue it really is less complex than people say it is, go buy a C++ for begineers, heh! why not buy C++ for dummies. They are all really helpful and if you are deicated you can do it.

Are you suggesting that all teachers/professers are old?

-----------------------------------
wtd
Wed May 25, 2005 5:15 pm


-----------------------------------
I still I think and strongly suggest to any programers who are serious to push for C++ even with only a turing background, becasue it really is less complex than people say it is, go buy a C++ for begineers, heh! why not buy C++ for dummies. They are all really helpful and if you are deicated you can do it.

Are you suggesting that all teachers/professers are old?

No, I'm not suggesting all teachers and professors are old.  I'm (very nearly) 25.  Is that old?

C++ is complex.  Do you know what all of the different uses of "const" or "static" mean?  Do you understand why a normal class can be split into a header and a ".cpp" source file, but a templated class cannot?  Do you understand why you shouldn't use identifiers beginning with two underscores, even though it's technically legal?  

Do you understand the difference between:

int c = 0;

and

int c(0);

or

c++;

and 

++c;

Do you understand why one of these works and the other doesn't?

struct foo
{
   const int a;
   
   foo(const int init_a)
   {
      a = init_a;
   }
};

struct foo
{
   const int a;
   
   foo(const int init_a) : a(init_a) { }
};

Do you understand why this code is wasteful?

int a[] = {1, 2, 3, 4, 5, 6, 8, 7, 9};
int b[9];

for (int i(0); i < 9; ++i)
{
   b[i] = a[i];
}

Do you know how to replace that loop with a single line of code?

Do you know why one constructor cannot be called from another constructor?

Do you know when and why to define a destructor?

Do you understand how to create and use function objects?

Do you know why the following is bad form?

std::string s[] = {"hello", "world", "foo", "bar"};
std::string concatenated;

for (int i(0); i < 4; ++i)
{
   concatenated += s[i];
}

Do you know what to replace the above with?

D you know the difference between a struct and a class?

Do you know the difference between the following, and why the first is better code?

struct name
{
   const std::string first, last;
   
   name(std::string f, std::string l) : first(f), last(l) { }

   std::string full_name() const { return first + " " + last; }
};

struct grade_collection : private std::vector
{
   int total() const
   {
      int sum(0);
      for (iterator i(begin()); i != end(); i++)
      {
         sum += *i;
      }
      return sum;
   }

   int average() const
   {
      return total() / size();
   }

   void add_grade(int g)
   {
      push_back(g);
   }
};

struct student : public name, public grade_collection
{
   student(std::string f, std::string l) : name(f, l), grade_collection() { }
};

struct name
{
   const std::string first, last;
   
   name(std::string f, std::string l) : first(f), last(l) { }

   std::string full_name() const { return first + " " + last; }
};

struct grade_collection : public std::vector
{
   int total() const
   {
      int sum(0);
      for (iterator i(begin()); i != end(); i++)
      {
         sum += *i;
      }
      return sum;
   }

   int average() const
   {
      return total() / size();
   }

   void add_grade(int g)
   {
      push_back(g);
   }
};

struct student : public name, public grade_collection
{
   student(std::string f, std::string l) : name(f, l), grade_collection() { }
};

Do you understand the difference between the following?

for (int i(0); i < 4; ++i)
{
   std::cout 