4 ms·
String length in Python is maybe too much exaggeration unless someone hasn’t wrote Python for a long time. But, algorithms? Sure! Nobody remembers them for ever
by stunt 7y ago
String length in Python is maybe too much exaggeration unless someone hasn’t wrote Python for a long time.
But, algorithms? Sure! Nobody remembers them for ever. Often you at least need to read how the algorithm works before implementing it. Obviously for most devs it is faster to just search for a sample implementation or a pseudocode.
- kiba 7y agoYou can store those information inside a SRS system which lets you remember those algorithms essentially forever.
- tzs 7y ago> String length in Python is maybe too much exaggeration unless someone hasn’t wrote Python for a long time. Or they use several languages. Say you have client side code in JavaScript, with the client served by PHP on the server. You've got some log analysis scripts in Perl. You've got some SOAP services in Java. You've got some machine learning stuff in Python. You've got a mobile app in Swift. It's real easy to get confused about which of foo.length, strlen($foo), length($foo), foo.length(), len(foo), or foo.characters.count is the right one for the language you are dealing with at the moment.
- SAI_Peregrinus 7y agoAnd for some algorithms (pretty much anything in cryptography) you really, REALLY shouldn't be implementing them yourself! The correct answer is almost always "use a library call" for how to do it.
- commandlinefan 7y ago> Nobody remembers them for ever Actually I always thought the opposite - if you started programming in the 80’s (maybe early 90’s), you had to write sort algorithms and you had to study them in college, so you’re going to be bound to remember them at least well enough to come up with the “base case” (i.e. bubble sort). I do assume that younger programmers, especially self-taught types, probably haven’t come across these to if they did, it was one lecture, once, ten years ago, memorized and forgotten because they never applied it again.