Archive for the Uncategorised Category

Posted on Programming

Imposition

Sometimes when all you know is cold plastic against your fingertips, you get curious about other things. Things that aren’t programming. Your hands go clickity-clack against the keys all day and you wonder, is it the same for everyone? Do they suffer the same joys and frustrations I do? How do they plan and what are their processes like?

So you watch some Youtube videos.

And you start to wonder what knowledge they have built up, through years and experience, that they would gloss over when describing what it is they do because it’s just so ingrained. Things you would traditionally pick up piecemeal, and wouldn’t necessarily think of as a novice who doesn’t understand the questions that want asking. Or maybe they don’t even know why they do certain things past the unsatisfying answer tradition.

You find yourself wondering: if you watch enough Youtube videos, will you see the process from enough angles to pick out some of those tripping points experience runs smooth?

These are the sort of puzzles that leave your monitor a tangled nest of queued videos and Google queries, and a small voice in the back of your mind starts to whisper at you: wait, is this just programming again?

For me, most recently, this has resulted in what any reasonable individual would objectively deem as too many book binding videos.

What the heck, 8.5×11″

I thought I was starting to build up a high level understanding of it—at least enough to recognize words like “signature” and “tail”, and the existence of something called paper grain—and then I found a gap I just didn’t understand how people navigated.

The only paper that seems readily available is 8.5×11″. The type of paper an everyday printer uses. There must be other papers, but how do people find them? Moreover, how do they print onto them? Do they do it themselves or have specialized printing companies do it for them? It certainly seemed like many videos I watched ended up constructing books of blank pages. But surely that wasn’t always the case. I mean, I’ve read a book before. Quite famously, those things have words.

In real life, I imagine this is the sort of question you could just ask someone. But real life is a dangerous place, full of sentence fragments, curly brackets, and semicolons. I am a child of the internet.

No, best not to venture there.

Maybe it was all 8.5×11″ printer paper. And if it wasn’t (it almost certainly wasn’t), I imagine it theoretically could be. It’s not like I was actually doing any book binding. Problem solved.

Which, as solutions often to do, led to a new problem of its own. Sure, you could fold an 8.5×11″ along the long edge and end up with a roughly page-shaped rectangle, but as far as I could tell most 8.5×11″ sheets’ grain went along the long edge. Which would result, after the fold, in the grain going along the short edge of of your page.

From my meticulous research (watching some Youtube videos), it seemed that this was far from ideal. Paper it seems, bends easier in the direction perpendicular to the grain (so the grain fibres aren’t being bent). Apparently folding it the opposite way can even crack some cheaper papers, and having the grain in the right direction (vertically) can impact the longevity and feel of the book—this is my possibly incorrect understanding, anyway. If the grain is aligned correctly, the expansion and contraction of the paper and the tendency to bend a certain way don’t work against the integrity of the spine quite as much, and the pages turn more easily since that is the way the paper likes to bend.

So what the heck, 8.5×11″.

The internet suggested to me that one possible solution is buying a ream of 11×17″ and cutting it in half to a short-grained 8.5×11″. But I was intrigued instead by the thought of cutting 8.5×11″ down to 8.5×5.5″ and, after the fold, ending up with pages that are 4.25×5.5″.

This would mean that on each sheet of 8.5×11″ you’d have 8 pages when printed double-sided.

As a potential solution it seemed reasonable enough, and for a moment I thought maybe I could move past the whole thought experiment, but then I started to wonder how one might actually accomplish that… How would you lay out the pages appropriately so everything printed correctly?

It turns out this process is called imposition (I think), and that both InDesign and Acrobat didn’t solve my particular problem. They could do it, sure, just apparently not in strangely specific the layout I wanted.

So I wrote a script for it, and discovered that maybe this was just programming after all.

I can make that

And as things so often do, everything eventually circled back to the ol’ trap of – I can make that. So I made an imposition script in Python which takes a PDF and generates a PDF, and it seemed to work. I also came to realize that I very much did not like Python’s PDF libraries.

At the same time something else occurred to me. Often in videos I would see an angled line drawn across the back of the book block to provide a visual indicator that all the signatures were in the right order. It left a little mark on each signature (possibly why they’re called signatures). But if I was assuming double-sided printing anyway, I could just generate those marks as well and print them along with the text.

So I rewrote the whole thing in PHP, and added that to it.

Maybe this is common practice. I don’t know, I’m not a book binder! Besides, I don’t actually have a printer, so who knows if it works. Maybe it does, maybe it doesn’t. There’s no way to find out, and maybe we’ll never know.

