# Importance of Algorithms

Page 1 of 1

## 13 Replies - 20379 Views - Last Post: 13 September 2009 - 03:39 AM

### #1 sparkart

Reputation: 115
• Posts: 696
• Joined: 16-February 09

# Importance of Algorithms

Posted 03 September 2009 - 09:50 PM

I've just started reading the following title: "Introduction to Algorithms"

After reading 30 pages it seems very detailed and technical (but definitely not something easy to understand). It also doesn't use a specific language, instead, it uses pseudocode.

For those of you that are working in the software industry how important do you think a deep understanding of algorithms is. For instance, being able to compare two algorithms and determining which one is more efficient.

When writing software do you evaluate the algorithms efficiently a lot, or do you simply try to get the desired output?

This book has over 900 pages and I don't think I can go through the entire thing.

Is This A Good Question/Topic? 0

## Replies To: Importance of Algorithms

### #2 BetaWar

• #include "soul.h"

Reputation: 1513
• Posts: 8,290
• Joined: 07-September 06

## Re: Importance of Algorithms

Posted 03 September 2009 - 10:04 PM

Well, this like many things in the Comp/Sci industry is determined by what you are attempting to accomplish. If you need to get something out the door sloppy can work, but you will need to get it up to snuff in an update or later version.

Here is an (overly) general definition for algorithms:

Quote

Algorithm - series of instructions
Algorithms are converted into programming languages, programming languages are converted into binary instructions for the computer to run

