Michael keene

14 Followers
27 Following
60 Posts
@eayurt I prefer typically prefer if. Unless is best placed when you check a not condition. i.e. `unless condition` is way better than `if !condition`
GitHub - palkan/action_policy: Authorization framework for Ruby/Rails applications

Authorization framework for Ruby/Rails applications - palkan/action_policy

GitHub
@purinkle when I've done workouts it's been based on bodyweight exercises. They don't progress in weight and instead progress in the type of movement you are doing. I find that harder to forget so it all just lives in my head till I hit a decent milestone
@soulcutter I made a module that when included used self.included to hook into method_defined on the main class. That then redefined methods onto a prepended module that was created at runtime. You could do something similar but have a set of default methods in the prepended module, and overwrite them if the user defines them. I did it so I could have per method logging for something quick and dirty I was whipping up. Very dirty indeed.

show this to anyone else you know who also assumed DHH was just a normal conservative dude rather than a raging white supremacist lunatic

https://jakelazaroff.com/words/dhh-is-way-worse-than-i-thought/

DHH Is Way Worse Than I Thought | jakelazaroff.com

DHH's politics are not normal. Maybe they used to be, I don't know, but as of right now the dude is way outside of what most people would consider moral or acceptable.

@Kowfm nice read man. I like the bit about Athletics, it reminds me of something @codefolio said about training like an artist doing studies https://youtu.be/33fAzjOTaDE?si=sqQdQ4eqiPTCZOhP
He has spoken a few times comparing programming and art and I found it really encouraging. Your journey looks tough, but you inspire me to do better. I'm rooting for you.
RubyConf 2019 - Conscious Coding Practice: The Three Concrete Steps by Noah Gibbs

YouTube

@remi nice read! I don't often see opportunities for SimpleDelegator, so it's nice to be reminded.

A couple of things stood out to me:
- you don't need to define or use `teacher`
In the delegated class, calling `max_number_of_students` will be delegated to the wrapped object anyway. I personally prefer this to messing with dunder methods.

- I'd use/mention Forwardable.
In a similar way to your home-brewed decorator, wrap the object and def_delegator _ONLY_ the methods you need. Lower interface

@wj I think perhaps if your mouse runs out of charge, charging it and making a coffee feels like a natural reaction, rather than a thing to remember.
@hschne there is also `class_option` which has the same signature as method_option but applies to the whole class. Regardless another handy tip is that sharable methods can also live in a module which is nice for sharing between different classes.