Select Page

Author: admin

Gotchas When Publishing Modules in npm and Bower

Bower and npm are de-facto the package managers of the web. I doubt there are many front-end developers out there who haven’t heard of them or used them to manage dependencies. Whilst many of us use them as consumers, one day you might decide to share a project of your own and become a contributor! This happened to me recently. I had the experience of publishing my open-source library on npm and Bower. Although their official docs were quite good, I still ended up struggling with three little known gotchas. I won’t focus on the basics in this post. You can always find and read about them. I’ll instead focus on the gotchas. Nowadays, it looks like even Bower tells people not to use Bower. However, in 2018, there are still many projects that depend on it. The state of JavaScript in 2017 survey shows that around 24% of surveyed developers still use Bower as a package manager. Therefore, I think it might take a little while before we see the end of Bower, which means it’s probably still worth supporting it to cover legacy-package-managed projects. I feel the pain of those of you working on a legacy project—that’s why I chose to publish my open source module there, too. My hope is that after this you’ll be one step ahead when you decide to share your code with...

Read More

Easier React Native Development With Expo

Expo is a collection of tools that make it easier to code React Native apps. In this tutorial, I’m going to show you how you can quickly create React Native apps using Expo. With Expo, developers can create React Native apps without all the frustrations that come with installing and configuring software dependencies such as Android Studio, Xcode, or all the other tools which are needed to develop and run a React Native app.  In this tutorial, I’m going to show you how to create a simple memory game using Expo. Along the way you’ll also learn the following:...

Read More

Introduction to Multiprocessing in Python

The multiprocessing package supports spawning processes using an API similar to the threading module. It also offers both local and remote concurrency. This tutorial will discuss multiprocessing in Python and how to use multiprocessing to communicate between processes and perform synchronization between processes, as well as logging. Introduction to Multiprocessing Multiprocessing works by creating a Process object and then calling its start() method as shown below. from multiprocessing import Process def greeting(): print 'hello world' if __name__ == '__main__': p = Process(target=greeting) p.start() p.join() In the example code above, we first import the Process class and then instantiate the...

Read More

The Red Reveal: Illusions on the Web

In part one of a series of posts about optical illusions on the web, Dan Wilson looks at how to create the “Red Reveal” that he happens to describe like this: Growing up, my family played a lot of board games. Several games such as Outburst, Password, and Clue Jr. included something that amazed me at the time — a red lens and cards with some light blue text that was obscured by a myriad of red lines. When you put the red lens over the card, the text would magically appear. Here’s one example of that effect from...

Read More

Custom Events in Laravel

In this article, we are going to explore the basics of event management in Laravel. It’s one of the important features that you, as a developer, should have in your arsenal in your desired framework. As we move on, we’ll also grab this opportunity to create a real-world example of a custom event and listener, and that’s the ultimate goal of this article as well. The concept of events in Laravel is based on a very popular software design pattern—the observer pattern. In this pattern, the system is supposed to raise events when something happens, and you could define...

Read More
www.000webhost.com