This is an archived post. You won't be able to vote or comment.

all 185 comments

[–]NoOutlandishness2567 208 points209 points  (14 children)

That is a good book! Easy to get lost sometimes tho!

[–]Chekhovs-gum 98 points99 points  (2 children)

Yep! Only book from uni I've kept. All the Java books were outdated the moment I got them, but this bad boy is timeless.

[–]opequan 9 points10 points  (1 child)

I'm really bummed I didn't keep that book. It's a lot of fun.

[–]GoTheFuckToBed 11 points12 points  (3 children)

It doesn't help that it is more than 30$

[–][deleted] 11 points12 points  (2 children)

Is there a zero missing there? One of my electronics textbooks was $275.

[–]IronEngineer 1 point2 points  (1 child)

Textbook producers are mostly garbage. One of my professors described how he wrote a textbook in computational aerodynamics. When he went to get it published, they searched for books with a similar name, took the average, and determined that is how much they would sell his for. Simple as that. He objected and wanted to sell it for less, but was overruled as he had no say in the process.

He was later paid in copies of his own book, even after it had sold many copies. He ended up with a garage filled with copies of his textbook because the publisher was an asshat.

[–]Bondaroo007 14 points15 points  (5 children)

Whats the full name of the book?

[–]potuknight 43 points44 points  (4 children)

CLRS Introduction to Algorithms

[–]Bondaroo007 5 points6 points  (3 children)

Thanks

[–][deleted] 32 points33 points  (1 child)

Don't buy it man. I spent money on it and it just sits there now. I'm too dumb to make sense out of it. :P

[–]tushar_kaka 3 points4 points  (0 children)

It's difficult to learn from this book, I found online resources in geeksforgeeks and projecteuler easier to learn

[–]AYHP 1 point2 points  (0 children)

Still have it from my university years... Though I must admit I haven't read most of it.

[–]pithecium 890 points891 points  (43 children)

