4 Replies - 1144 Views - Last Post: 21 May 2011 - 02:20 AM

#1 ShawnStovall   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 11
  • Joined: 26-May 08

Learning Additional Programming Languages

Posted 19 May 2011 - 11:41 PM

I was just wonder what, in your opinion, is the best way to learn a new programming language after the base concepts of programming have been (generally) well engrained. Is it best to start from scratch, and work at it like a programming beginner? Or is it best to pick up a reference book or two and work, primarily, on learning the new syntax and concepts?

Any insight is much appreciated.
Is This A Good Question/Topic? 3
  • +

Replies To: Learning Additional Programming Languages

#2 RetardedGenius   User is offline

  • >>──(Knee)──►
  • member icon

Reputation: 127
  • View blog
  • Posts: 555
  • Joined: 30-October 10

Re: Learning Additional Programming Languages

Posted 20 May 2011 - 03:11 AM

I think that it depends on the person, mainly on their current knowledge and experience. For example, if you currently know C# and want to learn Java, the transition will be very smooth because they are syntactically very similar languages.

Personally I find that I pick up a language quickly, if I can find a decent resource that explains all of the basics of a language. Whether that resource is a book or a website, e.g. I've found MSDN a great resource for learning C#.

Once I've covered the very basics of a language: data types, operators, I/O, control structures, functions, arrays, etc... I will begin to write simple programs with my new language. I find that by implementing algorithms I am familiar with, e.g. sorting algorithms, I can rapidly familiarise myself with a language.

I hope that is of some help! :)
Was This Post Helpful? 3
  • +
  • -

#3 NotarySojac   User is offline

  • D.I.C Regular
  • member icon

Reputation: 53
  • View blog
  • Posts: 428
  • Joined: 30-September 10

Re: Learning Additional Programming Languages

Posted 20 May 2011 - 05:34 PM

I don't remember my first programming language... but for when I was switching from VB 6 to .NET's C#, I made an interesting collection of text files:

