#programming

danie10@squeet.me

5 Things I Wish I Knew When I First Learned Programming

A graphic showing a terminal screen with lots of text on it.
Starting your programming journey is exciting, but itโ€™s easy to fall into traps that slow down your progress. By understanding the common mistakes new programmers make, youโ€™ll set yourself up for success right from the start. Here are five mistakes often made that you can learn from.

I must say what always helped me, was having a real world problem to solve and build in my new language I was learning. I had an app that Iโ€™d written way back to do prompt for data and then to calculate one independent variable regressions from that.

Every time I was learning a new language, Iโ€™d take that code, and rewrite it in the new language. Needless to say, it improved every time I learnt a new language!

Coding is very much about perseverance, having a problem to solve, and being able to break down the errors bit by bit until you get it working. It is very rarely going to work the first time around.

Another thing that worked for me was breaking it down into chunks, and getting each chunk or module to work on its own with an input and an output. It made diagnosis easier as you progressed.

Iโ€™m not sure about art, as Iโ€™m really useless as design and artistic flair, but coding can be gotten right with just persevering with it long enough. I have infinite patience, and can (used to) persevere through many nights to finish a coding job. It filled me with excitement to arrive at the final product, and have someone use it, and then finding it helped them.

To me, coding was like creating a work of art. If it was functional, and was also durable and future-proofed, I was always filled with a sense of satisfaction and achievement.

See howtogeek.com/things-i-wish-i-โ€ฆ
#Blog, #coding, #programming, #technology

tord_dellsen@diasp.eu

DWEP technical update

I've been working on the DWEP app, and have just reviewed the service-worker.js file, which is central to PWAs

I decided to use a cache first caching/fetching strategy, with a versioned cache, and with some calls (in the install and activate event handlers) to ensure that the latest version of the service worker itself (and therefore cached resources since the cache version number is located in the service worker file) is used as soon as possible

https://codeberg.org/tord/dwep/src/branch/main/service-worker.js

It seems to be the best option and i don't really see any downside to it. The only thing is that i have to update the cache version every time i make an update to the app

#dwep #CacheStrategy #cache #caching #WebDevelopment #PWA #javascript #programming