Steve (Builder.io) Profile picture
Jul 12, 2022 8 tweets 2 min read Read on X
A thread of my favorite clever CSS tricks 👇
Clever use of position: sticky by Apple -
Clever use of scroll-snap by Tesla:
Not the best for a11y, but a clever trick for a JS-free hamburger menu nonetheless:
Clever use of CSS fundamentals by Airbnb:
Apple yet again, this one involves a bit of JS:
A very nice pure CSS product carousel implementation inspired by Nike and Apple:
Frosted glass effect, by you know who:

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Steve (Builder.io)

Steve (Builder.io) Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Steve8708

Aug 22
LLMs are pretty cool when they're not being incredibly stupid

In your products, you need more of the smart parts and less of the dumb parts

Steal my tricks for making LLMs as least dumb as possible 🧵 Two code examples pointing out that adding specificity to the prompt yields better results
The Achilles heel of LLMs is hallucination, aka giving confidently wrong answers

E.g. if you ask chatgpt "how do I create a user with 's APIs" it'll say "create a POST to /api/v1/users"

Thing is, this API doesn't exist, and never did

So what can you do? Builder.io
A diagram showing AI gives both correct responses and incorrect hallucinations
LLMs are bad at acknowledging what they don't know

But they are good at answering questions from a well defined context

So instead, you can provide a set of information via RAG (retrieve it and supply it in the prompt) and tell the LLM to *only* answer questions from this data A code example showing RAG
Read 15 tweets
Aug 17
Don't be that teammate who blindly refactors code and only makes things worse.

Let's look at some good vs bad refactoring patterns with real examples 🧵 Code screenshot with text that says "this refactor caused us downtime"
Let's take this code.

I hired a developer once that saw us calling this `functions.runWith(...)` repeatedly with different options and decided to consolidate it all into one createApi function Code example with some redundant function calls
This new, consolidated code, had a huge issue.

Can you see it?

When we started deploying these APIs, they began breaking left and right. Code that consolidates the function calls into one, also consolidating the options each gave into one set of options used for all
Read 18 tweets
Apr 18, 2023
ChatGPT now in your terminal!

Chat mode was just added to AI Shell, and it's shockingly handy
Totally free and open source, just requires an OpenAI API key - github.com/builderio/ai-s…
Hoping to add more backends in the future, such as Alpaca so you can use this completely free with no API keys needed

Looking for contributors! github.com/BuilderIO/ai-s…
Read 4 tweets
Feb 14, 2023
8 modern browser APIs you might not know, but really should:
structuredClone() gives you browser native deep cloning that supports a variety of types like Date, Set, Map, etc
Promise.allSettled helps you await multiple promises concurrently to increase perceived performance, while still handling errors effectively
Read 10 tweets
Jan 15, 2023
the code was written like 3 weeks ago ok Spiderman pointing at himse...
In all seriousness though, I know I post a lot of coding tips and "do this not that" best practices stuff, but I want to use this as a reminder to point out...
I don't write perfect code. No one does. My code has been complained about by fellow engineers as much as anyone, if not probably more.
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(