PDA

View Full Version : How to learn programming?



mxboy15u
April 21st, 2009, 08:55 PM
I am in desperate need of a hobby, and I have decided I want to learn a programming language of some sort as a hobby. I am not looking to do anything particular, but maybe some free-lancing on the side would be nice so try to pick one that is useful to someone. What is a good beginner language to learn? How do I go about learning it? Are there open-source compilers (or whatever the language requires) that will assist me in writing this language?

Thank you for your help.

ntowakbh
April 21st, 2009, 08:58 PM
I am in desperate need of a hobby, and I have decided I want to learn a programming language of some sort as a hobby. I am not looking to do anything particular, but maybe some free-lancing on the side would be nice so try to pick one that is useful to someone. What is a good beginner language to learn? How do I go about learning it? Are there open-source compilers (or whatever the language requires) that will assist me in writing this language?

Thank you for your help.

Python is probably the best language to learn as a beginner. It is much easier than others. I know of a free ebook I used that helped me learn python pretty easily. I'll see if I can dig up the link for you.

Edit: http://www.swaroopch.com/notes/Python <-- A Byte of Python

I learned the 2.x version of python last year.

omar8
April 21st, 2009, 09:01 PM
Learn:
PHP
MySQL
Java -> AJAX

Firstly, they are easy, secondly, web based applications are becoming more popular.

mxboy15u
April 21st, 2009, 09:18 PM
So for these languages, how are they programmed and compiled? What software do I need (windows or Linux).

JK3mp
April 21st, 2009, 09:57 PM
So for these languages, how are they programmed and compiled? What software do I need (windows or Linux).

Python uses the python interpretor. Which comes in about every distro of linux. In windows you would have to install it. As far as PHP AJAX and all web based langauges. (Aside from Java and Flash im not sure) Can also be done in linux. You can also do these in windows but alot more installation needed on windows. To run PHP just make sure you install a webserver on your box.(Apache for example) and PHP from repositorys or go to add/remove option in ubuntu. Then just load your scripts to the appropriate directory on your drive that your webserver is running and code away. Also you can simply just upload to a free web host or if you own an account on a web host to test them. Less setup but annoying constantly uploading and changing uploading again etc.

JK3mp
April 21st, 2009, 09:59 PM
Also perl is a simple programming language too. But python can be a OOP(Object Oriented Programming) language which can be a little more helpful. Web based languages, php html/xhtml/css, asp etc. are probably your best bet for easy freelance work.

MaxIBoy
April 21st, 2009, 10:01 PM
How to learn programming? You have to love it to begin with, before you even know it. You need to see the world as a bunch of interesting problems to be solved, not as a bunch of confusing problems for other people to solve. If you're that kind of person, chances are you're a programmer already. You just don't know a language yet.

I'd suggest starting out with Python, because it's a very clean, elegant language which will do almost anything you could ask from it.

Stay away from Perl as a first language, it's too easy to write bad code in Perl.

lisati
April 21st, 2009, 10:05 PM
Python might be good to check out. I haven't used it myself (yet), one of it's advantages is that it comes in versions for Linux and Windows.

A basic knowledge of HTML might also be useful: Open Office Writer (another cross-platform product) can be used to quickly knock up basic web pages.

One of the "C" family of languages might be worth a look too.

MaxIBoy
April 21st, 2009, 10:25 PM
Python might be good to check out. I haven't used it myself (yet), one of it's advantages is that it comes in versions for Linux and Windows.

A basic knowledge of HTML might also be useful: Open Office Writer (another cross-platform product) can be used to quickly knock up basic web pages.

One of the "C" family of languages might be worth a look too.
I'd recommend learning C (or C++) as a second language. Once you understand the basic patterns of a programming language, you'll be better prepared for all the details you'll need to look after in C. It's too easy to worry about the details instead of the program as a whole.

TBOL3
April 21st, 2009, 10:51 PM
No, learn LISP.

http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/CourseHome/index.htm

