Solved

General Question to Nietod and any others

Posted on 2001-06-21
10
196 Views
Last Modified: 2010-04-02
I am a student and I have some questions for developers and programmers. When I do a programming assignment I always look at code and a lot of the time and copy and paste or reuse code. I have gotten away with that so far, but to be a good programmer should I be able to sit and write a program without any other type of aid other then what is in my head? I guess what I am trying to ask is am I cheating myself by understanding the code I am copying and pasting and how it works or should I be trying to memorize all of the syntax for as many alogorithm's in the programming language I am learning. I guess, what is the best way to learn how to program? What should I study the most to be productive in school and when I am employed as a programmer? Most of my problems I have with know are code implementation, but I have been told by a experienced programmer that syntax is easy and that the real problems are understanding the logic that you have to understand to be a good programmer.
0
Comment
Question by:awjackin35
10 Comments
 
LVL 2

Expert Comment

by:smitty1276
ID: 6216823
You don't need to simply memorize algorithms, etc...  You need to understand the LOGIC behind the algorithms and be comfortable enough with the syntax of the language to apply the logic and develope working code for any situation you may encounter.

Programming is ALL logic.  Learning the syntax of a new language is relatively simple.  Knowing how to logically develope the code you need is fundamental to any language.
0
 
LVL 3

Expert Comment

by:cypherljk
ID: 6216863
I agree with smitty1276, when you get to a certain level as a programmer the syntax no longer matters.  It's the knowledge of techniques and understanding of the logic that makes a programmer excell.  In fact one of the common classes taught in college is 'Programming Languages' where the basic ideas are taught and you usually go through several languages implementing applications.  True you don't need to memorize every algorithm but you should understand different algorithms and how they affect you application.  If you understand the code you copy then you may not be that bad off.  The next time you copy code though try to rewrite or improve it, this will test your understanding of the code and what you are trying to do.

My 2 cents...
0
 
LVL 9

Accepted Solution

by:
jasonclarke earned 50 total points
ID: 6217544
> but to be a good programmer should I be able to sit and write a program without any other
> type of aid other then what is in my head?

this is plain wrong.  Much of modern programming technology is aimed at maximising code re-use.  It is quite possible to use an alogorithm without understanding how it works, for example you clearly don't need to understand how a compression algorithm works in order to compress a file.

Good programmers write as little code as they can - reusing code is a good thing.  However, copy/paste of code is probably the lowest form of reuse.

It is also possible to reuse programming techniques and idioms - that is programming language techniques that allow you to solve certain problems.   The Design Patterns book (by Gamma et. al.) is an excellent example of this kind of thing.

> What should I study the most to be productive in school and when I am employed as a programmer?

i) How good experienced programmers work, ii) Good examples in other peoples code.

> but I have  been told by a experienced programmer that syntax is easy

easier, maybe.  Not necessarily easy, this forum would suggest otherwise.  Syntax is a minor part of the equation, however, programming paradigms (OO, procedural, functional, etc.) are more important - they describe a 'mind set' of how you go about solving problems.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 3

Expert Comment

by:3rsrichard
ID: 6218156
If you learned algebra when you took it in school, then if someone gives you an
equation to be solved you look at it and pick a method of solution which is appropiate
to the type of equation.
For instance if someone says solve x^^2 - 9 = 0 you would not choose to use the
quadratic formula, even though it would work.

If you want to be a good programmer you should learn how to use a variety of
techniques, and when faced with a programming problem you should use one
appropiate to that type of problem.

0
 
LVL 16

Expert Comment

by:imladris
ID: 6218657
I agree with jasonclarke that a good programmer is a lazy programmer. You want to write as little code as possible. Reinventing the wheel is done far too often. I often tell this kind of thing to people working in a production environment. And remember the software bottleneck. More than 80% of programming effort goes into maintaining existing code. Only the minority goes into creating new code.

Having said that though, I believe it is also true that programming is primarily learned by doing. I don't think attempting to understand code and then using it by cutting and pasting it into your program, is going to teach you anywhere near as much as developing it yourself.

So in summary; I don't think you need to memorize syntax or algorithms. Code reuse (from cutting and pasting all the way to inheritance) is a good thing. In fact even cutting and pasting is very common in the windows end of things. I do think you need to program things from scratch. It will force you to grapple with programming concepts, and your own flaws (when debugging), to a higher degree, which will cause you to learn more.
0
 

Expert Comment

by:VandanaManne
ID: 6218964
question for jason

The Design Patterns book (by Gamma et. al.) is an excellent
example of this kind of thing.
what are you referring here? Is this a name of the book and if so, is it good enough for any developer to go through it.
Thanks in advance.
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6219161
> Is this a name of the book and if so, is it good enough > for any developer to go through it.

yes, it is a book.  It describes programming 'patterns', that is pieces of code that solve commonly encountered programming problems.  It does assume an object oriented environment, however.

It is a very good book, highly recommended for any software developer.  It may be be too complex if you don't understand the basics of programming and data structures, however.

Here is a link to info about the book:

http://cseng.aw.com/book/0,3828,0201633612,00.html


0
 
LVL 1

Expert Comment

by:nrajan
ID: 6219864
My advice to you is this.

1) Learn the fundamentals of Object Oriented programming. Esp the core concepts of Encapsulation, Inheritance and Polymorphism

2) Learn a good OOP language like C++ and/or Java. Don't worry if the details like 'deep copies' or 'virtual destructors' confuse you. One day, after you have worked for sometime in projects, you will have an 'Aha!' experience which will make you understand the complexities

3) Once you know the nuts and bolts get going into projects. You will learn better under pressure when you will have to complete a project within a timeframe.
0
 

Author Comment

by:awjackin35
ID: 6220527
Thsnks for the advice.
0
 

Author Comment

by:awjackin35
ID: 6220533
Thsnks for the advice.
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question