Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anyone've read the art of computer programming? help 2

Status
Not open for further replies.

vcllvc

Programmer
Jul 12, 2001
136
0
0
US
hi, there.
have anyone read "the art of computer programming"? How come all these math proofs are related to computer programming? And where should I foucs on? I've read (well, in hi speed) through 4 chapters and can't get any hints about programming. Someone say this book is a must for computer programming. I want to learn and to be a good programmer. Please help.

Best regurard.
Vincent.
 

As one poster has in their signature line ...

In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]

The book that you have is the theory of programming and the techniques to use. If you want language references then you can search borders or amazon for the language of your choice.

Good Luck

 
Hello vcllvc.

Yes, I've read (and studied) this book. Also I was the one who said that.
O.K., o.k., this is not an easy-to-read book but it *IS* a must if you want to really understand how all this stuffs works.

First of all, you must learn about algorithmics: Preconditions, Postconditions, Invariants and such things.

Second you must focus on common problems and solutions: Quicksort, Bubblesort, Tons of searching algorithms, N-P problems, maybe something about number theory and may be something about graphs and trees, etc.

Third you must go to data structures: FIFO's, LIFO's, trees, balanced trees, heaps, etc.

Finally you can walk into structured programming, object oriented programming, patterns, antipatterns...

Well, I know that this is the boring way to learn programming, but if you walk through this way, you will gain tons of true knowledge.
If you are not used to math language, try to understand concepts, and not focus into syntax.

Try to balance between theory and practice, but don't forget this tips.

Good luck!

Polu.
 
>> Well, I know that this is the boring way to learn
>> programming

what are the (other) ways? i thought that what u described was the way and if not u are not really programming ur doing like... whatever... i don't know how to describe it but i knows it when i sees it LOL -There are only 10 types of people in the world, those who understand binary and those who don't-

-pete
 
Thanks a lot Polu.
Your post really help. Well, can I ask you more questions? (might sounds silly to you)
First of all, about algorithm, pre/post conditions, invariants and such things. Do we need this for writing a program? I've studied these things in college, but I just don't know how to apply them to programming. It can be my own problem :-(

Second, we have many different API and libraries included all kinds of queue, heap, list, tree, graph, sorting and searching etc. Please don't think I am too lazy to study. Again, I just want to know that someting I have learnt, I will be able to use them. Like patterns and antipatterns I
do agree that are really useful.

Vincent.

 
"First of all, about algorithm, pre/post conditions, invariants and such things. Do we need this for writing a program?"

Yes. You need to be thinking of these things when you are programming. You should document your functions/methods with this information as it clearly states what your presumptions are about incoming parameters and return values and defines the contract that your code has with the client programmers. You should investigate what the common usage pattern of your code is so you can decide on which datastructure to use (e.g. array based list vs linked list) to achieve the desired efficiency.

In the real world, the usage of some these things is much less formal than it is in school but they are used nonetheless.
 
Dear vcllvc,

If you want to be a good programmer, I can recommend the book "Refactoring", by Martin Fowler. It teaches you to improve a piece of a program without breaking it.

Best regards
 
Thanks, I'll take a look of that book.
 
Hello Vincent

First of all, I'm sorry to be late, but I've moved from Europe to LatinAmerica to help in a out-of-date large scale project and I'm *VERY* busy.

Also, I'm very pleased to had been helpful to you, and I'll try to answer all your questions.

"Pre/Post conditions, invariants, and such things" are the foundations for all "design by contract" techniques. In real world, large scale systems, this is the *MOST* important thing in an IT system.
Let's say, as an example, we owns four development teams composed by 40 developers each one. Sure there will be a number of firms involved in this system, and little (or big) wars about who will develop next project step (and who will earn money for this job!) so code written by one developer will likely be modified by another developer in another city (or country) working for another firm. It's also very common that a system which was designed to do one work, was implemented to do a little different work (because a law was changed, a user changed his oppinion about some question, etc) and later was modified again. This use to produce 'trash code' or 'spaguetti code'. Spaguetti code is very expensive to modify because its very complex and too many people had been involved in different versions, so there is no one who owns all knowledge about one piece of software.
Think in a class implemented by an asian developer two years ago which is invoked by another class written by a brasilian developer a few weeks ago.

Well, You can be *SURE* that in such a hell-on-earth (but very common) scenario, if there were asserts implementing pre/post conditions, invariants, and meaningful remmarks in code, life will be easier. (and cheaper!!! you cannot imagine what amount of money is wasted around the world in maintaining bad designed/bad implemented/bad evolved IT systems)

O.K. I hope you have understand why this kind of things are importants.

From a math-point-of-view, it can be used to assure that one algorithm is finite and do exactly one work using various esoteric math processes but are not used in real world.

About Data Structures(DS), I have to say that you must know what are the existing DS's, how are internally organized and the advantages/disadvantages of each one in order to make the rigth decission at every particular situation. Also it will be very useful for you to write three or four classes implementing different DS's to really know them. I encorageus you to write a balanced tree, a priority LIFO, a hash map and a heap at least.

Well, I hope all this words will be helpful!

Best Regards.

Polu.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top