Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Lee, I agree that an IDE can be overkill, but how about a good syntax highlighting editor then?

I definitely think a good editor is crucial, but I do try to stick to ones that are "everywhere". I prefer vim. I can SSH to an OS X, Linux, HP-UX, Solaris, etc. machine and open vim or vi, bang out some code, compile with gcc and run it. I can't very well do that with, say, XCode.

-Lee
 
Not to hijack the thread, but to anyone who would know, which would be better for beginners, C++ or Python?

I'd start with either Python or C (not C++, forget about objects for now). Have a simple goal in mind. Start with the usual "hello world". Maybe write a program that adds a few numbers together. Write a number guessing game that asks you to guess the number and tells you if you're too high or too low.

Well the instructors leave WAY TOO many gaps in explaining certain things. They forget key elements and end up leaving everybody in the dust. The next day you show up you think to yourself, "I'm sorry, was there a class yesterday after I left? Do they have classes at 11?"

I think part of the problem (as I mentioned in my previous long-winded post) is that the people who teach these classes have mastered the language itself as well as the concepts of programming -- they are fluent in the language. They can forget that some concepts may be new to someone who's never seen it before. It's not your fault, and I wouldn't be afraid to ask if the instructor skips over something. If they don't stop to explain it, then they're not a good instructor. You can tell them I said so. ;)

I don't know how anyone could become an effective programmer from books alone. I've read ahead in my book and it all seems foreign to me, until my instructor explains it.

I would read it out of a book, then go to my compiler and try it out. Then I would say "Ok, now what if I did it this way?" I would experiment, a lot, and that's really where all my learning came from.
 
It is quite an interesting question and I am sure the answers are very different depending on what year you entered the world of programming!

I started out with a casual interest in programming, so started playing with various versions of BASIC on different computers (this was early 1990s). I did a course in BASIC and learned a lot of useful things, but then I went to university and did Computer Science. Suddenly everything was Object Oriented and required a bit more learning as it was not that easy switching from procedural to OO overnight...

Having said that, I found a full-time university course provided enough for the beginner to become proficient as a programmer, but those who had no interest prior to the course really needed to spend some time playing with code in their spare time.

The main language we were taught for learning the main principles was JAVA. I would recommend this because it was neither the easiest nor the hardest language, but gave you a good grounding. We also programmed on Windows, Unix and Mac using JAVA - to show it's portability. I have since not used it professionally, but it taught me well!

From then on, I was able to easily pick up C++, C#, PHP and other languages.

I would definitely recommend getting a book and working through it. That is how I initially learned. I have also used books throughout my career when learning something new.

A degree course is very worth while in my opinion, but not everyone is in a position to do a full-time 3 to 4 year course.

On the other hand, I know people who are successful programmers and they learned entirely from the back of computer magazines and the odd book (and the Web of course).

I think if you have the interest and put the time in, you should be able to become a reasonable programmer in your spare time. Getting recognized by future employers may be more difficult without a qualification, but it depends what area you go into...
 
I definitely think a good editor is crucial, but I do try to stick to ones that are "everywhere". I prefer vim. I can SSH to an OS X, Linux, HP-UX, Solaris, etc. machine and open vim or vi, bang out some code, compile with gcc and run it. I can't very well do that with, say, XCode.
And you've lost the beginning programmer with the alphabet soup. ;)

Personally, I would not recommend vi/vim for a beginner. I use it plenty myself, but it does not come naturally. For me it depends on what I'm trying to get done. Something quick & dirty, reach for nano, more involved load up emacs or vim (if emacs is not available).

For someone just starting out I think something like TextWrangler or Notepad ++ (if you have to code on Windows) would be more familiar.

FWIW I am not a professional programmer by any means, but I do write plenty of code as part of my job. For me It's all about getting something else done with the code I write.

B
 
Good evening, morning, or afternoon, depending on which part of the world you are at.

To all of you paid, professional, developers, how did you begin? Did you pick up a book, search the internet, or go to school? t

Became interested while still in high school, read some books and had buddies to work with, kind of an informal club. Then later degrees at University in Computer Science and Electrical engineering. Graduated in 1982. Then works on a series of projects, including several air defence radars, databases and operating systems some embedded firmware to control a cameras and now in rocket telemetry.

