Aamir has posted 1 posts at DZone. View Full User Profile

Complex Algorithms: Are They Still Something That Young Developers Should Know?

  • submit to reddit

I've been a Java developer for the last three years, and I have developed many applications. What I have oberserved over the time was that the most of thecoding is just simple if-else and/or loops. You rarely have to code a really complex algorithm.

So I am considering whether is it really worthy for young developers to know complex algorithms?  One more aspect to this is that these days we have a large variety of huge memory disks available at cheaper rates, so do we really need to take care the memory in our code ?

This is my very first article I have ever written to Java Lobby, so I dont know whether it is the right format or not but I am just passionate to be in the circle of knowledge with you respected guys. So please ignore minor mistakes if i made any.



Amir Iqbal

Published at DZone with permission of its author, Aamir Iqbal.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Hrishikesh Kumar replied on Fri, 2011/05/20 - 2:21am

Good observation. May be since you are a junior developer, you are probably not faced with coming up with a complex algorithm yet. But complex algorithms are not always what people will be writing in real world. The applications that are developed must be adhering to design principles and patterns. You need to be consistently thinking about how to simplify things and even if you were supposed to write a "complex" algorithm, you must learn what design patterns to use so that is is maintainable and accommodate every changing requirements.

Daniel Alexiuc replied on Fri, 2011/05/20 - 2:24am

It's true, programming in Java does sometimes seem like an endless repetition of if-else and for loops.

 Have you ever asked yourself why you are being forced to write the same boilerplate over and over again? Or if there is any way a computer could do this part for you so you could just focus on the interesting problems?

Zqudlyba Navis replied on Fri, 2011/05/20 - 5:07am

If you are a Business Application Developer, you'll probably never encounter complex algorithm.

The lower down the stack you develop (i.e. closer to the metal), the more you will need all the CS stuff you learnt in grad school.

You will also encounter complex algorithm in Games Development, Tools Development, and Business Application Development that deal with the stock market and playing with other people's money.

Aamir Iqbal replied on Fri, 2011/05/20 - 7:28am

First of all thanks alot for reading my article. It gives me feel that yes i can write some stuff which others can understand :) ... Thumbs up for you guys.



@ Hrishikesh Kumar:

     You are totally right. So what i got from your reply is, that more or less we should focus on "Design Patterns" rather learning and calculating Space and Time Complexities for a code segment.As far as my personal experience indicates that yes mostly a developer has to play with Design Patterns, so good background in Design Patterns will help you alot in professional environment.

@ Daniel:

    Well what i think is most of the time  IF-ELSE statemetns are your business flows. For that you need to have a developer who will transform business flows in proramming codes. As far as your question about asking myself is concerned, dear i get money for these boilerplates :)  

 @Zqudlyba Navis:

    Dear i agree with your point. nice reply too :)


Thanks everyone



Amir Iqbal



Ronald Miura replied on Fri, 2011/05/20 - 7:39am

Even as a Business Application Developer, you'll eventually use the knowledge.

Probably not exactly the dynamic programming algorithms you studied (I assume you aren't saying sorting algorithms are complex...), but the knowledge about what makes an algorithm scalable (including notions about computational complexity theory), or whether it is parallelizable. You study complex algorithms not because teachers think everybody will need to implement a text search engine someday, but because they will give you the notion of how complex some problems can get, and how to solve them, or whether they are solvable at all.

And yes, you must worry about memory and disk issues, even if they are cheap. I've seen too much problems caused by junior programmers abusing the GC and databases (they work with memory and disk, you know...). The mantra 'do not optimize until necessary' people keep repeating nowadays is good and all, but it will be necessary MANY times, and you need to know how to do it, how to test it, how to find what to test. And those ARE algorithms.

Terence Mill replied on Fri, 2011/05/20 - 7:43am in response to: Hrishikesh Kumar

I often also see pages of if else staments, many classes and variables doing an algorithm solving a "standard problem" which can bed done on even one page. Many lines of code can also mean to get complex, also as too short written code can be difficult to understand for other than the coder himself. Mostly all problems we solve every day are an composition of well known "patterns" and algorithms. As for many java developers it is naturally to base on a huge number of free and good quality components which hide away far complex problems. This can stimulate we don't need to undertsnad any more what this components realy do. In many cases that is a dead end in terms of performance (e.g latency), ressource consumption, scalability and realibilty. Don't repeat yourself is a good pattern but, it's not just doing lego systems. Its very useful to know what's moving in the background and know how to adapt this or even fix it to your needs. In think you can't solve problems of your software which is made of more than 50% percent foreign code (free compoents) without the base knowledge of algorithm techniques its based on.

Mikael Couzic replied on Fri, 2011/05/20 - 8:26am

I've come to consider design and algorithms as two different fields. You can suck at one and be awesome at the other. However, as you point out, a developer can be successful even if he's a noob in algorithmic, but he'll get nowhere if he doesn't learn at least the core design principles and best practices.

Nicolas Seyvet replied on Fri, 2011/05/20 - 9:51am

I would say that a moderate knowledge of algorithms is a must for any good SW developer. Knowing the proper way to solve a problem can avoid lots of if/else and lots of boiler plate. It is almost as important as design patterns. If I was to rank them: 1) Design patterns 2) Algorithms 3) Being a master at the used language

