Hacker News new | ask | show | jobs
by Assossa 2151 days ago
Data Structures is one of the best CS classes I've taken so far. I can now easily solve problems that would have seemed nearly impossible beforehand. I enjoyed it so much that I'm planning on taking an optional class next semester that goes over lesser-known and more advanced algorithms.

Once you know a lot of these algorithms, it becomes painfully obvious which developers haven't learned about them. For instance, I know someone who works as a driver for UPS and they have a piece of software that automatically plans a route to each delivery and pickup. There's a lot of variables such as certain packages that have to be delivered before noon, business deliveries that have to be done before the business closes, etc. The software they are currently using is not efficient at all. It will have them deliver to a building, drive down the street and deliver somewhere else, and then drive back and deliver to the building next to the first one. It's so painful to hear about this software because I've solved a very similar problem in under an hour at a programming competition using Dijkstra's Algorithm and Traveling Salesperson. Obviously, my solution didn't have nearly the same level of variables, nor was it held to "enterprise" standards. However, considering the level of inefficiency the software constantly produces, I'm convinced that it isn't using any standard algorithms but instead some hacked-together solution from a programmer who hadn't learned the established way to solve similar problems.

2 comments

I guarantee that UPS has had teams of computer scientists, mathematicians and probably statisticians working on package scheduling and routing over the decades. The traveling salesman problem, which UPS package routing is, is an NP-hard problem, which means that guaranteeing an optimal solution is going to take an exponential amount of time. There is no "established" way to exactly solve NP-hard problems with large inputs in a reasonable amount of time. Rather, there are approximate approaches which use domain-specific information to inform what kind of heuristics one can use to achieve a tolerable result.
Totally agree with you. Oddly enough I am currently doing a market research project on commercial applications for Quadratic Unconstrained Binary Optimization (QUBO) and also Constrained Binary Optimization. Anyway we were talking about UPS, and just for reference if I search my 3 degree network on LinkedIn for the combination of CPLEX (an IBM optimization package) and UPS I got almost 400 hits. Now admittedly some of those people used to work at UPS, some work there now. But there are clearly many, many computer scientists, operations research scientists and mathematicians working on these and other optimization problems at UPS.

On the other hand the grandparent comment just illustrates how even with all those optimization resources individual "decisions" may still be stupid in the moment even though the overall solution is "good enough".

Yeah, UPS is pretty famous for how much effort they put into optimizing routes: https://www.ups.com/us/en/services/knowledge-center/article....

I highly doubt someone could beat them in an hour at a hackathon by just saying “shortest path first” and calling it solved.

I know this personally because I took Computer Information System in college and not Computer Science. So we covered databases, but more or less glossed over a lot of important algorithms which I'd have loved to have later in life.

Though there is some benefit to having a business degree as well so it's not all bad.