one hundred and thirty-six things tagged “programming”
Dr. Axel’s JavaScript Flashcards
He’s also written and published this amazing book.
Advanced Shell-Scripting with bash
Been writing bash
scripts for over 15 years now. Learned a lot from this presentation. There’s also this advanced bash
scripting guide I’ve referred to for a while now.
ZX is a Node-based Scripting Tool by Google
Lovely little wrappers around child_process
, it looks like. I love Bun’s shell-scripting feature and am glad to note that the same elegant (eye of the beholder, leave me alone) syntax is available in Node via zx.
Live-Reloading Middleware for Bun.js
A pretty comprehensive solution! I was looking for this when attempting to learn me some Bun and make a small script that would live-reload a single page (with SASS and Tailwind). And voila: a significantly better solution than the duct tapey thing I came up with 🤣
A Command-Line Murder Mystery!
By Noah Veltman who appears to have impeccable gums.
A Git Cheatsheet
By Julia Evans. I don’t think an average dev will need anything more than what’s on here.
Learning Zig
By the same author who wrote The Little Go Book
Parsing X/HTML with Regex
by StackOverflow
You can’t parse [X]HTML with regex. Because HTML can’t be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool that…
In Defence of the Single Page Application
Trenchant, brilliant stuff by William Kennedy 💯 (Cached)…
K&R is the One True Indentation Style
Via Wikipedia. I am “not able rightly to apprehend the kind of confusion of ideas that could provoke” the genesis of other styles. “Haskell Style” has to be a joke (like this masterpiece) and I just pray I don’t encounter it in the wild1 🙏 // Allman while (x === y) { func1(); func2(); } // Ho…
“Revolution is possible. But it’s unlikely that we will be fighting for revolution alongside the same venture capitalists and tech companies who helped to get us into this mess in the first place [...] Dig deep. Ask the hard questions. Criticize the flaws. And cut through the bullshit.”
Molly White asks if Web3 is bullshit. Short and excellent talk.…
ThanosJS is a Hot New Framework that promises to “reduce the file size of your project down to 50%”
It’s what all the Patagonia-clads are raving about. They tell me it solves all perf problems in a snap. Update Here’s an NPM package. And, of course, Java if you’d like to deploy this in an Enterprise™ setting.…
Interview with a Senior JavaScript Developer in 2022
I don’t know whether to laugh or cry. This really got me: My job is to keep our code running while other packagers are changing theirs. Lord have mercy. NPM continued use and existence is proof that (Almost) Every Day is a Miracle ✨…
An Ingredient Parser using TensorFlow
Really cool stuff. Trained on the New York Times ingredients corpus (large 13.5MB CSV) and turns this ingredients = [ "3 large melons", "5 1/2 cups water", "2 cups flour", ] into this [ { "name": "melons", "unit": None, "qty": 3.0 }, { "name": "water", "unit": "cup…
“entr” provides a nice interface to inotify
Saved me a ton of time with small project I’m working on right now. Looks like it’s written in C.…
On Software
Software is and has been engaged in an endless race to the bottom. Wrong. The Achievements of the software industry over the last thirty years are astonishing. They’ve managed to entirely negate several orders of magnitude of performance improvements provided by the hardware industry. Anonymou…
Adventuron is a framework that lets you create old-school Text Adventure games for a browser
Here’s a giant list of games people have created with it. Here’s a teeny little introductory adventure. I plan on playing The Quest of DuBebe this evening:…
Our Crazy Calendar
by @foone
Someday aliens are going to land their saucers in a field somewhere in New Jersey and everything is going to go just fine right up until we try to explain our calendar to them “yeah we divide our year into a number of sub units called ‘months’ made up a number of days, and they’re not all the same…
Fundamentals of Lambda Calculus for People Who Love Birds
This (beautifully formatted and well-paced-and-delivered and surprisingly sparsely attended) talk by Gabriel Lebec on the fundamentals of Lambda Calculus is one of my favorite talks ever. https://www.youtube.com/watch?v=3VQ382QG-y4 As Lebec explains, the lovely bird names come from this book call…
If “American Psycho” Were About Programmers
Excellent stuff, particularly the mechanical keyboard envy1. There’s a Nikhil in it too! 💁♂️ I don’t think I’ll get into them. Got myself one of these (brown switches) about three years ago after outsourcing the research to a highly enthusiastic and helpful co-worker. The “L” key sticks sometime…
“Everyone has JavaScript, right?”
The key takeaways in no particular order. Use <noscript>. If you are using it, use it a lot more. There is no guarantee that chunks will load after the main one does; the user’s location and/or network access might have changed! Think CalTrain. ISPs, Corporate VPNs, and Browser Plugins1 c…
Enterprise Software - A Camel is a Horse Designed by Committee
by Arvind Narayanan
My university just announced that it’s dumping Blackboard, and there was much rejoicing. Why is Blackboard universally reviled? There’s a standard story of why “enterprise software” sucks. If you’ll bear with me, I think this is best appreciated by talking about… baby clothes! There are two types…
Math in Bash
Lovely stuff. Cached here.…
Plurals in Python
>>> n = 0 >>> print "%d item%s" % (n, "s"[n==1:]) 0 items >>> n = 1 >>> print "%d item%s" % (n, "s"[n==1:]) 1 item >>> n = 2 >>> print "%d item%s" % (n, "s"[n==1:]) 2 items # If you might want to print negative items, add abs to the test: >&g…
The TeX Family Tree History
LaTeX, pdfTeX, XeTeX, LuaTeX and ConTeXt. That’s a lot of TeX! This was most helpful, even though MacTeX solves all my problems.…
Don’t Use Hadoop - Your Data Isn’t That Big
A still-very-relevant 9-year old article. Pandas has gone from strength to strength since he wrote that. In terms of expressing your computations, Hadoop is strictly inferior to SQL. There is no computation you can write in Hadoop which you cannot write more easily in either SQL, or with a simple…
How Big is Too Big for JSON?
From over 10 years ago (I’m sorting through my old bookmarks). A single object looks like this: { "ACCTOUNT_NUMBER":"1234567890", "CUSTOMER_NAME":"ACME Products and Services, Inc.", "ADDRESS":"123 Main Street", "CITY":"Albuquerque", "STATE":"NM", "ZIP":"87101-1234" } He te…
The Universal Estimation Table
Estimate Actual Time Very Easy 1 Hour Easy 2 Hours Quite Easy 4 Hours Looks Quite Easy 6 Hours Average 8 Hours Looks Average 12 Hours No Clue 16 Hours Seems Complex 24 Hours Complex 30 Hours Very Complex 40 Hours Can Take Some Time 48 Hours Fuck…
An Introduction to Apache Kafka in the Style of a Children’s Book
I loved how the author imagined persistence 💗…
On Software Engineering and Complexity
me, a software engineer: large scale production systems are complex and require teams of experts to keep running. It’s near impossible to get right 100% of the time me, when an app I use goes down once: these fucking clowns, what the fuck @aweary…
On Microservices and FOMO
Uber in 2016: “We have thousands of microservices.” Everyone: “That sounds insane." Uber in 2020: “It turns out that was insane.” @sandofsky…
“Vertical Hanging Indent” is the One True Indentation Style
With the trailing comma and sorted properties/imports/arguments/whatever. Makes symbols easy to scan from top-to-bottom and looks like this in Python: from constants import ( EXIT_CODE_ARTICLE_ROOT_NOT_FOUND, EXIT_CODE_NOT_A_GIT_REPOSITORY, EXIT_CODE_NOT_AN_ABSOLUTE_PATH, MARKDOWN_E…
On Polyfills and Internet Explorer
[…] it’s not okay to block old browsers, but it’s a waste of time to support them 100%. Chris Heilmann…
The Script Tag
A handy-dandy visual guide to the <script> tag, its various attributes, and how they relate to HTML parsing. Source unknown.…
Docsify is a Markdown-based documentation generator.
It’s very simple and clever. This is an example of what’s rendered from this giant Markdown file 💙…
“No. I decided I don’t care.”
I love this more than I can describe.…
On Delegates, Events, and Callbacks
I just met you, And this is crazy, But here’s my number (delegate), So if something happens (event), Call me, maybe (callback)? LightStriker on StackOverflow…
Real Programmers Don’t Use PASCAL
by Ed Post, Copyright (c) 1982
Back in the good old days – the “Golden Era” of computers, it was easy to separate the men from the boys (sometimes called “Real Men” and “Quiche Eaters” in the literature). During this period, the Real Men were the ones that understood computer programming, and the Quiche Eaters were the ones that…
The Collatz Conjecture in TypeScript’s Types
The argument here being that, since the ‘general form’ of the conjecture is undecidable, TypeScript’s type system is undecidable. How does one even think of doing these things? I love Typescript, but it isn’t nearly ambitious enough. It would be vastly improved with an --extremelyStrict flag enfo…
How to Write a Shell in C
About as ‘essential’ as it gets if you want to appreciate a tool you work with every day. (Cached)…
On a Program’s Scope
“Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.” Coined by Jamie Zawinski (who called it the “Law of Software Envelopment”) to express his belief that all truly useful programs experience pressure to evolve into toolk…
The Dinosaur in Google Chrome
Here’s a fairly recent (Dec 2018) interview with the creators of chrome://dino. It was called Project Bolan (which I had to look up), had 270M games played every month1, with most users coming “from markets with unreliable or expensive mobile data, like India, Brazil, Mexico, or Indonesia” and took…
Single-binary Compilers for Node
Nexe and pkg are two compilers that create self-contained executables out of your Node scripts. Deno introduced this in a recent release, which got me looking for Node-based alternatives.…
Your API is a Hall of Shame; You give REST a Bad Name
Dylan Beattie is my new favorite nerd on YouTube.…
Four Months of Frontend Development
This is a new personal record. Will go six months the next time 🎸…
The Scunthorpe Problem
The Scunthorpe problem (or the Clbuttic Mistake) is the unintentional blocking of websites, e-mails, forum posts or search results by a spam filter or search engine because their text contains a string of letters that appear to have an obscene or otherwise unacceptable meaning. Wikipedia Exam…
On Debugging
I’m not a great developer, I’m just really good at finding the magic one-liner fix on the 14th page on a repo’s GitHub Issues @iamdevloper…
On GraphQL
a GraphQL server is just a SOAP API that’s studied abroad @iamdevlopr…
Latency Numbers “Every Programmer Should Know”
From a presentation by Jeff Dean. What about when technology evolves? Here’s a handy visualization. And here’s a way to think about these numbers. Nathan Hurst visualized the distances on Google Maps1. Operation Time (ns) Light Distance (m) Approximate Light Distance L1 cache reference…
The Thirty Million Line Problem
https://www.youtube.com/watch?v=kZRE7HIO3vk…
A List of Ebert’s Favorite Films you can stream off Amazon Prime.
Here’s how the author made that list. Here’s a cached version.…
Object-Oriented Programming Sucks
Well… not really. Maybe. Brian Will examines the history of the OOP way of thinking and it’s over-application as a panacea to every problem domain, particularly in The Enterprise™ https://www.youtube.com/watch?v=QM1iUe6IofM…
On Auto-Fucking-Play
Dear web developers, The answer is zero. Zero. Get it through your thick skulls. Zero is the number of times anyone has EVER wanted something to autoplay on your site and start making noise. I’d honestly rather you mine crypto-currency in my browser than use my speakers. #kthxbye @MalwareJake…
Build Your Own Lisp.
Learn C and build a basic Lisp #VALUE 😍…
This is a very handy psql cheatsheet.
One should be good 80%+ of time between that and the awesome pgcli.…
gron is a JSON grepper
Woo! Covers the biggest reason why I use jq (grep for fields) which, as the gron author notes, is more general-purpose and takes a little more effort to understand and use.…
Naughty Letter Frequencies in English
Here’s a community-maintained "List of Dirty, Naughty, Obscene, and Otherwise Bad Words" across various languages on Github. I was curious about a naïve frequency distribution of consonants across the English-language corpus (NSFW, obviously) and wrote a small script. Here are the results…
“The key to making programs fast is to make them do practically nothing.”
On why GNU grep is fast. Via HN.…
Generative Pre-trained Deepak
Headed over to “Wisdom of Chopra” to get myself a slice of Deepak’s #cosmiconscious insight. Took that and had GPT-2 use it as a seed for more wisdom. Behold: The invisible is the foundation of total belongingness: When we feel like we belong and are at home, we are happy, healthy and in good…
Disposable Software
The software industry is currently going through the “disposable plastic” crisis the physical world went through in the mid-20th century (and is still paying down the debt for). You can run software from 1980 or 2005 on a modern desktop without too much hassle, but anything between there and 2-3 y…
How to Decode a QR Code by Hand
See also: “Creating a QR Code step by step”…
On Good Commit Messages
On the developer side, what I hope people are doing is trying to make, not just good code, but these days we’ve been very good about having explanations for the code. So commit messages to me are almost as important as the code change itself. Sometimes the code change is so obvious that no message…
FizzBuzz, Enterprise Edition™️
Being a satirical take on the state of enterprise software development, and authored by smart people who presumably like to watch the world burn. The issues are highly entertaining as well.…
Functions, Monoids, Functors, Monads
Started with this blog post about why one would need a monad (from a typing standpoint.) Then watched “What the 𝒇 is a Monad” which made a lot of things clear. Then watched this excellent, excellent talk on Lambda Calculus (with JS and Haskell code!) by Gabriel Lebec. Finished with a quick practi…
On De-Duplication
I’ve usually heard this phenomenon called “incidental duplication”, and it’s something I find myself teaching junior engineers about quite often. There are a lot of situations where 3-5 lines of many methods follow basically the same pattern, and it can be aggravating to look at. “Don’t repeat y…
State, Coupling, Complexity, & Code
Dependencies (coupling) is an important concern to address, but it’s only 1 of 4 criteria that I consider and it’s not the most important one. I try to optimize my code around reducing state, coupling, complexity and code, in that order. I’m willing to add increased coupling if it makes my code…
Process and Tooling
I thought using loops was cheating, so I programmed my own using samples. I then thought using samples was cheating, so I recorded real drums. I then thought that programming it was cheating, so I learned to play drums for real. I then thought using bought drums was cheating, so I learned to make…
Dank Typefaces
Was looking try something other than my beloved Operator Mono and came across Dank Mono which claims to be a “rather special coding font.” I love it. Looks like the cooler twin of Inconsolata. I remain quite tickled by how many of my co-workers find the italic variants of monospaced fonts ‘disturbi…
Data, Data, Data
Linus Torvalds on git I’d also like to point out that unlike every single horror I’ve ever witnessed when looking closer at SCM products, git actually has a simple design, with stable and reasonably well-documented data structures. In fact, I’m a huge proponent of designing your code around the d…
Because God Can See
When I was little — and by the way, I was little once — my father told me a story about an 18th century watchmaker. And what this guy had done: he used to produce these fabulously beautiful watches. And one day, one of his customers came into his workshop and asked him to clean the watch that he…
Two Levels of Not Giving a Fuck
No Code is the best way to write secure and reliable applications. Write nothing; deploy nowhere. Start by not writing any code. Brilliant. I love both the presence and contents of the Dockerfile in that repo. As is always the case with such projects, the issues and pull requests are 💯 And if…
Simpler Gmail
Michael Leggett, lead designer of Gmail from 2008-2012 “It’s like Lucky Charms got spewed all over the screen,” he says to me, as he scrolls through his inbox. It’s true. Folders, contacts, Google apps like Docs and Drive–and at least half a dozen notifications–all clutter Gmail at any given mome…
The Korn Shell
Good talk by Siteshwar Vashisht at FOSDEM 2019 on maintaining the Korn shell and old codebases in general. I came by his work while reading up on the fish shell. Featured this nugget He talks about how they removed dead/inapplicable code and micro-optimizations, refactored a lot of legacy code,…
Game of Thrones Ratings
Via Rotten Tomatoes and with the awesome ChartJS. Dots are episodes, contiguous lines are seasons (static version.) #got-ratings-canvas { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; margin: 1.25em 0!important; height: 350px; } /* esli…
Data, Data, Data
Vicki Boykis’ excellent article on every aspect of ‘Data Science’ I can think of: a little history, employment prospects, skills, education, and continuous learning. It would appear that more than half the job, at least, is wrangling (replicating, cleaning, imputing, transferring, understanding, a…
A Lisp Interpreter in Python
Peter Norvig: (How to Write a (Lisp) Interpreter (in Python)). See also: HyLang. Looks super cool and always makes me wonder if anyone’s ever used it in production.…
JavaScript Delenda Est
Back in the second century BC, Cato the Elder ended his speeches with the phrase ‘Carthago delenda est,’ which is to say, ‘Carthage must be destroyed.’ It didn’t matter what the ostensible topic of the speech was: above all, Carthage must be destroyed. My opinion towards JavaScript is much like C…
Assistant Executive for the Task Force on Employee Services
Via GLP, a University Title Generator that generates “prestigious” titles and associated salaries. A few random gems Associate Coordinator of the Subcommittee for Community Services Deputy Vice President of the Office of Alumni Planning Provost for the Subcommittee for Investor Diversity Vice…
Alan Kay on OOP
OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I’m not aware of them. – Dr. Alan Kay on the Meaning of “Ob…
CVS Receipt Generator
Garrett Whisten made a most amazing CVS receipt generator (cached). He even wrote a scraper that gets real product names off their website 🙏 🙌…
CSS Still Life
A pure CSS still life by Ben Evans who appears to be working on an online story with pure CSS illustrations as well. Via Deepu.…
The “Not Invented Here Syndrome”
In programming, it is also common to refer to the “NIH syndrome” as the tendency towards reinventing the wheel (reimplementing something that is already available) based on the belief that in-house developments are inherently better suited, more secure, more controlled, quicker to develop, and inc…
Input
A highly configurable, free-for-private-use typeface…
Node Modules
For a single project I made the mistake of working on in my Dropbox folder: Wonder what the downsides are to hardlinking by default. And, fundamentally, why creating an amazing, Python-like standard library is such an intractable problem in the first place. […] core-js is also utils library,…
Clay and Lego
The original comic…
Winter Coding Challenges
Advent of Code (via BE, 25 challenges.) The Elevator Saga (via co-worker, 18 challenges.)…
Literary Clock
Made a “Literary Clock” inspired by Jaap Meijer’s repurposing of an old Kindle. Might not be a bad use for an old iPad. Reminds me that I need to get Mark Formanek’s Standard Time onto a Raspberry Pi at some point. Update 08/24/18 There’s an app (of course)…
History of Java
Saw this minor dis by Safari and then this video on the history of Java. Also by the author: something of a tribute to Flash (RIP.)…
Desperation
margin: 0; padding: 0; ... margin: 0 !important; padding: 0 !important; ... sudo margin: 0 !important; sudo padding: 0 !important via @thebarrytone…
Programming Typefaces with Ligatures
This project adds ligatures to Operator Mono, my favorite coding typeface 😍 Fira Code is also very beautiful and ships with ligatures…
Python Environment Management
XKCD. Add to the mix virtualenvwrapper pyenv pipenv pythonbrew Conda Then there’s Python’s packaging and distribution kerfuffle……
The AWK Programming Language
Peruse from time to time to learn more than ye olde {print $3}…
A most excellent introduction to SVG
All a typical dev would need to know really.
Understanding Regular Expression matching with .test(), .match(), .exec(), .search() and .split()
All these years and I find myself reaching for this reference quite a few times…
Don’t use Hadoop - your data isn’t that big
I bookmarked this in 2015 and it’s crazy how relevant it continues to be.