Archive for the ‘Personal’ Category

Re: Please Don’t Learn to Program

Tuesday, May 15th, 2012

This morning Hacker News looked like this:
HN screeny

Jeff Atwood apparently thinks programming isn’t worth learning about, for most people. I think he’s probably right, in the sense that “robots aren’t worth learning about, for most people”. I can think of more examples. “Physics is not worth learning about, for most people”. But that’s rather obvious isn’t it? Why blog about it? Why blog about blogging about it? ;)

Here’s a retort from the guy who started CodeYear, which is the initiative Atwood is bashing.
Here’s another retort on Github.

I don’t understand why any of this stuff is worth arguing about. Why does Atwood care what people do with their free time? It seems there are a lot of assumptions being made about the motivations of these aspiring programmers. I see nothing wrong with CodeYear. I see nothing wrong with everyone knowing something about programming (hell, it’ll give me more to talk about at parties), just as I see nothing wrong with everyone knowing a little something about singing. Singing isn’t an essential skill for everybody’s daily life, but neither is math, really, though they both make life more interesting and are worth knowing about. These topics have the potential to enrich our lives, so why not learn about them?

Bang Pre-Alpha

Saturday, May 12th, 2012

I have a new ongoing project, it’s called Bang. It’s a canvas-tag based display list written in Javascript. I’m going to be using it in place of AS3/Flash in my web authoring tool chain. Bang on Github. There are three main elements of Bang that make it special:

Modules

When writing a project with Bang you keep your code separated in modules. Each module exposes a Javascript Object, like a constructor function. The modules object is passed into each module definition, exposing your module to other modules that depend on it. Keeping your code in modules like this means you need only expose one global variable, the list of modules. Any modules loaded this way are essentially sandboxed in that modules object.
You define a module in a similar manner to RequireJS and the AMD:

mod({
    name : 'MyObject',
    dependencies : [ 'bang::Geometry/Rectangle.js', 'myLib::SomeFile.js' ],
    init : function initMyObject(modules) {
        function MyObject() {
            this.x = 0;
            this.y = 0;
        }
        MyObject.prototype = {};
        MyObject.prototype.constructor = MyObject;
        return MyObject;
    }
});

The module system is another project of mine called Mod. I’ve written about it before. It’s very small and simple and it gets the job done (the job of code separation and later compilation).
Bang adds support for Google’s Closure Compiler to Mod, so once your project is ready to ship you can compile (in a sense), compress, obfuscate and pack your code down into a deployable script or a neato mosquito PNG. I like the PNG method because it’s slightly more obfuscated and adds further sandboxing, but that’s a topic for a later post.

It’s like Flash, but not too much like Flash…

Bang is enough like Flash/AS3 to be familiar, but sacrifices some AS3 similarities in exchange for simplicity and consistency. The complexity in Bang is very small. There aren’t any tricks to make it more Flash-like than it has to be and it won’t protect you from learning canvas operations. In fact, you’ll have to learn about the CanvasRenderingContext2D to do any real drawing. I’m not aliasing those calls and hiding it in a mock Graphics object for you! ;) And you should be learning these new technologies without crutches. Think of Bang not as a set of crutches, but as a set of wings, or at least a hammer and chisel. No one likes masonry-by-hand.

It is fast.

The original pre-alpha version of Bang takes Douglas Crockford‘s extremism literally. There are no uses of the keywords ‘this’ or ‘new’. It accomplishes (multiple) inheritance through special constructor functions that add functions and closures to objects (or creates new ones). This, although a departure from AS3 at first, actually gives projects written in Bang an AS3++ feel. Multiple inheritance is awesome. Private variables are awesome. With prototypal inheritance you lose private variables so by using special constructor functions we can create private variables through closures. These features are awesome, but as Martin Hunt of GameClosure pointed out to me, it’s not fast. Processing time will go up linearly with the number of properties and methods created in the class. This means that if you’re creating a lot of complex game objects every frame tick, the project will likely start chugging. This is not fast. Apps have to be fast! For this reason I started a new branch of Bang that uses traditional prototypal inheritance. This branch will include a dirty rectangles implementation for really lazy redrawing, and I have plans for using WebGL for rendering down the line. Stay tuned!

