Archive

Archive for February, 2011

Updates and Thoughts

February 24, 2011 Leave a comment

So, I’ve cleaned up some of my articles to point to the “Setup – Requirements” page and will be using this as a living article for any new requirements I may come across. 

As some of you may have seen, I have been quite active over the course of the last few weeks and if you’re wondering why, well it’s because I’m trying something new 🙂  It’s always fun when you try to do something different and if you find that it works.  To explain in the space of a Blog, I’m trying to follow a new process (new for me) whereby I do my own notes, test code, research and code all at the same time.  The way it works is quite simple…  It’s very similar to Test Driven Development (TDD) where you write your code before you start coding.  So, the first thing you do in your test code is you “wish”.  This means that you simply write out all the different Test Methods with no code in the body of these methods.  In other words you’re declaring your test code before you actually write the test code.  Once you’re done with that you start with the first method and you write the code.  While you’re doing this first method you may find that you have another scenario that you would like to test, so you add another method once you’re done with the test method you were busy with.  Once you’re done with the first test’s code, you run it and you should see a failure.  Now you start writing the actual business code and on completion you run your test again to see that it passes.  When you’re done with that, you move to the next test method and so it goes until you’re done with both your code and your tests.  After all this, you refactor 🙂

To get back to the thing that I’ve been trying…  Before I start with a new task, I start up Microsoft Word.  The I write all the headings in my document that I would like to cover i.e. “wishing”.  When that is done I start doing my research and I make notes in the relevant section in my document.  Once these notes are there I start with the implementation of that research and once that is done I’ll update my document.  Now if you take a scenario where I’m busy writing code, I would write the outline for my document first, then write the test methods, then update my document and start with the test code.  And so I continue until my Document is complete, my tests are complete and my code is complete. 

Why do I do this?  I found that it gets me to focus a lot better.  Seeing that I have to explain what I’m doing in the document, I find myself understanding the problem better and seeing that I need to write the test code I find myself implementing the logic as I understand it.  All the while I’m learning more about the problem, I’m also updating the document until I find myself where everything is complete and at that stage I finish the document first, then I do some refactoring on the code. 

If all this doesn’t make any sense, try by documenting what you are going to do before you do it, instead of after the fact 🙂  You may just be surprised at how easy you pick up things and how well you understand them when you’re done…  It’s like being the teacher, the student and the writer all at the same time 🙂

Anyway, Have Fun…

Setup – Jenkins and RVM

February 24, 2011 Leave a comment

I’ve just completed another article related to Environments called “Setup – Jenkins and RVM“.  In this article I take you through the setup process to get Jenkins and Ruby Version Manager (RVM) to play nice with each other.  I start with the Build Server and RVM setup and then take you through to pulling your first GitHub hosted Ruby code, doing a Bundle Install and finally running a rake for your Unit Tests.  I hope this will help someone out there, seeing that I have struggled to understand why things on Jenkins don’t work or why my Jenkins install doesn’t pick up that I have RVM running with the correct Rubies.  It was fun and it seems to be working.  So, enjoy!!! 🙂

Setup- Apache and Jenkins (Update)

February 24, 2011 Leave a comment

I have just made some minor changes on my article on how to get Apache and Jenkins to work nicely together.  I found a problem where the masking of the port 8080 didn’t happen properly, so I played around a bit and got it to work quite well now.  So, if you’re interested, you can have a look at the “Setup – Apache and Jenkins” page.

Setup – Requirements

February 23, 2011 Leave a comment

After writing some articles on this site and having to copy and paste the same text from some of my other articles over and over and also getting a bit frustrated in having to look up which requirements need to be installed where I decided to dedicate and article to this topic.  You can find the article under the “Environments” menu and I called it “Setup – Requirements“.  If you want to run Ruby or NetBeans or Apache or something else, then you should run through this list of things first.  I would suggest that you start at the top.  Why you need to install most of these packages, I’m not going to go into other than to say that you’ll be saving yourself lots of hours on Google trying to figure out why some Ruby Gem is telling you that it can’t find a package while the package is installed already.  There are some strange dependencies when you want to do the most arbitrary things.  I hope this helps someone out there and that it gives you a bit of a head start when installing your Development, Build or Production environments.

