Fog Creek Software
Discussion Board




from textbook to real programming

I wonder what is your path from the first time you learn your first program to your current skill level. As for myself, I'm a non-programmer who like to improve my programming skill, but it seems I always stuck in the phase between the textbook programming or example codes to the more complex design. So the most complex program that I wrote is mostly really simple database nothing more. I wonder how to ignite my imagination therefore I will be able to create projects for myself with more creative or advanced topics.
What is your suggestion?

need help
Monday, August 25, 2003

throw out your textbooks and find some problems to solve.

Dont worry about reading about the complex design thingies, they dont matter.

You are trying to discover the solution before you understand the question.

Once you have some little experience in trying to find a solution to
reallife problems you will find that reading the advanced books helps.

Write a filesharing program, a web server, a chat program, a web browser.
Write it without looking at books.
The very process of discovering the problems involved, from designing the GUI to arranging the internal design, will help you to understand the 'complex' stuff.

Then go and read the books again, you will discover that the process of writing the code has led you to rediscover a goodly number of the 'complex' coding design practices by yourself.

Programming is _not_ a deeply complex process.  It is the process of discovering pragmatic solutions to common problems.

..its actually bloody easy so long as you dont read complicated books on obscure coding practices.

But once you have some experience, the books are deeply useful.

FullNameRequired
Monday, August 25, 2003

[[ But once you have some experience, the books are deeply useful ]]

Indeed. You will and should be able to filter the crap

Evgeny Goldin
Monday, August 25, 2003

Unless you have a real requirement to produce something that works your programming will always be something like japanese flower arranging for blind people.

It will be intrinsically satisfying but have no other purpose.

Simon Lucy
Monday, August 25, 2003

Why bother?

sokoban
Monday, August 25, 2003

As others have said, find a problem to solve.

I've been programming since I was 10 or 11.  At that age, programming is a way to pass the time, or a way to create passtimes.  IOW, I tried making games.  Card games, space games, text adventure games, etc.  I don't think I ever truly finished a game app; I ended up spending all the time learning how, and making little mini-toys.

You might be surprised how many things you can learn while trying to write a game - graphics, sound, data structures, OOP, threads, assembly, and even a little database programming.  There's also the universal skills of code maintenance and learning to use your text editor effectively.

Games might not be your thing.  If so, try this.  Try and find something around your house or workplace that you do a lot, that could be done with a computer program.  (Keeping track of your bills, for instance, or checks websites for updates.)  Write a program to do it.  Don't sweat the fact that software already exists that does it; write it anyway.

Paul Brinkley
Monday, August 25, 2003

Unfortunately anything worth writing may have mostly been written. To qualify that last statement, this is assuming you'll be using the same "modern" "latest" "greatest" databases or programming languages.

But write something that will make you happy will probably means 1) writing something that gets used by a lot of people due to its unexpected usefulness or 2) writing something that has a really strong impact on the problem you are trying to solve or 3) beauty or elegance or 4) all of the above.

Li-fan Chen
Monday, August 25, 2003

"Unfortunately anything worth writing may have mostly been written."

what a depressing thought.

why does no one ever say that to novel writers?  or would-be small business owners?

FullNameRequired
Monday, August 25, 2003

Li-fan,

The whole point of the learning exercise is that you make something *you* want to make; not what the *world* needs or wants. If you code something someone ELSE has told you to, it will not be as enjoyable as when you came up with an idea yourself.
Coming up with ideas is easy, realising them is the tricky part.
  I think Paul hit the nail pretty damn well with his comment. I'd go with what he said -- that's what I did when I started out.

Mickey Petersen
Monday, August 25, 2003

If you go to http://www.topcoder.com  you can find projects with in-depth requirements listed on the website.  These are for coding competitions but I would use them as test cases.  They remind me of my CS homework. 

PS I think it is VERY worthwhile to learn.  So I say go ahead and "bother".

shiggins
Monday, August 25, 2003

Another way to get into "real" programming is to write some extensions for another program. For example, the Apache web server has a module system that lets you plug your code into the web server to do special things for your web site. Standing on the shoulders of giants, your small work can have a bigger effect.

runtime
Monday, August 25, 2003

"what a depressing thought.

why does no one ever say that to novel writers?  or would-be small business owners?"

Actually, FNR, I'm sure they do.  But the successful novel writers or small business owners don't listen.

Kyralessa
Monday, August 25, 2003

Perhaps you would find computers interesting if go back to the basics -- making machines intelligent.  If so, I would suggest _Artificial Intelligence: A Modern Approach_.  It doesn't hurt that lots of things, like knowledge representation, come up early and often in AI.

Tayssir John Gabbour
Monday, August 25, 2003

Aiieeee.  You might want to stay away from AI apps at first.  They're a minefield.  Scores of problems that appear tantalizingly easy, but are frustratingly hard.

