Daily Entry: June 10th, 2017

Sat Jun 10 05:10:47 UTC 2017

Seems this daily logging is starting to happen every other day.

In any case, Mixpanel interview in San Francisco on June 23rd. I'll be flying on over and hanging out with friend on June 22nd, and that means I'm a horrible husband as I'm flying out on my wife's birthday. Bad thinking about timing on my end there.

In any case, today I want to edit that tutorial, record a voice-over of it, and then following that voice over's instructions while recording, and then fix things I realize are wrong and redo everything, and then hand all that over to my wife to edit into a video.

That may end up spilling into tomorrow.

Then I'll take gifs out of that video to put into the blog post, and have both a blog version of the post and a YouTube video version, and let YouTube handle comments.

Hopefully three days max. Then I want to play with compiling python code using the pygame library into JavaScript. I found out there's a JavaScript implementation of pygame, and also python-to-javascript compilers.

Also, I should pick a capitalization of python and javascript and stick with it. All lowercase it is.

Sat Jun 10 05:20:27 UTC 2017

But right now Overwatch.

Sat Jun 10 12:16:43 UTC 2017

I'm satisfied with the current draft of the pygame setup tutorial. Right now isn't a good time to do audio recording, so if I continue doing work, I'm going to look into compiling pygame code into a working javascript setup.

Sat Jun 10 12:43:17 UTC 2017

Formatting is screwed up again. I thought I fixed this before.... Annoying.

Sat Jun 10 12:45:49 UTC 2017

Looks like I just needed to restart the server.

Daily Entry: June 8th, 2017

Thu Jun 8 02:00:13 UTC 2017

I will be interviewing with Mixpanel!

That's pretty exciting for me, for a variety of reasons. One of them being I'll be on one side of the USA for my interview with AQR (Greenwich, CT) and on the other side for my interview with Mixpanel (San Fransico, CA).

Thu Jun 8 02:24:04 UTC 2017

Getting another job coming along. Probably the path I'll take afterall. I will consider grad school and other options after another serious round of proper programming work.

Thu Jun 8 02:49:54 UTC 2017

The wife just showed me how to sew up some holes on my shorts. I'll be devoting a bit of time everyday to sewing up some holes. I'm thinking of recording it and posting it to my youtube channel tomorrow.

Thu Jun 8 03:08:42 UTC 2017

Wife and I were discussing apartment plans for when we eventually move. Small space should be fine. We're thinking of trying out a traditional japanese futon for sleeping purposes to maximize space usability.

Thu Jun 8 03:09:26 UTC 2017

Overwatch time.

Thu Jun 8 06:30:37 UTC 2017

Little low on energy even though I was feeling really good earlier after riding my bike to the grocery store and back.

Thu Jun 8 08:25:18 UTC 2017

I said I'd finish that tutorial draft yesterday so I should really work on it right now.

Thu Jun 8 09:17:00 UTC 2017

Draft done. It's still very imcomplete and needs tons of editing, but the gist is done and that's good enough. Tomorrow read through it 3 times and iterate it as I see fit.

Daily Entry: June 6th, 2017

Tue Jun 6 11:07:41 UTC 2017

Phone interview with AQR went very well.

Further, I have gotten feedback from Mixpanel and should have a phone interview with them soon.

I have done some pullups, done a full stretch routine, and gone for a 7-mile bike ride (not at all in that order).

I have also meditated and caught up on tickler.

Today is the first day of me counting calories again.

Tue Jun 6 11:17:33 UTC 2017

Considering whether or not to dance. Should probably start and then decide to stop whenever I feel like it. Starting is harder than continuing.

Tue Jun 6 12:16:27 UTC 2017

Danced about 4 or 5 dances. This time when I felt like stopping, I skipped the song and found myself dancing more. I accidentally closed the Just Dance game, though, and took that as a sign to stop.

I feel really, really good now.

Tue Jun 6 12:19:34 UTC 2017

Time to work some more on that one tutorial I'm working on. I have all the necessary resources to finish it, and finishing needs to be a skill I cultivate. So let's try and finish the draft by tomorrow and start working on the video a bit tomorrow.

Tue Jun 6 12:44:58 UTC 2017

Made good progress. Editing comes later, I'm just writing it down as it comes now.

Setting Up Wing Personal IDE Pygame Environment

Hello, I'm SilentKat and let me break down the assumptions and goals of this here thing:

  1. You are using a Windows OS (aka Windows 10, 7, 8.1, Vista)
  2. You want to program a game
  3. You're choosing python to program that game
  4. You're willing to use the pygame library to do a lot of the heavy-lifting
  5. You want to make an executable of your code that runs on any Windows machine

