4 ms·
Actually I think graph theory is pretty important. For example many programming contexts have to deal with dependencies, and often dependencies form a directed
by swartkrans 12y ago
Actually I think graph theory is pretty important. For example many programming contexts have to deal with dependencies, and often dependencies form a directed acyclic graph. Understanding that will aid in writing better, more reliable code. Path finding is also pretty important, especially if you want to make a game.
- phazmatis 12y agoThat's great if you're a game AI programmer (an incredibly small group) or you're creating Yet Another Dependency Loader (hey, I guess <language that becomes super popular next year> will only have 100 frameworks to manage modules, you'd better create your own as well). You know what I really wish? Programmers would spend 1/100th of that algorithm studying on learning to write readable, maintainable code.
- swartkrans 12y agoYour comment comes across as bitter and sarcastic. It doesn't sound like you like being a programmer.
- computerjunkie 12y ago>>>learning to write readable, maintainable code. Which is why I love python. Have you seen some poorly written JavaScript that's poorly indented and has no comments? Until there is a universal guideline for JavaScript and that developers follow, I won't have a go at it again.
- colanderman 12y agoIndentation is pretty low on the list of things that make code maintainable or not. (If it bothers you, just pass the code through a pretty-printer.) Much more important is to pay attention to system-level measures such as modularity, abstraction, (de)coupling, and documentation. 99% of maintenance nightmares are due to code that is not modular (and thus not easily replaced), is abstracted too much or too little (leading respectively to obtuse or repetitive code), highly coupled (causing brittleness when assumptions are broken), or poorly documented. (There are probably others, but these are the first to come to my head. These measures are also not necessarily orthogonal.)
- dragonwriter 12y ago> You know what I really wish? Programmers would spend 1/100th of that algorithm studying on learning to write readable, maintainable code. IME, programmers that write readable, maintanable code and those that have a solid grasp of algorithms and theory as it applicable to the problem domain tend to overlap considerably. Having a clear analytical mental model of the approach to the solution leads to clearer and cleaner code -- and, where necessary, clearer and more useful comments -- than hacking your way to something that works. (And I'd say thats as true of my own code -- where I've done work on both extremes of the clear model to hacking-my-way-through axis -- as of others' code I've seen.)
- cesarbs 12y agoAgreed. Some people say you'll only use it in games or AI or something fancier, but that's not entirely true. I work with what would be considered pretty boring enterprise software, and yet I once solved a pretty big problem using graph algorithms. That actually earned me a good reputation among my coworkers.
- csallen 12y agoI don't think the primary complaint about these types of skills is that they are never useful. It's just that they are treated as disproportionately important, i.e. interviews consist of 80% CS knowledge but the real job only requires it 1% of the time on average.
- jestar_jokin 12y agoI used some super simple graph theory recently to write a Java tool that spit out data from multiple tables on a database into SQL files, with statements in the right order so that foreign key relationships were preserved. And this was for a CRUD-ish web app.