Ciao!
This week I bombed twice. But as they say, to get past being bad at something, you need to give yourself the permission to suck. The first thing I bombed was the joke in the introduction of the previous PinkLetter.
Let me try again.
Did you know that in Italian we use “ciao” both for hello and goodbye? During my time in Chile, I’ve witnessed the following interaction
- <person 1 enters the room>
- <person 2> Ciao!
- <person
31 leaves the room>Person 2, an Italian friend of mine, will remember forever that in Spanish “chao” has only one of the two meanings.
This mistake has been especially painful because I realized as soon as I clicked send. If you are curious about how I bombed the second time, keep reading.
When working in a legacy codebase, the idea of a full blown rewrite is really tempting. But it's rarely the right choice. In AirCasting, we took another route. In our situation, we were dealing with Angular v1 and Elm but the same strategy applies regardless of the specific technologies.
Elm Tricks from Production–Migrating from Angular v1 to Elm – How we managed to migrate AirCasting from Angular v1 to Elm while still delivering value.
Imagine you asked for feedback and the other person told you "Can I be completely honest?". That is the story of how I successfully failed this week.
Can I be Completely Honest? – A Short Mentoring Story – I bombed it. I knew as soon as Grzester started the feedback session with those words. But this was great news. I wasn't looking for a pat in the back, I wanted to improve.
As promised in the post, here's the difference a great mentor can enable: before vs after.
Records in Haskell can be troublesome, especially for the lack of the dot syntax we are used to in other languages. Well, not anymore!
# Pathspec magic to treat
# patterns as shell globs.
# Matches anything
git log -- '*'
# Matches files at the root level only
git log -- ':(glob)*'
# Show commits more recent
# than a specific date.
git log --since "2 weeks ago"
-- (.) and ($) to make
-- function extractions easy.
print . sort . nub . fmap (+ 1) $ xs
print . sortNub . fmap (+ 1) $ xs
sortNub = sort . nub
-- List comprehension vs do notation
moves :: [(Int, Int)]
moves =
[ (a, b)
| a <- [-1 .. 1]
, b <- [-1 .. 1]
, not (a == 0 && b == 0)
]
moves :: [(Int, Int)]
moves = do
a <- [-1 .. 1]
b <- [-1 .. 1]
guard . not $ (a == 0 && b == 0)
pure (a, b)
When I think of object-oriented code design, Rusiłko is the name that pops in my head. I remember showing him some code I spent several hours crafting. He would take a glance and come up with a simpler architecture in a few minutes.
Tomek is a great mentor and would share great explanations of the why behind each refactoring. But I never really understood how he's able to develop a mental model of the current situation so fast and "feel" what would be the perfect structure of the code.
Why Tacit Knowledge is More Important Than Deliberate Practice shows how it's done and how to develop that "feeling".
The best part of email is that interaction is personal and one button away. So please reply with your thoughts, let's learn from each other.
Thanks for spending some time reading with me. I appreciate it.
Yours truly,
Riccardo.