Grid, content re-ordering and accessibility

Take this:

<ol>
  <li>Get hungry</li>
  <li>Order pizza</li>
  <li>Eat pizza</li>
</ol>

That HTML ends up in the DOM that way (and thus how it is is exposed to assistive technology), and by default, those list items are also visually shown in that order. In most layout situations, the visual order will match that DOM order. Do nothing, and the list items will flow in the block direction of the document. Apply flexbox, and it will flow in the inline direction of the document.

But flexbox and grid also allow you to muck it up. Now take this:

ol { 
  display: flex;
  flex-direction: row-reverse;
}

In this case, the DOM order still makes sense, but the visual order is all wrong. It's not just row-reverse. There are a number of flexbox and grid properties that can get involved and confuse things: the order property, flowing items into columns instead of rows, and positioning items specifically in unusual orders, among others. Even absolute positioning could cause the same trouble.

Manuel Matuzovic says:

If the visual order and the DOM order don’t match, it can irritate and confuse users up to a point where the experience is so bad that the site is unusable.

Rachel Andrew highlights this issue (including things we've published) as a big issue, and hopes we can get tools at the CSS level to help.

I think this is something we sorely need to address at a CSS level. We need to provide a way to allow the tab and reading order to follow the visual order. Source order is a good default, if you are taking advantage of normal flow, a lot of the time following the source is exactly what you want. However not always, not at every breakpoint. If we don’t give people a solution for this, we will end up with a mess. We’ve given people these great tools, and now I feel as if I’m having to tell people not to use them.

Direct Link to ArticlePermalink

The post Grid, content re-ordering and accessibility appeared first on CSS-Tricks.

Cassitory: Redundancy Tables Within Cassandra

After working with Cassandra for a while and not having Apache Spark as a viable option, running different queries may become quite a challenge.

In the eventual case where you want to execute a query that would not be possible with the current table structure, Cassandra recommends having redundancy tables because storage is cheaper than memory.

Configuring a DataSource in an Enterprise Application Using Payara Server

Connecting to a data source is a very common task in enterprise applications, and the main interface for it is the DataSource interface from Java’s JDBC API. In this post, we’ll explore how to configure aDataSource implementation using the Payara application server environment. I will be using Eclipse as IDE (the Enterprise edition), AdoptOpenJDK (build for OpenJDK 8) for running the server, and MariaDB for the database. The Payara Server also works with Oracle’s JDK and Azul Zulu. The goal is to see how to acquire connections to a database in the context of a Java EE environment via the DataSource interface, which is the preferred means to do it according to the JDBC specification.

Requirements

First, we need to download and install the Payara Server. You can download it from this link. Payara has several product options for download, including a microservices-oriented version and Docker images. You can just download the normal Server Full installation which takes roughly 140 MB. The latest version of the server (v5.192) supports running on JDK 11, although it seems to be in preview mode.

A Summary of DeepMind’s Protein Folding Upset at CASP13

At last year’s Critical Assessment of protein Structure Prediction competition (CASP13), researchers from DeepMind made headlines by taking the top position in the free modeling category by a considerable margin, essentially doubling the rate of progress in CASP predictions of recent competitions. This is impressive, and a surprising result in the same vein as if a molecular biology lab with no previous involvement in deep learning were to solidly trounce experienced practitioners at modern machine learning benchmarks.

The Protein Structure Prediction Problem

The machines of biology are encoded as sequences of information. The so-called central dogma of molecular biology posits that DNA sequences determine RNA sequences, which in turn determine the protein sequences and, therefore, structures as they fold into the biological nanomachines that give rise to biological traits. It’s the last step we are concerned with in this post: predicting the 3-dimensional structure of proteins, which in turn form the building blocks for the mechanics of life.

Reusable Code: The Good, the Bad, and the Ugly

Reusable Code Libraries in Real Life

The mythical "reusable code" idea has existed for decades. It showed up shortly after the first lines of code were written. We preach reusability and sometimes strive for it, but it rarely becomes a reality. I've seen various levels of success with this over the years. Everything from "we have a reusable library that 75 percent of us use" to "we have shared code libraries here, but never use them in your projects."

A recent discussion led me to think about this: Why don't more software development organizations have shared code libraries? Is it the pointy-haired bosses preventing it? Team conflicts? Or is it the developers themselves?

An Introduction to Akka Clustering

This article was first published on the Knoldus blog.

Akka cluster provides a fault-tolerant, decentralized, peer-to-peer cluster membership service with no single point of failure or single point of bottleneck. It does this using gossip protocol and an automatic failure detector.

Gutenberg 5.9 Brings Major Improvements to Block Grouping, Introduces Snackbar Notices

Gutenberg 5.9 is now available for those who are running the plugin to get the latest features on their sites. This release brings significant improvements to the grouping capabilities, allowing users to group and ungroup blocks inside a container block. Once placed inside a group, the blocks can be moved up or down within the group using simple up/down controls.

Nested blocks have also been improved so that users can click through to each layer to configure each and navigate to the deepest nested block.

Gutenberg 5.9 introduces “Snackbar” notices to communicate completed actions in the block editor UI that do not require further action.

The term “Snackbar” doesn’t adequately describe the way these notices behave. The concept was inspired by Material design and is traditionally used for providing brief messages about app processes at the bottom of the screen. Gutenberg’s new Snackbars pop up and disappear after a short delay, so the notice doesn’t have to be dismissed.

“For a distraction-free experience, all the notices used in the editor to inform about the post saving/publishing, reusable blocks creation and updates have been updated to use this new type of notice,” Gutenberg Phase 2 lead Riad Benguella said. He posted a gif demonstrating Snackbar notices in action:

This release brings several visual enhancements to blocks and UI components, including a redesign of the Table block placeholder, refactoring and consolidation of dropdown menus, and improvements the output of the Spacer block.

Gutenberg 5.9 contains more than two dozen fixes for bugs found in both desktop and mobile experiences. The editor took a slight dip in performance from the previous version, going from 4.8 to 4.9 seconds in loading time and 62.8ms to 66.3ms for keypress events. More than 40 people contributed to this release and approximately 15% were new contributors.

#225: Learning New Things

Show Description

Cassidy and Marie talk about their journey to keep learning new things, while also not stressing about trying to keep up with all the things in web development.

Time Jumps

  • 00:41 Topic introduction
  • 03:23 CodePen challenges
  • 05:23 Fork it!
  • 08:55 Learning at conferences
  • 13:22 Sponsor: Netlify
  • 15:18 Learning by reading vs watching
  • 19:09 The buffet of learning available now
  • 24:35 Life long learning in tech

Sponsor: Netlify 13:22

Deploy modern static websites with Netlify. Get CDN, Continuous deployment, 1-click HTTPS, and all the services you need. Get started for free.

Show Links

CodePen Links

The post #225: Learning New Things appeared first on CodePen Blog.

AI, IoT, and Mobile Apps for Construction

Construction has traditionally been considered the ultimate blue-collar industry, dependent on brawn, big pieces of equipment, and clipboards rather than computers and mobile devices. But all that is about to change. Artificial intelligence (AI), IoT, and mobile are making inroads into how the construction industry operates and will revolutionize it within the next few years.

In “How Artificial Intelligence Could Revolutionize Construction,” the Association of Equipment Manufacturers lays out the ways in which AI will change the construction industry. Dan Kara, research director, robotics, ABI Research, said in the article that AI will help the industry in optimizing development as well as doing quality control testing on products and design structures.

Testing the CP Subsystem with Jepsen

At Hazelcast we take reliability very seriously. With the new CP Subsystem module, Hazelcast has become the first and only IMDG that offers a linearizable distributed implementation of the Java concurrency primitives backed by the Raft consensus algorithm. In addition to well-grounded designs and proven algorithms, reliability also requires a substantial amount of testing. We have been working hard to ensure the validity of our consistency claims.

In this blog post, I'll try to demystify the linearizability semantics of the CP Subsystem and explore our Jepsen test suite. This blog post is the fourth installment of my CP Subsystem blog post series.

Defining Test Boundaries — An Example

I think that everybody agrees that testing is required in order to build a quality product. But there’s also a lot of confusion about the boundaries of each test type. What’s the scope of a unit test? What’s the difference between an integration test, an integrated test and a contract test? If you ask three developers about test boundaries, you’ll most likely get three different answers. For example, I still talk to people who consider that a unit test should test a single class/method.

What’s clear is that most teams don’t have a consensus on what’s the scope of the different types of automated tests and the differences between them. Getting to a universal consensus might be hard, but getting to a consensus inside the team should be easy enough. In this blog post, we’ll see an example of how to do that.

Managing Infrastructure at Scale With Terraform

Eighty percent of software outages are due to improper changes — changes that occurred at the wrong time or were not properly executed.

To reduce these outages, you need to address the core problem: human error. The reality is that repetitive tasks, such as infrastructure configurations, should be designed by humans and executed by software. Having machines tackle the repetitive tasks reduces errors and leaves us to do what we do best — solve problems. This makes our systems more reliable and better designed.

Exporting Decision Trees in Textual Format With sklearn

In the past, we have covered Decision Trees showing how interpretable these models can be (see the tutorials here). In the previous tutorials, we exported the rules of the models using the function export_graphviz from sklearn and visualized the output of this function in a graphical way with an external tool which is not easy to install in some cases. Luckily, since version 0.21.2, scikit-learn offers the possibility to export Decision Trees in a textual format (I implemented this feature personally!) and in this post we will see an example how of to use this new feature.

Let's train a tree with two layers on the famous iris dataset using all the data and print the resulting rules using the brand new function export_text: