hoyvinglavin.com
MySQL timestamp column type considered harmful
http://hoyvinglavin.com/2011/01/06/mysql-timestamp-column-type-considered-harmful
On technical minutiae, by Jeff Lee. MySQL timestamp column type considered harmful. MySQL has a weird auto-updating field type called. Which can be automatically populated or updated with the current time when you insert or update a row. It’s probably not 100% kosher practice to have a system changing your data without your explicit approval, and yet one could imagine this being useful for logging purposes, or for simplifying your insertion queries. But the upshot is like this:. Regardless of how many.
hoyvinglavin.com
Appending to slices in Go
http://hoyvinglavin.com/2015/01/27/appending-to-slices-in-go
On technical minutiae, by Jeff Lee. Appending to slices in Go. To extend Go slices is tricky, especially when compared to analogous operations on Java/C vectors or Ruby/Python/JavaScript arrays. Most of the difficulty comes from the fact that. Sometimes creates new buffers, and sometimes it doesn’t. In the following example, we create a slice, assign it to a second variable, and use. Following the calls to. Can be treated as entirely separate slices. This is fairly intuitive. 0 2] - New behavior! Will re...
hoyvinglavin.com
The Game of Life
http://hoyvinglavin.com/2010/12/10/the-game-of-life
On technical minutiae, by Jeff Lee. The Game of Life. A lot of kids who take an interest in programming really just want to make games. But only a few of those kids who want to make games ever make it past the programming part. What begins as a dance of light and color and apes and mushrooms ends with tragic flair in a semicolonic nightmare of mathematical tedium and memory leaks. This is the insidious bait-and-switch built into the reality of making games. There is (or at least. Second, I’m reasonably h...
hoyvinglavin.com
Accessing Rails helpers outside views
http://hoyvinglavin.com/2012/10/07/accessing-rails-helpers-outside-views
On technical minutiae, by Jeff Lee. Accessing Rails helpers outside views. Prominent among my gripes about Rails is its handling of view helpers. These are mixed into the view object to provide easy access from template code, but the price of this convenience is a total lack of namespacing, reminiscent of ye olden PHP days. As it turns out, most of the built-in helper methods are mixed into the. Put this into extra/my proj/helpers.rb.
hoyvinglavin.com
JCVJ mini-postmortem
http://hoyvinglavin.com/2012/08/22/jcvj-mini-postmortem
On technical minutiae, by Jeff Lee. Over the weekend I participated in Babycastles’ 48-hour game jam tribute to the life and exploits of one Jean-Claude Van Damme. The event was inevitably titled the Jean Claude Van Jam. My team consisted of David Mauro. Who provided art and jazzy UI code, and Jen Taclas. The source code is on Github. If that’s your thing. Each team was formed ad hoc and assigned a random Van Damme film upon which to base their game. We drew. Street Fighter: The Movie. But the law of the...
hoyvinglavin.com
Redis as a mutex service
http://hoyvinglavin.com/2012/04/29/redis-as-a-mutex-service
On technical minutiae, by Jeff Lee. Redis as a mutex service. Because Redis has atomic mutators that return useful information on what got modified, you can use it to provide test-and-set. The essential primitive operation for mutual exclusion. This means you can synchronize two or more independent processes, even if they are running on different machines, as long as they can both talk to the same Redis server. Now suppose you would like to cache the result of your Expensive Operation. If any process...
hoyvinglavin.com
On the productive use of metrics in the development of gory vampire games
http://hoyvinglavin.com/2011/06/21/game-metrics
On technical minutiae, by Jeff Lee. On the productive use of metrics in the development of gory vampire games. This blog entry was featured on Gamasutra. On 2011.6.22. I spent the last six months working with my friends at WayForward. On the upcoming 360/PS3 downloadable title. The shorthand terminology I’ll use for this topic is. Very much a product of an old-school design and development process, benefitted greatly from a very moderate application of metrics, and could have used even more had we had th...