views:

95

answers:

4

I've been reading realy good books about advanced programming technique recently (Modern C++ Design by Andrei Alexandrescu is one of my favorite) and I have been realy disapointed to learn at my new job that such technique where prohibited since it would be too hard to maintain for people who can't understand such technique.

Does such high level programming technique realy have it's place in compagnie or is it only good for academic purposes?

A: 

Time to find a new job.

What specific techniques are you referring to?

JimN
+4  A: 

Since I don't know which techniques are discussed in that book, I'm unable to say for certain. However, no matter where you go, there are some people who are smarter than others, or who simply know more right now. It makes no sense to create code that the "others" will not be able to maintain.

The counter argument is that, for some things, you may not need every developer in the country to be able to maintain the code. Perhaps certain techniques would be ok if only the top 20% of the staff could maintain it.

But it's your Management who have to decide this. It's possible that they are correct.

Finally, if you're in a company where everything is written for the Least Common Denominator, and if you think that's not you, then there are plenty of companies who would love to hire someone in that top 20% and give you something interesting to do.

John Saunders
+1. "It makes no sense to create code that the 'others' will not be able to maintain" -- very true, unfortunately. Rembember: the goal is to minimise overall cost of development in the real world over the lifetime of the product.
j_random_hacker
+1  A: 

I believe that it depends on the situation. And if you feel that the technique is beneficial enough to implement, provide a proof of concept to your management. If you can make them understand that its not just for academic purpose or cool factor, then they may reconsider.

statenjason
But what if it's beneficial to implement, but nobody at the company other than you can maintain it?
John Saunders
What makes you certain they wouldn't be able to maintain it? Is the learning curve that difficult? If so, the benefit may not be worth it.
statenjason
There's a lot of neat stuff out there with a lengthy learning curve, even if the curve isn't steep. It may be something for which I happen to know 80% of what's needed to make it work, yet there may be nobody else in the company who knows as much as 20% of what's needed. Not a good idea.
John Saunders
A: 

Summary: This type of high-level learning is exercise for your brain, but not necessarily a list of things that you should feel obligated to use in your daily life. It's similar to going to the gym - it's really good for you and can improve your productivity and health, but that doesn't mean that you should be trying to lift desks over your head in your day job. Unless of course your day job is lifting desks! :)

Use of high-level concepts in day-to-day work has some disadvantages, the biggest one being that it's not understandable to your weaker programmers. Programmer aptitude varies from situation to situation, but in most jobs there's a good chance that the maintainers of code you right might not have read the same books as you. They might not even read programming books (or programming websites) for fun! That's why it generally makes sense to program to the least common denominator. It's exciting to make use of complex ideas in programming, but it's important to keep in mind that you're writing code for an audience, and that audience is composed mainly of people who are not you.

Your example of template meta-programming is a really good one. The fact that the C++ templating system is Turing-complete is really cool and interesting, and you can do some really fun stuff using it. Learning about template meta-programming has to help you become a better developer in some respects. However, this doesn't necessarily mean that you should use template meta-programming consistently. One reason is that if you make a small syntax error in a complex piece of C++ template meta-programming code, the error messages from the compiler are often difficult to interpret. That's a really big downside for using template meta-programming in The Real World, and pragmatism is something that you should keep in mind as you learn more far-out concepts.

I think that a lot of these concepts are mostly academic ways of making yourself a better coder. Another example is the resurgence of functional programming techniques in languages like Python. The popularity of functional programming doesn't mean that everyone should use LISP for every project from now on, because that's not practical for many businesses who have infrastructure investments in other technology and LISP is different enough that it might terrify the average coder. However, learning how to code in LISP can help you write code in other langauges that is:

  • more elegant and concise
  • easier to read
  • more maintainable over time

I think this type of learning mostly academic, but the impact on your performance in your daily life can be very profound. Writing this answer made me think about Steve Yegge's article about Practical Magic, where he talks about the value of understanding how the tools you work function. I think that's a related but different topic, and people might enjoy reading his article.

James Thompson