29
Jan
10

NTS: GeoKit + YM4R-GM

I’ve just started looking into Google Maps integration and I settled on those two plugins. I also noticed you have to set the Geocoders key, based on your environment.

I just knew there had to be a way to get to the keys in gmaps_api_key.yml (this file is used by the YM4R plugin) because I didn’t want to copy/paste the values into environemnt.rb and I didn’t want multiple definitions in each evnrionment’s file, and this is Ruby!

So I’m going to try this method: one line in environment.rb

GeoKit::Geocoders::google = Ym4r::GmPlugin::ApiKey.get

Cheers!

20
Jan
10

NTS: rubyscript2exe modifications

I have occasion to build Ruby applications for Windows. And it seems like I have to modify rubyscript2exe on each machine. Here are my changes (these are made directly to the gem files):

[GEM_DIR]/rubyscript2exe-0.5.3/bin/rubyscript2exe

Before:

  gemdir	= File.expand_path("..", File.dirname(__FILE__))
  realstuff	= File.expand_path("realstuff.rb", gemdir)
  isapplication	= File.basename(File.dirname(__FILE__)) == "bin"

  $0.replace(realstuff)	if isapplication

  load(realstuff)

After:

  gemdir	= File.expand_path("..", File.dirname(__FILE__))
  realstuff	= File.expand_path("realstuff.rb", gemdir)
  isapplication	= File.basename(File.dirname(__FILE__)) == "bin"

  $_0 = realstuff
  alias $__0 $0
  alias $0 $_0
  $0.replace(realstuff)	if isapplication

  load(realstuff)

[GEM_DIR]/rubyscript2exe-0.5.3/realstuff.rb

For me this starts on line 620:
Before:

    if __FILE__ == $0
      $0.replace(File.expand_path("./init.rb"))

      TAR2RUBYSCRIPT	= true	unless defined?(TAR2RUBYSCRIPT)

After:

    if __FILE__ == $0
      $_0 = File.expand_path("./init.rb")
      alias $__0 $0
      alias $0 $_0

      TAR2RUBYSCRIPT	= true	unless defined?(TAR2RUBYSCRIPT)

Again: This works for me. YMMV!

Cheers!

14
Sep
09

I just don’t blog like I used to…

I can’t believe May was the last time I blogged. Well, yeah, I can believe it. Over the past several months I’ve been trying to focus on staying gainfully employed. So Far, So Good. I will let you know that as now (and since June) I’m 100% Rails. I’m so stoked. But I’m also over committed. I would venture a natural reaction for a young freelancer motivated to keep the food on the table for his family.

I think the main reason my blogging has almost become nil is that I’m not sure what I want to use this blog for. I’m on Twitter. I run the CVREG. I just don’t know what to do this blog. I had ideas. But I don’t have the enthusiasm and energy right now – I’ve been focusing those on the projects I’m either running or helping with; maybe I’ll talk about my projects (at a high-level since I’m under NDA for some).

Maybe.

Until then…Cheers

30
May
09

Ruminations on being too busy

Sometimes it’s a Good Thing; sometimes it’s Not. Though it’s no excuse for not blogging about my adventures, huh? Keep an eye on this space because the plan is to let you all in on what’s been going on; hint: my business is picking up. ;-)

Cheers!

13
Mar
09

Has it been One Year already?

Actually, it’s been 1 year and 1 week. I’m still Freelancing!

Hurray!

I’ve been fortunate to remain working in these tough times. For that I’m very thankful to my clients. And I’m still doing Ruby on Rails and PHP. I’ve even done a bit of C++.

The 2d Half

I have to say the back 6-months of my year wasn’t nearly as exciting as the front 6-months. It was mostly due to the fact I only had two main clients. For me having two concurrent clients is just right, stress and work-level-wise; not to mention the paperwork load. But I also stepped up my involvement the CVREG and now I’m main organizer. It’s been very exciting running the CVREG – but that’s another post.

Anything New?

I still have a lot to learn. Good thing I love learning. However I think the most important lesson I learned over my first year is: I love Freelancing. It’s still a lot of work; I haven’t automated as much as I want or need.

Dark Cloud?

Right now the only dark cloud in my silver lining is Medical Benefits. I’m looking at my options and not liking what I see. Wish me luck.

