Archive for the 'Technology' category

Announcing Coding Math Video Series

Dec 12 2013 Published by under Educatioon, Technology

Those who know me personally, or have followed my work on this site for the last twelve and a half years (has it really been that long???) know that I go in and out of all kinds of programming subjects. From the early Flash experiment days I was always into math and physics and interactivity. I’ve created some fairly popular games (Falling Balls, Gravity Pods). I’ve enjoyed creating algorithmic art at, of which several pieces have been published or used in various contexts. And I’ve had a couple of gallery shows with my art. I’ve coded various other mobile apps. I’ve created a couple of very popular UI component sets – BitComponents, which were purchased by a company called BeamJive and published under their own name, and later the open source MinimalComps, which enjoyed huge success and popularity. I’ve worked on various build and process management tools, such as STProjectMaker, which has been pretty popular itself. I’ve revived my love of electronics from my youth and have posted a few things on that, which people have found useful. And of course I’ve written a dozen or so books on coding and spoken at dozens of conferences around the world. This is all above and beyond any coding I’ve done in my day job. Not a bad hobby!

So I jump around a lot, but as time goes on, I’ve been struggling to figure out that one thing that really drives me. When all is said and done, I think it comes down to teaching and educating others. That’s the one thing that I keep coming back to. I love to learn something and distill it down to its basics and then teach others in a way that is way more clear and easy to understand than all the stuff I had to wade through to learn it in the first place. Even when I create some piece of art or a game, and don’t publish the source code for that, I still have an urge to explain to others how to achieve the same effect, or mechanic, or whatever.

That’s one of the things I initially loved about conference speaking. But more and more, conferences are highlighting the more inspirational speakers. “Look at all this cool stuff I did. Work hard and someday maybe you can be like me.” Even the more technical speakers are generally just promoting some methodology they subscribe to or framework they created. There’s generally little room for teaching or education other than the few full or half-day workshop spots that some conferences do.

Writing books is awesome, but is a long, drawn out, several-month process before anyone but yourself sees anything that you write. This is true whether you’re working with a publisher or just doing self-publishing. And then people need to go buy the book to get anything out of it. I’ll probably do some more self-published books, but they will be shorter form I think.

Blogging is awesome. Or was awesome. I guess I just got burnt out on blogging. Does it show? 🙂

Earlier this year I was dabbling in woodworking. Set up a basement workshop and started watching videos by this guy Steve Ramsey on his Youtube channel, Woodworking for Mere Mortals. I don’t do so much on the woodworking front now, but I still watch every video he puts out, because he is so freaking awesome.

So I got thinking, maybe I could do something vaguely similar with coding. And thus was born…

The Coding Math Channel!!!


I cover a lot of the whys in the first video, but from what I’ve seen, a lot of coders struggle with math. They understand the language they are writing in, but when they are doing a layout or an animation or some kind of effect, they get bogged down in what formulas to use or what numbers to feed in, or what to apply those formulas to. This is something that, for some reason, has always clicked for me. And apparently, once it clicks for me, I’m able to explain in a way that helps it click for other people. I realize I’m tooting my own horn here, but this is what many people have said about my books and talks and blog posts. So I believe them.

Anyway, I figured I’d try to go over some useful math concepts, particularly as they relate to coding – the bits of math that coders need to know and will find useful. And not just cover the math as a disconnected, abstract thing, but use that math in code to demonstrate some kind of effect that you could really use in your own day-to-day programming. The video format is great for being able to draw rough sketches in real time while explaining some concept, and then switching over to demonstrate that concept while coding in real time, then showing the results in the browser – in real time. A flow that is not nearly as smooth in a book or blog post.

As of this writing, I’ve got four videos up there. I held off promoting this until I had at least a bit of useful content up there. I’m hoping to do minimally one video per week, probably publishing it on Monday mornings. I have a nice list of topics to cover, and if there’s any specific things you’d like to see covered, shout it out.

I know the production quality on these isn’t awesome. But I’m a noob here. Learning a bit more about the recording and editing process every time I do one, so bear with me. I think it will improve. 🙂

Also covered in the first episode is the rationale behind using HTML5/JavaScript as a base for these lessons. I’m not counting out the possibility of using other languages in some episodes though, as appropriate.

So, there you have it. Hope you find it useful.

2 responses so far

Playing With Chaos, August Update

Aug 22 2013 Published by under General, Technology

The book is done! Well, not done, done, as in out-the-door done. But I finished all the chapters and all the code and all the images. I’ve worked over every chapter 2-3 times myself and now the book is over to a team of tech reviewers and a professional copy editor. This will give the book the final polish in both the technical sense, making sure the explanations are correct and the code works, and also in a spelling/grammar/style sense, making me look more literate than I am. I’m already getting some great feedback from the reviewers, and while my ego always takes a huge hit at this stage of the game, it’s all going to mean a higher quality book that hits your hands. I’m hoping to wrap up this stage of things in the next couple of weeks and have the book ready on Kindle by mid-September.

I just wanted to make a quick comment on the activity of self-publishing. It’s been an amazing experience! I’ve written or co-written something like 12 books before this, which has been extremely helpful during the process of writing my own book. I have a pretty good idea how to structure things, what voice to use, the importance of consistency, how the various workflows go, etc. But doing the whole thing by myself … the analogy that comes to mind, though it may not make sense to you, is that it’s like the first time you go on a big trip by yourself. Not Disneyland with your parents, or those school or maybe even business trips, but the first time you decide you want to go somewhere, you choose where you’ll go, book the flight, book the hotel, rent the car, pay for everything, put it on the calendar, pack your own bags, make it out the door on time without forgetting anything vital, arrive at your destination, have fun, and make it back home alive. It’s all you, and there’s a sense of pride that you handled it all yourself. OK, to be honest, I still feel that way when I book a trip myself, but anyway…

That’s what this experience was like. I decided to write the book, came up with the subject, didn’t have to get approval from anyone at any stage of the process. Came up with an outline, started writing, came up with my own workflows, got my own reviewers and editor. When working for a publisher, as edits come in, I always felt like, “OK, whatever. They want it that way, we’ll do it that way.” Particularly in the late stage copy edits. I’d get a marked up manuscript with a bunch of corrections and some questions for clarification. I’d answer the questions and for the most part just blindly sign off on the rest of it. This time around, it’s so intimately my own creation that there’s a very different feeling that goes along with it. Any change I make that’s based on someone else’s advice is something I closely scrutinize. That’s not to say that I’m rejecting stuff outright, but I’m still 100% mentally involved in the process at this point and 100% focused, which is not always the case in the late stages of a publisher-controlled book.

Anyway, I guess it’s neither here nor there, but personally, it’s such a huge difference for me that I wanted to say something about it. At this point, I couldn’t imagine going back to a traditional publisher. Not that my experiences with them were bad – in particular, I always had a great time with the folks at Friends of ED – but being in charge of the process myself is so much better.

5 responses so far

Playing with Chaos – July Update

Jul 26 2013 Published by under JavaScript, Technology

Since my last post, I’ve been focusing almost all of my free time on writing this book. Mostly because I’m having so much fun writing it. I’ve finished a whopping six chapters since I last posted here. So yeah, it’s going pretty well. Here’s the current table of contents:

Chapter 1: Introduction
Chapter 2: What is a Fractal
Chapter 3: Symmetry and Regularity
Chapter 4: Fractal Dimensions
Chapter 5: Order from Chaos
Chapter 6: Diffusion-Limited Aggregation
Chapter 7: The Mandelbrot Set
Chapter 8: The Julia Set and Fatou Dust
Chapter 9: Strange Attractors
Chapter 10: L-Systems
Chapter 11: Cellular Automata
Chapter 12: Fractals in the Real World

I’m through Chapter 8 and heading into Chapter 9 now. Chapters 4 – 8 are first drafts, while 1 – 4 have been worked over a bit and are pretty close to final. I’d like to think I could be done with the writing by the end of August. Then another week or two for personal review and editing. After that I’ll need to have some other people review it and I’m considering how to handle copy editing – whether to hire someone or consider other alternatives.

One stroke of personal brilliance was that the utility library that is used in each example contains a method to pop out a bitmap image of the canvas that can be saved to disk. Built-in screenshots! So all the images for the book are easily created while I’m writing the text and code. Sometimes some cropping is needed, but I’ve got a good flow going for that as well. At this point, I’m up to 155 images. It’s a pretty graphics-heavy for a Kindle book, but I’ve been checking every image on a real Kindle and they all look decent.

If you want to get a feel for what’s coming, I’ve set up a site for the book at It’s got every image in the book, plus a video of the presentation I did at Beyond Tellerand/Play! that sparked my thoughts about writing this book.

2 responses so far

The Ridiculous Raspberry Pi Winamp Remote – Part II

May 14 2013 Published by under Physical Computing, Technology


As stated in my previous post, the plan was to hit a button that’s connected to my Raspberry Pi, which will trigger Winamp running on my pc laptop to play/pause. This without the Pi being physically connected to the pc – all via wifi and my local home network.

The hardware setup

Raspberry Pi with USB wifi, a small breadboard, 100k ohm resistor, a pushbutton and some hookup wire.

GPIO pin 25 goes to one side of the switch, 3.3 volts to the other. You hit the switch, pin 25 gets juice and goes HIGH. The 100k ohm resistor is also hooked to pin 25 on one side and ground on the other, connecting 25 to ground when the switch is not connected, ensuring it is in a LOW state. For those of you in the know, this is a basic pull down resistor. If you’re not familiar with the concept, as I was not last week, this is a good explanation:

The Python

The Raspberry Pi is running a simple program written in Python:

[php lang=”Python”]import urllib
import RPi.GPIO as GPIO
import time

BTN = 25

while True:
val = GPIO.input(BTN)
if val == GPIO.HIGH:

This just sets up pin 25 as an input and starts an endless loop which reads the value of pin 25. If it’s high, it pings a url and sleeps for a second. The sleep is so you don’t get multiple calls at once. There are more robust ways of handling this, but this was quick and dirty and works as long as I’m the only user and I know not to hold the button down too long.

So what is this url?

The Node

On my laptop where Winamp is playing, I started a simple node server. When a client connects to the server, it calls a function called playPause. This executes an external program called MediaControllerConsole.exe via child_process.

[php lang=”javascript”]function playPause() {
var path = “MediaControllerConsole.exe”;

var exec = require(‘child_process’).exec;
var child = exec(path, function( error, stdout, stderr)
if ( error != null ) {
console.log(“err: ” + stderr);
// error handling & exit

var net = require(“net”);
var server = net.createServer();
server.on(“connection”, function(client) {


So what is MediaControllerConsole.exe?

The C#

I had the connection from the Pi to my laptop. Now I needed Node to control Winamp. There may be some way to do this more directly, but I found that I could write a really simple C# console application that called SendKeys.Send() to trigger key presses on the machine. I looked in Winamp’s options and saw that CTRL-ALT-HOME is a global keyboard shortcut to Winamp’s pause function. It turns out that this actually acts as a play/pause toggle, which is even more perfect for my use case. Here’s the C# app I wrote:

[php lang=”c”]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MediaControllerConsole
class Program
static void Main(string[] args)

Since this was a console app and not a Windows Forms app, I had to add as a reference to the Visual Studio project and call SendWait instead of Send (which has more hooks into the forms stuff). The string “^%{HOME}” means that while holding the CTRL key (^) and the ALT key (%), press the HOME key.

Final recap

Pressing the button connected to the Pi sends pin 25 to HIGH which triggers Python to call across the wifi network to the Node server which starts a child process running the C# program which sends keystrokes into the system which Winamp is listening for, causing it to play or pause. All so I don’t have to reach over and press two keys.

Ridiculous! But it works!

3 responses so far

The Ridiculous Raspberry Pi Winamp Remote – Part I

May 14 2013 Published by under Physical Computing, Technology

Back story

I wanted a media center. I priced out cases, power supplies, hard drives, cheap motherboards, etc. and figured I could build one for a couple hundred bucks or so. Then I heard about people using Raspberry Pi’s as media centers. Did a bit of research and got me a Pi and set up OpenElec on it. Plugged in an old 500 GB USB drive. I had a media center for about a quarter of what I was going to pay.

Thing is, getting the Pi set up was so much fun, I decided to buy another one just to play with. A week later I bought an Arduino Uno. I even pulled my barely touched Beagle Board out of cold storage and plugged it in. I’ve been having a blast the last couple of weeks playing with all these new toys. Bought a bunch of electronic parts, breadboard, hookup wire, gathered up some other junk I had stashed here and there.

Pi, duino, beagle, semi-organized tronics junk

Back back story

When I was 11 or 12 years old, one of my class mates brought in this Radio Shack 75-in-1 Electronics kit and did a little presentation on how to hook up various circuits. I was amazed. I begged and pleaded my mom to get me one for Christmas. I actually remember the exact thought I had at the time – that with that kit, I would never, ever be bored again. I got my kit, and while the never, ever part was questionable, I certainly spent many, many, many hours playing with electronics over the next few years. I outgrew the kit and bought all sorts of other build-it-yourself stuff. I learned how to solder. I could tell you the difference between pnp and npn transistors and precisely how they worked on a molecular level.


Where I grew up was a vocational school, Blue Hills Regional, that offered an electronics program. It was perfect timing. I signed up to go there for high school. Then disaster struck, in the form of my own bad judgment. My stepfather was an electrician. In some misguided attempt to win favor with him, I switched from the electronics program to the electrical program and wound up becoming an electrician myself. I learned soon after graduation how much I hated being an electrician, stopped doing it, and it wasn’t until about 15 years later that I discovered Flash and programming and a similar joy to what I had found doing electronics.

Back to the present

So getting involved with the Raspberry Pi and Arduino and Beagle Board, I found myself playing with LEDs and resistors for the first time in decades. It’s been great rediscovering all this stuff I used to know back when I was just a kid. So I’ve become a master at making LEDs blink, but I wanted to do something that could be considered practical on some small level.

The problem

Great projects are often the result of solving some problem. My problem is controlling the media on my pc. These days I’m doing work on my Mac, but usually have some podcast or music playing on Winamp on my pc laptop. If I want to pause or restart, I either have to move the mouse over there (I’m using Synergy) and click on the play button. Or reach over and hit the function key and the media play/pause key. It’s a horrible problem, I know. Not sure how I’ve managed to go on this long. I try to be strong.

But my thought was to have a single button sitting on the desk. I push the button, the media toggles. A bizarre plan started to form. Have a button hooked to the Pi send a message across the network to toggle the music state. I have achieved this. And I’m sitting in the living room clicking this button relentlessly, starting and stopping the music playing in my home office. My wife has just retreated upstairs, pretending not to be annoyed.

The solution

Crap, this post is already too damn long. Stay tuned for Part II in which our hero details how he accomplished this nearly impossible feat in the most convoluted way possible, using only Python, Node.js and C#.

Click for Part II of this amazing saga.

One response so far

Building a MAME Arcade

Mar 08 2013 Published by under General, Technology


I grew up in the 70’s and 80’s. The golden age of arcade games. My best friend and I would hit up the various arcades in the surrounding town, and at 25 cents a game, I’d easily spend $10 for a couple hours of entertainment. My favorite game of all time, hands-down, is Tempest. In the arcades of the South Shore of Boston, I was the second best player. I could walk in to any arcade and get my initials on the high score board. Most often, after a few games I could get to the number one spot. Unless my nemesis had been there before me. Who this other person was, I have no idea. He (possibly she, but given the demographics of the time, most likely he) wasn’t amazingly better than me, but better enough to nudge me out of the top spot. I could usually get a number two spot though.

I was the guy people would stand behind and stare at in amazement. Granted, the only time I got such attention at that age was while playing video games, and only that particular one. I was pretty good at plenty of others, but Tempest was my forte.

Later years: Enter MAME

Well, time marched on, I grew up, arcades were replaced by home computers and XBoxes, etc. But I always remembered those old time games. Of course, I’ve installed MAME a dozen times and sought out various ROMs and had a good old time with them, but the holy grail of reliving Tempest was always out of reach. The problem was that Tempest requires a spinner. You spin the spinner to move around the screen and shoot the stuff that’s coming out of the tubes at you. There are plenty of workable Tempest ROMs for MAME, and Flash versions, and various copies. But moving around with the keyboard or mouse was an utterly lame experience compared to the real thing. A few years ago I went as far as getting a Griffin Powermate, thinking that’d work. No such luck. First of all, I was unable to even get it to talk to MAME successfully, and what I heard from those who had, was that it didn’t work all that well anyway.

Let’s just DO this

I most recently installed MAME while working on my Infiltration game, in order to get some Gravitar inspiration (another favorite). Of course, I gave Tempest another shot and had another bout of frustration. But this time I took it one step further and started to look into real game controls. Starting with these sites:

I came up with a list of vendors that sold game controls and various plans on how to put them together. I got a shopping list together from Ultimarc and bought some wood and started cutting and drilling. My plan was to first create an arcade control panel that I could just plug into any computer running MAME. Some people go all out with two- or even four-player control panels. I decided to start with a single player. I ordered a bunch of buttons, a joystick, a control interface, and the ultimate – a real arcade spinner.

The work


While I waited for the controls to arrive, I started preparing the wood. I bought a 2’x4′ sheet of half-inch wood at the local Home Depot. I cut a 1′ strip off the end to give me the 1’x2′ top of the control panel.



Ye olde workshop. (Yes, I keep a bottle of wine in my workshop. Don’t you?)



Control top.

Then I cut a piece of cardboard to the same size and experimented with some layouts, coming up with one I liked.



The plan was to have the joystick and spinner in the center, and three buttons on each side. Some games are all button based, like Gravitar or Asteroids – a pair of buttons turn you left and right and other buttons shoot, thrust, shield, etc. These are usually laid out with buttons on opposite sides of the panel. Other games are joystick / button based, and of course Tempest is spinner / button based. Generally, the joystick or spinner is to the right and controlled with the right hand and the shooting / jumping / action buttons are hit with the left hand. Thus, the main buttons are the ones on the left here. Then, on the top are the coin button and start game button (one player start).

That was about as far as I got before the controls arrived.

The controls are here!!!

The controls arrived on Wednesday of last week. Pretty quick considering I ordered on Satureday and they originated in London. I actually did not realize that when I placed the order with Ultimarc. But I’m VERY happy with what they provided, as well as the prompt service and quick shipping. Here’s everything:



Doesn’t seem like a whole lot for $200 something. But I have zero regrets.

What you see here are:

A. 7 gold leaf buttons. Actually I ordered 6, they threw in an extra green one.

B. A J-Stik joystick with red ball top.



C. A SpinTrak spinner. With a silver/red spin top and extra heavy flyweight. The weight gives it momentum. This thing will spin for a minute or more.



D. A MiniPac interface. With full wiring harness.



This lets you hook up a joystick, all your buttons, a spinner, as well as a trackball. You then hook it up to your computer via a mini USB cable and you’re good to go. It basically converts all the buttons and joystick movements into key presses, and spinner and trackball input into mouse signals. It’s set up out of the box to work with standard MAME inputs, but it’s also programmable so you could make any control send whatever signal you want. Here’s how you wire it up:



Took me two or three tries to figure it all out, but once you get the logic, it’s fairly simple. I could rewire the whole thing in five minutes at this point. The wiring harness is well worth it too – you just look up the color and hook it to whatever control it’s supposed to go to.

Alpha Test

My control panel wasn’t ready yet – no holes drilled or anything, but you know I had to see this thing in action. So I put my laptop down on the living room floor and started hooking up wires. Again, there were a few false starts, but I eventually got it at least partway functional.



Dang, that’s a mess o’ wires!

I grabbed one of the cardboard boxes that the stuff came in and cut a couple of 1 1/8″ holes in it. Stuck the #1 button in one and the spinner in the other. And fired up… Tempest! I wish I could describe how awesome that was and how excited I was, but you’d probably get really uncomfortable and click off to some other site. Anyway, playing Tempest with a real spinner, even if only mounted in a cardboard box was nerd nirvana. Several hundred times better than trying to make it work with a keyboard or mouse.



Here’s my daughter Kris getting her first taste of Tempest. She likes.



High tech.



Now you’ve seen my slippers. Feel like you know me better?

As for the joystick, I got that wired backwards AND upside down the first time. After switching all the wires I realized I just could have flipped the thing 180 degrees. I didn’t mount that in anything, just held it steady while Kris got her first experience with Space Invaders.



That’s the look of pure retro joy. Take THAT, Wii!

Making sawdust

Thursday night’s project was to mount this thing in the real control panel. Based on my cardboard plan, I marked out where I wanted all the holes to be.



Then drilled some starter holes.



Then used a 1 1/8″ spade bit to cut out the final holes.



Conveniently, the buttons and the spinner both fit in the same size hole, and that works well for the joystick as well.

Started mounting the components.



And wiring things up in back.





Here’s the frame for the sides.



Right now, the top sites loosely on top of the frame, but I glued some blocks to it so it doesn’t slide around.



Then put the bottom onto the frame and drilled a hole for the USB cable.



A bit of cable management.




And we are good to go!




Yeah, there’s one button missing, but few games actually use all 6 anyway. Originally I ordered 6 buttons thinking of just the 6 player buttons. I can still control MAME, enter coins and start using the keyboard. But when the extra button came, I decided to skip button six for now and implement the coin and player one start buttons on the top. I’m ordering some more buttons anyway – I’ll probably add a pause, reset and select at least.

The cabinet itself is completely unfinished at this point. But we’re having a blast with it. It’s amazing seeing my wife get into it as much as she is. She grew up in the same time and who knew she knows various Space Invaders strategies. She even mentioned some by name. Daaaaamn! The woman is geekier than she lets on. And it’s really awesome to see Kris discovering and enjoying the games that I grew up with. Anyway, I’ll eventually get around to sanding it down a bit and will probably just stain and shellac it. I’m already looking into project number two, which will be a standalone mini table top arcade cabinet, something like one of these. And if that goes well, I might even attempt a full size two-player model.

6 responses so far

2012 in Review

Dec 31 2012 Published by under General, JavaScript, Technology, Windows 8

Following a tradition several years in the running, I bring you my personal retrospective into 2012 and a glimpse into the new year.

In fact, 2012 followed much the same pattern as 2011 – some interesting stuff in the start of the year, a long period of just kind of being bored with everything, and then finding something to be excited about as the year drew to a close.

As 2011 ended, I was starting to get more seriously into JavaScript and web development. In early 2012 I posted a few opinionated opinions on object creation in JavaScript, which sparked some good conversation. I followed these up with a couple of articles on the same subject on the Adobe Developer Center.

In April I went to Beyond Tellerand – Play, a creative/development conference in Cologne, Germany. I revived one of my most popular talks, Playing With Chaos, for this conference, redoing all the examples in JavaScript. It went over amazingly well. The talk is always really well received. After that, I had the idea to turn the talk into a self published book and got a good start on it. But that kind of fizzled out after a couple of months. Perhaps I’ll revive it some time in the new year. You can actually watch the whole talk at the BT Play site, along with the other sessions.

It turned out that BT Play was the only speaking gig I did all year – the least amount of speaking I’ve done since I’ve started. I did have a couple of other opportunities to speak, but have not been super interested in doing so, to be honest. There are few if any “Flash conferences” around anymore, and even if there were, I’m not really doing any Flash these days. I don’t feel expert enough to try to get into the JavaScript conference speaking circuit. I probably could do more stuff like the chaos talk, which would go over well in any kind of creative type situation, but the impetus just wasn’t there for some reason. I guess another part of it is that the Flash conferences had a certain group of people you knew were going to show up. A large part of the pull to speak at these was the hooking up with friends from around the world and hanging out with them. I do miss that.

In June, my coworker and friend, Todd Anderson, and I went down to Austin for the TXJS conference, as attendees. It was very odd not knowing anyone else at the conference, and I’ll admit it, not having people coming up to me saying they read my books, blog, used my components, etc. It was also around this time that I started to get a bit bored with JavaScript. This statement needs a lot of clarification. I don’t have any problem with the language itself or what it can do. And at first, I was pretty excited about all the stuff happening in the community – so many new libraries and frameworks coming out all the time. But this latter part is what eventually got me bored with it. Too many frameworks, too many opinions. and everyone in your face telling you the RIGHT way to do things. I guess I was a bit guilty of this myself earlier in the year with my object creation posts. But I just kind of got tired of all the king-of-the-hill playing that’s going on in web development this last year or so. I got too caught up in the “how to” part and wasn’t really MAKING anything.

So you might have noticed that from June to August of this year I went pretty dark. Honestly I wasn’t even doing anything blogworthy. A bit of a technology sabbatical, covered well enough in this post. Also mentioned in that post is that Windows 8 programming is what pulled me back into activity. I now have two apps in the Windows 8 Store and am very close to having my next one ready for submission.

If it’s not obvious already, I LOVE Windows 8 programming. Everything I’ve done so far has been with HTML/JavaScript, which is the one thing that has most excited me over the last couple of years. But there’s very little of the community chaos that you get in web development. You are essentially developing for IE 10. So all the self-righteous, holier-than-thou web dev hipsters aren’t going to talk to you anyway. 🙂 I’m not a standards guru, but from what I know, IE 10 is pretty good. And even if it’s not 100% standards compliant, since you are only developing for the one platform for desktop Win8 apps, it’s kind of a standard itself.  There’s none of the cross-browser / cross-platform stuff to worry about. Basically, you can just ignore all the noise and MAKE stuff. And that’s what I’m doing. And loving it.

On the job front, I’m still at Infrared5 and that’s all going pretty well. Although nothing jumps out as being hugely exciting there for me in the last year, there were no huge problems either. I did one project in ActionScript / Flex / Desktop AIR, which was pretty unique in that it embeds a Red5 server in the app itself to do local recording of video. I have Paul Gregoire to thank for the Red5 help and in hacking together a stripped down version of the Red5 server that could be run on the low end hardware we were targeting. It was quite a technical challenge and worked out pretty well. Most of the rest of the year I’ve been doing iOS stuff for a client of the company that keeps hiring me back. Earlier in the year I helped build out a custom iOS library for the client, and in the latter half, I’ve been helping to build an app based on that library – truly eating my own dog food! It’s an interesting situation to be working with the black box of a closed library that you helped build but no longer have access to the source of. A bit frustrating at times, but quite an eye opener as well.

So what’s in store for 2013? More of the same. Specifically, my plan for the moment is to participate in this: The One Game A Month… er… project? It’s not a game jam, it’s not a contest, it’s just a couple thousand people who say they are going to try to make a game each month for 2013. Fantastic idea. I’ve spent way too long on the game I’m currently working on. That’s a common problem with any personal programming project. There’s no deadline, so you fiddle with it forever, trying to make it perfect, eventually get bored with it and start something else. This boxes out your time. One month. Get it done. Ship it. The game I’m working on now will wind up being my January game, and I have a great concept for February. I’m excited about this.

I also really do plan to do more blogging. I’m going to try to put something up 2-3 times a week. Probably a lot of it will be about the game I’m working on at that particular time. Any tricks or tips, problems or insight.

Also, as many of you know from my tweets, G+ posts, other comments, and occasional mentions on this blog, I’ve been heavily into running in the last few years. This past year I ran my first two marathons and am now in training for my first ultramarathon, a 50K (31 mile) trail race in April. I don’t like to put too much of that info on this blog, but if you are interested to hear more about that, here’s another year in review post from that viewpoint, on my personal blog.

2 responses so far

Look Who’s Back In Town

Sep 30 2012 Published by under General, Technology

You know what I hate? Subscribing to a blog and that blog doesn’t get updated for months and the blogger shows up and says, “Sorry I haven’t been blogging, been really busy, blah, blah, blah. But I’m really going to start blogging now!” and then they don’t blog for another few months and come back and say, “Whew! Still so busy! But I’m really going to get back into this blogging thing now! I promise!” and there’s no actual content in those posts, just promises of impending awesome content. That’s what I hate. That, and silverfish. Those things freak me out.

So, I’m not going to apologize, I’m not going to tell you how busy I was, and I’m making no promises. But, I will tell you what’s been up, what’s up, and what might be up in the future.

What’s been up: not a whole heck of a lot, to be honest. I kind of took a coding sabbatical. Of course, I’ve still got a full time job where I code all day, but historically, that’s only a warm up to the cool personal projects I work on when I get home. But for the last few months, I haven’t really been coding anything at all in my own time. In the few months before that, I’d started all kinds of various projects, apps, games, etc. These dead orphans litter my hard drive. Finally I just stopped forcing it and let myself have a coding vacation. Honestly, for about a month, I’d often not even open my computer at home. I’d check my email and do any other web related tasks on my Nexus 7. If I did open my computer, it was likely to watch a movie or some TV show, or log my runs of course. And you know what? It felt GOOD! Consider that in addition to my full time job, I’ve been coding at the very least, a part-time job’s worth of projects for most of the last 13 years – at times no doubt another whole full time job’s worth of projects. Not that this was something I didn’t like. Obviously, I did it because I love programming and creating cool stuff with code. But damn, you can get burnt out after a decade or so doing that stuff. So yeah, took a couple months and just said screw the code. Had no real plan of when I’d be back or what I’d do, but knew something would come along and yank me back out again.

So what was I doing? Running, reading, (finally) learning to play guitar, maybe spending a bit more time with the family.

So what’s up now? Would I be blogging if I were still playing hooky? Of course not. For the last two weeks or so I’ve been coding up a storm.

What happened was that about a month ago I installed Windows 8 on my PC. I’d previously had a dual boot system on a single hard drive – Linux and Windows 7. That was OK, but it limits your space on both systems. When I decided to try out Win8 I wanted to be able to install whatever I wanted without worrying how much of the disk it ate up, and the same in Linux. So I pulled out the optical drive and bought an adapter tray that allowed me to install a second hard drive in there. Now each drive had its own full 500GB disk. Installed Windows 8 on one, and Ubuntu 12.04 on the other. Great.

My first day on Windows 8 scared me to be quite honest. The whole Win8 interface (formerly known as Metro) looks nice, but is so damned different, I had no idea what to do or where to find anything. After a couple days though, I started learning the gestures and shortcuts and it really all started growing on me. Before long I was using Windows 8 pretty much full time.

The next thing that happened was that my friend, Jesse Freeman, joined Microsoft as a Windows 8 evangelist, and started bugging me to make Windows 8 apps. It did intrigue me, and Jesse is pretty persistent, so eventually I downloaded Visual Studio 2012 Express for Win8. I created one of the sample apps and ran it and messed with the HTML a bit, but didn’t immediately get hooked. But I had an idea.

When I was off doing nothing, I did have one concept for what I wanted to do – revive my Art From Code site and create a framework in JS/Canvas that allowed me to make high resolution generative art pieces that could be printed. Most of the stuff on the site now is not high res enough for quality printing. I had some very cool ideas for how this framework would work, including saving of code, parameters, and results, so that the pieces could be regenerated and rerendered at varying resolutions. One sticky part of it was saving the images as bitmaps. If you are working in a web page, you can get the canvas’s image data and assign it to the src of a new image and display that image. You then have to right click and save the image. Not very elegant, and in my experience the browser constantly chokes on large images. This would be a problem.

So I asked Jesse if it was possible to save a canvas as a bitmap from within an HTML-based Windows 8 app. I’d googled around a bit and it didn’t seem like it. But he came up with a great link that worked like a charm. I made a quick sample and I was hooked! From that day, for the last couple of weeks, I’ve been working on an app that generates artwork and allows the user to save it. Although it was just a proof of concept for the app I plan to make for myself, it was cool enough that I just submitted it to the Windows 8 Store.

That was the first personal project I’ve actually completed start to finish since May of this year. And I’ve already started on my next app – a Windows 8 port of Falling Balls! So I guess it’s safe to say I’m back.

Like I said, no promises, but there are lots of things I’d like to blog about at this time – the app itself, the technology behind Windows 8 apps, and the submission process, to name a few. So who knows, you might see some more posts here before the end of the year.

5 responses so far

STProjectMaker – Sublime Text 2 Plugin for creating new projects

May 20 2012 Published by under Extensibility, General, Technology

Note: I changed the name of the plugin from “SublimeProjectMaker” to “STProjectMaker”. The github address is also different now because of that change.

I love Sublime Text 2. But one thing I’ve always felt was missing was the ability to easily create a new project. I understand the difficulties involved. Sublime handles many different languages and projects of all different types. Each type of project in each language could have a completely different setup. There is no one single project type that could possibly work for everything.

Unfortunately, that means that to create, say, a simple HTML project, you need to open Sublime, close whatever project is currently open, then do a “save project”, saving the non-project as a new project, creating a directory and also naming a project file. Then you have to add that folder to the project. Finally, you have to create the actual project files – .html, .js, .css, etc. and hook them all up to each other. I’m not even talking a complex project, you have to do all that for a simple hello world type program.

Luckily, its creators made Sublime Text 2 incredibly extendable with a plugin architecture allowing you to write your own plugins that tie into the core UI of the editor. For quite a while I’ve had the idea of creating a plugin that would simplify the creation of a project. My first stab at it can be found here. That, of course, wasn’t a plugin, but an Ant build file that copied files over to a new directory and created the project file. It worked, but required Ant to be installed, and you still had to create a directory and copy a bunch of files into it and then open a command line and run the build file. And creating a new project type would have been a major pain. Even I stopped using it after a while.

Finally, at the end of last week and over the weekend I got around to working on my plugin idea. Sublime’s extensibility layer is based on Python. I broke out my old Python books and got to work. A major challenge beyond that was the fact that large portions of the plugin API are not at all documented. Throughout the documentation you will see suggestions to look at existing plugins and commands to see what low level commands are available and how to use them. That made it quite a bit of a struggle at times, but it was a fun challenge, seeing bits and pieces of functionality come together.

And so I present STProjectMaker. It is a full fledged plugin that lives within Sublime Text 2. When you call it up, you are presented with a list of templates. You choose one and then choose a location for your project. The template is scanned for any replaceable tokens and if any are found, you are prompted to provide values for them. Finally, the folder containing your new project is opened with the system file explorer application.

Templates are merely folders of files. At the moment there is only a bare bones HTML/Canvas template, but you can create your own very easily. I’ll be creating more and it’s my hope that others will contribute some as well.

There you have it. Hoping it’s useful.

8 responses so far

Playing With Chaos: The Book

Apr 29 2012 Published by under General, JavaScript, Kindle, Technology

Well, the title gives it away, so I just need to elaborate. I had so much fun and did so much research and wrote so much code for my Playing With Chaos presentation, and it went over so well and was very popular. But in the 45 minutes I had last week, or even in a full hour of talking, you can barely scratch the surface of the simplest bits of math or code and only show a few quick images or demos of each example. And there were lots of other examples that I didn’t even have time to touch on. I would love to be able to cover all the topics I had in mind, and go over each one fully enough, with well explained code. Thus, I’ve been thinking of writing a book based on the presentation.

The truth is that I’ve been thinking of writing this book for about a year. But doing the presentation at Beyond Tellerand – Play! solidified the idea. Here are some details about my plans:

1. I’m going to self-publish the book. I’ve been really interested in self-publishing for a while. This will be an experiment to see how well it works for me. The biggest thing I’m concerned about is the editing process. I’m sure I can dig up a technical reviewer or two, but the copy editing phase where someone at the publisher fixes all your spelling and grammar and unifies your tenses and persons and numbers, etc. is invaluable. I actually do understand grammar pretty well, but in a longer piece of writing I can lose track of the style I’m using and jump back and forth. It will take an extra reading or two with extra attention on this stuff to get it down. Or perhaps I’ll find someone willing to help me out on this point.

2. I’ll be going through the Amazon Kindle publishing service. I think this offers the best form of distribution, discoverability, protection, commerce, etc. In addition to being able to read the book on any existing Kindle, it can be read on any iOS, Android, Windows Phone 7 or Blackberry device and on any computer via standalone reader apps or the Kindle web app. This also allows me the option to publish through other services such as B&N Nook and Apple iBooks as well. In addition, there are services that will publish hard copies of your Kindle book on demand for those who want to kill trees. 🙂

3. I will not be doing a Kickstarter project for the book. I don’t believe most books require any kind of start up capital. Unless you need to do some kind of heavy research, travel, or buy some expensive equipment, or quit your day job and write full time, there is really no up front cost. You sit down and write the book. The only thing I might need to pay out for would be a technical reviewer and/or copy editor, and that would be later and something I’m sure I can work out. I’ve contributed to funding two books over the last couple of years on Kickstarter and neither one of them has yet seen the light of day. It leaves the author in an odd position of being responsible to many people, but with no single person invested so heavily that they are going to bug him daily to meet deadlines. I’m not even sure there is any penalty if you get funded and never release the thing you were funded to do. Do the contributors eventually get their money back if nothing happens?

4. The examples will be done in JavaScript with HTML5’s Canvas. This may or may not be your favorite platform, but I feel like it offers appeal to the widest potential audience. Even if you’ve never done any serious JavaScript, you can fire up a text editor and browser and be coding and running HTML/JS in minutes, for a total cost of $0.00. If you’ve done any programming in any other language, JS is a piece of cake to pick up, and generally easy enough to convert into the language of your choice. Few other languages require so little monetary investment, so little setup for a coding environment across the boards, and such a low learning curve for the language itself.

5. Right now, the TOC stands at 12 chapters, but that could change and rearrange. Right now I’m most of the way through the introduction chapter and have been working on developing a base package that all the examples can use to prevent massive duplication of code. The goal is to not rely on any major third party libraries just as jQuery, etc., and not to create something so complex that it becomes a heavy dependency. Basically, it’s just some boiler plate to grab the canvas, 2d context, some properties like width and height, and various utility functions for commonly used operations.

So watch this space for various updates over the next few months. Maybe even some teaser images or live demos. I haven’t really got a solid deadline in mind, but roughly hoping to be done by the end of the summer.

10 responses so far

« Newer posts Older posts »