What is SQL?

Programming isn’t just about web design. In fact, working with databases constitutes the majority of what many back-end and full stack programmers work on day-to-day. There are coding languages specifically created to work with data: fetching information from the database,...

The post What is SQL? appeared first on Treehouse Blog.

What is OOP?

As anyone working in software could tell you, coding can get really complicated really quickly. Luckily for them (and us!), OOP is there to make things simpler—and, ultimately, to make apps and sites run better. What is OOP? OOP stands...

The post What is OOP? appeared first on Treehouse Blog.

What is Git?

Curious how the coding world works? Well, there are lots of ways developers work on sites and apps together, and Git is one of the main tools they use to do it. What is Git? Git is a version control...

The post What is Git? appeared first on Treehouse Blog.

A Guide to Understanding GSAP JavaScript Animation

The use of animation is one of the best ways to make your website stand out. When smartly implemented, it can dazzle users and call attention to your most important content.

Of course, web animation has been around for years. But it’s really taken off with the spread of HTML5, CSS3 and JavaScript. Adding movement to your site has never been easier – or looked better.

Among the most powerful and fascinating tools for creating animation is the GreenSock Animation Platform (GSAP). It is known for its code-based approach and the ability to create some incredible special effects.

Today, we’ll cover the basics of GSAP. We’ll explain what it is and why you’d want to use it over other techniques. Plus, we’ll show you some examples of what it can do. Let’s get started!

GSAP Logo

Animation Through Code

At first, it may sound counterintuitive. Animation is a highly-visual art. So, why would we want to create this through code, rather than a traditional GUI-based tool? And what advantages does it have over good old CSS3 animation that has been built into the standard?

Here is why GSAP may be your best choice for creating animation:

It Works with the Elements Already on Your Page

Virtually any element on a page that can be accessed through JavaScript can be animated via GSAP. It doesn’t require you to create a separate canvas just for animation. CSS elements, SVG images and even JavaScript objects can be manipulated. This allows you to get up and running more quickly.

Compatibility Is Built In

GSAP has been tested across all the major web browsers – including legacy fare such as Internet Explorer. All of the browser-related tweaks and fallbacks have already been built into the platform. As such, you won’t have to create your own hacks to get things working across the board. This has all been done for you. If something’s not supported by a particular browser, it “silently” fails and won’t produce errors.

Meanwhile, GSAP also plays nicely with a variety of JavaScript frameworks and other technologies. So you can feel free to use it in conjunction with React, Vue or jQuery. Pretty much anything you’re already utilizing on your website is likely to be compatible.

It Uses Familiar, Easy to Learn Syntax

In addition to supporting CSS classes and IDs, GSAP also allows you to style animations using common properties. Formatting your code is a familiar mix of JavaScript and CSS. It even supports hex colors.

Fast Performance

Optimization is one of the key benefits of using GSAP. It offers a combination of HTML5 and JavaScript to allow for incredibly smooth animation. Support for hardware acceleration means that you’ll get great performance – even on slower devices. You can take a speed test to compare it other animation techniques such as jQuery and standard CSS.

Fine-Grain Control

When you start to explore GSAP, you may notice how detail-oriented it is. There is a large selection of built-in features that you can use to create virtually any type of animation. You can, for instance, choose to sequence multiple animations in a row or even randomize them. And that’s not even beginning to scratch the surface of what’s possible.

The documentation is deep and there are plenty of code examples you can use to get started. But to get a better understanding of what GSAP is capable of, this introductory video offers some terrific demonstrations:

There Are Plenty of Extras

The GSAP core package (which is free) is required to get started – and it’s plenty powerful. But there are also a number of available plugins that can help you do more. There are plugins for tasks like morphing elements, implementing physics and visually drawing motion paths.

It’s worth noting, however, that plugins are only available to paying members of “Club GreenSock”. This provides special access to both the plugins and extended commercial licensing.

Plus, features are constantly being added to core. Version 3, for example, offers up a simplified API, staggered tween animations and default animation properties, to name a few.

GSAP in Action

Now that we know a little bit more about what makes GSAP such a compelling option, let’s check out some examples of what it can do.

The great thing about each of the following snippets is that they are hosted on CodePen. So, you can feel free to study them, fork them and get a deeper understanding of how everything works.

Deconstructed Advanced Staggers Grid

