PDA

View Full Version : Programming: From Zero to Hero?



PartisanEntity
December 17th, 2007, 06:03 PM
I have always hoped that I could teach myself how to use a programming language and then perhaps help develop Linux applications.

So my question is, is this realistic? I do not work in the IT field, neither do I have any IT background.

Is there anyone here who also comes from a non-IT and non-programming language environment, who taught themselves a programming language and then actually was good enough to help develop software?

Basically what I am asking is, is it worth investing the time and effort into this or should I stick to testing, translations and bug reporting?

LaRoza
December 17th, 2007, 06:10 PM
Yes, it is worth it and can be done.

I am by no means an expert, in fact, I am a beginner, but by constantly learning, I increase my ability everyday.

You don't have to have a degree, only knowledge. It is said by the auther of "The Cathedral and the Bazaar" that it will take two years of study to be a "hacker", realize the use of the word is not "cracker".

For Linux, C and Python will make a very good combination, and Perl and Java are very useful as well.

Good luck, and here's a little self promotion (well, not really, but it is mine): http://laroza.pbwiki.com

I hope you find it useful, and find programming as fun as I.

(I have less than a year of study under my belt, so to speak, but I am really interested in programming and it is fun to me)

lvleph
December 17th, 2007, 06:16 PM
I personally like the O'Reilly books (http://oreilly.com/) if you are looking for something to read.

I believe when LaRoza said C he/she meant C++.

LaRoza
December 17th, 2007, 06:19 PM
I believe when LaRoza said C he/she meant C++.

No, I meant C.

(C++ is a good language too, but my recommendation to learn C and Python still stands)

+1 for the O'Reilly books, try to browse them before buying, and try to get books that will be useful after your read it. The "Cookbooks", "Programming In...", and "Pocket References" are the most useful.

PartisanEntity
December 17th, 2007, 07:49 PM
Thanks for the input sofar. How did you start teaching yourself LaRoza?

fatality_uk
December 17th, 2007, 07:56 PM
I have always hoped that I could teach myself how to use a programming language and then perhaps help develop Linux applications.

So my question is, is this realistic? I do not work in the IT field, neither do I have any IT background.

Is there anyone here who also comes from a non-IT and non-programming language environment, who taught themselves a programming language and then actually was good enough to help develop software?

Basically what I am asking is, is it worth investing the time and effort into this or should I stick to testing, translations and bug reporting?

Woah steady guys!!! Hi Partisan. I have never had any training as such in software development, but all self taught. I think most people learn a lot that way. I would suggest that you don't jump straight into C/C++/C# etc. They can be quite tricky and even the simplest windowed "Hello World" program can go wrong because you forgot to include "<myhead.h>".

I suggest that you try JavaScript. It's a really good language and can be very powerful. The benefit is that because it's not compiled, you can run a script/program straight from a browser and see the results immediately.

Once you have tried that, then move onto the more structured languages, c/c++ etc but trust me, JavaScript will be a good learning tool to understand the basics of programming.

LaRoza
December 17th, 2007, 08:04 PM
Thanks for the input sofar. How did you start teaching yourself LaRoza?

I was in a book store, with no real knowledge of computers or programming, and I happened to look at the books on programming and web development. (This section is near the science and math part of this bookstore, opposing shelves)

I idly picked up a book, this one (http://www.amazon.com/Sams-Teach-Yourself-HTML-Minutes/dp/067232878X/ref=sr_1_1?ie=UTF8&s=books&qid=1197917826&sr=1-1) and looked through it for no particular reason.

I decided I wanted to learn how to make web pages, so I bought it. (I learned it, obviously)

After learning XHTML, I was interested in other client side technologies, and learned CSS in the process, and started to look into JavaScript. I didn't learn it from this book (http://www.amazon.com/DOM-Scripting-Design-JavaScript-Document/dp/1590595335/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1197917935&sr=1-1) but I wish I did.

Learning JavaScript made me interested in other languages, and since I didn't have the internet at home at this time, I had to buy books. I bought this book (http://www.amazon.com/Sams-Teach-Yourself-C%2B%2B-Hours/dp/0672315165/ref=sr_1_7?ie=UTF8&s=books&qid=1197918021&sr=1-7) and learned C++ (which I don't really use now).

The only books I recommend people buy are reference books and books on other topics, like data structures. The web is the best resource usually, but is confusing, which is why I made my wiki. The only book I recommend of the ones I linked to is the ECMAScript book, DOM Scripting

I learned PHP soon after, don't remember where.

I started learning everything I could online (I saved web pages, tutorials, and applications to my flash drive and brought them home).

I started my wiki, after I felt I had enough knowledge to make it useful, and continue my study and search for knowledge.

lvleph
December 17th, 2007, 08:09 PM
C++ in 24 hours! lol.

I took my first C++ class in 2001. I still wouldn't really say I know C++. Perl, on the other hand...

LaRoza
December 17th, 2007, 08:10 PM
I suggest that you try JavaScript. It's a really good language and can be very powerful. The benefit is that because it's not compiled, you can run a script/program straight from a browser and see the results immediately.

JavaScript will be a good learning tool to understand the basics of programming.

In my opinion, JavaScript would not be the best. If you have good knowledge of XHTML and CSS, maybe, but otherwise, it will be very difficult to use.

Python is even easier, you don't need to run it in a browser, and you can run it interactive without actually writing a script (other languages do this too)

Python has an easier syntax, and less confusing principles than JavaScript.

With JavaScript, it is very unlikely the code will be of any quality or any use. http://laroza.freehostia.com/home/script/script.js is the script for my page, http://laroza.freehostia.com/home That script requires knowledge of OO programming, procedural programming, cross browser scripting, the DOM standard, and valid XHTML code and CSS to work on.

Perl would be much better than JavaScript in this area.

Python in an interactive session is much better than running JavaScript in a browser.

@fatality_uk What is your level of knowledge and experience?

-EDIT That ECMAScript code I linked to is old, and isn't the best, but it is much better than the code found on the typical page. It also tries something that is impossible, because I changed the page, but because of my design, no errors result.

LaRoza
December 17th, 2007, 08:14 PM
C++ in 24 hours! lol.


See the link in my sig for the real story on programming in a set time frame (the article is linked to there)

bobbocanfly
December 17th, 2007, 08:14 PM
I taught myself C#.NET using Intellisense in Visual Studio 2005 and began to realize what was going on.

I am now learning PHP and Python using Google. Pythons documentation is brilliant. A simple google of "Python os.walk()" takes you straight to module page in the Python docs.

If its not in one of the books already suggested, Google really is your friend.

Crashmaxx
December 17th, 2007, 08:15 PM
Woah steady guys!!! Hi Partisan. I have never had any training as such in software development, but all self taught. I think most people learn a lot that way. I would suggest that you don't jump straight into C/C++/C# etc. They can be quite tricky and even the simplest windowed "Hello World" program can go wrong because you forgot to include "<myhead.h>".

I suggest that you try JavaScript. It's a really good language and can be very powerful. The benefit is that because it's not compiled, you can run a script/program straight from a browser and see the results immediately.

Once you have tried that, then move onto the more structured languages, c/c++ etc but trust me, JavaScript will be a good learning tool to understand the basics of programming.

You make a good point that C languages are hard to learn. And I agree they can be difficult. But JavaScript isn't a great place to start unless you want to do web development (even if you do, you may be better off with PHP).

I hear that Python is amazingly easy to use and has very friendly syntax. And it is used commonly in Linux and especially Ubuntu development. If you want an easy language to start with, Python would be it.

And yes you can teach yourself. I have done some formal programming classes, but you end up mostly just following examples in the book and then do the exercises anyway. So just buying a couple good books will give you a great start. I've done more with C++ and C#, but I am going to teach myself C for programming a robot I'm building and to hopefully help with some Gnome apps development. I'm also teaching myself PHP to work on a website I'm making. Once you get down the basic concepts of how programming works, most of learning new languages is learning the syntax and it little quicks and special features.

