week 09, 2020

Unicode HOWTO

This HOWTO discusses Python’s support for the Unicode specification for representing textual data, and explains various problems that people commonly encounter when trying to work with Unicode.

Source: Unicode HOWTO.

PDF Syntax 101

Everything about the structure of a PDF is covered in the PDF Specification, although sometimes the PDF spec might be a bit vague, or the actual behavior, even in Adobe’s products, might differ slightly in the actual implementation. So when parsing a PDF, you’ll need to adjust for some edge cases and parse some things loosely, so as to not strictly reject everything that varies from the spec.

Since PSPDFKit already handles parsing and interpreting PDF files, even in the weirdest of edge cases, you don’t have to manually handle PDFs. But if you’re still interested in how a PDF looks under the hood and how the visual page representations are created, (be my guest and) read on.

Source: PDF Syntax 101, an article by Stefan Kieleithner.

Understanding Git Conceptually

The conclusion I draw from this is that you can only really use Git if you understand how Git works. Merely memorizing which commands you should run at what times will work in the short run, but it’s only a matter of time before you get stuck or, worse, break something.

Half of the existing resources on Git, unfortunately, take just that approach: they walk you through which commands to run when, and expect that you should do fine if you just mimic those commands. The other half does go through all the concepts, but from what I have seen, they explain Git in a manner that assumes you already understand how Git works.

This tutorial, then, will take a conceptual approach to Git. My goal will be, first and foremost, to explain the Git universe and its objectives, and secondarily to illustrate how to use Git commands to manipulate that universe.

Source: Understanding Git Conceptually, an article by Charles Duan.

Who cares about Emacs?

There are so many options for robust text editors now, many of which have iterated upon Emacs' ideas and traditions, that you may well wonder whether GNU Emacs is still relevant.

Source: Who cares about Emacs?, an article by Seth Kenlon.

Early Impressions of Go from a Rust Programmer

I've been using Go for the past few weeks. It's my first time using Go for a large (-ish), serious project. I've previously looked at Go a lot and played with examples and toy programs when researching features for Rust. Real programming is a very different experience.

I thought it would be interesting to write about my impressions. I'll try and avoid too much comparison with Rust, but since that is the language I'm coming from, there will be some. I should declare in advance a strong bias for Rust, but I'll do my best to be objective.

Source: Early Impressions of Go from a Rust Programmer, an article by Nick Cameron.

Choosing a Programming Language

Let me start by stressing that I don't think there's one language suitable for all tasks, and probably there won't ever be one. In a typical workweek I seldom program in fewer than three different languages. The most difficult question I face when starting a new project is what language to use. Factors I balance when choosing a programming language are programmer productivity, maintainability, efficiency, portability, tool support, and software and hardware interfaces.

Source: Choosing a Programming Language, an article by Diomidis Spinellis.

What I learned going from prison to Python

Less than a year ago, I was in San Quentin State Prison serving a life sentence.

In my junior year in high school, I shot a man while robbing him. Now, it took a while for me to see or even admit that what I did was wrong, but after going through a jury trial and seeing the devastating consequences of my actions, I knew that I needed to make a change, and I did. And although it was a great thing that I had changed, I had still shot a man and nearly killed him. And there are consequences to doing something like that, and rightfully so. So at the age of 18, I was sentenced to life in prison.

Source: What I learned going from prison to Python, an article by Shadeed "Sha" Wallace-Stepter.

Why operators are useful

There's been a lot of discussion about an operator to merge two dicts. I participated in the beginning but quickly felt overwhelmed by the endless repetition, so I muted most of the threads.

But I have been thinking about the reason (some) people like operators, and a discussion I had with my mentor Lambert Meertens over 30 years ago came to mind.

Source: Why operators are useful, an article by Guido van Rossum.

Early Riser or Night Owl

Some people are early risers, wide awake at the crack of dawn. Others are night owls who can’t seem to get to bed until well after midnight and prefer to sleep in. Why is this? An NIH-funded team has some new clues based on evidence showing how a molecular “switch” wired into the biological clocks of extreme early risers leads them to operate on a daily cycle of about 20 hours instead of a full 24-hour, or circadian (Latin for “about a day”), cycle.

Source: Early Riser or Night Owl? New Study May Help to Explain the Difference, an article by Dr. Francis Collins.

Implement With Types, Not Your Brain!

When asked about the virtues of Haskell’s strong type system, most people will say the best part is that it lets you refactor with a zen-like tranquility, or that it stops your program from crashing at runtime. I mean, those are both great. But my favorite part is that having a strong type system means I don’t need to use my brain to do programming.

Source: Implement With Types, Not Your Brain!, an article by Sandy Maguire.

Staelduinse Forest

Today we visited the Staelduinse Bos (Staelduinse Forest), a small forest close to where we live.

Common snowdrop flowering
Common snowdrop, Galanthus nivalis, flowering.
Trees against a blue sky
Trees against a blue sky.
Moss growing on branches of a hedge
Moss growing on branches of a hedge.
Alice, John, and Adam
Alice, John, and Adam in front of a tree with bracket fungus. Photo taken by Esme.
Adam posing in front of a tree with large roots
Adam posing in front of a tree with large roots. Photo taken by Esme.