Scheduled Maintenance

May 13th, 2009

HHTimesheet will be down for half an hour from (11:00-11:30 AM) on Saturday (Eastern Standard Time UTC +10). During this period we will upgrade to version 2.0 with all the features listed in previous post. Obviously system will not be available during this period.

HHTimesheet version 2.0

May 13th, 2009

After few months of development we are proud to announce that HHTimesheet version 2.0 is ready and will be deployed to production this weekend. Features in second version of hhtimesheet includes:

  • New User Interface: We re-designed the user interface from scratch. New design is slicker and more productive than previous one. We’ve gone through many design iterations to ensure that our new interface is more productive.
  • Developer’s API: Developers now will be able to use our RESTful interface and connect to HHTimesheet. Documentation for our API will be ready after the release. With new Developer’s API you will be able to connect your third party application (like your payroll or bill management system) to HHTimesheet.
  • Delete: Delete has been implemented for Projects, Activities, Tasks, Employees, Categories, Employment Types, Clients and Categories. With delete feature you will be able to delete any unused object in the system.

I want to thank everyone who helped us during development and feed back of all the current HHTimesheet users played a great role.

Regards
Behrang Javaherian
Beyond NG

DRY security in rails

April 28th, 2009

We often have cases that we want to do some security check both in our controller and views for example we want to show the edit button only if user has access to edit and also we want to check that in controller in case that some user try to bypass the ui and send the request directly to server. 

We can simply take all the checks out to a separate module called permissions:

module permissions
     def can_edit_project? project
          //code to check if this user has access to edit and return true or false
     end
end

Now we should just include this module in both ApplicationHelper and ApplicationController and use the method in both places.

We can go further and change the can_edit_project? to be can_edit? that first check the type of the object that we passed in and do different logic base on that.

iPhone support in HHTimesheet

February 21st, 2009


We are proud to announce that iPhone support has been added to HHTimesheet.
With our iPhone enhanced version you can fill your timesheet while you are on the train or at customer’s site before forgetting the details.
Also HHTimesheet is listed as a staff pick in Apple website.Watch iphone demo

How to build a domain registrar company - the Chinese way

February 19th, 2009

Last night I recieved an email from a company which claim to be a reputable domain registrar in china (names are disclosed):

We are the department of registration service in China.we have something need to confirm with you.We formally received an application on February 17, 2009,One company which self-styled “Path soft Corp” are applying to register (hhtimesheet) as internet brand name and domain names as below (hhtimesheet.cn hhtimesheet.asia hhtimesheet.mobi hhtimesheet.cc hhtimesheet.net.cn hhtimesheet.org.cn hhtimesheet.com.cn. .etc).

After our initial checking,we found the internet brand name and these domain names being applied are as same as your company’s, so we need to get the confirmation from your company.If the aforesaid company is your business partner or your subsidiary company, please DO NOT reply us,we will approve the application automatically.If you have no any relationship with this company,please contact us within 15 workdays. If out of the deadline,we will approve the application submitted by “Path soft Corp” unconditionally.

We would like to get the affirmation of your company,please contact us by telephone or email as soon as possible.

Best Regards,

Okay
As soon as I received the email I suspect that something is right so I replied back and told them that this domain requests are not coming from our company or any of our partners and here is what I got back this morning:

Dear Sir or Madam,

We knew you have registered the domain name hhtimesheet.com and own the intellectual property (own the trademark hhtimesheet).This is why we informed you,But now Path soft Corp wanted to apply for other domain names and internet brand name you have not registered yet.Path soft Corp wants to apply the following domain names:
1. Domain Name:
hhtimesheet.cn hhtimesheet.asia hhtimesheet.mobi hhtimesheet.cc hhtimesheet.net.cn hhtimesheet.org.cn hhtimesheet.com.cn
2. Internet Brand Name:
hhtimesheet
If you have no relationship with Path soft Corp,according to our working experience,there are 2 possibilities:
1.Path soft Corp is a domain names grabber.they want to register these names before you and sell back to you to gain profits.
2.your competitor let Path soft Corp to register your domain names,let your customers feel confusion.

