PDA

View Full Version : How did you learn to program?


TerryP
06-22-2008, 05:24 AM
How did you learn to program?


Perhaps a stupid question but one I wonder about since I'm one of few people in my area that took it up. For me, I have no true idea of why I started to learn programming but this November it will be three years since and two since I've considered myself capable of doing anything worth while...


I started out on the tutorial at cplusplus.com (http://www.cplusplus.com/) with no prior experience. Managed to figure out a starting IDE/Compiler from cprogramming.com (http://www.cprogramming.com/) (Dev-C++ / MinGW). I read an article called teach yourself to program in 10 years (http://norvig.com/21-days.html). I figured, this stuff is rocket science compared to what I knew already, so taking 15-20 years to learn wouldn't be too far fetched for me.


One day I found a tutorial on Perl and got bored after the second section or so and dumped it. I ended up using the manual pages the first time I had to use Perl for a task, although later I would check-out the llama book (http://oreilly.com/catalog/9780596101053/) last year when I wanted to make a new friend of it.

One of the books I bought at a library book sale was the old Java Sourcebook (http://www.amazon.com/Java-Sourcebook-Ed-Anuff/dp/0471148598) by Ed Anuff, which I enjoyed reading about the language and OOP but it made me realize I didn't want to actually write Java code >_>

I've never considered myself talented at programming, starting with C++ was probably a bad idea to say the least. Like chess... Something I enjoy more then excelled at.

At various times, I did a few small programs in C++ to test my understanding of basic things, stuff like an Integer Calculator that must be implemented such and such way, etc.


One day I was coming off a web search and found a thing about using the compiler directly instead of the IDE, and I found it was part of a C Tutorial (http://beej.us/guide/) and read on.

I had always been curious about what C would look like, having been playing with C++ already. The first time I had ever seen some form of C, was the Win32 API -- which had me raising my hands in disgust in nanoseconds. So it was really strange to see that tutorial and I never again looked at the windows api's (and hope to keep it that way).


The authors sense of humor in that C tutorial managed to keep me entertained and I started learning more, C eventually became my primary language.

Learning the syntax of a few languages was easy, actually creating programs was a bit harder. So I concentrated more so on reading and understanding rather then being told off by gcc.


By the time I started to use FreeBSD, I also was scouring Wikipedia as I always do, reading everything of interest (especially computer related). I got curious about how the various programs I was using in /bin:/usr/bin worked. So when I got /usr/src cvsuped, I started to read.

Analyzing bits and pieces of small programs, sometimes copying them to my home directory and fiddling around, recompiling and seeing what happened. I read and read, poking around the source tree -- seeing what was done by people that actually (or hopefully) knew what the frig they were doing.

One day, I started to write a small program after hours that satisfied my opinion that cat is for concatenating files not viewing one file without using a pager/editor. To make it more interesting, I made it able to skim off the top and the bottom of files similar to head and tail.

That's how I learned to use a debugger lol.


Eventually as things happened out, a group I'm involved with ousted their lead admin for misconduct and a friend of mine took over as webmaster. Being the only other person with some programming experience this side of QBasic other then the old admin. I got asked to work on some of the PHP code, a language I never learned or used +S.



Fast forward almost 3-4 years, a several more languages, many more implementing "Hmm, I wonder if ..." programs, and a lot of reading and writing code later and I've learned enough to get my tasks done.


Repetitive tasks usually get handed off to Bourne, quickies to Perl, web pages on first come first serve, and Qt makes me glad that I learned about C++, since I needed it when I learned Python in order to use PyQt lol.


And now that I'm in my friends webmasters boots, if I ever bump into our collective predecessors that did most of the original web work, I would like to shove their collage educations up their hindquarters one line of code at a time :-P


So for me, learning really has been a couple of years of reading and writing code. No teacher, no collage, no courses, just tutorials, documentation, and source code.

Carpetsmoker
06-22-2008, 06:05 AM
MSX2-BASIC + MSX-DOS (Philips edition) by A. Sickler and A. van Utteren.
It's a 1986 Dutch book about, well, MSX BASIC ... I still have it ... Here's a picture:
http://www.clive.nl/detail/12515/
And my dad is (was) a hobbyist MSX programmer, so he though me a thing or two too.

The first program I wrote was with my dad, it sorted a file alphabetically, it was slow, crappy, and didn't prove very useful in the end.
But it was mine, and it was fun.

It was a terrible programming language, major spaghetti code ... A little example:
10 PRINT "Hello world!"
20 FOR i=0 TO 500
30 GOTO 10

There are no subroutines/functions (QBasic, which was pretty similar, did have this) and you had to identify chunks of code by the line numbers (which were automatically printed with the AUTO command) and GOTO them...
And you had to PRAY that you never needed to insert more than 9 lines of code between two other lines, because this would require starting a new "subroutine" at line 50000 or something and a GOTO.

There was also no Syntax highlighting or indentation...

ai-danno
06-22-2008, 06:05 AM
So for me, learning really has been a couple of years of reading and writing code. No teacher, no collage, no courses, just tutorials, documentation, and source code.

That's pretty much been my experience as well. I'm only a part-time programmer, using PERL when I need something that's not out there to complete a dirty task (like DNS hosting migrations from one set of servers to another, traffic-counters per second on router interfaces, live/hosted-IP checkers, etc.)

I've always considered those that program in C and do it full time and churn out the 'professional stuff' to be admired- I'm not sure I've got that kind of patience (not that I'm not patient... just not that kind.)

I chose PERL directly out of this lack of programming patience- I wanted a language that I could get productive on in a short space of time. I'm a network manager, and personally I didn't want to become a full-fledged professional programmer simply to accomplish the dirty tasks that hadn't been solved in the greater community. PERL allowed me to quickly understand what was going on, and how to use previous blocks of code quickly to come up with solutions that would allow me to get back to the rest of my life.

I suppose PHP would be similar, but I just fell in love with PERL.

ai-danno
06-22-2008, 06:11 AM
After reading Carpetsmoker's reply (he replied before I could bang mine out) that I'd be remiss in not mentioning my previous BASIC experience. I started when I was 9 on what I think was a VAX/VMS system in a community college course one summer (talk about intimidating, everyone else was more than twice my age) and then used it on my TI-99 4/A, later on my Apple IIe, and finally on my first PC (an IBM PS/2).

Ah the good old days of BASIC... I really had a lot of fun with that language. It never helped me become a proffesional developer... but it kept my love of computers going, and so I guess it served me well.

Oliver_H
06-22-2008, 03:20 PM
I got some ZX81 without any games, back in the early 80s. Well BASIC was my friend and 1kb of memory my dreadful master :D Later I got some Amiga and bought Matt Dillons (the guy from DragonFlyBSD) DICE compiler as shareware. And there is even a story about Turbo Pascal, dBase etc. ;-) Today I'm using C and try to work with Lisp (out of curiosity) and Python.

ua549
06-22-2008, 04:10 PM
I self taught assembler on a Honeywell mainframe (8k of 6 bit memory) in the mid 1960's.
There was no OS, only a bootstrap loader and lots 'n lots of paper tape.

Later I self taught Algol, Cobol, Fortran and many other languages unique to a given computer brand.

Alas, they are now forgotten. I haven't programmed in decades though I do some scripting as required for my home network.

anomie
06-22-2008, 05:04 PM
Like many of you, I programmed in BASIC as a child. I remember a book I got for xmas that contained a BASIC implementation of the Eliza program. I copied it to my Laser-128 (Apple IIc clone); I remember being impressed with the program's "intelligence" and also wishing that I knew enough to make it smarter.

Anyway, I'm a programmer by uni education and career path. I studied C++, Java, VB, and Cobol in college. Upon graduation in 2001, after the US tech economy meltdown, I managed to find work as a legacy systems (read: IBM mainframe) programmer. I'm still plugging away at it, but for the last couple years I have been picking up sysadmin (FreeBSD / Linux) side projects, and attempting to slowly steer my career in that direction.

sverreh
06-22-2008, 06:51 PM
I took courses in FORTRAN and ALGOL at the university in the beginning of the seventies (sic!). In the middle of the nineties I was required to do a lot of Bourne shell scripting at work, and picked it up from the excellent book "Unix Power Tools". Around 2000 I got interested in Perl; started with "Learning Perl", and continued with "Programming Perl" and "Perl Cookbook". Nowadays I mostly use Perl, and occasionally Bourne shell scripts.

roddierod
06-23-2008, 03:07 PM
When I was 8 or 9 my mom sent me to Computer Camp - up until that point I don't recall ever having an interest in computers or even knowing what one was. The computer camp was at a Radio Shack store and lasted a week, all I really remember from the camp was playing some Oil Well diggin game and really liking it on the Radio Shack CoCo.

That christmas I got a TI 99-4/a. I remember knowing some really dumb BASIC stuff like infinite for loops to print my name. My friend across the street got a Commadore and the he had cool games but the TI didn't have cool games so I started programming in BASIC so I could have cool games like him. The first thing I wrote was Track and Field based on the old Arcade games. I had the Long Jump and the Hurdle events working. I made a one on one Basketball game. Commadore's was call Bird vs. Jordan so I called mine Gerving vs Ewing...it was fun making those.

Then I started learning Assembly because the BASIC graphics where limited to single color sprite animation and I was at least 2 color sprites :)

I've only ever tanked 3 semesters of programming courses in college which included C, Pascal, Fortran, COBAL and VAX Assembly.

Oliver_H
06-23-2008, 04:53 PM
I remember knowing some really dumb BASIC stuff like infinite for loops to print my name.

Yeah the first success *g*

Carpetsmoker
06-23-2008, 05:01 PM
haha, I did that too, and in a pattern too.

That was so cool :cool:

cajunman4life
06-23-2008, 05:44 PM
I studied C++, Java, VB, and Cobol in college.

...

Upon graduation in 2001, after the US tech economy meltdown, I managed to find work as a legacy systems (read: IBM mainframe) programmer.

...

...but for the last couple years I have been picking up sysadmin (FreeBSD / Linux) side projects, and attempting to slowly steer my career in that direction.

Dude, while I was in Afghanistan the company I work for was bought by an Indian company. We're now in the process of "downsizing" and sending a lot of our jobs to the "Indian HQ". The company is championing this as "globalizing our delivery model" and making it sound good for our customers. But anyway, the point is, the two jobs that they absolutely are not getting rid of are AS/400 administrators, and Mainframe programmers (read: COBOL). There just ain't enough of them here in the US, and apparently there are none in India. Apparently not too many people are interested in COBOL and REXX these days.

Now, back on topic. I learned similar to everyone else... when I was 10 years old using BASIC. I messed around a bit in Pascal, Visual Basic 1 (for DOS), and other things. Didn't really pick up C until I was in High School with a TI-89 graphing calculator. Sure, I could attempt to learn M68k assembly... or I could use TI-GCC, the port of GCC for the TI graphing calculators.

Unfortunately I haven't done much programming since high school (short of helping the Network team write a program to help them automatically scan the logs of the hundreds of routers and thousands of switches we support). And lately all I've been doing is shell scripting. But, I would like to get back into it. If only I had the time...

anomie
06-23-2008, 05:57 PM
... the two jobs that they absolutely are not getting rid of are AS/400 administrators, and Mainframe programmers (read: COBOL). There just ain't enough of them here in the US, and apparently there are none in India. Apparently not too many people are interested in COBOL and REXX these days.

I keep reading that with the next wave or two of retirements there's going to be a "legacy skills" shortage in the US. Which is interesting, because - as you said - very few folks starting their tech careers want to adopt that skillset.

TerryP
06-24-2008, 06:12 AM
Who on earth would want to learn COBOL?


Unless you got paid by the line.

dk_netsvil
06-24-2008, 05:08 PM
I got started with Basic in gradeschool making what can only be very loosely called "games" and my old man got me an account on the VAX where he worked and I started learning Pascal and, later C. In highschool I learned some python and *cough* Eiffel and in college the required programming course was in VB and Java was the elective language. Perl and shell scripting were both part of the sysadmin portions of the degree program, which kind of fleshed things out.

ua549
06-26-2008, 02:24 PM
Who on earth would want to learn COBOL?


Unless you got paid by the line.

Back then (1960's) Basic and C did not exist.

If one wanted to work as a programmer the languages to learn were algol, assembler, cobol and fortran.

Even today most mainframes have some cobol programs running on them.

TerryP
06-26-2008, 09:42 PM
A good point but still, I think I would take the assembler any day... punch cards don't grow on trees ;-)

Business_woman
06-30-2008, 11:03 PM
Never have and never will.
Probably too stupid to learn to program

sad but true =/

tonyex
07-01-2008, 07:59 AM
I studied physics so Fortran & Turbo Pascal was a necessary to learn then.
When I moved to computers I used to write some scripting code, mostly for administration tasks ( 2 work less and tech surf more). I use to combine several scripting techniques to write WEBmin like tools and then bought some books when Java was on the move like 10 years ago. Got a job as Java (J2EE) programmer during like 1,5 years, got bored and got back to C-like programing languages.
Reg /T

deemon
07-01-2008, 09:45 AM
I learned to program by modifing password stealing programs and mud/talker codebases in school. Shell script/perl/c stuff.

JMJ_coder
07-01-2008, 05:15 PM
Hello,

My first experience with programming was a class in high school that taught Pascal (TurboPascal 7.0 - to be exact). After that I tinkered here and there, a class in Visual Basic (.NET) and one in engineering programming - I forget what language exactly, but it might have been Basic, too - but nothing substantive until in college I decided to major in computer science.

I learned C++ in college, and shell scripting, too. On tap in my college studies is Java, Assembly, C (that one I am more-or-less on my own with K&R - but it shouldn't be too much different than C++).

I also have to learn now Perl for my job. And I want to learn PHP and HTML (well, at least brush up on my HTML as its been a couple years) to create my webpages.

The languages I most enjoy so far are C/C++ and shell scripting.

michaelrmgreen
07-04-2008, 09:40 PM
I used the book that came in the box with dBXL (dBaseIII clone)

bm1
07-11-2008, 12:24 AM
I had my first taste of basic when I took a class at high school because I like a girl that took computers. Then Uni C++, java, web development (php, javascript, html, postgres).

bm

drhowarddrfine
07-11-2008, 03:11 PM
I'm an electronic engineer. I started out in radio/TV but eventually went to computers for computer graphics (Pixar and Silicon Graphics). Design/build, then program using switches in hex. I've actually used individual wires before, too :) . So assembly was my first language. One job finally forced us to code in 'C' and we hated it. Too high level. (D**n MIT grad boss @ss***).

harisman
09-02-2008, 05:58 PM
Hi

My first steps of programming were when I was child (about 12), after being tired of playing a lot of games, I decided to use my Commodore 64's BASIC.
Some months later I bought the "Simon's BASIC" cartridge for Commodore 64 that was expanding the capabilities of the embedded BASIC to do some more intersting staff :D

A few years later, i bought my first PC with 286 processor and the 287 co-processor. On that period I bought a Quick Basic book and I started learning it...

After some more years, I went to the college and because I was following the job of the Electronic System Engineer, I was forced to learn very well (like drhowarddrfine:) ) assembly 80X86 and low-level C on SCO Unix platform.

After many years of experience working as a Unix sysadmin, I have mastered AWK and I use it for the most of my administrative tasks and I use C and Perl only a few times where I cannot do the job with the help of AWK.

Edit: For the young members and those who didn't remember the Simons' Basic, check out this link (http://en.wikipedia.org/wiki/Simons'_BASIC)

BuSerD
09-06-2008, 05:00 PM
I signed up for 3 programming courses in college over one calendar year; Beginning C++, Advanced(not really) C++ and Java. Java gave me instant gratification because of the gui(s) that we'd also create with the applets but it always felt dirty to me. C++ felt different, cleaner and the gratification came from getting the most done with the least amount of code. My most memorable assignment was to create a virtual keyboard(C++ and Qt3). While the task only specified alpha-numeric keys I completed that in about 20 minutes with the help of ascii values so added more keys to address the everything other that the alt and control keys(i had no idea what they really did). My instructor was impressed with how much I had learned in a couple of weeks so my first computer related paid job was at my university as a jr programmer and professor's technical aid. I don't currently program all that much but all that learning is put use everyday via scripting. I am a technical support specialist(Windows, Redhat, CentOS and FreeBSD) in my day job so sed and awk is used for almost every investigation ticket that I address.

I never learned basic but did do visual basic programming for a year before i learned about open source/platforms. Trying to learn python and ruby now but in the end i'll choose one of the two based on it merit and use it for development of a couple of sites i have in mind. php is not in the running this time. Maybe later though.

PS. My wife (CS major) introduced me to C programming on FreeBSD at a local BUG about 8 years ago but I only use straight C when forced.