DEV Community

Cover image for Feb. 21, 2020: What did you learn this week?

Feb. 21, 2020: What did you learn this week?

Nick Taylor on February 21, 2020

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...
Collapse
 
dzhavat profile image
Dzhavat Ushev

I learnt how to make a script to kill a port (to stop a localhost server) by calling an npm command that runs a js file that runs a PowerShell script. Works like magic.

It was my first time touching a PowerShell script so this gave me extra points :D

Collapse
 
maureento8888 profile image
Maureen T'O

I've learned about the Nuxt.js framework, how to integrate Bulma with Nuxt, how to route static pages, and using HTML/CSS for fluidly!

Collapse
 
eagleera profile image
Dany the spacecowboy

did you use Buefy? it's really good!

Collapse
 
maureento8888 profile image
Maureen T'O

I use just regular Bulma! I love Bulma so much 😍

Collapse
 
ffirsching profile image
Felix Firsching

This week I learned more about the Net Core Request Pipeline.
Especially, that when using a controller with non default ActionResult return type, like for example BadRequest(), that these ActionResults will get wrapped in another ActionResult, which makes unit testing kind of tedious. E.g.:


        // controller method
        [Route("{id:int}")]
        [HttpGet]
        [ProducesResponseType(StatusCodes.Status200OK)]
        [ProducesResponseType(StatusCodes.Status404NotFound)]
        public async Task<ActionResult<Author>> GetOneById(int id)
        {
            Author result = await _authorService.GetById(id);

            if (result != null)
            {
                return result;
            }
            else
            {
                return NotFound();
            }
        }

        // tests
        [Fact(DisplayName = "Should return correct author by id")]
        public async Task Should_Return_Author_By_Id()
        {
            // arrange
            var expected = fixture.authorList.Where(author => author.Id == 1).FirstOrDefault();

            // act
            var result = await controller.GetOneById(1);

            // assert
            Assert.IsType<ActionResult<Author>>(result);
            Assert.Equal(expected, result.Value); // Using Value since ReturnType is ActionResult<Author>, so we need to access the value
        }

        [Fact(DisplayName = "Should return NotFound()")]
        public async Task Should_Return_Author_NotFound()
        {
            // act
            var result = await controller.GetOneById(999);

            // assert
            Assert.Null(result.Value);
            Assert.IsType<ActionResult<Author>>(result); // check method return type matches
            Assert.IsType<NotFoundResult>(result.Result); // check actual return is as expected
        }
Collapse
 
nickytonline profile image
Nick Taylor

Mario approves. He's just not sure which pipeline to jump into 😉

Someone playing Super Mario 1

Collapse
 
yosbelms profile image
Yosbel Marín

I've learned about Chakra UI. Also learned this week that UI Fabric decreases my productivity, so I will be better away from it. Last but not least, learned how to integrate Remote Func with Next.js

Collapse
 
nickytonline profile image
Nick Taylor

I haven’t tried it yet, but I’ve heard great things about Chakra UI.

GitHub logo chakra-ui / chakra-ui

⚡️Simple, Modular & Accessible UI Components for your React Applications


chakra-ui symbol

Build Accessible React Apps with Speed ⚡️

All Contributors Bundle Size MIT License NPM Downloads Spectrum Spectrum Spectrum

Chakra UI provides a set of accessible, reusable and composable React components that make it super easy to create websites and apps.

Looking for the documentation?

Here over here => chakra-ui.com

Features

  • Ease of Styling: Chakra UI contains a set of layout components like Box and Stack that make it easy to style your components by passing props Learn more
  • Flexible & composable: Chakra UI components are built on top of a React UI Primitive for endless composability.
  • Accessible. Chakra UI components follows the WAI-ARIA guidelines specifications and have the right aria-* attributes.
  • Dark Mode 😍: Most components in Chakra UI are dark mode compatible.

Support Chakra UI 💖

By donating $5 or more you can support the ongoing development of this project. We'll appreciate some support. Thank you to all our supporters! 🙏 [Contribute]

Individuals

Organizations

Support this project…

Collapse
 
vegafromlyra profile image
Asha Balasubramaniam • Edited

Got some time to clean up my bash prompt by adding a random emoji to it. This was way more fun that I thought it would be.. (also there’s a bug here that’s fixed in a follow up commit 😅)

Collapse
 
donald24ever profile image
Eyituoyo Donald Okegbe

Finally understood a lot on react and got my hands dirty with it. Hoping to learn more and go down further

Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Noice!

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

That I am more versatile than I think I am.

Collapse
 
odilonjk profile image
Odilon Jonathan Kröger

I've learned about writing example tests on Golang, to show the code on godoc.
I also learned how to deploy an application on GCP App Engine. :D

Collapse
 
chanting_baniya profile image
Aman

Developed an application on Springboot. Exposed rest end points. Created automated tests using Postman. It was a fun excercise.

Collapse
 
iremlaya profile image
Irem Kaya

I learnt to incorporate different React Native libs with each other + with React Hooks!
Also learnt a bit of GraphQL for making a schema for a custom api :)

Collapse
 
colewalker profile image
Cole Walker

Vue and CommonLISP. Both are cool!

Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Noice!

Collapse
 
vaibhavkhulbe profile image
Vaibhav Khulbe

Got my hands dirty with jQuery and DataTables.

Collapse
 
weeb profile image
Patrik Kiss

Learned the basics of VueJS! I'm already making my first app

Collapse
 
astrit profile image
Astrit

Today I learned about twitter.com/visualizevalue hands down the best twitter account to follow 🤘🚀

Collapse
 
zaynaib profile image
Zaynaib (Ola) Giwa

Finally learned how to lift up state in React. T_T I'm still a little bit confused about the subject but at least I got my app to work.

Collapse
 
iremlaya profile image
Irem Kaya

What are you confused about? Is there anything I can help you with? Been coding with React Native + React for a year now :)

Collapse
 
bugsysailor profile image
Bugsy Sailor

I learned a PHP class to generate PDF barcodes from the Square API to generate barcode labels for my retail shop.

Collapse
 
fennecdjay profile image
Jérémie Astor

I made my first typescript github actions, and in another one, I use awk, which for some reasons I neglected before.

Collapse
 
resmall profile image
Tiago R. Lammers
  • Learned how to make a Chrome extension (did one actually)
  • Learned that Chrome extensions will be deprecated in the near future