Programming · Latest articles

30 new today · 2,696 articles · from 79 blogs

Lea Verou··Lea Verou

Dynamically generated SVG through SASS + A 3D animated RGB cube!

AI summaryWhile preparing for the Codemania keynote in Auckland, the author replaced a static RGB cube image with a 3D cube built with CSS and animated via CSS animations. The hardest part was creating the special gradients for the cube's six faces, which they solved by writing SASS functions that dynamically generate SVG data URIs directly from CSS instead of using separate SVG files. These reusable functions can also generate other SVG background shapes like polygons and circles.

Fabien Sanglard·

Git Source Code Review

AI summaryThe article presents a review of the source code of git, the version control system that has dominated the software industry since its release in December 2005 and is now widely used with GitHub by large teams and individuals alike. The author spent a few weeks of spare time reading git's source code to understand how the 'stupid content tracker' was built, finding it tiny, tidy, well-documented, and pleasant to read. The compiled notes are shared in the hope of encouraging others to read more source code and become better engineers.

Fabien Sanglard·

The Computer Graphics Library

AI summaryThe article discusses 'Computer Graphics: Principles and Practice,' a book so influential in the 1990s that it was commonly called 'The CG Bible.' It compiled much of the computer graphics knowledge of its era and was frequently cited by the top programmers of the time in interviews and articles. The book's popularity was formally recognized in 1998 with a Front Line Award.

Fabien Sanglard·

Algorithms and Data structures books: One size doesn't fit them all

AI summaryThe author, asked many times over the years what the best book on Algorithms and Data Structures is, explains that the answer is always "it depends." There is no single best book because it hinges on how each programmer's brain works and what kind of notation they are comfortable with, which usually comes down to a preference for either mathematics or illustrations.

Lea Verou··Lea Verou

I’m going to MIT!!

AI summaryThe author applied to MIT's PhD program in Electrical Engineering and Computer Science as her only application, despite having worked for several years and lacking a standout GPA or academic publications. Against her own expectations, she received an acceptance letter — arriving while she was watching TV right after a breakup — and ecstatically shared the news with everyone who knew. While she struggles with impostor syndrome fears about being the weakest student or disappointing her future advisors, her excitement about joining MIT and CSAIL outweighs everything else.

Lea Verou··Lea Verou

Introducing Whathecolor: A color game for web developers!

AI summaryThe author introduces Whathecolor, a simple web game where developers are shown a color and must type in a matching CSS color notation (such as hsl() or rgb()), partly to prepare for a conference talk on color. They describe the technical challenge of computing color proximity, noting that a naïve RGB Euclidean distance was inaccurate, so they settled on averaging it with normalized HSL differences, while welcoming improvements or a switch to DeltaE. The article also mentions the MIT-licensed color.js library, that exact 100% proximity isn't required to win, and the idea that such a tool could help the CSS WG evaluate the usability of proposed color notations.

Lea Verou··Lea Verou

Vote for me in the net awards 2014!

AI summaryThe author is a finalist in two categories of the 2014 net awards—Outstanding Contribution and Conference Talk of the Year for 'The humble border-radius'—and the CERN line mode browser project they were part of is nominated for Best Collaborative Project. They ask readers to vote for them and list multiple recordings of their talk, recommending the CSSDay version since it is the most recent. They thank everyone who nominated and voted for them.

Lea Verou··Lea Verou

Smooth state animations with animation-play-state

AI summaryThis article explains a technique for creating smooth CSS state-based animations, such as those triggered by :hover. Rather than applying the animation only on the state change—which causes the element to abruptly snap back to its original state when the state ends—the author recommends applying the animation from page load with animation-play-state: paused, then switching it to running on hover so the animation freezes in its last frame instead. The author discovered this approach while building a friend's one-page website and also shares side notes about rendering bugs in Firefox/IE and preferring SASS over LESS.

Lea Verou··Lea Verou

Simple script: Automatic talks list

AI summaryThe author open-sourced a simple script that automatically generates a talks list, created after growing tired of manually editing HTML following 50+ conference talks. Now they only need to edit a JSON file instead, and the script is easy to adapt to other purposes—just include the CSS and JS and add a list with a 'talks' class.

Elixir Blog··José Valim

Elixir v0.12.0 released

Elixir v0.12.0 is out with improved enumerables, build patterns and welcoming a new member to our team.

Elixir Blog··José Valim

Elixir v0.11.0 released

Elixir v0.11.0 is out and it focus on improving and optimizing the patterns often used by the community.

Mara Bos·

Compile time unit arithmetic in C++

AI summaryThe article builds on Bjarne Stroustrup's technique from Software for Infrastructure, which uses C++ templates to make the compiler aware of value units, allowing it to verify consistent usage and prevent disasters like NASA's 1999 unit-mixing error. The author extends this idea to support any number of base units and linearly related units (such as centimetres, metres, and inches) by teaching the compiler to perform arithmetic on units at compile time.

Andrew Kelley·

Do Not Use bodyParser with Express.js

AI summaryThe article warns that Express.js's bodyParser middleware creates temporary files on disk for every multipart request, even on endpoints that don't handle uploads, allowing attackers to exhaust disk space and crash the server. It presents several mitigations, including manually deleting temp files, scheduling cleanup utilities like tmpwatch or reap, using the defer option, or parsing uploads directly with modules like multiparty, busboy, parted, or formidable. The recommended approach is to avoid the deprecated bodyParser and instead explicitly use only the middleware needed, such as express.json() and express.urlencoded().

Andrew Kelley·

JavaScript Callbacks are Pretty Okay

AI summaryThe author argues against recent criticism of JavaScript callbacks, claiming they are perfectly workable if you follow two simple rules of thumb: avoid nontrivial anonymous functions and place all function declarations after the synchronous code that does the actual work. Through examples refactoring deeply nested callback code, the author shows these rules make async JavaScript easy to read. The article also argues that the downsides of compile-to-JS languages—such as reduced contributions, harder code evaluation, and added build steps—often outweigh their benefits.

Andrew Kelley·

I am not a "JavaScript Developer".

AI summaryThe author objects to being labeled a "JavaScript Developer" by GitHub and recruiters, explaining that JavaScript is just one of many tools he uses depending on the problem at hand. He describes himself as a generalist and problem solver who has built nontrivial projects across many languages and frameworks, and insists that if he must be called anything, it should be "Problem Solver" or "Software Developer" rather than being defined by a single technology.

Andrew Kelley·

7dRTS Game Reviews

AI summaryThis article is a one-person review guide to 7dRTS (7-day real-time strategy) games, sorting them into categories ranging from must-play titles like Chess Play, Holo Wars, and Pillagers!, to games that are merely worth a look, not yet playable, or impossible to run. The reviewer praises entries with simple, polished gameplay, good tutorials, and browser accessibility, while criticizing overly difficult, unfinished, or glitchy games. Many titles couldn't be tested at all because the review was done on a Linux system and those games required Windows, .NET, or the Unity web player.