Live data from Hacker News

Brut: A New Web Framework for Ruby

naildrivin5.com

71–80 of 88 posts

Re: Brut: A New Web Framework for Ruby

#72
post #16

Earlier quoted context omitted.

Do you mind elaborating on what more you end up wishing you had? Most of the additional features RSpec adds seem worthwhile but just end up being more complicated/confusing in the end, in my experience. Shared contexts/examples, for example. Others like let blocks should… just be methods. I will say the change in… I think it was RSpec 3(?) to the expect(x) syntax was a hugely positive change, particularly in not havi…

Reading test failure output is much more readable and usable under RSpec vs. Minitest, to my eye.

I agree with this. RSpec may be an extra dependency vs MiniTest but with MiniTest I'll almost always need extra plugins anyway for things like reporting, colour coding, etc.

MiniTest is almost good enough but not quite there on its own.

Re: Brut: A New Web Framework for Ruby

#73
post #35

Earlier quoted context omitted.

I like Ruby! Ruby has types. They just aren't enforced by a compiler.

Well, yeah, then what's the point?

You can use a static analysis tool to check Ruby types ahead of time (still not a compiler) or provide information for tooling.

Alternatively you use them at runtime to check the correctness of data, which I don't think you can usually do with say Typescript where the typing information is for the most part compiled away[1].

1. I may be out of date on this but when I last looked at runtimes that could take Typescript directly they just threw the typing away. You just didn't need to use the tsc compiler first.

Re: Brut: A New Web Framework for Ruby

#74
post #42

I see it is currently based on Sinatra. Just wondering if you have considered looking into Roda?

Roda would be worth considering for its routing tree architecture which can be more performant and maintainable than Sinatra's linear routing approach, especially as the application grows.

Re: Brut: A New Web Framework for Ruby

#75
I loved David's book Sustainable Rails[1], it's one of the books on Rails I always recommend.

This is a really interesting take. I'd love see one of these small alternative frameworks full embrace Sorbet and use it for things like form validation. I guess that might defeat the gradual typing approach but it would definitely be interesting.

1. https://sustainable-rails.com/

Re: Brut: A New Web Framework for Ruby

#77

Earlier quoted context omitted.

In an era of constant professional extinction threat, author took risk and motivation to build an entire framework for free. And there is you attacking their ego.

AI is coming for us all, I’m not attacking, I’m simply stating the hubris in the statements pulled directly from their website.

Ok, humans have sentimental approach to information, we are not machines as you imply. Similar statement in a launch of a volunteer project is considered attack.

Re: Brut: A New Web Framework for Ruby

#78
post #75

I loved David's book Sustainable Rails[1], it's one of the books on Rails I always recommend. This is a really interesting take. I'd love see one of these small alternative frameworks full embrace Sorbet and use it for things like form validation. I guess that might defeat the gradual typing approach but it would definitely be interesting. 1. https://sustainable-rails.com/

Very talented person, and good speaker as well. I recommend some of his talks as well, perhaps this one closer to the content of the book https://www.youtube.com/watch?v=CRboMkFdZfg.

Re: Brut: A New Web Framework for Ruby

#79
post #78
post #75

I loved David's book Sustainable Rails[1], it's one of the books on Rails I always recommend. This is a really interesting take. I'd love see one of these small alternative frameworks full embrace Sorbet and use it for things like form validation. I guess that might defeat the gradual typing approach but it would definitely be interesting. 1. https://sustainable-rails.com/

Very talented person, and good speaker as well. I recommend some of his talks as well, perhaps this one closer to the content of the book https://www.youtube.com/watch?v=CRboMkFdZfg .

Thanks for the kind words!

Re: Brut: A New Web Framework for Ruby

#80
post #22

Earlier quoted context omitted.

The mocking thing actually touches on another point of frustration for me. I think the design of Rails ends up causing people to reach for mocking way too often in order to test things. At a glance I think Brut should avoid a lot of this by having things just be plain old Ruby objects. I have dealt with countless Rails projects where testing things conventionally was difficult or impossible so mocks/stubs had to be u…

_in your opinion_ My opinion is, _my unit tests_ are to protect my code against unwanted changes. To that end, unit tests test a single unit. And everything is mocked. If I have to rewrite a method, usually I rewrite all of its unit tests. Which is fine. They’re easy to write or rewrite. Fully mocked unit tests are then supplemented with fewer “full stack” tests higher up the pyramid.

This is domain specific, but for most web apps

> Fully mocked unit tests are then supplemented with fewer “full stack” tests higher up the pyramid.

Has the wrong priority. Full stack tests are the most valuable for shipping working software. Tests are enforcing contracts between components. Often I’ll see unit tests written for cases that do not exist. This is very bad. Testing at the boundary of your stack ensures the contracts that matter are enforced. Everything else is just making devs wonder “is this requirement actually real?”.

I used to be big on unit tests until I had to maintain a codebase for more than a couple years. I still use them, but mostly out of laziness.

Post reply on HN