How to Properly Organize Files in Your Codebase & Avoid Mayhem

The main library, data, UI, docs and wiki, tests, legacy and third-party components … How do we keep track and maintain order within all of this? Organizing the files in your codebase can become a daunting task.

Relax — we've got this! In this article, we’ll review the most common systems for both small and large projects, with some easy-to-follow best practices.

Why Bother?
As with pretty much all of the tasks related to project management — documentation, software commits, deployment — you’ll benefit from taking a conscious, programmatic approach. Not only it will reduce problems now, but it will also save you and your team quality time in the future when you need to quickly access and review things.

You surely can recall function names from the top of your head for whatever is it that you're coding right now, and quickly find a file you need to edit, and sharply tell what works from what doesn't — or so you think. But could you say the same about that project you w..

Continue Reading

Productive Remote Work (When Your Mental Health Says “No”)

Remote work is not easy. It sounds like a dream (and it honestly is in a lot of ways), but there’s a darker side to remote work that one can’t understand until they’ve done it.

Here’s the deal. People that work remotely often suffer from suboptimal mental health, and so you’re probably wondering, why on earth do they do it? Well, the fact is, while remote working comes with some very unique challenges, so does not working remotely. The difference is that remote work can offer the flexibility you need to build a lifestyle that suits you.

Indeed, remote work isn’t a silver bullet for burnout or wanderlust, but if you do happen to try it out and eventually wind up succumbing to loneliness, or a lack of motivation or productivity (as many remote workers do), at least you’ll have the opportunity to change things up and make things better.

In the eyes of many, it’s the lesser of two evils.

That being said, attempting to diagnose what your mind and body needs isn’t that easy. What might w..

Continue Reading

Forms, File Uploads and Security with Node.js and Express

If you’re building a web application, you’re likely to encounter the need to build HTML forms on day one. They’re a big part of the web experience, and they can be complicated.

Typically the form-handling process involves:

displaying an empty HTML form in response to an initial GET request
user submitting the form with data in a POST request
validation on both the client and the server
re-displaying the form populated with escaped data and error messages if invalid
doing something with the sanitized data on the server if it’s all valid
redirecting the user or showing a success message after data is processed.
Handling form data also comes with extra security considerations.

We’ll go through all of these and explain how to build them with Node.js and Express — the most popular web framework for Node. First, we’ll build a simple contact form where people can send a message and email address securely and then take a look what’s involved in processing file uploads.

As ever, the complet..

Continue Reading

Use ipdata’s Geolocation Data to Protect & Customize Your Site

This article was created in partnership with GoGetSSL. Thank you for supporting the partners who make SitePoint possible.

Modern websites are becoming more and more effective at customizing content based on their visitors’ location. They can redirect users to a page in their own language, display prices in the local currency, pre-fill webforms with location information, and show the current time and date for the correct timezone.

ipdata is a low-latency API that provides website owners with a wide variety of information about their visitors based on IP address (IPv4 and IPv6). Think of it as an IP geolocation and threat intelligence API.

By using a visitor’s IP address you can learn their continent, country, region, city, latitude and longitude, organization or ISP, and timezone. The API also detects Proxy and Tor users, as well as known spammers and bad bots. Blocking these risks will protect your website, and reduce the need for security strategies like CAPTCHA.

Let’s look specif..

Continue Reading

How to Get Involved in the Booming Python Job Market

From finance to artificial intelligence, data science to web development, there isn't an area in which Python isn't consolidated and flourishing. So let's discuss actual salaries, skills in demand, marketplaces, and what to do in order to remain competitive.

The Job Market Today
Information technology has created an extremely varied and dynamic market, and saying “computer science” alone is something of an umbrella term now, as pretty much everything has elements of IT in it to different degrees — from the algorithms that recommend which TV series you should watch, to the code in which this page has been programmed, and even the software integrating your home appliances with your mobile.

From this wide array of areas — all of them careers in their own right — we'll pick a handful. All of them are within multi-million/billion-dollar industries that are particularly hot as of 2020, and will most probably remain active in the foreseeable future.

We are talking:


Continue Reading

