10 Replies - 2637 Views - Last Post: 17 March 2013 - 09:48 PM Rate Topic: -----

#1 jjh08  Icon User is offline

  • D.I.C Head

Reputation: 55
  • View blog
  • Posts: 198
  • Joined: 13-July 12

Importance of Algorithms?

Posted 07 March 2013 - 06:55 AM

I would like to know how important are algorithms in general when it comes to software development. The reason I ask is because I'm currently studying a Java book to build my fundamentals, but after this, I would like to begin working on some of the projects in Martyr2's Project List. So, is it necessary for me to gain more insight in algorithms before I start any serious coding projects. I saw an intersting book on algorithms here. Or should I just "learn as I go" because I remember baavgai saying in one post(cant remember which one) that software code would have to probably be refactored in the future anyway. So, I figured if I find a better algorithm for my software, I would refactor it.
What do you all think? I appreciate any feedback. :)

Is This A Good Question/Topic? 0
  • +

Replies To: Importance of Algorithms?

#2 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • Joined: 30-January 11

Re: Importance of Algorithms?

Posted 07 March 2013 - 07:03 AM

It's a difficult question to answer as pretty much all the logic you put into a program is some kind of algorithm (well for the most part).

Do you need to know about all the different sorting algorithms? No. But you do need to get experience in developing your own algorithms to solve the problem at hand.

Knowing every single algorithm is not that important, being able to develop new ones that fit your needs is very important.

So I would say do look into them but don't spend hours studying every existing one - you will forget half of them anyways. It is a useful skill to be able to research existing algorithms that partially solve your problem and then be able to adapt them to fir your requirements.
Was This Post Helpful? 3
  • +
  • -

#3 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10700
  • View blog
  • Posts: 39,813
  • Joined: 27-December 08

Re: Importance of Algorithms?

Posted 07 March 2013 - 07:29 AM

Programming is about problem solving. That's the skillset you should work to develop. Studying algorithms at the depth of a textbook means involved math and proofs. If you've never programmed much before now, I wouldn't delve straight into an algorithms textbook. If you are a highly proficient programmer trying to learn a new language, this might be more tempting.
Was This Post Helpful? 2
  • +
  • -

#4 oha055  Icon User is offline

  • D.I.C Regular

Reputation: 49
  • View blog
  • Posts: 271
  • Joined: 02-February 09

Re: Importance of Algorithms?

Posted 07 March 2013 - 07:51 AM

The book you are refering to is the one we used in our algorithm course at my university. I would just like to add that if you do decide to pick it up, it is a fantastic book which I'm certain you will learn alot from. It covers alot of ground in regards to search and sorting algorithms, as well as a pretty interesting chapter on graph theory. The book also has complete Java-implementation examples of alot of the algorithms and data structures they talk about.

If you are interested, I suggest you browse their official website.
Was This Post Helpful? 3
  • +
  • -

#5 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,885
  • Joined: 06-March 08

Re: Importance of Algorithms?

Posted 07 March 2013 - 07:56 AM

What is the importance, or relative importance, of the blood, the hard and the brain in the human body ?
Was This Post Helpful? 2
  • +
  • -

#6 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7898
  • View blog
  • Posts: 13,434
  • Joined: 19-March 11

Re: Importance of Algorithms?

Posted 07 March 2013 - 08:48 AM

Sedgewick's book is excellent. If you have some spare time and you want to get some practice writing code, go through it and do all of the exercises.
In the process, you'll probably learn some stuff about the math behind the algorithms, but if you really want to learn that stuff it's best to be in a real-time classroom setting. It's an extremely complex discipline, and there's a lot of stuff that you can miss, and having lots of eyes on the problem will help you make sure you get all of it.

There's probably a college or a university near you that offers a course called something like "Data Structures and Algorithms". Go to that school and take that course.

Quote

So, is it necessary for me to gain more insight in algorithms before I start any serious coding projects.

The ordering of this step is not critical. Don't put off anything interesting waiting to study algorithms.

Quote

Knowing every single algorithm is not that important, being able to develop new ones that fit your needs is very important.


Knowing algorithms is not at all important. That's why they're in books. Knowing how to think about algorithms is crucial, and knowing what sorts of algorithms exist for certain purposes, and how they tend to work, these are important. Some algorithms are just so beautiful that you might learn them because you just can't forget them, and that's cool too. But ultimately the point is to understand how the code works, not to memorize stuff.

