Why You Should Use a Relational Database Instead of NoSQL for Your IoT Applications

In almost every industry, there is a digital transformation underway that is driven by IoT and Big Data. What’s important to recognize is that IoT isn’t about things; it’s about the data those things collect. Organizations rely on this data to provide better user experiences, to make smarter business decisions, and, ultimately, fuel their growth.

However, none of this is possible without a reliable database that is able to handle the massive amounts of data generated by IoT devices. Relational databases are known for being flexible, easy to work with, and mature. What they aren’t particularly known for is scale, which prompted the creation of NoSQL databases. As you may or may not already know, there are ways to overcome this disadvantage.

Low-Latency Java: Part 1 — Introduction

This is the first article of a multi-part series on low latency programming in Java. At the end of this introductory article, you will have grasped the following concepts:

  • What is latency, and why should I worry about it as a developer?
  • How is latency characterized, and what do percentile numbers mean?
  • What factors contribute to latency?

So, without further ado, let's begin.

WordPress 5.1.1 Patches Critical Vulnerability

WordPress 5.1.1 was released yesterday evening with an important security update for a critical cross-site scripting vulnerability found in 5.1 and prior versions. The release post credited Simon Scannell of RIPS Technologies for discovering and reporting the vulnerability. Scannell published a post summarizing how an unauthenticated attacker could take over any WordPress site that has comments enabled:

An attacker can take over any WordPress site that has comments enabled by tricking an administrator of a target blog to visit a website set up by the attacker. As soon as the victim administrator visits the malicious website, a cross-site request forgery (CSRF) exploit is run against the target WordPress blog in the background, without the victim noticing. The CSRF exploit abuses multiple logic flaws and sanitization errors that when combined lead to Remote Code Execution and a full site takeover.

Since WordPress ships with comments enabled by default, an attacker could exploit this vulnerability on any site with the default settings. Auto-updates went out yesterday but administrators who have background updates disabled are advised to update immediately.

The maintenance release also includes the ability for hosts to offer a button to prompt their users to update PHP ahead of WordPress’ planned minimum PHP version bump in 5.2. The “Update PHP” notice can be filtered to change the recommended version.

Version 5.1.2 is expected to follow in two weeks.

Dark Mode WordPress Plugin Up for Adoption

Daniel James is putting his Dark Mode plugin up for adoption.

“I’m stepping back from plugin development (and WordPress contributions) and would like to see someone passionate about it pick it up,” James said.

Dark Mode has 2,000 active installations and is the most popular among a handful of dark or “night mode” plugins in the official directory. In August 2018, James submitted a merge proposal for including Dark Mode in core, but it was shot down the same day it was published. Gary Pendergast said the proposal “seemed premature” and noted that the project was lacking several merge criteria outlined on the Handbook page for feature plugins. He cited a lack of weekly chats, no kickoff and update posts, and no testing from the Flow team, among other concerns.

“I decided recently that because of the direction WordPress is going in with the move towards React with Gutenberg that I should probably focus my efforts elsewhere,” James said.

“That’s mostly to do with the merge proposal getting rejected fairly quickly without any helpful next steps on how to improve it. Plus, with how rapidly Gutenberg is being developed, I’d have to pretty much work in tandem with the Gutenberg team to ensure the Dark Mode plugin styled the UI correctly. That’s spare time I just don’t have.

“I feel like WordPress leadership is another reason. It’s really difficult (I think/feel) to get something like Dark Mode pushed through. It’s very much near the bottom of the priority list, which I get, but sucks a bit when you’re volunteering in spare time of course.” James said the plugin currently requires a few hours per week in support and maintenance.

The popularity of dark modes for applications has taken off after macOS Mojave introduced a dark mode, and has also been spurred on by the news that Apple’s 2020 iPhone lineup will be produced with OLED screens. Many popular applications, such as YouTube, Facebook Messenger, Twitter, and Google Maps already have a dark mode that either works automatically based on light conditions or can be manually enabled. Chrome also recently added a dark browsing mode for Mac users. Fans of dark mode claim it is easier on the eyes and conserves battery.

Users who tend to gravitate towards dark mode are still a small subset, but the feature is gaining momentum. A dark mode may one day come to WordPress core but it doesn’t seem likely in the near future. Daniel James’ Dark Mode plugin isn’t ready for core, since it doesn’t support the new editor, but he said he hopes the new owner will find the time to take it where it needs to go.

“I’m happy to transfer the plugin to someone else to continue it, as long as they’re well known/respected,” James said. “I won’t just be giving it away for security reasons. It would be great for it to be included in core one day, but at the very least it would be nice for someone who really likes it to just continue it.”

The Benefits of Structuring CSS Around Appearance and Layout

I like this point that Jonathan Snook made on Twitter and I’ve been thinking about it non-stop because it describes something that’s really hard about writing CSS:

In fact, I reckon this is the hardest thing about writing maintainable CSS in a large codebase. It’s an enormous problem in my day-to-day work and I reckon it’s what most technical debt in CSS eventually boils down to.

Let’s imagine we’re styling a checkbox, for example – that checkbox probably has a position on the page, some margins, and maybe other positioning styles, too. And that checkbox might be green but turns blue when you click it.

I think we can distinguish between these two types of styles as layout and appearance.

But writing good CSS requires keeping those two types of styles separated. That way, the checkbox styles can be reused time and time again without having to worry about how those positioning styles (like margin, padding or width) might come back to bite you.

At Gusto, we use Bootstrap’s grid system which is great because we can write HTML like this that explicitly separates these concerns like so:

<div class="row">
  <div class="col-6">
    <!-- Checkbox goes here -->
  </div>
  <div class="col-6">
    <!-- Another element can be placed here -->		
  </div>
</div>

Otherwise, you might end up writing styles like this, which will end up with a ton of issues if those checkbox styles are reused in the future:

.checkbox {
  width: 40%;
  margin-bottom: 60px;
  /* Other checkbox styles */
}

When I see code like this, my first thought is, "Why is the width 40% – and 40% of what?" All of a sudden, I can see that this checkbox class is now dependent on some other bit of code that I don’t understand.

So I’ve begun to think about all CSS as fitting into one of those two buckets: appearance and layout. That’s important because I believe those two types of styles should almost never be baked into one set of styles or one class. Layout on the page should be one set of styles, and appearance (like what the checkbox actually looks like) should be in another. And whether you do that with HTML or a separate CSS class is up for debate.

The reason why this is an issue is that folks will constantly be trying to overwrite layout styles and that’s when we eventually wind up with a codebase that resembles a spaghetti monster. I think this distinction is super important to writing great CSS that scales properly. What do you think? Add a comment below!

The post The Benefits of Structuring CSS Around Appearance and Layout appeared first on CSS-Tricks.

WooCommerce Product Table: Improve Your Store & Increase Sales

WooCommerce Product Table: Improve Your Store & Increase SalesI think you will agree when I say: selling online is no easy task. There are just too many factors to consider in the fast-paced environment that is the internet. Even for the seasoned entrepreneur, netting an extra sale is difficult. Turns out you can easily turn your WooCommerce store into a success with the […]

The post WooCommerce Product Table: Improve Your Store & Increase Sales appeared first on WPExplorer.

Quickstart: How to Use Redis on Java

If you want to use Java with Redis, you'll need to do a little tinkering in order to make both technologies work with each other. This quickstart guide will walk you through everything you need to use Redis on Java.

1. Run Redis

To get up and running quickly with Redis, you can consult this Redis Quick Start guide. The basic steps you'll need to follow are:

Tune Chrome Extension Limits Toxic Web Comments

Jigsaw, an Alphabet incubator working on difficult global security challenges, recently announced a Chrome extension that allows users to limit the toxicity seen in comments while browsing. The extension, Tune, is currently an experimental extension. During this experimental phase, Tune works on many popular platforms including YouTube, Facebook, Twitter, Reddit, and Disqus.

Father of the World Wide Web Launches Campaign to Save the Internet From Itself

In honor of his brainchild’s 30th birthday, Sir Tim Berners-Lee has a bone to pick with the likes of Google, Facebook, Verizon, AT&T, and the FCC. Like any good parent, he’s not so sure these so-called friends have his World Wide Web’s best interests at heart, so he’s laying down some ground rules.

Introduced at last year’s Web Summit in Lisbon, but relaunched on this ever so joyous occasion, Berners-Lee’s Contract for the Web seeks to reverse the social, corporate, and governmental trends jeopardizing his creation’s future. 

The Process of Implementing A UI Design From Scratch

This is a fantastic post by Ahmad Shadeed. It digs into the practical construction of a header on a website — the kind of work that many of us regularly do. It looks like it's going to be fairly easy to create the header at first, but it starts to get complicated as considerations for screen sizes, edge cases, interactions, and CSS layout possibilities enter the mix. This doesn't even get into cross-browser concerns, which have been somewhat less of a struggle lately, but is always there.

It's sometimes hard to explain the interesting and tricky situations that define our work in front-end development, and this article does a good job of showcasing that.

These two illustrations set the scene really well:

That's not to dunk on designers. I've done this to myself plenty of times. Plus, any designer worth their salt thinks about these things right off the bat. The reality is that the implementation weirdness largely falls to the front-end developer and the designer can help when big choices need to be made or the solutions need to be clarified.

Direct Link to ArticlePermalink

The post The Process of Implementing A UI Design From Scratch appeared first on CSS-Tricks.

Object Detection and Augmentation in Modern Web Development

I’ve been playing around a lot with the Shape Detection API in Chrome and I really like the potential it has. For example, a very simple QRCode detector I wrote a long time ago has a JS polyfill but uses new BarcodeDetector() API if it is available.

You can see some of the other demo’s I’ve built here: https://paul.kinlan.me/face-detection/https://paul.kinlan.me/barcode-detection/ and https://paul.kinlan.me/detecting-text-in-an-image/

Lambda Architecture: How to Build a Big Data Pipeline, Part 1

The Internet of Things is the current hype, but what kinds of challenges do we face with the consumption of big amounts of data? With a large number of smart devices generating a huge amount of data, it would be ideal to have a big data system holding the history of that data. However, processing large data sets is too slow to maintain real-time updates of devices. The two requirements for real-time tracking and keeping results accurately up to date can be satisfied by building a lambda architecture.

"Lambda architecture is a data-processing architecture designed to handle massive quantities of data by taking advantage of both batch and stream-processing methods. This approach to architecture attempts to balance latency, throughput, and fault-tolerance by using batch processing to provide comprehensive and accurate views of batch data, while simultaneously using real-time stream processing to provide views of online data."

#214: Babel 7

CodePen recently upgraded to Babel 7 for both our development team and our members. Cassidy and Marie talk about what that means for you in your CodePen editor.

Time Jumps

  • 00:38 Upgrading to Babel 7
  • 01:46 What is Babel?
  • 03:25 How it was added to the CodePen editor
  • 05:00 Brining back infinite loop detection
  • 06:32 What can we do now with Babel 7?
  • 09:33 Moving to a less verbose future
  • 14:01 Is it your bug or ours?
  • 15:56 Sponsor: Netlify
  • 16:47 How did we bring Babel to CodePen?

Sponsor: Netlify 15:56

[Netlify](https://www.netlify.com/?utm_source=codepen&utm_medium=podcast&utm_campaign=css-0418, the powerful and awesome web host we all know and love, now is offering AWS Lambda functions built right in. You make a folder for all your functions, and they become relative paths you can hit to execute those functions. One reason you might wanna do that? Keeping your third-party API keys safe! Just another ingredient that make your fast static sites... not so static.

Show Links

CodePen Links

The post #214: Babel 7 appeared first on CodePen Blog.

Effective Advice on Spring Async: Part 1

As per the current trend, I see developers from Juniors to Seniors all using Spring Boot as their weapon of choice to build software. The fact that it is developer friendly and its "convention over configuration" style helps the developer to only focus on business logic. If they are unsure as to how Springs works, just reviewing a Spring Boot tutorial can allow one to start using Spring Boot — it's that easy.

Another part of Spring Boot that I like is that developers do not have to know Spring's inner details — just put some annotations in, write the business code, and voila! With that said, sometimes, you have to know how it works. What I am trying to say is that you need to know your tool better so you can utilize it like a pro.