5 ms·
I hear horror stories like this, and I have one of my own. 1. Absolutely no tests of any kind 2. Over 100 gem dependencies Upgrade from 3.2.x to 4.2.x took o
by heartbreak 10y ago
I hear horror stories like this, and I have one of my own.
1. Absolutely no tests of any kind
2. Over 100 gem dependencies
Upgrade from 3.2.x to 4.2.x took one developer (me) three weeks of work. I don't know if that's a lot or not, given the major version upgrade and all of the gems (which were a huge pain). I've not had any problems in production reported via Honeybadger or by end users, so I think the upgrade was a success. I did end up writing about 200 unit and integration specs during the process.
I'm thinking back to my days in the .Net world at BigCorp. Unfortunately I have nothing to compare it to, because we never upgraded anything from one major version of ASP.NET MVC to another. Is that a better situation?
- beat 10y agoA huge upgrade on code with no tests and a bunch of magical dependencies? The problem wasn't Rails there.
- eric_h 10y agoThere's an argument to be made that Rails, by not actually enforcing conventions like TDD, gives an amateur/impatient developer a very high calibre footgun. Unfortunately, of course, that gun doesn't usually go off until it's handed to someone else.
- mordocai 10y agoIs there anything that actually "enforces" TDD? Because if there is I want to stay away from it.
- engineerDave 10y agoYes. Being forced to push changes to production with zero test coverage, and hence zero confidence in your code on a Friday night. (true story) After that you always make sure test exist before even pondering a push of potentially breaking changes! :P
- mordocai 10y agoOh yeah, I mean I always write tests for anything for work. I don't do TDD all the time though, sometimes I write the tests after the code. A language/framework that forced me to do TDD would just piss me off, which was my original point.
- engineerDave 10y agoI was being tongue in cheek on that one, sorry if it didn't come across that way. Although I've been a Rails dev for 6 years now, I've come to hate the TDD approach and am a convert of FP and types, & compilers a la Haskell. Because there really is no such thing as a massive change in FP IMO. Unfortunately I'm not competent enough in it yet so Rails still pays the bills.
- eric_h 10y agoMy "enforcing TDD" point was rather tongue in cheek. Really, I was just saying that a rails app of even moderate complexity with no tests is a very dangerous beast, and something I would not wish upon my worst enemies.
- mordocai 10y agoIndeed.
- beat 10y agoYou can remove the word "rails" from that, and it's still 100% true.
- eric_h 10y agoTrue, but I think that with rails and a few dozen gems one can bolt together a terribly architected app that on the surface seems to work but is in fact a bunch of spaghetti and lasagna code bolted together with duct tape, teetering on the edge of a cliff like a house of cards; checkmate. (sorry, couldn't help the futurama/zap branigan reference once I start mixing metaphors).
- ryanmarsh 10y agoNot enforcing TDD? Rails' own creator bemoaned the culture of test cargo culting in the Rails community. This is pretty well documented. If there's something Rails falls down on it's certainly not testing.
- ktRolster 10y agoWhen people are forced to write tests, they merely write lousy tests. It doesn't change anything.
- engineerDave 10y agoIn cases like this when I ask why TDD isn't done the answer is usually some variant of "its working" to which I usually reply "how do you know?". :P