Archive

Author Archive

How to enable VCS infromation in zsh

March 10th, 2010 Petros No comments

If you are using zsh as your terminal in Ubuntu, you can use a built in feature to display version control information at the prompt.

After reading “Zsh Prompt Magic” I created the zsh_vcs_info file which you can download. You place it in your home directory and open .zshrc and add the following line:

source /home/user/.zsh_vcs_info

Notice that I added a . (dot) in the filename because I want it to be hidden. Also, notice that “user” in the path above, is the username of the account you use to log into Ubuntu.

Categories: tips Tags: , , , , ,

Daily scrum meeting for remote teams

March 1st, 2010 Petros 2 comments

As a remote team with dispersed team members, we need to find ways to stay connected, motivated and committed. We thought of borrowing something from Scrum and try it out. It’s the Daily Scrum Meeting or Daily Stand Up and we have decided to try it for 30 days and see if we like it or not.

Read more…

PAbarcode gem

December 30th, 2009 Petros No comments

In a previous post I mentioned that I started maintaining a set of helper Ruby classes for working with barcodes. I have changed the structure of the project to make it a gem and I have published it on GemCutter.

Read more…

Categories: 2-deed Tags: , ,

Ruby helper classes for barcodes

December 23rd, 2009 Petros 3 comments

In my day job, I work a lot with barcodes. We develop Windows Mobile software for devices with barcode readers. From time to time, I need to do file manipulation chores. That is: colleagues give me text files that contain barcodes and ask me to transform these.

Read more…

Categories: 2-deed Tags: , ,

Blog Action Day: Working remotely helps pollute less

October 15th, 2009 Petros No comments

If you follow me, you know by now that me and my team (4 people in total) started working remotely. I was wondering what to write for Blog Action Day. I decided it would be cool if I could calculate some numbers that showed how we affect our environment in a positive way.

Read more…

Rails: url vs path

September 21st, 2009 Petros No comments

I was wondering why some people are using _path and why some use _url. For example, if you have a Post resource you can write the following in your view:

<%= link_to 'List of posts', posts_path %>

or the following in the controller:

redirect_to posts_url

Why should I use _url in the controller. I have used _path and it seems to work.

This is an explanation I found in a forum and I quote:

*_path are for views because ahrefs are implicitly linked to the current URL. So it’d be a waste of bytes to repeat it over and over. In the controller, though, *_url is needed for redirect_to because the HTTP specification mandates that the Location: header in 3xx redirects is a complete URL.

Categories: tips Tags: , , ,

Volunteering

September 1st, 2009 Petros No comments

Volunteering to non-profit organizations or to open source software projects is my second deed (2-deed).

I started this activity in June 2009 by becoming a member of Builders, a RailsBridge project, that connects volunteers with projects for 501c3 non-profits.

So far, I am volunteering in two projects: 1) Sunset PTA and GlamourGals Foundation.

The basic reasons I do this are:

  • Learn
  • Network
  • Give back

I learn asking questions or watching other team members doing stuff I don’t know. I discovered this way of learning is much faster than just reading and online searching. It cannot replace these of course, but it can help in addition to these methods of learning. Sometimes, when I learn something new from a fellow team member, I feel that it would be very difficult to discover it by myself.

When you volunteer to various projects, it is very easy to meet people with more or less the same mentality as yours. You get the opportunity to know them, open up your mind to new ways of thinking, choose who you like better and maybe create stronger relationships that may lead to other forms of cooperation in the future. This is extremely difficult to accomplish if one is only dedicated to their daily business because they don’t have many opportunities to network with new people.

Years and years, I have been receiving a lot of help from the Internet community in various forms: Forums, using free open source projects, becoming better by participating to various communities, educating myself, watching the improvement of commercial products because of the pressure of open source equivalent products, and more. I give back to the community by actively contributing and this makes me feel good. It also helps sustain the community and continue growing it.

This is going to be my second deed and I’ll keep posting any news that fall under this category.

A typical workflow for a team using Git

August 27th, 2009 Petros 2 comments

Lets assume you are in a team, working on a Rails project and you have chosen Git as your version control system. One way to complete a working cycle from pull to push is:

DISCLAIMER: There are more ways and many situations that are not described here. This is only a note to self that may also be useful to you.

Read more…

Categories: tips Tags: , , ,

Git log

August 25th, 2009 Petros No comments

When I am working with git, I find it useful to take a quick look at the log. The default

$ git log

command doesn’t show the actual modified/added/deleted files. You can use the following command for that:

$ git log --pretty --stat

or

$ git log --pretty=format:"[%h] %ae, %ar: %s" --stat

I found the latter in one of Alex Young’s tweets.

If you have any favorite git log formats, please feel free to mention them in a comment.

Categories: tips Tags: , ,

Installing RSpec and Cucumber

July 11th, 2009 Petros No comments

Open your shell and,

For RSpec:

$ gem install rspec

For Cucumber:

$ gem install cucumber

Optionally, if you are on Windows, for color output you can also install Win32Console:

$ gem install win32console
Categories: tips Tags: , , , ,