Basically to get anyplace (other then coding simple web based apps) you are going to need a four year degree AND also know something about the application areas where you code. For example if you are working as a programmer in banking you are going to have to know banking. If you are going to write code to process radar data into images you better know radar image processing and so on and so on...

So, study both software. NOT just some language but how to write and design software on a large scale, how to manage software development AND also study some application area you like, be that business, engineering or art.

The intro books will just have toy projects inside and same with the "101" level lower devision classes at a university. You need to do those but you also need to work are real-world size software. That means things that take a dozen people a couple years to write. What you might do NOW is find a good Open Source project. Some that can use help a thePostgreSQL data base, Always the BSD project and some of the major well used and know apps like say Gimp. There are more but pick one or two that are well known and well used and have a large group already. This teaches to working in a group a skill not taught in books
 
On the editor front, I use TextWrangler on Mac and TextPad on Windows for quite a few languages.

Obviously if you were a .Net programmer you would use Visual Studio, which is (unfortunately) the best IDE in the world, but maybe one day they will make something as good for other languages! Obviously you can run it using Parallels on the Mac.
 
Basically to gt anyplace (other then coding simple web based apps) you are going to need a four year degree AND also know something about the application areas where youcode. For example if you are working as a programmer in banking you are going to have to know banking. If you are going to write code to process radar data into image yo better know radar image processing and so on and so on...

