Category Archives: Technology

Logic gates tutorial with functional demo

Schabse Laks created working logic gates with a clever use of checkbox inputs, labels, and CSS sibling selectors

 

Schabse writes:

Logic gates are the basis of all of computing. They take two binary inputs (0/1 or true/false), and result in a binary output whose value depends on the inputs. These gates form the building blocks upon which all computers are built.

Here are the three basic logic gates: AND (true only when both inputs are true), OR (true when either input is true), and XOR (eXclusive or, true only when exactly one input is true, but not both). Click the inputs (square boxes) to see the outputs reflect the values.

Check it out at silon.slaks.net

How To Safely Hash A Password

If you’re not using bcrypt get with it or be vulnerable

 

Coda Hale writes:

Use bcrypt.

Why Not {MD5, SHA1, SHA256, SHA512, SHA-3, etc}?

These are all general purpose hash functions, designed to calculate a digest of huge amounts of data in as short a time as possible. This means that they are fantastic for ensuring the integrity of data and utterly rubbish for storing passwords.

A modern server can calculate the MD5 hash of about 330MB every second. If your users have passwords which are lowercase, alphanumeric, and 6 characters long, you can try every single possible password of that size in around 40 seconds.

For PHP 5.5, use password_hash(). For PHP 5.3.7 through PHP 5.4.x use the password_compat polyfill on GitHub.

Read the full article at codahale.com

Apple Watch Favors Text Version and Breaks Links

The next generation of responsive emails: make the text version easy to read on Apple Watches

 

From the article: “When Apple Watch detects remote or linked images in an email, the plain text version will be displayed–but only after a lengthy warning: “This message contains elements Apple Watch can’t display. You can read a text version below.” This message is reminiscent of the warning that Outlook displays before ALT text on images and takes up a full screen of Watch real estate before displaying the plain text part of the message.”

Read more from the source: litmus.com

HTTP2 for front-end web developers

HTTP2 is based on Google’s SPDY and will change the way you minify and bundle assets

 

​HTTP2 will mean a change in how we should build websites. The best practices of HTTP1 are harmful in a HTTP2 world.

Remember the (hacky) practices below? Well with HTTP2 they are obsolete and even detrimental to performance.

– Image sprites

– Concatenating JS and CSS

– Serving assets from a cookie-less domain.

– Creating different domains or sub-domains to host assets like images.

Read more from the source: mattwilcox.net