John Cox

Blogs · @wyome · Now · Shelf

Interesting

What makes a good MySQL index? Part 2: Cardinality « James Cohen

A MySQL indexing walkthrough on cardinality, using a dummy `user` table with composite indexes on (age, sex) and (sex, age). It uses EXPLAIN output to show that high-cardinality columns like age narrow the search far more than a 50/50 column like sex, so the column order in a composite index matters. It also shows the optimizer skipping an index when a query would return most of the table (`age<80` does a full scan, `age>80` uses the index). A later-added section adds that low cardinality can still be useful when the data is skewed: with 9 females among 4,916 rows, `sex="FEMALE"` uses the index while `sex="MALE"` doesn't. The practical lesson is to test with realistic data and queries.

Permalink

Slow Queries? Check the Cardinality of Your MySQL Indexes | Lullabot

A Drupal performance case study on the User Relationships module, where a relationship-count query over a ~219,000-row table took nearly a second. The cause was an index on `rtid` (relationship type) that had a cardinality of about 6 even though every row held the same value, so MySQL used it and still scanned most of the table. Dropping that index halved the time, and replacing the composite primary key (which included `rtid`) with a plain `(requester_id, requestee_id)` index brought the query to about 0.01 seconds, roughly a 100x improvement. The piece uses EXPLAIN, SHOW INDEXES and profiling output to show how low-cardinality indexes can hurt rather than help.

Permalink

How to: Use MySQL fast LOAD DATA for UPDATEs - SoftwareProjects : Internet Marketing Services

What was saved is the About page for SoftwareProjects, not an article with an argument. It describes a company founded in 2003 as a web development agency, turned SaaS vendor in 2008 with an all-in-one CRM, cart, help desk, email and affiliate platform, and refocused in 2015 on an eCommerce shopping cart. It pitches curated "top products" that are replaced when user feedback and refunds show them to be mediocre, plus 24/7 support, PCI compliance, and built-in analytics, email, affiliate management (revshare, CPC, CPA, CPL) and anti-fraud integrations such as Kount and MaxMind. It claims 30,000 daily customer interactions across 17 countries, so it is worth keeping only as a reference for what this vendor offers.

Permalink

Table rows as clickable anchors – James Padolsey

Making a table row or div clickable with a JavaScript click handler that changes window.location is a poor imitation of a link, because it loses middle-click, ctrl/shift-click, the right-click menu, and the status-bar URL. Instead, the author overlays a real, absolutely positioned anchor on the row like a blanket, so every native link behavior survives. This grew out of a StackOverflow answer into a jQuery plugin, superLink, which takes a selector for the link inside the container (default 'a:first'). It comes with a caveat: bind mouseover/mouseout before calling the plugin, and avoid mouseenter/mouseleave because the overlay breaks them.

Permalink

The Shapes of CSS

A catalog of CSS-only shapes, each built from a single HTML element by combining width, height, border-radius, and the ::before and ::after pseudo-elements with positioning and transforms. It runs from basics like squares, circles, and the eight triangle orientations through trapezoids, parallelograms, stars, pentagons, and octagons, to novelty forms such as Pac-Man, a talk bubble, a TV screen, a magnifying glass, and a lock. A 2026 note up top says the techniques are now dated hacks, since shape(), corner-shape, and border-shape handle this far better, so it's worth keeping mainly as a record of the old tricks.

Permalink

The Bug Genie ~ Friendly issue tracking

This is promotional copy for the Daman Game app, an Indian real-money color-prediction and betting platform (WinGo, Aviator, slots, 5D Lotre, fishing and mini games). It walks through sideloading the 18.8 MB APK by enabling "Unknown sources," registering with an invite code, depositing, and withdrawing (INR 100 to 10,000, up to 24 hours), and it pushes a referral scheme explicitly likened to 91 Club. Its claims of security, transparency and easy winnings are unsupported assertions, and the piece never mentions licensing or the financial risk of gambling, so it is better kept as an example of gambling-app marketing than as reliable information.

Permalink

Adminer - Database management in single PHP file

