News for hackers. Stuff that matters.
Re:When Node.js is the wrong tool for the job by astinit on Friday January 06, 2017 @09:40AM (#13336475)
As someone still studying and not in the workforce yet, are there really teams out there that don't use version control?
Re:When Node.js is the wrong tool for the job by noir_lord on Friday January 06, 2017 @10:19AM (#13336894)
Yes, I used to do a fair amount of consulting (aka nothing works properly, fix it, have this bag of cash) and I frequently ran into 'projects' that had no source control or had <projectname>/1 <projectname>/2 <projectname>/2a_1_fix_foobar :|.

One of the things you'll learn if you hang around Hacker News/online programming communities is that a lot of the people in those communities are at the top end of the spectrum (there is a degree of self-selection that means a higher proportion I think).

It's pockets of relative sanity in a sea of disaster.

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'.

Re:When Node.js is the wrong tool for the job by Jackim on Friday January 06, 2017 @09:43AM (#13336502)
Yes. I have a friend who does QA for a major university and that department doesn't use source control at all.
Re:When Node.js is the wrong tool for the job by hfsktr on Friday January 06, 2017 @10:27AM (#13336966)
Yes, my first job we have 3-5 devs at some points. We each had our own codebase (internal site, external site, console/windows apps). We never touched each others' code.

Nobody ever set up source control for the code I had to work on and nobody but me ever worked on it, the others did have source control as far as I know and at least one had 2 people working at a time. We did try to get my using it but it was clunky and didn't last long since it was just me using it.

It seems so strange in hindsight but that whole place was so so different from where I am now.

Re:When Node.js is the wrong tool for the job by Roboprog on Friday January 06, 2017 @12:14PM (#13338051)
Almost all teams these days that I know of have a revision / source / version control system of some kind purchased and installed.

The "purchased" ones are usually worse than the open source ones (e.g. - Git, SVN et al).

The "ENTERPRISE!!!" devs don't use the system effectively, usually: haul things off to a corner for weeks before doing a single check-in/commit; may or may not know how to branch; bumble with breakage during merge/pull operations; end-run the system by releasing non-compiled files directly to production without saving them in source control.

Source control use is like the other comment about programming language: the main issue is not whether you have used brand X, but whether or not you have a coherent mental model of what the hell you are doing in the first place. That said, there are some BAD commercial source control systems out there, preying upon the "you need this, even/especially if you don't really know why" crowd. These are usually sold to The Management in terms of the control they bring to source control - they will have a trigger to force entry of a trouble/enhancement ticket to go with a check-in/commit. That fact that they suck at source management is of no consequence (e.g. - painfully slow, little to no command line interface for automation, poor research/discovery features, poor branch/merge support, unreliable / data corruption)

Re:When Node.js is the wrong tool for the job by nine_k on Friday January 06, 2017 @10:40AM (#13337090)
You have a chance to see all manners of known bad practices in the wild.

It's important to recognize them as bad. It's also important to try to understand what lead to their adoption; often there are ways to work around that and apply a best practice in your area, even if other areas still suffer without it.