I say "might", though.  If you're one of those people who loves playing around with robots, go for it.  If you've never played with them, pick up a Lego Mindstorms kit and dabble, and see if you like it.  The field's full of unsolved useful problems, but they're BIG problems, and you'll want to tackle small problems at first.

As for "already written before", it is as Mickey said; the point is not to forge new territory here, but to learn how programming is done day-to-day, as opposed to for-an-assignment.  It's also to gain raw experience.  Yeah, everyone's written a crummy address-tracker or text processor.  Who cares?  Write one yourself.

Sights to see while programming in the real world:  incomplete or vague programming specifications as far as the eye can see.  Lots of decisions are left to you, the programmer, as to whether a program is done or not.  Gawk at the long vistas of support, and deciphering of other people's code.  Enjoy, and remember that sooner or later your limbs will have to extend outside the tram.

Paul Brinkley
Tuesday, August 26, 2003

To defend my post.. ;)  I don't think it has to be everyone's right path, but I read need help's post as looking for motivation to continue with programming.  For many, it's a forest and trees problem, where they only start caring for the peculiarities of each tree once they think about the forest for a while.

My background was "dirty hackery," and I only entered programming by chance, since someone noticed I was able debug code, though I didn't understand it in a global sense.  Eventually I learned technique just by keeping my eyes open, reading things like Code Complete.  But I was still seeing the forest, and a dull one at that, until I looked at SICP.  Though my technique got a lot better, programming was still empty until I read Russel/Norvig's AIMA.  Now I'm fairly satisfied, and don't mind reading the dry texts at all or slogging through bad apis.  There's an interesting context for technique.  Maybe the most interesting view is different for other people, but I think computing touches enough stuff to be interesting for most, if they can just find the right angle.

I also like AI since some programmers have God complexes, and with AI you see a lot of limits to computing.  Anyway, just want to put out a different, maybe contrarian view.

I always like to point out the SICP video lectures free online: http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman-lectures/

Tayssir John Gabbour
Tuesday, August 26, 2003

need help -

I'm kinda in the same boat as you. The apps that I've written professionally have all been in VB with SQL or Access. So now that I'm going back to grad school, I program using C, C++, and C# in my free time to keep fresh. If I'm interpreting you correctly, you aren't looking for a new thing to study (e.g., AI), instead you want to make the transition from textbook-level programming to application-level programming in the languages you already know.

Here's what I'm doing:

o As mentioned above, go to http://www.topcoder.com . You'll need to register, then you can access the competition arena. Go into the practice rooms - there are about 60 of them, each representating a round in a past competition. Each round has 3 problems, and you've got 1 hour to complete them (at least, in competition you do). Each problem is typically a class with a single public method. I typically just copy these and work them off-line.

o Keep a list of ideas for applications. Any time you think of a new one, add it to the list. I've separated my into personal and professional. That is ones for my own use and one's that might actually be able to sell.

o Code the personal apps in languages that you want to improve you skills.

o Code the professional apps in the language that you can be the most proficient. (For example, I'm doing mine in C#. I don't know C# that well, but in the long run I think I'll be more proficient in it than in C++.)

o Here are a few of my recent personal project additions, just to give you an idea:

-> A password manager.  Ideas: (1) write an encryption algorithm in assembly; (2) require the user to select 3 points from a .jpg as a login (instead of a password for your password manager); (3) same as (2) but have them stop an .mpeg on 3 given frames.

-> A quiz engine. Have the options of multiple choice, short answer, or flash card.

-> A server side component to generate a graph in jpg format from SQL data. Bonus: generate Javascript for drill-down capability.

-> A photo album manager.

-> A HTML generator for presentations - basically a low-frills PowerPoint alternative.

o Lastly, if you code in C++, there's one book that might be worth taking a look at: Applied C++ ( http://www.amazon.com/exec/obidos/ASIN/0321108949/qid=1061930042/sr=2-2/ref=sr_2_2/002-7641935-5045602 ). It's in Bjarne Stroustrup's C++ In-Depth Series from Addison-Wesley, which have generally been excellent. It walks through the process of creating an application.  It's on my to-read list, despite the mixed reviews on Amazon (big surprise), so I can't personally vouch for it.

Basically, though, I think you just need to sit down and code. Even of the design sucks, you'll still learn from it.

Nick
Tuesday, August 26, 2003

Tayssir: Ah, I see what you're saying.  I read it as "need help" trying to bridge the gap between theory and practice - how it's done in a book and how it's done at work.

Nick: Your message reminds me of the "What do you do when you have low energy?" thread.  As you imply, you need to exercise to keep your levels up, be it energy or programming...

Paul Brinkley
Wednesday, August 27, 2003

*  Recent Topics

*  Fog Creek Home