Tuesday, November 12, 2019

How TypeScript Makes You a Better JavaScript Developer

TypeScript

What do Airbnb, Google, Lyft and Asana have in common? They've all migrated several codebases to TypeScript.

Whether it is eating healthier, exercising, or sleeping more, our humans love self-improvement. The same applies to our careers. If someone shared tips for improving as a programmer, your ears would perk.

In this article, the goal is to be that someone. We know TypeScript will make you a better JavaScript developer for several reasons. You'll feel confident when writing code. Fewer errors will appear in your production code. It will be easier to refactor code. You'll write fewer tests (yay!). And overall, you'll have a better coding experience in your editor.

What Even Is TypeScript?

TypeScript is a compiled language. You write TypeScript and it compiles to JavaScript. Essentially, you're writing JavaScript, but with a type system. JavaScript developers should have a seamless transition because the languages are the same, except for a few quirks.

Here's a basic example of a function in both JavaScript and TypeScript:

    function helloFromSitePoint(name) {
        return `Hello, ${name} from SitePoint!`
    }
    function helloFromSitePoint(name: string) {
        return `Hello, ${name} from SitePoint!`
    }

Notice how the two are almost identical. The difference is the type annotation on the "name" parameter in TypeScript. This tells the compiler, "Hey, make sure when someone calls this function, they only pass in a string." We won't go into much depth but this example should illustrate the bare minimal of TypeScript.

How Will TypeScript Make Me Better?

TypeScript will improve your skills as a JavaScript developer by:

  • giving you more confidence,
  • catching errors before they hit production,
  • making it easier to refactor code,
  • saving you time from writing tests,
  • providing you with a better coding experience.

Let's explore each of these a bit deeper.

The post How TypeScript Makes You a Better JavaScript Developer appeared first on SitePoint.


by JavaScript Joe via SitePoint

Are you blocked from WhatsApp suddenly? Maybe this is the reason!

WhatsApp seems to be getting tougher on its users and is now permanently banning users who are part of groups with suspicious names. According to several reports published on the web news portal, Reddit, many users have reported being blocked from the popular messaging platform. In fact, one...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Saima Salim via Digital Information World

The Lowdown on SEO This Year (infographic)

Search engine optimization (SEO) is a process by which you make your website more visible to the people that are searching for queries that have something or the other to do with the subject matter that your website deals with. A survey conducted by Zazzle Media, one that they have conducted for...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Muhammad via Digital Information World

Font Psychology: The Art Of Choosing The Right Typeface For Your Brand

It’s a logo that has become synonymous with the internet: the multi-colored Google banner set against a clean white background. After 16 years of sporting the classic 1999 masthead, the internet powerhouse finally decided to debut a contemporary version of its beloved logo to represent the...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Teens Trying to Become Social Media Influencers Are Compromising Personal Data

One of the newer kinds of careers that a lot of people are looking into involves becoming digital stars and influencer on social media. The main reason behind people wanting to try and become influencers has to do with the money and fame that can be earned. You can earn quite a hefty income if you...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Muhammad via Digital Information World

Yo! Podcast: Yo! Podcast #008 – Adam Wathan – Tailwind CSS, Refactoring UI

Adam Wathan (@adamwathan) is 1 part metalhead, 2 parts online education juggernaut. Over the past few years, Adam has distilled his obsessive development research into several online courses and books, achieving millions of Dollars in sales. We rap about SaaS vs once-off payments, Pantera vs Slayer, why he uses Gumroad, the advantage of multi-tier pricing and of course his rapidly growing CSS Framework, Tailwind CSS.

The conversation topics, episode links and text transcription are found below – hope you enjoy the interview!

Yo! LogoWhat is Yo!??? Yo! is a celebration of great design and development online. The Yo! Newsletter curates quality new resources each week while the Yo! Podcast spotlights the incredible people building these resources. Subscribe on your favorite streaming platforms:


Conversation Topics:

  • 00:58 – Interview starts
  • What on Earth is a Beavertail?
  • Do you think the university education system is broken?
  • Do you feel you make more impact than the average university lecturer?
  • Would you call yourself a builder or a teacher?
  • Intermission: No Context
  • Seeing Pantera and Slayer at the same show
  • Why are you using Gumroad for payment processing and product delivery?
  • Intermission: Yo! Podcast soundtrack on Spotify
  • Would you recommend freemium pricing for online courses?
  • What is the best medium for online courses? Video? eBook?
  • Is it vital to have multiple pricing tiers?
  • Intermission: True, False, Maybe
  • Has the Refacturing UI book made more than a Million Dollars?
  • What makes a great partnership?
  • How do you decide what side projects to abandon?
  • Intermission: AJ water break
  • In a month period, how much do you work on your previous courses?
  • What’s your work day look like?
  • What are the best resources to learn Tailwind CSS?
  • Do you think Tailwind CSS will catch up with Boostrap CSS marketshare?
  • Intermission: Donate a Coffee
  • Is it still worth marketing on YouTube? Medium?
  • Is a Subscription Model right for all products?
  • What advice do you have for taking the leap?
  • Which was the best Batman?
  • Bonus: That one time I didn’t check my email


Transcription:

Check back Friday 15th November.


by Rob Hope @robhope via One Page Love

Study: Up to one third have considered leaving Facebook!

According to a recent report published by Audience Project, there is observable drop in the popularity of Facebook in US, UK, Denmark and Finland. Around 33 percent users have stopped using this application. However, according to the study, loss would not be too much because users are shifting...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by aqsqa qadir via Digital Information World