views:

428

answers:

11

Can learning subjects such as abstract machines and formal languages make you a better programmer?

+7  A: 

Yes

Regards

Mark

High Performance Mark
this got 2 upvotes??
Mitch Wheat
Well, it is a correct answer to the question. The question did not ask for why and where. :)
StampedeXV
+1  A: 

In conjunction with years of practice, I'd say yes.

An appreciation of the theory behind our field, whilst not necessary to start with, does help to put things in context sometimes.

Kindness,

Dan

Daniel Elliott
+2  A: 

Absolutely. Even if you do not know them, a programmer uses the concepts every day. Without knowing the theory behind them, a programmer does not fully understand the software he or she is writing.

I do not have a formal CS education and have suffered for it. It has taken years of work to catch up.

Jeff Ober
+8  A: 

Undoubtedly! It provides a context, helps you understand the principles that transcend the whole of computing science and understand why things are done in specific ways.

I did a Computing Science degree and now that I'm working in the IT department of a large company the theory I learnt at University is invaluable.

However:

  • Studying theory will not necessarily make you a good programmer
  • You do not need to study formally to become a good programmer
macleojw
A: 

Yes.

It teaches you to think in concept and helps when you try to learn new things, a new programming language, see other new concepts, etc.

Patrick Cornelissen
A: 

Definitely.

Using just the two very simple examples you listed, for example, I've used both concepts within the last couple of weeks in the office. I've created a state machine to reflect a specific workflow desired by the customer, and I've used regular expressions, the theory of which and capabilities of which are described via formal language theory.

Greg D
+9  A: 

Yes - it can make you a better programmer, but it is not a guarantee.

Understanding the fundamentals of programming, whether formal languages, abstract machines, network trees or Computational Theory (like big O notation) helps you to be aware of the diferent complexities that a programmer have to deal with, and gives you an insight into the types of trade-offs that you may encounter in future.

Theory alone however won't make you a good programmer - there are fundamental programmer principles like assignment, recursion and pointers without which you will be unlikely to ever be a good programmer. (Don't knock assignment by the way - it is shocking how many people making a living from programming actually don't truly get it).

Esti
Big O notation is very relevant to programming as it measures efficiency of your algorithms. Things like formal languages and abstract machines seems like fun facts to bury in your head. Maybe I just need a better book, mine looks like a copy of abstract algebra.
Absolute0
I know I'm in the minority here (hence the comment, not answer), but computer science has very little practical bearing on software development. Being exposed to to computational theory has *no* relevance whatsoever on the problems you'll meet as a professional developer. Those rare aspects of theory that you do encounter you'll figure out for yourself empirically. Knowing the notation doesn't make you any better at it.
skaffman
To me the theoretical aspects is more about the thought-process than the relevance. Anything that makes you thnk about what you are doing as a programmer will make you a better programmer in the long run. Incidently - I'm an avid gamer and one of the LUA mods I use is a very clever implementation of the travelling salesman problem. Sometimes theoretical problems have more relevance than you may expect :).
Esti
+1  A: 

Would knowledge of mechanical engineering make you a better driver? How about a knowledge of car mechanics?

There are different levels of understanding. It's possible to produce working programs without that theoretic underpinning. However I on occasions the deeper understanding comes in to play.

I reckon that the curious, widely read, programmer will tend to be better equipped to produce good code.

Now, if I only understood one programming language and had no CS background - where would by time be best spent in doing some reading or some study? Interesting question. I'm not sure that my first stop would be to study Turing machines.

djna
Brings up a good point. I have yet to figure out what the idea of a Turing machine contributed to the field. I've read on numerous occasions that it's been mathematically proven that any problem that can be solved on a "conventional" computer can be solved on a Turing machine. I've never seen the proof, but even if it's true, so what? Why did anyone bother to prove it? On the other hand, when I was in school we learned to "program" a very simple hypothetical computer called "Cardiac" -- "CARDboard Illustrative Aid to Computing" in machine language. (continued ...)
Jay
Cardiac had just ten opcodes in its instruction set, a simple and consistent format, IO was trivial, etc. I thought it was a great introduction to what really goes on inside a computer. Okay, maybe that's a bad example because it's arguably more practical than theoretical, but it came to mind as a counterpoint to a Turing machine. My point is that there is useful theory that really helps you understand the bedrock principles, and there is non-useful theory that is ivory tower ramblings.
Jay
A: 

Any additional theory will make you a better developer, I think.

New knowledge allow you to make your mind moe flexible, broader look not only at the world around us, but also on your own tasks.

madcyree
+1  A: 

Well, to be honest, I think the answer is like the answer for many things in life: "It depends."

I think that having a thorough knowledge of computer science theory can provide a great deal of knowledge to make you a better educated programmer (notice I did not say a better programmer). Being better educated has the potential to make you a better programmer, but not necessarily. In my opinion, there is a big difference between being smart and being wise. I've heard of others in my profession who take designs and abstraction to the "N th" degree, just so their programs would be flexible enough to handle anything. Yet they are taking a year to build programs that could have been done with simple logic in a month. Many of us would look at it and write that off as nonsense vs common sense. But how many of us fall prey to such behavior......

I didn't have a "formal" CS training in school. The school I went to only offered a Computer Information Systems curicullum. So we learned programming basics, but very little theory. And I've turned out to be a decent programmer. Sometimes I wish I had more training, but for the type of programming we do in my IT department, I really don't need more theory. Just keeing in touch with the latest best practices articles and books is enough. Maybe reading up on design patterns, or enterprise architecture. But no need to get into more detailed algorithms. Overall, I think experience counts for more than anything.

So I think in everything there is a balance. What do you want to accomplish out of life? If you need to understand theory based on where you want to be, then you need to study it. But if you aren't going to need theory, but only a basic understanding of programming, then that is all you need. Not that you can't benefit from theory, but the point being that what you experience is more likely to shape you into a better programmer. Guess that's just my two cents.

Chris Aldrich
A: 

Truly understanding the where and why's of any computer science theory definately makes you a better programmer. There is a big difference between studying/learning and understanding though.

Just knowing that there is an algorithm A that solves something similar to case B may even be harmful, because it is an easy way out to a possibly horrible solution to the problem at hand if you don't know how and when to use it. I have seen so many bad examples of this, people not understanding what something does and just apply it because someone said it was good for something similar at some lecture.

However if you really understand the solution, you would also know how to adjust it to your current problem at hand, or realise that it is not a proper solution at all to your specific problem.

Runeborg