Posts tagged with programming

Hi, blog! Been a while, huh? I’ve been busy lately. I’ve been working on a lot of stuff, but haven’t really been posting about it here, because I keep abandoning stuff before I feel like it’s ready to show the world. Well, no longer! Here is a new thing I’ve been working on this past week. I call it Donut Simulator, but that name isn’t really super descriptive. It’s a little population simulator; it randomly spawns a bunch of little circles with brains and they have to try to figure out how to eat food and reproduce. It’s cute and it’s been preventing me from getting actual stuff done because I keep staring at it, which I think is probably a good sign for a project.

Read more →

Syntax

Jul 21, 2015 in programming, thoughts

I want to talk about programming language syntax tradeoffs. This stuff has probably been said before, but I’ve been thinking about it a bit recently and want to write a blog post about it, because what’s this blog even for anyway.

I was thinking about people’s complaints about various programming languages, and it got me thinking about tradeoffs of features vs. syntax simplicity. What do I mean? Let’s look at some examples.

Read more →

A couple days ago I posted a little level editor that I made using Javascript and the <canvas> tag. Today I’m going to discuss how I did that. I’m basically discussing my learning experience here. I’m not really sure who is going to find this useful, to be honest, but I’m going for it anyway.

So first we obviously have to set up our canvas. I decided to make mine 256x256 pixels, and divide it into eight tiles per side. This makes the tiles 32x32 pixels.

<canvas width="256" height="256" id="can">you don't support canvas</canvas>

This creates a blank 256x256 canvas with a transparent background whose ID is “can.” The text inside the tag is what shows up to people whose browsers don’t support the tag.

Read more →