Ivan Mushketyk, Feb 08

Java's Thread Class in Five Minutes

Threads are Java's basic abstraction for running code in parallel. Learn how to use the Thread class to launch, finish, and wait for threads.
Design & UX
Alex Walker, Feb 08

Catching Frontend UI Design Tricks with SnappySnippet

Often the key to understanding complex things is to understand their simpler parts first. SnappySnippet is a tool that can help you with that.
Design & UX
Gabrielle Gosha, Feb 08

GIF, PNG, JPG or SVG. Which One To Use?

This short guide outlines the differences between the file types and also uses a couple of examples to show you how the file sizes vary.
Xuyen Bowles, Feb 08

Why We’re Fearful of Health and Fitness App Security

Health and fitness apps have changed the way we exercise, eat, and even sleep. Hundreds of thousands of these diverse apps exist — more than 165,000 at last count. While these apps are serious about counting our calories, and tracking our sleep cycles, very few of them take security as seriously as they should. An incredible 90% of mobile health apps have seriously risky security vulnerabilities. Given the wealth of valuable health and personal information these apps can contain, this is troubling — the app that’s smart enough to count users’ steps, or remind them to take their blood pressure meds, may be leaving these users (and their personal information) vulnerable to hackers. If that wasn’t enough, a study from the Future of Privacy Forum found that only 60% of health and fitness apps had privacy policies; compared to 76% of general apps. What implications does this have for those of us developing health and fitness apps for a loyal and trusting user base? Are we putting consumers in danger if they use our apps to keep a food log or monitor their REM sleep cycles? How can we keep our customers’ information safe and private, while still offering top-notch digital tools for their fitness and wellbeing?
Tiffany Brown, Feb 08

CSS Pseudo-classes: Styling Form Fields Based on Their Input

Let’s take a look at some pseudo-classes that are specific to form fields and form field input. These pseudo-classes can be used to style fields
M. David Green, Feb 07

Learning HTML, CSS and SVG, and Facing Fears, with Joni Trythall

Joni Trythall joins the Versioning Show to discuss learning HTML, CSS and SVG, sharing code, teaching, writing, and facing your fears.
Kyle Prinsloo, Feb 07

21 Steps to Becoming a Successful Web Developer

Kyle Prinsloo discusses the mindset, knowledge and skills required to stand out from the crowd and make a success of your web development career.
Camilo Reyes, Feb 07

Building a Microblog Using Node.js, Git and Markdown

Camilo Reyes shows how to write robust, testable code using SOLID principles by building a small but functional microblog with only minimal dependencies
Asha Laxmi, Feb 07

Using Fontello to Only Load Icon Fonts That You Need

Asha Laxmi explores how to more effectively use icon fonts in your projects by building custom, tailored font files for your custom fonts using Fontello.
Amit Diwan, Feb 07

Android App Accessibility Checklist

Developers and designers of mobile applications must always focus on ensuring accessibility for vision and hearing impaired users. This article will offer some checklists you should complete to ensure your application is more accessible. While working on any app, users rely on touchable controls. The controls should have appropriate size and be easily visible. Your app should have controls with a minimum of 48dp in length as well as width. It is approximately equal to 9mm and recommended for controls for which a user can select or take an action. In the below figures, you can see the correct and incorrect ways of sizing buttons. EditText is a control which configures itself to be editable. For ensuring accessibility, add an android:hint attribute for EditText fields. Adding the attribute will help users in understanding what content is written when the text field is empty. The content of the android:hint attribute can be spoken.
Chris Burgess, Feb 07

How to Backup and Secure WordPress with Jetpack

Automattic has integrated VaultPress into Jetpack and given the plugin new security features. Chris Burgess walks you through them.
Design & UX
Kelsey Bryant, Feb 07

Artsigma Opens up about His Full-Time Career on 99designs

Curious about pursuing a career in design? artsigma from 99designs opens up about his career to date and how he got to where he is now.
Louis Lazaris, Feb 07

More HTML5 Semantics: New Elements and Features

In this section, let's touch on lesser-known elements, attributes, and features that have been added to the HTML5 spec
Pierre-Yves Saumont, Feb 06

In Praise of Laziness

Java is known as a strict language regarding references and method arguments. It's however possible (and very useful) to implement laziness in types.
James Hibbard, Feb 06

SitePoint 2017 JavaScript Survey — the Results Are In

The results of our 2017 JavaScript survey are in! James Hibbard takes a look at how you answered and addresses some of the comments raised.
Bruno Skvorc, Feb 06

Quick Tip: LetsEncrypt "server" error fix on Ubuntu 16.04

Running into the cryptic "server" error when renewing your server's HTTPS certificates with LetsEncrypt? Here's how to solve it.
M. David Green, Feb 06

Scrum Artifacts: Product Backlog

Stories for the development team emerge from the product owner's product backlog.
Abhishek Talreja, Feb 03

How Processes Overcome These Small Business Productivity Hurdles

Businesses without good process management leave a lot of money on the table. Here's how you can boost your small business productivity.
Tiffany Brown, Feb 03

CSS Pseudo-classes: :not() and :target

Perhaps the most powerful of this new crop of pseudo-classes is :not(). It returns all elements except for those that match the selector argument.
Nicolai Parlog, Feb 02

Java Module System Hands-On Guide

In this post we'll take an existing demo application and modularize it with Java 9. If you want to follow along, head over to GitHub, where all of the code can be found. The setup instructions are important to get the scripts running with Java 9. For brevity, I removed the prefix org.codefx.demo from all package, module, and folder names in this article.

The Application Before Jigsaw

