HNHacker News
TopNewBestAskShowJobs

Swizec

24,822 karma · joined December 29, 2009

Swizec is a software engineer, instructor, blogger, vlogger, conference speaker, and author.

He's published several books and video courses including ReactForDataViz.com, ServerlessReact.Dev, Data Visualization with D3.js, and the work-in-progress SeverlessHandbook.Dev . He has trained the engineering teams from multiple Fortune 500 companies on React, Redux, GraphQL, Serverless, and other modern web technologies.

My work has been featured in Business Insider, LifeHacker, Huffington Post, and several dead-tree magazines. I’ve spoken on BBC Radio, appeared on Slovenian national television, and given talks all over the world.

Publishing regularly on https://swizec.com

submissionscomments
Swizec··on Feedback doesn't scale
> A Principal Engineer should be just as valued and well-treated as a CTO. Most companies fail to do this, so everyone wants to be the CTO. Establish a career track, where technical people aspire to technical positions.

I spent my whole career avoiding engineering management and trying to grow in the pure technical leadership direction. One day I realized that for every staff engineer there are 10 managers, for every principal there are 5 senior managers, etc.

Turns out management is not so bad and companies seem to appreciate that kind of help a lot more

edit: also as a manager you get to work on all those pesky “It’s a people problem, actually” parts of engineering which is pretty fun. Every time in technical leadership where it felt like “Well we’ve got the plan now we just gotta incentivize doing the plan” you’re the one doing the incentivizing yay!

Swizec··on Mag Wealth (2024)
> The interest rates often make those unattractive. You also expose yourself to the risk of a margin call with its many implications

FWIW my brokerage gives me a margin loan at 4.9% up to 30% of the portfolio. The interest is literally lower than the mortgages I see advertised these days.

Swizec··on Mag Wealth (2024)
> The following breakdowns are largely just people's net worth (assets minus liabilities) with the credit they can tap because of their assets.

> Not sure I entirely understand the point. Yeah, people with assets are generally more credit-worthy and can tap lines of credit.

Liquidity is a useful concept to think about when evaluating your risk levels. Having 500k in stocks is different than 500k in your primary residence. Same net worth but if you need to tap into 500k of stock, you can do that tomorrow. Liquidating your primary residence takes a few weeks (or months) and you’re then homeless.

I think that’s what this article is getting at. Net worth + resilience to risk. You can take bigger bets (with higher rewards) when your risk is losing some paper money vs your car or house.

edit for everyone suggesting helocs: yes you can also take a margin loan against stocks. This lowers your net worth and is a great choice if you expect inflows to continue or come back soon. It is not a good choice in all scenarios. Again back to different risk profiles :)

Swizec··on The emergence and diversification of dog morphology
> such as dogs and cats, to slavery.

Cats famously domesticated themselves though. More of a symbiosis than subjugation

Swizec··on Waymo robotaxis are now giving rides on freeways in LA, SF and Phoenix
> I don't know if I trust Waymo cars with my life, but at least there are SOME standards, compared to the natural variance of humans

I’ve ridden in a lot of Waymos – 800km I’m told! – and they’re great. The bit that impresses me most is that they drive like a confident city driver. Already in the intersection and it turns red? Floor it out of the way! Light just turned yellow and you don’t have time to stop? Continue calmly. Stuff like that.

Saw a lot of other AI cars get flustered and confused in those situations. Humans too.

For me I like Waymos because of the consistent social experience. There is none. With drivers they’re usually chatty at all the wrong moments when I’m not in the mood or just want to catch up on emails. Or I’m feeling chatty and the driver is not, it’s rarely a perfect match. With Waymo it’s just a ride.

Swizec··on LLMs are steroids for your Dunning-Kruger
> It wasn't until working through practice problems later, on my own, did it become clear how much detail I was missing.

This is a common problem in learning. Recognition is easier than recall and smoothness is confused for understanding.

You actually need to struggle with the concepts a bit to learn effectively. Without the struggle it feels more effective, but is not.

Swizec··on Local First Htmx
> Why not just write the js yourself? It's really not that complicated. The people who keep pushing for htmx are weird.

HTMX is great. We use it as a middle ground for mildly interactive parts of the app. Places where jquery/vanilla would get annoying but going full React isn’t worth it. Admin interfaces in particular are a great fit – lots of CRUD, mildly interactive, very repetitive.

Adding `hx-get` to a button or div is way way quicker than writing all that boilerplate javascript yet again for the hundredth time.

Extra bonus: it encourages you to write small self-contained composable endpoints instead of massive kitchen-sink pages.

Swizec··on One year with Next.js App Router and why we're moving on
To say, by analogy, that coordinated data fetches are hard and we’ve been working on it for a long time in different contexts.

