6 ms·
Python is the algorithm king as far as I'm concerned. It really gets out of your way and lets you focus on the abstract nature of what you're trying to accomp
by michaelchisari 10y ago
Python is the algorithm king as far as I'm concerned. It really gets out of your way and lets you focus on the abstract nature of what you're trying to accomplish.
- koolba 10y agoIf Python is the king, C is the court jester juggling knives. Done well it looks amazing, elegant, and efficient, but in the wrong hands you'll lose your hands.
- nostrebored 10y agoIt also forces you to know what's happening under the hood though. If learning the material comprehensively is your goal I think it's not a bad idea to dig in to a c implementation.
- michaelchisari 10y agoAt this point, I would recommend Rust for the "under the hood" part, while forcing you to write safer code.
- nostrebored 10y agoProbably a good idea!
- apl002 10y agoWhere is javascript in this medieval court?
- deleted 10y ago[deleted]
- dsacco 10y agoJavaScript is the archbishop, evangelizing the holy trinity of React, Node.js and MongoDB.
- koolba 10y agoAt least one of those would be on the receiving end of any technology holy war.
- joatmon-snoo 10y agoI think you meant React, Node, Vue, Vanilla, Backbone, Angular, [trails off]
- dylz 10y agoTop 1000 javascript libraries of 2016: a year-end roundup
- irrational 10y agoThey change often enough that it would be better to create the list on a monthly basis.
- Groxx 10y agoThey're the lesser gods and demons (often swapping places) of the pantheon.
- kbenson 10y agoSomewhat appropriate, as nobody expects the Spanish Inquisition.
- pc86 10y agoShoveling horse shit in the stables.
- reitanqild 10y agoSomething necessary but evil.
- ThrustVectoring 10y agoJavascript is the kitchen hand that you taught how to chop vegetables. Yesterday you asked him to chop wood, and you've spent all of today trying to figure out why your kitchen knives are dull.
- icpmacdo 10y agoI am slowly working my way through CS50 on EDX and its an interesting experience doing an intro to CS type course in C for sure.
- kornish 10y agoThere's a great book title that plays off this idea: "Enough Rope to Shoot Yourself in the Foot: Rules for C and C++ Programming" [0] It's also perhaps the best mixed metaphor I've ever encountered. [0]: https://www.amazon.com/Enough-Rope-Shoot-Yourself-Foot/dp/0070296898 https://www.amazon.com/Enough-Rope-Shoot-Yourself-Foot/dp/00...
- Impossible 10y agoI said this by accident in a meeting one time and everyone got a good laugh from it. Must have got it from this book unconsciously.
- deleted 10y ago[deleted]
- vog 10y agoWhile I applaud Python to have established a well-designed[1] layer on top of the math/numeric libraries written in Fortran, C and C++, I hope that one day Rust will smoothen the corners. While Rust might not become a replacement for the Python layer, it may replace the C/C++/Fortran layer with all their speed and low-level optimization, yet provide good (and especially safe!) abstractions on top of that. Currently, people try to use C++ to fill that gap, but I'd love to see Rust's type system, borrow checker and macro system, instead of C++ templates. [1] As opposed to Mathematica, MatLab, etc.
- walshemj 10y agoI would have said Fortran is still the King :-)
- jeremy_wiebe 10y agoIn college I had to implement all my Data Structures coursework in COBOL. That was...interesting. :-)
- catnaroek 10y agoHardly. How often is it that you can read an uncommented Python program that implements a tricky algorithm, and you can easily recover basic things like loop invariants?
- yorwba 10y agoFor that you'd really want something like Dafny https://www.microsoft.com/en-us/research/project/dafny-a-language-and-program-verifier-for-functional-correctness/ https://www.microsoft.com/en-us/research/project/dafny-a-lan... where your program doesn't even compile if you don't give it the right invariant.
- catnaroek 10y agoBut then there's no such thing as an unannotated program. I'm confident in my ability to prove things the old-fashioned way, using brain, pencil and paper, so I don't see much value in merely having my proofs verified by a machine. If the machine can't contribute to the effort of actually coming up with the proof, it should stay out of the way.
- kinkrtyavimoodh 10y agoI'd disagree. Python abstracts a little too much away, and it's much easier to figure out loop ranges, invariants etc in an algorithm from say Java code. Python works well when you have to convey your algorithm in a nice succinct functional manner, but that's optimizing for cuteness, not understanding.
- GarvielLoken 10y agoCommon Lisp is the rebel leader, but is hampered by constant infighting.
- ende 10y agoPython is a fantastic language for learning algorithms. It's also a good interface for higher performance, lower level systems language libraries. That said, it is certainly worth the effort to learn one of those systems level languages to pair with python. I always say that python is like the English of programming languages; it's an amalgamation of other languages, programming paradigms and a rich set of libraries, and often serves as a 'Common Tongue' to glue disparate processes together. There is an inherit risk to that, though. Because it's so easy to transition between object/procedural/functional modes, because it's so easy to tie together so many different interfaces, because it's so easy to `import everything`... it is often too easy to avoid a proper separation of concerns. The flexibility comes with a disincentive towards discipline. All of the pedantry of systems level language performance and practices aside, even the context switch alone between 'algorithm language' and 'application language' is beneficial to promoting better discipline in both areas.