- I subscribed to remembertomorrow0's channel on YouTube. http://www.youtube.com/user/remembertomorrow0?feature=autoshare #
- I subscribed to AtheneWins's channel on YouTube. http://www.youtube.com/user/AtheneWins?feature=autoshare #
- #Mvc3 baby, take you for a ride! http://yfrog.com/h2umpdhj #
- I subscribed to Hobo4Craft's channel on YouTube. http://www.youtube.com/user/Hobo4Craft?feature=autoshare #
Custom Magic the Gathering Cards
For a friend’s birthday in 2004, we made him Magic the Gathering cards. I got a lot of help from an online forum, misetings.com, which I think became misetings.net and now http://forums.goodgamery.com/. I made an entry back in 2004 about the birthday, and recently updated the link to the cards. The trickiest thing was finding a good template (and modifying it) and spending time to edit some of the more complicated pictures. The flavor text and card abilities were really fun to write.
Dominos-Style Game
My wife loves PopCap’s game Alchemy. It’s a dominoes-like game, where you match up alchemic symbols and various colors. The object of the game is to turn each board-square from lead to gold. I have been wanting to try out the limejs game library, which is based on Google’s Closure compiler, so I decided to write a quick implementation of the game. You can find the source on Github.
You can try out the game online. To play, place pieces adjacent to other pieces which match in symbol or color. A placed piece must match all the pieces adjacent to it. A wild card piece, denoted with the ‘*’ symbol, matches all pieces. Filling a row or column with pieces will mark the corresponding spaces as cleared. The object of the game is to get each space marked as cleared.
- Board with status box
- Board with status box
Edit (20100214 11:00 PM): Added win condition and box showing how many spaces cleared.
Edit (20100215 11:00 PM): Added leveling. The board starts small with few pieces and keeps getting bigger with each round.
Adding comments to spreadsheets with POI
I was just recently working on a project using NPOI, the .NET equivalent of POI, which is a great library for writing Microsoft Office documents. I was using HSSF, it’s spreadsheet library (Horrible Spreadsheet Format according to Google), and attempting to add Comments to cells.
At first I thought it wasn’t working at all. Then I noticed there was a single cell that had the little red marker that tells you there is a comment. After a little debugging, I realized that this was the last comment added, and guessed that I was doing something to clear the comments I created with each loop iteration.
The block of code that creates comments is something like:
HSSFCell cell //...
// ...
HSSFPatriarch patr = sheet.CreateDrawingPatriarch(); // should only be called once
HSSFComment hssfComment = (HSSFComment) patr.CreateCellComment(
new HSSFClientAnchor(0, 0, 0, 0,
cell.ColumnIndex, cell.RowIndex, // start cell index (for size)
cell.ColumnIndex+4, cell.RowIndex+6) // end cell index (for size)
);
hssfComment.String = new HSSFRichTextString("Comment text");
cell.CellComment = hssfComment;
Unfortunately I had been creating the drawing patriarch in each loop. I didn’t realize it should be a top-level container for the comments. So make sure to not re-create the drawing patriarch.
Twitter Weekly Updates for 2011-02-06
- @MarcDrumm it's a web-based #rails app /cc @wharton in reply to MarcDrumm #
- http://yfrog.com/gyjsruaj runtz like a boss #
Twitter Weekly Updates for 2011-01-30
- I liked a YouTube video — IBM Centennial Film: 100 X 100 – A century of achievements t… http://youtu.be/39jtNUGgmd4?a #
Weird Sammy + jQuery on IE error
Here’s a post that might help problems with Sammy routes, callbacks, and event handlers using jQuery, especially the “live” function.
I have an input form with submit buttons like:
<form> <input type="submit" name="what" value="SomeCommand" /> <input type="submit" name="what" value="DifferentCommand" /> </form>
This didn’t play well with Sammy, as it doesn’t load the value of what into it’s params hash. So, I did a work around like:
// hack to allow sammy to access the 'what' param
$('form input[type=submit]').live('click', function(){
var submit = $(this),
form = submit.parents('form');
form.find('input[name=what][type=hidden]').val(submit.val());
});
I’m not sure why I originally chose to use “live.” It could’ve been that I was building DOM dynamically using jquery-tmpl. In Firefox and Chrome, this worked as expected. In IE, the Sammy route handler would fire before the click handler above! So, I changed the code to use the non-live version.
$('form input[type=submit]').click(function(){ // changed
...
});
Twitter Weekly Updates for 2011-01-23
- List of JS game engines: https://gist.github.com/768272 #
- I subscribed to day9tv's channel on YouTube. http://www.youtube.com/user/day9tv?feature=autoshare #
- @hectcastro Thought you'd like this: http://w3fools.com/ #
- @briandonahue really cute! gotta get them started young! in reply to briandonahue #
- job: "Web Developer" PHP ASP SQL CSS jQuery http://bit.ly/hWuByC #
- Berkeley Overmind, Starcraft Bot http://bit.ly/ezpXQw #
- Learning from Twitter http://bit.ly/dOmBoa #
Twitter Weekly Updates for 2011-01-16
- I liked a YouTube video — How To Design A Good API and Why it Matters http://youtu.be/aAb7hSCtvGw?a #
- Mug: alt javascript->jvm compiler http://bit.ly/eDVXad #
- @TuttleTree congrats! in reply to TuttleTree #
- Sortvis, sorting algorithm visualizations http://sortvis.org/ #
- Jakob Nielsen discusses Kinect Gestural UI http://bit.ly/g2ql20 #
- I liked a YouTube video — Tech Talk: Linus Torvalds on git http://youtu.be/4XpnKHJAok8?a #
- I liked a YouTube video — Theory and Practice of Cryptography http://youtu.be/ZDnShu5V99s?a #
- I liked a YouTube video — I Tried Emacs (Pit Party '08) http://youtu.be/oWxtBVT9C_s?a #
- Pattern Tap UI Gallery http://patterntap.com/ #
- I liked a YouTube video — DAN the MAN http://youtu.be/SEVU-YLpM8A?a #
Innovation Tournament
This week I was in San Francisco participating in a Wharton class about innovation. We had a week to sort through various ideas for web products and create a prototype. I worked on two projects. One is a lottery site, with a simple demo available. I got to use the Youtube API for playing a video and then performing some action upon completion. It was  a little clunky to get setup, but afterwards worked flawlessly.
The other was an idea for a social dashboard for restaurants to keep them up to date with the latest reviews on sites like FourSquare and Yelp. I worked with a great programmer named Sean, who worked mostly on integrating the 3rd-party APIs. It was a Rails app that we pushed to Heroku.
- Social Store Front Splash
- Social Storefront – Dashboard Various APIs
- Social Storefront – Analytics (Highcharts)
- Social Storefront – Chatter View
- Lottery Page – Video Ad (Youtube)
- Lottery Page
- Lottery – Numbers Selected