Analogies help me understand stuff and borrow lessons others have learned.

Swizec··on One year with Next.js App Router and why we're moving on
> You're trying to explain request waterfalls

So conceptually what's the difference between a request waterfall and an N+1 query issue?

Swizec··on One year with Next.js App Router and why we're moving on
The router is just the most parenty component. It’s the component that takes some input (like a url) and uses what is essentially a giant switch statement to decide what gets rendered.
Swizec··on One year with Next.js App Router and why we're moving on
> How you manage to drag query planners into routers into compilers, how are these chasing one dream or fungible or even barely correlated, I don't even know.

Let me expand.

In component-based UIs you have components that fetch their own data. Declare their data dependencies if you will. This makes them independent and easy to move around.

You can blindly take a component that renders, say, the user’s name and avatar and move it anywhere in your app. It’s going to know how to recognize the current user, fetch their data, and render what it needs. This is great for reusability and flexibility.

Now what happens if you have a bunch of these components on a page? You get lots of uncoordinated data fetches. Each component is independent so it doesn’t know about the others so they can’t coordinate.

But who does know about them? That’s right, the router knows. So the router can make a more coordinated data fetch and get data for all those components.

This is the same job as a controller in the classical MVC approach where you write data fetching (sql queries) in the controller so data is ready when you access it in the template (jinja or whatever). Exact same problem, different naming conventions.

And just like with ORMs you have the same N+1 issue where your template pokes an attribute that was not prefetched and triggers a bunch of data fetches (sql queries). So you end up doing lots of tedious work to always hoist up the joins into your controller to trick the ORM into having that data preloaded.

Wouldn’t it be great if somehow your ORM could understand all the render logic and write its own single query that gets all the data? Yes it would. Just as wouldn’t it be great if your router could understand all the fetches your UI components will do and make one big request in the beginning? Ofc.

Now here’s how this relates to query planners: Wouldn’t it be great if you could just declare what data you want and the computer figured out how to read just the right amount from disk, join together the relevant bits, and gave you the output? Without you having to write a bunch of manual disk reading logic, loops to clean and correlate the data, and while also minimizing the amount of disk access manually? Of course it would.

Swizec··on One year with Next.js App Router and why we're moving on
> Why is a router a thing that needs to be continually rebuilt and tinkered with. Did we not learn ages ago how routers should work?

Nyes. The biggest innovation in the past 5 years has been routers that can coordinate loading data because they’re perfectly positioned to know what you’re about to access.

This is a hard problem that we’ve been solving forever. It feels like super tedious formulaic work to write an optimized SQL query or series of API requests that fetches all the necessary data with the fewest possible lookups. So we try to automate it with a sufficiently smart compiler of some sort. Query planners inside a database, ORMs, graphql, routers, memory managing compilers, it’s all chasing the same dream – what if the computer Just Knew the quickest way to grab just the right amount of data.

Swizec··on Validating your ideas on strangers (2017)
> patrons at dive bars love businesspeople walking up and asking you to listen to their startup idea

Honestly why 10 years ago in SF I stopped telling people I’m a software engineer when we chat at a bar. It was relentless.

Swizec··on Project Amplify: Powered footwear for running and walking
> because the scenery changes so damn slowly around you

Have you considered running faster?

But seriously though, I’ve gotten pretty decent at running (3h15min marathon PR) and the difference between hiking a trail and running the same trail is kinda bonkers. These days I can run a trail in 2 hours that took me 6 hours to hike 10 years ago. Hits totally different. The whole dynamic changes.

Hiking feels immensely boring now

PS: If you run fast enough you don’t even notice the scenery.

Swizec··on The Great SaaS Gaslight
> My computer in 2010 was achieving basically the same tasks it achieves now - I can browser the web, buy goods online, watch videos, chat with people, play video games, and so on. My computer today is 10-20x more powerful than the 2010 one, yet somehow everything is slower, uglier, and less reliable.

The problem is that everything after `-` is a service. Someone needs to keep those running.

By way of analogy: You don’t pay Walmart a one-time $30 fee and expect fully stocked shelves forever. You pay a small portion of every purchase to keep the supermarket service running.

Swizec··on Tiny sugar spoons are popping up on NYC fast-food menus
> If anything, as you point out, this seems to be a better way for food manufacturers to bend the rules to avoid the logo and make something seem healthier than it is rather than giving more information to consumers

Drinks in particular are tricky here. Take apple juice for example. You can have 2 brands with vastly different sugar levels and neither has added sugar. Just different concentrations.

Consumers (especially kids) will generally prefer the sweeter brand. And it all sounds healthy because it’s marketed as pure fruits! It’s even true, the juice is pure fruit. Just in concentrations that are extremely unhealthy.

Swizec··on Tiny sugar spoons are popping up on NYC fast-food menus
> Only putting the warning on drinks with more than 50g of added sugar

Wait till you see all the tricks food producers use to avoid the added sugar label. “grape juice concentrate” is not an added sugar if the food is grapes flavored, for example.

Increasingly marketed-as-healthier foods don’t include any sugar at all. Yet half the ingredients are various sugars. Sometimes as cheeky as “sugarcane concentrate”

Swizec··on US falls out of 10 most powerful passports list for first time in 20 yrs
Yeah I guess it depends on whether we mean practically or technically. EU countries travel to USA on a “visa waiver” so practically there are no restrictions. But technically you are issued a 90 day tourist visa upon arrival. The ESTA part was introduced to speed up processing by electronically submitting your info in advance so they can do a background check or whatever.
Swizec··on US falls out of 10 most powerful passports list for first time in 20 yrs
> it’s [US passport] one of only half a dozen passports that lets you visit the US visa free.

That is just false. EU passports can travel to USA Visa free and that’s 27 countries right there.

edit: Oh unless you count ESTA as a type of visa. You have to fill out a 5min always-approved form online.

Swizec··on Why do LLMs freak out over the seahorse emoji?
> The odd thing is why it would output its own mistakes, instead of internally revising until it's actually satisfied.

Happens to me all the time. Sometimes in a fast-paced conversation you have to keep talking while you’re still figuring out what you’re trying to say. So you say something, realize it’s wrong, and correct yourself. Because if you think silently for too long, you lose your turn.

Swizec··on It's not a hack to satisfy known requirements
> we are doomed to repeat mistakes or reinvent the wheel because nobody ever reads the existing research, nobody learns from the past

We do. There’s dozens of us!

Here’s the thing though, the number of programmers in the world has been doubling every 5 years or so for the past few decades. If you have been doing this for 5 years, you have more experience than half the industry. It’s a young field and information only propagates so fast. You too have the power to help it spread.

Swizec··on The strangest letter of the alphabet: The rise and fall of yogh
> as the letter "c" should make the "ch" sound

What’s the ch sound? My intuition from German class is that ch represents a throaty hhhh. Somehow that got spoiled into k in most English words.

Every c in Pacific Ocean is pronounced differently. C is a silly letter.

Swizec··on Increasing your practice surface area
As the saying goes: don’t write unless you can’t not write.

There are so many better ways to spend your time. Pushing a boulder uphill is hard. If it never gets over the hump and starts pulling, find a different boulder!

Swizec··on Unbound Academy hasn’t replaced teachers with AI
> But, again, CoL isn't relevant when we're discussing whether a particular job has 'low pay'

Well it’s a little relevant when talking specific numbers. It’s hard to know if $number is high or low without some reference.

Thanks for clarifying the AMI stuff

Swizec··on Unbound Academy hasn’t replaced teachers with AI
> There are elementary school teachers in San Francisco whose total pay and benefits in 2023 were $150k or more:

In 2025 San Francisco we have ads on buses advertising low income housing to people making less than $185k/year.

https://x.com/Swizec/status/1972053995050119631

Swizec··on How did Renaissance fairs begin?
> In truth, these festivals are all over Europe. They're just not well advertised, so you have to look for them.

Considering how crowded they feel, I’d say the advertising is plenty sufficient. They’re local events with limited space.

Swizec··on How did Renaissance fairs begin?
> Renaissance fairs don’t really exist in Europe.

We have them in Slovenia. In the summer local castles will put on a fair for the tourists and kids. Sometimes multiple!

Typically you get a visiting troupe or two from Italy, they like to do flag twirling shows. There’s always a group of folks from Czech who put on an armored fighting competition. I’ve seen jousting tournaments too. And then you have a slew of local artisans selling wares roughly inspired by the time period. There’s often an outdoor play or two, maybe belly dancing.

It’s all great fun.

Swizec··on Go ahead, write the “stupid” code
Stupid code is fine. Make it work/exist first, you can make it good later.
Swizec··on Privacy Badger is a free browser extension made by EFF to stop spying
The nearby contractor who gets all their work through referrals is by definition better than the one who needs to blast TV ads. The best people are basically never on the market.
Swizec··on Find SF parking cops
> street sweeping is either the first and third or second and fourth week of the month for most residential areas

On my block we get it 2x/week. I've never seen a street sweeper come by and the street is always dirty, but I sure have gotten tickets for leaving my vehicle out front overnight on the wrong day.

← PreviousPage 8 of 34Next →