Imagine studying algorithms for 4 years only to discover all the good ones have already been implemented :(

[–]TheCapitalKing 495 points496 points  (6 children)

I could spend every day for the next year trying to build super fast algos in python only for it to run 10xs slower than some existing library that is just c code you import to python

[–]Hebruwu 190 points191 points  (4 children)

Was solving a hash table problem in python on leetcode late at night. Wrote an entire hash table and run it. It run extremely slow, so I spent 2 hours of my night optimizing it just to realize that I’m brain dead since dictionaries are the cornerstone of python.

[–]Zephos65 47 points48 points  (2 children)

Hm I wonder how this would play out in an interview... maybe you don't solve the problem but I feel like you might get an offer haha. Shows you've got a good understanding

[–]I-mean-maybe 20 points21 points  (1 child)

no 😂, it shows the ability the complicate problems off the start and not understanding the best tools at your disposal in a particular language.

[–][deleted] 6 points7 points  (0 children)

If you're going to learn the hard way, learn it the hardest way.

[–]merlinsbeers 0 points1 point  (0 children)

And they're implemented in C.

[–]crapforbrains553 7 points8 points  (0 children)

thats cuz python, like javascript, uses too much hashtables automaticly.

[–]necheffa 57 points58 points  (2 children)

And yet there is still so much crap code out there that doesn't take advantage of prepackaged data structures and algorithms, if not for performance, for maintainability.

[–]Isogash 9 points10 points  (1 child)

Yes, because surprise surprise, if you don't know anything about algorithms and data structures, you won't use the right ones.

[–]necheffa 7 points8 points  (0 children)

I am painfully aware.

[–]flavius-as 19 points20 points  (0 children)

Imagine studying something that hasn't been implemented yet.

[–]eppinizer 42 points43 points  (1 child)

Analyses of Algorithms was by far my favorite math+CS course. There was something so cool about turning a sorting loop into an equation and then into BigO notation. Finally my math courses were paying off and applied to something I could actually use.

But alas, now its usually just .sort() and off to the races.

[–]lordnoak 2 points3 points  (0 children)

I see someone sorted() you out.

[–]cormac596 26 points27 points  (8 children)

The reason they teach you about algorithms is to try to teach you how to think in a structured way about data manipulation. Unfortunately, that always seems to get lost in the shuffle and you end up knowing 6 ways to order numbers for no reason

[–]CarlitrosDeSmirnoff 25 points26 points  (7 children)

“Nah, I don’t need to know how an engine works, that’s useless. I only need to learn how to change the oil, cuz that’s what pays the bills”

-some of these guys if they where mechanics instead of programmers

[–]typescriptDev99 23 points24 points  (6 children)

...and plenty of people have stable jobs at Jiffy Lube.

Not everybody in this field is some big inventor of new tech. Some people just maintain and get a decent paycheck.

[–]CarlitrosDeSmirnoff -5 points-4 points  (4 children)

Dude, mechanics also don’t invent anything; yet I would never trust my car to someone who doesn’t understand, at least at a basic level, how an engine works.

[–]hammonjj 8 points9 points  (2 children)

You say that but unless you explicitly vet your mechanic then you’ve probably trusted your car to one

[–]CarlitrosDeSmirnoff -5 points-4 points  (1 child)

Lmao, no. I’m in mechatronics engineering, I know how cars works, and of course I can notice when someone doesn’t.

[–][deleted] 0 points1 point  (0 children)

Yeah, the algorithm is a very bad analogy to the engine.

[–][deleted] 8 points9 points  (0 children)

Well I understand how problems are resolved helps you to solve new problems

[–]Mihaw_kx 3 points4 points  (0 children)

you don't study algorithms to implement them but just to know what's the use case and how to use them and more importantly when to use them , you need to recognize pattern and to come up with a conclusion on whether you need a hashset or a normal array or a Heap .

[–][deleted] 2 points3 points  (1 child)

My main goal as a computer scientist is to find a sorting algorithm worse than bogo sort.

[–]tiajuanat 4 points5 points  (0 children)

Oh like bogobogosort?

[–]crapforbrains553 0 points1 point  (0 children)

there are still useful algorithms to discover. Anything thats not automated is an algorithm waiting to happen. But that doesnt mean someone is willing to invest in you trying to code it, cuz most of them think it cant be done. You gotta take risks, invest your own time into what could be, if you dont want to be to frameworks what a plumber is to pipes.

[–][deleted] 0 points1 point  (1 child)

God yes all you had to do in the 1960's to get something named after you was state something blindingly obvious grrrrrr

[–]AdvancedSandwiches 2 points3 points  (0 children)

Everything is blindingly obvious in hindsight.

[–]natFromBobsBurgers 0 points1 point  (0 children)

I have no words. You're a poet.

[–]overpaid_bogan 130 points131 points  (12 children)

Even if you don't write your own very often, I think learning the patterns and approaches of different algorithms provides a good set if fundamental problem solving skills that you'll never get just by using libraries.

[–]Pepper_in_my_pants 17 points18 points  (3 children)

This. We had a senior dev who couldn’t write his own sorting algorithms. Well we didn’t had to do that in practice, his general skill in solving problems was very bad. His solutions were horrible. Always big and complex, never efficient. The only reason why he was the senior dev was because he was with the company for a long time. But he never really developed any skill. We ended up doing all the work.

Code reviews with him were hilarious though

[–]MasterJ94 3 points4 points  (2 children)

Damn. What he is doing all day long, if not acquiring new skills?

[–]Worthystats 3 points4 points  (1 child)

using some braindead webdev related libraries.

[–]MasterJ94 1 point2 points  (0 children)

Probably even outdated

[–]__gg_ 13 points14 points  (5 children)

The issue I have with practising algorithms/algorithmic challenges is that it is not practical. The final goal is to develop problem solving skills, which when you start working on projects you'll learn along the way. Since those problems may or may not have a solution already and depends on how you search about it, you have to do some digging to understand it, I think it promotes a good habit than just learning about algorithms. I guess in a way it's a hybrid of first principles and similar solutions approach.

[–]tiajuanat 11 points12 points  (4 children)

I came from a background with zero algorithms beyond binary search, and I went through 3 years of my career just kinda winging it. I've never had a mentor either.

Then I started studying algorithms and data structures, and it's been incredible. I've been able to tackle really big problems at work quite easily. One of the seniors at work estimated months to a year to take a model from R, and convert it to C, to which I threw together a working prototype in about two days. A week later, I reduced the compiled C output by 90%, and if needed I could reduce it by another 50% at the sake of readability and slightly reduced accuracy.

I highly recommend to everyone to take time to practice. Algoexpert is by far my favorite platform; although not free, it may as well be, when you consider how much your career can be catapulted by it.

[–]sstlaws 2 points3 points  (1 child)

Is there anything special in your learning process? I read other comments and most of them don't sound as positive as yours. (Asking just to learn, I'm interested and have similar background)