Coincidentally, writing it in PHP made it easy to put a web UI over it, and maybe it’ll be useful to someone.

If you want to give it a try, head on over to https://gigglingcorpse.com/dev/imposing or just scroll a bit further. If you do print, fold the long edge and then the short edge. With a signature size of 2, and rotate the bottom half set to true everything should align like pages in a book. You’ll still have to cut the page in half, but that seems like a problem easy enough to get around.

This was actually from May, 2020, but I never posted it...
Posted on Business

Hourible: the time tracking tool I use

I made a new online tool!

Okay so new is a bit of a stretch. It’s based on an internal tool I’ve used at altered effect for years now, but I’ve cleaned that up and now it’s available for public use:

Time tracking is the horrible. (see what I did there?) But does it have to be? I don’t know.

It’s one of the great mysteries of life, and something I worry we’ll never know the answer to.

Long story long, I wasn’t happy with any of the time tracking solutions I found so I settled on something quick and easy – using Google calendar. I was already comfortable using it, and I it was surprisingly intuitive to just drag events to the appropriate size in order to keep track of how much time I spend on projects.

It actually works wonderfully, but when it comes for invoicing you need to add up the hours.

Or do you? Trick quesion – you do, but Hourible does it for you!

Over whatever time frame you like. Plus, you can easily filter the events. Since I use Logipar any chance I get, Hourible supports logical operators in the filter string. It sums up your hours for you, and you can take a deeper look to see how they’re broken down.

Of course, you still need to make the invoices then. Which you can do manually if you prefer, or Hourible can generate them automatically with the click of a button. Which… is a lot less work for me than making them manually. It’s quite convenient actually.

All that and Hourible is free as you want it to be!

Give it a try if you want, especially if you regularly work on multiple projects or for various clients. Maybe it’ll help.

hourible.com

Posted on Travel

Whew 2020 was a busy year!

And I didn’t post a single time during it. But it wasn’t because nothing happened—things happened! So many things that I didn’t feel comfortable setting aside the time to stop and blog.

I got back from a month in Europe, which was really cool and, it turns out, convenient. Europe is neat, and I lucked out in a lot of ways. Traveling is fun, but the actual process of traveling itself is kind of grueling, especially when you’re tall. I haven’t really left my apartment in almost a year now, and I’ve found that I don’t really mind it. But maybe that’s just because I’ve been too busy to really notice.

As loyal readers (hey, that’s me!) will surely know, I do computer programming, and in 2020 I was successfully lured into accepting a job – I’m an employee for the first time in twelve years – and it’s been interesting and strange. To think that this is what it’s like for people, getting paid on a set and immobile schedule.

My Snapmaker 2.0 arrived, and it is awesome. I’ve used it to 3D print some things, and done some CNCing. I haven’t tested the laser cutter yet.

As you also know, I am prone to challenging myself to do ridiculous things just to see if I can, and in most cases, stubbornly following through. To that end, I wrote a terrible novel in a month. It wasn’t enjoyable, forcing myself to spew out ~1700 words a day, but it turns out doing things poorly is isn’t as difficult as you might think.

I started listening to Spout Lore, a podcast. Which makes me an official podcaster. Or a podcastee. Or a podcatcher. I don’t know how it works; whichever one listens to podcasts. I also wrote a Spout Lore fanfic, and made a new website for them. Check it out if you like cool podcasts.

I programmed the website for a neat Vodka Soda company, which had some interesting technical challenges that I’d like to break down at some point. It was designed by Sheldon Rennie, who is a cool designer that you should use if you need cool designs.

I joined a D&D game that lasted like nine months. It just ended. For the first few, after each session, I wrote out what happened from my character’s perspective. I stopped doing that somewhere around 45,000 words, but I would like to tell you a bit more about him if only so I can use it as easy reference. A new campaign is starting soon.

There’s a bunch of work stuff that I can’t really talk about, but I also got a pull request accepted into Apache Superset. Now you can do RLS (row level security) with it!

Yeah I’ve been to Edinburgh so what
Posted on Uncategorised

Things I’ve learned about Don’t starve together

The F key will attack, so you don’t have to try to click on a moving target, and the space key will perform the nearest action.

You definitely want a science machine and an alchemy engine at your camp.

If you find the walking cane, pick it up. It’ll let you explore a more quickly, especially on roads.

If you find Chester‘s eyebone, he’ll follow you around. Sometimes he’ll distract enemies, which can be good or bad, depending on the situation. He can get in your way, so often I’ll leave him at camp by dropping the eyebone.

