This document has a more accessible location, here:
http://nickporcino.com/posts/last_mile_interchange.html
I'll maintain a copy here too, this is a nice place to support discussion.
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
$('a').each(function() { | |
if(this.host !== window.location.host) { | |
$(this).attr('target', '_blank'); | |
} | |
}); |
When I heard about Brad Frost's Patternlab for the first time at beyond tellerrand I was intrigued. The idea of splitting your design work for a website into simple modules or patterns isn't new and starts to become more and more of a standard. But organizing this into a very visual styleguide/patternlab seemed to make so much sense. Brad also introduced a very interesting approach with his separation of modules into categories, such as atoms, molecules and organisms.
I started porting Brad's patternlab app to Kirby, but it never really made it to something polished and it turned out for me after using it for Kirby's panel UI, that it's actually a pain in the ass to maintain such a pattern collection.
The problem with such a styleguide or patternlab is that it exists next to the real thing. When you change something in your code base you also have to update the particular code for the pattern in patternlab. To be honest I went very quickly from being
This is a little exercise to try remember the things I struggled with, when I got started with web development. It's too easy to forget about those things after years in business. I think it's super important to keep the ability to put yourself back into the position of a beginner from time to time in order to not overcomplicate your own work and to not throw the typical "just" and "simply" sentences at other people, who get started.
The following list is not complete or very detailed. It's really all about writing down some memories quickly. Feel free to follow this experiment for yourself if you think it's useful.
- Breaks. Why the hell doesn't text wrap in the browser when I add a line break to the source code?
- Paths: I absolutely struggled with the basic concept of absolute and relative paths and why stuff doesn't get loaded correctly when I messed paths up in URLs.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
// | |
// GLGLitchEffect.h | |
// Glitch | |
// | |
// Created by Igor on 27.08.14. | |
// Copyright (c) 2014 Igor Muzyka. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
/*global define*/ | |
/* | |
AMD module for loading files asynchronously. It also stores the contents of the files | |
in the browsers local storage for quicker access. I mostly use it for loading GLSL | |
shader files. Note: This has not been tested extensively, so use with caution. | |
MIT License | |
*/ | |
define( | |
function() | |
{ |
// Based on https://gist.github.com/snorpey/7230329 | |
function getTransitionDuration(el){ | |
var res = 0 | |
prefix('transition-duration', function(v, pfx){ | |
duration = el.style[v] | |
if(!duration) return | |
duration = parseTime(duration) + parseTime(el.style[pfx('transition-delay')] || 0) | |
function parseTime(s){ return parseFloat(s) * (s.indexOf('ms') >- 1 ? 1 : 1000) } | |
}) |