2 ms·
Be careful with your judgments. Reading your complaint makes me wonder about your skills! One should distinguish between computer science and SW engineering. T
by BeetleB 3y ago
Be careful with your judgments. Reading your complaint makes me wonder about your skills!
One should distinguish between computer science and SW engineering. The former is full of theoretical concepts, and the latter consists primarily of opinion. I know SW attracts people who like hard boundaries/divisions, but amongst the engineering I've been exposed to[1], SW is the least cut and dry.
Data structures is CS. Unit tests is SW engineering. The former is as clear cut as math, and the latter is a relatively new introduction that has widely differing opinions amongst its expert practitioners. Of the senior, good SW engineers I've worked with, you have some who are pro-logic in unit tests. Others who are anti-logic. I fall in the latter, and I counsel young developers that way, but I won't ding a senior developer in a code review for it. I am no more right than he is.
Data structures: The wise engineer knows when it matters. A very popular C++ book advocates vector usage even when theory says a map/set is better. Why? Because vectors have been optimized like crazy, and for data sets of a certain size, the vector almost always performs better. So he recommends getting data of representative (or max expected) size, and benchmark.
Have you done that for your code?
Even if it would be faster, how much of a bottleneck is the existing code? If only 2% of the time is spent on this portion of the code, does it matter if you speed up that 2% ten fold?
[1] My background is in one of the "hard" engineering - not CS.