Should I Automate This?

The short answer to the question posed in the headline: yes.

For the long answer, you have to do a little math. How much total time you will save by automating, over some reasonable horizon? It’s a simple product of how much time per occurrence, times how many times per day it happens, times the number of days in your horizon. Or skip out on the math because there’s an XKCD for that.

What’s fun about this table is that it’s kind of a Rorschach test that gives you insight into how much you suffer from automatitis. I always thought that Randall was trying to convince himself not to undertake (fun) automation projects, because that was my condition at the time. Looking at it from my current perspective, it’s a little bit shocking that something that’ll save you five seconds, five times a day, is worth spending twelve hours on. I’ve got some automating to do.

To whit: I use pass as my password manager because it’s ultimately flexible, simple, and failsafe. It stores passwords on my hard drive, and my backup server, encrypted with a GPG key that I have printed out on paper in a fireproof safe. Because I practice good cookie hygiene, I end up re-entering my passwords daily. Because I keep my passwords separate from my browser, that means entering username and password by cut-and-paste. There’s your five seconds, five times per day. Maybe two seconds, ten times, but it’s all the same. It shouldn’t take me even as long as twenty minutes to whip up a script that puts username and password into selection and clipboard for one-click pasting. Why haven’t I done this yet? I’m going to get on it as soon as I’m done with this newsletter.

But the this begs the question. If you spend up to twelve hours on every possible 25-second-per-day savings, when will you ever get your real work done? Again, math gives us the answer. One eight-hour workday * 25 seconds * 12 hours (pessimistically) of labor = 1.58 years before everything that needs automating will be. Next week’s newsletter might be a little bit delayed.

What do you see in the XKCD “Is it worth the time” table? Automate more, or step back from the cliff edge?

Make XKCD-Style Plots From Python

[Randall Munroe] certainly understands the power of graphical representation of data. The humorous plots in his xkcd webcomic are one of the favorite parts for many readers. Their distinctive, Tufteian style delivers the information – in this case, a punch line – without excessive decoration. To be honest, we can’t get enough of them. A recent reddit thread reminded us that you can generate a similar look for your own data (humorous or otherwise) in Python using Matplotlib.

If you already have a plot generated with Matplotlib, activating xkcd-mode is as simple as calling a method on the pyplot object:

matplotlib.pyplot.xkcd()

The documentation recommends that you install the “Humor Sans” font for best effect. On one of our linux boxes, we were able to do this with a simple:

sudo apt-get install fonts-humor-sans

There will undoubtedly be similar incantations for other operating systems. It’s really that simple. In fact, the featured image above was generated with this minimal script:

#!/usr/bin/env python3

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 1, 100)
y = (x > 0.5) * (x - 0.5)

plt.xkcd(scale=5, length=400)
plt.xticks([])
plt.yticks([])
plt.ylabel('Downloads of "humor sans" font')
plt.text(0, 0.25, 'Article on xkcd() published')
plt.plot(x, y)
plt.plot([0.3, 0.475], [0.2, 0.025], 'black')
plt.gca().set_aspect(2*9/16)
plt.savefig('xkcd_plot.png', dpi=300)

Beyond generating humorous graphs for those with little artistic talent, these plots can also be used instead of hand-drawn sketches to indicate a simple model or expected result. The comic look of the plots conveys the idea that they don’t represent actual data, perhaps only a concept. We saw this done at one of the talks at the Hackaday SuperConference 2018.

We’ve also covered some of the xkcd comics before, such as when they subtly dissed Arduino back in 2010, before that was cool.

Xkcd’s Virus Aquarium Made Real

A surprising number of projects here are in some way influenced by the webcomic xkcd, but usually not as directly as this. Comic 350, “Network” is the tale of a very odd stickman who keeps multiple VMs running an unprotected, old version of Windows. Between the VMs, they have virtually every virus and are, effectively, a computer virus aquarium.

