Solved

General Question to Nietod and any others

Posted on 2001-06-21
10
194 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now