If any of these assumptions are wrong this probably isn't the thing for you. I am, however, willing to do an Ubuntu version of this (and the executable in that case will be a binary playable on Linux systems). Let me know if you're interested in that and I can make that a priority. As I do not currently have access to Mac OS stuff, I am currently unable to make any such tutorial for that OS.

Further assumptions:

  1. You want to setup your environment without using the command-line
  2. You do not have python already installed
  3. You want to program in the Wing Personal IDE

If any of these assumptions are wrong, it's not necessarily a deal breaker. If you want to use the command-line, it should be pretty clear what commands to use instead of running the given scripts.

If you already have python installed, and that python is not 3.4 32-bit, then I highly recommend installing python 3.4 32-bit for maximum compatibility purposes. Also, to avoid some issues, make sure when you install python 3.4 that it's the "default" python (click the button that says add it to your PATH when installing).

If, at any point during this setup you hit a snag I don't mention, bring it to my attention and I will help figure out the problem and update this thing. I've hit plenty of snags doing this myself and helping one specific other person. Probably lots of gotchas for this.


  1. Install 32-bit Python 3.4.4
    • Note: Remember to click on the box to add Python to your path
  2. Install Wing Personal IDE
  3. (Windows 10 Only) Download the necessary DLLs for backwards compatiblity with older versions of Windows
  4. Setup virtualenv_without_cmdline
  5. Setup pygame_skeleton

Install 32-bit Python 3.4.4

Why 3.4.4? Python 3 has made lots of progress and is a worthwhile pick over the standard Python 2.7. However, the library we'll be using to make an executable out of our game code (PyInstaller) has currently (as of June 6th, 2017) unresolved issues limiting our executable options.

Why 32-bit? So that our executable generator (again, PyInstaller) creates a 32-bit executable that will run on 32-bit systems. It'll also make our generated executable smaller.

So, with that being explained, download the Windows x86 MSI installer for Python 3.4.4 (from the main python site) and install python.

Install Wing Personal IDE

Why Wing Personal IDE?

No reason. This setup should work with any IDE or lack thereof. I am simply playing with the IDE right now and think it's perfectly serviceable for our purposes.

Other worthwhile alternatives:

  • Spyder
  • Eclipse
  • IPython Notebook
  • Powershell and editor of choice
    • Vim
    • Emacs
    • VSCode
    • Atom
    • Sublime Text

You do you.

Wing Personal IDE download link.

Windows 10 Backwards Compatibility


Windows 10 does voodoo black magic to pretend it has libraries older Windows versions have when really it consolidated all of them into a single library.

Or something.

In any case, this will confuse the picky PyInstaller library we're using and it won't bundle the right libraries into our executable and then that executable will fail to run on Windows systems that don't already have the necessary DLL libraries.

So, how do we get those DLLs? Well, there's a large (over 2 gigs) Windows SDK that provides them or you can download just the necessary files (2KB) here.


Why virtualenv?

Python has a lot of options out there. There's various active versions of python, and various popular third-party libraries to further extend the language. Different projects have different needs and those needs may conflict with one another. A third-party library may only work properly on specific versions of python (cough PyInstaller cough). So we're going to put our game's various dependencies in one place so that if we want to work on another project, we don't have to worry about stuff we downloaded for this project making things difficult for any other project.

Why these scripts to do virtualenv?

Virtualenv kinda expects the user to run from the commandline. If you've never used the commandline before, this can be daunting and error prone so let's just avoid it and virtualenv via python scripts, which if you don't already know how to do, you'll have to learn if you plan on programming in python.

Note: I fully recommend learning command line. After the learning curve, it is quite powerful. But that's just me, you do you.

