There have been many times where I learn a useful programming tip or trick and want to write about it. But I don't, since it feels too short, niche, or technical to add to my blog posts. It's also too on-point for my random assortment of notes. So the knowledge languishes in my mind for a while before fading away.
So when I saw a developer with a collection of "Today I Learned" lessons, I realized it was the exact type of blog post I was missing. Styling and visuals are kept to a minimum here - it's all about what I've learned.
Below you'll find all the lessons I've recorded, sorted by category. Or you can read a random lesson.
CSS and Design
- You can destructure arrays with spread operators
- You can add underscores to numbers
- The basics of the call stack
- How to make use of recursion
- Lots of cool object methods
- How event bubbling works
- How closures work
- Rails lets you pluck attributes without loading models
- Zero is a present value
- Threads let you write asynchronous Ruby
- You can filter and map at the same time
- What causes Rails deserialization errors
- Ruby has a tally method for counting array values
- Structs are like mini classes
- How to store static data in Rails
- How to share Rails magic with plain classes
- What the heck lambdas are
- You can use custom Rails patterns