<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

<title>Squid's Scribblings</title>
<link href="http://psquid.net/atom.xml" rel="self" />
<link href="http://psquid.net/" />
<updated>2026-02-19T08:33:18+00:00</updated>
<id>http://psquid.net/</id>
<author>
  <name>Psychedelic Squid</name>
</author>


<entry>
  <title>Is this thing still on?</title>
  <link href="http://psquid.net/2025/01/30/is-this-thing-on/" />
  <updated>2025-01-30T00:00:00+00:00</updated>
  <id>http://psquid.net/2025/01/30/is-this-thing-on</id>
  <content type="html">&lt;p&gt;So I may have slightly stopped updating this blog for over a decade. Ah well,
it happens.&lt;/p&gt;

&lt;p&gt;I don’t know if I’ll be posting to it any time soon, outside of this update,
but on the off chance someone is still subscribed to the Atom feed despite it
disappearing for years and years, hello again!&lt;/p&gt;

&lt;p&gt;This is also the first time the Jekyll version of this blog has been hosted
on my own server, since tying it into my NixOS server config gives me a nice
easy way to have it track updates to the repo.&lt;/p&gt;

&lt;p&gt;See you all around, possibly sooner than another decade from now!&lt;/p&gt;
</content>
</entry>

<entry>
  <title>Twas the night before the night before Christmas</title>
  <link href="http://psquid.net/2013/12/23/twas-the-night-before-the-night-before-christmas/" />
  <updated>2013-12-23T00:00:00+00:00</updated>
  <id>http://psquid.net/2013/12/23/twas-the-night-before-the-night-before-christmas</id>
  <content type="html">&lt;p&gt;And all through the house, not a creature was stirring - except for me,
generating &lt;a href=&quot;/gpg&quot;&gt;my new GPG public key&lt;/a&gt;, with finding a use for it being an
informal resolution for the future (not really a New Year’s resolution,
since I’d prefer to start before then if I find something).&lt;/p&gt;

&lt;p&gt;Feel free to add it to your keyrings, or whatever your PGP client happens to
use, and I &lt;em&gt;will&lt;/em&gt; guarantee that if I &lt;em&gt;am&lt;/em&gt; using GPG at all, then that’s the
keypair I’ll be using, so in the unlikely event that someone tries to
impersonate me for whatever reason, they wouldn’t have that key, and you’d
know something was up.&lt;/p&gt;

&lt;p&gt;PSquid/Bit (depending on how you know me best :P) out!&lt;/p&gt;

</content>
</entry>

<entry>
  <title>Informal Analysis of an Unknown Algorithm</title>
  <link href="http://psquid.net/2013/06/19/informal-analysis-of-an-unknown-algorithm/" />
  <updated>2013-06-19T00:00:00+00:00</updated>
  <id>http://psquid.net/2013/06/19/informal-analysis-of-an-unknown-algorithm</id>
  <content type="html">&lt;p&gt;So, as of earlier today I’ve been working through the &lt;a href=&quot;https://www.udacity.com/course/cs215&quot;&gt;Algorithms course on
Udacity&lt;/a&gt;, and I wanted to work through the lesson 1 naive algorithm analysis
example in writing, so I could get a good grasp on the actual process of
analyzing it. Then I figured I might as well write it up a little neater so I
could actually publish it somewhere for posterity, and this blog post happened.&lt;/p&gt;

&lt;p&gt;I’d also like to preface this by saying yes, I’m aware people could potentially
(though I don’t think I get enough linking for it to be likely) use my analysis
and conclusion to “cheat” at the problem. And all I’ll say to that is… if
you’re just looking for the answer to the question, rather than trying to work
it out, you’re probably not going to get much out of the course.&lt;/p&gt;

&lt;p&gt;So, without further ado, let’s get stuck in.&lt;/p&gt;

&lt;p&gt;The code given for the algorithm itself is fairly simple:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;def naive(a, b):
    x = a
    y = b
    z = 0
    while x &amp;gt; 0:
        z = z + y
        x = x - 1
    return z
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So… what does it do?&lt;/p&gt;

&lt;p&gt;Well, first I’ll start by breaking it down into two chunks - initialization, and
then the main loop.&lt;/p&gt;

&lt;p&gt;The initialization is simply setting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt; as variables initially
duplicating the values of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&lt;/code&gt; (and is pretty much useless in real
terms, since Python passes ints by value, but that’s irrelevant to the
analysis), and adds a new variable &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z&lt;/code&gt;, which starts out as 0.&lt;/p&gt;

&lt;p&gt;The loop is the real meat of the algorithm, and it does two things:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It increments &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z&lt;/code&gt; by the value of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;It decrements &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; by 1.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also runs only while &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; is greater than 0 - combining this with
decrementing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; by 1, and nothing else changing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;, this means we know the
loop body will run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; times.&lt;/p&gt;

