- Sloth Bytes
- Posts
- đŠ„ When is it "too much" Abstraction
đŠ„ When is it "too much" Abstraction

Hello friends!
Welcome to this weekâs Sloth Bytes (late edition đ ). I hope you had a chill week đ

An AI scheduling assistant that lives up to the hype.
Skej is an AI scheduling assistant that works just like a human. You can CC Skej on any email, and watch it book all your meetings. It also handles scheduling, rescheduling, and event reminders.
Imagine life with a 24/7 assistant who responds so naturally, youâll forget itâs AI.
Smart Scheduling
Skej handles time zones and can scan booking linksCustomizable
Create assistants with their own names and personalities.Flexible
Connect to multiple calendars and email addresses.Works Everywhere
Write to Skej on email, text, WhatsApp, and Slack.
Whether youâre scheduling a quick team call or coordinating a sales pitch across the globe, Skej gets it done fast and effortlessly. Youâll never want to schedule a meeting yourself, ever again.
The best part? You can try Skej for free right now.

When is it âtoo muchâ Abstraction?

When you first learn about abstraction, you think itâs a great thing.
âWow simplifying complexity! What could go wrong?â
Well⊠a lot.
Iâve learned that abstractions are like makeup.
A little makes everything better, but too much hides what's really happening.
What Are Abstractions?
Abstractions are suppose to hide complexity behind simpler interfaces.
// Raw dogging file reading
const fs = require('fs');
fs.readFile('data.txt', 'utf8', (err, data) => {
if (err) throw err;
const lines = data.split('\n');
console.log(lines);
});
// Abstracted version
const lines = readLines('data.txt');
console.log(lines);
This makes programming easier. Especially when you need to use it in multiple places.
When Does Abstraction Help?
When it eliminates repetition:
// Imagine having to write this every time you wanted to get a user
const user = await new Promise((resolve, reject) => {
db.get('SELECT * FROM users WHERE id = ?', [id], (err, row) => {
if (err) reject(err);
else resolve(row);
});
});
// With abstraction (Prisma/Drizzle style) Way better...
const user = await db.users.findUnique({ where: { id } });
When Does Abstraction Hurt?
When it becomes a Black Box (you donât understand whatâs happening.)
// Looks simple, but what does "many" mean?
await User.deleteMany({ status: 'inactive' });
Hidden Performance Costs:
// Looks innocent
const sorted = myArray.sort();
// But what sorting algorithm is it using?
// What if it's bubble sort (O(nÂČ)) instead of quicksort (O(n log n))?
The Sweet Spot
Good Abstractions Are âLeaky.â You can still access the details:
try {
const response = await axios.get('/users');
return response.data;
} catch (error) {
// Can access details when needed
if (error.response.status === 429) {
}
}
They handle easy common case and possible hard case:
// Simple
const data = await http.get('/users');
// Full control available just in case
const full_data = await http.request({
method: 'GET',
url: '/users',
timeout: 5000,
retries: 3
});
Guidelines For Abstraction
Start concrete, then abstract - Extract patterns after seeing them
Hide complexity that doesn't matter - Expose details users might need
Test without the abstraction - Maybe you donât need it in the first place
Red Flags
Can't debug because abstraction hides too much
Fighting the abstraction to do unintended things
Don't understand what it does but it "just works"
The Bottom Line
Use abstractions to eliminate repetition and make complex things approachable. Don't let them hide important details.
Ask yourself:
"Does this make my code simpler without making debugging harder?"
Good abstractions feel invisible when working, but also transparent when broken.


Thanks for the feedback!



Thanks to everyone who submitted!
AspenTheRoyal, ElGonan, GaLinux, spenpal, and RelyingEarth87.
Vowel Skewers
An authentic vowel skewer is a skewer with a delicious and juicy mix of consonants and vowels. However, the way they are made must be just right:
Skewers must begin and end with a consonant.
Skewers must alternate between consonants and vowels.
There must be an even spacing between each letter on the skewer, so that there is a consistent flavour throughout.
Create a function which returns whether a given vowel skewer is authentic.
Examples
is_authentic_skewer("B--A--N--A--N--A--S")
output = True
is_authentic_skewer("A--X--E")
output = False
# Should start and end with a consonant.
is_authentic_skewer("C-L-A-P")
output = False
# Should alternate between consonants and vowels.
is_authentic_skewer("M--A---T-E-S")
output = False
# Should have consistent spacing between letters.
Notes
All letters will be given in uppercase.
Strings without any actual skewer
"-"
or letters should returnFalse
.
How To Submit Answers
Reply with
A link to your solution (github, twitter, personal blog, portfolio, replit, etc)
or if youâre on the web version leave a comment!
If you want to be mentioned here, Iâd prefer if you sent a GitHub link or Replit!
Thatâs all from me!
Have a great week, be safe, make good choices, and have fun coding.
If I made a mistake or you have any questions, feel free to comment below or reply to the email!
See you all next week.
What'd you think of today's email? |
Want to advertise in Sloth Bytes?
If your company is interested in reaching an audience of developers and programming enthusiasts, you may want to advertise with us here.
Reply