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.
Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.
And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿
Top comments (30)
Recently, while working on one of my tasks to process a very large AWS S3 file, I came across this really good
AWS S3 selectfeature. This helped me accomplish my task and decided to share my learnings with the community 😁
Hope the community finds it an interesting read 🙏
Efficiently Streaming a Large AWS S3 File via S3 Select
Idris Rampurawala ・ Apr 6 ・ 6 min read
@nickytonline thanks 😁
The king of gifs on dev.to🤭
vimhas an easy mode. You enable it by using
-yflag, like this
vim -y. Is kinda cool, it makes it behave like a regular "click-and-type" text editor. In this mode regular shortcuts work as expected,
ctrl + sfor save,
ctrl + cfor copy,
ctrl + vpaste,
ctrl + zto undo,
ctrl + yredo.
The downside (and the reason nobody makes a big deal about it) is that is was designed to be used inside a GUI, so no shortcut to quit. You need to close whatever graphical interface vim is in.
Not all is lost, I think it provides a nice base to use vim for quick edits. For the people who will never use
vimon purpose, I will recommend creating a
.vimrcon their home folder with this content.
This will create a
ctrl + qshortcut to quit. You could also replace (or add)
<Esc>as a shortcut to quit.
This way even if you enter
vimby accident it will behave somewhat like a "normal" text editor.
I learned state management in React, useState to be specific.
Same here, It was interesting to learn that, and now the state is available on functional component too. I found it quite easy handling with a hook rather than in-state in-class component. I haven't done much but I hope I am not wrong.
Me too, so far I find it easier to use hooks rather than in-state in class components.
I learned how to use GitHub's Scientist gem, and ran my first experiment on a weird trick for (sort of) speeding up
I learned something yesterday which for me was a pretty "weird" discovery:
If you use CSS Flex and you want to (for example) right-align one particular item (while leaving the rest "default"), then guess what you can use ... "margin-left: auto"!
Pretty surprising, to me at least. More info here:
Well so that wasn't what I expected really, I was looking for something like "align-self" or "justify-self" or whatever ...
Speaking of which - I can never remember which is which ("align-items" or "justify-content"), and I finally came across a way to somewhat easily remember which is which:
I learned that ruby ships with a .gdbinit file in the source repo, that permits inspecting the class/objects in the internals, basically handling the unpacking of the tagged ids for you, and saving the results as history items.
Of course I learned that after searching a few locations for "how to debug ruby" and finding a mix of snippets, most attributing a blog that's been offline for a year or two as the source, and a lot of two paragraph "here's how to start gdb" tutorials.
Kind of handy to have the tooling to debug the vm ship with the language sources!
Today I have learned about the CSS position and shared it with our community
Learn CSS positions with Elon Musk
Atul Prajapati ・ Apr 9 ・ 4 min read
I used the !! operator for the first time. I used it in a ternary and it looks something like this:
const myValue = !!thing.val ? thing.val : '';
This week I learned about React Hook, more about reference and reference forwarding in React.
Today I started using Snowpack. I'm seeing really fast build times for React applications with it - even on a creaky old laptop adding a new Tailwind class is basically instantaneous.
I've been trying to learn some zig
I learn about using graph theory to solve problems!
this week, i learnt 3 new courses :
1) Express REST API
2) Introduction into micro-services
3) mind mapping techniques for better learning.