&lt;p&gt;Since &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; is never used to directly modify &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z&lt;/code&gt;, we can now ignore it beyond
remembering that it’s the number of iterations of the loop. That means that in
practical terms, the loop’s only effect is to increment &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z&lt;/code&gt; by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt; each time
it runs.&lt;/p&gt;

&lt;p&gt;Since &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt; never changes, this means &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; times, we increment &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z&lt;/code&gt; by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;.
Or, in other words, it is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(x * y)&lt;/code&gt; more than when we started.&lt;/p&gt;

&lt;p&gt;Finally, since &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z&lt;/code&gt; starts as 0, its final value is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0 + (x * y)&lt;/code&gt;, where
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; is the original &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;, or to simplify, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z = x * y&lt;/code&gt;. Since the original
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt; were equal to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&lt;/code&gt;, the algorithm’s purpose is to
multiply &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;(Thanks for reading, if you got this far without boredom. I’d be interested to
hear if anyone found this post interesting, and especially if anyone would like
to see me step through similar processes when I run into them.)&lt;/p&gt;

</content>
</entry>

<entry>
  <title>The Curse of Microblogging?</title>
  <link href="http://psquid.net/2012/02/28/the-curse-of-microblogging/" />
  <updated>2012-02-28T00:00:00+00:00</updated>
  <id>http://psquid.net/2012/02/28/the-curse-of-microblogging</id>
  <content type="html">&lt;p&gt;&lt;em&gt;This is something more of a ramble than a clearly-directioned post. As such, you may wish to skip over this one, as it’s likely to end up somewhat less useful to others. I’m writing it mostly to get it out of my mind.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Lately, I’ve been wondering just why it is that I don’t often post to my blog (recent times have been something of an exception). It seems to me there are two possible explanations.&lt;/p&gt;

&lt;p&gt;The first is that I’m simply not doing that much of interest. This would be a sorry state of affairs indeed, and one that I make efforts to avoid; there seems little point to a life spent on the mundane alone.&lt;/p&gt;

&lt;p&gt;The second possibility is that I simply don’t have much more to say than I’ve already offloaded via microblogging; in my case, that would be on status.net. This one seems, on examination, to be the more probable cause, especially given how frequently I post (it varies a little, but it’s reliably more often than once an hour when averaged over an entire day; allowing for sleep, it would be more frequent).&lt;/p&gt;

&lt;p&gt;So, armed with that knowledge, I’m now wondering what the best approach is:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;I could abandon my blog, but as my more recent posts have shown, there are still subjects I want to get across that can’t adequately be tackled in ~140 characters. Also, I have something of a sentimental attachment to the domain name, and I have no real use for it as a generic landing page.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I could abandon microblogging. This is essentially a non-starter, however, as there are plenty of people I converse with on status.net that simply aren’t anywhere else I go.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The nuanced approach: continuing to microblog, but also posting summaries (of sorts) of larger subjects here. This does entail some duplication of effort, but I feel the more long-lasting nature of a blog post would be a boon for many things that otherwise just cascade off into the past if limited to a microblog timeline. The act of writing some things again may also give me a change to reevaluate details of them, I suspect.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While I’m unsure whether any of this has any strong grounding in fact, I think the third approach is a good direction to strive for in future, so I’ll be making efforts to adopt it as a habit. Wish me luck. :)&lt;/p&gt;
</content>
</entry>

