aspose file tools*
The moose likes Java in General and the fly likes who uses algorithms they learned in cs classes? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "who uses algorithms they learned in cs classes?" Watch "who uses algorithms they learned in cs classes?" New topic
Author

who uses algorithms they learned in cs classes?

will boyd
Greenhorn

Joined: May 16, 2001
Posts: 11
hi everybody,

i am wondering:

1) does anybody here use any of the algorithms they were taught in their cs classes during their everyday java coding gigs?

2) what algorithms that you learned in your cs studies have you used recently?

3) if you haven't used any cs studies algorithms in your real-world jobs, why not?

4) if you do use any cs algorithms in your real-world jobs, how often do you use them?

thanks in advance for your replies.
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
I, for one, can not say that I've ever directly used an algorithm I learned in class, except for the rare need for a select sort or what not.

On the other hand, I can say that I do use the sound principles of design and programming that I learned in class, through the development of inane assignments, everyday.
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
I agree with Ray. I don't use the algorithms themselves, but I do use the principles of algorithm design.


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
will boyd
Greenhorn

Joined: May 16, 2001
Posts: 11
3) if you haven't used any cs studies algorithms in your real-world jobs, why not?

can you talk about why you don't use the algorithms you studied in college? are they useless? i take it they don't have real-world applications?
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Originally posted by will boyd:
can you talk about why you don't use the algorithms you studied in college? are they useless? i take it they don't have real-world applications?
They absolutely have real-world applications. Thankfully, really cool people have written, tested and released good implementations of those algorithms so I never have to do it myself.

Don't think of the goal of CS classes as teaching you how to code a sort routine. Instead, it teaches you how to analyze, plan and code algorithms in general. Sure, you may write code to buble sort, quick sort, multiply arrays, factor primes and play checkers, but the algorithms aren't the goal. The goal is to give you enough practice writing algorithms so you can devise and write your own algorithms later.
Saket Barve
Ranch Hand

Joined: Dec 19, 2002
Posts: 229
I have never directly used any of the algorithms so far either. However, this alone cannot be a deciding factor for whether or not they are useful whilst pursuing the academics.

What the algorithms did do for me was, get my mind *thinking* in an efficient manner and in the right direction. This approach that started in the school days continues and helps till date.

Regards,
Saket
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11498
    
  16

I have never, in my professional career, had to use long division. It's something i was taught in school, and had to do hundreds, if not thousands of times then, be never in 'the real world'.

Does that mean it was not worth my time to learn it?

The purpose of school (imho) is not to teach you stuff you need to know, but how to think, and how to approach a problem. It give you tools you can use to analyze problems in the future. It gives you the building blocks that you can then take to construct larger, more elaborate structures.

so, you learn some well known algorithms that have probably been implemented in any language you would care to write in. Understanding how they work is an important step in knowing which tool to use.

Case and point - i was given the task of speeing up a program that was taking about 30+ hours. it was inserting some records into a flat file, but needed to maintain a sorted order (a database was not an option). The program read everything into memory, added a few lines to the end, then did a quick sort.

What did i learn in college? for large numbers of records that are already sorted, a quick sort is one of the WORST choices. i used a bubble sort and cut the time down to 5 minutes. Had i not learned about both bubble and quick sorts in college, i'm not sure how i would have cut the time down.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Jayesh Lalwani
Ranch Hand

Joined: Nov 05, 2004
Posts: 502
In 8+ years of programming, I had to implement a tree structure along with DFS and MRU caching in just one project, and all of these are some of the simpler algorithms. However, knowlede og Data Structures and algorithms has helped me because I use that knowledge when I design my Beans, like when I have to decide whther to use a LinkSet or a HashSet etc etc
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
In my first year of college, I was flunking electronics for the second time, with a second professor. My professor took me aside and asked me what the problem was. I pulled out the schematic diagram for a complicated analog circuit, and showed him how I could not see where the circuits we were learning applied. In other words, I was not advancing because I was stuck trying to apply what little I had already learned!

He laughed, then told me something that changed my whole life: He said that I misunderstood what college was all about. He told me that I'm not here to learn, I'm here to learn how to learn. What he meant was that once I left college and was out in the real world I would have a set of skills that would help me figure out how to solve real-world problems, and he was right. Not only was he right about that, but his "course correction" on how I was approaching college turned my gpa around to where I made the President's List that semester and never did poorly in a class again. That meeting still has effect in my life today, twenty-five years later. I never would have made it as an engineer without that advice.

I hope that helps.

And thank you, Professor Weston Beale. I miss you greatly, but I'm eternally grateful for your wisdom and your willingness to work with a flunking student!
will boyd
Greenhorn

Joined: May 16, 2001
Posts: 11
for people who read my first post and jumped to the conclusion that i was some wide-eyed, naive student seeking sagely advise on how to deal with an algorithm class, you have guessed wrong. i'm not asking for advice.

anyway, it is still interesting to read the different responses and analyze why people probably respond the way that they do.

i probably should have made it clear that i was not referring to algorithms in the general sense. i was refering to the cook-book style application of specific algorithms (from the already existing body of algorithms that have been discovered, analyzed and documented).

its obvious that every programmer has their own particular take on algorithms. i think it is fair to say that whether or not a given programmer "implements" (as opposed to simply "using") algorithms has a lot to do with how well they grok algoritms on an academic level.

thanks again.
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
In that case, I can give a very brief response: Algorithms from college, no; algorithms from the programming community, yes.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 905
    
    5
It is not useless to be exposed to algorithms even though one does not forcibly use them as pointed out in the previous posts with which I agree.

I once had to program (in Cobol) some sorting. I tried the simplest and least sophisticated algorithm and found out that 90% of the whole processing time was due to the actual reordering of the records in the database, which could not be made faster, and 10% went for the sorting itself: it had been pointless to optimize it.

The way we program has evolved since. There are mature libraries to rely upon, we use components etc.
The good old days of programming monolithic programs and rolling out your own implementations even for basic algorithms seem to have mostly gone.

But that does not mean one does not need to know about algorithms, their speed, simplicity vs. speed or time vs. space trade-off issues etc.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8419
    
  23

will boyd wrote:for people who read my first post and jumped to the conclusion that i was some wide-eyed, naive student seeking sagely advise on how to deal with an algorithm class, you have guessed wrong...

Nope. To be honest, it sounded like you might be trawling for information for a thesis.

For my part, I certainly use some of the algorithms I learned in CS, but not on a daily basis. And I totally agree with Fred's post, and can't really add much to it.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: who uses algorithms they learned in cs classes?