The latest news, project announcements, etc.
|
posted 26 May 2012 21:49 by Simon Hildebrandt
[
updated 26 May 2012 21:50
]
My drummer instructor blew my mind during class the other day. He explained that with each technique we practised there was predictable shortcut or bad habit that students fell into - almost completely subconsciously, each of us says something like: "the kick has been on the same beat as the snare in everything I've played so far, so every time I hit one, I can just hit the other!" or: "The kick is always on the first beat - easy!" Now, the first lessons *are* simple, because it's a huge challenge to retrain your brain for full, four limb independent action. But the real shock comes when you realise *every single practice pattern* is designed to subvert the shortcut your lazy self picked up from the *previous* pattern. On some level (at least for me) a voice is constantly whining: "but, but, but, I thought I'd understood one of the *rules* - now you're asking me to break it? When do we get to the *rules* then?"And now I've realised how broadly this applies - from the way Terry Pratchett describes teaching as 'lies to children' (a nested set of simplifications that we unpack as the student comes to understand each layer) to the way people describe experts as the ones who 'know enough to know when to break the rules'. And I think the thing I find so seductive about drumming is that in every case, breaking a 'rule' is more akin to letting go of an assumption - often when you do, a whole new sphere of possibilities and variations balloons out in front of you.
Drumming is one of the hardest things I've ever learned - for one, anyone who knows me knows how I feel about doing something I'm not already good at (here's a hint - my fragile ego finds it painful and humiliating). For another, I've got very bad habits regarding necessary, repetitive tasks (generally, if I have to do something twice I'll either write a script to do it for me, or I'll ignore it until it goes away) - so my practice schedule isn't what it should be. But despite the temptation, I haven't given up - because as my instructor says, playing feels right in a way that nothing else does. So thanks for your patience, Andy. :) |
posted 15 Apr 2012 19:10 by Simon Hildebrandt
The time has come, the Walrus said...At Red Ant the main thing we sell is time - project manager time, designer time, developer time - so keeping track of time accurately is paramount. For this we use Harvest, and while we've seen other web apps come and go Harvest seems to have stuck around. (This might be the highest endorsement we can offer - it's one of the few tools we haven't replaced.)
Part of the appeal is the wide range of ways we can access it, and we use them all - a nice web interface, desktop widgets, mobile apps, a robust API. In some respects the API is the nicest part, though, because that means that any feature it doesn't have, we can build. The ItchAs they say, these things usually start with an itch. For me, the itch was that when confronted with a technical problem, I tend to jump right in - and I regularly forget to start a new Harvest timer when I start working. If I'm concentrating on the problem, I'm neglecting my timers - if I'm mindful of my of my timers, I'm distracted from the task at hand.
What seemed called-for was a simple, highly visible display of my current Harvest status. Seeing as my primary browser is currently Chrome, a Chrome extension was the logical choice. Break on through to the other site
The former is a challenging problem - Chrome doesn't currently offer API access to it's 'saved passwords' system, so I had to fall back on the security Chrome uses to protect personal user data on the file system. The latter is a serious problem for normal JS development (with hacky fixes like JSONP) which prompted Google to include a 'permission' facet to their extensions API, allowing users to accept a whitelist of domains that the extension is allowed to access.
After tackling those challenges I had a 'badge' (a Chrome UI icon able to display a small image and/or a few characters of text) that turned an an eye-catching red when I was neglecting my timers. More Itching, More ScratchingUsually a feature demands the manner in which you implement it, but equally sometimes the implementation suggests new features. To test whether a timer was active I was collecting all the timer information for the current day, so it seemed natural to display that information (if only while testing the main purpose of the extension.) An extension 'popup' (a small pane that folds out when a badge is clicked) seemed a natural place for this, so that was the next feature added. Showing timers in the popup naturally suggested that you should be able to click on them (thus switching timers) so that went in next. I stopped short of adding a full interface for creating timers because that seemed more natural to leave in Harvest's web interface, but while mulling that over I stumbled on to another use case that isn't quite natural for me while using Harvest.
I log time every day on maintenance tasks like reviewing the status of our servers, triaging my ticket queue and otherwise staying responsive to customers, project managers and other stakeholders. Harvest offers a mechanism to clone tasks from one day to another, but this isn't analogous to what I think of myself as doing (interacting with a 'default timer') and is a bit click-intensive for my likes. So, could I come up with a mechanism that was natural for users to create these default timers and and start/stop them?
Creating them was relatively easy - Chrome extension options pages are just HTML so with a little jQuery I could work up an dynamic form with all the necessary fields. (The only complication is that the options available in the defaults are sensitive to the user credentials provided - my solution for this is a little hacky and I think I might rework it in the future.) My initial efforts to manage them was a bit of a misstep though - creating timers in Harvest also starts them (a sensible default) meaning that 'creating' them new each day meant that they were running for the moment I set them up, regardless of the user's actual behaviour. So I switched tacks and implemented them as a kind of 'ghost' timer - featured in the list of daily timers, but not created until the user actually clicked on them to switch to them. (They're blue in the interface, for those playing along at home.) Works like a charm, and feels very natural. ConclusionsAs my first Chrome extension, I found the learning curve pretty gentle. I'm an experienced front- and back-end developer, though, so YMMV. Certainly my previous Javascript experience stood me in good stead - particularly my knowledge of a handy Javascript library (jQuery) and it's availability via Google's hosted option leapfrogged me through the development pretty quickly. Google's documentation for extension development is clear and accessible, and my only real frustration was the lack of access to Chrome's password safe - hopefully we'll see that added in the future.
Ultimately, while some might argue against developing browser-specific extensions (given the ebb and flow of browser popularity) I'm confident that the productivity gains from this will make it well worth the time it took.
|
posted 4 Apr 2012 17:38 by Simon Hildebrandt
[
updated 4 Apr 2012 18:02
]
More mixed news - my Shapeways print arrived, but when it did, the box looked like this →
...you can imagine my disappointment - UPS, for shame.
 To my surprise, though, the damage was relatively light - the main chassis was surprisingly solid, and thus unharmed - it was only two of the legs (which, admittedly, we're extremely thin and fragile) that were damaged - one weakened in two places, the other snapped through in one.
So now my desk looks like this ←
...as I conduct repairs.
Important lessons include:
- Shapeways aren't kidding - thin prints are problematic to say the least. Frustratingly, I think the legs would have looked better made thicker, but there's some things you can't tell 'til you're holding the finished product. Which is really the whole point of rapid prototyping technology like this.
- Interlocking pieces should be designed with actual margins - 3D printing is an additive process (unlike, say, laser-cutting, where kerf actually shrinks your pieces) so components are more likely to be too big than too small - margins should be added to compensate.
- Blender's boolean modifiers worked really well for both throwing the legs together really fast, and hollowing out the chassis - favourite feature so far. :)
All in all, though, I couldn't be happier. Although the perceived risk was much greater (Building something in 3D versus 2D, shipping from the other side of the world versus other side of the city, or from NZ) I feel like this tops all my laser-cutting experiments in terms of success. In terms of cost versus reward, I think I can count myself a convert. :)
|
posted 1 Apr 2012 17:07 by Simon Hildebrandt
[
updated 4 Apr 2012 17:52
]
First, the bad news - after a lot of work building my robot model and sending it off to Shapeways, it got rejected - and most frustratingly it wasn't immediate (at the upload step) - it wasn't until a human looked at it a week or two later that they spotted that I'd made parts of it too thin. Better that than a failed print to be sure, but it was still pretty demoralising.
The good news is that it wasn't too hard to change the model into something could be printed - and in the process I learned a valuable lesson about baking Blender modifiers into a mesh, versus leaving them unbaked. :)
|
posted 17 Mar 2012 18:25 by Simon Hildebrandt
The main issue was Javascript origin policy - because I was collecting the data from Flickr's servers jQuery's normal getJSON mechanism won't work - you need to break out the 'jsonp' mechanism, and that means digging down to the 'ajax' method.
The other useful thing to know is that Flickr's default JSONP callback is called 'jsonFlickrApi', so make sure to drop that in the parameters for the ajax call.
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
var api_key = '<api_key>';
var user_id = "75427932%40N05";
$.ajax({
url: "http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=" + api_key + "&user_id="+user_id+"&format=json&callback=?",
dataType: 'jsonp',
jsonpCallback: 'jsonFlickrApi',
success: function(data) {
if (data.stat == 'ok') {
$(data.photosets.photoset).each(function(i, photoset) {
var thumb_url = "http://farm"+photoset.farm+".staticflickr.com/"+photoset.server+"/"+photoset.primary+"_"+photoset.secret+"_t.jpg";
var photoset_link = "http://www.flickr.com/photos/"+user_id+"/sets/"+photoset.id+"";
var el = $(document.createElement('a')).attr('href', photoset_link).append($(document.createElement('img')).attr('src', thumb_url));
el.append($(document.createElement('em')).html(photoset.title._content));
$('#thumbs').append(el);
});
}
}
});
});
</script>
<style>
#thumbs a {
display: block;
float: left;
margin-right: 20px;
width: 80px;
}
#thumbs img {
border: 1px solid gray;
padding: 1px;
}
#thumbs em {
display: block;
text-align: center;
}
</style>
</head>
<body>
<div id="thumbs"></div>
</body>
</html>
|
posted 2 Mar 2012 22:34 by Simon Hildebrandt
[
updated 4 Mar 2012 15:16
]
After seeing David's efforts with Blender and Shapeways' 3D printing service, I decided to take a swing at it myself.
Inspired by a cute animated film called Burning Safari, I spent a few hours hacking around in Blender - here's the result:
That's a two-piece chassis and four detached legs - now, let's see how well it prints... |
posted 13 Jan 2012 17:57 by Simon Hildebrandt
Just a quick post to show off what I've been playing with recently - Laser cutting:
...and Blender/Unity:
(That's a cartoony little taxi, with it's wheels yet to be bolted on...) Now, off to narrate another story - Tony is a harsh task master. :)
|
posted 23 Oct 2011 04:16 by Simon Hildebrandt
[
updated 23 Oct 2011 14:05
]
My narration of Joe Haldeman's "Never Blood Enough" just landed on Starship Sofa. Enjoy. :) |
posted 8 Aug 2011 03:21 by Simon Hildebrandt
[
updated 8 Aug 2011 03:30
]
To start with, we need to do a little setting up and brainstorming. To this end we've:
This all allows us to test our tools, and start experimenting without getting too deep into code up front.
|
posted 3 Aug 2011 16:05 by Simon Hildebrandt
Like most things, programming is something you learn by doing. With that in mind, I'm embarking on a project to teach my friend Peter some programming skills the most entertaining way I can think of - by writing a game.
Game Idea: DNJNLY
DNJNLY, or 'Dungeonly' was inspired by researching 'Roguelike' games, and Desktop Dungeons. It looked like one of those deceptively simple game ideas - something easy to make a basic version of, but with lots of opportunities for complexity.
My language of choice for this project is Python, for a couple of reasons. Python combines great readability with great library support, meaning that we'll be able to build quickly and easily, while experiment along the way.
Particularly, we'll be making the most of PyGame, the famous Python library wrapped around SDL. PyGame has a strong established community, and is particularly friendly to newbies, so it's perfect for our purposes.
Something people often underestimate when building games is the amount data involved. To keep manage and share our level assets and other structured data, we'll be trying Google Docs.
We'll need something to keep track of our code and art assets, particularly because we're working from different countries (The Netherlands and Australia.) Google Code has served me well in the past for basic Subversion project hosting, and TortoiseSVN is a solid, newbie-friendly tool for accessing Subversion. (For a more advanced project I'd probably use Git/Github, but I find that a little less friendly to new users.)
|
|