Graph Neural Networks were introduced back in 2005 (like all the
other good ideas) but they started to gain popularity in the last 5
years. The GNNs are able to model the relationship between the nodes
in a graph and produce a numeric representation of it. The
importance of GNNs is quite significant because there are so many
real-world data that can be represented as a graph. Social networks,
chemical compounds, maps, transportation systems to name a few. So
let’s find out the basic principles behind GNNs and why they work.
Tips on reading and debugging other programmers' code
Most IT firms where I worked as programmer were IT services
industry, there was very little greenfield work and most of the time
we had to maintain/fix code written by other engineers who couldn't
even be found in some cases!
As a result, reading and debugging existing code was something we
had to adapt ourselves to. Based on my experience, this is a brief
overview of how the process generally works and some tricks to make
your life easier:
Interfaces in Go are a topic that tend to trip up people coming from
a variety of languages like Java or C#. The oddest thing about them
is probably that interfaces are implicit rather than explicit . So
whereas in most languages there is some type of syntax or a keyword
to say you’re implementing an interface, there’s no such thing in
Another difference is that good interfaces in Go should be small —
they should contain only a few methods. I know how tempting it is to
just add one more method to an interface, and have them grow
organically like that. This does create some downsides in terms of
having others use your interface and refactor work if you change
What if you did not have millions of colors at your disposal? Think
about older devices, printers (both 2D and 3D), or printing presses
making giant posters of your favorite movie. You may also want to
reduce your color palette to reduce the memory usage.
What you need is some sort of mapping, that maps the pixel with 16
million possible colors, to say 8 possible colors. Intuitively, the
best approach would be to figure out which of the 8 colors is most
similar to the pixel's color and use this similarity for mapping.
Sometimes it's not humanly possible to inspect or modify data
structures manually in a debugger because they are too large or
complex to navigate. Think of a linked list with hundreds of
elements, one of which you need to locate. Finding the needle in the
haystack is only possible by scripting the debugger to automate
Dan Abramov’s excellentGoodbye, Clean
Code post (wherein he
learned it was wise to walk back an overzealous refactoring)
reminded me of something Dave Thomas
said when we
interviewed him and Andy Hunt about the Pragmatic Programmer’s 20th
We’ve also looked at the reaction to various parts of the book, and
discovered that we weren’t really communicating as well as we thought
we were some of the ideas that we had. A classic one is DRY. DRY has
come to mean “Don’t cut and paste”, but the original “Don’t repeat
yourself” was nothing to do with code, it was to do with
knowledge. So we’ve had to go through and update that… [🎧]
In the late afternoon I finished Dark
the fifth book in the Red Rising series by Pierce Brown. I was
disappointed by this book; especially because book four in this
The book got better about half way; good enough to look forward to the
next one in the series, which I hope will be more like Iron Gold or
Red Rising. But overall; barely an OK.
The Museum of Desire
LAPD Lieutenant Milo Sturgis has solved a lot of murder cases. On
many of them—the ones he calls “different”—he taps the brain of
brilliant psychologist Dr. Alex Delaware. But neither Alex nor Milo
are prepared for what they find on an early morning call to a
deserted mansion in Bel Air. This one’s beyond different. This is
predation, premeditation, and cruelty on a whole new level.
In the late afternoon I started in the 35th book in the
Alex Delaware series by Jonathan Kellerman: The Museum of Desire.
Create a macOS Menu Bar App with Python
On my Mac, I use the menu bar countless times per day. In this post
we will go through the process of creating a custom macOS menu bar
app using Python. As an example, we will create a 🍅
which you can use to boost your productivity and manage your time
from the convenience of your menu bar.
Unexpected Places You Can And Can’t Use Null Bytes
The traditional way of representing strings in C is using
C library methods like strcpy, printf, etc. detect how long strings
are by sequentially scanning memory until a null byte is found. This
complicates situations where the string data itself should contain
literal null bytes. Generally this doesn’t mean that it’s impossible
to use strings with embedded null characters, just that you have to
be more careful when doing so. Typically this is done by using
methods that explicitly specify the length of strings.
There seem to be many opinions surrounding clean code. Some people
have an entire architecture of how code should look. Others stick to
the actual layout of the code, or length of a class while even
others vaguely point towards Robert C. Martin’s books.
One thing is clear; it’s something that’s really on a lot of
developers mind. Clean code makes projects more comfortable to work
with and improves shelf life. It’s the antagonist of vile legacy
codebases that are unmaintainable.
Then why does business always treat it as a secondary objective? Do
they just don’t get it?
One of the most important skills I believe programmers need is to
understand when to use certain tools. My typical process for solving
a problem is to go through each tool in my toolbox and see which one
would solve the problem the best. Over the past few years, I’ve
worked on systems that process 100s of billions of data points. In
doing so, I’ve added a number of tools to my personal toolbox.
When you are faced with a huge task, what do you usually do? Well,
if you’re a little bit like me, then you split it into smaller
chunks, complete them individually and later combine into a bigger
one. This exact approach is used by Merge Sort. Following article
will cover its implementation with detailed explanation, including a
study of dreadful (not really) recursion. Ready?