What sort of toy problems are you talking about?
What sort of toy problems are you talking about?
(I'm sorry. I thought about using less snark but I can't.)
When it comes time to do something novel, that understanding will be very useful.
People pooh-pooh Google's hiring interviews, but when was the last time Gmail's search results on your email were as bad as Bing's (I use this example because it's not their general index, I'm asking about your mail.)
There are a lot of good reasons to bone up on CS 101 (and 201, 301, 401, and 501).... I disagree that it's just "studying for the test".
On top of that, in almost all code beyond CRUD, you'd have to write some custom algorithms - there, the knowledge from data structures and algorithms is really helpful.
1 - I have. But it is overwhelming more likely that you'll just need to know their characteristics than how to implement them.
2 - And get better caching behavior for free.
In your daily life, you use tools to do your job. Over time, your tool set has sufficient coverage that it can handle most jobs. However, because of this "good enough" coverage, you may not realize the existence of other tools that may be far superior. I believe "applied math" is one such tool. (Translate to "algorithms".) Its applications are everywhere, including at least 50% of your daily life in my experience. However, you fail to see them because you may not have that tool in your tool belt! This is no different than wearing x-ray glasses - you get to see almost every problem in a different light. Google and others who realize it want to make use of these versatile glasses.
I do not mean to be obtuse but a different perspective may be helpful!
Lets take fizzbuzz for example. These types of problems almost always require manipulating strings and dumping them to the console in the simplest scenario possible. Usually the main method or equivalent in a console program.
It would be easy as hell except they don't let you use google or an IDE, so you need to memorize the syntax for the main method and string manipulation.
1) In real life you almost never write directly to the console. 2) In real life, you never manipulate strings using sub-string or regex really... In fact the only time I do this a lot is for terrible reasons in bad code. 2) Main method? If your real life app even has one it was written by the first guy 10 years ago and is 3 lines long, just some function that looks like this:
var app= new BootStrapMainApp();
app.run();
logger.log("App crashed if we get here");And don't assimilate fizzbuzz with half hour problems. There are for sure some difficult half hour interviews questions; they are not comparable to trivial exercises like printing the numbers from 1 to 10.
P.S. If you never use console, strings or regex. I really wonder what kind of applications you're writing.
Regex really never. Unless you're munging data in Python it's usually a bad idea to use regex. Clean strings? Use a library. Parsing? Use a parser. Raw regex implies filtering stuff or banning certain characters in strings which breaks all kinds of multi language compatibility
Well, I am obviously the guy who write the tools and the libraries, so you don't have to know these things yourself but I do :D
Every time I see a regex cleaning strings I instantly know the app was written by an ametuer and probably horrible and full of security issues. Oh it globally replaces this bad token but not recursively? Great
I use regex for searching logs all the time but never in production apps. I can write some pretty mean regex but I can't remember the function call for string replace off the top of my head. For me regex is 99% in a text editor.
Really when do you split up strings without using a tokenizer or parser of some sort? Manual string manipulation is usually dumb and error prone. The only time I find myself doing it is when stuffing crap into bobs "extras" db field which is actually a bunch of 80 char strings delimited by the pipe character.
How do you parse known data formats from free text strings? (regular expressions, string manipulation) How do you parse a cookie? (string manipulation) How do your apps http requests end up in their respective handlers? (main method socket listener)
If your answer to each of these questions is that you use a library that's cool and all, but just because you didn't have to write it yourself doesn't mean it doesn't exist in "real life". Someone wrote that code for you, and you can call it "bad code" if you want - just know your app is built on it.
I simply can't fathom that you believe such basic constructs of software development would be a bad code smell. I really don't know how you get around using them and manage to do anything remotely interesting and novel.