Note: You are receiving this because you have signed up for Nordschool's weekly newsletter. Every Monday, we send out our "Better Code Monday" with 3 frontend coding tips from experienced developers.

Better Code Monday 25/11/19

Good day! 👋

Here are this week's three coding tips:

Tip #1 - PostCSS

Recently I started to work more with PostCSS and I like it so far.

The main benefit over other CSS preprocessors like Sass is the flexibility. With PostCSS you can add only the specific extra features you are missing from CSS.

To get an overview of what you can do with PostCSS, here are some of the popular PostCSS plugins: 

autoprefixer - To add vendor prefixes to CSS
cssnano - for styles compression
PostCSS Custom Properties
PostCSS Custom Media -  Custom Media Queries 
postcss-import - Transform @import rules by inlining content.

Tip #2 - Git History

Check out this VS Code extension Git History

As I shared with you earlier, looking into Git's history has many benefits. I found that extension to be very handy. Here is a taste of how it works 👇🏽

Tip #3 - Write Pessimistic Code

Recently I used a service that allowed using emails like After I signed up, their backend systems completely broke because of the "+" sign. It took their team a good week to figure out what happened. 🙄

I am guessing somebody somewhere forgot about for this "edge" case!

Can't read value of undefined - Oh, but I thought this should never happen, this variable is always defined!  😲

Sounds familiar to you? 😅

As a programmer, you hold different assumptions when you are working. When having assumptions, being pessimistic pays off! 🧐

Validate your data, remove different components, try to break things yourself...

This way you are more confident that your work is more robust and resilient in the real world. 💪🏼

New Tutorials @Nordschool


What kind of tips would you like to receive in the future? I would appreciate it if you would take the time and share any feedback. 😊 

Before you go...

Last us by sharing the newsletter with someone who you think might benefit or enjoy it. Just hit forward and share with one friend.

That is it folks, wish you a good week & until next time! 👋


If you have been forwarded this email, you are welcome to subscribe here and you will receive next week's tips. 👌
Copyright © 2019 Nordschool, All rights reserved.

Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list.

Email Marketing Powered by Mailchimp