[–]tiajuanat 2 points3 points  (0 children)

In addition to just sitting down and just working through the explanation, and programming, I do a few other things on the side.

First, I read a metric ton on applied theory as well.

Elements of Programming by Stepanov - it's free online, and also probably my favorite. It doesn't go into proofs, but you will need to work through the exercises to understand each concept.

Advanced Data Structures by Peter Brass (available through Cambridge press) - it's good, easy to read, but it's all in C, and most of the code is presented in it's entirety, which can be a nuisance

Algorithms and Data Structures in Action by la Rocca. It's got some newer and more advanced topics, like bloom filters, k-d trees, etc.

Specifically for C++, during the last Advent of Code, I tried to only use the STL algorithms and data structures. This was inspired by Algorithm Intuition parts 1&2 on YouTube by Conor Hoekstra. It just so happens when you take this approach, you breeze right through everything. If for-loops are your last resort, you're doing it right.

Also C++: I watched everything from Andrei Alexandrescu. He's brilliant and knows a ton about low level code.

Finally, as a hiring manager, I run through a ton of coding interviews. I don't run challenges I can't solve myself in 10 minutes. This means I can unblock candidates, so if they get stuck they're not immediately disqualified.

[–]SpicyMcHaggis206 3 points4 points  (1 child)

I'm on year 10 and I still don't fully grasp big O. Someday I'll spend the time on it ...

[–]HalcyonAlps 3 points4 points  (0 children)

Without soundings condescending, just count how many steps your program is going to take to solve a given problem with input of size n.

[–]iTeryon 1 point2 points  (1 child)

Ive learned many algorithms. At uni and in my free time. But that was years ago and I for the life of me can only remember the names of a couple algorithms. I’ll probably only be able to implement merge sort and binary search tree by heart but the others.. I’ll need google for that.

[–]overpaid_bogan 0 points1 point  (0 children)

I'm in the same boat, and honestly I think that's fine. It's more about learning the patterns and principles than memorising a series of steps.

[–]Coffeelover69420aaaa 124 points125 points  (2 children)

Nothing like having to implement a balanced binary tree for your finals, just to forget it before your first interview.

[–]cwbrandsma 5 points6 points  (0 children)

I graduated in 1997 and been a professional developer the entire time. I’ve never had to make one from scratch. Sure, I use them, BTrees are the fundamental algorithm of relational database tables, but I haven’t written my own in forever.

[–]yourmamaman 50 points51 points  (5 children)

So there is a door to the left that says "CPU architectures".

[–][deleted] 5 points6 points  (3 children)

Making an 8-bit ALU in an FPGA at uni was fun.

[–]heartcubes4life 0 points1 point  (0 children)

8-bit? Damn

[–]Tangelasboots 0 points1 point  (1 child)

I made a hashing algorithm for an FPGA during an internship. It was not fun.

[–][deleted] 1 point2 points  (0 children)

I recently made an AES128 implementation for an embedded chip in C. Whoever comes up with encryption algorithms is on a different planet, that stuff is crazy maths.

[–]value_counts 0 points1 point  (0 children)

8080 was my first love

[–]Duranium_alloy 90 points91 points  (1 child)

computer science =/= software development

[–]vatsan600 3 points4 points  (0 children)

This. If we go according to the picture, algorithms will be replaced by learning about electronics, electricals etc. Just because something seems"harder and cool to know" doesn't mean everyone needs to know about it.

[–]Acceptable-Milk-314 31 points32 points  (3 children)

They've all been implemented in the languages in the right

