Jump to content

Is programming analogous to construction?

- - - - -

  • Please log in to reply
6 replies to this topic

#1
zcmrfrodo

zcmrfrodo

    Newbie

  • Members
  • Pip
  • 4 posts
Hi, I'm a beginner programmer starting with C#.

I'm a little frustrated with the conventional way that C#(or any programming language) is taught in most articles/tutorials/books. Each resource says pretty much the same thing, they tell you to load helloworld.cpp, then proceed to explain every little detail about the code. My question is: Doesn't learning happen through doing?, so why are all these books explaining things when I am lacking doing experiences to attach them to?

It seems to me that programming is very analogous to commercial construction.

If I were to teach a person how to build a simple shack constructed out of 2x4's, I would lay out all the materials they would need(2x4's, nails); then lay out all the tools they would need (hammer, saw, measuring tape, leveler), then I would demonstrate the basic functions of the tools(hammering a few boards together, cutting a few boards, making measurement marks, leveling), then look at the person and say "Now you figure it out." With this, the person should have everything needed to complete the basic project, and since he witnessed the basic functions of the tools and how the pieces fit together, he will be able to construct a basic building made of 2x4's(though maybe a little sloppy due to a lack of skill). And from there, I would give the person more and more complex projects as he completed them, and show him more and more complex applications of the tools.

However, If I were to use the same teaching method that these programming books use, it would go something like this: Take the person to the tool shed, point out and explain in depth every application of each tool, then take the person to a pre-built form of the building and explain every step that I took to construct it, and then explain how there's a warehouse where you can buy 2x4's and other building supplies, then turn to the person and say "Ok, now its your turn to build something. I hope you memorized every detail that I explained about the tools, and have a GREAT imagination that can just figure out what will be needed from the warehouse. Good luck!" At this point, the person probably only remembered one of the tools explained, and may vaguely remember one of the steps taken to build the building; which overall the person would be confused and have no idea how to begin constructing something as simple as a shack made of 2x4's.

All of this explaining and theory seems to do nothing to help a beginner like me. If someone could just say "I need a very simple program to do <X>, here are the commands you will need and a demonstration of what they can do, and here are the libraries you will need to access them. Now make it happen!" Without walking me step-by-step through it, give me the pieces and let ME see how they fit together, and so i can try to make the pieces form the picture that is being asked for. I found a article that teaches the preferable way, but unfortunately it only teaches C, and I am trying to learn C#, so its not much help.

Can anyone help me?
Am I just crazy or something?

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Hello World is analogous to showing someone how to hammer a nail.

After your first few languages, you can start getting books that don't approach teaching programs that way, but you'll have to look for them.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
zcmrfrodo

zcmrfrodo

    Newbie

  • Members
  • Pip
  • 4 posts
Thanks for the reply WingedPanther.

But

WingedPanther said:

Hello World is analogous to showing someone how to hammer a nail.
I described two teaching approaches in my analogy, which one are you referring to?

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You seemed to be criticizing the process of starting to teach a language with the Hello World program for that language. I was responding to that.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 243 posts
No, it isn't analogous to construction. It's more like someone gives you an expert construction worker. This worker can do things faster than you can (much faster) but only speaks a very limited language. You have to tell him what you want built in his language. Sometimes he can tell you right away what you told him is wrong (compiler errors), other times only when he's part way through the project (runtime errors). Sometimes the instructions all work, but what you get isn't close to what you wanted.

Programming is learning to speak his language and understand all the rules of that language.

#6
fayyazlodhi

fayyazlodhi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 403 posts
A lot of people call it analogous to a lot of things. Donald knuth calls it an art, MIT's Ableson says CS is neither about computers nor is a science. Paul Graham says programmers and painters have a lot in common :)
Hackers and Painters

So you may take a correlation with construction and that is good if that helps you in some way.

But the point that i completely agree with is, Learn by doing. Hello world or not is not important. I have seen many books which teach by practice.

Dietel and Dietel = C# how to program (no matter there are criticisms on that too) but it at least follows what you are looking for. They simply build a useful application.

Then they go about explaining what it's code do. So though it was not my first book C# was not that around then (i used it's c and java versions, and only latter c# though my first programming books were Robert Lafore's C and Yashwant Kanetkar's).

So i used to visualize some thing i need to do, find the tools (relevant usage of code from Dietel's book) and get my needs done. If needed to understand internals of something i would take another book specializing in that.

This would be the strategy for a beginner and for many people since they have been making apps for a while, sometimes the concept behind is more important and they look for books elaborating that.

#7
bbqroast

bbqroast

    Codecall Addict

  • Members
  • PipPipPipPipPipPipPip
  • 554 posts
  • Location:/etc/passwd
... I find these types of tutorials pretty rare.
Infact only really on video tutorials- and to be honest you should NEVAR use those for programming (part of a good tutorial is being there so you can just skip through it and find information in the future, not having to watch 4 minutes of basic integer ops).
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users