See the Pen
GSAP 3 Deconstructed Advanced Staggers Grid
by Pete Barr (@petebarr)
on CodePen.

Crinkled Variable Font

See the Pen
GSAP 3 & ETC Crinkled Variable Font
by Pete Barr (@petebarr)
on CodePen.

Simple Camera

See the Pen
Simple Camera
by Blake Bowen (@osublake)
on CodePen.

GSAP 3 Radio

See the Pen
GSAP 3 Radio
by Kasper De Bruyne (@kdbkapsere)
on CodePen.

MotionPath Distribute

See the Pen
MotionPath Distribute GSAP 3.0
by Craig Roblewsky (@PointC)
on CodePen.

Heartbeat 3.0

See the Pen
Heartbeat 3.0
by Chris Gannon (@chrisgannon)
on CodePen.

Squiggle Text Animation

See the Pen
Squiggle text animation
by Cassie Evans (@cassie-codes)
on CodePen.

Cube Walk

See the Pen
GSAP 3 Cube Walk
by Pete Barr (@petebarr)
on CodePen.

Circle Packed Particles

See the Pen
Circle Packed Particles (GSAP3 + PixiJS v5)
by Steve Gardner (@ste-vg)
on CodePen.

DConstruct

See the Pen
DConstruct
by Cassie Evans (@cassie-codes)
on CodePen.

Powerful Animation Made Easier

When it comes to methods for animating your web projects, GSAP offers a rare combination. It’s more powerful than web standards alone, yet it is also optimized for performance. With most other libraries, you tend to sacrifice the latter to get the former.

This lack of compromise, combined with the shiny examples above, make it easy to see why so many developers have adopted GSAP. GreenSock says over 10 million sites are running the software, and one imagines that number will only continue to grow.

So, if you’re looking to up your animation game, give GSAP a try. You’ll be able to work your way up from basic movements all the way to high-end effects quicker than you may have thought possible.

8 Git Cheat Sheets and Commands You Should Know

Every developer, especially those working on a team, likely knows about Git. The wildly popular version control system enables you to snapshot instances of your project as you code, so you can roll back or share your work with others at any time and more easily collaborate with other devs.

The problem is, Git can be very difficult to learn and is far more complex than you might expect. It’s all but essential for a modern developer, though, so you’ll just have to bear it. Luckily, there are many guides and cheat sheets out there that can make your life much easier, whether you’re brand new to Git or even a seasoned dev who just needs a few touch-ups. Here are a few of the best Git resources.

git – the simple guide

Example from git - the simple guide

Brand new to Git and in way over your head? This super simple guide condenses all the hard stuff into a few paragraphs for each concept. If you’ve got no idea where to begin, start here and work your way up.

gittutorial

Example from gittutorial

This tutorial is still intended for beginners, but it goes a bit more in depth than the simple guide above. It’s still fairly easy to understand and provides plenty of example code to work with. Also check out this site’s command reference guide.

GitSheet

Example from GitSheet

This one-page website gets right to it, listing all the most important commands with a button to copy to your clipboard. It’s super simple and that’s the point. Exactly everything you need is here and nothing more.

Git Cheat Sheet – a Collection of the Most Useful Commands

Example from Git Cheat Sheet - a Collection of the Most Useful Commands

These crucial commands are the core of the system, so make sure you memorize them. This article also explains the terms you’ll need to learn to understand Git, so it’s a good place to start for beginners. There are quite a few useful commands here.

10 Git Commands You Should Know

Example from 10 Git Commands You Should Know

There are a lot of Git commands, and it’s easy to forget about the miscellaneous – but still useful – ones. This article guides you through 10 of them and their flags, so you can fill in any cracks in your Git knowledge.

Git Cheatsheet

Example from Git Cheatsheet

If you’re a visual learner, you might like this sheet. Hover each directory to see a description of it, then click to show its related commands and hover to get their definitions. You can click a command again to pin its definition on the bottom, too. Try it out if the simple lists of commands don’t work well for you.

Lesser Known Git Commands

Example from Lesser Known Git Commands

It’s important to master the most important Git commands, but there are many lesser known ones that you shouldn’t overlook. This article highlights a few of them. Take notes so you’re not missing out on any obscure but helpful functionality.

Git Explorer

Example from Git Explorer

Here’s a fancy tool that works like a troubleshooter for when you can’t think of the right command. Just use the dropdowns to select what you want to do, like configure color or add an alias, and the program outputs the command with an easily copiable link, plus a few helpful notes when necessary.

Mastering Git Commands

Git may not be easy to learn all on your own, but the hundreds of online resources can do wonders for helping you master it. Cheat sheets give you quick access to commonly used commands, so you can use them until you have them memorized.

Choose one that best suits your learning style, and start experimenting with Git. With a little help, you’ll get the hang of it quick.

UNLIMITED DOWNLOADS: Email, admin, landing page & website templates




What Is An Algorithm?

If you’ve used social media—or even just the Internet in general—you might have heard the term “algorithm.” Algorithms hold an enormous amount of sway over what we see, click, and even purchase. As a programmer, it’s important to have a...

The post What Is An Algorithm? appeared first on Treehouse Blog.

5 Resources to Help Identify a Font

Every designer has had this problem: You visit a website or see a graphic with an awesome font you’d love to save for use in your next project. But unless the font is credited somewhere, which it often isn’t, there’s no way to easily tell what its name is.

Luckily, you no longer need to spend hours combing through font sites trying to find similar typefaces. Several resources exist online that can help you quickly identify any font – or at the very least, find a similar one.

Let’s go over a few of the best font identifiers now.

UNLIMITED DOWNLOADS: 400,000+ Fonts & Design Assets




WhatFont

Example of WhatFont

Want to hover some text and instantly see what font it is? WhatFont does just that, naming almost any font on a website at the click of a button. It can also identify fonts that are served from Typekit or Google Fonts. Get it for Chrome, Firefox, or even as a bookmarklet.

The one problem with this is that it only works on webpages; if you need to identify fonts in an image or photograph, you’ll need to use one of the services below.

WhatTheFont!

Example of WhatTheFont!

With one of the largest collections of fonts at 130k, WhatTheFont allows you to compare the typeface in any image against the huge selection at MyFonts. Just drop in an image and adjust the crop box to the text you want to identify. You can even use images with multiple fonts and lines of text.

The search results show the text within the crop box so you can compare it directly, and just keep clicking “See more” to get more results.

You’ll only find commercial fonts however, so if you know that a font you’re looking for is free or want to find free similar fonts, this might not be the best tool.

Font Finder

Example of Font Finder

Font Finder is an advanced tool that compares fonts against a library of 550k. It takes a bit more work to set up and has some limitations, as more than one line of text or more than one font in the same image can confuse it.

To make up for this, it comes with an image editor that allows you to increase contrast for dark images, crop out irrelevant portions, and reduce noise, among other tools. These allow you to get more accurate results than other font finders. You can also sort results by free or commercial.

Fontspring Matcherator

Example of Fontspring Matcherator

Upload or link to any image, crop the text you want to identify or rotate flipped images, and you’re on your way with this identifier. It automatically matches shapes and glyphs, but you can manually input glyphs as well. You’ll find free and premium fonts in the results, and just click to see the download page.

Identifont

Identifont

If all else fails, or if you’re trying to identify a popular font, try Identifont. It asks you a series of questions about the typeface’s style, then gives you a few results and several similar fonts. It also lists info like the designer and where to buy it.

Find Any Font

Before these font identifiers were popularized, it was a time-consuming process to locate a font you were looking for.

Your best bet was asking the person who made the graphic or website. And if you found it in the real world, all you could do was search through font repositories or even books of fonts. And there was no guarantee that you would ever find it.

Thanks to these programs, that’s a thing of the past. Now, just take a screenshot or scan a font and get results in seconds. Even if you can’t locate the exact typeface, you can still try the similar fonts in the search results instead.

Try them out next time you stumble on a font you want to try. You’ll be surprised at how accurate these tools are.

What Is An API?

If you have a sneaking suspicion that APIs are something you should know about in 2019, you’re onto something! In 2019, APIs are more important than ever, and their prominence in the programming world is only growing. But what exactly...

The post What Is An API? appeared first on Treehouse Blog.

Beginners Guide: Building an Online Retail Web Shop

With the release of Red Hat Decision Manager 7.3, I've started updating my free online workshop, a beginners guide to building an online retail web shop workshop.

This update is the first of two labs in this workshop, with more to follow, that installs Red Hat Decision Manager on your laptop. After the installation, you'll start by creating a new project for the online retail web shop you'll be building in subsequent labs.