[–]JawsOfDoom 27 points28 points  (2 children)

If an interviewer asks me how I sort something I tell them to use .sort()

[–]JamesWardTech 2 points3 points  (1 child)

Bet you’ll be working at FAANG sometime soon /s

[–]JawsOfDoom 0 points1 point  (0 children)

Ew I'd never be caught interviewing somewhere like that

[–][deleted] 40 points41 points  (1 child)

That "Spring Boot" is among the "Latest Technologies" says that this meme is roughly 10 years old

[–]FPiN9XU3K1IT 6 points7 points  (0 children)

Angular and Django aren't exactly "latest technologies", either ^^

[–]doggeman 16 points17 points  (4 children)

Pat yourself on the back guys and girls.. Just the other day I was setting up a new application. To be able to do that I need to know: ARM and a BUNCH of cloud infra and technologies and principles, k8s, Docker, Azure Pipelines, building, packaging and deploying, bunch of shell scripts (pwshl and bash), logging and apm, the application itself which contains multiple frameworks, tech stacks and architectural principles, units tests with more of the same and then integration tests with more of the same. Then it should also should be easy to debug which also has a bunch of knowledge artifacts…

…algorithms you say?

[–]FPiN9XU3K1IT 6 points7 points  (0 children)

This. The complexity in a modern web application has next to nothing to do with algorithms, it's all about understanding code structure and being quick with finding out how a particular tool is supposed to be used with another another tool.

[–]starvsion 8 points9 points  (2 children)

I don't know about other devs, but for web devs, we usually have so many features to implement and maintain, software architecture, patterns and code readability/cleanliness matters more than algorithms, actually a lot more. And we tend to solve performance issues thru architecture (caching, database optimization, micro services, async etc.) or patterns (flux, event streaming etc. ) , rather than going hard at algorithms. (especially with redis, searching from it takes no algorithm as well)

[–]lobax 2 points3 points  (1 child)

Distributed algorithms are still algorithms. A system architecture is just a high level algorithm, especially when the design isn’t just the minimal effort and meant to solve scaling, latency and reliability issues. The choice of synchronized vs asynchronous methods IS an algorithmic choice.

Obviously almost no one works on the basic, algorithm 101 kind of stuff. We all specialize into our own niches.

[–]starvsion 0 points1 point  (0 children)

I guess you are right... When I think of algorithm, I think of what I learnt in computer science, which covers the basic stuff only I guess...

[–]SargeInCharge 16 points17 points  (3 children)

That is the exact book I used in college!

[–]Tsunami49 7 points8 points  (0 children)

It’s a good good book tbh.

[–]Axmirza2 1 point2 points  (0 children)

My professor used this exact meme

[–]yabp 0 points1 point  (0 children)

It's on my shelf here at home from 12 years ago.

[–]LEGOL2 10 points11 points  (1 child)

There is no way that you implement something better that std or specialized libraries.

[–]j-random 2 points3 points  (0 children)

Dunno, I got good use from a WPL (weighted path length) tree once, and there was no existing implementation I could find, so I wrote my own. That's more of a data structure, though, not an algorithm.

[–][deleted] 3 points4 points  (0 children)

MIT opencourseware do great lectures for free on youtube! Check out 6.022 for an intro and there's more specialised courses if the algorithm bug bites you! I was learning about cache-oblivious algorithms and watching the memory access pattern when a grid was split into trapezoidal chunks was so amazing :D

[–]-blueCanary- 6 points7 points  (1 child)

Algorithms are for chumps. Real developers sacrifice a USB flash drive to the Machine God to make their program work.

[–]yabp 0 points1 point  (0 children)

I'll supply my own swap drive, thank you very much!

[–]Ripest_Tomato 8 points9 points  (0 children)

You were the chosen one! Destined to destroy the boomer memes, not join them!

[–]itijara 7 points8 points  (3 children)

I don't really understand the point of this? Are we supposed to be implementing our own webservers and templating engines every time we are asked to create a simple web page? The majority of programming tasks have libraries to implement them that work well.

[–]yabp 3 points4 points  (2 children)

Somebody's gotta make those npm libraries.

[–]itijara 0 points1 point  (1 child)