<entry>
  <title>OpenID and Status.net</title>
  <link href="http://psquid.net/2012/02/21/openid-and-statusnet/" />
  <updated>2012-02-21T00:00:00+00:00</updated>
  <id>http://psquid.net/2012/02/21/openid-and-statusnet</id>
  <content type="html">&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: &lt;em&gt;This post is still marginally relevant to OpenID in general, but the status.net instance in question is defunct.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Today I discovered something cool about status.net, that I hadn’t known before. Namely, that you can delegate your &lt;a href=&quot;https://openid.net/&quot;&gt;OpenID&lt;/a&gt; to it. I already had an OpenID identity referenced in my site, but it delegated to Google, which had two problems:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It wasn’t linked to any one account, so services I logged into would tend get confused if I was logged into a different Google account.&lt;/li&gt;
  &lt;li&gt;It would often forget I was logged in, even if other Google services stayed logged in just fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Luckily, it turns out that not only can a status.net profile (such as &lt;a href=&quot;http://micro.fragdev.com/psquid&quot;&gt;mine&lt;/a&gt;) be used as the OpenID endpoint I delegate to, but the markup necessary is already present in the profile source itself, so you don’t even have to remember the little details of the syntax.&lt;/p&gt;

&lt;p&gt;The markup you’re looking for are the two &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;link&amp;gt;&lt;/code&gt;s with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;openid.*&quot;&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rel&lt;/code&gt; fields (there are also some openid2 fields in there, but those are largely irrelevant for the purposes of this post), so in my case that would be these two lines:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; &amp;lt;link rel=&quot;openid.server&quot; href=&quot;http://micro.fragdev.com/main/openidserver&quot; /&amp;gt;
 &amp;lt;link rel=&quot;openid.delegate&quot; href=&quot;http://micro.fragdev.com/psquid&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can, of course, also just modify those directly to match your instance URL and username, if you don’t even want to open up your profile’s source.&lt;/p&gt;

&lt;p&gt;With those replicated in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of this site’s pages, I simply provide “psquid.net” as my OpenID when a site asks for it, confirm the login with Fragdev if I’ve never used that site before, and then all is good. No random profiles, no unexplained logouts. It just works exactly how it should.&lt;/p&gt;

</content>
</entry>

<entry>
  <title>The Joys of Jekyll</title>
  <link href="http://psquid.net/2012/02/14/the-joys-of-jekyll/" />
  <updated>2012-02-14T00:00:00+00:00</updated>
  <id>http://psquid.net/2012/02/14/the-joys-of-jekyll</id>
  <content type="html">&lt;p&gt;Time to dust off the old blog-o-phone again, I think.&lt;/p&gt;

&lt;p&gt;A little while ago, I &lt;a href=&quot;http://psquid.net/2011/06/22/ink-n-mustard/&quot;&gt;moved my blog to a blogging engine of my own design and
creation&lt;/a&gt;. And all was well and good. But after a while, I started to find
little things I didn’t like in my original solution, and gradually the entire
codebase devolved into a functioning, but crufty, relic. And I spent &lt;em&gt;far&lt;/em&gt; more
time working on the engine than actually writing any posts, which is toxic for
a blog, especially since 90% of code changes won’t result in any obvious visual
changes.&lt;/p&gt;

&lt;p&gt;So I started looking around for a solution that didn’t need me to maintain the
engine itself, but still had the features I wanted - namely:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Markdown (or Textile in a pinch, though I still prefer Markdown)&lt;/li&gt;
  &lt;li&gt;Complete control over page layout.&lt;/li&gt;
  &lt;li&gt;Version controllable&lt;/li&gt;
  &lt;li&gt;Ability to serve it from my own server a plus, but not a requirement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After a little searching, and based tangentially off &lt;a href=&quot;http://moggers87.co.uk/&quot;&gt;moggers87&lt;/a&gt;’s
recommendation of the very similar &lt;a href=&quot;http://ringce.com/hyde&quot;&gt;hyde&lt;/a&gt;, I settled on &lt;a href=&quot;http://github.com/mojombo/jekyll/&quot;&gt;Jekyll&lt;/a&gt;. It
satisfies the first two requirements &lt;em&gt;easily&lt;/em&gt;, and the third and fourth were
satisfied together by my decision to use &lt;a href=&quot;http://pages.github.com/&quot;&gt;Github Pages&lt;/a&gt; to host it (another
nice result of that is that you can &lt;a href=&quot;https://github.com/psquid/psquid.github.com&quot;&gt;see the source of any post exactly as I
wrote it&lt;/a&gt;). Since the output is just HTML and CSS, I &lt;em&gt;could&lt;/em&gt; also have
hosted it on my server, but I was going to use git to track it anyway, so
choosing &lt;a href=&quot;http://pages.github.com/&quot;&gt;Pages&lt;/a&gt; killed two birds with one stone.&lt;/p&gt;

&lt;p&gt;The much more relaxed visual style was born out of my growing distaste for the
old yellow/black colour-scheme, and my desire to keep the style as simple as
possible this time round.&lt;/p&gt;

&lt;p&gt;To sum things up: just from having imported my old posts (mostly
copy-and-paste, since they were already in Markdown on my old engine), and now
from having written this post, I can safely say that (as the title may well
have already told you), Jekyll is an absolute &lt;em&gt;joy&lt;/em&gt; to use. If you haven’t
tried it, I really can’t recommend enough that you go and do so right away!&lt;/p&gt;

&lt;p&gt;PSquid out.&lt;/p&gt;

</content>
</entry>

<entry>
  <title>Watching the Tumblrweed roll by</title>
  <link href="http://psquid.net/2011/08/17/watching-the-tumblrweed-roll-by/" />
  <updated>2011-08-17T00:00:00+00:00</updated>
  <id>http://psquid.net/2011/08/17/watching-the-tumblrweed-roll-by</id>
  <content type="html">&lt;p&gt;Just a short blog post this time. &lt;a href=&quot;http://psquid.tumblr.com/&quot;&gt;My tumblr&lt;/a&gt; is being repurposed as purely
