Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I recently graduated in cs and was mostly unsatisfied since I realized that I received only a basic theoretical approach in a wide range of subjects (which is what college is supposed to do but still...) . Anyway I took the habit of spending a lot of time looking for implementations of concepts and upon finding those I will used them as guides to writing my own implementation of those concepts just for fun. But now I feel like the only way I can fully understand a new concept is by trying to implement from scratch no matter how unoptimized the result may be.

Anyway this behavior lead me to choose by default the hard way, that is time consuming instead of using a nicely written library until I hit my head again a huge wall and then try to find a library that works for my purpose.... Does anyone else do that and why? It seems so weird why would anyone (including me) do that ? Is it a bad practice ? and if so how can i stop doing that ?

share|improve this question

closed as not constructive by Oded, Joel Etherton, thorsten müller, Walter, gnat Jun 11 '12 at 19:50

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

When I was new to programming I wanted to write everything from scratch too. That all changed when I got a job and they expected me to GIT-R-DONE. –  Jason Holland Jun 11 '12 at 13:30
@JasonHolland I see, but isn't this chocking the creativity? I was always a bit cranky when at work they wanted me to do something one way.. why ? because it has always been done like that and no one questioned it before... –  MimiEAM Jun 11 '12 at 14:47
Don't get me wrong. I'm not a "gotta use a framework" zombie. But libraries like jQuery or Boost C++ libraries you want to just go ahead and use them. But sometimes it is overkill to use a framework/library and that all depends on the project at hand and the deadline. –  Jason Holland Jun 11 '12 at 15:02
@JasonHolland true, I get the point :) thank you –  MimiEAM Jun 11 '12 at 15:16

2 Answers 2

up vote 8 down vote accepted

I often find it useful to implement an algorithm, architecture, or data structure in order to fully understand it. It's a good way to think critically about the problem at hand, and work out the bugs in your solution.

Read that again.

"... work out the bugs in your solution."

Implementation is not the same as solving the problem. Solving the problem, ideally, should come before implementing the solution. You should have an idea of the issues at hand before you implement them. Perhaps, once you start implementation, you will discover flaws in your logic.

The point is that, for learning, implementation is a good thing. That's why, in computer science courses, you implement things like stacks, queues, trees, graphs, sorting algorithms, etc. After implementing it, you understand the complexities, benefits, and downsides of all these things. Once you understand those things, it allows you to use these concepts in a meaningful fashion.

However, in the real world, implementing these is not viable. They are solved problems. You don't have to implement them in order to use them. Recognizing that they are solved problems, and that you can save time (and thus money) by using pre-built frameworks and libraries is part of being a good programmer.

I suspect my education was similar to yours. I had a very theory-based curriculum. There were things we put into practice, but they were mostly to better understand the theory.

Now, I look at a problem and solve it before implementation. Using theory. I work out a solution when I'm out walking, or when I'm talking with coworkers, or when I'm at lunch, or when I'm at the bar after work. No computer necessary. In the end, the product is what matters, but the theory is what builds the product.

In conclusion, implement to understand the solutions you are using. Experiment. Hack. Read. If you can, improve solutions and libraries. But recognize that there are people out there who have put a lot of time and energy into the solutions you need.

share|improve this answer
"No computer necessary" and "But recognize that there are people out there who have put a lot of time and energy into the solutions you need. " I think those are the 2 points that I was missing really, and I will try to work on from now one, thanks :) –  MimiEAM Jun 11 '12 at 14:35
Another huge benefit of solving the problem away from the keyboard is that it's language-agnostic. Control structures, data structures, and design patterns rarely care which language their implemented in. Having that knowledge of theory allows you to work in any language you have to. –  Ryan Kinal Jun 11 '12 at 14:50

Yes, actually the best answer I can give you is "get a job", and I don't mean that in a pejorative way at all.

Moreover, get a paid job, in a company, with a boss, and a team leader, someone that'll keep an eye on you. I've been a freelancer working from home for the past year and a half or so, and it's the best thing that ever happened to me (work-wise), but almost everyone needs the benefits of someone with real world's experience pushing you in the right direction at the beginning of the trip.

A better answer would rely heavily on what is it you want to do (what you want to program) since it's not the same thing if you want to do graphic computing than if you want to do web development, or videogames.

If you have the chance, try to use a language with numerous, well written, easy to use libraries: python or ruby would be my choice.

share|improve this answer
Spikey Haired boss-men do have a way of making you bend your purist philosophies.. –  rlemon Jun 11 '12 at 13:40
The do indeed. They do indeed. –  Ryan Kinal Jun 11 '12 at 13:46
@Lacrymology I guess i need to figure out what i want to do first. I realized that i have an interest in everything and learning as much as possible, which in it self is a double edged-sword... thanks –  MimiEAM Jun 11 '12 at 14:42
ah, I'm sorry to tell you, my friend, that you are what has become known as a nerd. Good luck with that one ;). I recommend videogames, or the academia, then. I find them to be the most inclusive of programming areas. –  Lacrymology Jun 11 '12 at 17:53
@Lacrymology hahaha , that might be true... well I ll follow your advice :) thank you ( ps: I'm actually developing a little game ^^ ) –  MimiEAM Jun 12 '12 at 12:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.