Quote

Or should I just "learn as I go" because I remember baavgai saying in one post(cant remember which one) that software code would have to probably be refactored in the future anyway. So, I figured if I find a better algorithm for my software, I would refactor it.


Yes, anything that you write which is used is likely to be modified. That can include improving your approach to critical tasks. The most important thing for you to think about now, I think, is designing your programs so that they can be modified over time.

This post has been edited by jon.kiparsky: 07 March 2013 - 09:24 AM

Was This Post Helpful? 2
  • +
  • -

#7 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5884
  • View blog
  • Posts: 12,769
  • Joined: 16-October 07

Re: Importance of Algorithms?

Posted 07 March 2013 - 09:15 AM

View Postjjh08, on 07 March 2013 - 08:55 AM, said:

Or should I just "learn as I go" because I remember baavgai saying


Ack, context is everything. :P I recall saying something like: the design you begin with, whether it's a formal spec or something you pulled out of your ass, will never be identical to the final design. That's just the nature of development. However, that isn't meant to imply that having a flight plan and just flying blind are equivalent.

"Learn as you go" isn't an option, you're going to be doing that whether you like it or not. All the theory in the world is not the same as doing. Doing will teach you.

The scope of "algorithm" can vary. You might call an entire program an algorithm, but usually a program is several algorithm looking bits held together with duct tape and the best of intentions. Programs, like the world, are simply not as neat as we'd like them to be.

Think of an algorithm as a recipe from someone with far more experience cooking than you. You can fumble around and feed yourself and call it a success, or you can read Julia Child and skip some of the fumbling. However, ultimately, it's you doing the cooking.
Was This Post Helpful? 4
  • +
  • -

#8 jjh08  Icon User is offline

  • D.I.C Head

Reputation: 55
  • View blog
  • Posts: 198
  • Joined: 13-July 12

Re: Importance of Algorithms?

Posted 07 March 2013 - 09:55 AM

Thanks everyone :) I really appreciate you all for responding. I will probably start working on some of the projects in Martyr2's project list after I finish studying my "Thinking In Java" book and I'll try to look more into algorithms in the future but not make it my main project.
Once again, thanks :)
Was This Post Helpful? 0
  • +
  • -

#9 codiddle  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 01-February 13

Re: Importance of Algorithms?

Posted 07 March 2013 - 06:55 PM

baavgai is a f@%@ing genius. Everything he says makes me understand programming a little more. He should write a book!
Was This Post Helpful? 1
  • +
  • -

#10 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5884
  • View blog
  • Posts: 12,769
  • Joined: 16-October 07

Re: Importance of Algorithms?

Posted 08 March 2013 - 03:38 AM

Not quite sure how to respond to that... takes a bow. The goal is to elicit understanding, so that's about as good as it gets.

Interestingly, I've known many geniuses who can't teach squat. The reason is that their understanding is mostly intuitive and they really don't see how someone else doesn't "get it." Or, perhaps, they are just lying to themselves and can't face that there was a time when they were just as ignorant as the rest of us.

Teaching is a beginner's mind exercise. You have to try to impart what you know while at the some moment recalling a time when you didn't know it at all. Some people are unable, or unwilling, to remember what it was like to be clueless. I don't seem to have a problem with clueless. :P
Was This Post Helpful? 1
  • +
  • -

#11 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7898
  • View blog
  • Posts: 13,434
  • Joined: 19-March 11

Re: Importance of Algorithms?

Posted 17 March 2013 - 09:48 PM

View Postbaavgai, on 08 March 2013 - 05:38 AM, said:

Teaching is a beginner's mind exercise. You have to try to impart what you know while at the some moment recalling a time when you didn't know it at all. Some people are unable, or unwilling, to remember what it was like to be clueless. I don't seem to have a problem with clueless. :P/>


This is very true. I also find it's important to treat teaching as a dialog. Me teaching you is not a one-way process, it's a dialog in which I have to be figuring out where exactly you're at, and responding to it. (and equally, you have to be trying to change your understanding based on what I'm saying). It's a cliche, but I never teach anything without learning something.


This is why great teachers don't always write great books: you don't just have to be one beginner, you have to be many beginners.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1