Kirsle.net logo Kirsle.net

Welcome to Kirsle.net!

This is the personal homepage of Noah Petherbridge, and it's where I keep my web blog and various creative projects.

I blog about anything I find interesting, and since I have a lot of varied interests, my blog entries are kind of all over the place. You can browse my tags to sort them by topic and see which ones I frequently write about, or the archive has a complete history of my posts, dating back to 2008!

Besides my blog, I have pages for my creative projects, which are linked to on the navigation bar.

I write a lot about Linux and Android, Minecraft, and I like to rant about stuff. Generally anything that makes me curious.

For the geeks: this website respects your privacy and doesn't run any third party ads or analytics. This site speaks HTTP and doesn't require any JavaScript to work.

Time Zones
August 3, 2018 by Noah

Probably one of the most frustrating things to deal with as a software developer is time. Specifically time zones and daylight savings time and all that nonsense. Tom Scott has a video about it but I have a recent story of my own.

This week at work, we lost about two days of effort trying to make our web application timezone-aware. Apparently, time zones are so ridiculously complicated, that it's basically impossible to store a time with an arbitrary time zone in your database while remembering what the time zone is.

Don't believe me?

The web stack in this story involves JavaScript, Python and PostgreSQL, with PostgresSQL's problems being applicable to any backend stack.

Read more...

Tags: 0 comments | Permalink
Vanilla RiveScript
July 16, 2018 by Noah

I got this e-mail today about RiveScript and thought my response would be good for a general audience as well.

Orion asked:

Hello Noah i want to know...

  1. What is Vanilla Rivescript?
  2. What can Vanilla Rivescript do?
  3. How can i install or use Vanilla Rivescript?

Read more...

Tags: 0 comments | Permalink
Globally Recover Panics in Go
June 22, 2018 by Noah

In the past, I had been tasked to update some Python web apps to have them send e-mails out whenever they run into an uncaught Exception in one of our endpoints. This way we could identify any runtime errors in production and fix them.

In Python it was pretty easy: our web framework, Flask, provides a way to catch any error that happens in any of your HTTP routes. Even if you didn't use Flask, you can set sys.excepthook to a function and catch exceptions globally whenever other code failed to.

But then we had an app written in Go and it needed to have this feature, too. If it were simply a web service, this wouldn't have been bad, but this particular service listened on both an HTTP port and a separate TCP port in another goroutine.

Catching HTTP panics in middleware (or the standard net/http library, which catches panics itself) doesn't do anything to help catch the panics thrown by the TCP server. So, like sys.excepthook, I needed to find a way to globally catch panics in my app.

This was surprisingly very hard to do.

Read more...

Tags: 0 comments | Permalink
Life, the Universe, and Everything
June 8, 2018 by Noah

Earlier this year, I had a sort of existential curiosity and started researching and thinking a lot about the nature of reality, what all this stuff is made of, and so on.