What Is Node and When Should I Use It?

So you’ve heard of Node.js, but aren’t quite sure what it is or where it fits into your development workflow. Or maybe you’ve heard people singing Node’s praises and now you’re wondering if it’s something you need to learn. Perhaps you’re familiar with another back-end technology and want to find out what’s different about Node.

If that sounds like you, then keep reading. In this article, I’ll take a beginner-friendly, high-level look at Node.js and its main paradigms. I’ll examine Node’s main use cases, as well as the current state of the Node landscape, and offer you a wide range of jumping off points (for further reading) along the way.

Please note that, throughout the article, I’ll use “Node” and “Node.js” interchangeably.

What Is Node.js?
There are plenty of definitions to be found online. Let’s take a look at a couple of the more popular ones. This is what the project’s home page has to say:

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

And th..

Continue Reading

Top 2020 WordPress Plugins for Supercharging Your Website

WordPress has become far and away the most popular website-building platform of them all. It has a wealth of tools to help you design and build a professional-looking portfolio, blog, eCommerce site, or virtually any other type of website.

Nothing is perfect. Even if this remarkable web-building platform comes close, there are certain tools or capabilities it lacks — tools or capabilities that could, for example, give your website an important extra feature, or simply put it on steroids.

Help, as they say, is just around the corner — in the form of WordPress plugins.

However, there are over 55,000 of them.

Hopefully one or more of the eight premium plugins described in this article addresses a capability you’ve been searching for. In any event, we’re willing to bet that you’d like to take a few of these popular plugins for a spin. After all, they’re free to try or use.

Sounds like a winner.

1. Brizy Website Builder for WordPress

There’s no shortage of good reasons to add the Bri..

Continue Reading

How to Make a Simple JavaScript Quiz

“How do I make a JavaScript quiz?” is one of the most common questions asked by people learning web development, and for good reason. Quizzes are fun! They’re a great way of learning about new subjects, and they allow you to engage your audience with something fun and playful.

Coding your own JavaScript quiz is also a fantastic learning exercise. It teaches you how to deal with events, manipulate the DOM, handle user input, give feedback to the user and keep track of their score (for example, using client-side storage). And when you have a basic quiz up and running, there are a whole bunch of possibilities to add more advanced functionality, such as pagination. I go into this at the end of the article.

In this tutorial, I’ll walk you though creating a multi-step JavaScript quiz which you’ll be able to adapt to your needs and add to your own site. If you'd like to see what we'll be ending up with, you can skip ahead and see the working quiz.

Things to Be Aware of Before Sta..

Continue Reading

Committing Changes to Your Codebase the Right Way

The difference between a good and a bad commit can be huge. It's no fun having to ask your colleague — or your past self — what a particular change was about, or what the current state of things is.

This article aims to provide a thorough guide to the best practices of software commits.

Why Bother?
If you’re already storing your projects on GitHub, you might assume the files are safe and that whenever you need to update code you'll pull the changes, and that’s enough. All of that might be true. But let's see what potential problems you can avoid by going the extra mile, and what additional benefits await if you do.

No Man Is an Island, Either in Teams or Individually
The reasoning above typically comes from a developer used to working alone. But the moment they need to share code with somebody else, we can expect that things are going to get messy and require a lot of explanation. Like, a lot.

Remember that our work doesn't end at just writing code. We also need..

Continue Reading

An Introduction to REST and RESTful APIs

REST is an acronym for Representational State Transfer — an almost meaningless description of the most-used web service technology! REST is a way for two computer systems to communicate over HTTP in a similar way to web browsers and servers.

Sharing data between two or more systems has always been a fundamental requirement of software development. For example, consider buying motor insurance. Your insurer must obtain information about you and your vehicle so they request data from car registration authorities, credit agencies, banks, and other systems. All this happens transparently in real time to determine whether a policy can be offered.

REST Example
Open the following link in your browser to request a random programming joke:

This is a public API implemented as RESTful web service (it follows REST conventions). Your browser will show an awful JSON-formatted programming joke, such as:

“id”: 29,
“type”: “progr..

Continue Reading