Rails Rumble Badge

The Rails Rumble 2007 programming contest is now accepting votes for the best applications. My entry is called Whats your habit? and is a web program designed to help people easily track their habits. Please go and vote at the Rails Rumble Voting site and leave your comments here.

My goal with the program was to apply what I have learned about AJAX and REST to an actual Ruby on Rails application. I was pretty impressed with what can be done in the short amount of time I had. I was able to stay awake enough to track the total development time, which came out to 27 hours. Not bad for a functional Web 2.0 program.

I am looking forward to continuing development on it after the competition is completed. I already have about several new features and improvements planned. If you can think of a feature you would like to add, contact me and I will see about adding it in the next version. The official version will be launching as a free service at WhatsYourHabit.com after the voting at Rails Rumble is complete.

What is your opinion of the program?

Eric

Update: A new dedicated product blog for What's Your Habit has been launched.

Tagged: programming ruby ruby on rails

Redmine is an Open Source project management application created by Jean-Philippe Lang using Ruby on Rails. I have been using it to track ongoing projects for my business.

One great area where Redmine shines is how simple it has been to add custom data. I have used many project management programs and bug trackers, and a vast majority of them require you to hack on the code to add new fields. To illustrate how simple it is to add custom data to Redmine, I am going to walk you though how to set it up a custom field for your projects.

Decide what custom data you want

The first step is to decide what custom data you want to track. Taking a post from my friend Shane Pearlman, I decided to score my customer projects to help me evaluate them. So I decided want to attach a "Profit Score" to each project.

Setup your custom data

Login to your Redmine installation as an administrator and on the Administration menu select "Custom Fields". You will notice that Redmine allows you to attach custom data to "Issues", "Projects", and "Users". For now we want projects so click the projects link. Now you can click the link "New custom field".

Different types of data

Redmine gives you a lot of control over your custom data, including restricting what type of data can be entered based off of length and matching a regular expression. For those who don't know what a regular expression is, think of it as a pattern that your data needs to match.

Completed custom field

To track the "Profit Score" I could enter a number from 1 to 5 but I would really like a drop down box to select a value. This will not only be faster but help me keep the data consistent for all my users. Redmine has different formats for the data including:

  • Text
  • Long Text
  • Integer
  • List
  • Date
  • Boolean

For "Profit Score" I want a List. After selecting List, Redmine automatically changes the view and gives me a set of text boxes I can use to enter the possible values. I only want to use 5 values but from what I can tell, you can enter as many values as you need.

Marking the data as required

To finish up the process, I decided not to check the option to make this field "Required". Even though this will make my data for consistent, sometimes I don't know how profitable a project will be when I set it up in Redmine.

Enter your custom data

All that's let is to now check your project and test that custom field works like you want. If you go to the project overview Redmine will show the custom data. The project Settings is where you will be able to edit and change the custom data. Below is a screenshot of one of my projects with the new custom field.

Editing a custom field

Notice the other fields "Project Status", "Cost Estimate", and "Time Estimate" are other custom data fields I have setup. Each of them were set as "required" so they have the little red asterisk to remind the user that data must appear in their fields. If the form is submitted without data in those Redmine will display a message and will not allow the form to be saved.

Try it out

I hope this article explains a great feature of Redmine. Don't forget, Redmine will also let you attach custom data to your Issues and Users.

So if you are looking for a project management application that is easy to use, I would highly recommend giving Redmine a try. There is also a fully functional demo of the latest code at http://demo.redmine.org. I want to give a big thanks to Jean-Philippe Lang and the rest of the Redmine team, your software makes it easier for my business to run.

Tagged: project management redmine ruby on rails

This is being posted a little late but I think it is best to start off with the review of my first month in business.

My first month of freelancing was a typical honeymoon period that most freelancers go though. Usually they had some change to their life and as a response they jump into freelancing. This change could be leaving a job, an opportunity offered to them from an acquaintance, or a personal change in their family. In my case it was an out of state move.

Right after moving I jumped into my first month of business by getting four contacts for some small programs my previous employer needed. At this point I didn't have a website, business email address, or even a company name picked out. These small contracts basically gave me the seed capital to get all of legal and government paperwork done.