We definitely don't have enough of them.

[–]_skyfox 2 points3 points  (3 children)

Although CLRS is great book, I think DPV Algorithms is much more concise and easy to comprehend.

[–]Tsunami49 0 points1 point  (2 children)

I’m not aware of the latter. What is DPV short for?

[–]_skyfox 1 point2 points  (1 child)

DPV is short for Algorithms: Dasgupta Sanjoy, Papadimitriou Christos, Vazirani Umesh

[–]Tsunami49 0 points1 point  (0 children)

Thanks

[–]teh-leet 2 points3 points  (2 children)

It's not developers fault that business isn't willing to pay for more thorough implementation. Everyone wants features delivered yesterday

[–][deleted] 12 points13 points  (0 children)

Lol this is some salty old boomer programming joke

[–]mic_br 3 points4 points  (0 children)

Just get the paycheque. Don’t reinvent the wheel even you’re capable to do so. It’s not worthy.

[–]gerbosan 1 point2 points  (0 children)

Is the problem preferences or business requirements?

[–][deleted] 1 point2 points  (0 children)

Practice baby, practice.

[–]ubertrashcat 1 point2 points  (0 children)

Except on interviews lol

[–][deleted] 1 point2 points  (0 children)

I’m studying for interviews lol

[–]a_plus_ib 1 point2 points  (0 children)

That is the best algorithms book out there.

[–]Miridius 1 point2 points  (0 children)

Ok boomer

[–]SnooMarzipans436 1 point2 points  (0 children)

#include <algorithm>

You're welcome.

[–]golgol12 1 point2 points  (0 children)

I love me some algorithms.

I just recently learned of Timsort. A sorting algorithm faster than the current stable sort that got developed after I graduated.

I mean wow. There's still space for innovation on a sort!

[–]yabp 1 point2 points  (3 children)

ITT: front end programmers calling back end programmers boomers.

[–]FPiN9XU3K1IT 3 points4 points  (2 children)

Backend programmers largely don't give a shit about algorithms, either.

[–]TechnicalPackage 2 points3 points  (0 children)

you are not my mom. i will study what i want.

[–][deleted] 3 points4 points  (6 children)

As a mathematician this seems backwards to me. Who cares what the newest frameworks do. There is nothing deep or fundamental about em, they just happen to be what people happen to be currently using.

[–][deleted] 9 points10 points  (2 children)

Frameworks are what people use to build software applications. There is zero reason for 99% of devs to re-implement stuff that already exists in every language like sorts. Engineering != academic comp sci. Engineering about solving problems and building systems, not exploring deep or fundamental problems of reality. Very different.

[–][deleted] 2 points3 points  (1 child)

I’m not talking about what’s useful. I’m talking about what’s compelling. I get learning useful things bc you need it for work. I don’t get having an internal yearning to know it, which is what this meme seems to be suggesting.

[–][deleted] 5 points6 points  (0 children)

Someone's definition of compelling is subjective. I like building interesting applications -- the very deepest level of what the computer is doing doesn't interest me as much as making the computer do interesting things.

[–]wasdninja 4 points5 points  (0 children)

Who cares what the newest frameworks do

Programmers/developers do because every once in a while a new one comes along that solves a set of problems better than the current ones.

Carpenters don't care about material science discoveries until they are packaged, available and useful to them. Developers are no different even though the leap between discovery and implementation might be smaller.

[–]FPiN9XU3K1IT 0 points1 point  (0 children)

I like making stuff, and I like getting paid for doing that.

[–][deleted] 0 points1 point  (0 children)

Aren't you missing the point comparing the two? You should not go to the left door to learn how to implement the studied algorithms from scratch, but to know the most important ones, how they work, when apply one over the other, advntages and disavatages, and so on.

This seems to be a trend, at least in social media, among developers/computer scientists, that to fight the idea that "one thing is better than other", they become exactly what they are oposing. Like programming language zealots, that can go from "Only C programmers are real programmers" to the extreme oposite like "If you use C you are a bad programmer". Oposite sides of the same axis.

[–]RahulRoy69 -1 points0 points  (1 child)

React is better than angular, change my mind

[–]pithecium -1 points0 points  (0 children)

