Live data from Hacker News

Testing is better than data structures and algorithms

nedbatchelder.com

41–50 of 178 posts

Re: Testing is better than data structures and algorithms

#41
post #37

This will annoy a lot of folks, but: 1 - If you work on large scale software systems, especially infrastructure software of most types then you need to know and understand DSA and feel it in your bones . 2 - Most people work on crud apps or similar and don't really need to know this stuff. Many people in this camp don't realize that people working on 1 really do need to know this stuff. What someone says on this topi…

My work involves petabyte scale data, and the algorithms are very straightforward: - What you want to do is probably trivially O(kn). - There isn't a - Cache results when they are O(1), don't when they are O(n). - If you want to do something >O(kn), don't. - If you really need to so something >O(kn), do it in SQL and then go do something else while it's running. None of that requires any DSA knowledge beyond what you…

>My work involves

As the GP said:

>>What someone says on this topic says more about what things they have worked on in their life than anything else.

Re: Testing is better than data structures and algorithms

#42

This will annoy a lot of folks, but: 1 - If you work on large scale software systems, especially infrastructure software of most types then you need to know and understand DSA and feel it in your bones . 2 - Most people work on crud apps or similar and don't really need to know this stuff. Many people in this camp don't realize that people working on 1 really do need to know this stuff. What someone says on this topi…

That's going to be true in all fields, people think their experiences are the only valid experiences and everyone else must think and work on what they think is important, otherwise they're wrong.

Right.

It is a very basic flaw in their logical thinking ability.

I never cease to be amazed by the number of HN people who display this flaw via their comments.

Or rather, I have ceased to be amazed, because I have seen it so many times by now here, and got resigned to the fact that it's gonna continue.

Re: Testing is better than data structures and algorithms

#43

I agree with the article, but I'll bet a lot of others, don't. Discussions on Code Quality, don't fare well, here. Wouldn't surprise me, if the article already has flags. Of course, "testing," is in the eye of the beholder. Some folks are completely into TDD, and insist that you need to have 100% code coverage tests, before writing one line of application code, and some folks think that 100% code coverage unit tests,…

Testing, especially vstest.console.exe in Visual Studio has carried my business really far. I have accumulated thousands of tests on my codebase usually based on customer requirements or on past bugs which I have been trying to replicate. I think that a lot of people dislike testing because a lot of tests can run for hours. In my case it is almost 6 hours from start to finish. However as a software developer I have a…

You could have a pipeline in some cloud provider to run the tests, and distribute the load across machines if tests are independent to reduce the time, if that's more important. If it's ok to just run the overnight, keep it on.

Re: Testing is better than data structures and algorithms

#44
Testing is the case I've found AI actually useful. Write one good test, maybe happy path, and then tell your AI to test for scenario XYZ and how it should fail, etc.

The generated code is in general 90% there.

This allows me to write many more tests than before to try to catch all scenarios.

Re: Testing is better than data structures and algorithms

#45

This will annoy a lot of folks, but: 1 - If you work on large scale software systems, especially infrastructure software of most types then you need to know and understand DSA and feel it in your bones . 2 - Most people work on crud apps or similar and don't really need to know this stuff. Many people in this camp don't realize that people working on 1 really do need to know this stuff. What someone says on this topi…

> Most people work on crud apps or similar

CRUD apps are the ones that become more complex, not less. The idea that a "CRUD app" is the poster child of simplicity is mega-misleading.

Building a ERP or similar will eat you alive in forms that making a total OS from scratch with all the features and more of linux not. (Probably the only part that is hard as "crud apps" is the drivers, and that is because you see what kind of madness is interface with others code)

Re: Testing is better than data structures and algorithms

#46
post #37

Earlier quoted context omitted.

My work involves petabyte scale data, and the algorithms are very straightforward: - What you want to do is probably trivially O(kn). - There isn't a - Cache results when they are O(1), don't when they are O(n). - If you want to do something >O(kn), don't. - If you really need to so something >O(kn), do it in SQL and then go do something else while it's running. None of that requires any DSA knowledge beyond what you…

> My work involves As the GP said: >>What someone says on this topic says more about what things they have worked on in their life than anything else.

TFA isn't saying "DSA is useless", it's saying "intermediate/advanced DSA is not useful for most people". It's obvious that it's useful for some people, but I think even most people working on "large scale systems" should probably value general software engineering skills over DSA skills. The very few people who actually need DSA skills already know that the advice "you don't need DSA" doesn't apply to them.

Re: Testing is better than data structures and algorithms

#48
post #2

Are there any resources out there that anyone can recommend for learning testing in the way the author describes? In-the-trenches experience (especially "good" or "doing it right" experience) can be hard to come by; and why not stand on the shoulders of giants when learning it the first time?

Working Effectively with Legacy Code by Michael Feathers. It spends a lot of time on how to introduce testability into existing software systems that were not designed for testing. Property-Based Testing with PropEr, Erlang, and Elixir by Fred Hebert. While a book about a particular tool (PropEr) and pair of languages (Erlang and Elixir), it's a solid introduction to property-based testing. The techniques described t…

TDD is a development methodology, not a testing methodology. The main thing it does is check whether the developer implemented what they thought they should be implementing, which is not necessarily what the spec actually says to implement or what the end user expects.

Re: Testing is better than data structures and algorithms

#50

> Of course some engineers need to implement hash tables, or sorting algorithms or whatever. > We love those engineers: they write libraries we can use off the shelf so we don’t have to implement them ourselves. The world needs to love "infrastructure developers" more. To me it seems only the killer app writing crowd is valued. Nobody really thinks about the work that goes into programming languages, libraries and to…

Dang I got this book a few weeks ago and still haven’t cracked it open. Maybe today is the day
Post reply on HN