Now, Big O notation can come into play when you are looking at things such as sorth algorithms. Sure, a selection sort or bubble sort is quite capable of getting the basic job done, but a quick sort, merge sort, or flash sort can accomplish the same thing in significantly less time. Given that algorithm effenciency is one aspect of programming that should definately be taken into account (though I don't see how a book could take 900 pages to say that...).

Hope that makes sense.

Reputation:

## Re: Importance of Algorithms

Posted 03 September 2009 - 10:47 PM

e_barroga, on 3 Sep, 2009 - 08:50 PM, said:

how important do you think a deep understanding of algorithms is.

One of the most important, if not the most important skill a programmer could possess. Computer programs are nothing but a set of algorithms. Not having a deep understanding of algorithms means not having a deep understanding of your own programs.

Quote

For instance, being able to compare two algorithms and determining which one is more efficient.

Although you may not find yourself analyzing algorithms a lot, while working as a computer programmer, learning to analyze algorithms is a part of having a deep understanding of them. Can't really understand an algorithm without knowing which operations its performing and when, right? Furthermore, you must be able to design your own algorithms, and you cannot properly do it without performing an analysis.

Now, of course you can become yet another .NET codemonkey developing yet another .NET database application, in which case you can take that book and shove it into a fireplace - you won't need it.

### #4 mostyfriedman

• The Algorithmi

Reputation: 729
• Posts: 4,473
• Joined: 24-October 08

## Re: Importance of Algorithms

Posted 04 September 2009 - 11:46 AM

I agree with Neumann and Beta, but i think it really depends on what kind of development you wanna do as Neumann said. if you wanna work for Google you will have to be freaking good at analyzing and developing your own Algorithms, I have 2 friends who go to Uni with me and they both got an internship at Google this summer because they are damn good with that Algorithm stuff. I believe every programmer should have at least some understanding of analyzing algorithms, after all its really fun to think about smart ways to do things and it ALWAYS pays off. I'm reading the same book as yourself actually

### #5 sparkart

Reputation: 115
• Posts: 696
• Joined: 16-February 09

## Re: Importance of Algorithms

Posted 04 September 2009 - 01:36 PM

When I say "an understanding of algorithms" I don't mean, knowing what an algorithm is doing I am actually relating to understanding the efficiency of an algorithm.

You could say that everything you write is an algorithm so having an understanding of algorithms is definitely important, although this isn't exactly what I mean.

### #6 mattman059

• Epic Awesomeness

Reputation: 15
• Posts: 538
• Joined: 23-October 06

## Re: Importance of Algorithms

Posted 04 September 2009 - 03:03 PM

if I may interject, this wouldnt happen to be "Introduction to Algorithms" by Cormen, Leisserson, Rivest, would it? If it is, that is an excellent book. I highly recommend it to anyone..however, I also recommend "The art of computer programming" by Donald Knuth.

My point is these are excellent books that you can use to further your knowledge of algorithms and programming in general.

My suggestion for your first venture into learning algorithms is to get a book in your favorite language (say C++) on the subject of "Data Structures and Algorithms in <insert language here>"

Some good ones that i've come across are
"Algorithms and Data Structures in C++" by leendert ammeraal
"Data Structures in C++ : Using the Standard Template Library" by Timothy Budd
-more advanced- "Data Structures, Algorithms, and Applications in C++" by Sartaj Sahni

This post has been edited by mattman059: 04 September 2009 - 03:03 PM

### #7 KYA

• Wubba lubba dub dub!

Reputation: 3202
• Posts: 19,233
• Joined: 14-September 07

## Re: Importance of Algorithms

Posted 05 September 2009 - 10:04 AM

Neumann, on 3 Sep, 2009 - 10:47 PM, said:

e_barroga, on 3 Sep, 2009 - 08:50 PM, said:

how important do you think a deep understanding of algorithms is.

One of the most important, if not the most important skill a programmer could possess. Computer programs are nothing but a set of algorithms. Not having a deep understanding of algorithms means not having a deep understanding of your own programs.

Quote

For instance, being able to compare two algorithms and determining which one is more efficient.

Although you may not find yourself analyzing algorithms a lot, while working as a computer programmer, learning to analyze algorithms is a part of having a deep understanding of them. Can't really understand an algorithm without knowing which operations its performing and when, right? Furthermore, you must be able to design your own algorithms, and you cannot properly do it without performing an analysis.

This. To add onto it a bit, the ability to recognize (roughly) running time by looking at it [the algorithm] is useful as well. You can then compare various solutions you come up with with the one that balances requirements and efficiency the best.

### #8 kingfeanor

Reputation: 47
• Posts: 62
• Joined: 18-April 09

## Re: Importance of Algorithms

Posted 05 September 2009 - 04:40 PM

e_barroga, on 3 Sep, 2009 - 08:50 PM, said:

For those of you that are working in the software industry how important do you think a deep understanding of algorithms is. For instance, being able to compare two algorithms and determining which one is more efficient.

When writing software do you evaluate the algorithms efficiently a lot, or do you simply try to get the desired output?

I work in Data Quality software and of my grad school classes, Algorithms is the one I use most often. When you are developing enterprise class software, speed matters and well designed algorithms can make your software a market leader or just another product in the category.

Being able to analyze how quickly a particular clustering algorithm, distributed sort, or graph traversal operates is very important in the software industry. And since I might be working in Java today, C++ tomorrow, Python next week and who knows what next year, being able to do so using Big-O in pseudo-code is important.

### #9 sparkart

Reputation: 115
• Posts: 696
• Joined: 16-February 09

## Re: Importance of Algorithms

Posted 05 September 2009 - 06:48 PM

What is your take on "pre-optimization"?

There's this quote that says: "Premature optimization is the root to all evil" and that optimization should be done when the problem is already solved and the client requests faster code.

Reputation:

## Re: Importance of Algorithms

Posted 05 September 2009 - 07:09 PM

My take is, I agree with Knuth (guy who made that statement) to some extent. Yes, worrying too much about optimization while in the process of designing is a bad thing and will most likely result in more bugs and hard-to-debug code. However, performance is still a part of the program's design, so the programmer should keep that in mind while writing the code. The key is to balance performance and design goals.

This post has been edited by Neumann: 05 September 2009 - 07:10 PM

### #11 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12317
• Posts: 45,416
• Joined: 27-December 08

## Re: Importance of Algorithms

Posted 06 September 2009 - 07:26 PM

Neumann, on 5 Sep, 2009 - 08:09 PM, said:

My take is, I agree with Knuth (guy who made that statement) to some extent. Yes, worrying too much about optimization while in the process of designing is a bad thing and will most likely result in more bugs and hard-to-debug code. However, performance is still a part of the program's design, so the programmer should keep that in mind while writing the code. The key is to balance performance and design goals.

+1

To add a little bit, when I'm designing an algorithm I ask myself 3 questions: what, how and why. What data structure am I using? Why am I writing this program (purpose)? And lastly, how should I solve this problem (or what mathematical structures are involved)? A lot of the time, your solutions can be found in mathematical structures, hence all the math required in CS programs.

### #12 Mangotastic

Reputation: 6
• Posts: 46
• Joined: 15-October 08

## Re: Importance of Algorithms

Posted 07 September 2009 - 12:35 AM

I would have to agree with the posters before me, the ability to evaluate the efficeny of differening algorithms is a task-dependant technique. I've worked, for example, with systems that need to be quick out the door and speed is not as much of an issue and systems where speed is absoultely paramount and development time is negotiable. The classic comparission is with real-time and non-real-time applications where a pilot needs the speed and a ticket office needs the maintainability.

However, as a student I tried to get my hands on anything that I could possibily offer a potential employer because you never know what you'll be working on when your in the indurstry. It's very rare for you to be able to plan your studies and go straight in to the job you wanted.

### #13 cfoley

• Cabbage

Reputation: 2388
• Posts: 5,013
• Joined: 11-December 07

## Re: Importance of Algorithms

Posted 07 September 2009 - 04:59 AM

There are also the times where two easy-to-code alternatives occur to you. It's worth being able to say this is O(n) and that is O(n^2) so I'll do the first.

### #14 Crunch

• D.I.C Lover

Reputation: 139
• Posts: 1,222
• Joined: 28-July 09

## Re: Importance of Algorithms

Posted 13 September 2009 - 03:39 AM

Algorithms

List of algorithms

By reading the List of algorithms article you can really see the importance of algorithms. It's used almost everywhere.