John Cox

Blogs · @wyome · Now · Shelf

Tagged tutorial · everything

Interesting

donuts - by Mattia Larentis

I can't summarize this piece because it appears to be HTML and JavaScript code for creating interactive donut charts, not an article with argumentative or reportorial content. If you meant to save a different article about donuts, please share that instead.

Permalink

My Bootstrap Site

This is a documentation page for a Bootstrap-based marketing site template, updated to Bootstrap version 2.02, that provides setup instructions and guides for implementing navigation bars in three configurations (fixed-top, static full-width, and static inside container). It appears to be an overview page directing users to more detailed resources for organizing markup, CSS, and JavaScript, with additional content on tabs and pills coming soon.

Permalink

How Do You Structure JavaScript? The Module Pattern Edition | CSS-Tricks

The Module Pattern structures JavaScript code into self-contained objects with clearly defined settings, initialization methods, UI event binding, and helper functions—creating a consistent, readable approach where every module follows the same template and is initialized through a single entry point. This pattern makes code maintainable across multiple developers and time, encourages reusability, and creates testable functions by breaking functionality into small, specific tasks rather than scattered global code.

Permalink

HTML's New Template Tag: standardizing client-side templating - HTML5 Rocks

This is a curated collection of free web development courses created by industry experts in collaboration with the Chrome team, covering foundational topics like HTML and CSS alongside specialized areas including performance optimization, privacy, progressive web apps, responsive design, and AI for web developers. The courses are designed to be followed sequentially or sampled individually depending on your learning goals and experience level.

Permalink

Why I loved building Basecamp for iPhone in RubyMotion by Nick of 37signals

The author describes his experience developing the Basecamp iOS app using RubyMotion, a tool that lets Ruby developers write native iPhone applications without learning Objective-C from scratch. He shares practical lessons including avoiding Xcode's Interface Builder by coding layouts directly, adopting Objective-C naming conventions for consistency with iOS APIs, leveraging the BubbleWrap gem for common tasks, and prioritizing device testing over simulator work to catch real-world performance issues. His conclusion is that RubyMotion successfully lowered the barrier to mobile development by preserving his existing Ruby workflow while making it possible to ship a production app.

Permalink

iTunes match issues: Apple Support Communities

iTunes Match hangs on Steps 2 or 3 when your music library contains mixed media formats (MP3s, older AAC files, or protected files) instead of uniform unprotected AAC 256 kbps files—a software bug that leaves files stuck in an endless loop rather than marking them ineligible. Convert all non-compliant files to iTunes 10.5.1 AAC 256 kbps encoding using smart playlists or individual selection, then delete the originals from iTunes, your computer, and iCloud before re-running the match. If Step 3 still hangs after converting all files, the problem is likely a firewall or modem blocking the upload port, which you can identify in Activity Monitor's Open Files and Ports window and resolve through your modem's settings.

Permalink

Getting Started with WebRTC - HTML5 Rocks

WebRTC is a set of open-source browser APIs enabling real-time audio, video, and data communication between peers without plugins, built on standardized protocols like DTLS and SRTP for encryption and security. The technology uses three main APIs—MediaStream (for accessing camera/microphone), RTCPeerConnection (for peer-to-peer streaming), and RTCDataChannel (for generic data exchange)—along with signaling protocols and NAT traversal mechanisms like STUN and TURN to establish connections across firewalls. WebRTC democratizes real-time communication by eliminating the need for downloads, plugins, or proprietary software while keeping encryption mandatory and requiring explicit user permission for camera and microphone access.

Permalink

Introducing the New HTML5 <main> Element - SitePoint

The `<main>` element is a new HTML5 structural tag that wraps a page's primary content and should appear only once per document, replacing older patterns like `<div id="main">`. It improves accessibility by helping screen readers and assistive technologies identify the core content, and it must not be nested within article, aside, footer, header, or nav elements. While modern browsers support it natively, older browsers require CSS (`display: block`) or the html5shiv polyfill to render it correctly.

Permalink

Confirm with Jquery UI Dialog

This is a tutorial for implementing a reusable confirmation dialog using jQuery UI that intercepts clicks on links and form submissions. The script captures elements with a "confirm" class, displays a modal dialog with customizable messages (pulled from the `rel` attribute or a default), and only proceeds with the action if the user clicks "Confirm" rather than "Cancel". You need jQuery, jQuery UI components, and an empty div with `id="dialog"` in your HTML for the dialog to appear.

Permalink

5 Tips for More Efficient jQuery Selectors - SitePoint

This guide explains how to write faster jQuery selectors by leveraging browser capabilities and understanding how jQuery's selector engine works. Key strategies include preferring ID selectors over class selectors, qualifying class selectors with tag names, keeping selectors simple rather than deeply nested, structuring selectors to start with the most specific elements, and avoiding redundant selector calls through chaining or caching. The article emphasizes that older browsers lack native support for complex CSS selectors and must use jQuery's Sizzle engine to manually parse and search the DOM, making optimization particularly important for cross-browser compatibility.

Permalink

iOS Development Tips I Would Want If I Was Starting Out Today

This article offers practical advice for beginner iOS developers, emphasizing modern tools and practices like ARC for memory management, blocks for cleaner code, and Grand Central Dispatch instead of manual threading. The author advocates for code-based layouts over Interface Builder for anything beyond basic apps, recommends embracing open-source libraries managed through CocoaPods, and stresses the importance of crash tracking, code analysis, and localization from the project's start. Throughout, the piece balances technical guidance with opinions on what tools work best in real-world development scenarios.

Permalink

What No One Told You About Z-Index — Philip Walton

Most developers misunderstand z-index because they don't realize that z-index values only matter within a **stacking context**, which is a group of elements that move together in the stacking order. Stacking contexts are created when an element is the root element, has position and z-index set, or has an opacity less than 1—and this third method is rarely known outside specification documents. The article demonstrates this through a puzzle where adding opacity to a parent element causes its child's high z-index to become irrelevant, since the child is now confined to a lower stacking context created by that opacity rule.

Permalink

Make Pretty Charts For Your App with jQuery and xCharts | Tutorialzine

This tutorial demonstrates how to build an interactive AJAX-powered chart for displaying MySQL data using the xCharts library, a date range picker, and jQuery. The implementation involves setting up a simple HTML interface with a date selector, creating a PHP backend that queries a MySQL database and returns JSON-formatted sales data, and using JavaScript to render the data in a styled line chart with tooltips. The guide emphasizes using helper libraries like sugar.js for date manipulation and Idiorm for database queries to simplify the development process.

Permalink

Useful .htaccess Snippets

This article provides practical .htaccess code snippets for common web administration tasks, ranging from access control and security (password protection, blocking bots and referrers, hotlink prevention) to performance optimization (file compression, caching) and functionality adjustments (redirects to HTTPS, custom index pages, upload limits). Each snippet includes explanation of what it does and how to customize it for specific needs, making it a quick reference guide for implementing .htaccess rules without needing to understand the underlying Apache syntax deeply.

Permalink

Writing Fast, Memory-Efficient JavaScript | Smashing Coding

This article explains how JavaScript engines like V8 optimize code execution and provides practical strategies for writing memory-efficient applications. It covers garbage collection mechanics, closure pitfalls, performance traps with timers, V8-specific optimization tips for objects and arrays, and tools for profiling and detecting memory leaks in real applications. The author emphasizes measuring actual performance bottlenecks before optimizing, avoiding premature micro-optimizations, and understanding that DOM manipulation often poses greater performance risks than JavaScript execution itself.

Permalink