Homepage | About Me | Testing ASP.net Book | Best Blog Posts | Personal Projects | Follow me on Twitter | GitHub | SlideShare | RSS
Blog.BenHall.me.uk

Adding IronRuby and JRuby to your OSX path

Saturday, December 26, 2009

After downloading IronRuby and JRuby to do some hacking over the Christmas period, I wanted to add them to my PATH variable on OSX. In Windows, this is fairly easy to find but is hidden a few dialogs down.

In OSX, you need to edit the .bash_login file in your user directory. A simple nano ~/.bash_login will allow you to edit the file (replacing nano is your own favourite editor).

To add IronRuby to your path add:

export PATH=/Users/Ben/Library/ironruby-0.9.3/bin:$PATH

Import points:
1) The path to your IronRuby bin folder.
2) Ensure you add the existing $PATH to the end
3) Export the result to the current PATH variable. Note, this is case sensitive.

To add jRuby you do it in a very similar fashion. However, because of priorities and how jRuby works, unless you want jRuby to be the default, add it to the end of the path export

export PATH=/Users/Ben/Library/ironruby-0.9.3/bin:$PATH:/Users/Ben/Library/jruby-1.4.0/bin

You should now be able to see all your ruby interpreters.

Ruby_OSX.png

A sneak peek at Meerkatalyst.Lonestar

Sunday, December 20, 2009

As I had some free time on my hands today I decided to create a new project called Lonestar. For those of you who are interested, here is the first (working) screenshot. Can anyone guess what it is?

Meerkatalyst.Lonestar Hello World Screenshot

For those of you who are following me on twitter then you will know I’ve been mentioning Meerkatalyst for a while – all will become clear soon. For now, keep an eye on my blog, the Meerkatalyst website and twitter feeds (@ben_hall and @meerkatalyst) for more exciting news on Lonestar and other projects!

Labels: ,

More amazing region examples

Friday, December 11, 2009

Come on – really?

image 

With the code being

image

This is why I hate regions

I just loaded up a default from Microsoft built into the Visual Studio 2010 extensibility and was greeted with this:

image

If someone could tell me what this region is actually adding to the code-base then I would love to know! Personally, it’s just a pointless layer of abstraction.

If your interested in what is happening within the region, well it gets worse. This is the code:

image

Instantly, I notice the following problems:

1) The comment to code ratio is very high. This makes seeing the code harder.

2) The attribute to code ratio is very high. This makes seeing the code harder, however it does have some useful information.

3) The class name is not at all related to the file name. This can cause real confusion when attempting to navigate and understand a code-base. Please, don’t do it.

What would happen if we wrote code like this:

image

The true intent of the code is now very clear without having to read anything! Stop hiding code and just show us the true aim.

Ideally I would also want to remove editorAdornmentLayer however MEF uses this, as such I need to leave it.

Labels:

Excellent error message from Amazon

Thursday, December 10, 2009

Yesterday I tried to purchase a book from Amazon UK on my iPhone and was given this error message:

IMG_0196

It had all my information, everything looked correct but unbeknown to everyone, including Amazon, it was game over.

Labels:

Making Visual Studio more keyboard friendly – File.Close

Saturday, December 05, 2009

image

Any time my hands are not on my keyboard my productivity is being harmed. Visual Studio + ReSharper has some really nice keyboard shortcuts which means I don’t need to use my mouse. However, one shortcut which just feels to me plain forgotten is being able to close a file using the keyboard. I can open, switch between but cannot close! Thankfully you can bind your own shortcuts, as such I bound to Ctrl+Q. Having this simply makes everything a little bit easier. But please, Visual Studio or ReSharper – auto-bind this command.

Note: Visual Studio 2010 Beta 2 is a bit buggy when it comes to keyboard shortcut. I had to un-assign anything bound to the key and restart the app before it took effect.

Labels: ,

Migrating from CodePlex to GitHub

While I have a lot of respect for the work Microsoft have done with CodePlex, personally I think GitHub is fundamentally a much better platform for open source projects. The main reason being is that it is just so easy to get access to the code, make changes and do whatever you want while utilising the power of Git. I have a couple of projects on CodePlex, so I wondered how easy it would be to port them over to GitHub.

After creating a new repository on GitHub, you are given the option to import from a Subversion Repository. All you need to do is enter the public Subversion URL for your repository.

image

Thankfully, CodePlex allows you to access your source code via TFS and Subversion. To find the URL, simply go to the Source Code tab and click Connection Instructions. This will give you the project’s SVN URL to enter into Github.

image

After clicking next the experience isn’t great – there is no real feedback about what is going on which is unfortunate.  However, after a while I received an email saying the Import had been completed successfully. If it fails, it also will send you an email to let you know.

image

My GitHub repository now has all the source code from my CodePlex project.

image

Along with the code, it also has all the commits and history associated with the project which is pretty awesome!

image

In just a few clicks I was able to migrate from CodePlex and SVN to GitHub and Git.

If you didn’t want to use the UI, or it failed for some reason, GitHub have a great guide about how you can do this import manually.

Labels: , ,