Jan Peterka
Posted on March 23, 2020
I started gratitude journaling a few months ago, and it feels nice.
It feels good to stop for a moment, find something you are grateful for or makes you happy, especially in these precarious times.
So, I decided to start another gratitude journal publically here, this one focused on technology, software and generally things I am grateful as a developer.
I will try to make a post at least once a week.
And for now...
..this week I am grateful for Stimulus
I guess many of you know about this little js framework from Basecamp.
I have personally seen it first about six months ago thanks to my work at NejŘemeslníci.cz, where our front-end developers started using it some time ago.
As I am not front-end developer myself (I prefer backend, mostly in Python and recently in Ruby on Rails), I only have some little knowledge in js, and when I needed to use some (e.g. for my web app ketocalc), I just wrote some terrible code, which "just worked" (but was terribly unreadable, unmaintainable and added terrible class-naming scheme to my html).
Well, at work I learned some basics of stimulus and it seemed nice.
So this weekend I decided to finally improve code in my project, so I stopped being ashamed of it whenever I worked on that project.
I didn't manage to crack how to use neither npm
nor webpack
, luckily I can use stimulus without it (I know, I know, it's not optimal and I promise, I will get there someday).
I simplified my code (both js and HTML) immensely, replaced AJAX with fetch, DRYed my code, and got rid of most of jQuery.
I am so happy now.
I know that most of it is not because of stimulus
. But it helped me with the process of writing nice, reusable code, and I love how it connects to HTML. I think it's really great js framework, especially for someone not very fond or skilled in frontend.
So, that's for this weeks gratitude.
Thanks for reading this, and let me know in comments what are you grateful for :)
Posted on March 23, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.