"Stand Still. Stay Silent" is a post apocalyptic webcomic with elements from nordic mythology mixed in, set 90 years in the future. Contains plenty of friendship, exploration adventure and some horror.
A blast from the past: Is JavaScript Here To Stay?
Shorts
Differential Syncing
16:57
For a personal project, I looked into the magical world of how to sync work from two or more peers on a single item, without anyone losing their work.
Thankfully, Neil Fraser has published a paper on Diff Strategies, Fuzzy Patching, and indeed Differential Synchronization. Even more thankfully, Google has open sourced a diff-match-patch library (ported to several popular programming languages) that does all the heavy lifting for you.
Most likely my personal project will never be finished to a point where it would be made public, but since I found this stuff interesting, I just thought I'd put this out there for others to enjoy.
Blogi on kuollut, kauan eläköön blogi!
16:14
Kun kahdeksan vuotta sitten muutin Helsinkiin, blogiskene oli suomessa voimissaan. Huippuaikaa kesti kai muutaman hienon ja miitintäyteisen vuoden, jonka jälkeen iski ähky ja inflaatio. Blogeja alkoi syntyä enemmän kuin koskaan, mutta laadukas sisältö muuttui entistä vaikeammin löydettäväksi.
Siitä se ajatus heräsi, kun lomallelähtökaljaa olin ryystämässä. Kun heinäsuovasta on niin kovin vaikeaa löytää neulaa, kenties kädestä pitävä opas olisi vastaus.
Inspiroituneena kasasin kesäloman aikana JustNytin. Palvelua on nyt beta-testattu parisen viikkoa ja toimii riittävän hyvin noustakseen varjoista.
Jos innostuit, lähde mukaan: levitä sanaa, ilmoittaudu kuraattoriksi.
Better tools for procrastination
14:20
I have a problem: the internet. Or rather the vast amount of interesting content being published versus the time and energy I have to consume it. I'll read an article here, bookmark an article there, but mostly I just open stuff in tabs in order to "read them later." And I know I'm not alone.
Currently, I have too many bookmarks to count both locally and in various cloud services, but more importantly around 80 tabs across 9 windows open. More importantly because those tabs and windows each use up a chunk of the finite RAM memory in my computer. As a result of this my computer almost constantly feels sluggish.
Now, I know the right course of action would be to address my behaviour. But who does the right thing?
In lieu of improving my judgment on what's truly worth my time and attention, I instead found a tool to help me with the immediate symptom: The Great Suspender.
The Great Suspender suspends a tab after a set timeout, unless it matches a white list, or on demand. Individual tabs or all tabs in a window can later be restored as needed.
What I really need is a plugin that will simply close unattended tabs after a period of time. Because, even though I really do revisit some of those postponed articles, many are just waiting to be bookmarked and forgotten about forever. Perhaps I'll add it to my ever growing list of hobby projects...
Managing scrollTop in your Backbone single-page app
19:04
One of the great caveats of single-page apps is that they rely on taking over many of the browser's default behaviours. One of the more significant ones is how the browser behaves on page-to-page navigation, be it forwards or backwards. By default, the browser will take you to the top of the page when you navigate forwards by following a link. In contrast, you expect to be returned to the position on the page where you followed a link, when you use your browser's back-button.
In case you happen to be using Backbone to power your single-page app, this behaviour can be restored with very little effort and code. Unfortunately, this will only work in browsers supporting the History API, so old-IE (IE 9 and earlier) users are out of luck.
To pull it off, a global navigation event listener is used to store the current scrollTop
just-in-time.
// A global a.onclick event handler for all your navigational needs
// see e.g. Backbone Boilerplate for a more complete example
$(document).on("click", "a", function (ev) {
ev.preventDefault();
// Replace current state before triggering the next route,
// storing the scrollTop in the state object
history.replaceState(
_.extend(history.state || {}, {
scrollTop: document.body.scrollTop || $(document).scrollTop()
}),
document.title,
window.location
);
Backbone.history.navigate(this.pathname, { trigger: true });
});
Listening to the route
event from your Backbone.Router
you then restore scrollTop
when it exists in history.state
, or default to page top. To catch navigation happening via the back- and forward-buttons in the browser, Backbone.history
should be set up to listen for popState
events by setting { pushState: true }
in the options to Backbone.history.start()
.
// Backbone.Routers trigger the route-event
// after the route-handler is finished
var router = new AppRouter(); // AppRouter extends from Backbone.Router
router.on("route", function () {
// Inspect history state for a scrollTop property,
// otherwise default to scrollTop=0
var scrollTop = history.state && history.state.scrollTop || 0;
$("html,body").scrollTop(scrollTop);
});
For those who need to see before they believe, take a look at the demo.
NB. The code examples are simplified to the extreme and shouldn't be treated as complete drop in code.
Shorts
How to keep your fancy hover effects without ruining scroll performance? Disable hover-effects during scrolling.
Cargo Cult CSS and Challenging CSS Best Practices. Two opposite approaches to a problem. Naturally, there's also a middle-ground: Classy values.
Revisiting an old classic
11:02
Last weekend, I clocked in quite a few hours playing an old classic: Frontier: Elite II. What inspired me to dust off a 20 year old game, was a series of Frontier tutorial videos I stumbled upon. While waiting for the upcoming Elite: Dangerous to be released, I'll probably spend copious amounts of time exploring the vastness of space.
If the idea of being a space trader or rogue assassin tickles your fancy, but you're the kind of person who prefers more advanced graphics, you should check out Pioneer. It's an open source remake of Frontier with a very nice looking facelift.
If you, like me, prefer the original, a good source of information can be found at the Frontierverse website.
DigiPod wants to revive your old gear
22:57
DigiPod promises to deliver what Silicon couldn't. The sub full-frame sensor is a bit of a let-down, but the prospect of having all that film gear for digital photography is interesting nonetheless.
Shorts
Never-before-seen photos from 100 years ago tell vivid story of gritty New York City
EU Votes to Ban Mobile Call, Text and Data Roaming Fees From 2014 - Yay!
Nicholas C. Zakas on The Case for
setImmediate
.Christian Heilmann has some advice Before You Try To "Fix" Or "Improve" Forms On The Web... You may also want read my rant Stop Breaking You Forms.
Meta
Subscribe to feeds
Pages
Latest Posts
- The day the .dev gTLD died
- London Calling
- Native CSS Variables Are Golden
- One-liner to find bloated node_modules folders
- Complement Git Stash With Commit And Soft Reset
- History API: Scroll Position Restoration
- The Hunt For The Perfect Commit Message
- Siviili- ja sotilastiedustelua koskevan lainsäädännön valmistelu käyntiin
- A shoe is a shoe is a shoe, but isn’t
- Yhden projektin epilogi
Latest comments
- nikc on Managing scrollTop in your Backbone single-page app: Richard, you're right, you can store...
- Richard Hunter on Managing scrollTop in your Backbone single-page app: Unfortunately, pop state wont help you...
- nikc on Managing scrollTop in your Backbone single-page app: Richard, Thank you. You're right, scroll position...
- Richard Hunter on Managing scrollTop in your Backbone single-page app: This is a clever solution- however...
- llaurén on Better tools for procrastination: Yer welcome!
- nikc on Better tools for procrastination: Well, after evaluating both, I find...
- nikc on Better tools for procrastination: Having taken a closer look at...
- nikc on Better tools for procrastination: One Tab looks nice, too. But...
- llaurén on Better tools for procrastination: Nice catch! I use One Tab to...
- nikc on How to turn your smartphone (nearly) useless in one simple step: Wow, I'd love for the EU...