Yesterday I managed to get on the first page of Hacker
News with a link to tumblelog on
GitHub: Show HN: Static blog generator in about 1
KLOC. In the past I
had submitted tumblelog more than once but didn't get much upvotes,
sometimes none at all. But the magic word KLOC (kilo lines of code)
and maybe the submission time did the trick.
I did manage to get on position 17 on the front page. At least that's
what I know. So what has been the effect of this? At the time of
writing according to GitHub:
1,755 Unique visitors.
Three clones.
Number of stars went from 49 to 68.
The number of visitors I have is normally a few a day, so the effect
was very significant on the number of visitors. I am very happy with
the increase in the number of stars, thanks everyone who voted!
I hope that this will result in people using tumblelog for their
blog. And hopefully also some feedback.
Charles G. pointed out in an email discussion recently:
Lisp still doesn't seem like the right language for doing text
manipulation, and nothing I've seen from the Emacs libraries is
making me think any differently. It sure beats the hell out of Java
though. Maybe someday someone will write Emacs using Ruby as the
embedded interpreter...
These are all great points. I know exactly how he feels. I know
soooo exactly how Charles feels that I decided to write a blog
instead of an email reply. Because all the things he's brought up
are real, bona-fide problems.
When I teach beginners to program and present them with code
challenges, one of my favorite follow-up challenges is: Now solve
the same problem without using if-statements (or ternary operators,
or switch statements).
iPads, which is to say any iPad made in the last three years (yes,
even the base models) has more than enough power to run development
tools and compile most codebases you would care to. The more recent
iPad Pro models even give modern Core i9 laptops a run for their
money in some metrics.
Why then do we not see development tools on the iPad? Or at least,
why do we not see more of the development tools we’re used to seeing
on the platform. The reason, unfortunately, is iPadOS.
cgit is very bare bones. It is
cgi web interface interface
to git, and nothing more. You may browse repositories, view diffs,
commit logs and even clone via http. If you are looking to replace
Github with cgit, keep in mind that cgit does not handle issues or
pull/merge requests. If people wish to contribute to your work, they
would have to send you a patch via email.
In the evening I finally released an updated version of tumblelog; a
static blog generator that comes in two versions: a version written in
Perl and a version written in Python. I use mostly the Perl version to
generate Plurrrr but now and then run the Python version to verify
it generates the same output given the same input.
Next I used perlcritic version
1.138
to critique the Perl version of tumblelog. Several of the issues
found were fixed.
Last, but not least, I factored out the font stacks of all styles
into a separate _fonts.scss file and used stylelint version
13.7.2 with a custom .stylelintrc.json to
clean up the styles for tumblelog.
Version 4.1.0 of tumblelog is available on
GitHub. As always feedback
is very welcome.
In the early afternoon I listened to a new track by
Pixies; a cover version
of T. Rex's Mambo Sun. While it's a catchy tune I do miss the days
of Surfer Rosa/Come On Pilgrim and Doolittle.
The context of 2020 is what makes iOS and iPadOS 14 so fascinating
and, to a certain extent, fun to review. On one hand, we have two
major OS updates that may or may not have been impacted by the
global pandemic in their focus on fewer groundbreaking additions and
more consistent improvements across built-in apps; on the other,
just like any other year, we have a suite of overarching themes and
potential implications to dissect.
But for all those users still pausing over that ‘Install’ button,
pondering whether updating their most important communication and
work-from-home devices is worth it, there’s only one consideration
that matters:
This is the first post in a series to expand on various utilities I
wrote to assist my work with Git. Some of these utilities are
located in a repository on Github called
misc-gitology.
Today I'll introduce the history flipper - git-flip-history.
PCG is a family of simple fast space-efficient statistically good
algorithms for random number generation. Unlike many general-purpose
RNGs, they are also hard to predict.
Container security is a broad problem space and there are many low
hanging fruits one can harvest to mitigate risks. A good starting
point is to follow some rules when writing Dockerfiles.
I’ve compiled a list of common security issues and how to avoid
them. For every issue I’ve also written an Open Policy Agent (OPA)
rule ready to be used to statically analyze your Dockerfiles with
conftest. You can’t shift more left than this!
When writing tests, I prefer to avoid mocks as much as possible and
rely on fake implementations instead. They require a bit of
additional upfront investment, but provide many practical advantages
which are important to consider.
In this article we will look at the differences between these two
variants of test doubles, identify how using one over the other
impacts test design, and why using fakes often results in more
manageable test suites.
Git is not a success story. Git is a failure as a system with a crap
user experience that forces you to learn more about the tool you're
using that about getting your work done.
From 0 to 90k impressions in about a year, following Search
Engine Optimization good practices was key to help to grow
my blog and my audience. However, when I started it, I made
terrible mistakes that some SEO literate people could almost
qualify as self-sabotage.
Programming languages make websites feel alive, but at the core of
every web page stands the good old HTML. When we discuss layouts, we
must consider factors that make a good layout: responsiveness,
viewing ports, display devices, browsers, and users’ screen sizes. A
great layout not only looks great but can preserve the original
intent by fitting in every possible display ratio. This correction
is produced through CSS. In this article, we will examine two
powerful properties: CSS Flexbox and CSS Grid.
Functional inheritance is the process of inheriting features by
applying an augmenting function to an object instance. The function
supplies a closure scope which you can use to keep some data
private. The augmenting function uses dynamic object extension to
extend the object instance with new properties and methods.
Functional mixins are composable factory functions that add
properties and behaviors to objects like stations in an assembly
line.
Through work I have to deal with a pretty huge codebase, and run
Pylint on it during our continuous integration process. It's always
been a bit slow, but recently I also noticed that it was consuming a
lot of memory, causing OOM failures if we tried to run it too much
in parallel.
I decided to roll up my sleeves and figure out:
What exactly was consuming so much memory?
Is there a way to avoid doing this?
This is a log of how I went about these two questions, as future
reference for when I do other profiling work in Python.
The era of USB-C has come. The other day I threw all other cables
into a box, and bought a set of USB-C to USB-C, Lightning, and
microUSB cables. USB-C chargers around the house, USB-C PD power
bank, even a nice small USB-C dock that works with the Nintendo
Switch if the charger can do the right voltage. It's glorious.
Only one thing won't charge with USB-C, my awfully cheap ($190 for
4GB of RAM) Samsung Chromebook 3, a machine I use when I want the
extra security of the Chrome OS platform. Instead, this laptop
charges from an old-school 12V barrel connector, forcing me to carry
around an extra brick. 😢
Over the last couple years, Git has become a default part of almost
every developer's knowledge stack. But even though Git is so
well-known, there are many Git commands that are not.
In this short post, I'd like to show you seven little commands that
can help you become more productive and well-versed with Git. Let's
dive in.