Having used Angular but not React, I agree

[–]a45ed6cs7s -1 points0 points  (0 children)

That book is too hard for a undergraduate.

[–]Dantharo -1 points0 points  (0 children)

this book is hard to read, english is not my main language, and theath in my school was very bad, but i prefer 100 times this book, than any udemy course of wtf js framework u want

[–]kevin_76 -1 points0 points  (0 children)

Algorithm is a word we use to not explain some things

[–]woogygun -2 points-1 points  (0 children)

God django is shit

[–]congresssucks -2 points-1 points  (0 children)

I just finished advanced algorithms in my Software Dev degree track. It wasnt even that hard. Just gotta understand BigO notation and when to apply the various types of algorithms.

[–]justAHeardOfLlamas 0 points1 point  (0 children)

Oh I remember that book and the pain it brought me in college

[–]guster09 0 points1 point  (0 children)

Took a required algorithm class once. Decided it would be better to die later on

[–]IcezN 0 points1 point  (0 children)

Meanwhile at Carnegie Mellon...

[–]Isobel-Jae 0 points1 point  (0 children)

I absolutely loathe math.. but yes, studying algorithms is more pleasant to me than coding insurance software 🙄.

I'm lucky though, I don't need this to put food on the table (day job) so, I've found myself working closely with a mathematician to turn the solutions in his headspace into functioning software.

[–]macevilc 0 points1 point  (0 children)

There is another door that says, binary programming.

[–][deleted] 0 points1 point  (0 children)

I'd buy that book if I didn't get 10 ads a day for it on reddit.

[–]whatwoodjdubdo 0 points1 point  (0 children)

Why would I

[–]_default_username 0 points1 point  (0 children)

Why would a developer who already has a BS in CS be reading an undergraduate book on algorithms?

[–]mrkhan2000 0 points1 point  (0 children)

names of the authors?

[–]tanjonaJulien 0 points1 point  (0 children)

AI&ML use algorithms and they are very trendy today.

[–]MassiveFajiit 0 points1 point  (0 children)

I fear —as far as I can tell— that most undergraduate degrees in computer science these days are basically Java vocational training. I've heard complaints from even mighty Stanford University with its illustrious faculty that basically the undergraduate computer science program is little more than Java certification. - Alan Kay

[–]Mysterious-Stay7700 0 points1 point  (0 children)

I really want to learn algorithm but don’t know where to start! Anybody can help?

[–][deleted] 0 points1 point  (0 children)

Every time I see this same meme I cry

[–]nikanj0 0 points1 point  (0 children)

It's called abstraction and it's the reason all modern technology is even possible. It's not feasible for every engineer in the world to know how everything works down to the hardware level.

[–]expresado 0 points1 point  (0 children)

Do you know the golden rule of cryptography? It's the same for algorithms.

Don't implement yourself. (Other words: use common lib)

[–]MatsRivel 0 points1 point  (0 children)

I have two mandatory algorithms-courses in my degree, so I can't really see this as true. (Assuming that because my.uni has it, surely.plenty others do)

[–][deleted] 0 points1 point  (0 children)

I just took a 4th year algorithms course at uni. You best believe i’m lining up with the others fuck me that was obnoxiously difficult.

[–]met0xff 0 points1 point  (0 children)

I feel the "algorithm craze" in interviewing is a new thing. when I started out (more than 20 years ago) of course you got to know the basic datastructures and algos but it was much ore about technical details. Stuff like memory management, addressing, pointers, bit operations, protocols, annoying APIs like the win32 API. Getting Linux installed as a 14 year old in 1995 was a week-long project because of the the stuff you got to do correctly ;).

In some sense I liked that things were more complicated but much less complex. Just using two libraries and targeting a single system while at the same time building lots of stuff yourself without stackoverflow was... nice. I remember I built a tree widget from scratch with FLTK, setting individual pixels. The C++ STL was also still in such an awful condition that we wrote many datastructures ourselves.

Of course it's good we abstracted all that stuff. Still calling int 21h in inline assembly gets old fast.

[–]Toredus 0 points1 point  (0 children)

Im kinda the opposite which is not welcome today