John Cox

Blogs · @wyome

Tagged tutorial · everything

Top SQL Queries for Data Scientists

This article surveys nine essential SQL concepts for data scientists—querying and filtering, handling NULLs, type conversion, aggregation, date manipulation, text processing, ranking, window functions, and subqueries/CTEs—with practical examples of each. It then demonstrates how these concepts combine in real business scenarios, specifically finding best-selling products by month and calculating moving averages, to show that SQL is indispensable for data extraction, manipulation, and reporting even though it's often overshadowed by Python in discussions about data science. The piece emphasizes that SQL proficiency alongside Python and R forms the core toolkit for practical data science work.

Permalink

Stop trusting Reddit's DNS recommendations—here's how to find the best one for your home

Rather than assuming popular DNS providers work best for everyone, you should benchmark which DNS server performs fastest on your specific network, since your location and ISP routing both affect speed. The article explains how to use two free benchmark tools (DNS Speed Test and Control D's DNS Speed Test) to measure latency, jitter, availability, and resolve times across providers, then recommends choosing a reasonably fast option that also offers features you value—like ad-blocking or content filtering—rather than obsessing over marginal millisecond differences.

Permalink

Someone else's Excel spreadsheet, my problem now—these 5 tools help me handle it

This How-to Geek piece by Tony Phillips walks through five Excel tools for cleaning up a messy inherited spreadsheet: Go To Special to locate blanks, conditional formatting to flag duplicate Order IDs, inconsistent product names and unabbreviated states without altering the data, TEXTSPLIT to break up crammed contact details, and then converting the cleaned range into an Excel table with named constants and helper columns for maintainability. What sets it apart from similar tips is its workflow emphasis: each tool is used to inspect and verify before anything is changed, and the piece closes with basic structural rules for building spreadsheets that others won't need to repair.

Permalink

GitHub - onmyway133/claude-code-tips-tricks: My favorite Claude Code tips & tricks · GitHub

A collection of tips for using Claude Code effectively, organized into eight categories covering sessions, command mode, agents, skills, MCP servers, prompting, hooks, and workflow management. Topics range from practical efficiency gains like naming sessions after git branches and using subagents for exploration to architectural choices like running parallel worktrees for isolation and using hooks as deterministic gates for unattended runs. The guide emphasizes that context is the real constraint in long sessions, so managing what stays in the conversation window through deliberate pruning, subagent delegation, and rewinding failed attempts matters more than piling on additional rules.

Permalink

How To Set Up Apache Virtual Hosts on Ubuntu 16.04

This tutorial by [[Brennen Bearnes]] explains how to configure name-based virtual hosting with the [[Apache]] web server on [[Ubuntu 16.04]], enabling a single server to serve multiple domains such as [[example.com]] and [[test.com]]. It walks through creating site directory structures under [[/var/www]], setting ownership and permissions, adding simple demo index.html pages, and creating per-site configuration files by copying and customizing [[000-default.conf]] in [[/etc/apache2/sites-available]]. The guide covers enabling sites with [[a2ensite]] and disabling the default host, restarting [[apache2]], and optionally editing the local [[/etc/hosts]] file to test domains locally. Also included are troubleshooting tips and explanations of ServerName, ServerAlias, DocumentRoot, and log directives so administrators can expand the setup to host additional domains on one VPS. It emphasizes proper permissions, ownership, and testing, and recommends registering real domains and configuring DNS when moving to production.

Permalink

7 useful Excel formulas and functions for PPC

A practitioner-oriented walkthrough of seven Excel techniques for PPC analysts, split into "101" basics (delta calculations, incremental impact, CONCATENATE) and "201" dataset-prep skills (VLOOKUP, converting dates to custom week groupings, text-based categorization with nested IFs, and joining granular multi-attribute datasets). The core argument is that mastering spreadsheet mechanics — not just campaign intuition — is what lets analysts spot high-impact optimizations and build credible performance narratives, since surface-level metric changes can hide larger underlying deltas. Worth keeping as a reference for the actual formulas and step-by-step examples rather than general advice.

Permalink

HomeKit Weekly: How to create NFC automations for HomeKit using Shortcuts and $1 tags

NFC tags offer a faster and more reliable alternative to the Home app or Siri for controlling HomeKit devices, costing less than $1 per automation. The author walks through creating NFC automations in the Shortcuts app (rather than the Home app) by scanning a physical tag and linking it to HomeKit scenes or accessories, then demonstrates practical use cases like silently triggering a bedroom lamp or white noise machines without unlocking your phone or waiting for app sync delays. Since NFC tags work with all existing HomeKit accessories, they function essentially as portable physical switches controlled by tapping your iPhone.

Permalink

Top 10 data mining algorithms in plain English | rayli.net

This guide explains ten influential data mining algorithms selected by expert panels, covering how each works, why it's useful, and where to find implementations. The algorithms span classification methods like C4.5 and CART (which build decision trees), clustering techniques like k-means and EM, association rule learning with Apriori, and ranking/recommendation approaches like PageRank, alongside ensemble methods like AdaBoost, distance-based classification with kNN, probabilistic classification with Naive Bayes, and support vector machines for finding optimal separating boundaries. Each explanation includes practical examples—such as predicting patient cancer risk or identifying frequently purchased grocery combinations—to illustrate core concepts like supervised versus unsupervised learning, and discusses the strengths and limitations of each approach.

Permalink

SMINT | The simple jQuery plugin for lovers of one page websites.

SMINT V3 is a JavaScript library update that simplifies smooth scrolling navigation by allowing developers to use standard anchor links (href="#section") instead of requiring manual IDs. The release fixes a persistent bug where the menu bar would stick inappropriately during page refresh and adds support for distinguishing between internal scroll links and external site links through CSS classes.

Permalink

10 Tips for Writing JavaScript without jQuery | Tutorialzine

Modern browsers have evolved significantly since jQuery's heyday, making vanilla JavaScript viable for many projects without sacrificing productivity—the author demonstrates ten essential techniques (DOM ready, element selection, event handling, class manipulation, content changes, DOM insertion/removal, tree navigation, array iteration, animations, and AJAX) that are now straightforward with native APIs like `querySelector`, `addEventListener`, and `classList`. While jQuery remains valuable for complex applications, simpler projects like basic web pages, extensions, and mobile sites can benefit from lighter vanilla JavaScript implementations that reduce page bloat and load times.

Permalink

Easing Functions Cheat Sheet

This guide explains easing functions—mathematical formulas that control how animations accelerate and decelerate over time to mimic natural motion—and demonstrates how to implement them across CSS, PostCSS, and TypeScript. It provides practical examples of applying easing to properties like size, position, and transparency, along with the underlying mathematical code needed to calculate animation progress at any point from start (0) to finish (1).

Permalink

Get Real Image Height and Width Dimensions

The piece explains how to retrieve an image's original dimensions in JavaScript using the `naturalWidth` and `naturalHeight` properties, which return the actual image file size regardless of CSS styling that may have resized it. The author discovered these read-only properties while seeking a way to access an image's "true" size independent of any CSS modifications like `max-width: 100%`. The properties only become reliable after the image has fully loaded, so checking them within a load event listener is necessary.

Permalink

Strip - A Less Intrusive Responsive Lightbox

This appears to be promotional content for a legal services firm rather than a reported article or analytical piece. It provides general overviews of legal categories affecting tourists, businesses, and entertainers on the Vegas Strip—including premises liability, DUI laws, gaming regulations, employment compliance, and entertainment contracts—without reporting on specific cases, legal developments, or substantive analysis. The piece functions primarily as an advertisement encouraging readers to seek consultation services.

Permalink

JavaScript for OS X Automation by Example -Telerik Developer Network

Apple's OS X Yosemite operating system includes JavaScript as an automation tool for OS X, a feature that received little attention from tech journalists but proved significant enough for developer tools company Telerik to highlight through practical examples. The post demonstrates how developers can leverage JavaScript for system-level automation tasks on Mac computers, expanding the scripting capabilities beyond traditional AppleScript approaches.

Permalink

Building OS X Apps with JavaScript by Tyler Gaw

OS X Yosemite's JavaScript for Automation feature allows developers to write native Mac applications using JavaScript instead of AppleScript, with full access to Objective-C frameworks through a bridge that lets you import and use classes like Cocoa for building GUIs. The post provides a detailed walkthrough of building a complete example app that lets users select and display images, explaining the syntax conversions needed to use Objective-C methods in JavaScript, how to create UI elements, handle button clicks through subclassing, and work with file dialogs. The author argues this is significant because it removes barriers to Mac app development by letting anyone with JavaScript knowledge build native applications without additional tools or installations.

Permalink

Onload in Onload | High Performance Web Sites

When scripts are loaded asynchronously in an onload handler, any third-party script that also relies on an onload handler to initialize won't execute properly, since browsers don't fire a second onload handler added during the first one—a problem demonstrated through cross-browser testing. Scripts should check `document.readyState` to detect whether the page has already loaded and execute immediately rather than waiting for an onload event that will never come.

Permalink

uilang

uilang is a minimal JavaScript library that lets web designers write interactive UI behaviors using plain English syntax embedded in HTML `<code>` elements, rather than traditional JavaScript. The language works by executing simple click-triggered commands that add, remove, or toggle CSS classes on elements, allowing designers to create common interface patterns like tabs and modals by combining uilang instructions with CSS styling. It deliberately limits itself to click events and class manipulation to keep the learning curve shallow and keep the focus on what designers already know.

Permalink