Skip to content

Programming

Writing software: JavaScript, Node.js, web development, visual programming, Linux, tools and tutorials.

447 posts · page 18 of 19

Computers And Color Theory, A Little Programming Tutorial

The author recounts his journey to create a simple generative‑art sketch in p5.js that illustrates how colors can be generated using the HSL model. After explaining hue, saturation, and luminosity—and why HSL is more natural for artists because it forms a circular hue wheel—he presents a program that picks a random hue, computes its triad by adding 120° and 240°, then draws three rectangles and two semi‑transparent circles in those colors. Each click re‑chooses the triad; right‑click saves the image. He notes how this exercise teaches basic arithmetic and arithmetic with degrees while also serving as background art or prints, and contrasts HSL’s advantages over RGB and CMYK for generative art.

Programming Challenge: declaration.json

The author explains that people—including US Congress members—are still confused by complex data‑breach issues and are not getting clear answers from companies. They propose writing a human‑centric declaration of rights in a structured JSON format (declaration.json) that uses 128‑bit UUID node IDs so it can be edited and maintained across platforms by many programmers. By mapping nested concepts with mind‑mapping tools, providing profiles such as “Enhanced Human Rights,” the document turns complex agreements into single‑sentence compatibility lists, allowing individuals and companies to present clear statements about bulk data collection, location tracking, and data sales; dashboards would then help track the dynamic components for legislators and other stakeholders.

X and Why: A Real Introduction To Real Mathematics

