DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for October 8th, 2021: What did you learn this week?
Nick Taylor
Nick Taylor

Posted on

October 8th, 2021: What did you learn this week?

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

A picture it a dog waving their paw with the caption β€œLearning, cool at school or at home”

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

#todayilearned

Summarize a concept that is new to you.

And remember, if something you learnt was a big win for you, then you know where to drop it as well.πŸ‘‡πŸ‘‡πŸ»πŸ‘‡πŸΌπŸ‘‡πŸ½πŸ‘‡πŸΎπŸ‘‡πŸΏ

Drama from Entourage screaming β€œVictory!”

Top comments (15)

Collapse
derekenos profile image
Derek Enos • Edited on

I learned that you can use a regular expression that specifies the g flag with exec()to perform iterative matching in JavaScript :

>> const regex = /./g
>> const s = "What is happening?"
>> regex.exec(s)
Array [ "W" ]
>> regex.exec(s)
Array [ "h" ]
>> regex.exec(s)
Array [ "a" ]
>> regex.exec(s)
Array [ "t" ]
...
>> regex.exec(s)
null
>> regex.exec(s)
Array [ "W" ]
Enter fullscreen mode Exit fullscreen mode

​

Collapse
nickytonline profile image
Nick Taylor Author

Nice!

Nice

Collapse
nickymeuleman profile image
Nicky Meuleman

I learned about concurrent vs parallel programming, what that means.
Wrote a small post with some demos about it nickymeuleman.netlify.app/garden/c...

a longer post about applying that in Rust is coming πŸ‘€

Collapse
nickytonline profile image
Nick Taylor Author

Awesome!

Hackerman from Kung Fury putting on a Nintendo Power glove

Collapse
djuber profile image
Daniel Uber

I learned you can add pretty specific comments about the source of SQL queries in a rails app by adding the marginalia gem to your project.

This makes it easier to tie specific queries or updates to the location in the code that called them:

  Profile Create (0.6ms)  INSERT INTO "profiles" ("created_at", "updated_at", "user_id") VALUES ($1, $2, $3) RETURNING "id" /*line:/app/models/user.rb:20:in `block (3 levels) in <class:User>'*/  [["created_at", "2021-10-13 16:56:31.006007"], ["updated_at", "2021-10-13 16:56:31.006007"], ["user_id", 218762]]
Enter fullscreen mode Exit fullscreen mode

Now, I can that this profile creation was triggered by code on line 20 in the User class definition...

Collapse
nickytonline profile image
Nick Taylor Author

Gym teacher from Glee saying amazing!

Collapse
codergirl1991 profile image
Jessica Wilkins

I learned more about UX design and its history because I had to write an article about it for freeCodeCamp News.

Collapse
pontakornth profile image
pontakornth

Nice. I want to read it.

Collapse
nickytonline profile image
Nick Taylor Author

Pam from The Office saying Nice!

Collapse
pontakornth profile image
pontakornth

How to use TravisCI? I learned this in class. I also learned Lit a bit.

Collapse
nickytonline profile image
Nick Taylor Author

Nice!

Actor from Game of Thrones saying Nice!

Collapse
athanstan profile image
Thanos Stantzouris

Learned about Livewire Computed Properties! Now i can finally reuse all my queries in the same lifecycle without having to rerender them again and again!
πŸ€“πŸ€“πŸ˜Ž

Collapse
nickytonline profile image
Nick Taylor Author

That's awesome! πŸ”₯

Yes, that's awesome!

Collapse
dhruvindev profile image
Dhruvin

I leaned Dango channel and websockets

Collapse
nickytonline profile image
Nick Taylor Author

Stephen Colbert saying Awesome Sauce

Head to your account's Settings to...

🌚 Enable dark mode
πŸ”  Change your default font
πŸ“š Adjust your experience level to see more relevant content