Swizec's articles in the "coding" category
I aim to write mindblowing emails with real insight into the career and skills of a modern software engineer. "Raw and honest from the heart!" as one reader described them.
Below are 92 articles filed under coding
. Enjoy β€οΈ
Software Engineering Lessons from Production
Join Swizec's Newsletter and get insightful emails π on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.
"Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. π"
Hacking the React AST for fun and profit β #CodeWithSwiz ep34
This is hold my beer level of hackery. It didn't work but we learned lots in the process.
Use Netlify's _redirects on Gatsby Cloud
Something always goes wrong when you change hosting providers. π For me it was redirects. A vital feature of any site migration.
A fun security bug with static rendering β CodeWithSwiz #31
The flash of unlocked content is great fun for any paywall
Build privacy-focused blazing fast tweet embeds β CodeWithSwiz 30
Twitter embeds every tweet on your page as an iframe. Loads 1.2MB of JavaScript, makes 20+ HTTP requests and uses 100+ DOM nodes. π©
Twitter embeds without JavaScript, pt1 β #CodeWithSwiz 29
Continuing our quest for better Lighthouse scores, more reader privacy, and less JavaScript we attacked the next biggest culprit π Twitter.
Serverless file upload to S3 with NextJS and AWS Lambda β CodeWithSwiz 27
The Girl loves her daily cute photos, but she's bored of repeats. What if adding images was easier π€
Reverse engineer a GraphQL API to automate love notes β CodeWithSwiz 24
We used a man-in-the-middle attack to snoop an app's API traffic, replayed it in a GraphQL client, and successfully put it inside an AWS Lambda π€
React Bricks - visual blocks editor for NextJS #CodeWithSwiz 22
Tried a new visual editor for NextJS and CreateReactApp. Got a site up in 20min π€
[CodeWithSwiz 21] useAuth beta support for Firebase π
It works! useAuth has beta-level support for Firebase Auth π₯³ I did not expect that to take 3 sessions.
[CodeWithSwiz 20] Adding Firebase support to useAuth, pt2
Firebase continues to be π©. No wonder people keep asking for support in useAuth. Almost there βοΈ
[CodeWithSwiz 19] Firebase Auth support in useAuth, pt1
Support for Firebase Auth is one of the most requested features for useAuth and I figured what the heck, how hard can it be?
Gatsby to NextJS pt1, server-side-render or server-side-generate?
Gatsby and NextJS do similar things differently. One is better for websites, the other for webapps. In episode 17 of CodeWithSwiz we explore the biggest difference.
React context without context, using XState β CodeWithSwiz 14, 15
useAuth works without React Context! π here's how
Swap useReducer with XState β CodeWithSwiz 13
In Refactoring a useReducer to XState we talked about a 5 step process to turn a reducer into an XState state machine. Today answers "Ok now what?"
Refactoring a useReducer to XState, pt1 β CodeWithSwiz 11
XState promises to be like useReducer+Context combined and the simplest way to handle complex state in React apps. But can it deliver? On this episode of #CodeWithSwiz, we gave it a shot.
Prefetch data with React Query and NextJS β CodeWithSwiz 8, 9
Prefetching lets you start React apps without loading spinners. Gatsby introduced this concept with `staticQuery`, react-query and NextJS make the pattern easier π
Using JavaScript to commit to Github β CodeWithSwiz 7
Update code with a JavaScript function? Easier than you think π
Why NextJS /api routes are fab β CodeWithSwiz 6
In this episode of CodeWithSwiz, we tried NextJS's support for /api routes β code running on the backend. In a word β Wow
Exploring NextJS with a headless CMS, pt4 β CodeWithSwiz
NextJS getStaticProps, environment vars, and why you shouldn't use yarn link β all in this episode of #CodeWithSwiz
Exploring NextJS with a custom CMS, pt3 β CodeWithSwiz
Friend, this episode of #CodeWithSwiz was a great example of why you want to start using TypeScript and how thermal load *destroys* computers.
Building a small CMS with NextJS, pt2 β CodeWithSwiz
You're the computer, the CMS is your script. Starting small, trying NextJS, comparing microbundle vs. parcel for extracting libraries out of projects.
Your first NextJS app β CodeWithSwiz
On CodeWithSwiz ep2, we tried NextJS and built our first tiny app. Complete with a design system, static rendering, React Query to talk to AWS Lambda, and deployed to live π€
CodeWithSwiz: Privacy-focused embeds for YouTube, Twitter, et al
A new old experiment π regular livecoding. It's like a podcast with video, show notes, regular cadence, and we both learn something new.
Just for fun π React vs. jQuery vs. Svelte, same π± app
I was bored Monday night and decided to see if I still know how to build with jQuery. Nothing better to do, no pressing ideas, a bit of fun. Also a favor for a friend who's preparing to talk about React to a bunch of people who've never seen it before π
Finally, a practical use case for JavaScript generators!
JavaScript generators are amazing. They let you write infinite loops that terminate. Yield values from functions before they finish β¦ and I bet you've never used a JavaScript generator even once did you? I FOUND A USE! A real world practical use-case where generators make your code better. π±
A puzzle in JavaScript objects
This is a puzzle you can run into if youβre not careful, and sometimes, despite your best efforts, even if you are careful. It happened to me when I had a settings object that I passed into a view. The view then did things. When I made a new view from the settings object, it looked like the view I had just cleared.
Software Engineering Lessons from Production
Join Swizec's Newsletter and get insightful emails π on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.
"Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. π"