General Question to Nietod and any others

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.

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.

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.

> 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.

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.

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.

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!

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.

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.

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.