Jim Bethancourt replied on Fri, 2011/05/20 - 10:04am

It is important for developers to know their algorithms, even for business applications. The Collections Framework uses algorithms heavily, and it's important to know what algorithms and data structures are used behind each implementation.

Putting objects in something as simple as a list vs. a set can have a significant impact on performance and correctness for the given application, as well as the implementation chosen for the given collection. How often will the collection be updated, how often will it be read? How many elements are expected to be in the collection? log(n) performance won't make much of a difference for 100 elements (a typical developer dataset) over (n) , but is a huge improvement over (n) if you're dealing with tens or hundreds of thousands of elements (even millions).

James Jamesson replied on Fri, 2011/05/20 - 1:46pm

no need

Martijn Verburg replied on Sat, 2011/05/21 - 3:40am

My take on it is that a majority of business application developers do not need to know how to _implement_ these algorithms, but that they certainly do want to know about them and their characteristics. For example, choosing the wrong data structure in Java because you did not know the various underlying algorithms could cause great harm to your project (as people have mentioned above).

Liam Knox replied on Sat, 2011/05/21 - 6:24pm

What is life? What is coding? It is all conditional if then else's. This is not a bad thing. What is bad is when these conditional cases are expressed in such a way that blurs their meaning. Polymorphic dispatches etc. are great tools against this. But don't be blinded by the fine art. They are just an 'if' statement too

On your 'complex algorithm' can you give an example? Personally I would like to see developers code simpler. Look at Google collections API. The pure idea of basing this on Iterable has massive benefits for performance and purity. Look at the original design of Iterator. The remove() method is a massive wart on a great idiom. Less is absolutely more.

Liam Knox replied on Sat, 2011/05/21 - 6:31pm in response to: Martijn Verburg

I find it amazing that you can know what 'algorithms' are the subject of this article? Are you a magician that can read the authors mind? He certainly hasn't stated any. This fact does make this a very poor article in the first place

Nicolas Bousquet replied on Mon, 2011/05/23 - 3:25am

Complex Algorithms: Are They Still Something That Young Developers Should Know?

Well I don't think so. If you think about it, it is already the case, most young developpers havent studied complex algorythms. But most computer science students haven't really studied really complex things anyway. Be it for algorythms or design, languages...

The goal is to give the student all it need to understand what's going on. So we must give a base understanding needed in many aera so hoppefully he can understand and make informed choice in the future.

The student/young developper will then specialize on a domain, like processor design, web applications or financial systems. The job the young developper will have will give him more more specialization and a deep understanding of this domain. This is where specialisation and expertise is build.

So no most youngs developpers don't need complex algorythms knowledge. They will learn if needed.

Erin Garlock replied on Mon, 2011/05/23 - 8:02am

The business applications I develop are far more complex than anything I did in college.  Sorts, lists, memory managers, compilers, ray-tracing, fuzzy logic - in retrospect it all seems pretty simple these days, not that I remember how to do some of those activities, but those problems were well defined and finite.

 I have found that in the business world, most requirements fall into some flavor of "fuzzy logic" and have a zillion edge cases - it's more like differential calculus than programming 101 or 201.  Having weird problems in college enables oneto encounter weird problems in the real world and build upon a solid foundataion.

I've seen too many programmers who earned their degree from a program that is more a high school vocational program (learn the language, learn a framework, build some simple apps).  These people are quick to lay down the framework and get the app server up and running, but in the long run I find much of their coding skills are attrocious and the final code in unmaintainable.  Kind of like ditch-digger vs. profesional bridge engineer - both are doing construction activities, but on only one person's bridge would I drive.


Liam Knox replied on Tue, 2011/05/24 - 7:28pm in response to: Nicolas Bousquet

Assuming you are a software engineer. 1. You need to define your problem. 'Complex Algorithms' , no offence but what does that mean? Once I understand question I can try to answer. Complex? I find a totally baffling and non articulated article much more difficult to comprehend.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.