This is fairly true, but I think things are slightly more simple (although essentially you would be learning two areas. This is how it worked for most people on my course:

Study Computer Science, then get a graduate job in an industry of your choice where you learn the industry and after a few years are a programmer conditioned to a particular industry.

It is also quite common for people from industry to get into programming at a later stage as they bring that industry knowledge with them. The only problem with doing it that way is that often it is to tempting to not learn to program properly!
 
There were people that didn't even show up to class for the last meeting because they couldn't figure out the homework. Fortunately, I did figure it out and was able to help a few people. To me it seems that programming class is so much more involved and the students are left flapping in the breeze more than any other course I have taken.

Why? Because with software you have to uderstand well enough to make stuff that works. It either runs or not. In history or english a score of 95% is "good enough" but in any kind of enginerring for example dam buillding the dam either holds water or it breaks and floods the city. Even simply wireing a light bulb to a switch.. There is no "95% working".

But later you will find that what they are teaching you in the class is like when a novelist or playwrite learns to use a work processor. A programming language is just the tool yo use it is not the job itself. The Job is knowing what to write and how to figure out what to write and how to test it. But for the first few years you study the tools then later you pick up the rest.

The best way to learn is to jump into real world projects as soon as you can. Even if you can't yet write the code you can test and document it.
 
Wow! I didn't expect so many replies. I love to solve problems and I don't mind spending hours upon hours figuring out the solution.

Last week, I must have spent 14 hours trying to write a program that analyzes the strength of a beam starting at 2x2. The program would run three tests, and when they all passed, it would output the size of the beam needed for the desired load. This seems simple enough, but it was kicking my butt.

I try to avoid looking for the answers to my assignments on the internet or by asking someone who is just going to flat out tell me exactly what the solution is. I feel like that is cheating and it doesn't really help me at all.

It's funny that some of you say that something will "click". After deleting all of my code 50 times or more, the light bulb turned on and it took me probably 30 minutes to start from scratch and write the program. I was quite proud of myself to say the least.



This thread has really given me some insight and inspiration. Programming is what I want to do, either for money or not. It feels good knowing that most of you have struggled sometime in the beginning of your time at the university. Thanks for all of your advice so far.

Pat
 
C++

Go on learn c++, I have been doing C++ for like 1 year now and you can learn much just by reading books and trying out things even if it may feel that its useless, in c++ there are many ways to do the same thing, the point is to learn to do it the most readable and non complex way. Think before you start to make, think different ways to do the job and pick the simplest, and with simple I mean you shouldn't do thing with 20 lines of code when you can just do two. Language isn't complex at all just get a decent book and read, watch tutorials maybe on youtube? Now I am learning objective C for my first week and I have to say when you know C++ this isn't so hard at all, but still if I don't understand something I ask it. And I learned the same way as I explained, sometimes it felt so boring to make command line tools, but I forced myself to do them and it has payed off now I know things good and do complex things.
 
Began by reading books which explained programming concepts (long before I, or anyone I knew could afford a personal computer). My secondary school began installing some Apple IIs just before I finished there, so I had a few months playing around with graphics programming - a very satisfying way to learn programming, IMO!

Then studied Computer Science in college. Started working with Apple, initially just testing & triage; so kept working on programming at home just to keep my skills up to date.

Eventually got a programming job (lasted a couple of months until the mass redundancies, damn you Tim Cook! :p ) and moved on to Motorola and other companies since..

Very little I do now, I learnt in college; it's almost all "learn on the job". But it does give you a useful foundation, and a shot of confidence that you can learn a new language/framework/platform if you need to.
 
My first programming experience was Object LOGO as a kid, which I learned from a book with my brother. All my memories of it are rather fuzzy, but I expect it laid some sort of foundation.

In high school I started learning C++ on my own in an independent study programming thing (from Stroustrup's book! I'm amazed I didn't give up on programming, heh). Once a week a professional java programmer would come in to help me out; his C++ wasn't great, but it was easily enough to help me.

Once I ran into pointers I got fed up with C++ and switched to Java, then took a summer class at a local community college. I did the independent study thing for another two school years, tutoring some friends who got interested in it as well.

Somewhere along the way (Summer after junior year of HS I think?) my brother picked up ObjC+Cocoa from somewhere and started doing nifty things in it. I grabbed Hillegass's book and learned it out of self defense ;) First I wrote a front-end to 'locate' as a learning project (took an afternoon, even for a noob like me). Then I tried to write a side scrolling game, but that quickly got out of hand; they're rather complex.

My first "real project" was Orbital (http://home.comcast.net/~catfish_man/), which took me most of my senior year of HS.

I went off to college as a CS major to be, but found most of the material rather trivial (wasn't a particularly good school). However, when I went on the #adium irc channel to ask a question I ran across a guy working on a chess plugin for it. I played chess competitively for a while, so I decided to test it and see if I could improve it. Sam (the original author and I) worked on the games plugin for quite a while, and had it working well, but he burned out on programming and I got distracted by working on Adium itself.

I dropped out of college during my freshman year, and spent most of my time working on Adium. I started a (very small) freelance mac tech support company to keep my parents satisfied that I was doing something, but regarded it basically as a minor distraction.

I attempted to go back to school a few times, taking part-time classes at Portland State, but for various reasons (ADD among them) I didn't get much out of it. I did like my data structures class though; that was good (in particular the textbook was used was good: the C++ edition of http://en.wikipedia.org/wiki/Walls_and_Mirrors). Near the end of the third class I took there, I got in contact with the CTO of Jive Software when he dropped by #adium to ask about our involvement in Google Summer of Code. I noted that I was in Portland (Jive is based there), and he asked if I wanted to drop by to discuss the open source instant messaging landscape and such.

That led into an internship at Jive from December '06 to January '08, at which point they hired me as an engineer. By August '08 the parts of the software I worked on had been effectively canceled, and I was laid off. I went back to working on Adium :)

By that point though, I had tons of friends in the business, and a pretty great resume (other than the education section!), so I wasn't particularly concerned. Took me quite a while to find a new job, but that was mostly due to not looking very hard.
 
Last week, I must have spent 14 hours trying to write a program that analyzes the strength of a beam starting at 2x2. The program would run three tests, and when they all passed, it would output the size of the beam needed for the desired load. This seems simple enough, but it was kicking my butt.

Part of that is knowing how to solve the problem you have. I have absolutely no idea how to write a program to solve what you've just described. Before I could write the program, I would first have to know what equations and tests to use as if I was going to write it out "on paper". Then the problem becomes translating that into code. Ideally, that will end up being the easy part!

I advocate writing down the solution in a "pseudo code" algorithm before turning it into code. As a bonus, once you've written it down you can keep it in the comments section of the code you've written, to document exactly what you've just done.

Once you get a job as a software developer in the "real world" you will spend much time learning about the company and what they do (whether it's banking, video games, beam analysis, underwater acoustics, telecommunications, etc.) before you can be truly useful as a programmer.
 
Part of that is knowing how to solve the problem you have. I have absolutely no idea how to write a program to solve what you've just described. Before I could write the program, I would first have to know what equations and tests to use as if I was going to write it out "on paper". Then the problem becomes translating that into code. Ideally, that will end up being the easy part!

I advocate writing down the solution in a "pseudo code" algorithm before turning it into code. As a bonus, once you've written it down you can keep it in the comments section of the code you've written, to document exactly what you've just done.

Just be sure that when you change your code because you want to take (i'm going to make this up) torsion due to uneven wind into account you update the comments. I'd rather have no comments than bald-faced lies.

-Lee
 
Part of that is knowing how to solve the problem you have. I have absolutely no idea how to write a program to solve what you've just described. Before I could write the program, I would first have to know what equations and tests to use as if I was going to write it out "on paper". Then the problem becomes translating that into code. Ideally, that will end up being the easy part!

I advocate writing down the solution in a "pseudo code" algorithm before turning it into code. As a bonus, once you've written it down you can keep it in the comments section of the code you've written, to document exactly what you've just done.

Once you get a job as a software developer in the "real world" you will spend much time learning about the company and what they do (whether it's banking, video games, beam analysis, underwater acoustics, telecommunications, etc.) before you can be truly useful as a programmer.

Actually, this reminds me of what else a good Computer Science education will give you (other than programming) - we studied 36 modules over 3 years, and although we learned about 10 programming languages, we also covered many other important subjects such as Modelling (real world things with pen & paper diagrams, then pseudo code, then real code), Project Management, Data Modelling, Artificial Intelligence, Machine Vison, etc., etc.

I suppose you would miss out on a lot of this if you just learn how to code, but then again, I went to university to keep my options open as I didn't know which industry I would go into at the time.
 
I'm a professional software developer as well. Started programming in BASIC on my ZX81 at I think 10 or 11 (it was before high school). Picked up my first few words in BASIC from some TV show and was so excited that I wrote pages and pages of programs (adventure games, IIRC) on paper before I even got the computer. Since I only remembered IF, LET, GOTO, and PRINT, you can imagine the quality of the code. I didn't even know you could print out the value of variables, so when I finally got the computer I never even typed them in. It was full of code like
Code:
IF turns = 3 THEN PRINT "You have 3 turns left"
IF turns = 2 THEN PRINT "You have 2 turns left"
IF turns = 1 THEN PRINT "You have 1 turn left"
IF turns = 0 THEN GOTO 1000
Anyway, got a ZX Spectrum 48, Spectrum+, and Spectrum 128 after that. Learned Z80 assembly. I can recommend learning assembly! When I wrote a TRON-style game in assembly, I always just got two straight lines on screen and an immediate "game over". I tried debugging that for ages until it dawned on me that the game actually did play - it was just over in milliseconds because it was too fast!

Wrote a TeX-style word processor for my Spectrum so I could use formulas and properly spaced text in my hand-ins for physics and chemistry in the first year of high school (it could render one A4 page per night, even though it used assembly for the rendering of the glyphs...). Been through various Atari systems during high school, tought myself Turbo C.

Studied physics and graduated in computational physics. Got Pascal as an introduction, then was exposed to FORTRAN. Got accepted as a Be developer, and have a BeBox. Learned C++ while writing my first commercial program (a paint program called Becasso). Left academia after graduating, worked on consumer-level video editing apps.

Am currently working on software for electron microscopes where my physics background comes in handy. Spend my spare time writing small stuff for the iPhone (my game is currently in a top-10 position in The Netherlands, so I'm actually making a fair amount of money off it) and writing another application I'll keep quiet about till it's time to announce.

So, that's how I started.

The subject of programming and designing software intrigues me in all its facets, from architecture to marketing. I read a lot of books on programming in general and C++ specifically. When I interview people who apply for a job in our company, the two most important questions I ask them are "what programming book would you recommend, and why", and "what are you currently working on". I look for enthusiasm.

Oh and a tip: Write a book yourself! There's no better way of knowing whether you understand a subject than to try and explain it to someone else. I spent way too much time writing mine, but it was a very enlightening experience.

This was probably "TL;DR". Oh well. It was nice bringing back the memories...
 
I started programming when a high school math teacher got me interested in computers. I took his computer class in beginning programming and then a community college summer school class in business programming. Then I became a university computer science major but also joined a computer club, played with computers as a hobby, and did part-time programming work for a government contractor. So I ended up learning programming three ways: by tinkering, though study, and as part of a real job.

I especially liked the variety of programming languages: machine languages, high-level procedural languages, object-oriented languages, scripting languages, string and symbolic programming languages, and so on. That led me to do graduate work in computer science theory, and I've worked as a programmer ever since my college days.
 
I highly suggest becoming intimately familiar with the following subjects:

  • text editors such as vim and emacs. They are available on nearly every platform.
  • debuggers such as gdb.
  • Makefiles, for the same reason as text editors.
  • Assuming C++: pointers, memory management, and garbage collection

If your programming course work does not teach these subjects, spend some time on your own to learn them. Doing so will make you a better and more well rounded programmer.
 
I minored in CS. Although I learned a lot there, they really teach you the theory of computation (at least at my school) more than the engineering of software.

So most of what I know I learned on my own (read books, join programmer forums, and most importantly tried stuff out on my own).

All the same, I would expect to see a technical degree from a job applicant before I would hire him/her.
 
I love to solve problems and ...

In my personal opinion, this goes to the core of being a programmer.

Good luck on your long, long road. My only advice: treat it like engineering, not like a craft. Pretend that lives are at stake on the reliability of your program. And don't ever think that you know even 5% of everything there is to know about it, because arrogance is the surest sign that you are an incompetent software engineer.
 
I'm another of the 'taught myself BASIC as a child' entries. Parents got a C64 for work reasons, and at some point I started writing programs on it, probably initially entering stuff from Compute!, but also new programs. I went to some effort to try to learn 6502 assembly, but without an assembler, it wasn't easy.

In high school I got access to intel-based computers, and QBasic; subroutines and local variables were a new concept. I went to university initially in Computer Engineering, and then tranferred to Computer Science, I didn't have the head for the higher math classes required by the engineering degree. We were taught initially in a little-used OO language called Eiffel, though the program now teaches Java to freshman instead. I also learned 68k assembly language, then C++, and in later years C, Java, and C#. Also exposure to some of the oddball stuff like algol, or Common Lisp. Most of my C was self-taught, as my freshman year roommate was a MUD developer, and had me playing with DIKU-derived MUD code, to some detriment of my school grades(too much time 'testing'). That project really helped me see a large-scale project, and how something could be big enough that it was hard to see the whole process in your head at once without diagrams or other aids.

I left school for awhile near the end, for financial reasons; eventually got a job doing some of what I wanted, where I picked up a ton of scripting skills; mostly vbscript, and PERL; the job after that got me into Ruby, which I still like a lot... for many of the same reasons I'm a huge fan of C#.

As for learning... I recommend you pick a language, any language, and stick with it for awhile. Learn the ins and outs. As a previous poster said, become fluent in it. Then, when you go to a new language, you can base your learning on the differences and similarities with the one you already know. Also, as others have said, once you've got the tool down, you're free to focus on the process; how to turn requirements into a design, and then go from the design to code. Take a class or pick up a book on design patterns; it can help with the code/design organization process.

After a few minor jobs, I managed to go back and finish my degree in Comp. Sci. It took awhile to get a job, but I am now employed as a programmer(tho my title is probably something like Software Engineer, haven't checked lately).

I also agree very much with the person who discussed learning your problem space. As a developer, you need to love to learn, as new tech, new languages are always coming out, and you need to be able to pick up those quickly, AND you need to be able to quickly absorb info on the problem space, whether it's security systems or medical devices or physics simulations or games. You can't stop learning in the current job environment, or you end up out of a job, without current skills.
 
Uhhh. Boehm-GC isn't all that commonly used...

I think his point was that in C++, you need to learn to clean up your own garbage. Even without a GC system, there will be garbage, and someone has to deal with it. In standard C++, that person is you.
 
Most of the newer professional programmers whom I've worked with most recently not only had a degree (or two) in IT, EE or CS, and not only had learned multiple programming languages and environments in school, but had picked up a few other programming languages on their own.
 
I think his point was that in C++, you need to learn to clean up your own garbage. Even without a GC system, there will be garbage, and someone has to deal with it. In standard C++, that person is you.

That's memory management, which was also on his list, not a garbage collector. Learning about garbage collectors IS important, but won't help you manage your own memory particularly well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.