josh.earth

Posts tagged: code

JavaScript Getters and Setters: Why U No Use Dem?

Javascript has always had properties but recently support for property accessors and mutators was added, or rather it is finally supported in enough browsers that we can reliably use it. Property accessors and mutators are what we would call in the Java world "getters and setters". The cool thing about the new JavaScript version is that you don't call the getX method. Rather you can set a property the way you always have, as a variable assignment, but the accessor method is called underneath.

Read more...

Genetic Programming: AI Opening Disappointment

For some reason the concept of Genetic Programming got stuck in my head the other evening. At midnight, after spending about four hours reading up on the topic around the web, I came away disappointed. The concept of evolving code the way genes do is fascinating but the results in the field seem to be very narrow and limiting. Thus began this rant.

Read more...

iBooks and an HTML Experiment

With all of the hoopla last week about the innovative features in the new iBooks 2 I thought it would be instructive to see what could be done with pure HTML 5. I put together a little demo which adapts to screen sizes and has simple interactive content. Here's what it looks like:

Read more...

HTML Canvas Deep Dive

Today I'm doing a three hour hands on tutorial at OSCON on HTML Canvas. All you need is a text editor, Chrome, and basic JavaScript knowledge. By the end of the session you'll know a ton about Canvas and have built your own little video game that can run almost anywhere. The full lecture notes and hands on lessons

Read more...

Playing with Noise

While I have many projects in progress right now, including Amino, Leonardo, getting the TouchPad out the door, and having my first baby (only a few weeks left!); every now and then I just get something into my head and have to code it out. Last night it was noise functions.

Read more...

Josh's Quick Intro to RegEx

You may be a new programmer, or a web designer, or just someone who's heard the word 'RegEx', and asked: What is a Regex? How do I use it? And why does it hurt my brain? Well, relax. The doctor is in. Here's two aspirin and some water.

Read more...

Amino and Leonardo: Next Steps

Another month has gone by with no update to Leonardo, or a real release of Amino. It's interesting how life changes. When I started this projects last summer I had no idea Jen and I would be having a baby in a month, nor did I truly have any notion how much my life would change. Everyone always says having children will change your life, but you never really understand it until you do it yourself, and our journey has just begun.

Read more...

Amino 2: Overall Design

When redesigning Amino I had a few core goals. These goals are in place to guide the product and ensure we created something genuinely useful, and not become "yet another gfx lib".

Read more...

SideHatch

Below is a screenshot of a debugging app I've been working on called SideHatch. It essentially lets you open up your Amino app from the side and poke around at the innards.

Read more...

HTML Canvas Export for Leonardo

Jen was working today, so I spent the day fixing bugs and coding new features in Leonardo. Today's awesome feature: HTML Canvas Export. Yes, oh yes! You can draw anything you want in Leonardo, then export it to JavaScript code that draws into Canvas. Why would you want such a feature. Lots of reasons:

Read more...