Oof, talking about code complexity. What the hell have I got myself into?
I want to pad this section out with a couple of code examples, maybe even just one.
Occam's Razor: effectively, the simplest solution is usually correct.
KISS: Keep it simple, stupid.
In my day to day development, I try to remove any ambiguity from anything I write.
We have several classes that are a nightmare to type out:
- This one in particular is my favourite, because in
btis backtrace in byebug
Oh, interesting acronyms… No… what the hell do they mean?
If you gave this to somebody they wouldn't understand any of it and why would they?
It's an understandable mistake though. Naming is hard. Typing out long names is frustrating.
If you can get this right. Give me a shout.
I'm a firm believer in CRUD controllers. These are controllers that adhere to the 7 actions that are needed to do everything.
If you're adding more actions over these 7, then you have just made a CRUD actions that should be in a different controller.
The perfect controller action would be (nearly) empty.
That's 200 words, but I need to elaborate on these…