(C:\All files\My Docs\My Data\Shortcuts\Coding stuff\_notes_C#\rudimentary)
701_ASM inline Coding.txt

Here's some of the file contents:
099:    Using Visual Studio's Interface to do stuff (like adding a new class, or a new database or what ever)

100:    Things involving variables and data formats

200:    Things involving Classes and structures

300:    Things involving Program flow changes

400:    Things involving external .DLL and .EXE files, and also things involving using ASM code in C#   

600:    Dry coding practices (consists links to other text files probably)

700:     Do mega-super-advanced shit

800:     Graphics and UI related

var is like object; it's vague, and can change what it really is dynamically.  BUT it is for data types, instead of object types.  


        /* ***  Special variables  *** */

            object ThisIsImportant;                // You can assign values of ANY type to this variable.  
            ArrayList var2 = new ArrayList();      // this ArrayList var has a size which increases dynamically as needed

             * Here's variables, arrays, and using methods 
             * */
//  http://msdn.microsoft.com/en-us/library/e6w8fe1b(VS.71).aspx
            const int DaysInYear = 365;                       // Declare a constant which can't change throughout the program.  

            int32 results;                             // This is how you declare variables, you can declare and set at the same time!
            results = 4;
            string var2 = results.ToString();        // ToString is a method, not a property.  so results.ToString()  NOT results.ToString   ... methods are just functions that can either return a variable of some type, or simply perform an operation (and not return anything)
            results = Convert.ToInt32(var2);           // this is how you cast a string to an int
            decimal numberthing;
            numberthing = 23.79M;                   //  this is how you input the decimal I think... with that M at the end
            int64 sixtyfour;
            sixtyfour = 0x23332333;  // haven't run this code...
            results = (int32)sixtyfour;                     //this will cast it to a int32 value

            Person Marry = new Person();             // Declares Marry  as a "Person" object

            /*                // NOTE THAT THESE 3 ARRAYS NEED TO BE "instantiated" BEFORE THEY CAN BE USED... SO DON'T USE THIS METHOD!!!  int[] tablex = new int[4];  would declare and instantiate the array
            int[] tablex;     // not int table[];     Here's an Array of any size             http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx
            string[,] namesx;               //here's a multi-dimensional array
            byte[][] scoresx; //  here's an array of arrays (jagged)

            int[] numberz = new int[5] { 1, 2, 3, 4, 5 };   // here's an array of ints being declaired AND simultaniusly filled.  
            string[] namezers = new string[] { "Matt", "Joanne", "Robert" };  // here's an array getting filled, and it's size is ommitted because it uses the parameters give to determine a size of 3!

            //names =;
                MessageBox.Show(numberz.Length.ToString() + "  Contents: " + numberz[1]);    // note that .length counts the number of slots, starting with 1

            //names[0, 0] = "hi"; 

            string name1;
            //    name1 = "hahaha";
            //    MessageBox.Show(name1);

            string[,] names = new string[1,1];                // this initializes the array 'names' which has already been declaired.  
                                                              // The size of the array must be specified before you can initialize and use the array 
            names[0,0] = "Dummy string";
            //MessageBox.Show(names[0, 0]);

            //   names[0,0] = "dummy string";

(202b_override class.txt)

You can 'override' a prebuilt class's method (only if it's protected??).  
This means you use a prebuilt class, but make subtle modifications to suit your needs.  
In the example you change the .ToString() method to output a string in a specific syntax instead
of what it would otherwise have done (ie it wouldn't have added that colon).

public override string ToString()
                return First + " " + Last + ":" + ID;

The things I put in the code are sometimes just a list of URLs if they are good enough at explaining the concept. Otherwise I like to keep code examples and explanations in my txt files. Usually I do them too fast for them to be worth publishing, but writing it out helps solidify it in my memory, and gives me a place to return to if I need to refresh that memory.
Was This Post Helpful? 1
  • +
  • -

#4 ShawnStovall   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 11
  • Joined: 26-May 08

Re: Learning Additional Programming Languages

Posted 20 May 2011 - 07:38 PM

Thanks to you both for your help. It has given me a few good ideas about how to approach my next programming language. I had started off by teaching myself C++, then was professionally taught Java (from a new programmer's perspective), and now I know how to go about learning additional languages on my own, C# being the next.
Was This Post Helpful? 0
  • +
  • -

#5 MentalFloss   User is offline

  • .
  • member icon

Reputation: 577
  • View blog
  • Posts: 1,500
  • Joined: 02-September 09

Re: Learning Additional Programming Languages

Posted 21 May 2011 - 02:20 AM

I am learning android at the moment so I will give you an idea of my approach.

First, I come from a C# background. For a while, I knew the language pretty well. That time has passed and now I just know it OK.

When diving into android, I also need to know java which I don't really know except that it's similar to C#. When it comes to the grit, it's going to take me some work to get really knowledgeable to the level C# was.

Couple this with the fact that I need to learn android architecture and their way of doing things and you can see that there is a bit of a steep learning curve.

My plan of attack? I'm working on an actual project from the get-go. It's my cheese at the end of the maze. I add to it slowly and deliberately to build its completion and when there is something that I'm struggling with conceptually or syntactically, I will create a little toy application that isolates that concept.

Case in point, I need GPS functionality in my project. So, my first project was simply to retrieve and display that GPS information.

Next, I need distance calculation. So, I created another project that set a waypoint in my backyard and then my phone showed if I was in range of that waypoint by 50 feet.

Next, I need a radar. This time, I posted a question because the problem is quite large. It will ultimately become another toy application which will eventually be polished and placed into the main application.

When the program is finished, maybe this forum will call me expert in Android too.

Bottom line is to create little chunks of understanding. There's nothing too small but there's certainly too large. Secondly, once you get your toy finished, bask for a day if you can. Just enjoy the success of a new frontier.

Take care and take it easy.
Was This Post Helpful? 3
  • +
  • -

Page 1 of 1