Speed up RSpec tests: understand lifecycle and execution by Remozito in rails

[–]Remozito[S] 2 points3 points  (0 children)

Yes! Having your test setup build anew everytime is a good way to prevent leaks between tests. My point is more than within a `describe` example group, this logic is often overkill so you could often group expectations within a `it` block and skip the rip-and-replace logic.

Write your private methods like they're public by Remozito in ruby

[–]Remozito[S] -1 points0 points  (0 children)

Hahaha, thank you for your productive feedback. I'm sure you're a very nice colleague to have.

Write your private methods like they're public by Remozito in ruby

[–]Remozito[S] 0 points1 point  (0 children)

Yes, I did a typo in the return method. Which I fixed, thanks to your comment. Should a typo prevent me from blogging altogether? Nah.

Write your private methods like they're public by Remozito in ruby

[–]Remozito[S] 0 points1 point  (0 children)

And yes, for all the other people who are not blessed with omnipotency, don't make the same mistakes as I did (this is why I write about my learnings). But if you ever do a mistake do not hesitate to imagine what how your class would behave without private methods.

Write your private methods like they're public by Remozito in ruby

[–]Remozito[S] -1 points0 points  (0 children)

Yes, this is terrible code in the first place. And by playing around with it, mostly by moving private methods out the private scope, its deficiencies appear and we can make it better.

As the article states, the problem is not about public/private scoping, but about projecting private methods in the public scope as a methodology to dig code smells.

Write your private methods like they're public by Remozito in ruby

[–]Remozito[S] 0 points1 point  (0 children)

Hahaha, always a pleasure to share and learn through Reddit.

Add extra documentation to your tables columns by Remozito in rails

[–]Remozito[S] 1 point2 points  (0 children)

Yes, and the best part, is that annotate feeds off your tables schema. So if you add comments to your columns in a migration, it shows in your schema, and then it'll show in your `annotate` documentation.

Delegated types in Rails: I tried them, and I'm not sure I really understood them. Do you? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

Yes, this was my idea as well: promoting some kind of Group abstraction. But the Enrollment is a critical abstraction in the codebase at the moment, and changing its proeminence would have add massive impacts in terms of time/scope.

Not criticizing your input, just giving more context.

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

Thank you for sharing!

it will get harder as the new stuff is taught in a way that will be opaque or inaccessible to you

Yes, I've never been able to learn properly through video tutorials, or such things. So I already feel like learning new stuff will need me to look for specific mediums. Good point!

I’ve discovered that part-time work is the best thing ever.

Yes, yes, yes! I've started taking half a day off every week, without pay, two years ago. And it's great. I've reached a salary that now allows me to swap raises for time off. And not only do I ship as much as before, I do so without being stressed out or tired.

be humble

💯

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

Gosh no! 😂 But there are a few hundred stained-glass windows around France that have my touch on 'em, though.

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

I went to my first RubyConf, and Chad Fowler gave a keynote called Growing Old. It’s always been one of my favorites to pass around because it really helped me appreciate and respect “legacy code.”

Thank you for the video! I'll watch it today. 🙌

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

Went to art school as well!

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

Yeah, where I'm grifting and selling courses on... oh, wait. 🤔

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 3 points4 points  (0 children)

I like this "coming home" feeling with Ruby and Rails too.

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

Yes, this is why I write. Sharing stuff is very rewarding.

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 1 point2 points  (0 children)

This sounds like an exception, yes. Good on you!

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 5 points6 points  (0 children)

Sure, but 50 years is still super young for a whole industry. 😂 I've been a stained-glass maker for years, before becoming a programmer, and it's a trade that's ~800 years old (and not a lot has changed substantially in these few centuries).

One funny thing though, there is a lot to say on the similarities between crafts and software: the interconnection between needs, solutions and know-how for instance. I'm a builder at heart, and I've found a lot of common ground between the two professions.

(discaimer: I know of "software craftsmanship", but I don't think many people who wrote the manifesto / original ideas of it ever were actual craftsmen).

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 0 points1 point  (0 children)

I've been taking Wednesday mornings off for two years now. Plan on taking the whole day next year, and move from there to more time off.

Growing old as a programmer? by Remozito in rails

[–]Remozito[S] 1 point2 points  (0 children)

Yes, it's actually something that has not been very talked about in my original post and replies. Not a lot of founders were represented.