Now it’s a real thing, and best of all, it’s open to the Internet for normal humans to view, complete with screencaps of all seven nodes updated every 30 seconds, the ability to view all processes on each node, and anyone on the Internet can upload any file to a node. All the files uploaded to the nodes are executed, so you get to see in real-time what the effects of “1TB_of_porn_this_took_a_while_to_upload.exe” are on node 3.

The idea of a virus aquarium is cool, but this actually gets much, much more interesting when the project metas itself. Every 24 hours, a virus scanner runs on each node. As of right now, all the nodes are clean making this not a virus aquarium, but a script kiddie aquarium. On at least one node, TeamViewer is running but your guess is as good as mine as to how anyone will get that working.

Continue reading “Xkcd’s Virus Aquarium Made Real”

We Don’t Need To Brainstorm Projects; Xkcd Does That For Us

[Randall Munroe], the guy behind our favorite web comic xkcd, gave us yet another great project idea that falls on the heels of securing our valuables and silencing loud car stereos. The xkcd forum has been talking about how to implement this, and we’d like to hear what Hack A Day readers think about this idea.

The project isn’t much different from 3D photography. [Carl Pisaturo] has done a lot of art and experimentation based on this idea that basically amounted to largish binoculars. A poster on the xkcd forum has already built this using mirrors, but we’re wondering how much the parallax can be increased with this method. Two cameras and a smart phone would also allow automatic pan and tilt that corresponds to head movement.

We’re not quite sure if this idea can be applied to astronomy. The angular resolution of the human eye is around one arc minute, every star except for the Sun has an annual parallax less than one arc second. If anyone wants to try this out with a longer baseline (From Earth to Pluto for example), we would suggest simulating this in Stellarium. Seeing the moon as a sphere would be possible with a few hundred miles between cameras, though.

Tell us how you would build this in the comments, and be sure to send in your write-up if you manage to build it. We’ll put it up right away.

Thanks to [Theon144] for sending this in.

EDIT: Because the comments are actually bearing fruit, check out the thread on the Hack A Day forums for this post: link.

XKCD Takes A Swipe At The Arduino

This XKCD comic takes a playful swipe and almost everything, including the Arduino. We’ve heard people claim that we have some sort of favoritism toward Arduino, and we don’t. People just submit a LOT of projects with them. But there is one point that we’ve seen a few times that should be addressed. In our categories we have an “Arduino hacks” section. That will not be going away, again, because we get so many submitted. However, shouldn’t we also add some categories for other stuff? Should there be a “pic hacks” category, or maybe just “microcontroller hacks” category?

Let’s not making this an Arduino bashing thread. Instead, give us some good ideas on other categories you would like to see for sorting.

[via littlebirdceo]

Laser Etched Kindle 2

kindlesketch1

After seeing the xkcd comic where they call the Kindle2 the hitchhiker’s guide, [Ladyada] couldn’t help but laser etch the Kindle 2 with “Don’t Panic”. We think it looks pretty good, if a bit bubbly. You can see the video of the entire process after the break. Now that xkcd has infiltrated our interwebs, hearts, and minds, maybe he can put just a tiny bit of effort into learning to draw. If you don’t have access to a laser etcher, you could always make your own. Just be careful you don’t accidentally go full out and cut your kindle to shreds.

Continue reading “Laser Etched Kindle 2”

XKCD Inspires YouTube Feature

Who knew that a silly comic strip could be so influential? XKCD’s strip focusing on the inanity of YouTube comments inspired someone to actually add the Audio Preview feature to YouTube. It’s provided us with much amusement, especially where one commenter mentions that the “preview of my own post sounded moronic!”

Speech synthesis software is nothing new, of course. While it’s not the most sophisticated software, it’s an invaluable resource to those with disabilities, language learners, and others. This tutorial on Festival, a Linux-based text-to-speech software framework, would be a great place to start. You’re just moments away from finding out how stupid email, IM, and IRC sound read aloud.