News for hackers. Stuff that matters.
Re:When Node.js is the wrong tool for the job by the_af on Friday January 06, 2017 @10:31AM (#13336995)
Yes. Also, some huge multinational companies you're very likely to have heard of don't do automated testing of any kind, as least for non-critical software (source: my own experience). I'm not talking about TDD or any fancy agile technique; I mean any kind of automated testing whatsoever.

If you're just out of university or read tech blogs or hackernews, you'd think everyone these days is doing TDD, pair programming and agile. The reality is that a lot of major businesses do none of that.

Re:When Node.js is the wrong tool for the job by Roboprog on Friday January 06, 2017 @12:02PM (#13337924)
Re: automated testing. This can be quite time consuming to set up in many environments. Step one: get an Oracle database instance/schema that you can snapshot and roll back to a known starting state at will. Step two: get multiple connected app instances into a state to support each test run. Step three: just drop it, those things aren't gonna happen before you update your resume :-)

I'm ignoring the approach that says: Let's just spend a LOT of time writing mocks that stub out 90% of everything that matters, and pretend that the tests actually show something that matters.

Re:When Node.js is the wrong tool for the job by mi100hael on Friday January 06, 2017 @12:12PM (#13338040)
No offense, but I think you're testing things all wrong. With any halfway-decent mocking library (which every major language I've encountered has), it's trivial to mock a HTTP client or ORM class or whatever and say "when called with foo, return bar." It should take no more code than it would to do the live data setup/rollback, and can be run in a completely isolated manner. If you only mock the calls that hit an external service, your tests will be more accurate because you've removed the chance of erroneous failures due to a problem with the external service. Spend the few hours it takes to learn to do it the right way once, and you'll never have to deal with all that nasty live setup/coordination/teardown again.
Re:When Node.js is the wrong tool for the job by the_af on Friday January 06, 2017 @03:29PM (#13339900)
Agreed about integration tests sometimes being a pain in the... neck.

However, note I'm talking about something way more basic: many business don't do any kind of testing at all that isn't done by people manually trying the system. In the case of internal tools, this "testing" is often done directly by internal users trying to use the tool. This is way more common than one would suspect from reading tech blogs (unless one reads TheDailyWTF, of course).

Re:When Node.js is the wrong tool for the job by mgkimsal on Friday January 06, 2017 @03:35PM (#13339937)
I try to stress to clients that testing will always be done - we have a choice how much we do up front, behind the scenes, vs out in public, with real customers, money and data on the line. Still people choose, for a number of reasons, to have some/most/all of testing just be 'throw it out and see what happens'.
Re:When Node.js is the wrong tool for the job by Pr3fix on Friday January 06, 2017 @11:02AM (#13337307)
Because in a lot of ways those practices don't further the end goal or bottom line of the business. They don't meet business needs. As a developer, I think we both can agree that these things make our (developer) lives easier, but they often don't help the bottom line of the company. I know some dev will retort this, but if I was wrong then companies would be mandating these practices top down.
Re:When Node.js is the wrong tool for the job by mgkimsal on Friday January 06, 2017 @11:28AM (#13337579)
It's primarily perspective. I just came off a short term project which... yeah, it worked, but it's a disaster (but.. yeah, still working, technically).

4 years of no version control, no test environment for at least a year (it was shut down then never turned on again), no written docs, no written tests (and for periods of time, no backups). This software manages and controls 9 figures of USD annually.

The 'bottom line' was/is always "i need a form that does X" and "I need a form/report to show Y". Yes, the immediate short term goals of the business worked.

The entirety of the codebase has been hardcoded to work with library calls that were known tech-dead-ends years ago.

The business now needs someone else to come in and manage things, because the original guy left. The business is now up a proverbial creek, because everything was in someone else's head. TDD/testing/docs externalizes some of that, and does have real business value, but it requires someone to be able to look more than 6 months in to the future with respect to tech decisions.

Their bottom line will be hurt over the next year because they will be needing to pay far more to repair the tech debt, and it will mean fewer new things get done (or.. they'll pay even more for that). So... "business value" needs to be defined as to how you're measuring it, and 'short term' is always easier than 'long term'.