Even though I do my best to ignore the whole Christmas kerfuffle, it seemed prudent to have the demo uphold the spirit of the season. So it models an advent calendar:
  • There is a calendar, which has 24 calendar sheets.
  • Each sheet knows its day of the month and contains a surprise.
  • The death march towards Christmas is symbolized by printing the sheets (and thus the surprises) to the console.
Of course the calendar needs to be created first. It can do that by itself but it needs a way to create surprises. To this end it gets handed a list of surprise factories. This is what the main method looks like:
public static void main(String[] args) {
	List<SurpriseFactory> surpriseFactories = Arrays.asList(
			new ChocolateFactory(),
			new QuoteFactory()
	Calendar calendar =
The initial state of the project is by no means the best of what is possible before Jigsaw. Quite the contrary, it is a simplistic starting point. It consists of a single module (in the abstract sense, not the Jigsaw interpretation) that contains all required types:
  • "Surprise API" - Surprise and SurpriseFactory (both are interfaces)
  • "Calendar API" - Calendar and CalendarSheet to create the calendar
  • Surprises - a couple of Surprise and SurpriseFactory implementations
  • Main - to wire up and run the whole thing.
Compiling and running is straight forward (commands for Java 8):
# compile
javac -d classes/advent ${source files}
# package
jar -cfm jars/advent.jar ${manifest and compiled class files}
# run
java -jar jars/advent.jar

Entering Jigsaw Land

The next step is small but important. It changes nothing about the code or its organization but moves it into a Jigsaw module.


So what's a module? To quote the highly recommended State of the Module System:
A module is a named, self-describing collection of code and data. Its code is organized as a set of packages containing types, i.e., Java classes and interfaces; its data includes resources and other kinds of static information. To control how its code refers to types in other modules, a module declares which other modules it requires in order to be compiled and run. To control how code in other modules refers to types in its packages, a module declares which of those packages it exports.
(The last paragraph is actually from an old version of the document but I like how it summarizes dependencies and exports.) So compared to a JAR a module has a name that is recognized by the JVM, declares which other modules it depends on and defines which packages are part of its public API.


A module's name can be arbitrary. But to ensure uniqueness it is recommended to stick with the inverse-URL naming schema of packages. So while this is not necessary it will often mean that the module name is a prefix of the packages it contains.


A module lists the other modules it depends on to compile and run. This is true for application and library modules but also for modules in the JDK itself, which was split up into about 100 of them (have a look at them with java --list-modules). Again from the design overview:
When one module depends directly upon another in the module graph then code in the first module will be able to refer to types in the second module. We therefore say that the first module reads the second or, equivalently, that the second module is readable by the first. [...] The module system ensures that every dependence is fulfilled by precisely one other module, that the module graph is acyclic, that every module reads at most one module defining a given package, and that modules defining identically-named packages do not interfere with each other.
When any of the properties is violated, the module system refuses to compile or launch the code. This is an immense improvement over the brittle classpath, where e.g. missing JARs would only be discovered at runtime, crashing the application. It is also worth to point out that a module is only able to access another's types if it directly depends on it. So if A depends on B, which depends on C, then A is unable to access C unless it requires it explicitly.


A module lists the packages it exports. Only public types in these packages are accessible from outside the module. This means that public is no longer really public. A public type in a non-exported package is as inaccessible to the outside world as a non-public type in an exported package. Which is even more inaccessible than package-private types are before Java 9 because the module system does not even allow reflective access to them. As Jigsaw is currently implemented command line flags are the only way around this.


To be able to create a module, the project needs a in its root source directory:
module advent {
    // no imports or exports
Wait, didn't I say that we have to declare dependencies on JDK modules as well? So why didn't we mention anything here? All Java code requires Object and that class, as well as the few others the demo uses, are part of the module java.base. So literally every Java module depends on java.base, which led the Jigsaw team to the decision to automatically require it. So we do not have to mention it explicitly. The biggest change is the script to compile and run (commands for Java 9):
# compile (include
javac -d classes/advent ${source files}
# package (add module-info.class and specify main class)
jar --create \
	--file=mods/advent.jar \
	--main-class=advent.Main \
	${compiled class files}
# run (specify a module path and simply name to module to run)
java --module-path mods --module advent
We can see that compilation is almost the same - we only need to include the new in the list of classes. The jar command will create a so-called modular JAR, i.e. a JAR that contains a module. Unlike before we need no manifest anymore but can specify the main class directly. Note how the JAR is created in the directory mods. Utterly different is the way the application is started. The idea is to tell Java where to find the application modules (with --module-path mods, this is called the module path) and which module we would like to launch (with --module advent). jigsaw-demo-hands-on

Splitting Into Modules

Now it's time to really get to know Jigsaw and split that monolith up into separate modules.
Aleczander Gamboa, Feb 02

Meet the Top 3% Disrupting the Freelance Industry

Introducing Toptal - an elite talent agency that houses the top 3% of best software developers, UX/UI designers and finance experts the world has to offer.
Christopher Pitt, Feb 02

How to Make Modern PHP More Modern? With Preprocessing!

Chris adds some unexpected functionality to PHP, and all without custom extensions or recompiling. Let's unlock the power of macros and preprocessors!
Craig Buckler, Feb 02

Take the Pain Out of Form-Building with JotForm 4.0

Craig Buckler looks at JotForm 4.0, a tool that enables people without a technical background to build advanced, beautiful forms.
Design & UX
Kelsey Bryant, Feb 02

How Meella Accidentally Became a Full-Time Book Cover Designer

How do you break into the book cover design industry? Book designer Miladinka Milic shares her insights and how she stumbled into the industry by accident.