This is a weekly roundup of awesome DEV comments that you may have missed. You are welcome and encouraged to boost posts and comments yourself using the #bestofdev tag.
Regex. Every. Single. Time 🤦♂️
I have to use regex tools to help and it feels like I bumble my way through it each time.
- Please show me first the articles per my followed authors and tags.
- Please allow me to “hide” an article from the home page if I don’t want to see it again.
- Please indicate a “read” indicator for an article on the home page. (somehow grayed out or somewhat?)
- The side bars are good on desktop but they’re very hidden on mobile and I realize that’s on purpose but the listings are not visible on mobile. Maybe scatter the listings on mobile throughout the feed like reddit does? I haven’t thought this through so there are likely holes in that idea.
- Maybe even start showing me articles on my “to read” list if nothing else to show me? They pile up and I actually forget about them but I do visit the home page a lot.
Someone came to visit offices, as CEO wasn't there I made the visit
Turned out he was an FBI agent investigating on the company :/
I also like the more visual geometric proof of this formula. Say you want the sum of 1-4, you can make this shape:
* ** *** ****
The area of this triangle is then equivalent to our original problem, the sum of the first 4 natural numbers. But, it's hard to find the area of this "triangle", but easy if you make a rectangle (#s are a second, rotated copy of the triangle)
*#### **### ***## ****#
This is a 5x4 rectangle, so its area is 20. The rectangle is made of two of the triangles we want to know the area of, so the sum is 20/2 = 10.
If you generalize this to the first n natural numbers, you do indeed get the formula
n (n + 1) / 2
See you next week for more great comments ✌