@LonleyCharlie_ @SznIsrael Lmao, even people that have never had the chance to interact with someone that’s half as hot as she is are shouting post-nut clarity.
Una too dey lie abeg.
lemme say this
the reason a lot of nigerians don't know that this is actually a compliment is because a lot of us don't consume mainstream media
how will someone be able to understand pop culture references when all that's on their tiktok fyp is jarvis and peller?
70% of 9ja tech space 0 value.
Just:
“let’s be mutuals”,
“let’s connect”,
“learns two lines of css post a video calling everyone in tech to connect” or “who’s awake” same nonsense rinse and repeat. No value created.
Make una continue.
Found this extremely useful website for cheatsheets. I have all kinds of cheatsheets bookmarked but it's nice to have them all in one place - https://t.co/4GZGNftACx
Platform → Runtime → Language → Framework → Library
Use what you have before moving to the next abstraction.
Here's specific examples of what I mean:
1) Platform
JavaScript animation libraries allow you to do some amazing stuff. Especially the fancier ones for 3D. But sometimes CSS animations are more than enough to get the job done, with better performance as well.
```
.fade-in { animation: fadeIn 1s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
```
2) Runtime
Did you know Node.js (and Bun/Deno) provide built-ins for testing?
Don't bother with dependency upgrades when the runtime already has the feature. Of course, sometimes the framework or library might be the right choice, but you don't need to immediately jump there.
```
import assert from 'assert'
const add = (a, b) => a + b
assert.strictEqual(add(2, 3), 5, '2 + 3 should equal 5')
```
Bun has taken this even further with some really neat stuff (e.g. shell scripting). Even Node.js is getting support for SQLite!
3) Language
TypeScript (or your favorite language) is continuously evolving.
Things you needed to rely on a third-party library for, like lodash, might be built-into the language now. Always worth checking cross-browser support for these features as they're added.
```
// Remove duplicates (i.e. lodash _.uniq)
[...new Set([1, 2, 2, 3])]; // [1, 2, 3]
// Deep clone an object (i.e. lodash _.cloneDeep)
structuredClone({ a: 1, b: { c: 2 } }); // { a: 1, b: { c: 2 } }
// Replace all instances of a substring (i.e. lodash _.replace)
'foo bar foo'.replaceAll('foo', 'baz'); // "baz bar baz"
```
Another example is `fetch` — you might not need `axios`!
4) Framework
Frameworks usually have an opinionated way about building web applications.
And that's good! They're trying to nudge you in the right direction to have the best outcome. With that being said, it's still worth checking the previous layers — for example with state management.
You know what's better than `useState` calls everywhere? The URL! You can send links to other people and immediately return to the exact UI you were viewing.
```
// acme.com?sort=desc
export default async function Page({searchParams}) {
let sortOrder = (await searchParams).sort
}
```
5) Library
If you made it this far, you might actually need a library.
Maybe there's a helpful package that saves you time and helps you ship your product faster.
This post isn't to say that libraries or frameworks or any of the higher level abstractions are bad. Quite the opposite — abstractions can be powerful.
But premature abstractions can cause you a ton of pain, and make maintenance more difficult in the long term.
Understand the layers of abstractions. And then pick the right tool for the job!