Thinking too much about it started leading me to a mild case of depersonalization/derealization syndrome ("living in the Matrix", or, as some people on the subreddit put it: it's like seeing a spot on the window and suddenly becoming aware of the window, instead of just looking through it). You know, when real life starts to feel a bit "fake" like a dream and it's hard to un-see that once you've seen it.

So I've reeled in my curiosity for a while and gotten back to normal, but before I forget about all the crazy things I learned, I decided to write it all down in my blog. I'll try and fill this post with links to resources I found interesting along the way.

This post discusses topics of spirituality, philosophy, and maybe some metaphysics. For background, I was born and raised Baptist, turned atheist in my teenage years when the religion conflicted with my sexuality, and have come half a circle again and would call myself "spiritual." All man-made ideas of God are probably utterly wrong, but there's gotta be something to it all. This blog post therefore also sums up my personal beliefs, from the core idea that I'm most confident about and getting less and less sure as it goes.

A lot of this stuff may draw parallels from Buddhism or such. I don't know about any of that, but I have noticed a lot of parallels to all the religions. We're all talking about some of the same basic stuff here, in our own ways.

tl;dr.: Consciousness Is Everything

To summarize, short and sweet:

Consciousness Is Everything. All that exists in the universe is consciousness. Matter comes from consciousness, and we are all experiencing reality as though it were a dream. The brain does not create consciousness; consciousness creates the brain.

In the following sections I'll describe the first few resources that got my curiosity going.

Read more...

Tags: 2 comments | Permalink
Engaged
May 31, 2018 (updated June 1, 2018) by Noah

Last Sunday, at Lightning in a Bottle, I asked my boyfriend fiancé to marry me.

He said yes!

edited: added another picture.

Read more...

Tags: 0 comments | Permalink
I Migrated from LastPass to KeePass
March 29, 2018 (updated June 1, 2018) by Noah

Today I finally migrated away from using LastPass as my password manager and am instead going to use KeePass. My reasons were the following:

  1. I don't want a browser extension being responsible for my password manager, as the security surface area of a browser extension is unknown.
  2. The usability of LastPass's extension for Firefox has been declining. They removed the ability to "Copy Password" which makes logging in to some sites, like Amazon AWS, a royal pain in the ass.
  3. LastPass is closed source and is a black box and it does weird things, like not ask me for my password often enough, and I have no idea what it keeps available in memory for malicious apps to get into.
  4. I want to keep my things off the cloud where I can.

In this post I'll share my experience with migration, complaints about LastPass and how my current setup looks for syncing my passwords between my phone and computers.

Updated (6/1/18): Syncthing is a good way to synchronize a KeePass DB between my phone and computers.

Read more...

Tags: 0 comments | Permalink
Withdrawing from Social Media
March 24, 2018 by Noah

This has been a rough week for Facebook with all the Cambridge Analytica drama, and it's as good a time as ever for me to start withdrawing from Facebook and other social media.

Announcing that you're going to #DeleteFacebook, on Facebook, is cliche af so I'm not going to do it there. This week I've been wiping my Facebook profile clean (not that deleting posts actually deletes anything from their database) and all that remains, currently, is one profile picture, a cover picture, and a Keybase verification post that, of course, I don't mind being public. After I find out alternative messaging options for some of the friends I enjoyed chatting with on Messenger, I'll delete the account.

Facebook's drama isn't the only crazy thing I heard about this week, though: there's also the CLOUD Act, and it is far worse.

Read more...

Tags: 2 comments | Permalink
script.go: Run Go Programs as Shell Scripts
January 7, 2018 by Noah

Have you ever wanted to use Go to write shell scripts?

Where you could put a "shebang" line like #!/usr/bin/env go, mark your source file executable, and run it?

I've found a pretty elegant way of making this possible, all in pure Go!

tl;dr.

To write your own Go scripts, just include this shebang header (vim modeline optional). Your shell script does not need a *.go extension. In fact you're better off not having a *.go extension!

///bin/true && exec /usr/bin/env script.go "$0" "$@"
// vim:set ft=go:

And then put this file, script.go, in your $PATH and make it executable:

Read more...

Tags: 0 comments | Permalink
Kirsle.net in Go
December 24, 2017 by Noah

As of a few minutes ago, I've swapped out the Python backend of Kirsle.net with a new Go backend that I've been rewriting from scratch the past few months.

The Go codebase is a little rough around the edges and I'll be refactoring it over time. This is the first blog post on the new platform, so let me tell you about my open source Go blog!

Read more...

Tags: 1 comment | Permalink
Apps composed of open source pieces
September 15, 2017 by Noah

The Internet is full of freely available source code. If you're a software engineer and you're writing a new application, chances are a lot of the code you're writing has already been written thousands of times before by other engineers that came before you.

Some engineers seem to believe you can compose an entire complicated app just by mixing and matching tiny pieces already written before you. Pull a session manager from here, a template engine from there... a login manager, a password manager, a database accessor... all of these being small off-the-shelf components that you're trying to duct tape together into one coherent app. The actual code you as a developer write is just the few lines needed to stitch these all together. You'll have a production-ready app running in just a few minutes!

Sure, but in my career as a software engineer I've learned that it's usually better to write all those pieces yourself so that they fit together perfectly how you want, not just "good enough."

This is a story of a particularly annoying Python module I was dealing with at work.

Read more...

Tags: 0 comments | Permalink