I recently created a simple p5.js sketch called **math‑101** (available on <https://editor.p5js.org/catpea/sketches/> and the GitHub repo <https://github.com/catpea/p5>) that demonstrates how to draw a stylized tree using basic vector math rather than raw scalars, illustrating why angles, magnitudes and trigonometry are essential for realistic branch lengths; after experimenting with manual code (no functions or loops until the final small‑branch stage), I explain how vectors (magnitude + angle) let me compute x/y components for each branch, showing that a circle’s radius naturally maps to branch length and that simple trig formulas suffice to generate multi‑generation trees—an approach I hope will inspire further generative art such as adding birds, squirrels or animals to the forest.

Self Education, Blender 3D Print Toolbox, And Non-Manifold Geometry

Using Blender’s free open‑source 3D modeling tools, the post explains how to design manifold models for 3D printing by constantly checking geometry with the “Check All” button; this tool instantly flags errors so you can fix them before exporting an STL file to a slicer such as PrusaSlicer, which converts the model into printer head movements and extruder settings. The author shares personal experience building a wallet with hinges in Tinkercad, noting how small changes in vertex operations (extruding forward then pulling up) can resolve errors that otherwise trigger after each operation. He stresses that mastering vertices and staying within slicer‑friendly geometry leads to high‑quality prints, and concludes by encouraging designers to let their tools guide them while still experimenting with creative shapes, as illustrated by his Cybertruck‑inspired hinge designs.

Programming A Remote Controlled Portable Raspberry Pi Audio Player

I built a DIY MP3 player by repurposing an old CD‑ROM drive as the chassis for a small PCB that plays pre‑converted MOD files, and I attached a Bluetooth “shutter” remote to control playback from my Raspberry Pi running Linux; after writing code that translates the shutter’s button sequences into simple shell commands (play, stop, shuffle), I can now operate the player with my phone, even routing its traffic through Pi‑hole for ad‑free listening. The project has been a satisfying exercise in tinkering and learning, reflecting my frustration with oversimplified school curricula and my enthusiasm for open‑source hardware that lets me reprogram and extend devices without costly new PCBs.

Wearable Computer Networks: Linux Audio Player Upgrade, Or The Six Key Keyboard

I built a minimalist portable Linux audio player that runs on battery power and an audio card without a screen or keyboard; I use a cheap Bluetooth “shutter” remote (normally used for taking photos) as a makeshift button set to control play, stop, next/previous, and volume. After wiring the shutter to my device and writing basic input handling in Node.js, I plan to expand it with a phone UI—potentially using Svelte—to stream audio or provide on‑screen feedback. The project illustrates how simple Bluetooth peripherals can turn a barebones Linux box into a pocket “server” capable of playing music, recording, making internet calls, and serving as a modular platform for future expansions.

Why And How Do Hackers Use Those Black Screens?

The post explains how to use the Linux command line for tasks such as playing media, downloading files, and retrieving data from APIs, illustrating with examples like using wget, curl, jq, and xargs or while loops to fetch Hacker News top stories.

A Very Brief Overview Of Linux

Linux is just the kernel part of an operating system; when combined with GNU’s user‑level tools (and sometimes a different kernel like Hurd), it forms GNU/Linux, which many distributions (Fedora, Ubuntu, Mint, etc.) extend further and can be installed on open‑source hardware such as Raspberry Pi or other affordable computers.

My First Homemade Portable Music Player

I’ve been tinkering with a Raspberry Pi Zero W since I switched to Linux in 1998, and recently built a compact music‑player for my bike by powering the Pi from a 15 k mAh Energizer power bank, streaming audio through an external USB SoundBLASTER card and headphones. After setting up ALSA so that `cvlc *.mp3` plays all my workout tracks on boot, I mounted the Pi, sound card, and power bank on the frame of my bicycle; the system runs headlessly in the background and resumes playback automatically when I reconnect to Wi‑Fi after a 10‑mile ride. The project has sparked ideas for adding a small keypad or wireless keyboard for control, a custom enclosure, and eventually a fully networked “Bicycle Linux Server” that could be managed from my phone via Termux. This experiment illustrates how a modest Pi setup can become a portable media hub with minimal wiring and command‑line operation, while keeping the learning curve low and the hardware simple.

Self Education: In Hot Pursuit Of Curiosities

I learned how to make a Raspberry Pi button recently, and I researched it my way. [I wanted to see if there was a way to do it on the command line](https://simonprickett.dev/controlling-raspberry-pi-gpio-pins-from-bash-scripts-traffic-lights/) with the simplest kind of programming; there is. The [GPIO header](https://www.youtube.com/watch?v=6PuK9fh3aL8) is represented with files on a Raspberry Pi. I gave some thought to store‑bought devices as they relate to custom‑made ones. I think store‑bought is not that cool anymore; in his funny song “Thrift Shop” Macklemore calls it *getting tricked by a business*, to say the least. Plus the moment you scratch your screen, your new device becomes old. If you made it yourself, then you just get a new $20 screen. And, hey, maybe add some [cool extras](https://shop.pimoroni.com/products/keybow-2040) while you're at it. YEEES! It is true that homemade hardware is freaking huge, and sometimes you may need your friend to carry your phone in his backpack. But that is what friends are for… I think. There is just something really weird about not knowing what’s in your pocket versus what’s in your store‑bought phone; criminal phone hacking will only become more elaborate. It has never been a good idea to keep personal things on an internet‑connected device. The phones are going to use cheaper components, become more expensive, and more closed. And it will pretend a lot harder that recommendations are not ads. When you make your own phone, you get to reason about the components; it seems to me that a GPS map should have a huge screen much bigger than a phone, and a bigger battery too. When you use an overpriced off‑the‑shelf phone, you don't get a choice. Anytime you build something, you learn something: be it a reasonably sized Raspberry Pi Zero MP3 player with those amazing slow and soft turning aluminum knobs for volume, treble, and bass; or two or three 8GB Raspberry PIs jammed into a [beautiful vintage brick phone](https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=vintage+brick+phone&_sacat=0) with a springy antenna that doubles as a Wi‑Fi hotspot for your 1024 closest friends… and maybe runs a leaked version of old MySpace or Friendster, or just freaking [GeoCities](https://www.youtube.com/watch?v=9jYE8VwxunQ) where your whole family can come together and upload some under‑construction content with fancy GIFs. Wouldn’t it be amazing if all the telemarketers had to find their way around a little labyrinth and fight a *Freaking Grue* before they could leave a voicemail? I am pretty sure they would love it. Old is new again; it is hard to explain, it will be somewhat hard to learn, and it will take forever. But not only won’t it cost an arm and a leg, building custom electronics and learning programming paints a pretty

Bird Attacks And Speeding Up Your Workout Music: A Linux Command Line Tutorial

In this whimsical post the author recounts a bicycle ride that inspires a foray into Linux and audio processing; he sets up a Raspberry Pi as an inexpensive workstation, installs ffmpeg via apt, and explains how to speed‑up an MP3 by 125 % using the atempo filter in the command line: `ffmpeg -i original-song.mp3 -af atempo=1.25 spedup-song.mp3`. He walks through each flag (-i for input, -af for audio filter) and notes that atempo=1.25 means 125 % tempo. The post ends with a short demo of the before‑and‑after audio and a brief reflection on how the command line can be efficient once you learn its syntax.

Programming Is Not That Scary

The post explains how to start web development by picking manageable technologies, then details the many layers of hosting and security that come into play once your server is online. It proposes using server‑less functions to keep scaling simple, notes how mobile apps differ from web ones in terms of CPU usage and battery life, and recommends desktop frameworks such as Electron or NW.js

Super Nintendent Meow

The post outlines a three‑step plan to build an integrated system: first, create a computer game that earns players fame; second, develop an editor and automator so they can become creators themselves; third, set up a marketplace that frees them from poverty by enabling them to sell their creations. The author describes this as a “school” that teaches abstract thinking and lets students learn without draining their accounts, using an abstract language that speaks worldwide and erases hate. They envision the system evolving through successive implementations—audio‑book creation, music composition with automatic song mutation, and 3D sculpture/jewelry design with automated permutation—each adding a new creative tool while keeping the platform free and open to all, ultimately aiming for world peace.

Programming Is Pretty Funny

In this whimsical reflection, the author recounts various introductions at tech events—calling themselves a computer scientist, philosopher, troublemaker—that humorously shaped their interactions with colleagues. They recall being the butt of jokes, misidentifications, and playful references to office culture, while interspersing links to the Jargon File and personal anecdotes about programming as an art of laughter. The narrative culminates in a celebration of programmers’ creativity, joy, and the vibrant, sometimes obscure language that unites them.

What The Heck Are Computer Programs Anyway?

The post is a beginner’s guide to starting programming on a Raspberry Pi using Node.js. It explains how easy it can be to learn by building a small, existing project called “fragrance,” installing Node with nvm, cloning the repo, linking it as a local command, and then customizing it (renaming “fragrance” in the code). The author emphasizes starting simple—using an existing template rather than from scratch—then gradually adding features, pushing changes to GitHub, and exploring the wide range of possibilities that Node.js offers on the command line, web apps, Electron windows, and even hardware control. In short, it’s a step‑by‑step recipe for turning a Raspberry Pi into a learning platform for programming with Node.js.

Little Drummer Boy

I revisit my long‑time music‑generation project several times, rewriting the code over the years and finally settling on a small, open‑source tool called **westland** that uses Tidal notation to automatically compose drum patterns in LMMS. After learning the basics of notes, octaves, and rhythm from Ableton tutorials, I discovered how to encode rhythmic structures like “4n” for quarter notes and nested arrays for faster beats (e.g., `["F4","F4",["F4","F4"],"F4"]`). With this system I can generate symmetrical drum patterns that evolve over time, applying filters and transforms to create fresh dance tracks. My goal is to produce machine‑generated electronic music that feels new each time while keeping the composition process simple and reproducible for other programmers or musicians.

Skunk Works: How To Become An Inventor

The author proposes a simple, user‑friendly system for home automation based on single‑board computers (like Raspberry Pi) and chat‑room style interfaces where devices act as bots that communicate via plain English commands; by leveraging existing assistants (Siri, Alexa, etc.) and custom “event‑emitter” scripts, one can orchestrate tasks such as thermostat control or energy saving without writing complex code. They argue that the key to invention is observing everyday tools, simplifying their use, and building modular, interoperable bots that communicate over a shared chat platform, thereby turning ordinary devices into an anthropomorphized “agent network.”

Back To The Future: Reinventing A Smart Smartphone

Open‑source Linux phones like the Pine Phone or Raspberry Pi give developers more flexibility, better security and true OS access than closed “walled garden” smartphones that depend on simplified GUIs and proprietary ecosystems.

Programming Tutorial: Connecting All The Program Pieces Together With An Event Emitter

The post explains how structuring a program around an Event Emitter—an object that can both listen for events and emit them—simplifies development by making the main file act like an index of all functions rather than a long linear script; it uses a simple chat example where “outgoing‑message” events are emitted when a user sends text, triggering handlers that package data for the server, which then emits “incoming‑message” events to other clients, and extends this pattern to more complex scenarios like a MUD game or inter‑bot communication, showing how keeping everything event‑driven keeps code small (often just 20 lines), easy to modify, and easier to visualize as a diagram of interactions.

Learning Programming: Is It Worth It?

The post explains setting up a Raspberry Pi with Node.js, learning JavaScript via small “Hello World” projects, and building a GitHub/npm portfolio of tiny programs to launch a programming career.

Programming Is A Superpower

Programming can be seen both as a creative art and a technical discipline that requires solid architecture, coordination, and collaborative effort. By crafting simple programs—whether pixel‑art scrolling games like *Mari0*, 2‑D worlds in Inform 7, or robotic projects such as autonomous drones—developers learn to turn ideas into tangible universes, giving life to formulas and enabling new business products. Small experiments become stepping stones: building generative art, printing it on canvas, or exploring electronics and robotics; each project strengthens the loop of learning by doing. In this way programming evolves from a hobby into a powerful tool that fuels innovation, research (as seen in mountains of white papers), and real‑world impact—from creative expression to job offers and solutions for poverty.

The New Computer Revolution

The post argues that software quickly ages and becomes vulnerable once released, so the real “program” is its clear, detailed text description rather than code; this description should be testable (pass or fail) and portable across languages and teams. It cites existing systems—Unix, HyperCard, Inform 7, etc.—as examples of how concepts drive implementation, and proposes that a new visual programming language with an easy ramp, usable on smartphones via diagrams or word‑based keyboards, could let anyone—non‑programmers included—design programs in any domain, sparking a new computer revolution.

Mastering Programming

The post argues that becoming a good programmer is straightforward once you view code as a collection of “machines” that pass and transform objects—like User emails or login packets—through well‑ordered stages, handling errors and state changes in the same way you would orchestrate physical machines. Mastery comes not from memorizing interview questions but by repeatedly building such object‑passing pipelines, learning OOP concepts through hands‑on practice rather than textbook definitions, and designing simple yet robust data stores (in‑memory indices plus file‑based append‑only logs). The author celebrates the programmer’s self‑made world, likening it to a Rōnin Samurai or magician who creates, tests, and expands systems—illustrated by examples such as WikiWikiWeb, HyperCard links, or simple node/electron projects—showing that true programming is about constructing coherent, reusable machines rather than fitting into corporate molds.

A Priceless Education That Costs Nothing: Reading Source Code and Writing Programs

The post argues that true software skills are gained by building and refining custom projects—starting with simple clones of popular frameworks like Bootstrap and progressively mastering higher‑level tools such as Vue or Svelte—and showcasing these hands‑on creations in interviews, rather than relying on generic academic coursework.