We found they are not the real owner of this name when we were checking.So we sent email to inform your company to protect your interest.As a domain name registrar,we have no right to dispute their application.As the company whose trademarks relate to the applied domains,you own the preferential rights to register them.If you think these domain names are useful for you,we can help you register these domain names within dispute period.If you do not need,then we can register for Path soft Corp.You must know that any party have right to register any domain name in the world without authorized.This is international domain name registration principle.For example, google.com.cn & google.cn had been registered by other company.And Goolge had paied 1 million dollars to get the two domain names back.We also don’t hope that there will be some infringement to the interests of your company in future.

There is a time limit.Pls let us know your decision soon.Waiting for your reply.

Best Regards,

Okay now I know what is going on. This domain registrar is trying to sell me the .cn, .org.cn, …. domains and this is part of their unethical marketing campaign. Look for new application and domains and contact them telling them someone is going to register the .cn and hurry up or you will loose it!!

I hope none of you fall for any of these traps.

UPDATED: And it it still comming I got two more emails from two different person from the same organization with exact same content, I think I can now disclose their addresses:

Kevin Wu
Senior Director
TEL: +86 21 69929440
Fax: +86 21 69929447
Website:www.qpnic.org.cn
Shanghai QPNIC Web Property Solutions Limited 

Jake Shen
Senior Consultant
TEL: +86 21 69929440
Fax:  +86 21 69929447
Website:www.qpnic.org.cn
Address: Room 301, 42th, nong 1519, Jinyuan 1st Road, Jiading District, Shanghai city.

Stop the user from leaving a page if changes has not been saved

February 5th, 2009

The requirement was “Give a warning if user want to go away from timesheet form if they made a change to their timesheet and hasn’t saved yet”

  • window.unload is too late we should use onbeforeunload event.
  • onbeforeunload is not supported by prototype so we should use direct java script.
  • if onbeforeunload returns a string a confirm message will be show to user by browser. And is supported on ie6+, firefox and safari (maybe other browsers support it too).

so the will look like this:

var TimesheetFormController = Class.create({
   //some part of the code will update this variable.
   changed: false,

   initialize : function() {
       window.onbeforeunload = this.beforeunload.bind(this);

       //rest of code.

   },

    beforeunload: function(event) {
        if (this.changed) {

            return "You haven't saved your changes yet.";
        }
    }

<});

onchage event doesn’t bubble up in IE

February 5th, 2009

In the last couple of days I was busy updating the timesheet entry form in our timesheet management software. I create a class called TimesheetFromController to handle all the operations like:

  • update the total time as user change the time
  • set the modofied to true when user edit the form after saving
  • do validations as user edit this form
The code design was very nice but unfortunately in IE (6 and 7) onchange event doesn’t bubble up. So I should listen on onchange event on every element inside the form. This form contains dynamic elements so the solution was not as tidy as I was hoping.

iPhone support for timesheet entry

January 26th, 2009

We reviewing customer feedback we decided to include the iPhone support as part of our first release scheduled for end of February 2009. Currently we decided to have support for timesheet and expense entry, timesheet approval for our iPhone version. We will keep you posted on the progress of this new feature.

HHTimesheet is now free for account of up to two users

January 22nd, 2009

After few weeks of debate and base on feedback from our beta testers and early customers we decided to make our innovative online timesheet management to be free for up to two users. Base on this new pricing strategy freelancers can easily and freely use our system. Having free accounts means that we will get more customers on our system and based on their feedback to increase the quality of our system for all of our valued customers.

HHTimesheet version 0.85 is available

January 17th, 2009

After about a week we are proud to update our servers with the latest version of HHTimesheet. here are the list of changes:

  • All the small glitches that we’ve found has been fixed (dead links, typos and css issues) (BUG FIX)
  • Employees are now able to  add notes to their timesheet and expenses.

Thanks to all of the beta testers and everyone that showed an interest in our product.