Here's a funny video about Ivane, a construction worker with amazing productivity and work ethic.
Imagine what Ivane could do if someone showed him how to use his tools 😱
But we are all Ivane. Always. We do things the best way we know how, then look back years later and think "Wow if only I knew then what I know now! 🤦"
I could share stories for days. Lots of my learning came by trial and error and pain.
Dumb things I did without mentors
I had to build a relational database at work and I didn't know about many-to-many tables or how relational databases work. Think I was in high school back then.
Obviously, the way you connect a user to posts is to create a posts
table that has an ID column. And then you create a string column in your users
table that has a JSON array of IDs for every post.
Yep, shipped to production 😅
The correct solution is to use a foreign key and a one to many connection.
Another good one from that era was I wrote a lot of complicated codes to make table joins in PHP because I read an article on the internet that said: joins are slow and you should avoid them.
I now know that databases are waaaaay faster at doing joins than when you do it by hand. In PHP. 💩
5 Action Steps to Senior Engineer
Get a short email series with action steps you can take right now to be true senior engineer. Go from being a pair of hands that write code to a collaborative partner that others rely on.
Here's what a reader had to say:
Hey Swiz, I really enjoyed the series. Quite useful 5-step roadmap, if everybody kept those things in mind we would be in a much better place and our industry would be a more mature and less hype-driven one. Thanks, keep up the great work!
The weird part is that everything worked.
But we were always wondering why is it that any time we fix a bug, five other things break? When we sneeze, or change the design, everything is a 3 week project ... wonder what it could be 🤔
An impressive dumb thing
Here's my proudest dumb moment – in high school I wrote a compiler.
I designed a template language for PHP. PHP is, by itself, a templating language. My language was slow because it used an interpreter that went line by line and ran template code as PHP to build the HTML output.
So over Christmas break, I turned that into a compiler that would transpile my template language into PHP.
The PHP would then output those HTML files. Even when my cache didn't work (story for another day) and the compiler ran on every request, it was faster than the interpreter 🚀
The language/compiler even supported functions, loops, conditionals, everything. And it was all written as a 1600 lines switch statement in a single function. I had so many variables in scope that I couldn't figure out a different way of making it work.
My code survives on SourceForge, here's a Gist of the templating engine – the compiler.
I found the code for a custom PHP template language compiler I wrote in 2005.
— Swizec Teller writing a book you’ll wanna read (@Swizec) February 3, 2022
You can tell I had no idea what I'm doing, but it worked. In production 🤘
Honestly I'm impressed. 18 year old Swiz was a beasthttps://t.co/8GN8eD4XSP
The most impressive part was that I made functions work with their own scoping without using recursion. Because I didn't know about that.
Later in college, I learned that you can translate between tail recursion and loops by using about 8 variables. Back then, I figured it out by hammering at bugs and edge cases until it worked.
A lot like Ivane 😅
I'm still impressed I pulled that off. Later when I took a compilers course in college, I was like, "Oh my god!". If only I knew about all these tools that exist 🤯
Or used an off-the-shelf PHP template engine of which many exist. They're battle tested and everyone knows how to use them.
How mentoring helps
Known unknowns are easy. You don't know about something so you look it up. Google, books, people who may know.
Unknown unknowns are where mentoring shines. Getting feedback from an experienced peer who can say "Yo, there's a better way. Lemme show you"
That's the highest impact activity of any senior. The single best use of your time.
We talked about how and why at our last Senior Mindset Mastermind call. We meet again next week, if you're interested.
Cheers,
~Swizec
PS: back in 2012 I published A history of my worst technical achievements, it shares even more fun projects
Become a *true* Senior Engineer
Get promoted, earn a bigger salary, work for top companies
Getting that senior title is easy. Just stick around. Being a true senior takes a new way of thinking. Do you have it?
Leave your email and get the 5 Action Steps to Senior Engineer - a short email course showing you steps you can take right now to become a true senior engineer and go from writing code to being a true collaborative partner that builds products.
5 Action Steps to Senior Engineer
Get a short email series with action steps you can take right now to be true senior engineer. Go from being a pair of hands that write code to a collaborative partner that others rely on.
Here's what a reader had to say:
Hey Swiz, I really enjoyed the series. Quite useful 5-step roadmap, if everybody kept those things in mind we would be in a much better place and our industry would be a more mature and less hype-driven one. Thanks, keep up the great work!
Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.
Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.
Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.
Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev
Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization
Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections
Want to brush up on modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com
Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog
Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com
By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️