Monday, March 7, 2016

The Entrepreneur’s Quickstart Guide to Mindfulness Meditation

Mindfulness meditation

Today, meditation is often suggested as a way to combat the mental ill effects of the digital age and our continuous partial attention lifestyle. But meditation is capable of so much more than staving off unwanted side effects from our new way of life. Many well-known and successful entrepreneurs have used meditation to their advantage. It helps to clear away the unimportant chatter of the mind and focus it on the important problems.

Mindfulness is a simple form of meditation that consists of closing your eyes and breathing in and out in a quiet environment, slowly but deeply, until you feel relaxed enough to contemplate your feelings, thoughts and issues of the day.

[author_more]

Your mind can experience many emotions in a single day, sometimes even subconsciously. Without examination these emotions can become apparent in the form of boredom, depression, stress (mental or otherwise), lack of motivation — even outbursts. A clear mind is a focused mind. In order to better understand what mindfulness meditation is, let’s talk about what it isn’t.

There are many resources that will help you learn the technique of mindfulness meditation in greater depth, and you're encouraged to seek them out and do so. But for the busy entrepreneur who hasn't yet had any experience with the benefits of the practice, here's what you need to know to be able to try it out right now and start getting acquainted with this essential tool.

What Mindfulness Isn’t

  • Mindfulness isn’t complicated
  • Mindfulness isn’t a religion
  • Mindfulness doesn’t require “posing”
  • Mindfulness doesn’t require special clothing
  • Mindfulness doesn’t require a lot of time
  • Mindfulness doesn’t trick you into feeling a certain way

As an example, you can meditate for only 10 minutes a day during your morning commute, wearing your ordinary work clothes.

Why Meditate?

Mindfulness can help you to examine your mental strains and anxieties. Anxiety is a terrible affliction that eats away at you and becomes worse the longer you leave it. Meditation offers you the chance to see firsthand what’s causing it; after that you can begin to construct a solution and ultimately lower your stress levels. Eventually, if you allow your anxieties to grow, your mental stress will turn into physical stress and fatigue.

Contemplating issues that are bothering you

A troubled or clouded mind tends to make you feel disconnected from the world — more specifically, from those close to you. By meditating on your thoughts and feelings for only a short while every day, you can be free to engage in meaningful conversations, rather than staring into a blank space while your loved ones gradually begin to give up trying to make conversation with you.

In fact, the core aim of mindfulness meditation is to help you focus on the tasks at hand. Not only can it can improve your relationships with others, it can make you more compassionate, more empathetic, more motivated, and significantly happier.

Identifying Bad Habits Through Self-Awareness

It’s natural to develop bad habits over time. Whether its late-night binging or checking Facebook during work hours, we rarely acknowledge our bad habits on a superconscious level; we know we shouldn’t be doing it, but we’re not actively sitting down and saying to ourselves, “I shouldn’t be doing this because…”.

Continue reading %The Entrepreneur’s Quickstart Guide to Mindfulness Meditation%


by Daniel Schwarz via SitePoint

Building a 3D Engine with JavaScript

Displaying images and other flat shapes in web pages is pretty easy. However, when it comes to displaying 3D shapes things become less easy, as 3D geometry is more complex than 2D geometry. To do that, you can use dedicated technologies and libraries, like WebGL and Three.js for example.

However, these technologies are not necessary if you just want to display some basic shapes, like a cube. Moreover, they won't help you to understand how they work, and how we can display 3D shapes on a flat screen.

The aim of this tutorial is to explain how we can build a simple 3D engine for the web, without WebGL. We will first see how we can store 3D shapes. Then, we will see how to display these shapes, in two different views.

Storing and Transforming 3D Shapes

All Shapes Are Polyhedrons

The virtual world differs from the real one in one major way: nothing is continuous, and everything is discrete. For example, you can't display a perfect circle on a screen. You can approach it by drawing a regular polygon with a lot of edges: the more edges you have, the more "perfect" is your circle.

In 3D, it's the same thing and every shape must be approached with the 3D equivalent of a polygon: a polyhedron (a 3D shape in which we only find flat faces ant not curved sides as in a sphere). It's not surprising when we talk about a shape that is already a polyhedron, like a cube, but it's something to keep in mind when we want to display other shapes, like a sphere.

Sphere

Storing a Polyhedron

To guess how to store a polyhedron, we have to remember how such a thing can be identified in maths. You surely already did some basic geometry during your school years. To identify a square, for example, you call it ABCD, with A, B, C and D referring to vertices that make up each corner of the square.

For our 3D engine, it will be the same. We will begin by storing each vertex of our shape. Then, this shape will list its faces, and each face will list its vertices.

To represent a vertex, we need the right structure. Here we create a class to store the coordinates of the vertex.

var Vertex = function(x, y, z) {
    this.x = parseFloat(x);
    this.y = parseFloat(y);
    this.z = parseFloat(z);
};

Now a vertex can be created like any other object:

var A = new Vertex(10, 20, 0.5);

Next, we create a class representing our polyhedron. Let's take a cube as an example. The definition of the class is below, with the explanation right after.

var Cube = function(center, size) {
    // Generate the vertices
    var d = size / 2;

    this.vertices = [
        new Vertex(center.x - d, center.y - d, center.z + d),
        new Vertex(center.x - d, center.y - d, center.z - d),
        new Vertex(center.x + d, center.y - d, center.z - d),
        new Vertex(center.x + d, center.y - d, center.z + d),
        new Vertex(center.x + d, center.y + d, center.z + d),
        new Vertex(center.x + d, center.y + d, center.z - d),
        new Vertex(center.x - d, center.y + d, center.z - d),
        new Vertex(center.x - d, center.y + d, center.z + d)
    ];

    // Generate the faces
    this.faces = [
        [this.vertices[0], this.vertices[1], this.vertices[2], this.vertices[3]],
        [this.vertices[3], this.vertices[2], this.vertices[5], this.vertices[4]],
        [this.vertices[4], this.vertices[5], this.vertices[6], this.vertices[7]],
        [this.vertices[7], this.vertices[6], this.vertices[1], this.vertices[0]],
        [this.vertices[7], this.vertices[0], this.vertices[3], this.vertices[4]],
        [this.vertices[1], this.vertices[6], this.vertices[5], this.vertices[2]]
    ];
};

Using this class, we can create a virtual cube by indicating its center and the length of its edges.

var cube = new Cube(new Vertex(0, 0, 0), 200);

The constructor of the Cube class begins by generating the vertices of the cube, calculated from the position of the indicated center. A schema will be clearer, so see below the positions of the eight vertices we generate:

Cube

Then, we list the faces. Each face is a square, so we need to indicate four vertices for each face. Here I chose to represent a face with an array but, if you needed, you could create a dedicated class for that.

When we create a face, we use four vertices. We don't need to indicate their position again, as they are stored in the this.vertices[i] object. It's practical, but there is another reason why we did that.

By default, JavaScript tries to use the least amount of memory possible. To achieve that, it doesn't copy the objects that are passed as functions arguments or even stored into arrays. For our case, it's perfect behavior.

In fact, each vertex contains three numbers (their coordinates), plus several methods if we need to add them. If, for each face, we store a copy of the vertex, we will use a lot of memory, which is useless. Here, all we have are references: the coordinates (and other methods) are stored once, and only once. As each vertex is used by three different faces, by storing references and not copies, we divide the required memory by three (more or less)!

Do We Need Triangles?

If you have already played with 3D (with software like Blender for example, or with libraries like WebGL), maybe you have heard that we should use triangles. Here, I've chosen to not use triangles.

The reason behind this choice is that this article is an introduction to the topic and we will be displaying basic shapes like cubes. Using triangles to display squares would be more of a complication than anything else in our case.

However, if you plan to build a more complete renderer, then you need to know that, in general, triangles are preferred. There are two main reasons for this:

  1. Textures: to display images on faces we need triangles, for some mathematic reasons;
  2. Weird faces: three vertices are always in the same plane. However, you can add a fourth vertex that isn't in the same plane, and you can create a face joining these four vertices. In such a case, to draw it, we don't have choice: we must split it into two triangles (just try with a sheet of paper!). By using triangles, you keep the control and you choose where the split occurs (thanks Tim for the reminder!).

Continue reading %Building a 3D Engine with JavaScript%


by Jérémy Heleine via SitePoint

Web Design Weekly #225

Headlines

Atomic Classification

Trent Walton shares some wise words about Atomic Design in relation to the modular design. If you have looked into Atomic Design previously and it didn’t align with your needs then I would highly recommend this post by Trent. (trentwalton.com)

CSS, Sass, SCSS, Compass, Less, BEM, SMACSS, OOCSS…. (leemunroe.com)

HUMONGOUS Font Bundle

Refresh your designs with this massive font bundle of 30 best selling fonts, from the best font creators in the world. Check it out now. (mightydeals.com)

Articles

REM vs EM – The Great Debate

The question is, which should you use? There’s been a longstanding debate between rem supporters and em supporters, believing that you should use one over the other. If you are still undecided this post by Zell Liew explores both sides to help you make a more informed decision next time you have the choice. (zellwk.com)

Preload: What Is It Good For?

Yoav Weiss explains the new preload keyword that is aimed at improving performance and gives us developers more granular loading control. It gives us the ability to define custom loading logic without suffering the performance penalty that script-based resource loaders incur. (smashingmagazine.com)

Mixins Better for Performance

Harry Roberts is not a fan of Sass’s @extend so he took the time to dive into the performance implications to settle his case once and for all. (csswizardry.com)

Style Guides: 50 shades of Corporate Blue

Mike Riethmuller shares some great advice about implementing style guides within an organisation. (madebymike.com.au)

AMP Project: Will it Make Your Sites Faster?

Google and the AMP Project are making a big push to get AMP adopted across the web, and they’re already doing well. In this post by Kezz Bracey she looks into what AMP means for us and what potential benefits / drawbacks we can expect. (tutsplus.com)

Do You Know These Eight HTML5 Tags?

Simon Codrington takes a look at some lesser known / edge case HTML5 tags that you could be taking advantage of. (sitepoint.com)

Popularity of Preprocessors on CodePen (blog.codepen.io)

Tools / Resources

5 Dos and Don’ts for Your Design Portfolio

Over the years Heather Phillips has reviewed countless design portfolios and has finally found some time to offer some tips to make sure your portfolio is as effective as possible. (medium.com)

WebpackBin

Currently in ALPHA, WebpackBin allows you to load up NPM packages and webpack loaders superfast. All bins have their own URL which enables you to share your code with anyone extremely easy. (webpackbin.com)

Inspiration

Redesigning Cloud Four in the Open (blog.cloudfour.com)

An Interview with Una Kravets (css-tricks.com)

Discover Typography (discover.typography.com)

Jobs

Sr. Product Designer at Booking.com

Join the world’s favourite accommodation platform and help define the future of travel. Reporting to the Design Director, this position affords the successful candidate broad scope for working on a variety of products within the current and future Booking.com family, based in our headquarters in the centre of Amsterdam. (booking.com)

Application Engineer at Vimeo

Vimeo’s mission is to empower creators to make, share and sell amazing videos directly to viewers worldwide, in the highest quality possible and with no interruptive advertising. If you’re dying to help us take Vimeo to the next level, we’re dying to hear from you. (vimeo.com)

Need to find passionate developers? Why not advertise in the next newsletter

Last but not least…

How to Level up as a Developer

Being a productive developer is something you can learn through experience, books or trial and error. But one of the best ways to become a productive developer is to learn directly from a developer who is already productive. (medium.com)

The post Web Design Weekly #225 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

What the Meta 2 Means for Augmented Reality Developers

Augmented reality is going to be one of the next big waves in computing. When it hits its true potential, it is going to change how we all use and think about technology. The Meta 2 Development Kit announced last week is one of the closest glimpses at this potential that we have seen so far. While there are a few articles out there talking about the new headset announcement in general, I wanted to really focus in on what this means for developers.

For about a year and a half now, I have been lucky enough to have a Meta 1 Developer Kit and have spent a bunch of time experimenting and putting together my own concept prototype app. The SDK makes the process in Unity a lot easier than many expect it would be. The Meta 2 looks like it will be leaps and bounds ahead of the device I've spent countless hours tinkering with!

What is Meta?

Meta are a Silicon Valley based company who've been working on augmented reality since a successful Kickstarter campaign in May 2013. Not long after that campaign, they were also accepted into the well known Y Combinator program. In September 2014, they began shipping the Meta 1 Developer Kit to developers around the world. This kit looked like so:

The Meta 1 Developer Kit

The Meta 1 provides an augmented reality headset experience where 3D objects are projected in front of you within a limited field of view. These objects appear as if they are in the room with you and can be touched, grabbed and pinched providing some great real world interaction! The augmented reality objects were even able to lock onto areas in the real world via square markers like this one which I use for my own AR app:

A positional tracking marker for Meta

Last week, they released the details of their entirely new headset concept — the Meta 2. The Meta 2 appears to have all the capabilities mentioned above and more. It looks like this:

The Meta 2 Developer Kit

Improved Field of View

One of the challenges of AR headsets so far is getting as much of the headset view to be augmented as possible. The Meta 1, ODG R-7 Smart Glasses and Microsoft HoloLens each have a slightly limited field of view, best imagined as a transparent screen in front of your vision that reveals augmented objects when you look in their direction. The best image I have found which shows this field of view concept is this one from a Microsoft HoloLens demo video:

[caption id="attachment_126193" align="aligncenter" width="600"]HoloLens' field of view Source: Polygon for the GIF and Microsoft for the demo video itself[/caption]

The Meta 1 came with two different lens hoods — one with a 23 degree field of view and another with a 32 degree field of view. The HoloLens has approximately a 30 degree field of view and ODG's latest unreleased prototype has a 50 degree field of view. While each of those measurements might not be comparable (some are horizontal and others diagonal?), you can get a sense of the typical FOV range from those numbers.

The Meta 2 is leaps and bounds above these, with a 90 degree field of view. This means that quite a large part of the display is now augmented. Meta's Meta 2 Product Launch Video visualizes the field of view like so:

Meta 2 field of view

This will give developers a great way to showcase their augmented reality apps in a more immersive way and also expands what is possible within an AR application. A greater field of view opens up more possibilities in the interface that might otherwise have been confusing with the smaller view size.

High Resolution Display

The Meta 1 provided a 960 x 540 resolution for each eye (each eye has a separate projected screen). I have seen some specs that say the Microsoft HoloLens and ODG's R-7 Smart Glasses have a larger 1280 × 720 resolution for each eye.

The Meta 2's display has a 2560 x 1440 DPI overall display, which is high resolution enough to be able to read text comfortably and see finer details. With the field of view, it ends up being 20 pixels per degree. I'm not quite sure how this measures up to the HoloLens and R-7 Smart Glasses, taking into account the different types of display technology.

Continue reading %What the Meta 2 Means for Augmented Reality Developers%


by Patrick Catanzariti via SitePoint

Quick Tip: Fixing the font-weight Problem on Hover States

Have you ever tried to change the value of the font-weight property on link states? If yes, you may have noticed that the text shifts.

In this quick tip, we’ll first learn what causes this undesired behavior and then we’ll examine two possible solutions.

[author_more]

Identifying the Problem

As a first step, let’s identify the problem by looking at a simple example. Consider the following visualization:

Menu example

The items are links, so in your CSS you might try something like this:

[code language="css"]
a:hover {
font-weight: bold;
}
[/code]

Because we usually don’t define a fixed width for items like this, when the user hovers over the links, the text shifts. Of course, this happens because the width of each link gets bigger on hover. To test it, we assign the active class to the first link and add this CSS rule:

[code language="css"]
.active {
font-weight: bold;
}
[/code]

Lastly, we change the text of the second link to be equal to the first one, like so:

Font-weight on hover

Continue reading %Quick Tip: Fixing the font-weight Problem on Hover States%


by George Martsoukos via SitePoint

Hashtags Unplugged

Hashtags Unplugged

One Pager for an upcoming NY art exhibition called 'Hashtags Unplugged'. The clean Single Page website features shapes that animate and "fill" as you scroll down. Make sure you check out the unique artists browser within each topic - quite smart. Also help them by backing on Kickstarter.

by Rob Hope via One Page Love

WP REST API: Retrieving Data