A fully grown birchnut tree will give you 3 logs and 2 seeds during the Fall. You can replant the seeds, which are edible once cooked. You can tell a fully grown one by the two branches supporting its floof of leaves.

If you find gears, make a fridge (icebox). Sometimes you can find them in tumbleweeds.

With a shovel you can dig up plants and replant them elsewhere. Berries and grass will require fertilization to grow, sapplings will not. You can get manure from around a beefalo herd, or by feeding berries to pigs. Rot works too.

Plant grass on the savanna ground type to ensure it’s not overcome by disease.

items-001

manure, beefalo, birchnut tree, gears, tumbleweed, icebox,
eyebone, chester, walking cane, birchnut tree, birchnut seed, science machine, alchemy engine

If you find the pig king, you can give him meat or trinkets in exchange for gold. Not monster meat though, this guy’s health conscious. Tumbleweeds are a good place to find trinkets, and less terrifying than digging up graves.

Instead of a camp fire the first night, I like to make a torch and spend it in the safe glow of a raging forest fire. This is a good source of ashes, and more importantly charcoal. Some will be on the ground, but once the fire is good and truly out take your axe to those charred husks and harvest all the charcoal you need.

forest-fire

When in doubt set everything on fire

If you can’t find any rocks, you can mine petrified trees.

Picking flowers helps you regain your sanity. Also, hats.

Every so often you’ll be attacked by hounds. This is actually pretty easy to survive, at least so far as I’ve gotten. The trick is just don’t fight them. Find a herd of beefalo (preferred), or a grouping of spider nests and keep leading them through until they accidentally harm a beefalo, then collect their meat and any teeth they may have dropped. Pigs work too. If it’s night time, carry a torch.

Once you can handle the hounds, surviving the forgiving fall isn’t all that difficult. But like those elves from the hobbit always say: winter is coming.

Winter is cold, and you should start preparing in the fall. Grow your beard to stay in theme, make some ear muffs (two bunnies and a twig) or a toque (winter hat), but most importantly, make a thermal stone – or even two. Heat these by the fire at night and carry them with you during the day.

camp during winter

Smallbirds are pretty cute!

Food is scarce in the winter, and things don’t really grow. In the fall I like to plant a bunch of birchnut trees near camp, and then cut them all down right before winter. The wood is useful for those long, cold nights, and the seeds go in the fridge for meatballs, if necessary, or potential replanting.

Bunnies and spiders are still available in the Winter (but bunnies disappear in the Spring), so an infrastructure to easily collect those is helpful. This will make cooking bacon & eggs a breeze. I like to set up my camp near a bunch of bunny holes. You can place traps basically right over them. This has an added benefit that usually beefalo and bunnies both frequent the savanna land type.

Speaking of beefalo, you can shave them while they sleep. This is useful, sure, but also hilarious. Don’t be surprised if you feel bad afterward, they look so sad waking up sans fur.

Spiders drop three things that are useful – silk (web), glands, and monster meat – but are super easy and fun to catch, without endangering yourself. Just throw some traps down around one side of a nest, walk onto the webbed ground to draw them out, and run away such that they chase you into the traps. Then repeat. Be careful not to set your traps too close together, or one spider might set off a few of them. And be aware that in the evening spiders react differently – they wander around all willy-nilly and won’t chase you quite as easily. So just set some traps and retire to a safe distance. Maybe do some fishing.

too many spiders

not like this not like this not like this

In the evening frogs slink back into their ponds, so this is the perfect time to catch some fish. Head to one of the little ponds, and equip a fishing rod. Keep your cursor over the pond and click when prompted by “hook” and “reel in”.

I like to make a few drying racks to make fish jerky. It lasts a long time, and is good for regaining sanity and health.

In the winter, the ponds freeze over so you won’t be able to fish.

Once the spider nests are three-tiered, you can destroy them to collect the eggs. Just lure the spiders out as you normally would, until they refuse to play your game, then start knocking. when you attack the nest more spiders will emerge, but you can trap them as well. Repeat until you’re rich in both silk and spider eggs.

Why spider eggs, you ask? Turns out you can plant them like a tree! I like to move them close to, but not too close to, my camp.

Once you have sufficient silk, things get easier. I like to make a bird cage and a bird trap (baited with seeds). Keeping a pet bird has a few benefits. It makes you feel powerful, and provides an easy source of eggs. You can trade it cooked monster meat or bunny morsels for eggs, seemingly without limit. Once I had a nocturnal bird, but mostly you’ll have to do this during the day or in the evening.

Throw two eggs, a monster meat, and a morsel in a crock pot and you’ll end up with eggs & bacon.

A meat and three of any combination of carrots, berries, or cooked birchnuts will get you meatballs. Not as good as eggs & bacon, but they’ll do in a pinch.

Now that you have an endless supply of silk, you can make a beekeeper mask and a bug net. Catch some bees and make a bee mine of you want, but I like to destroy some beehives. Sure this is cruel, but it also provides the requisite materials to make bee boxes, which you can harvest for honey.

Bees aren’t active in the winter, but don’t let that fool you – they’ll still attack if you try to destroy a hive. In the Spring, all bees are deadly, so don’t put them too close to your camp.

Bees are cool and all, but my favourite part about the bug net is starting a flower garden. Bees like flowers, but so do butterflies. You’ve probably seen them fluttering around a flower now and then.

If you catch a butterfly, you can plant it in the ground to make a flower. Soon that flower will have its own butterfly, which you can catch to plant another flower. In this way your flower garden can explode wildly out of control, which is just the way I like it.

flower garden

Come at me, bee

Winter’s here. You have your toque, your sustainable sources of bacon & eggs. A heat stone. A whole wack of wood, and maybe some turf you’ve dug up to keep the fires going. You’re all set. Nothing bad can happen now, it’s time to hole up!

Wait. Do you hear that? What? Oh, that. Don’t worry that’s just the giant beast who wants to destroy everything you’ve ever built and possibly you yourself, should you anger it.

The good news is you’re prepared. You’ve been making gunpowder right? (nitre, rotten egg, charcoal.) You’ll need 9 of them. And ideally an ice staff.

I like to make a small camp a ways away from my main camp. A fire pit, maybe a stone pillar or two. As soon as I hear the huffing/moaning noise that signifies the coming of the deerclops I head there. Light the fire, make sure I have a few torches, and relax.

If all goes well, the deerclops shows up and destroys my decoy camp while I watch, with ever decreasing sanity, torch in hand.

If your camp is far enough away, maybe you can just head back – I don’t know. In my heart I tell myself the deerclops is too dangerous to live. Really, I just want to kill it. Imagine all I could construct with that giant, glistening eye of his.

eyebrella hat

like a nice, new hat!

Step one: freeze him with that freeze ray. Speaking of freeze ways, graveyards are a good place to dig up gems.

Step: two, drop a pile of 9 gunpowder next to him and light it up.

Did it explode? Good! He’s probably only got 200 health left, that’s nothing to a guy or gal like you. Don that log armour and get in there. Don’t forget to run away.

For the true cowards (like me) maybe lead him toward something else that will weaken him further. He’ll probably kill them all, so target someone who’s given you guff.

Let’s be honest, you probably died. That’s okay, there’s no shame in that. Welcome to the exciting wold of ghosts – it’s where I spend most of my time. Sure it’s boring, but I guess you can haunt things. Sometimes haunting flowers will turn them into evil flowers, or haunting hounds will turn them into more specialized hounds. If you see a tumbleweed, maybe it will unwrap itself – who know?

boo

boo

Eventually you’ll get bored of ghosting around. It’s not as fun as horror movies would have you believe. The map doesn’t even update when you go exploring. But, hey, maybe you’ve seen a touchstone around? If you do, haunt it and you’ll come back to life. Each touchstone only works once per player, but don’t worry, there are other ways to come back to life.

If you have a red gem (graves, fire hounds) you can make a lifegiving amulet. Haunting one of those will bring you back to life as well, so I like to leave some lying around camp.

Telltale hearts have to be given to you by another player, but when you’re revived your maximum health will be decreased. A booster shot will fix that.

Well guys, that’s what I’ve learned about Don’t starve together so far. I hope it saves you some trial and error.

As always, feel free to use the tool I made to aid in your survival endeavours, it looks like this.

crafting tool

Posted on Uncategorised

Airtime data 2

I’ve added this last month’s data (up to November 17th) to my database of airtime usage. I also adjusted the script to automatically generate the answers for me – instead of summing and averaging manually.

I also noticed that Koodo does something strange! Jt’s calls often come in as private, so the number they’re from won’t be in my usage logs. Koodo logs those calls as from my phone number!
This may be what all or most phone companies do, but it’s still strange.

I rarely get a private call from anyone other than Jt, and when I do they are either very short or “missed”. I’ve had it add those entries to his minute bars.
Once I did that, his minutes jumped way up, and it became pretty clear that I speak most with him.

For phone usage graphs, this is a mistake. I should display those as either private or me. I doubt they would count as his number in any sort of plan optimization I could do.
(more…)