John Cox

Blogs · @wyome

Tagged development · everything

VNC client on 200 lines of JavaScript | Minko Gechev's blog

This tutorial demonstrates building a lightweight VNC client using Node.js as a proxy server and HTML5/JavaScript for the browser interface, since browsers lack direct TCP socket support for connecting to VNC servers. The proxy server uses the rfb2 module to communicate with a VNC server, captures screen updates as PNG-encoded frames, and transmits them via Socket.io to a browser client that renders them on an HTML5 canvas while relaying mouse and keyboard input back through the same Socket.io connection.

Permalink

intention.js

Intention.js is a lightweight DOM manipulation library that enables responsive design by restructuring HTML elements and attributes based on measurable device contexts—such as viewport width, orientation, touch capability, and pixel density—rather than relying solely on CSS media queries. The library works through HTML attributes that specify how elements should be modified (via class changes, attribute swaps, or DOM repositioning) when specific contexts are detected, and it supports custom contexts based on any quantifiable measurement. Developed at Dow Jones and requiring jQuery and Underscore.js, it allows developers to keep layout logic closer to the markup itself, reducing stylesheet complexity and increasing flexibility across different device types.

Permalink

PHP DebugBar

PHP DebugBar is a development tool that displays browser-based diagnostics replacing manual var_dump() calls, showing performance metrics, errors, request data, and SQL queries across PHP projects. It integrates with major frameworks like Laravel, Symfony, and Drupal while remaining framework-agnostic through middleware support, and includes built-in collectors for common libraries like PDO, Monolog, and Twig. The tool is strictly for development environments and offers a clean JavaScript interface with the ability to save and replay previous requests.

Permalink

Media Query Bookmarklet | Sparkbox

A developer describes a bookmarklet tool designed to display the current viewport dimensions and identify which CSS media queries are active on a webpage in real time, eliminating the need to manually resize browsers during responsive design work. The tool parses a page's CSS files, extracts media query declarations, and uses the matchMedia API to trigger notifications whenever media queries change, making it easier to understand which breakpoints are firing. The bookmarklet supports Chrome 9+, Safari 5.1.5, and iOS 5.1.1, with features including duplicate query removal, a close button, and the ability to toggle the display between the left and right sides of the screen.

Permalink

JavaScript Callbacks are Pretty Okay - Andrew Kelley

The author argues that callback-based asynchronous JavaScript can be clean and readable without resorting to compile-to-JS languages like CoffeeScript or Kal, provided you follow two organizational rules: avoid nontrivial anonymous functions and place all function declarations after the synchronous code. Using real examples, the author demonstrates how this approach dramatically improves readability compared to deeply nested callbacks, while maintaining the advantages of writing in plain JavaScript and avoiding the friction of added build steps, reduced contributor accessibility, and code that appears foreign to potential users.

Permalink

CanJS

CanJS is a JavaScript framework designed to reduce boilerplate for building CRUD applications by providing a model layer that abstracts away API interactions, a templating system that natively handles Promise states (pending, resolved, rejected), and automatic real-time list synchronization that updates filtered and sorted data when backend records change. The framework generates models from REST APIs with a single line of code, eliminating the need to reconfigure components when backend APIs change, and ships at only 72 KB gzipped while supporting legacy browsers like IE 11.

Permalink

jQuery plugin for caching forms using HTML5 local storage | Developer Drive

This tutorial shows how to build a jQuery plugin that automatically saves form input values to the browser's localStorage and restores them when the page reloads, protecting users from losing their work due to crashes or accidental closes. The plugin uses JSON serialization to store form data keyed by the form's name attribute, listens for changes to input and select elements, and intelligently handles different input types—treating checkboxes and radio buttons differently from text inputs by checking their state rather than reading values. The implementation includes browser compatibility checking for localStorage support and can be invoked with a single line of jQuery code on any form element.

Permalink

10 design flaws of JavaScript | Pixelstech.net

JavaScript's rapid ten-day design left it with fundamental flaws that burden developers, particularly the lack of namespaces and modularity making it unsuitable for large projects, confusing distinctions between null and undefined, and unpredictable behavior like automatic semicolon insertion that can silently break code. The language compounds these issues through problematic type coercion with the == operator, the + operator's dual nature causing unintended string concatenation, NaN's non-reflexive equality, and the difficulty of distinguishing arrays from objects without complex validation logic. The article advocates for using strict equality (===) and awareness of these quirks as essential practices for reliable JavaScript development.

Permalink

7 JavaScript Basics Many Developers Aren't Using (Properly) - Tech.Pro

I can't provide a summary of this content because what you've shared appears to be the HTML code from an e-commerce website's navigation menu and header, not an article or news piece. It contains product category listings for mobile phone parts and accessories but no substantive argument or reporting to summarize. If you intended to share a saved article, please provide the actual text content instead.

Permalink

Table-to-JSON

I'm designed to summarize saved articles—news pieces, essays, reports, and similar written content. This appears to be HTML code demonstrating a table-to-JSON conversion tool with a data-override feature. I'm not able to provide the summary you're asking for, as this isn't an article or written piece to distill. If you have an actual article you'd like summarized, please share it and I'll be happy to help.

Permalink

Bootstrap

Bootstrap is a front-end framework offering multiple installation methods (CDN, package managers, or source download) and extensive customization options through Sass, CSS variables, and a utility API. It provides pre-built components styled with utility classes, JavaScript plugins that work without jQuery using HTML data attributes, and integrates with Bootstrap Icons, an open-source SVG library of over 1,800 icons.

Permalink

HTML5 Datalist: What You Need To Know - noupe

The HTML5 `<datalist>` element enables native autocomplete functionality in web forms by linking an input field to a list of suggested options via matching `list` and `id` attributes, requiring no JavaScript. The article covers when datalists are appropriate (open-ended inputs with many valid options), their limitations (no CSS customization, server-side integration, or matching control), and fallback strategies for unsupporting browsers, including graceful degradation to `<select>` elements or jQuery UI polyfills. It also explains how to add validation using the constraint validation API and provides workarounds for older Internet Explorer versions through conditional comments and the HTML5 Shiv library.

Permalink

Furatto

Furatto is a mobile-first web development framework built with Sass and Compass that emphasizes customization and simplicity, featuring a straightforward grid system and extendable architecture for rapid project development. The framework provides starter templates for common projects like login forms, galleries, and blogs, and welcomes community contributions through issue reporting, social sharing, and theme submissions.

Permalink