DEV Community

Cover image for May 15th, 2020: What did you learn this week?
Nick Taylor
Nick Taylor Subscriber

Posted on

May 15th, 2020: What did you learn this week?

Photo by Chris Benson on Unsplash

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 cartoon brain with arms lifting weights saying "Knowledge is power!"](https://media.giphy.com/media/ijxKTF6iE4K4M/giphy.gif)

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.👇👇🏻👇🏼👇🏽👇🏾👇🏿

![Bender from Futurama dancing](https://media.giphy.com/media/mIZ9rPeMKefm0/giphy.gif)

Top comments (27)

Collapse
 
vaibhavkhulbe profile image
Vaibhav Khulbe

Learned GitHub Actions and integrated it into one of my projects!

Life feels...

Smooth

...now.

PS: Article soon 👀

Collapse
 
v6 profile image
🦄N B🛡

On my to-do list.

Collapse
 
waylonwalker profile image
Waylon Walker

Do it! It's totally worth it.

Collapse
 
waylonwalker profile image
Waylon Walker

💯 I definitely did the same thing!

Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Noice!

Collapse
 
matteobruni profile image
Matteo Bruni • Edited

This week I learnt about HSL colors, I always used RGB in these years but programmatically HSL is really nice.

With HSL I created these with a little code session

And I learned how to draw triangles 🤣

I Started using ESLint and Prettier too, never used them, really useful

Collapse
 
reiallenramos profile image
Rei Allen Ramos

Github Actions ♥️

Collapse
 
nickytonline profile image
Nick Taylor

That's awesome! 🔥

Yes, that's awesome!

Collapse
 
vonheikemen profile image
Heiker

I finally understood one of the use cases for fantasy-land/ap. Maybe it has more but I haven't seen them yet. These things are not common on javascript so it took me a while. So it turns out that ap doesn't do much by itself, you have to combine it with fantasy-land/map. People actually do this on a helper function they call liftA2 (yes there is a liftA3, liftA4 and so on).

The closest thing to a useful real world example I could think of was something like this.

// Somewhere in a utils.js file

const Task = {}

Task.ap = function(Fn, data) {
  return data.then(value => 
    Fn.then(fn => fn(value))
  );
}

Task.liftA2 = function(fn, A, B) {
  const curried = a => b => fn(a, b);
  return Task.ap(A.then(curried), B);
}

// the thing you're actually doing

function fetch_name(url) {
  return fetch(url).then(r => r.json()).then(res => res.name);
}

function get_name(id) {
  console.log('fetch character');
  return fetch_name('https://swapi.dev/api/people/' + id);
}

function get_planet(id) {
  console.log('fetch planet');
  return fetch_name('https://swapi.dev/api/planets/' + id);
}

function whoami(name, place) {
  return `I am ${name} from ${place}`;
}

Task.liftA2(whoami, get_name(1), get_planet(1))
  .then(console.log);

This should show.

fetch character
fetch planet
I am Luke Skywalker from Tatooine

So I took a regular function that takes two arguments (whoami) and made it work in the context of a Promise, this what they call lift. The A2 part is because it works with two arguments (I guess). Now, for this pattern to be actually useful you would have to design your own data structure that follows some of the rules in fantasy-land.

Collapse
 
yechielk profile image
Yechiel Kalmenson

My company is migrating from GSuite to Outlook (😞) so this week I learned a lot about Outlook's APIs and how they differ from GSuite's APIs.

Collapse
 
nickytonline profile image
Nick Taylor

Multiple TV and movie characters giving a thumbs up

Collapse
 
jamers99 profile image
James Esh

What are your thoughts on the Outlook API? Is it easier? Harder?

Collapse
 
prashanthn profile image
Prashanth

Trying to move from a front end developer to a full stack developer. Started to learn nodejs from udemy.
udemy.com/course/the-complete-node... this is the course that am following.
Please do suggest some noob project to do after the course and what are the other things to learn,?

Collapse
 
alexarraiza profile image
Alex Arraiza

Finally started working with animations on Flutter, and really like the feel of completion they give to the app. Also learned to blur widgets and listen to user location changes.

Been getting back motivation for Flutter lately 👌🏼

Collapse
 
rick02840 profile image
Rick Hood

Continued this week learning Node via Wes Bos' learnnode.com/ course. I am a longtime PHP/Drupal dev who has been diving into JAM Stack to see what it's all about. I became fascinated enough with it to do a talk on "All the Ways! [to build a website]" alltheways.website

There sure are lots of ways these days! A bit hard to decide which is "best" for what: Next, Gatsby, Express, straight React to an API, etc. + lots more. ;-)

Collapse
 
nickytonline profile image
Nick Taylor

@wesbos has some awesome courses. Good choice! 😉

Collapse
 
webrookie profile image
Cristian

I have learned to use Behat with Symfony 5, Mink, and Behat API Extension.
It was very hard because I haven't used BDD before and I had a lot of problems. Incorrect Gerkin, misconfiguring Behat. It took me almost two weeks and I still need to cover a lot of things. The next step is to figure out how to organize tests. Because I am testing API request-response with Behat, I need to test the frontend part with Behat and Selenium or Mink, and also I need to make coverage test 100% with PhpUnit. A lot of work to be done. Actually it really scares me. It's an adventure. Wish me luck.

Collapse
 
hxii profile image
Paul (hxii) Glushak

Recently unemployed so a bunch of spare time to work on things.
I decided one day to make a static website engine - actually learned a bunch as I was creating Saishō. Regex, caching files, more about PHP, and so on.

Collapse
 
nickytonline profile image
Nick Taylor

Nice!

Guitars and more guitars being played

Collapse
 
thebouv profile image
Anthony Bouvier

That Makefiles can invoke other "shells" so you can write inline ruby, python, etc.

agdr.org/2020/05/14/Polyglot-Makef...

Collapse
 
glennmen profile image
Glenn Carremans

Learning how to setup our own F-Droid app repository and white label Android F-Droid client. Really an amazing project!

Collapse
 
nickytonline profile image
Nick Taylor

Borat saying Great Success!

Collapse
 
barzi92367868 profile image
Barzi

Let's see...
React.useEffect cleanup functions, I needed them to clean some event listeners.
delete (JavaScript) for deleting properties from an object

Collapse
 
codewithkarthik profile image
Karthik Raja

I learned about virtual dom and jsx
dev.to/karthikraja34/what-is-virtu...

Collapse
 
rmakara profile image
Rafał Makara

First time with Google Cloud: Could Functions, Pub/Sub, Scheduler. :)

Collapse
 
nickytonline profile image
Nick Taylor

Chow Yun-fat giving a thumbs up