The best programming advice I ever received was when my sister told me to think of things I wanted or needed to do, and then to try and think of how to solve them algorithmically — the logic being that I’m more likely to get motivated and complete a utility I actually need than one that I don’t.
I’m saying this because, once again, it’s proven handy. In this case I have a mess of text I need to reformat into a particular set pattern, with only a handful of actual variables that nonetheless do change from block to block. Annoying by hand or by copying, easy as pie with under 20 lines of Python. It’s still not perfect, but it’s a total lifesaver.
Sacrilegious though it may be, I’m still questioning the very concept of “hello world”.
Once again, here’s my solution to one of my ludicrously over-specific problems. In this case, I was working on a game in Ren’Py and wanted to be able to loop sound effects a set number of times. In this case, the sound will be looped different numbers of times throughout the game, making it impractical to make a new .OGG file for each arbitrary instance. Merely repeating “renpy.sound.play()” over and over is inelegant and hard to maintain; queuing the sound as “music” and telling it to stop at a later point in the code also fails for aesthetic reasons, as getting the timing exactly right is too troublesome. And for some reason, my attempt at placing the sound statement in a for loop also failed — at first. This solution seems more than adequate for my purposes.
Here we go with something I’ve wanted to do since my very first blog, back when I was a wee lad: a book review! (I do keep a tumblr of recent things I’ve read and enjoyed, but it’s not the same.) I picked up this particular one for some summer reading*. Sadly, even by the standards of its genre, I can’t really say it was entertaining.
This Rough Magic [Kindle Edition]
by Josh Lanyon
(This post discusses some sexual content, so minors should just move along.)
*In the interest of defending my character, I hasten to say that most of my reading time has gone to Father Brown and physics, and that I don’t exactly make a habit of this particular type of book.
I AM FLIPPING OUT TODAY
BECAUSE OF PONY
I’m just sticking this everywhere because it’s
Crystal Ponies you guys
(I think my antidepressants are working!)
This is a method for, with only a bit of CSS, making images (e.g. thumbnail images that link to full-size versions) semi-transparent, and then making them opaque when active. The latter part means that even readers who navigate with the keyboard will be able to see the opaque thumbnail.
Not an exceptionally difficult trick, and of questionable use — but it improves accessibility and fixed a problem over which I was tearing my hair out, so I thought it might come in handy for someone else.
I wrote this a while back for my own purposes — it’s a simple utility that converts simply between metric and traditional Japanese units. Currently works with length and mass. The code is in the public domain.
More than slightly sad today, but it needs to be said.
When I was a wee young lad, I browsed a lot of game fanart sites online and came to venerate a number of artists as my ultimate masters. Being, however, a wee young lad, I did not generally save the pictures that I liked because I was not familiar with this feature of web browsers.
Now the following is occurring, over and over again:
- I remember some particular artist and decide to see if any of their stuff is still around.
- I find their webpage died before I was out of braces, but Wayback Machine has a handful of jpegs archived briefly in the dead of night.
- I google their old nick just to see if they’ve set up shop elsewhere in the intervening years.
- They have, but 100% of their deviantArt gallery is original storyboards and Flash animations, all in a completely different and unrecognizable style even if it is quite high quality.
- I start to leave a comment asking if they still have any of their fanart from those days, if only to send to someone they inspired as a child, but realize this would make me sound like some sort of stalker and close the tab without submitting anything.
- I wax nostalgic for a little longer and try to remember how their art made me feel, even if I can no longer see it.
- Eventually the cycle continues.
I know a lot of musicians and music lovers, but I am scared of talking about music. This is because, in my complete ignorance of music, I consistently have no idea whether what I enjoy listening to is “good” or “bad”, or why.
I can tell that, in design terms, I am basically the audio equivalent of the guy who writes a custom browser script so he can read everything in magenta Comic Sans.
To myself, though, I feel like a dog that craps, and half the time it gets put outside but half the time nothing happens. I know the humans are making some kind of distinction, but my poor little canine brain can’t figure out what the hell it is, or why it needs to be made, and ends up just sending the “crap” instruction either way. Or the “Eurovision” instruction. Or I guess to some people they are the same??
(Also this BASICALLY means that musicians, like mathematicians, are the same as wizards to me. They just look at or listen to stuff and magically possess knowledge far beyond my ken.)
Pinkie and Flutters to offset my anger.
(written in response to a terrible My Little Pony fanfic that shall remain nameless, as well as to some members of the fandom in general who believe they are very clever. Also, Fabulous Dragonite avatar because fuck you.)
For those who honestly don’t know/are being deliberately obtuse/think “YOU DON’T TOLERATE INTOLERANCE!!!1!” is a great argument: