Live data from Hacker News

Rails 5.1.0 Beta 1

weblog.rubyonrails.org

41–50 of 78 posts

Re: Rails 5.1.0 Beta 1

#41

Earlier quoted context omitted.

You know I used to think it's craziness, but it really makes for a much experience writing ES6 as opposed to random-ass jquery and javascript sprinkled all over the place. I've grown to love it.

Could you go into more detail on the concrete benefits?

ES6 brings to Javascript needed features that other programming languages already have had; like a cleaner way of writing classes, more basic collection classes, more tools for concurrency, the list goes on...

https://github.com/lukehoban/es6features

Re: Rails 5.1.0 Beta 1

#42
post #29

I had heard that Capyabara-based tests were going to be incorporated in Rails. As the multi-threaded concurrent nature of these always makes things a pain, hard to get right, leading to much pain for devs with non-trivial test suites -- I was curious to see how they'd handle it, if there'd be an 'official' Rails solution, ideally backed by some deep Rails knowledge. I was surprised that they've chosen to use the 'sha…

The Rails app runs in one thread, the test in another one. There are no problems as long as you don't use the database from the tests, which would be against the spirit of integration testing anyway. Only browser actions, even to check if the assertions are valid. A little inconvenient but safe and true to what users will do and see. I never got any problems in that way.

If you've had no problems, that's great, but lots and lots and lots of us have. I tried to summarize (well, that's not the right word, it was at length) here: https://bibwild.wordpress.com/2016/02/18/struggling-towards-...

While integration tests may ideally not use the database (although I find in practice, I think you often need or want to do some 'manual' setup first. But even if you don't, the _other_ tests do db setup and teardown, and the problems start happening when the Rails app is still busy doing something triggered by a test that the test thread considers 'over'. Easy to say "Well, don't do that", but in practice it is very difficult to diagnose, debug, and stop. Using fancy new front-end frameworks like React or Angular tends to make it orders of magnitude worse.

If you haven't run into problems, consider yourself lucky and I don't hold it against you, but many have.

Re: Rails 5.1.0 Beta 1

#44
Very interested to see how webpack plays with the asset pipeline.

With Capybara, I'm not keen on the default transactional rollbacks. The reason for this is, that it's handy to keep the data in the db after a test to see what the final state of it was. I always drop the data before a test runs - but then again, I prefer the use of factories over fixtures.

Can someone please explain the benefits of this encrypted secrets business?? I'm struggling to see the benefit - I understand that you need access to the code + the env var, but in all practicality, if someone has access to your env vars, then is it really that much more of a reach to figure out what the key in the code is?

Re: Rails 5.1.0 Beta 1

#45
These release notes really let Rails down. Crowing on about the number of commits and rationalising decisions is a waste of my time, just explain how it's going to make or ruin my day. Links you'd expect to explain features just take you to source files, not documentation. And a HUGE amount of the changes are actually scattered around in sub-project changelogs.

They should look at Django for some inspiration. Here's their latest beta release notes [1]. It's concise, everything links to relevant documentation with examples, and the entire project's changes are handled on the one page. There's even a list of things to check if you're upgrading.

[1]: https://docs.djangoproject.com/en/dev/releases/1.11/

Re: Rails 5.1.0 Beta 1

#46

Earlier quoted context omitted.

You know I used to think it's craziness, but it really makes for a much experience writing ES6 as opposed to random-ass jquery and javascript sprinkled all over the place. I've grown to love it.

Could you go into more detail on the concrete benefits?

I'm no modern JS guru, but think of it as you get to advance the JS language, and use all the latest libraries independently of what version of JS is running on the client.

This is because you write in the latest JS syntax, which then gets converted into an older JS version (allowing greater client compatibility).

JQuery is still great if you only want some basic functionality - e.g. a datepicker, but if you're building Photoshop in the browser, then it quickly becomes complicated, and you'll find that you start attempting to build your own framework to support your development.

Re: Rails 5.1.0 Beta 1

#47

These release notes really let Rails down. Crowing on about the number of commits and rationalising decisions is a waste of my time, just explain how it's going to make or ruin my day. Links you'd expect to explain features just take you to source files, not documentation. And a HUGE amount of the changes are actually scattered around in sub-project changelogs. They should look at Django for some inspiration. Here's…

+1 for better release notes - examples would be highly appreciated.

Re: Rails 5.1.0 Beta 1

#48
post #26

Actually pretty major release. Hopping on javascript's crazy train. It was expected anyway, there are no way to ignore js-crazyness anymore (most of the frontend toolset exists only as js implementation). Also, Phoenix (ideological successor of rails) took this approach from the start

I think the JavaScript updates are great news, enough for me to finally dive into Rails.

This release is in my opinion a life saver for Rails. Instead of forcing people to hop off the Rails train, it empowers them and let them choose their favourite JS library on top of it, while serving them hassle-free, in a very rails fashion.

Shouldn't this have been shipped in 5.1, it might have very well been a bit too late.

Re: Rails 5.1.0 Beta 1

#49
post #26

Actually pretty major release. Hopping on javascript's crazy train. It was expected anyway, there are no way to ignore js-crazyness anymore (most of the frontend toolset exists only as js implementation). Also, Phoenix (ideological successor of rails) took this approach from the start

I think the JavaScript updates are great news, enough for me to finally dive into Rails.

This release is in my opinion a life saver for Rails. Instead of forcing people to hop off the Rails train, it empowers them and let them choose their favourite JS library on top of it, while serving them hassle-free, in a very rails fashion.

Shouldn't this have been shipped in 5.1, it might have very well been a bit too late.

Re: Rails 5.1.0 Beta 1

#50
post #28

Earlier quoted context omitted.

This needs to be higher up. It's using Blowfish (a 64-bit block cipher), unauthenticated, in CBC mode. These should not be the defaults for a system designed and built in the past five years.

What should be the default?

AES-128-GCM (or ChaCha20-Poly1305 if you're feeling particularly hipster) with a new, random IV every time data is encrypted.
Post reply on HN