Home


"why's (poignant) guide to ruby" is the best language intro EVER
Posted by Kaleb Brasee on Sunday, November 29th, 2009 at 07:59 PM
I just started taking a look at the programming language Ruby a few days ago -- it's become big enough (or has loud enough fanbois) to get my attention. From what I've seen it actually looks pretty good, I'm going to work at it for a while.

Anyways, I was looking for a good introduction to the language. Any oh boy did I find it, in "why's (poignant) guide to ruby". It's not just a plain-English, straightforward, fantastic introduction to Ruby. It is also by far the most entertaining technical writing I have ever read. So funny! I was hooked from the beginning page, and the cartoon foxes are absolutely killing me.

Cartoon Foxes and their Chunky Bacon Even more Chunky Bacon

If the language is half as fun as this introduction, I'll probably switch over to it exclusively, dynamic typing and all.
Multiplayer Ajax chess for Java released!
Posted by Kaleb Brasee on Friday, September 25th, 2009 at 10:30 PM
Brasee.com Games Ajax chess After nearly 6 months, the first multiplayer version of java-chess-web (version 0.3.0) has been released. It now offers multiplayer support for Ajax chess games and a lobby for players to chat, and view and join games. It is full Ajax, requiring nothing but a standard browser to play. It also retains the existing ability for both players to play in a single browser.

This Ajax chess game is implemented in Java 6 and runs on a Tomcat 6 server. Most of the client-side magic is made possible by jQuery, the excellent Javascript library. Complete source code is available at http://code.google.com/p/java-chess-web. It has been a lot of fun designing and implementing this release of java-chess-web.

There are still some known issues -- the Ajax polling can occasionally experience some issues (such as requiring a user to refresh in order to join a game, or seeing duplicate lines in a chat window). These issues wouldn't exist if java-chess-web had been implemented using a Comet Ajax design, which is something I realized too late to switch. I'll probably get around to correcting these issues someday, but it's going to move to the back burner for a while as I learn Scala and Lift. Maybe I'll just reimplement the whole application in Scala/Lift to compare it to Java/Spring MVC.
Adding Glassfish server support in Eclipse 3.5
Posted by Kaleb Brasee on Wednesday, July 15th, 2009 at 08:32 PM
I downloaded Eclipse 3.5 (Galileo) the other night, and just went to install the server adapter for Glassfish. It's not built in, so I clicked 'Download additional server adapters' and tried to the Glassfish v2.1 and v3 adapters. No dice! I got a 'No repository found containing: osgi.bundle' error.

So I did some searching and found this post, which says to add the Glassfish plugin the normal way from http://ajax.dev.java.net/eclipse. For those unaware on how to do that, these are the steps:
  1. In Eclipse 3.5, click Help menu, then Install new software...
  2. Click the Add... button.
  3. Paste http://ajax.dev.java.net/eclipse in the location text box, then click OK.
  4. When the search is complete, the Glassfish JEE5/JEE6 adapter will show up first in the list. Click the checkbox, the click Next.
  5. Click Next again, then Finish, and restart Eclipse when the adapter is installed.
You'll now have the Glassfish adapters available for v2.1 and v3 in Eclipse 3.5.
Book Review: "The Art and Science of Finishing Last"
Posted by Kaleb Brasee on Saturday, June 20th, 2009 at 02:03 PM
The Art and Science of Finishing Last cover In "The Art and Science of Finishing Last," Jakeb Brasee has unified the 2 seemingly-incompatible desires of today's young-ish men — being a ninja and being nice to girls — and managed to do this in 218 pages filled with:
  • biblical wisdom
  • relevant quotes from sources ranging from C.S. Lewis to Star Wars: Knights of the Old Republic
  • a series of missions for a shadow-gentleman in training, exercising both "Being-A-Ninja" skills and "Being-Nice-to-Girls" skills
  • some of the funniest sentences and paragraphs of all time.
The basic premise of this book is the bible verse 1 Timothy 5:12: "Treat younger women with all purity, as you would your own sisters." Many either don't know this verse, or don't know exactly how to live it out. "The Art and Science of Finishing Last" explains how to do this, first by giving an overview of a young man's duties concerning his sisters-in-Christ, then by detailing these duties in 4 major sections:
  • Serve - being truly useful to sisters-in-Christ
  • Protect - guarding, protecting and freeing sisters-in-Christ
  • Affirm - assuring sisters-in-Christ of their worthiness and beauty in God's eyes
  • Lead - "setting a tone for holiness and helping her become who she was born to be"
Each section is divided into a dozen or more lessons, offering sound advice on different aspects of both caring for sisters-in-Christ (and being a ninja at the same time, of course). In addition, each section has a set of missions to carry out that improve skills in both areas.

"The Art and Science of Finishing Last" is available for purchase on a number of sites including Amazon, Barnes & Noble, and Jakeb Brasee's very own Ninja Gentleman blog. It is a fantastic book, one that I highly recommend for any Christian brother who wants to treat his sisters-in-Christ as God wants him to treat them... and who also wants to be a ninja.
Brasee.com Games preview - Ajax chess
Posted by Kaleb Brasee on Monday, May 25th, 2009 at 09:38 PM
Brasee.com Games Ajax chess For the past month I've been working on implementing a chess rules engine in Java. I started it just to improve my TDD skills, but when I finished the engine it only seemed logical to create a way to actually use the code to do something a little more fun than running unit tests.

So I decided to write an Ajax interface for the chess engine. Today I finished the first iteration (human vs. human on the same computer), and it is available as a preview at:

Ajax chess on Brasee.com Games

The source code is also available at http://code.google.com/p/java-chess-web.

I still don't have the web app checked in yet, I'll work on getting that up in the next week or two when I get it cleaned up and generalized.

For the next iteration, I'm planning on adding a basic lobby system and making this game playable between people over the web. Yeah I know, big goals for a single iteration in a spare time project, LOL. After that, if I'm feeling really adventurous, I might try to implement some basic chess artificial intelligance. I'll no doubt have to brush up on my min-maxing and alpha-beta pruning, and figure out the best way to implement it in Java.
How to write a simple CAPTCHA in Java
Posted by Kaleb Brasee on Sunday, April 12th, 2009 at 12:16 AM
When I opened up my site earlier this week, I was surprised to find over 300 replies on one post. "Wow", I thought to myself, "I am now a powerful force in the blog-o-sphere." Turns out, some stupid spambots kept selling dipophedrin and tranzambol and eptexerdoze on my site every 5 minutes. I tried changing the URL used to post comments but the bots were far too smart for that feeble attempt at a fix, and they were posting comments again 10 minutes after I put up the new build.

So I decided it was time to add CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) validation. CAPTCHA provides a way to block bots from interacting with your site by providing something that's hard for them to read, but easy for people to read. I wanted to try something simple that I could write myself to see how it works. Read on to see how I implemented simple CAPTCHA in my Java web app.
Site update: free MP3s and new album!
Posted by Kaleb Brasee on Tuesday, March 31st, 2009 at 11:25 PM
I just deployed a new update to Brasee.com, and it includes a couple of big changes. First off, all of my songs are now available as free MP3 downloads! I figured that since the best things on the internet are free, these songs should also be free. You get free songs, my site meets best-things-on-the-internet eligibility requirements, everyone wins! Plus, PayPal never let me set up a micropayment account (despite me calling them multiple times), so they charge a 30-cent fee for a 50-cent song, LOL.

So you can now download the MP3s directly from the album pages. I had to cut the bitrate down slightly to make bandwidth more manageable, but they still sound pretty good IMHO. I still have the CDs for sale too, so if you'd prefer to listen to the songs in pristine quality, that's the way to go.

I've also started working on a new ragtime album entitled 'Dusty Keys'. Ragtime is so amazingly fun to play, especially Scott Joplin's pieces, so I thought it would be fun to put together the songs I have played over the years. I have also written a couple of rags, so when I get a chance I'll record those too.
Using Hibernate Search in a JPA application
Posted by Kaleb Brasee on Sunday, February 22nd, 2009 at 07:30 PM

When I finished the blog features on this site, the next big thing on my list was developing a way to index and search the contents. I didn't want to let Google do it for me, because that's like cheating. I had heard good things about Lucene (actually great things, I know a guy who uses it for everything from searching for products in a web store to indexing biological information), so I started looking into that.

I was happy when I discovered Hibernate Search, a library that simplifies mapping a Hibernate domain model to Lucene's searching capabilities. I was even happier when I discovered that Hibernate Search has excellent support for JPA, which is the API I used for this site. In the rest of this post I'll outline the steps I had to take to add Hibernate Search to this site. It ended up being much easier and more intuitive than I had expected...

Proud soon-to-be owner of Bacon SaltŪ!
Posted by Kaleb Brasee on Thursday, February 19th, 2009 at 10:35 PM
Bacon Salt Woot.com has been running a woot-off for the last couple of days, selling tons and tons of random stuff. I didn't check on it until tonight, when I noticed to my great shock and amazement that I had arrived just in time for Bacon Salt®!!! I had no choice but to order all three flavors, Original, Hickory, and Peppered.

I've always wanted to try the stuff — it does make everything taste like bacon, after all — but I don't think there's a store that sells it within 50 miles of my house. But Woot.com came through in a big way, and I'm already tasting the bacon. I should probably find a way to use this for every meal I eat.

Edit: I wonder how this will taste on the Snyder's Honey Mustard and Onion pretzel pieces?! That might be too much deliciousness for me to handle...
Rodent's Revenge and SkiFree - Good Old Days of Gaming
Posted by Kaleb Brasee on Saturday, February 14th, 2009 at 03:09 PM
Download Rodent's Revenge
Download SkiFree

I was looking through my directory on my hard drive today and reminiscing (yeah, I have files that are 15 years old, I think that counts as reminiscing). In the "ancient" directory I found two awesome old games that I had forgotten all about: Rodent's Revenge and SkiFree.

Rodent's Revenge is a great little strategy game where you're a mouse that has to corner cats using blocks so that they don't catch and eat you. Somehow, cornering a cat means that it evaporates, but I'm not exactly sure how or why that happens. You can download Rodent's Revenge here.

SkiFree is a twitch action game where you ski down a hill, slaloming or freestyling among trees and hills and lifts and dogs and other skiers. And eventually if you ski far enough down the hill, a yeti eats you. The slalom mode keeps track of your best times — I remember trying for hours to get better and better times on the tree slalom. You can download SkiFree here.
« Older posts
Sign in

Email:
Password:


Forget your password?


New user

Create an account