loading...
Cover image for May 15th, 2020: What did you learn this week?

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

nickytonline profile image Nick Taylor (he/him) ใƒป1 min read

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!"

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

Posted on by:

nickytonline profile

Nick Taylor (he/him)

@nickytonline

Senior software engineer at DEV/Forem. Caught the live coding bug on Twitch at livecoding.ca

Discussion

pic
Editor guide
 

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

Life feels...

Smooth

...now.

PS: Article soon ๐Ÿ‘€

 
 

Do it! It's totally worth it.

 
 

๐Ÿ’ฏ I definitely did the same thing!

 

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

 

Github Actions โ™ฅ๏ธ

 

That's awesome! ๐Ÿ”ฅ

Yes, that's awesome!

 

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.

 

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.

 
 

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

 

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,?

 

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 ๐Ÿ‘Œ๐Ÿผ

 

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. ;-)

 

@wesbos has some awesome courses. Good choice! ๐Ÿ˜‰

 

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.

 

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.

 
 

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

 
 

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

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

 

I learned how to use docker, now the real job is not to forget how to use it again.

 

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

 
 

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

 
 

How to make async data available anywhere in a Svelte app ๐Ÿ˜ฑ
Learned from here ;) :
svelte.dev/repl/a8d0c3c32afc4dc8b8...