A tiny demo

Take a look at the source for this div. This is the compiled output of the main branch of Bang. It’s clean, right?!



<--- __
    |  |__ ___ _ _____ _____
    |  _  |  _  |     |  _  |
    |_____|___!_|__!__|___  |
                      |_____|
    you know, for javascripts-->

No longer freelancing

Friday, October 8th, 2010

I’ve signed on with my long time client Synapse Group Inc. This means more time coding for work (and maybe less time coding for fun). I have a couple speed projects in the works though, like continuing work on RTAudio bindings for Node.js. I’ve also switched names at github, which is inconvenient – but hopefully beneficial in the long run.

The blog has moved.

Tuesday, April 13th, 2010

Yes, that’s right – I moved the blog again. Now we’re hosted at Linode, which is cheaper and easier than Media Temple. The main url is now http://efnx.com instead of http://blog.efnx.com (though both should still work).

Game Progress 1

Saturday, July 11th, 2009

I’ve been working on another game lately, it’s called Machinista – it’s a game where you control motors in a 2D physics simulation. The entire thing is built around Box2D, which is a great physics system. Last night I worked on using Brownian Bridge fractals for explosions – check it out! Use keys W, A, S, D and shift+click to control the tank and make explosions, respectively.

The Universal Law of Deadlines

Monday, June 29th, 2009

A friend and I were talking about deadlines, as we’re often thrown into a rushed project together, and I came up with this equation which seems to accurately model a coming deadline in the information industry.

Scivally-Nagler’s Law

workload + stress = 1/(deadline - now);

Hannspree HF237 + Macbook Pro 2.16Ghz

Wednesday, June 17th, 2009

I bought a new monitor today – a Hannspree 23″. I only paid about $180 for it, so it seemed like a sweet deal. TOTALLY WRONG. This thing hurts my eyes it’s so sh*tty. Some pixels are sharp, others are blurry. It’s like the monitor itself is stretching and interpolating the pixel points from my video card. Text is UNREADABLE on most resolutions and no amount of settings fidgetry seems to fix it. The pixels just don’t line up. This thing is auto-dithering my pixel art. I’m taking it back tomorrow and getting my money back. I’d rather have a used, scuffed up LCD from two years ago. Tried and true.

Altered States

Saturday, May 2nd, 2009

I just saw this movie called Altered States, it’s pretty interesting – a little cheesy at times, but check out these screen shots:










Man, they don’t make movies like they used to.

New Hosting

Wednesday, April 29th, 2009

Over the past month or so I’ve been having some hosting issues – my cats would attack the server, some how it would get unplugged, etc. So now I’ve switched everything over to hosting at Mediatemple.net, which seems pretty awesome so far. So here’s to no more downtime, 404s or 500s and hopefully instead we’ll get some 808s. *cheers*

My Bike

Sunday, February 22nd, 2009

My bike up until this point has been a borrowed SR Maxima sr_max

Figure (A)

which belongs to my friend Chris [Chrispy Finch Fry!]. While he was living as a nomad I became the caretaker of two of his prized possessions: his bike and his goldfish [see Figure (B) ]. Since then I’ve continued to use his bike and take care of his goldfish.

Chris Finch's goldfish, Sampson

Figure (B)

Until today! My parents came up North [from LA] this weekend to deliver my grandfather’s washer/dryer tower and brought with them my Dad’s old road bike. It’s an Austro-Daimler SuperLeicht from somewhere in the 70′s. Vintage ace. I went to the shop today and picked up a nice Brooks saddle for it. Looks sharp.

My SuperLeicht
Drilled out brake handles. Awesome.

Check out these drilled out brake handles.

Originally it was a 10 speed, I believe, but one day my Father had some problems with the shifter while riding and when he got home he took it down to a single speed. I like it. The simpler the better. I don’t live in SF, so I don’t need a ton of gears.

Not a fixed gear, phew.

The accessories are all vintage Campagnolo, aquired piece by piece in the 70s by my Dad. The next step to making this guy look really nice is some new tan bar tape.


Follow me on GitHub
Follow me on Google+
Follow me on Twitter