This is the official homepage for Adminer, a database management tool distributed as a single PHP file that works with MySQL, MariaDB, PostgreSQL, SQLite, MS SQL and Oracle, plus others such as Elasticsearch and MongoDB via plugins. It lists the current 6.1.0 download (full and MySQL-only builds), the feature set (table, index, view and routine editing, SQL execution, import/export, user and process management), and the requirements: PHP 5.3 or newer, 47 languages, and a free Apache/GPL license. It pitches itself against phpMyAdmin as one file instead of thousands, faster and smaller, with security as the top priority, and advises restricting access by IP, web-server passwords or OTP plugins, and updating promptly after past security bugs. It also links skins, user-contributed packages (Docker, Laravel, WordPress, Drupal and more) and a long list of press references.

Permalink

Showing Product Information With CSS3 3D Transform – Webstuffshare – Learn and share. The simplest harmony.

This is a landing page for a web development tutorial site, not a single in-depth piece. It offers short primers on a range of topics: what HTML is and how paired tags structure a page, choosing a domain and host (Bluehost, SiteGround, HostGator), fluid grids and relative units for responsive layouts, database schema design and indexing, and a brief nod to site security and frameworks/APIs for intermediate developers. Several sections, such as the security checklist and the HTML code example, appear to be empty, so the value is mostly as a pointer to the site and a quick tweet-sized stack overview (HTML for structure, CSS for style, JS for interactivity, Git for teamwork, Node/Python/PHP for backend) from @MentorWebDev.

Permalink

HTML for Icon Font Usage | CSS-Tricks

Proposes a markup pattern for icon fonts that keeps semantics clean and avoids screen reader noise. The icon goes in an empty `<span aria-hidden="true" data-icon="…">` whose glyph is inserted by a `:before` pseudo-element, because pseudo-elements alone get read by VoiceOver, and aria-hidden markup alone still triggers an "HTML Content" announcement. For icons that stand alone, such as a linked RSS or cart icon, the same span is paired with off-screen text so the control is still audible. The piece also advises mapping icon fonts to relevant Unicode symbols or the Private Use Area rather than to letters, with IcoMoon as the mapping tool, and notes that testing was only done in VoiceOver.

Permalink

Geocoder - The almost missing Geocoder PHP 5.3 library.

Landing page for Geocoder, a PHP library that wraps geocoding in a single abstraction layer so geo-aware apps aren't tied to one vendor. Its pitch rests on three points: over 30 swappable third-party providers behind a consistent interface, a large test suite with unit tests for shared logic and integration tests for each provider, and ready-made integrations for Laravel (a package) and Symfony (a bundle). Worth keeping as the reference for the PHP geocoding option that lets you change providers without rewriting code.

Permalink

Item Blur Effect with CSS3 and jQuery | Codrops

A tutorial for a hover "focus" effect on a grid of text cards: when you mouse over one card, it scales up while its siblings shrink and appear blurred. The blur is faked in pure CSS3 by making the text color fully transparent while enlarging a matching text-shadow, and by adding a large white box-shadow to the cards. A small jQuery script toggles `active` and `blur` classes, with a 75ms timeout to steady the hover, and clears them when the mouse leaves the container. It relies on CSS transitions, so it works best in Safari or Chrome, and the code includes a small typo (`opacity; 1;`) in the final active-text rule.

Permalink

Turning the Tables - MySQL

This tutorial installment gets practical about setting up MySQL for transactions. It shows how to check whether your server supports InnoDB or BDB by querying the have_innodb and have_bdb variables, and notes that a custom build needs recompiling with --with-innodb. Because MySQL defaults to non-transactional MyISAM tables, you must add TYPE=InnoDB to CREATE TABLE, which it demonstrates by building users, groups and mailboxes tables, and it shows that ALTER TABLE ... TYPE=INNODB converts an existing table in place without a dump and reload.

Permalink

20 Great PHP Libraries You Need to Know | KomunitasWeb

Lo que se guardó es en realidad una página de portada de un sitio de tecnología en español, con un artículo destacado y varios fragmentos de otros. El texto principal, del 28 de febrero de 2025, sostiene que la inteligencia artificial está cambiando la corrección de exámenes al hacerla más rápida, objetiva y eficiente, de modo que los docentes ganen tiempo para enseñar; pero el texto se corta justo al empezar el primer apartado y no llega a dar ejemplos ni datos concretos. El resto son adelantos de piezas divulgativas sin relación entre sí (compras con el plan de teléfono, carga inalámbrica, si el móvil nos escucha, monitores 4K para gaming, radios VHF marítimas, drones agrícolas, 5G y privacidad en la red), así que, si lo valioso era la IA en la evaluación educativa, solo ese primer fragmento lo trata.

Permalink