This article was peer reviewed by Mark Brown. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be!
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
More from this author
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:
- 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.
- Schedule tasks. Don’t stay up late every night. Just schedule an hour or two, once or twice a week.
- No deadlines. Everyone, you included, needs to relax. Setting targets is okay, and missing them should be too.
- 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:
- Could problems during execution have been avoided with better preparation? If yes, how?
- What was the quality of the executed work, and what can I do to improve?
- 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.
If you’re not sure what to learn next, it’s always good to have a few resources at hand for inspiration.
If you enjoy visuals and art, CodePen is a great place to start. The picks are often full of amazing pens worth pulling apart to see how they work. If you’re feeling more adventurous, try Dribbble or Behance.
- React Native allows you to build mobile apps using the React framework.
Over the past few years, many new APIs have been introduced to the browser allowing you to do all sorts of fun things.
- Service Worker API is a large API that allows us to do various things, such as providing offline support.
- WebRTC is an API that allows us to create real-time connections with another computer and pass through audio and video data.
Some APIs allows us to use device hardware, to do things like reading out sensors or making the device do things (such as vibrate).
- The Ambient Light Sensor provides information about how bright the ambient light is, which we can use to adapt our site or app.
- Battery Status is rather self-explanatory; we can request the battery status. Heavier applications can use this to enable a power-saving mode.
- Geolocation grants us information about the user’s location.
- We can utilize Network Information to serve smaller files to the client.
- Notifications are quite useful for many applications, such as chat apps.
- Are you building a game which uses the mouse for input? Pointer Lock is your friend.
- Proximity lets you find out how close the user is to the device. Perhaps this could be used to detect hugs?
- Device Orientation allows us to detect when orientation changes.
- Vibration allows us to vibrate a device, which is great for games.
Libraries and Frameworks
The purpose of most libraries to get things done easily, so it never hurts to have some experience using them. The more popular libraries and frameworks (such as Angular and React) can even be required for a job. An experiment or two can also be a great way to prepare yourself for an interview.
Know that libraries and frameworks only last so long. Although they are helpful, you should be able to understand the problems they solve and be able to solve those problems without them.
- Angular is an MVC framework still used by many teams.
- React is a library used to render views.
- Polymer is a library to create Web Components.
- Lodash.js, Underscore.js and Ramda.js are all functional programming libraries. Some teams love to use them, but many don’t. Either way, a good understanding of functional programming is a much appreciated skill, so any of these are worth checking out.
- D3.js is a graphics and DOM manipulation library that works well if you want to render graphics with SVG or HTML.
- p5.js is a library inspired by Processing (a flexible software sketchbook and a language for learning how to code within the context of the visual arts). It has a rich array of functions to draw shapes and do calculations.
- Three.js is a high-level 3D API to abstract away the difficult bits of WebGL.
The Physical World
Personally, I get really excited when I can write software to do something in the physical world. If you do too, consider purchasing a set of any the following:
- Raspberry Pi is a credit card-sized single-board computer, ideal for teaching or learning.
- Arduino is similar to the Raspberry Pi, but is more focused on the electronics side of things.
- LEGO® MINDSTORMS® is a mini-computer that can control LEGO hardware. What’s not to love?
Small experiments are a great hands-on approach to learn new things. Another benefit is that they can help you improve the way you work, something that is most valuable in our industry. By enforcing a few rules we can keep experiments fun, motivating yourself to learn more and become better.
For those of you stuck in a rut, I hope this article has provided you with some motivation to start a new, fun experiment. For those of you unsure what to tackle next, I hope this article has provided you with some inspiration. Or maybe you have some great ideas for experiments? Or maybe I missed something out? Either way, I’d really love to hear from you in the comments below.
- 1 Make Your Own Social Network, Game Server, or Knowledgebase! - Sourcehunt
- 2 Create Your Own Yeoman-Style Scaffolding Tool with Caporal.js
- 4 How to Improve Site Performance (and Conversions) with Dareboost
- 5 Fetching Data from a Third-Party API with Vue.js and Axios