Archive

Archive for the ‘Uncategorized’ Category

Running the Ruby Koans within Visual Studio

September 27th, 2011

I’m (finally) learning Ruby since a couple of days ago, and I found a great resource: the Ruby Koans. It’s basically a set of failing unit tests that you have to make pass, and by doing so you learn different aspects of the language.  I wanted to edit the koans in Visual Studio using the support added by the IronRuby project, because I don’t want to pay for an editor or work in a bad one, but I wanted to run the koans with the standard Ruby executable because IronRuby’s support for Ruby 1.9 is not complete yet. And of course, I wanted to work without having to leave VS at all. Here are the steps I followed.

The first step is to create a new Visual Studio project, an IronRuby console application, and add the koans to it:

project

The next step is to setup an external tool to run the koans (Tools –> “External Tools…”):

external-tools

When I installed Ruby using RubyInstaller I chose to add the Ruby executable to my path, so I only have to type “ruby.exe” in the command field. If the executable is not in your path you just need to specify the full route. The argument is the full path to the path_to_enlightenment.rb file, which is the one that guides you through the whole process. I marked the “Use Output window” option so I would see the output within Visual Studio. The last step is to assign a shortcut to the external tool so we can run it more easily. Go to Tools –> Options, and then to Environment –> Keyboard. In “Show commands containing” type “ExternalCommand”:

show-commands

In my case I put the Ruby external tool in the first place of the Menu Contents list, so the command I’m looking for is “Tools.ExternalCommand1”:

shortcut 

I chose the “Ctrl + Shift + Q” shortcut, mainly because pretty much anything else was taken. Now we are all set, just hit your shortcut and begin the path to enlightenment!

koans

This approach is also useful if you want to run your own source file (for instance, if you are typing code snippets from a book you are reading). In that case just use $(ItemFileName) (“Item File Name”) in the external tool configuration instead of “path_to_enlightenment.rb”. Again the goal is to edit the source code files in Visual Studio and run them with the latest Ruby version.

Julián Hidalgo Uncategorized ,

It’s been a while…

January 10th, 2011

I hate the “sorry for not posting for so long” kind of post, but I needed one so I can put in context what I’ve been doing and learning the last couple of months.

I’m currently working as senior software developer for a social games development company called “Atakama Labs”. Our first game, Terranova, was released last year for Facebook and Orkut.

Terranova runs on the Windows Azure Platform, so I’ve been learning about that. The backend is a WCF service coded in C#, my favorite language, and the client was developed in Flex Builder 3. We use the Azure storage service, which is not relational. Working with a non relational storage is difficult at first if you come from a SQL Server background like me, because you end up creating solutions that don’t feel right under your relational mindset, but it provides better scalability when you have thousands (or millions) of users.

I work mostly on the backend side, but I tried to do some work on the client to understand its architecture and to learn ActionScript. It was difficult to find the time to do so because there were many tasks in the backend and not enough time as usual.

We are now working on two new games, and this time I hope to get much more involved on the client from the beginning. It was a great pleasure to discover that Flex Builder 4 comes with an integrated unit testing framework. Coming from MbUnit and .NET I miss many features, but so far it’s worked well for my needs.

So, that is. I have two new posts in mind about managing the hosted services in Azure with PowerShell (almost finished, it’s pretty short), and another about unit testing with Adobe Flex Builder 4. Nothing too exciting or new, but I hope this to be the start of a continuous stream of posts. Happy coding!

Julián Hidalgo Uncategorized

Improving the blog

February 10th, 2009

I’m trying to improve the content of the blog, so I added 3 new and so far quite incomplete sections:

It’s also a way of organizing the content in a better way and saving links to the stuff I like without cluttering the blog (I hate posts that just link to other’s people work or content). I hope it can be useful for some of you out there. See you next time!

Julián Hidalgo Uncategorized

Reborn from the ashes

May 3rd, 2008

Hello Everybody

I used to have a tech blog at http://www.hpoffice.cl/julian/, but unfortunately the server died and I could not recover the backup. It’s a pity because I had a bunch of posts already, but anyway, I guess I have to think of this as an opportunity for doing things better. I don’t like to do things twice, so it took me a while deciding to start blogging again.

In case you are interested, my name is Julián Hidalgo and I’m from Chile, South America (that’s why my English is so bad). I’m a .NET developer and I’m part of the MbUnit and Gallio projects, so I’ll be blogging mostly about .NET, general software development and those projects.

I’m planning to be posting new content at least every two weeks, so stay tuned.

I guess that is. Thanks for reading and see you soon!

Julián Hidalgo Uncategorized