Opera Labs Releases WebGL Preview
20110301
Fans of the Opera web browser and 3d graphics (of which I am both) have reason to celebrate.
Fans of the Opera web browser and 3d graphics (of which I am both) have reason to celebrate.
Silent Death is a fast and fun space combat miniatures game. Previously I began working on a browser-based ship builder app. That app is now open source, with code available on github.
Ruby is a programming language that is both easy and powerful, and makes a good choice for someone learning to program. Whether you used to program and want to get back into it, or you’ve never programmed before, learning to program with Ruby is easy and fun.
While Scripty2 looks great, drag and drop is still in development and I’m continuing to work with Sortables in Scriptaculous for the time being.
I’ve uncovered what looks like a drag and drop tree bug, and in this post I’ll go over the code to fix it.
When it comes to turn-based strategy games, I’ve long preferred hexes over a square grid. Naturally in working on my own projects I want to use hexes… but at first glance it seems the coordinate system for hexes must be much more complicated.
It’s actually easier than you’d think, I’ll show you how.
I used to keep track of personal finances with Microsoft Money, but it’s not exactly suited to my needs.
Enter Bucketwise, a personal finance rails app that’s open source – hence ready to be customized.
A new, less saturated, coat of paint and a shorter URL – 3DM Design has been relaunched!
I’ll soon be moving the blog to http://3dmdesign.com/, and likewise updating the feed URLs to http://3dmdesign.com/feed and http://3dmdesign.com/comments/feed.
Rails has a bunch of JavaScript helpers, but once you move beyond those and want to write your own JavaScript code for your application, you may find yourself dealing with some JSON produced on the server-side.
By default, the to_json method in Rails is probably a lot more verbose than most people want. I’ll share a few tips on how to tame it.
Question: How can I slim down the output of to_json in Rails?
JavaScript is not Ruby, but it does offer syntax that can lead to expressive code. There’s one case where JavaScript could have gone a step further and given us even more expressive code syntax, when dealing with object literals or anonymous objects.
It’s been a long time since I’ve worked on a Rails project, but it feels good to finally get back to Ruby on Rails.
Coding interactive behavior into “dumb” HTML elements is one of the basic scenarios for JavaScript use. The standard method is usually to hunt through the DOM looking for elements of a certain id or class and attach an event handler function directly to each one.
For most types of events, there’s a better way: Event Delegation. At the basic level it involves attaching an event delegation function to a parent element, then catching events which bubble up and passing them off to specific handlers based on the event’s target.
Last time, with part one of this Learn to Program with JavaScript series, I introduced some basic HTML with an interactive tutorial. As JavaScript works very nicely inside a web page, this gave us the foundation. Now it’s time to add actual JavaScript on top.
Just like other aspects of an HTML page, JavaScript goes into a specific tag. The <script> tag, to be precise. Try out the first example to see our own version of “hello world” in JavaScript:
There are times when I just need to process some text quickly and efficiently. Regular Expressions are very well suited to this task, and now I’ve released my own JavaScript Regular Expressions tool for just this purpose.
I’ve recently become interested in Comet, as a web technology, and Orbited, as a Comet server. For anyone else starting down this path, I thought I’d write up the summary of this weekend’s quick foray into event-driven server-sent-messaging goodness.
For those not familiar with Comet, you’re either not a front end web developer or you’ve been kept in the dark. To sum it up quickly, Comet is a technology like Ajax. While Ajax basically consists of an asynchronous request by the client to the server, followed by the server’s response, Comet is a bit different. In Comet the client establishes a connection (or makes a request) to the server, and then generally keeps that connection open for the server to send responses back to the client on its own schedule.
Chomp is that oh-so-fun function in Perl to bite off extra newlines from the end of a string. It can be useful to have chomp for JavaScript too, especially in cases such as reading input in textareas.
This time around, I’m going to take a quick look at how we can take the standalone JavaScript chomp function and make it even more accessible by extending JavaScript’s String object, which also gives us an excuse to try out the awesome prototype feature in JavaScript.
I’m a web developer by day and have been programming, in one language or another, most of my life since age 10. But for someone without consistent (or any) programming experience, how do you learn to program? This question was brought on by a friend of mine who had a programming class or two years ago and is now setting his sights on giving it another shot.
The good news is that you don’t have to be a life-long programmer to have some fun with it. Old, young, students, hobbyists, and non-programmer professionals can all learn to program, provided they have some interest and a little time (it doesn’t take much to get started).
Regular expressions provide lots of flexibility in processing text, and this article introduces two additional metacharacters (three counting both parentheses), but first I’ll start with a summary of what was covered in the previous regex article:
If you’re a programmer who has ever had to develop an application dealing with text input (which is most of them), from files, databases, or user input, you might be interested to know that regular expressions can make your job a lot easier.
Unlike most dry regular expressions tutorials out there (Mike’s smart post aside), I intend to provide more than just the “what”; I’ll walk you through the “how” and “why” too. After all, why would you care to learn regular expressions if you don’t get to find out about some of the cool and powerful things you can do with them?