Unapoitwa "computer guy" kwa family WhatsApp group. Hiyo ni promotion ama ni sentence?
Community Feed
Count Up
Numbers that count up when they come into view, using IntersectionObserver rather than a scroll listener.
Scroll listeners fire hundreds of times a second and you end up throttling them. The observer fires once. #javasc...
Hot take: most "we need AI" projects need a search box and a sorted list. #ideas
Still the fastest tool I own.
Every planning app I have tried wanted me to pick a project, a tag and a due date before I could write down the thought. By then the thought is gone. #ideas
What is the worst production incident you have survived? No names, no companies. Just the feeling.
The word "debugging" came from an actual moth. 1947, Harvard, a moth stuck in a relay of the Mark II. They taped it into the logbook and wrote "first actual case of bug being found."
The logbook with the moth still in i...
Eldoret people, where is the best place to actually sit and work? Needs power, needs WiFi that does not die at 2pm, needs chairs that are not punishment. #eldoret
The most useful thing in any codebase is a comment that says WHY. What the code does is already written down, in the code. #dev
Spent the morning reading someone else's code. Not to fix it, just to read it.
Highly recommended. You learn more patterns in an hour of reading than a week of writing your own. #learning
Accordion, No JS
An accordion built on details and summary. Open one and the others close, which normally needs JavaScript, except the name attribute on details does it natively now.
Keyboard works out of the box because the browser wro...
Short thought on prayer and planning. I used to treat them as alternatives: pray about it or plan it. They are the same posture pointed at different hours of the day. #faith
Accessibility is not a checklist at the end. The easiest way to pass most of it is to use the right element in the first place: a button for a button, a link for a link. #design
Your browser ships with a whole database. IndexedDB has been there for years and most of us still reach for localStorage and then complain about the five megabyte limit. #javascript
CSS specificity in one line: inline beats id beats class beats tag, and a rule inside a media query carries no extra weight at all.
That last part catches people constantly. Your phone styles are not losing because of t...
Naming is genuinely the hard part. I have renamed one function six times today and it still does not say what it does, which probably means the function is doing more than one thing. #dev
Water expands when it freezes, which is almost unique among liquids. If ice sank, lakes would freeze from the bottom up and most of them would never fully thaw.
Almost everything alive in cold water exists because of th...
What is the first thing you check when something breaks in production? Mine is the time. If it started exactly on the hour, it is a cron job.
Kenyan freelancers: write the scope down. Not because you expect trouble, but because "we agreed" is a sentence two people can say about completely different things.
Eldoret is at about 2,100 metres. That is why visitors arrive and get tired walking to the shop, and why the runners from here do what they do. #eldoret
Long one about shipping.
I delayed a project four months over a settings page. Not the feature, the settings page. I wanted every option in it to be right before anyone saw it....
Spent an hour clearing the desk before writing a line. Not procrastination, or at least that is what I tell myself.
There is something to it though. A clear surface in front of you is one less thing competing for attent...
Bahati ni kazi iliyofichwa. Hakuna mtu ameamka akakuta amefanikiwa.
A honeybee has to visit about two million flowers to make one pound of honey. The average worker bee makes about a twelfth of a teaspoon in her whole life. #science
Copy That
A copy button that actually tells you it worked. Clipboard API, with the label changing and changing back.
The detail people skip: it goes back to Copy on its own, so the button never lies about its current state. #java...
Endless Marquee
A logo ticker that loops with no gap and no JavaScript. The list is duplicated once and the track slides exactly half its width, so the seam never shows.
It pauses on hover, because a moving thing you cannot read is jus...
Strength Meter
A password strength meter that explains itself instead of just turning red.
It scores length first, because length beats every clever substitution, and it says which thing would help most next. #javascript #design
A cloud weighs about half a million kilograms. It stays up because the droplets are tiny and the air beneath is moving up faster than they fall. #science
Databases do not get slow because they are big. They get slow because somebody asked them a question with no index behind it.
Run EXPLAIN on the query you think is fine. It is usually the one. #dev
Indexes are not free. Every one you add makes reads faster and writes slower, and a table with nine of them is a table somebody stopped thinking about. #dev
CSS has container queries now. You can style a component by how much room IT has, not how wide the window is. That is the thing we were faking with JavaScript for ten years. #css
Trees in a forest are mostly older than the oldest person you have met, and they will be there after everyone reading this. Worth standing under one for a minute. #science
Four lines. Three hours.
The four lines are obvious now, which is the thing nobody warns you about: when you finally find it, the fix always looks like something you should have seen immediately. You should not have. Th...
Learn the shortcuts for the editor you already use before you spend a weekend trying a new one.
Multi cursor, go to definition, jump to file. Three of them. That is most of the speed people think comes from the tool. #d...
Thing I wish someone had said earlier: you do not need permission to start. You need a folder and about two hours. #ideas
Ukiona developer ameanza kuongea na laptop. Usimsumbue. Ako karibu.
Faith and work are not two drawers. The way you treat a client who has not paid yet is the same thing as the way you behave on Sunday. It is one life. #faith
Honey bees navigate by the angle of the sun, and they correct for the fact that the sun moves while they are flying. An insect doing celestial navigation with time compensation. #science
If you are learning to code and you feel stupid, that feeling is the job. It never fully leaves. You just get faster at moving through it.
The people who look confident are the ones who have been confused about more thi...
There are more possible arrangements of a standard deck of cards than there are atoms on Earth. 52 factorial is about 8 followed by 67 zeros.
Shuffle properly and that order has almost certainly never existed before. #s...
Took the laptop outside for the afternoon. The code did not get better but I did.
If you have been at the screen since morning, this is your sign. #ideas
Loading comments...
Sign in to comment.