Some lessons I learned from this month:

  • Time based fees don't feel right. I billed based on the amount of time I put into each project but it felt awkward. Your client wants fast work so they don't have to pay as much and get the software sooner but you want to clock more time so you get paid more. I feel it's a no win situation for either of you and could start to strain the relationship.

  • Get help if you lack knowledge in an area of your business. You can educate yourself or hire an expert but try to learn at least the fundamentals. That way the expert and you can communicate easier and you are able better prepared to review the experts services.

    In my case I was weak in marketing so all the marketing I did was so unfocused it would have been better to not do anything at all. Since I don't know any marketers, I used Amazon.com and my local library to read up on what the experts are writing about.

  • A little planning can go a long way. Try to take some time to plan out your day, week, month, and year. This can be as simple as writing down what you want to accomplish and reviewing it later.

    Planning out the market I want to focus on has helped me target my writing and marketing. Taking ten minutes the night before and writing down some tasks I want to accomplish helps me focus the next day and not get distracted by being at home.

Overall, the month ended on a good note. I make a lot of little mistakes, learned a lot, and got on track to succeed.

Eric

Tagged: business business-reviews

Anything you do over time would benefit from a good review every now and then. Reviewing your progress helps you focus on the results you want and keep you heading in the direction you want.

Every month I going to be reviewing what I accomplished in my freelance business and what lessons I learned. Hopefully this will help you lurkers who are on the fence with freelancing gain the confidence you can succeed in your own business. It will also serve as a record for me to come back in the later years and say "What the --- was I thinking!".

P.S. If you want to find all of them I am going to try to tag them all as business-reviews

Eric

Tagged: business business-reviews

I found a good quote for all people who worry that they are not good enough to run a successful business.

Your success is never relative to someone else's, because there's always someone who's making more, running faster, driving harder. Your success is a function of exceeding your life goals, which are uniquely yours.
-- by Alan Weiss, PhD in Getting Started in Consulting

Tagged: business quote

I just read a great post by Shane Pearlman titled The Technician and the Entrepreneur. In it he describes two different types of independent contractors, the Technician and the Entrepreneur. It gives a great overview to what happens to independent contractors as they become successful and start to question what they are really doing in business.

At Little Stream Software I am still very much the Technician but I am looking at ways to move to become an Entrepreneur.

Eric

Tagged: business

In a previous entry, I wrote about using Bamboo Invoice to create and mange the invoicing for my small software company. Now I want to walk through customizing the invoice to include some extra things.

The Problem

The base invoice is nice, but I really want to have the invoice due date printed on the invoice. Sure the default invoice has the payment terms and the invoice date but I did not want my customers to have to guess when their payment was due. What would be great is if there was a line on the invoice that said "Due" and had a date based off of the payment terms I already set.

Getting the Date

Luckily, all of the data needed to display the due date is already included with Bamboo Invoice. All I need to do is to display it. Bamboo Invoice uses two files to display the invoice, view.php and pdf.php. Both of these files are pretty similar, one shows an HTML version of the invoice and the other shows a PDF version.

First I need to get the date the invoice was created and then add in the number of days from the payment terms. Since the views each have an invoice object called $row I can just access the attribute dateIssued to get when the invoice was created.

$row->dateIssued

This data is stored as a MYSQL DATE field so I needed to convert it back into a unix date and time in order to display it. Bamboo Invoice provides a useful function mysql_to_unix that does this exact thing.

mysql_to_unix($row->dateIssued)

The next step I had to do was to format the Due Date in a human readable format, such as August 16, 2007 and not as the unix time of '1187308680'. To do this I hacked some date conversions using the PHP date and mktime functions.

 <?php echo date("F d, Y", mktime(0,0,0,
    date("m",mysql_to_unix($row->dateIssued)),
    date("d",mysql_to_unix($row->dateIssued)),
    date("Y",mysql_to_unix($row->dateIssued))));
 ?>

Basically this is taking the Month (date "m"), Day (date "d"), and Year (date "Y") of the invoice and creating a new date in unix time but formatted as "Month day, four digit year". Now some PHP hacker might ask why am I converting the date from unix to a number and back to unix again instead of just using the date from mysql_to_unix like so:

   echo date("F d, Y", mysql_to_unix($row->dateIssued));

