Justin Garrison
September 29, 2021

Declarative and imperative - 123dev #24

Posted on September 29, 2021  •  3 minutes  • 447 words
Bowling pins are automatically set up

Comments

Declarative and imperative

Oftentimes in technology we say declarative things are better than imperative. Why write a script when you can create an abstraction? In reality there’s no such thing as something being completely declarative outside maybe binary data in memory, but even that requires sequential steps before it can be stored.

However, we can hide imperative steps behind a declarative interface and a user never needs to know about the complexity. Just like these bowling pins, a bowler doesn’t know how they got there. They ask for another set of pins and it shows up.

Don’t try to fool yourself or your users that complexity doesn’t exist. Make your interfaces a delight to interact with.

Why are men?

Guys (I’m only talking to male identifying people when I use that term) what’s up? I saw so much crap this past weekend and we all need to do better. Here’s some ideas I’d like us all to try:

  1. Believe women. Especially when they’re brave enough to share their experience publicly
  2. Don’t give advice unless you’re explicitly being asked for it
  3. Don’t pile on or think a woman sharing is a good time for you to share your experience
  4. Don’t require women to explain themselves. If you don’t understand maybe spend a few minutes thinking about why their experience could be different from yours
  5. Be kind

I promise if we could even get these basics accomplished we could greatly improve our industry and open doors to so many incredible people.

I wrote down how I make each 123dev post an embedded Twitter video if you share it. As a true backend engineer I started with web redirects and then created a custom webserver. Finally, it dawned on me than Javascript would probably work better (and it did).

Justin Garrison’s personal site If you share this post on Twitter it will show up as an embedded video

Remote repositories looks like a really useful extension for VS Code. Being able to work on any GitHub repo without cloning it lowers the barrier for participating which could be a great enabler for new contributors.

Remote Repositories extension for Visual Studio Codecode.visualstudio.com Remotely browse and edit a source control repository from within Visual Studio Code.

I still don’t know when to use CSS grids vs other options like flexboxes. But I do know I’ve never seen as easier way to generate the code required to create a custom grid layout.

GitHub - sdras/cssgridgenerator: 🧮 Generate basic CSS Grid code to make dynamic layouts! 🧮 Generate basic CSS Grid code to make dynamic layouts! - GitHub - sdras/cssgridgenerator: 🧮 Generate basic CSS Grid code to make dynamic layouts!

Follow me

Here's where I hang out in social media