In the coming days I’ll be changing my articles to all point to this to ensure that it’s a but easier to get through an article without having to do some research or find that article that outlines the steps in a reproducible way.  Enjoy!! 🙂

Setup – Apache and Jenkins

February 22, 2011 Leave a comment

So, there is now something called Jenkins in the world of Open Source Build Servers and it seems like it’s been around for a few months.  Why is this remarkable?  Well…  Simply because Jenkins = Hudson.  I was installing another server with Hudson today following the instructions in my article “Setup – Apache and Hudson” and only when I completed the install did I realise that Hudson is now actually called Jenkins.  So, has anything changed?  Nope, not really.  Why did they decide to make this bold move?  I can’t say, other than that there is some speculation that the guys over at Oracle wanted to start charging license fees for the use of Hudson and that the previously known Hudson guys then decided to for Hudson, rename it to Jenkins and to continue with the project in the old Open Source manner.  Well, if this is true, then I am glad, because since I started using Hudson/Jenkins I haven’t looked back or had the urge to explore some of the other platforms out there.  It simply works 🙂

To top it off, I obviously opted to uninstall Hudson and to install Jenkins and once that was done I thought that it might be a good idea to add/update another article to show you how to install the new Jenkins platform.  You can find this article, called “Setup – Apache and Jenkins” here.  I’m sure you’ll enjoy Jenkins as much as you’ve enjoyed Hudson and I’m also sure that we can expect to see this project grow in the coming months as we’ve seen it grow from the beginning.  I wish them all the luck in their bold move and hope they continue to have fun 🙂  I know we will 🙂

Heads up though, I’m in the process of writing an article on how to use Jenkins as your Build Server runnig Continuous Integration for Ruby projects under Ruby Version Manager (RVM).

Using – Ruby Version Manager (RVM)

February 22, 2011 Leave a comment

I’ve just completed a new article called “Using – Ruby Version Manager RVM” which will be another article that I’ll refresh, change and update on a regular basis.  Ruby Version Manager (RVM) is one of the best tools to use when you do Ruby Development seeing that it allows you to run multiple versions of Ruby and Gems together and to switch between these environments in an easy and straightforward way.  The idea behind RVM is to have a sand-boxed environment that does not affect your system installs and can be dumped and recreated ad-hoc without having to worry that you’ll be breaking things on your system.  By way of Gem Sets it also allows you to weave different Rubies together using different Gems.  In all it’s an extremely powerful tool and in my upcoming article where I’ll be going into the use of Bundler and how you can use this powerful Gem with RVM, you should start seeing some of the more powerful management tools at work.

I’ve found RVM to be a life saver and can’t really imagine writing code in Ruby without it.  When you start mixing in some of the other tools like Bundler, you’ll see how the power of Ruby and these tools come to life.  I hope you enjoy it and that you learn something from the article and if you have feedback on the matter or if you would like me to explore certain point in more detail, please let me know.

Related Articles

GitHub – Getting Started

February 15, 2011 2 comments

Even though I’ve been away from this site for a while (bad, really bad) I am coming back to it with some ideas and hope to continue the fun.  So, for my come back, I’ve just published a “Getting Started” article under the Environments menu for getting into GitHub and I’ve also added a “Source Repository” menu item under the “About” menu that should take you to a place where I’ll hopefully be hosting some of the source of those articles that I’ve been promising for so long.  I did some research on the various online repository hosting companies and must say that the solution that GitHub gives you is very comprehensive.  So, I chose them as part of my “Ultimate Environments” range of tools I would recommend and that I will be using myself.  Take into consideration that the entire range is still under construction and I will be refining, changing and adding more information as I continue.  So, none of the articles on this site will at any stage be seen as complete, just like the code we write on a daily basis.  In the real world, we only stop coding on a project when we start with a new one and if we start with a new one, we all know that we did the previous one wrong.  I hope you like it and find it helpful and I look forward for any feedback and changes you may like.

%d bloggers like this: