I have a good idea for a new book. If there is such book already, please give me a reference.
I am talking about programmer's psychology. But it would be a book by programmers for programmers. This is not why we sit endless hours in front of our PCs. Not about programmers usually being intraverts and so on. This would be a book "How to become efficient programmer". They have already books like "how to be efficient businesman", "trader". Have you read anything about how to be efficient programmer? I have not. We have a lot of literature how to use technologies. Even "Effective C++/Java etc." but an average programmer reading this book, might not get what he wants. I did this mistake before: I spent too much time designing a very extensible a very reusable software, even while coding I could partially agree that no one, even myself will never use that class again. I spent designing it a week or two. I could have take a shortcut and do it dirty way in couple hours but I was so busy solving future reusability problems which I never encountered in the first place.
In university I had a teacher which strongly suggested that we need to design every algorythm, method before we start coding it. On paper. Maybe his approach was good for mainframe programmers with limited access to terminal. I really doubt he did write anything complex. Every large project has so many details, you can't track and keep them in your head all at once. Some projects have so many questions to be solved to provide complete design that it might make sense to start from coding (extreme programming) and then later on add new features than have everything designed before coding (waterfall).
Let's take another example:
unit testing. If we go to unit testing site, they will strongly recommend "write tests first and code later". Ha. If you new they have a chance to get you. If you try to write tests without defining interfaces first... what are you going to test? If you are working using extreme programming approach (very good for risky projects and I consider every project risky) you will have to throw away lot's of code... and lot's of tests... Do not take every
word they write literally. They don't lie to you at whole but you have to use their ideas for your benefit and not sacrifice your results for their ideas.
OO programming is here for a very long time. How many of us are really good at it? I'd say very little, not more than every 1/5 programmer that uses OO language. Everybody has a knowledge of language, most try to structure code using classes, many know
patterns, less spot/apply patterns correctly. Everybody can use a good OO library, very few can design it.
As with OO same with other techs. There are a lot of people with good techical expertise. They know technologies, new and complex. But still have you noticed some people catch up quickly, others have more problems even with better prior knowledge of technology? I don't think this is because of smarter and not so smart people, at first place. I think this is because they are applying better general programming practices.
Like in real life in programming there are true values and marketing. Marketing might tell you: "your code must obey these rules, and you must use as many patterns as you can". Even though you don't have a problem those patterns solve. But in practice you will be loved for you write a software that works and it is not too much late on schedule. Other programmers will appreciate simplicity and understandability. Those marketing values are not real, software is.
Have you noticed that most brilliant ideas come when you are not trying to push them? For me, I have my best ideas usually 2-4 days after I was trying to solve a problem "close-and-personal" way and came up with something awful? Maybe we should postpone the problem we can't solve right now and go code some other part of the application?
There are a lot of things to write about, a lot of hidden rocks, everyone has to find out himself. This book shouldn't be technical or technology based. Technologies come and go. I'd like a book with tips, how to be a good and efficient programmer in any technology. All those problems go away with experience but still it would be great to cut a few corners and save some months and pershaps years.
Regards