a reblog account for reblogging tumblr posts that I feel are worth it. It will
not have &lt;em&gt;any&lt;/em&gt; new actual posts, as those will all be over here.&lt;/p&gt;

</content>
</entry>

<entry>
  <title>Putting a dent in blogging</title>
  <link href="http://psquid.net/2011/06/28/putting-a-dent-in-blogging/" />
  <updated>2011-06-28T00:00:00+00:00</updated>
  <id>http://psquid.net/2011/06/28/putting-a-dent-in-blogging</id>
  <content type="html">&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: Since this version of the post is on a github-hosted site, there are
no comments, so the post below is factually incorrect (for this version,
anyway).&lt;/p&gt;

&lt;p&gt;What really makes a blog (besides the posts, obviously) is probably the
comments.&lt;/p&gt;

&lt;p&gt;The trouble is, if you have to sign up for a blog to comment, that immediately
lowers the chance that you’ll actually do so. But go too far the other way, and
you open yourself up to waves of spam from opportunistic spam bots.&lt;/p&gt;

&lt;p&gt;Luckily, there’s a third way; require an account, but &lt;em&gt;not one that is unique
to a single blog&lt;/em&gt;. Several of the big blogging engines do it, with ways of
having a global account that works for all blogs using that engine. Then
there’s generic authentication providers, OpenID et al, which can be used in a
similar way.&lt;/p&gt;

&lt;p&gt;And then, there’s what I’ve now done with this blog: status.net comments. Since
I intend to broadcast “new blog post” messages on identi.ca anyway, it’s not
too difficult to harvest replies to that dent, and present them as comments,
just the same as the built-in comments. Maybe I’m not the first to do it, but
I’m proud of my solution, especially since its reuse of my existing statusnet
module allows it to be used with just about any status.net instance.&lt;/p&gt;

&lt;p&gt;Anyway, it’s switched on as of this post, so barring any catastrophic failures
I couldn’t get to occur in testing, it should now be live. Enjoy!&lt;/p&gt;
</content>
</entry>

<entry>
  <title>Ink 'n' Mustard</title>
  <link href="http://psquid.net/2011/06/22/ink-n-mustard/" />
  <updated>2011-06-22T00:00:00+00:00</updated>
  <id>http://psquid.net/2011/06/22/ink-n-mustard</id>
  <content type="html">&lt;p&gt;Sounds delicious!&lt;/p&gt;

&lt;p&gt;But in all seriousness, hello, and welcome to my new blog!&lt;/p&gt;

&lt;p&gt;It’s back on my server, instead of tumblr, and this time, it’s completely coded
by me, from the engine (SquidInk) all the way up to the theme (the titular “Ink
‘n’ Mustard”). Which means that I get any and every feature I could possibly
want, because &lt;em&gt;all I have to do is write it&lt;/em&gt; (scratching one’s own itches is so
very satisfying).&lt;/p&gt;

&lt;p&gt;I’m also using this move back to spur me into getting some more posting done,
so keep your eyes peeled for more soon.&lt;/p&gt;
</content>
</entry>

<entry>
  <title>(OLD) Starting afresh.</title>
  <link href="http://psquid.net/2011/02/19/starting-afresh/" />
  <updated>2011-02-19T00:00:00+00:00</updated>
  <id>http://psquid.net/2011/02/19/starting-afresh</id>
  <content type="html">&lt;p&gt;&lt;strong&gt;&lt;em&gt;NOTE: This post was originally posted on &lt;a href=&quot;http://psquid.tumblr.com/&quot;&gt;my tumblr blog&lt;/a&gt;. It has been
imported here for posterity’s sake, in case tumblr ever deletes my account for
inactivity/ceases to exist/is taken over by trained apes.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, in the process of migrating from an old VPS to a shiny new one,
my Wordpress posts were not, as I had originally thought, backed up. Now, I
intended to move to tumblr anyway, but it would’ve been nice to bring my posts
with me.&lt;/p&gt;

&lt;p&gt;Still, there was nothing I couldn’t do without, and hopefully the fact that
tumblr is not hosted on my server (it would fall over a lot more often if it
was) will help avert such missteps in future.&lt;/p&gt;

&lt;p&gt;And, honestly? It feels rather nice to start 2011’s blogging with a clean
slate. Obviously, this blog is not yet fully set up, but that should happen
over the next few days or so.&lt;/p&gt;

&lt;p&gt;PSquid out.&lt;/p&gt;

</content>
</entry>


</feed>