The reason is we need to now add in the number of days that a payment is due in. By converting the unix time to an integer we can easily add in our days, which are stored as an integer in Bamboo Invoice.

 <?php echo date("F d, Y", mktime(0,0,0,
    date("m",mysql_to_unix($row->dateIssued)),
    date("d",mysql_to_unix($row->dateIssued)) + $this->settings_model->getSetting('daysPaymentDue'),
    date("Y",mysql_to_unix($row->dateIssued))));
 ?>

Now we just need to add some pretty HTML and we have a nice snippet to show the due date.

<p><strong>Due:
   <?php echo date("F d, Y", mktime(0,0,0,
      date("m",mysql_to_unix($row->dateIssued)),
      date("d",mysql_to_unix($row->dateIssued)) + $this->settings_model->getSetting('daysPaymentDue'),
      date("Y",mysql_to_unix($row->dateIssued))));?>
</strong></p>

Since we want this to be included in both the HTML and PDF versions, it would be best to extract this snippet into a separate file to include into the view files. This will also make upgrade easier because we are not putting as much logic in the source files distributed by the Bamboo Invoice team. If you save this snippet into a file in the bamboo_system_files/application/views/includes/ directory you will have an easy way to add this to each view. I named mine eric-add-due-date.inc.php.

HTML View

The HTML view file is called bamboo_system_files/application/views/invoices/view.php. Open this file and look for a good place that you want to display your due date, I chose to put mine right under the Payment Terms. Since we setup the code in an include file all we have to add to this is the line:

<?php $this->load->view('includes/eric-add-due-date.inc.php'); ?>

Now we should have a Due Date on our invoices in the web browser.

PDF View

The last step is to modify the PDF view. This process is exactly like the HTML view but using the file bamboo_system_files/application/views/invoices/pdf.php.

Conclusion

We have now added a simple Due Date calculation to our invoices for Bamboo Invoices. Although it was simple, there are a lot of other things we can now do this these simple concepts.

Example of the due date on an invoice

Another customization I added to my invoices is a link to an online form that will display the amount and invoice number for my customers to pay.

If you have any questions, feel free to ask me and I can help.

Eric Davis

Tagged: business php software

Rails Rumble, a Ruby on Rails programming contest, has been officially announced. Basically it is a groups of 1-4 people who are given 48 hours to build and deploy a Ruby on Rails application.

Rails Rumble Badge

Tagged: programming ruby ruby on rails

As much fun as it is cutting your code on a new freelance project, there is a side to the business that we freelancers tend to forget, or just hope it will go away if we ignore it. Invoicing customers. We can work as much as we want for a customer, but unless we invoice them for our work we will never get get paid. Not getting paid is bad.

Luckily, invoicing does not have to be hard. I use an open source invoicing program called Bamboo Invoice. The thing I like most about it is that it provides just what I need to invoice my customers; it does not try to provide accounting, supply chain management, or any other "total business solution".

Bamboo Invoice - invoice screen

Installation was easy, it is written in PHP5 and uses the LAMP web stack every is familiar with. The installation instructions were pretty easy to follow. Once installed there are a few settings in the "Setting" panel that you need to customize for your business. Now you are ready to add in your customers and start to invoice them for all the time you have been "forgetting" to bill.

Once you have an invoice, the Bamboo Invoice allows you to create a PDF of the invoice and will even email your customers with the PDF attached if you want. I ran into some issues emailing the invoice to multiple people at a time so you should test it out a little bit on one of your email accounts first. The issues are probably just the way my email server is setup.

So if you are looking for a simple and open source invoicing program that you can use in your freelancing business, I would recommend Bamboo Invoice. There is an online demo that you can try at it's homepage.

Eric Davis

Tagged: business software

As I wrote about in a prior post, I have been starting a software company. Now I have gotten it's website to a stage where it is available to be published. Even though the website appears to be simple, it has some advanced technology behind it. Oh course it is a completely custom site using the Ruby on Rails framework. Some of it's more buzz worthy features are:

  • Separate administration panel
  • Image uploads and thumbnailing
  • Automatic caching
  • E-Mail delivery form
  • AJAX preview
  • Drag and drop sorting

Check it out and tell me what you think, LittleStreamSoftware.com.

Eric Davis

Tagged: Little Stream Software software startup