… But now, not only do you not really know what a is, you don’t know what x is either.
And so you shove a ? on the type of x (or things x can become) and off you go again!
Catch errors and absences early. Don’t half-ass your type system… USE IT!
… But now, not only do you not really know what a is, you don’t know what x is either.
And so you shove a ? on the type of x (or things x can become) and off you go again!
Catch errors and absences early. Don’t half-ass your type system… USE IT!
Coding thoughts:
The combination of optional/nullable types and optional chaining gives you so much temptation to write bad code.
It’s become so easy to just add a little ? here and a “| null” there to quickly fix some error you saw.
But it’s a trap!!
Once you start they breed like crazy through your codebase.
It’s weird for me to see:
x = a?.b?.c
Because if you have an a then you should know that you have a b and a c! (I know this is not the case with TypeScript)
…
I’ve been working with it for a while now and I still think that the React eco system is a series of complex and fragile kludges that only exist because everyone wanted to use React. Bundlers. Transpilers. CSS-in-JS. HTML-in-JS. CSS-in-HTML-in-JS. SSR. ISR.
My opinion, of course. I just don’t get it. Maybe I had a bad introduction to it or something. But that spark of understanding simply hasn’t come despite months of open minded exploration.
Haha. WordPress Block Editor in Minecraft. Very good.
Oh wow! TIL from @briancoords that you can get to all the useful links (dev notes, field guide, release schedule) for a #WordPress major release by going to:
https://make.wordpress.org/core/<version>
e.g.
https://make.wordpress.org/core/6.5
SO useful! Thanks, Brian!
Bandle spoiler
Realising this morning that George Ezra’s shotgun is actually Baby Shark with different words.
I honestly thought I’d had every possible cold/flu bug these last six months. But here I am, in bed, with every inch of my body hurting.
What happened this year?!
Nice BBC article on aphantasia (not being able to see images in your mind):
Aphantasia: Why I cannot picture my children in my mind https://www.bbc.co.uk/news/health-68675976
Next up in my “readable code tips” series:
There is a balance to be found between "inlining" multiple expressions, and using temporary variables.
You may also learn about “short-circuit evaluation” here if you don't know what that is (or you may just put a name to something you already know).
https://rosswintle.uk/2024/03/readable-code-tips-dont-inline-everything/
A while ago I found crosshare.org
The little daily puzzle has become part of my day. But you can make them too! And the constructor is very good.
My kid (8) and I have made a couple of puzzles. They are MOSTLY hers, but I’ve chipped in a bit.
Enjoy!
https://crosshare.org/crosswords/1Bqixf9crDP7jVPiR907/rabbiting-on
https://crosshare.org/crosswords/9x7JGmoJ2bGfre5oVzrQ/adas-first
This smartphone desktop robot thing does look super cute and fun. But also looks super data-slurpy:
“All your precious, ephemeral moments are now kept by him”
“Always observing his surroundings… LOOI can analyze everything he sees”
Also they overdid the gimmicks. And I’d never buy hardware on kickstarter.
Fun idea though.
https://www.kickstarter.com/projects/tangiblefuture/looi-robot-turn-your-smartphone-into-a-desktop-robot
Idea: Gyms should have “quiet sessions” for introverts and neurodiverse folks. The lights and music are SO annoying. 😬
I’ve decided that my new primary KPI at work will be MCPW (Meetings Cancelled Per Week)
😃
This was written specially for @nathan , eh?
😉
https://www.atlasobscura.com/articles/why-do-canadians-say-eh
Yes, I AM continuing the series of readable code tips. Here's number two in the series:
Readable code tips: Extract complex conditions
https://rosswintle.uk/2024/03/readable-code-tips-extract-complex-conditions/
It's just amazing what's stuck in the back of your brain, waiting to be coaxed out by a few musical notes.
My kid plays this tune from the video game Deltarune today:
https://music.youtube.com/watch?v=XH1ibcc_MpQ&si=y7gDPB8YDE-b4ORw
And I'm instantly humming the demo tune from the ancient Casio VL-TONE keyboard that my sister owned back in about 1985.
Trusting code…
You kinda have a relationship with code from your projects. You probably have feelings about it.
As I've been thinking about code style, I've also been thinking about how it's important to build up trust in a code base.
Ah poop. My only decent local bike shop just closed. Sad times. Need a service and maybe a new freewheel too. Where do I go now‽
Dear Parents
**PARKING SAFETY**
I’d like to draw your attention to the increasing problem of dangerous parking on the school grounds.
There have been recent incidents involving a large carriage and a submersible boat.
There are clear markings and rules around parking. And contravention of these rules poses a danger to students, staff, and the local community.
Mr Snape will be patrolling the grounds to make sure any illegally parked vehicles are moved on.
Best wishes
Prof Dumbledore