What have you learned this week?

twitter logo github logo ・1 min read

As the title says, what have you learned this week and would like to share with others? It could be a whole framework, some cool trick, best practice... whatever comes to your mind and is related to your profession.

For beginners, this could be a good place to get some quick tips and tricks on topics you're currently learning. This could also serve as a motivation to learn more and inspire.

I always try to work on a project or learn something new every week. And this week, one of the things I've learned the shorthand syntax for <Fragment></Fragment> in React is <></>.

twitter logo DISCUSS (4)
markdown guide
 

I found a cool trick using 7zip, to extract a file from an archive, and output it to a custom filename.

I do data processing, and for one particular client, there are multiple file layouts, but basically get named either templatea.txt or templateb.txt. The data comes in as a gzipped file with a very long name. I unzip the file and rename it to either templatea.txt or templateb.txt. I decided to see if I could extract the file and rename it in one step. The first google result, superuser.com/questions/558396/aut... , gave me the answer I was looking for.

For my case, at least, the command ends up being:

7z e *.gz -so > templatea.txt

The 'e' is for extract, '-so' indicates that it should be redirected to standard out, and then I redirect it with '> templatea.txt' into the appropriate file name.

I will probably make this a batch script for now, as I have several small batch scripts like this.

 

I've started learning React Hooks today. In the beginning of the week started NodeJs. And doin side project

 

Hooks are awesome! I've been working with them for the past month or so and I've really enjoyed working with them so far. I'll be posting a step-by-step tutorial about building custom hooks next week, so feel free to keep an eye out for it.

 

I'll love it, because I'm trying to build custom hooks. Waitin 4 it)

Classic DEV Post from Jun 2

Software development is a social profession

The software community has lost itself in a maze of frameworks and languages

Adrian Bece profile image
React, Frontend, Magento 2 certified developer. Magento PWA Studio contributor. Rock and metal music fan. Reads Dune, sci-fi novels and Calvin & Hobbes. Creates amazing interfaces @ prototyp.digital

Tip: You can configure your dev.to reading experience, such as using sans serif fonts.

Go to your the "misc." section of your settings.

Customize dev.to