Published at
Updated at
Reading time
4min
The Web Weekly newsletter keeps you up to date, teaches you web development tricks and covers all things working in tech.

Hello everybody! πŸ‘‹πŸ»

You might remember my "This month I learned" series in which I shared articles that I posted in... surprise... my "Today I learned" section. I decided to change the format a little bit, also include other great things that I read or discovered and to make it available via a newsletter.

So here we go!

A new daily routine

bit.ly/randommdn is my new daily routine. How can a URL be a routine? Well... this URL redirects to a random article on MDN. A slack bot reminds me every day to open it and read it while having my morning coffee. I highly recommend that because there is always good content to discover. MDN is such a good resource!

Speaking of routines – I'm keeping track of great quotes that could go into a talk for a year now and usually kept them in Inbox. I now moved these quotes onto my site. Maybe these are useful for someone in the upcoming conference season.

This month I learned

How the rest operator and default values affect the function length property

You may know that you can access the number of arguments a JavaScript function expects using the length property. I learned that the rest operator and default values have an interesting effect on it.

  function myFunc1 (a) { }            // myFunc1.length === 1
  function myFunc2 (a, ...) { }       // myFunc2.length === ?
  function myFunc3 (a, b, c, ...) { } // myFunc3.length === ?
  function myFunc4 (...a) { }         // myFunc4.length === ?
  function myFunc5 (a = 1, b = 2) { } // myFunc5.length === ?
  function myFunc6 (a = 1, b) { }     // myFunc6.length === ?
  function myFunc7 (a, b = 2) { }     // myFunc7.length === ?

The for accessibility required caption element in HTML tables

I discovered that I coded tables for years that are not following accessibility standards completely. It turns out that a fully accessible table should include a caption element. I have no idea how I couldn't know about that!

 <table>
   <caption>Food to buy</caption>
   <tr>...</tr>
 </table>

How to write reusable sane API-based Preact, React or Vue.js components using the Render Props pattern

I learned about the "Render props" pattern in React which is extremely handy when dealing with APIs. So far I haven't found a way to write reusable components that fetch data from an API – but using "Render props" fetching data from an API becomes fun. I wrote about this pattern and checked if it works also in frameworks other than React (e.g. Vue.js).

  &lt;ApiWrapper query={{ content_type: &#39;tilPost&#39;, limit: 5 }}&gt;
    {({ items }) =&gt; (
      &lt;ul&gt;
        { items.map(item =&gt; &lt;li&gt;{item.fields.title}&lt;/li&gt;) }
      &lt;/ul&gt;
    )}
  &lt;/ApiWrapper&gt;

Developer small talk

smalltalk

John David-Dalton took the time and jumped on a call with me to explain how I can use the fairly new import EcmaScript modules syntax with @std/esm in Node.js today.

Read of the month

There was one article this month that really amazed me. The article "I’m harvesting credit card numbers and passwords from your site. Here’s how." by David Gilbertson not only shows that we all are not taking care of our code dependencies enough but also explains "great" tricks on how to make an attack invisible. Excellent read!

Talks to learn from

Henrik Joreteg gave the fantastic keynote "Betting on the web" which covers the topic PWA. This topic was so present over the last year that it's hard to get me excited about it in a talk, but this talk is excellent in so many ways and includes one of my new favorite quotes, too!

You're shaping tomorrow's job market based on the technology choices you make today.

Songs that make you stop working

The wonderful voice and piano sounds of Jose Wanders in "Blue notes" made me stop coding and listen instead.

And we can listen to records with the lights off and you can draw letters on my hand.

I love this line! ❀️

I hope you enjoyed this first monthly digest and if you have any feedback let me know. Have a great February! πŸ‘‹πŸ»

If you enjoyed this article...

Join 5.3k readers and learn something new every week with Web Weekly.

Web Weekly β€” Your friendly Web Dev newsletter
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles