by usrbinbash · 4y ago · 0 comments
SO provides solutions to problems.
Experimenting, playing around and "throwing spaghetti at the wall" can lead to an understanding of the problem.
SO will tell me to use DISTINCT, and that is correct.
But why? Why is this the better? Is it really? Why is the home-brewed reduce slower? How could it be improved? Oh hey, but if I did this to the data upstream I could prevent non.distinct records from being in the DB in the first place, etc. etc.
Software Engineering is, among many other things, a craft. Just like carpenting or stone carving or smithing, it must be honed, and mastery can only be achieved if one plays, trys and experiments.
----
Of course, reading about the solutions to a problem can also help in its understanding. For me personally, if I do not understand a problem, I like to do both: Experiment, and read what the "canonical" way to solve it is.