3 ms·
> Based on this, it's hard not to state that current > Node-developer are the new PHP-developers: > Unsophisticated, completely unable to see when > the
by lhnz 10y ago
> Based on this, it's hard not to state that current
> Node-developer are the new PHP-developers:
> Unsophisticated, completely unable to see when
> the tools at hand are lacking, and happy with a
> with whatever they can get running.
Some Node engineers do use debuggers sometimes, particularly those that came from environments in which this is common (Java, etc). However, many Node engineers I've worked with rely on unit testing, keeping functions very simple and intuition.
Btw the tooling in the Node ecosystem is actually pretty good.
- mattmanser 10y agoAll you've done is move the problem. What happens when the unit test fails and you want to step through the process to see why? You also seem optimistic, unit test don't catch new bugs, they just test for typos and the bugs you already knew about.
- lhnz 10y ago> You also seem optimistic, unit test don't catch new bugs. You write a new unit test using the data which caused the bug but expecting a non-error state. The error that is being thrown/rejected will have a stack trace you can inspect to find the line which threw. To find the real cause you need to read the code before this to find out how the bad state was created. If you kept things small and simple, it is not so difficult to work out what went wrong. If you let things grow in complexity too much, you can however end up within a breakpoint/log quagmire.
- mattmanser 10y agoIn the idealized functional world that doesn't exist, maybe. Programming anything beyond a small app is ultimately managing complexity and often fixing how the various moving parts don't quite work together as you intended. You simply can't, and shouldn't, unit test that stuff.