Alice and the red cat
On our way to my mother's house we encountered a red cat. Alice walked towards it and started to pet it.
On our way to my mother's house we encountered a red cat. Alice walked towards it and started to pet it.
If it’s one thing that almost all programs have in common is that they will, at some point, encounter some form of error. While some errors might be the result of bugs and failures caused by faulty code, incorrect assumptions, or system incompatibilities — there are also multiple kinds of errors that are completely normal, valid parts of a program’s execution.
One challenge with such errors is how to propagate and present them to the user, which can be really tricky, even if we disregard tasks like crafting informative and actionable error messages. It’s so incredibly common to see apps either display a generic ”An error occurred” message regardless of what kind of error that was encountered, or throw walls of highly technical debugging text at the user — neither of which is a great user experience.
So this week, let’s take a look at a few techniques that can make it much simpler to propagate runtime errors to our users, and how employing some of those techniques could help us present richer error messages without having to add a ton of complexity within each UI implementation.
Source: Propagating user-facing errors in Swift, an article by John Sundell.
I’ve been using Ubuntu as my primary home desktop OS for the past year and a half, so I thought it would be a good time to write up my experiences. Hopefully this will be interesting to other web developers who are currently using Mac or Windows and may be Linux-curious.
Source: Linux on the desktop as a web developer, an article by Nolan Lawson.
Learn Vimscript the Hard Way is a book for users of the Vim editor who want to learn how to customize Vim.
It is not a guide to using Vim. Before reading this book you should be comfortable editing text in Vim and know what terms like "buffer", "window" and "insert mode" mean.
Source: Learn Vimscript the Hard Way, an online book by Steve Losh.
JavaScript moves variables and functions declaration to the top of its scope during execution. This behaviour in JavaScript is called Hoisting.
Source: JavaScript: Variable Hoisting, an article by Karthik Vasudevan.
Since its start, Python’s grammar has been LL(1): it needs only a left-to-right parser that looks one token ahead to resolve ambiguities. The standard CPython parser is produced by a simple custom parser generator. There are some costs to this simplicity, however.
Source: Replacing CPython’s parser, an article by A. Jesse Jiryu Davis.
Python's asyncio gets a fair bit of bad press. Some of it I agree with, but there is one aspect I like about it: the API needed for a lot of common tasks is actually fairly small and clear.
Source: I admit it: I like Python's asyncio, an article by Michal Charemza.
To really understand ZFS, you need to pay real attention to its actual structure. ZFS merges the traditional volume management and filesystem layers, and it uses a copy-on-write transactional mechanism—both of these mean the system is very structurally different than conventional filesystems and RAID arrays. The first set of major building blocks to understand are
zpools
,vdevs
, anddevices
.
Source: ZFS 101—Understanding ZFS storage and performance, an article by Jim Salter.
A streak is when several events happen in a row consecutively. In this post, we’re going to be working with NBA shot data and looking at players who made or missed a number of shots in a row. That said, streaks can take many forms. You can just as easily use this technique to detect and measure other streaks like consecutive days logging in to an app or website.
Source: Calculating Streaks in Pandas, an article by Josh Devlin.
Graph Deep Learning (GDL) is an up-and-coming area of study. It’s super useful when learning over and analysing graph data. Here, I’ll cover the basics of a simple Graph Neural Network (GNN) and the intuition behind its inner workings.
Source: An Illustrated Guide to Graph Neural Networks, an article by Rishabh Anand.
We discuss a little-known gem for data analytics — Benford’s law, which tells us about expected distribution of significant digits in a diverse set of naturally occurring datasets and how this can be used for anomaly or fraud detection in scientific or technical publications.
Source: What is Benford’s Law and why is it important for data science?, an article by Tirthajyoti Sarkar.
You have probably come across big O notation before. Maybe you have read that merge sort is better than insertion sort because merge sort is O(n log n) compared to insertion sort, which is O(n2). In this article, you'll understand what this means, and why this makes merge sort the better algorithm.
Source: A Guide to Big O notation, an article by Erik André Jakobsen.
Mr. Robot is an amazingly accurate series about a hacker (Elliot Alderson) and his, uhm, undertakings. The series is consulted by many cybersecurity experts and so every hack that happens is actually properly executed, using real tools and commands that do exactly what an infosec expert would expect.
Source: Six Things I Learned from Mr. Robot an article by Bozhidar Bozhanov.
A
symbol
is a primitive data type introduced in ES6. It's created withSymbol
function and globally unique. Symbols can be used as object properties to provide uniqueness level access to objects and as hooks into built-in operators and methods, enabling us to alter the default behavior of JavaScript.
Source: JavaScript magic with Symbols, an article by Marko Marinovic.
Recently, I started to customize my Git configuration to fit my workflow. I’ve found a few configurations that should be the default for anyone who installs Git.
Source: Three Git Configurations that Should Be the Default, an article by Andy Peterson.
The editor war between users of the vim editor and the Emacs editor exists since decades. Here is my comment on that as somebody who is using vim and GNU/Emacs intensive on a daily basis.
In my opinion, the most dominant advantage of Emacs is that it's not just an editor: it's a LISP interpreter and thus a very capable highly dynamic platform.
Source: Emacs is Not Just An Editor, an article by Karl Voit.
JSON is probably the most used standard file format for storing and transmitting data on the internet in recent times. Though it was historically derived from JavaScript, it is a programming language independent format and is now supported by almost all languages. JSON has a simple syntax specification with only four scalar data types and two composite data types. So, writing a parser for JSON is a great exercise for learning the basics of parsing. Let’s write one from scratch in Haskell.
Source: JSON Parsing from Scratch in Haskell, an article by Abhinav Sarkar.