Yes, there is little (well, I can't think of any) practice applications that aren't easier, and better, to do in other places. But you will learn more about how to think in the right way, rather than learning a random syntax.

linux4life88
April 21st, 2009, 10:58 PM
I would recommend C++, try Programming in C++ by Timothy B. D'Orazio. A lot of languages are very similar to C/C++ so once you learn this language you can pick up many other languages very easily. Also, the Linux Kernel is written is C, so if you learn C++ you can maybe work on the kernel.

DOS4dinner
April 22nd, 2009, 12:09 AM
IMO, I'd go with C++. I recommend "Beginning C++ game programming" by Michael Dawson. Even if you don't want to make games, it is still an excellent beginner-friendly book.

schauerlich
April 22nd, 2009, 12:17 AM
http://ubuntuforums.org/showthread.php?t=667422

lovinglinux
April 22nd, 2009, 12:20 AM
A good place to start is the Programming Talk (http://ubuntuforums.org/forumdisplay.php?f=39) forum. Don't be afraid to post there because you are a beginner programmer. A lot of people is, including me. I started to compile on Linux yesterday and the Programming Talk stickies (http://ubuntuforums.org/showthread.php?t=1006662) and threads were a great help.

There are more related forums here (http://ubuntuforums.org/forumdisplay.php?f=310) for specific topics.

I would suggest starting with shell scripting (http://en.wikipedia.org/wiki/Shell_script), which is basically a command or a series of commands saved as a script. The nice thing about shell scripting is that you can automate a series of tasks you perform on your machine on a daily basis. When I switched to Linux a few months ago I was afraid of the command-line and didn't even know they could be saved as scripts. Now I love them and I have a lot of scripts on my machine, that perform several different tasks. For example, I have created a Firefox media center extension (check my signature) that has TV recorder, Electronic Programming Guide, Playlists Manager and other cool stuff. The interface uses another languages (xul (http://en.wikipedia.org/wiki/xul) and java (http://en.wikipedia.org/wiki/javascript)), but all the functionality is performed by shell scripts (bash (http://en.wikipedia.org/wiki/bash)).

IMO, the advantage of starting with shell scripting is that you will also learn a lot about your system and about command-line (http://en.wikipedia.org/wiki/command-line).

Once you are familiar with the shell, then you could go for something like Python (http://en.wikipedia.org/wiki/Python_(programming_language)), with which you can create interpreted language scripts (http://en.wikipedia.org/wiki/interpreted language) or compiled programs (http://en.wikipedia.org/wiki/compiled languages).

Then you could adventure into C and C++.

Delever
April 22nd, 2009, 12:50 AM
No one answered how to actually learn it :) Given certain language, HOW do you actually do it?

I personally associate program I write with walls and running. My program is walls, and runner is not yet here until I start it. Functions are like doors, classes are like rooms, etc. It also works fine with multiple threads.

Well this sounds kind of silly, I don't think about doors/walls when programming, but this is where (I feel) these concepts are grounded.

So I would suggest finding a way to imagine running program when writing it.

lovinglinux
April 22nd, 2009, 12:53 AM
No one answered how to actually learn it :) Given certain language, HOW do you actually do it?

I personally associate program I write with walls and running. My program is walls, and runner is not yet here until I start it. Functions are like doors, classes are like rooms, etc. It also works fine with multiple threads.

Well this sounds kind of silly, I don't think about doors/walls when programming, but this is where (I feel) these concepts are grounded.

So I would suggest finding a way to imagine running program when writing it.

You could also watch "Matrix" before starting to code :)

dspari1
April 22nd, 2009, 12:54 AM
I heard that C# is an excellent language to learn. Much like Java, it is a cross platform programing language due to the Microsoft-Novell deal that includes interoperability between .NET and Mono.

http://mono-project.com/Main_Page
http://en.wikipedia.org/wiki/Mono_(software)

RiceMonster
April 22nd, 2009, 12:57 AM
C and C++ are something you should definitely learn, but I would not recommend them as your first language as they may frustrate you. I recommend something easy to pick up like Python as your first language.

As for how to learn, I'd say take a class or something. I know I personally don't learn well just from a book.

samjh
April 22nd, 2009, 12:59 AM
I am in desperate need of a hobby, and I have decided I want to learn a programming language of some sort as a hobby. I am not looking to do anything particular, but maybe some free-lancing on the side would be nice so try to pick one that is useful to someone. What is a good beginner language to learn? How do I go about learning it? Are there open-source compilers (or whatever the language requires) that will assist me in writing this language?

Thank you for your help.

If you used the SEARCH function, you'd realise there is a Programming Talk forum here: http://ubuntuforums.org/forumdisplay.php?f=39

Read the STICKY threads in the forum. They answer everything you could possibly want to know about which programming language you could learn and where to find resources for learning them. Carefully look at the links in the FAQ thread (http://ubuntuforums.org/showthread.php?t=1006666). Notice I said "could": this is because nobody can tell you which programming language to learn. You have to look at the information and decide for yourself.

And as I point out in my signature, use the search function and Google for answers before posting a thread about it. Questions like yours have been asked dozens - perhaps hundreds - of times already.

Good luck. :)

mxboy15u
April 22nd, 2009, 01:51 AM
If you used the SEARCH function, you'd realise there is a Programming Talk forum here: http://ubuntuforums.org/forumdisplay.php?f=39

Read the STICKY threads in the forum. They answer everything you could possibly want to know about which programming language you could learn and where to find resources for learning them. Carefully look at the links in the FAQ thread (http://ubuntuforums.org/showthread.php?t=1006666). Notice I said "could": this is because nobody can tell you which programming language to learn. You have to look at the information and decide for yourself.

And as I point out in my signature, use the search function and Google for answers before posting a thread about it. Questions like yours have been asked dozens - perhaps hundreds - of times already.

Good luck. :)

Hard to see your signature unless you post to my thread huh? What a weird chicken or egg scenario.

directhex
April 22nd, 2009, 08:36 AM
I heard that C# is an excellent language to learn. Much like Java, it is a cross platform programing language due to the Microsoft-Novell deal that includes interoperability between .NET and Mono.

http://mono-project.com/Main_Page
http://en.wikipedia.org/wiki/Mono_(software)

It's cross-platform because .NET is a published standard, like C or C++. Mono was able to run files compiled with Microsoft's compiler, and vice versa, back in 2002, years before Ximian were bought by Novell and even more years before Novell's deal with MS

samjh
April 22nd, 2009, 11:58 AM
Hard to see your signature unless you post to my thread huh? What a weird chicken or egg scenario.
Don't try to deflect. You know my signature is not the point of my post.

My point is this: research. Research is a big part of learning to program. There are a lot of existing resources on this site about learning to program, different types of programming languages, programming tools, links to tutorials, recommendations for programming books, and much more. Even very experienced programmers need to do constant research to solve programming problems. But you have to make a personal effort to find the answer for yourself. The search function is very effective and easy to use.

I used to search function, and typed in the words "learn" and "programming". The very first link is to the Programming Talk forum, as are five other links on the first page. Two of those links ask "what programming languages are left for me?" and "easy way to learn programming". If you only search the Programming Talk forum, four links on the first page of results relate to your question. If you go to the Programming Talk forum, you'll find two stickied threads with dozens of links on learning to program and using programming tools.

If you Google "how to learn programming", the very first link is an article answering that very question!

So help yourself first. When you choose a programming language, and hit snags during the learning process because a concept confuses you, or your code doesn't work no matter what you try to do, THEN post a specific question about your problem. Generic questions like "How to learn programming?" are not helpful to you or to other users.

cmay
April 22nd, 2009, 01:03 PM
when i decided to learn how to program i went to the library and found the c programming language by brian w kernighan and i been struggling ever since to learn that language as good as i can.

but i think it is very important that one can figure out for him/herself how to install the tools needed to begin and then work trough at least a chapter or two in a tutorial o book before asking for adwise or help.

especially if one want to earn money doing programming at some point in time it is important to be able to figure things out for one self.. i would never hire anyone for anything that has to ask random people on random forums what to learn and what to do.

i been working with farm animals a lot before i got sick and am now early retired but i am still used to having to think for my self and make up my own mind so when i started out wanting to learn programming as example i just found the information i wanted on the library and made a long time commitment to learn this one language sometime and as a hobby i do not care if it is today or in a year i reach that goal.

but i am not going to give up on it ever when i first made a decision. this is for me a very important way of handling one self that is usefull not just in terms of learning to program or fish or what ever but a lifelong lesson that is in fact one of the singel most valuable lessons to be learned in life.

i actually think that this is the very first thing one should need to learn before anything else. if for no other reason then at least for ones own benefit.

ashmew2
April 22nd, 2009, 01:18 PM
IMO , as many others have already said , start with Python.

I wanted to start with Python myself but since they were teaching C++ at school i had to stick with C++ because of syntax differences and stuff..But I'd highly recommend you try Python first if you have the chance.Make the most of your freedom xD

mxboy15u
April 22nd, 2009, 01:20 PM
Thanks, I downloaded that book and played with it last night! Already having a good time.

ashmew2
April 22nd, 2009, 01:20 PM
when i decided to learn how to program i went to the library and found the c programming language by brian w kernighan and i been struggling ever since to learn that language as good as i can.

but i think it is very important that one can figure out for him/herself how to install the tools needed to begin and then work trough at least a chapter or two in a tutorial o book before asking for adwise or help.

especially if one want to earn money doing programming at some point in time it is important to be able to figure things out for one self.. i would never hire anyone for anything that has to ask random people on random forums what to learn and what to do.

i been working with farm animals a lot before i got sick and am now early retired but i am still used to having to think for my self and make up my own mind so when i started out wanting to learn programming as example i just found the information i wanted on the library and made a long time commitment to learn this one language sometime and as a hobby i do not care if it is today or in a year i reach that goal.

but i am not going to give up on it ever when i first made a decision. this is for me a very important way of handling one self that is usefull not just in terms of learning to program or fish or what ever but a lifelong lesson that is in fact one of the singel most valuable lessons to be learned in life.

i actually think that this is the very first thing one should need to learn before anything else. if for no other reason then at least for ones own benefit.

Well I agree with you primarily regarding the fact that people need to understand and figure out things for themselves in life..But the OP's just a beginner , so cut him some slack ;)

cmay
April 22nd, 2009, 01:53 PM
But the OP's just a beginner , so cut him some slack
i was also a beginner once and still am. i still figure things out for my self and i did in fact intend the adwise giving as a helpful suggestion. if he as stated want to make a living at this then i believe the adwise giving was a good adwise for many . i dont know the OP so i just figured that in anycase this question is asked and answered a lot on these forums so if not OP can use it then maybe some others can.


i maybe could have placed a smiley somewhere here and then to show i dont mean it in a harsh and rude manner :)