fatality_uk
December 17th, 2007, 09:03 PM
Wasn't stearing him/her towards web design, but mearly a nice easy, simple to use ansd useful language. Once he/she understands some basics such as functions, variables, passing parameters, loops, error checking etc which can be done in a few weeks with JavaScript, that knowledge will carry quite easily through to C/C++/PERL/Python etc

Mr. Picklesworth
December 17th, 2007, 09:18 PM
I started with Javascript. That language was declared my enemy. Javascript is the Devil's little brother! (The Devil himself being PHP. The devil's incarnate, if you want to know, is CSS. Odd, these are all web things...).
The problem with Javascript is that it has a lack of direction; even having semicolons at the end of a line is not a rule, but rather something you "could do" if you wanted. This type of indecision makes it confusing to learn.

I recommend Python. It's an easy language, but not because it was made for beginners. It is easy because it has a very sensible, consistent design. It is also a nice language because it is extremely flexible. I am currently using Python to build a web site (using Django). It has been used for servers, as a calculator (for huge calculations and tiny ones alike), for games, for 3D graphics (there is a Python library for Ogre)...

Python is also a very popular choice for high level user-space tools in Ubuntu. For example, gnome-app-install is written with Python. There are always little spots for improvement or modification in those programs, so it's nice that they are very easy to work with.
Python is not a fast language, so you won't see it running any high performance games, but it is great for those sorts of tools since Python is straight-forward and strict enough that bugs seem to be much less common. Since its syntax practically forces people to write tidy code, it is much easier to figure out what something does and how to use it.
Being interpreted is a hit to speed in some areas, but it does make concepts like hash tables extremely easy, which ultimately can make programs more efficient than their C counterparts if we were to take into account the effort required to implement Python's optimizations under a different language.
(Hash tables allow you to efficiently look up a complex string assigned to another value, for example "Donald Duck" = "White". While with C you would have to implement it yourself, Python has them built in transparently, by design).

It's also very portable; no need to recompile for different architectures, operating systems or universes. (Actually, no need to compile at all, since it's interpreted!).

My advice is to not spend too much time worrying about theory, and to just dig in to what's out there and start trying things. Programming theory is good, but some people spend way too much time with it. A silly thing, since there is way too much to remember all at once. It's easier to learn as you go along, figuring out bits and pieces as you need them. (Possibly to figure out other peoples' code, or to follow their cryptic-looking suggestions). Whenever you bump into a concept that seems a bit foreign, there's a good chance it's just a word describing something you have wanted (maybe even thought you invented) for a while. Wikipedia is a fantastic resource for many of these things.
A lot of the theory part is about assigning names to code, so that people can be reassured that what they are doing is "right". Otherwise, there is a tendency to worry about whether a bit of code is the good way to do something. If there is an undisputed word describing it, worries go away!

Lastly, this video is really interesting, and a good introduction to how it all works, if you are curious about what your program is really doing:
http://video.google.ca/videoplay?docid=7654043762021156507


PS:
Indent with tabs. Not space. Never indent with spaces. Tabs. Tabs. Tabs.
Don't listen to the crazies. They just want everyone to suffer with inconsistent whitespace.

fatality_uk
December 17th, 2007, 09:29 PM
That script requires knowledge of OO programming, procedural programming Exactly!! Starting with JavaScript means that OOP in C/C++ wont be such a mystery. You can even run a Main() function in JavaScript if you want to be pedantic :lolflag: But hey what do I know ;)


@fatality_uk What is your level of knowledge and experience?
My CV. LOL far too long to post here. Short version. Commercial development in:
C / VB / Pascal / Delphi / BASIC (I go back as far as programming games for C64, ZX81, Oric etc) Web dev AJAX (We called it SOAP back when I used it ;)) I even did a bit of FORTRAN90 as well as COBOL

popch
December 17th, 2007, 09:32 PM
After some dithering I decided to add my 2 cent's worth.

When learning to program, two things are very important:

To learn programming as independently of a particular programming language as you possibly can
Using a 'first' programming language which does as little damage as possible.My main problem in this thread is that I used to be head of programming instructors some thirty years ago. As you might imagine, the best literature of that time is not very much up to date, and the programming languages useful for learning aren't, either. But then, the industry has not all that much changed as some of you might think.

The language perfectly suited for learning at that time used to be Pascal. In fact, it was designed in Zurich (Switzerland) for that very purpose. It is still useful for that purpose if you manage to find an implementation which is not too much bloated or truncated. The manual that went with the language design was very well made. So was the language. There are not so very many things done nowadays in programs which can not be done with Pascal.

Since Pascal is perhaps a bit extreme for a first language in 2007, I would go with Python. It is reasonably lean with a reasonly cleanly defined syntax. Also, the programming paradigms learned when programming in Python are well adaptable to other kinds of languages and programming styles. There are nice implementations, including development environments and debuggers, and programs written in that language can be useful. Also, they can be run in a wide range of environments. Not on the palm, though.

There are heaps of useful programs written in Python. Once you understand what those programs do you can learn very much by reading those which do interesting things. Take, for instance, Pysol (the solitaire suite) or Gnome Sudoko (which is an excellent example for code which is not excellent).

As to learning programming basics and techniques: thirty years ago, I would have recommended books by Knuth or Michael Jackson. I don't know if Wirth also wrote books on programming; I would buy one sight unseen if it turned out that he had. They would be in English and/or German, I suppose.

I definitely do not recommend starting to program with ECMAScript, JavaScript. PHP or any kind of BASIC. I also would not recommend starting with any kind of C.

PartisanEntity
December 17th, 2007, 09:49 PM
Thanks very much to everyone for the input so far. I have looked at various programming languages over the past couple of months and I must say, even as a complete beginner, Python seems the most logical and/or easy-to-understand to me in the way it works. So I have decided to start my endeavour with it. I really hope I can stay committed to this little project and perhaps one day be able to develop or help develop something concrete.

LaRoza
December 17th, 2007, 09:51 PM
Exactly!! Starting with JavaScript means that OOP in C/C++ wont be such a mystery. You can even run a Main() function in JavaScript if you want to be pedantic

?
My CV. LOL far too long to post here. Short version. Commercial development in:
C / VB / Pascal / Delphi / BASIC (I go back as far as programming games for C64, ZX81, Oric etc) Web dev AJAX (We called it SOAP back when I used it ;)) I even did a bit of FORTRAN90 as well as COBOL

Any OO interpreted language would fit that, and Python is such, and is more logical, no browser involved. How would you print in JavaScript? alerts? document.writes? (evil), or the DOM? The DOM is the best to use on pages, but is hardly for someone new.

So you have experience in several imperative languages that are usually compiled and JavaScript (using it with Ajax). No wonder you didn't say Python, Perl, or Ruby.

popch
December 17th, 2007, 09:59 PM
I hope you will be successful and have much fun. Be aware of your Nebenwirkungen: programming is addictive after only a few exposures. Strangely enough, it is as much so when you are successful as when you're not.

And thanks for the nice feedback. You're a fast learner. Or have the members of the staff been told about the new button?

fatality_uk
December 17th, 2007, 10:02 PM
Hey I aint bashing PERL Python or whatever your fave language is. If we go back to the question, without resorting to snorting if someone gives an opinion different than yours :D he/she asked for an opinion on a way to pick up programming from a perspective of someone who has never done any before. I gave mine. Not interested in spending all night arguing the merits of javaScript vs Python with you! Night...

LaRoza
December 17th, 2007, 10:10 PM
Hey I aint bashing PERL Python or whatever your fave language is. If we go back to the question, without resorting to snorting if someone gives an opinion different than yours :D he/she asked for an opinion on a way to pick up programming from a perspective of someone who has never done any before. I gave mine. Not interested in spending all night arguing the merits of javaScript vs Python with you! Night...

You gave no indication that you were familiar with them. They are not a "fave", just better suited for learning to program.

Perhaps you feel offense I have a different opinion than you? I don't understand why, but that is fine....

fatality_uk
December 17th, 2007, 10:19 PM
Last post, no take backs :lolflag: