Friday, October 7, 2016

AtoZ CSS Screencast: nth-child and nth-of-type

This screencast is a part of our AtoZ CSS Series. You can find other entries to the series here.

Transcript

:nth-child is a pseudo class used to select elements by a numeric expression.

The syntax is quite different to most other aspects of CSS and can be a bit tricky to get your head around, to begin with.

In this episode we’ll look at

  • the various ways of using :nth-child,
  • the slightly more flexible :nth-of-type selector
  • and their counterparts selectors :nth-last-child and :nth-last-of-type.

:nth-child

:nth-child selects child elements if their position in the document matches a pattern described by an algebraic expression.

The :nth-child selector looks a bit like this:

[code language="css"]
li:nth-child(expression) { }
[/code]

The “expression” can either be the keywords even or odd, a whole number or a formula in the pattern of an+b where a and b are whole numbers - positive or negative.

Continue reading %AtoZ CSS Screencast: nth-child and nth-of-type%


by Guy Routledge via SitePoint

Filtering the Payment Methods by Cart Weight in OpenCart

Hero Patterns

opl-small

One Pager for 'Hero Patterns' - a useful SVG pattern generator by designer Steve Schoger. The execution is solid with slick functionality for opacity and color tweaks.

by Rob Hope via One Page Love

Influence and Persuasion: New Insights From Robert Cialdini

ms-podcast218-robert-cialdini-600

Do you want to persuade more people to become customers? Wondering what the latest science on influence and persuasion has to say? To discover new ways to prepare people for a sale, I interview Dr. Robert Cialdini, author of Influence and Pre-Suasion. More About This Show The Social Media Marketing podcast is an on-demand talk [...]

This post Influence and Persuasion: New Insights From Robert Cialdini first appeared on .
- Your Guide to the Social Media Jungle


by Michael Stelzner via

Citroën Origins

History is at the core of any car brand. In order to make it visible, Citroën partnered with Mullen Lowe One supported by Werkstatt Paris to build the first Museum that gives you the keys of the cars ...
by via Awwwards - Sites of the day

Thursday, October 6, 2016

The Business Value of UX Design - infographic

The Business Value of UX Design - infographic

With over 3 billion internet users today, the digital world has become an extremely crowded space — making it imperative for businesses to provide a top-notch digital experience in order to remain competitive.

A critical step in creating a digital experience that not only attracts users, but also provides real, tangible value to both them and the company begins with developing a seamless user experience (UX).

Ignoring the user experience or getting it wrong will cost your organization a lot of money down the line. In fact, fixing a UX error after development is up to 100 times more expensive than it would have been before development. Applying UX up front is not only much more cost effective, it’s less of a headache.

Investing in effective UX also impacts the bottom line by improving conversion rates and increasing revenue. Plus, it can be a great way to set your organization apart.

by Irfan Ahmad via Digital Information World

JavaOne 2016 – Nucleus

JavaOne 2016 is over! For two weeks already, so maybe I'm a little late with this write-up. Well, it simply took some time to watch enough talks to get an impression of what was going on. But even two weeks are not enough - Oracle uploaded about a hundred videos from JavaOne 2016! So I had to pick a theme and I decided to stay close to the nucleus: the language and core libraries, standard and enterprise edition, themselves.

As tempting as they are, I abstained talks that strayed away from the motor of Java's drive. So no, I didn't even watch the talk about JUnit 5 - yet.

Java SE

Let's start with the Java SE keynote. Honestly, I found neither the introduction nor the Mazda report particularly thrilling. But that's just the first third of the 30 minute presentation.

It got more interesting when Mark Reinhold started to get technical. He talked about Java 9 in general (which I will do further below as well) and covered jShell and Project Jigsaw in particular. It got even more interesting when Brian Goetz joined him in an awkwardly choreographed entrance.

Imagine, we might be able to write this at some point in the future:

public class Point(int x, int y) { }

And the compiler generates fields, constructors, accessors, proper equals, hashCode, and toString. Wow!

And it gets better! (Or worse, depending on how much you're prefer clarity over succinctness.)

var url = new URL("http://ift.tt/2dOeak2");
var connection = url.openConnection();

As Brian makes very clear, this does not weaken Java's type system. It just means that the compiler infers more types than it already does today.

Last but not least Brian quickly summarizes the projects Valhalla and Panama.

Before diving into the more focused talks, I want to recommend Ask the JDK Architects, where Mark Reinhold, John Rose, and Brian Goetz answered random questions regarding Java and the JVM. It's a nice potpourri of why Java is the way it is and how that might change in the future.

Java 8

I found it interesting that there where a number of talks dedicated to Java 8 and that many of them where still presenting some of the basics. Others, and this made more sense to me, were more advanced and help developers, who mostly have been using it daily for a while now, to get the details right.

The first half of Stuart Marks' Collections Refueled (slides) talk presented some extensions to the collections framework that happened in Java 8 and might've been overlooked due to the hype around streams. For example, I didn't know about Collection::removeIf, List::replaceAll, or how List::sort improved sort performance. He finished off with the Comparator factories before turning to Java 9.

Another talk making sure you get everything out of Java 8 was Venkat Subramaniam's A Few Hidden Treasures in Java 8, in which he covered varied topics like string joining, default methods, and parallel streams.

Talking about parallel streams, if you want to know more about how to create solutions that parallelize well, watch Stuart Marks' and Brian Goetz' Thinking in parallel. Here they gave succinct mental models for how to design good solutions and estimate parallel stream performance.

But let's not get distracted from Venkat's live coding marathon. In Let’s Get Lazy: Explore the Real Power of Streams he dived into laziness and why lazy evaluations are beneficial. He did it again in Refactoring to Functional Style with Java 8 - a journey from Java 8's functional programming features to functional programming with Java 8. Why are higher-order functions, immutability, lambdas, streams, and laziness relevant and how do they come together?

I really enjoyed Journey’s End: Collection and Reduction in the Stream API, which took a deep dive into reduction and collectors. As I've written elsewhere, I'm not a fan of complex stream collection but that doesn't mean it's not good to know how to do it if you need to. Besides, Maurice Naftalin gave a lot of interesting background info as well.

[caption id="attachment_140949" align="alignnone" width="1024"]Published by Hubble Heritage under CC-BY-SA 2.0 Published by Hubble Heritage under CC-BY-SA 2.0[/caption]

Java 9

Java 9 was of course a big topic and there were a lot of talks about it. Before heading into some of the details of the new version, though, I want to recommend two particular talks for those that have not yet spent a lot of time with Java 9.

The first, JDK 9 Language, Tooling, and Library Features by Joseph Darcy, gave a high-level overview over Java 9. Give or take, it was pretty much the spoken version of my ultimate guide to Java 9 (but it also covered some of the still unpublished second part).

Then there was Prepare for JDK 9 (slides), in which Alan Bateman explored what our projects should do to prepare for the new version. Some of the things he mentioned were which internal APIs Jigsaw is going make inaccessible and how to deal with that, the new run time's file system layout, and the upcoming version string format. Finally he explained how the pretty cool multi-release JARs can help projects stay compatible to several versions.

Project Jigsaw

As all posts about Java 9 we have to talk about Project Jigsaw and the upcoming Java Platform Modularity System (JPMS). The Jigsaw team presented a series of talks where each built on the previous ones.

Continue reading %JavaOne 2016 – Nucleus%


by Nicolai Parlog via SitePoint