Monday, September 26, 2016

Improve Your JavaScript Learning with Fun Experiments

Learning never stops — especially in web development. Our industry is constantly renewing and improving itself, and so should we! Unfortunately, keeping up can be exhausting, but it doesn't have to be. In this article I will show you how small experiments can be a fun and effective way to learn new things, and to ensure that learning and keeping up-to-date stays fun.

Keeping Experiments Fun

Do you do side projects? If you do, I'm sure you did a project once that was a lot of fun at first, but quickly turned into a tangled mess. Getting bogged down in something isn't a lot of fun and can really damage motivation for both side projects, as well as your job. Major causes of this are often scope creep or pressure, while you should be relaxing in your spare time. By enforcing some rules, we can make sure we don't bump into unpleasant surprises:

  1. Prepare your work. Make sure you know exactly how big an experiment is and what it encompasses. If it is too much, split it up into manageable chunks that each have a beginning and end, or pull the plug.
  2. Schedule tasks. Don't stay up late every night. Just schedule an hour or two, once or twice a week.
  3. No deadlines. Everyone, you included, needs to relax. Setting targets is okay, and missing them should be too.
  4. Allow yourself some fun time. Although you shouldn't procrastinate, life is more than a bunch of checks on a to-do list. Take time to enjoy the fruits of your labors.

Having small experiments doesn't mean they can't be part of something bigger. Take a data visualization project, for example. It can take up some time, but is easy to split up into smaller tasks:

  • Setup a build workflow
  • Find and obtain interesting data (here's a cool list of APIs to get you inspired)
  • Fetch and process data with Node.js, utilizing ES2015 features
  • Compare and choose a technology (canvas, WebGL, DOM/SVG) or library (d3.js, p5.js, THREE.js) to visualize the data
  • Visualize the data using your tool of choice

I use a Trello board to keep track of all my experiments. It's where I list and plan them, and add relevant information until the time comes to start an experiment. For larger projects, I tend to create a new board specifically for that project and add cards for each task. Any alternative will suffice. Documenting things keeps the noise out of my head!

Reviewing the Experiment

Besides learning by actually doing new stuff, experiments are also a great opportunity to improve yourself. Look back at your experiment and ask yourself the following questions:

  1. Could problems during execution have been avoided with better preparation? If yes, how?
  2. What was the quality of the executed work, and what can I do to improve?
  3. Could I have prepared my experiment more effectively?

Reviewing and improving what we do gives us experience — something which is very valuable in our industry. Communication and documenting is, too. Many experiment reviews make great blog posts.

Although not very JavaScript related, one particularly fun experiment of mine was creating Vector Graphics in Sass, where I converted a map of coordinates into a path and rasterized it into a single-pixel box-shadow. Not only did I learn Sass functionality I wasn’t too familiar with before, I also had to research some algorithms.

A boy doing experiments in the laboratory. Explosion in the laboratory.

Finding Inspiration

If you're not sure what to learn next, it's always good to have a few resources at hand for inspiration.

Continue reading %Improve Your JavaScript Learning with Fun Experiments%


by Tim Severien via SitePoint

No comments:

Post a Comment