LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Question for programmers/occasional programmers (https://www.linuxquestions.org/questions/programming-9/question-for-programmers-occasional-programmers-512231/)

Robert Diggs 12-20-2006 07:46 AM

Question for programmers/occasional programmers
 
Hey,

I just wanted to know what languages you guys learned first, what were the first programs that you programmed and what your overall experience was?

I'm looking to get into programming and just wanted to give myself a direction and an idea of what I'm getting into. Your input is greatly appreciated.

Thanks,

Brandon

asommer 12-20-2006 08:07 AM

I'm not really a programmer, but I've written quite a few scripts. I guess you could call them little single task programs...heh

Anyway, the first scripting/programming I learned was bash scripting. I started out reading the Advanced Bash Scripting guide:

http://www.tldp.org/LDP/abs/html/

And went from there. It may not be the best for an absolute beginner, but I believe there's a book Linux Shell Scripting in 24 hours or something close to that. That might be a better place to start, depending on how familiar you are with variables, if statements, and that sort of thing.

From there I learned VBScript, because I was admining a lot of Windows crap. Recently I've started learning Ruby which is a really great language to start with in my opinion. In my new job I needed to write some Perl utilities for ldap and db maintenance and I found that learning the concepts of Ruby helped in learning Perl. Even though Perls very different in some ways, there's a bunch of similarities.

I think Python will be the next thing I'll try.

That's my 2 cents anyway.

MOS JEFF-INITELY 12-20-2006 08:30 AM

I recommend you learn Java (for object oriented programming) and C first ..
I definitely suggest learning object oriented techniques and methodoliges, I would not learn scripting first as it has a different syntax and might confuse you a bit when you start with full languages. I find it is easier to go from programming languages to script rather than vice versa. Although Perl is a good language to use as a transition language as it is a scripting language but it is very similar to C and can also use objects (Perl is also fairly similar to PHP).

good luck .. and remember to understand .. dont memorize

Tinkster 12-20-2006 11:47 AM

Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.

hvc2 12-20-2006 08:21 PM

If your running linux then learn bash,sed and awk. Their what tie your linux system togather. If your your interested in customizing your system then youll do it in bash. These progs, particularly sed and awk will introduce you to regular expressions which are used pretty much the same form in all languages.

The syntex of bash is the same as what youll start with in perl, python, php and ruby.

graemef 12-21-2006 03:44 AM

The first langauge I learnt was Basic on an old black box from Research Machines and a tape recorder. I forget what the first program was but I do remember spending quite a lot of time writing a program to simulate a fruit machine, three lemon and the payout was in virtual pennies.

What language should you start with? I honestly don't think that it matters, but once you are comfortable with one language start a different language. For example C is a procedural language so if you were to start with that then select an OO (Ruby, C++, Java) or a scripting (bash, Perl) language next.

The most important thing is to enjoy programming.

Tinkster 12-21-2006 04:36 PM

I must say that I found the step from procedural to OO paradigm quite
hard, and sometimes wish I had done OO first ;} ... procedural to me
comes much more naturally ...


Cheers,
Tink

taylor_venable 12-21-2006 04:58 PM

Quote:

Originally Posted by Robert Diggs
I just wanted to know what languages you guys learned first, what were the first programs that you programmed and what your overall experience was?

First I did Visual Basic, and actually wrote a couple apps for my High School using it. If they haven't been replaced yet, they're sorely in need of it now (that was VB6, some six years ago). Then I learned C++, also in high school. Purdue taught me Java, which I disdained (still do, actually) although that opinion is probably partly a product of the environment. I used to hate Unix too, until I started learning Slackware. Then I learned C at Purdue, which was tremendously fascinating, and the big project that came out of that was a Unix-style shell.

In the intervening three or four years since then, I've learned lots of languages (Perl, Python, Ruby are the ones I use most), but then again, I'm a language guy. The ideas behind the languages are my primary computing science interest. That has lead me to more theoretical languages, and now I'm focused on functional ones: Standard ML, OCaml, Haskell, Scheme, Lisp, Erlang. Started Lisp first, learning from Emacs, but Haskell got me into the ML family and style.

I prefer the ML stuff to the Lispy stuff, partly because I can't negotiate the differences in CL implementations yet, and partly because I prefer the typing system found in ML languages. PLT Scheme is really nice environment, though; I've actually done a few projects for class in there (one of my professor's is a great guy who'll let you use whatever language you want for some of his projects -- that's fantastic for a guy like me who loves to dabble in everything).

Right now I'm using FPL for whatever I can, and I think that for most of the stuff I do, functional languages work best for my mindset. But if you're starting out in programming, in general, it's not where you start that counts. The bottom line is to generalize what you're learning so you can apply it to any language. Learning a lot of languages helps you do this, so you can sit back and go, "Aha! So list comprehensions work like this in Haskell, that's similar to this idea from Python!" or whatever. Then you'll be good at programming in general, and can apply what you know to any language, old or new.

And as far as applications go, you can pretty much write anything in any language, provided you're willing to put enough effort into it. Yes, text processing is easier in Perl than in C. But bit twiddling is easier in C. Concurrency is a snap in Erlang, but most people will find Java more useful. Database connectivity is easier in Java than in Erlang. GUI toolkits are available for almost any language. The best way to get started, IMHO, is to try to write the same thing in every language you know. How do you implement a binary tree in C++? How do you do it in Standard ML? Understanding the similarities and differences makes a very informed programmer, even if you never end up using SML in your work. The fact that you're stretching your mind to solve problems in different ways is what counts.

Caesar Tjalbo 12-23-2006 09:19 AM

Basic, Pascal, C, C++, Cobol, C# and a few specialized languages in between. I can agree with taylor_venable: it's not so much about a specific language but about the concepts; many are shared by other languages.

I can relate to Tinkster's remark too: I found it difficult to grasp OOP with only procedural experience. I'm not sure if it's better to start with OO because I think making simple programs with some variable juggling and simple control of flow is easier done in a procedural way. Procedural comes more natural to me too.

I'm currently learning Python. Knowing both OO and procedural approaches is very handy: I write my Python shell scripts mostly in a procedural way and GUI apps OO.

My favorite program to start with in a new language is Tic Tac Toe :D
And usually more than once: first to learn the language and know how to program a GUI on a very elementary level, after a while again to try a different approach to the logic and with a more elaborate GUI. The amount of work and knowledge required is fairly small while I do get to see a lot of basic language elements and get a feel for the syntax.

sundialsvcs 12-23-2006 07:55 PM

It's good to be "a languages guy" (or gal).

Programming languages are a basic tool of your trade, and all of them have the same purpose but not the same approach. The differences in approach are extremely informative.

(Hewlett-Packard 2000 Access Basic. Eight lines long. Took three months to write it using only a pocket-reference card. It (the program...) had a bug in it.)


All times are GMT -5. The time now is 11:23 AM.