background preloader

UNREAD

Facebook Twitter

Manipulating the browser history - Web APIs. The DOM window object provides access to the browser's history through the history object.

Manipulating the browser history - Web APIs

It exposes useful methods and properties that let you move back and forth through the user's history, as well as -- starting with HTML5 -- manipulate the contents of the history stack. Traveling through history Moving backward and forward through the user's history is done using the back(), forward(), and go() methods. Moving forward and backward To move backward through history, just do: window.history.back(); This will act exactly like the user clicked on the Back button in their browser toolbar.

Similarly, you can move forward (as if the user clicked the Forward button), like this: window.history.forward(); Moving to a specific point in history You can use the go() method to load a specific page from session history, identified by its relative position to the current page (with the current page being, of course, relative index 0). Using the HTML5 History API. The HTML5 History API gives developers the ability to modify a website's URL without a full page refresh.

Using the HTML5 History API

This is particularly useful for loading portions of a page with JavaScript, such that the content is significantly different and warrants a new URL. Here's an example. Let's say a person navigates from the homepage of a site to the Help page. We're loading the content of that Help page with Ajax. That user then heads off to the Products page which we again load and swap out content with Ajax. The Basics To check out the features of this API it's as simple as heading into the Developer Tools and typing history into the console.

We're interested in the pushState and replaceState methods in this tutorial. The five programming books that meant most to me by David of 37signals. There are so many programming books out there, but most focus on specific technologies and their half-life is incredibly short.

The five programming books that meant most to me by David of 37signals

Others focus on process or culture. Very few focus on the timeless principles of writing good code, period. The following five books had the biggest influence on my programming style and development: Smalltalk Best Practice Patterns: Incredibly practical advice for what constitutes good OO code. It’s done in Smalltalk, but the principles are mostly universal. If you consider programming to be a subset of writing, and I certainly do, then you would also do well to read Elements of Style and On Writing Well. Reading these five to seven books will give your programming chops more vitamins and nutritional value than a couple of year’s worth of blog posts and tutorial.

A naive simulator of gravity, written in Python. (Coded during a 2010 summer night... updated with Runge-Kutta solver during Xmas 2012 weekend...

A naive simulator of gravity, written in Python

Reddit-ed) I've always been fascinated by space - ever since I read "The Family of the Sun", when I was young. Overview. Overview The Tor network is a group of volunteer-operated servers that allows people to improve their privacy and security on the Internet.

Overview

Tor's users employ this network by connecting through a series of virtual tunnels rather than making a direct connection, thus allowing both organizations and individuals to share information over public networks without compromising their privacy. Along the same line, Tor is an effective censorship circumvention tool, allowing its users to reach otherwise blocked destinations or content.

Tor can also be used as a building block for software developers to create new communication tools with built-in privacy features. Individuals use Tor to keep websites from tracking them and their family members, or to connect to news sites, instant messaging services, or the like when these are blocked by their local Internet providers. Revision control. Revision control, also known as version control and source control (and an aspect of software configuration management), is the management of changes to documents, computer programs, large web sites, and other collections of information.

Revision control

Changes are usually identified by a number or letter code, termed the "revision number", "revision level", or simply "revision". For example, an initial set of files is "revision 1". Build a Silent, Standalone XBMC Media Center On the Cheap. The Antikythera Mechanism in Lego. Bugs. -|--- Back Story ---|- I'm surrounded by talented coders, but every so often I meet one who mishandles bugs.

Bugs

These coders are not the type to throw their hands in the air when there's a problem. They are smart and dedicated -- their reaction is to dive in, eager to put things right. They begin with some ideas about what the problem might be, they attempt a few fixes... An hour later, several patches have been applied but things are still broken. They eventually "fix" the bug, but without gaining any insight into the underlying problem. I know this problem well, because once upon a time, my technique was just this. Luckily, I encountered a handful of wise mentors who showed me a different path: a way of life where bugs are transcendental, open-ended learning experiences, where "solutions" are used in favor of "fixes", and where we constantly question each other, in order to better ourselves.