What Now?

So I’m going to persevere, improve my skills, and continue to create good work. Plus, if you need a top-notch developer for one of your projects, we should talk. ;-)

Cheers!

19
Feb
09

Have you seen WeewarSpy Web?

Just some quick screen shots of a Sinatra App I use to Spy on my Weewar Games:

Main Page

Main Page

The Main Page displays your Weewar handle, the server with which the Spy is communicating, and a list of your Active Games. The Units and Terrains Buttons offer quick access to those specific pages on the Weewar Wiki

Game Page

Game Page

The Game Page displays the details of the selected game. It displays the Spy’s debrief. As a convenience you will see, in bold, whether or not the selected game is rated. Plus, when it is your turn the View Game button turns into Play Game; the button links to the selected game on Weewar. The Game Page also has the Units and Terrains Buttons, as well as a button back to the Main Page, labeled Headquaters

Short, sweet and to the point!

Source

You can get WeewarSpy Web off of Github: http://github.com/melriffe/weewar-spy-web/tree/master. It’s a fork, of course, and you’re welcome to fork mine too. I have a couple more features planned for it, but the basics are there. Enjoy!

Happy Spying!

19
Feb
09

I so owe you people a new blog entry…

It’s been too long since my last post. And it’s not like Nothing has been going on in my life. I know for sure I’ll be posting in the next couple of weeks; I’m coming up on my 1-year Freelancing Anniversary.

See you in a couple of weeks…

Cheers!

14
Dec
08

Weewar and Weewar-Spy v1.0…

I was introduced to Weewar a little over a year ago. I really enjoy playing it, though I’m not that good; I am slowly learning though. So I created a tool to feed my addiction, er, that requires a lot of field research. ;-)

I kind of always knew about Weewar’s API but kept it in the back of my mind. I had/have more important things on which to focus. However a few months ago I started looking for Ruby Implementations of the Weewar API. I fancy myself a Ruby developer and, like a good craftsman, wish to continue to hone my skills. What better way then to develop something you know you’ll use?

I started my search on Github, of course, and found two Ruby libraries: one that used the standard API and another that used the new AI API. I knew I wanted something in between so I downloaded both libraries and started studying them. I slowly started piecing together my vision for weewar-spy. And at the end of October I uploaded my repository to Github and started announcing its availability. And, today I am officially releasing v1.0.

What is weewar-spy? you may ask. First, it’s a Ruby library that uses a couple different technologies to provide an object model over Weewar’s API. Second, it uses this object model to provide information on the games you’re playing. It provides information on the other players as well; that’s the real value. It was during a game on a large map with six players where I first had the thought: there must be an easy way to know how many bases a player has. I now have weewar-spy to give me all kinds of information.

Weewar-spy is essentially a command-line oriented tool/library. However, I’ve started using a Sinatra-implemented web app on top of weewar-spy. Oshuma (Dale Campbell), in addition to providing some patches for weewar-spy, started a Sinatra-based web application for weewar-spy. I have since forked his implementation and will continue to flesh it out, adding new features and functionality to it. At this time I recommend using either my version or Oshuma’s version of weewar-spy-web (I’ll write more about it at a future date).

I don’t have any screenshots yet. However, the README does contain a sample of weewar-spy’s output. I’ve received favorable reviews, so far. If you’re into Weewar, a Ruby developer, and would like to spy on the players in your games then download weewar-spy and send me your feedback.

Happy Spying!


Links

  1. Weewar
  2. My Weewar Profile
  3. My Github Profile
  4. Weewar-Spy
  5. Weewar-Spy-Web
  6. Oshuma’s Profile

Update: Added my Weewar Profile to the Links list.

13
Dec
08

NTS: replace existing git submodule

This is for when you have forked and cloned a repository that contains a submodule you would like to replace with your own implementation:

$> git clone ...
$> rm .gitmodule
$> rm -r <path to submodule>
$> git update-index --force-remove <path to submodule>
$> git submodule add <your git url> <path to submodule>
$> git submodule init
$> git submodule update

If there’s an easier I’d love to know what it is.

Cheers!

11
Dec
08

I Voted…for the NHL All Star Game

Guess who I voted for? Go Wings!

Cheers!