Once you've downloaded the zip from that github link given earlier, unzip it somewhere you're willing to put a decent amount of data (the virtualenv_without_cmdline is where we'll be putting our virtualenv, which are basically self-contained python installations).

Then, create a project in Wing IDE and save it to the virtualenv_without_cmdline directory. Then add that directories files to the project.

Open and run the "update_pip.py" file. Python 3.4 is fairly old by now, and the pip that comes with it is also old and can/should be updated.

Open and run the "pip_install_virtualenv.py" file. This will install the virtualenv library on the main python 3.4 area.

Open the "create_virtualenv.py" file. If you don't want your virtualenv to be called "default", change the single occurance of the word "default" in this file to whatever you do want the virtualenv to be called.

If all goes well, you should now have a directory called "default" in virtualenv_without_cmdline.

If you don't want your virtualenv called "default" or whatever you named it. In it there is a directory called Scripts and in that directory there is a python.exe. This is the python.exe you will be pointing at for your pygame project.


Download pygame_skeleton from the link above.

Create a new project in Wing IDE. Point this project's python at the python in your virtualenv directory.

Sanity check: if you have more than one version of python installed something may have gone wrong. Or, if you're like me, something magically went wrong because that's just what happens to you. In either case, Wing IDE will have opened a python shell using the exe you just fed it in that lower-middle window. It should say "Python 3.4.4 (32-bit)" somewhere in there. If it says something else or is just not working, something went wrong.

Let me know and we'll figure out what went wrong and fix it.

Sanity check passed? Good.

Save this project to your pygame_skeleton directory. Add the directories files to the project.

Open and run "pip_install.py". This will take a while. You'll notice there's a list defined in this script called "libs_to_install.py". If there's any library you want to install for use in your game, you can add it to this list. Pip will automatically install the latest version if you don't provide a version. If the library isn't present in pip's normal lookup table, you may need to provide pip a link to the library instead of just its name. "git+https://github.com/pyjs/pyjs.git#egg=pyjs", for example, installs pyjs, a python-to-javascript library which will eventually be utilized in an update to the pygame_skeleton project.

After that's done running, you should have all the libraries you need to make a python game in pygame.

Sanity check: restart your python shell. Try the following commands in that shell:

import pygame import PIL

If those commands don't cause errors, you should be good to go. Go ahead and open "hello_world.py" and run it.

You should see a non-interactive window pop up that is identical to the one below.

Did the "hello_world.py" game work? Cool.

Now try running "build_exe.py". An exe should now be present in a dist directory within pygame_skeleton.

Should look something like:

Running this executable should run the same game as hello_world.py.

If everything is working, let's give a tour of all the stuff that's here and how to change the stuff you're going to want to change.

The tour

"hello_world.py" just has some basic pygame stuff in it. Feel free to modify it to get familiar with pygame if necessary. As time goes on, I'd like to add additional examples of how to do things in pygame to this project. You can also just delete this file.

"build_exe.py" builds the exe based on the specifications in the spec file specified in the python script. There are two spec files that come with this project. One builds the "hello_world.py" into a single-file executable and the other into a single directory that contains a game executable.

Point "build_exe.py" to the kind of executable setup you want to create. There's pros and cons to each. Basically, if you want to save stuff between game sessions, you may want to make it a directory, else might as well be a single-file executable. This isn't a strict rule-of-thumb, but good enough for now if you don't know which you want to do.

The main thing you'll want to change in either spec file is what the "main_file" is. Right now, it's "hello_world.py". You'll want to change that to whatever your main python script is that runs the game. Whatever file you run to play your game is the main_file.

You'll notice that the hello_world.exe created has an icon that looks like:

You'll notice that when you run the game it has the same icon.

These are not the same images.

The image shown in the pygame window is in data/icon.png and the image shown in the exe is data/icon.ico.

Why two icon files?


The icon of the executable is set via PyInstaller. The icon in the pygame window is set via pygame code (see "resources.py"). Pygame is particular about its files, and doesn't like the ico files created via the PILLOW library which is what the script "ico_from_image.py" does.

In any case, find/create the image you want to be your game's icon, set is as icon.png in that data directory, and run this script to make an ico version of that image.

This will set all relevant icons as that image.


Okay, so why is there a resources.py and what is it doing?

There are significant differences in the environment between running your game as a script and running your game as an executable. "resources.py" makes abstracts that away so that you can pretend the environment is the same. Make sure your non-code assets are in the data directory and make sure you grab those assets via the relevant resource methods and things should just work.

Make Your Game

You should have everything you need. There's a lot of stuff not yet covered that I would like to eventually cover, but this should be a decent foundation to get you going.

Happy gaming.


If you have any questions or comments: tweet me @SilentKsionda.

Daily Entry: June 4th, 2017

Sun Jun 4 07:38:12 UTC 2017

All right, let's do some things!

Maybe start with some reflection and thinking.

I brought my bike back with me from Tucson, Stephan. I'm already really glad I did, as the last two days I've done a modest 7-mile ride each day. Really nice getting that fresh air. Running's been good, but I may need new shoes before I do anymore, as I've been feeling some aches in my legs that may lead to long-term damage if I'm not smart about things.

Tomorrow I plan on adding my bike rack on the back tire so I can reattach my pannier and maybe even do regular grocery shopping via bike.

We'll see.

Sun Jun 4 07:42:16 UTC 2017

I should do some chores. To the tickler!

Chores done.

Sun Jun 4 08:02:57 UTC 2017

I have gotten distracted reading up on character design tips.

Sun Jun 4 08:04:49 UTC 2017

Let's start working on that draft again.

Let put its content in a post now and just keep updating that post.

The post is here.

Sun Jun 4 08:26:42 UTC 2017

Fixed the config such that me putting line breaks in my markdown doesn't translate to a line break in the rendered diary post.

Sun Jun 4 08:38:33 UTC 2017

Feeling tired. Swtiching to playing some Zelda.

Sun Jun 4 09:34:40 UTC 2017

Switching to Overwatch quickplay with the wife.

Daily Entry: June 3rd, 2017

Sat Jun 3 05:44:15 UTC 2017

I'm back.

Last post was almost two weeks ago.

I went back to Tucson for a wedding and ended up not logging anything or being productive in any way.

I feel that that is fine.

Upon getting back I needed a bit of time to fall back into things. I think that time is elapsed.

So, I'm back.

I've been thinking, I want to practice a few things everyday:

  • Drawing
  • Programming
  • Gaming
    • Overwatch
    • Super Smash Bros. Melee
  • Dancing
  • Japanese
  • Some sort of musical instrument

Days off for dancing are important. Perhaps they will be for the other things as well.

I think that whilst not having a job, I can totally put in a decent amount of time towards all these things.

In fact, I may be able to do so even with having a job. Drawing, Japanese, and music can be less than an hour each. Maybe twenty minutes, even. Dancing is about 40 minutes. Gaming can be as little as an hour but will probably end up getting more than its fair share. And then programming can be 4 hours of serious work. This could perhaps work with or without a job.

I have noticed since not having a job that actually doing any of these things provides as much resistance as when I had a job. When I actually do it, it's not nearly as tiring as I anticipate. Oftentimes it's quite energizing.

It seems more that I have bad instincts that I need to learn to overcome, and when I do overcome them, I have to be weary of them coming back.

Like, I often feel like making decisions that don't make me happier nor do they energize me to give me the strength or motivation to make me happier or work on hard things. I want to accomplish things, but this feeling convinces me to make no progress.

I have, several times now, learned to overcome this. And have been very happy for it and gotten good at doing the things I identify as needing doing, either for intrinsic purposes or extrinsic ones. But then, each time, new instincts come into play that revert me to old habits, to listening to my always-wrong feelings on what I should be doing in the given moment.

So, the game has gotten a bit more complicated. How do I not revert to my old self.

Am I on the path now? Has my trip to Tucson made me susceptible to avoiding working on projects and practicing skills which I was building up momentum to before the trip?

Today may be a proper "no". Perhaps I have taken a break without it ruining my momentum.

We will see.

Sat Jun 3 05:56:59 UTC 2017

Let's check out my tickler.

Sat Jun 3 06:48:53 UTC 2017

All right, I want to start writing up a draft of my pygame skeleton draft.

Setting Up Wing Personal IDE Pygame Environment

Hello, I'm SilentKat and let me break down the assumptions and goals of this here thing:

  1. You are using a Windows OS (aka Windows 10, 7, 8.1, Vista)
  2. You want to program a game
  3. You're choosing python to program that game
  4. You're willing to use the pygame library to do a lot of the heavy-lifting
  5. You want to make an executable of your code that runs on any Windows machine

If any of these assumptions are wrong this probably isn't the thing for you.

Further assumptions:

  1. You want to setup your environment without using the command-line
  2. You do not have python already installed
  3. You want to program
Sat Jun 3 06:58:44 UTC 2017

Need to restart computer, to be continued.

Sat Jun 3 10:33:06 UTC 2017

Ended up applying to various places (notably Mixpanel.

Getting tired, will continue draft tomorrow.

Daily Entry: May 21th, 2017

Sun May 21 10:09:20 UTC 2017

Been really good about devoting time to projects. Yesterday I went down the rabbit-hole of why the pygame exe files I created on Windows 10 didn't work on my Windows 7 laptop.

I figured it out.

  • Python 3.5 and Python 3.6 is broken for creating single-file executables
  • Old python dependencies api-ms-win-crt-* are now all in one library on windows 10
    • Doesn't package right to play on old windows versions

Most of this information is contained in this PyInstaller issue.

I haven't been devoting any time to a project I was working on with a friend, and yesterday I hashed some stuff out with him and I'm going to try to devote some time to it today.

Sun May 21 10:25:31 UTC 2017

Realized I didn't like the formatting of some diary posts here and so I fixed it. Gotta not do line breaks within paragraphs. I'm used to markdown not doing line breaks for a single line break.

Sun May 21 10:28:14 UTC 2017

Okay, now work on project.

Sun May 21 11:43:00 UTC 2017

Ended up hanging with family.

Daily Entry: May 19th, 2017

Fri May 19 13:08:21 UTC 2017

Most of the code for the pygame_skeleton is done. I'll be pushing it today, and hopefully start making a post about how to setup the skeleton or something.

I'm really out of it today, but I want to build the habit of discipline, so this is good practice for that.

Daily Entry: May 18th, 2017

Thu May 18 07:40:17 UTC 2017

Started the day with meditation, then played a couple hours of Overwatch. Getting ready to work on a tutorial to setup pygame development on Wing.

Thu May 18 08:04:42 UTC 2017

It will be two repos on github, the first one to setup virtualenv stuff and the second to setup pygame with pyinstaller to make the executable.