Timesheet tracking software
November 24th, 2008In the last few months I was doing the following things:
- watching my stock loosing its values every day
- working on a new web based application for tracking timesheets.
In the last few months I was doing the following things:
In my recent project I wanted to have some simple validation at javascript level. I wanted to develop a very flexible and generic validation code. My requirement was to make sure that mandatory fields are filles by user and numeric field are filled by only numeric values. The first approach will be adding onsubmit method to each form and do the logic there. But thanks to availble javascript frameworks like prototype I could do it in a very nice and generic way. No custome javascript code for validation.
By defiing an input field as mandatory (<input class=”mandatory”/>), this framework will ensure that user cannot submit the form if the mandatory field is not filled. Also it will add css class error to the field when it has a invalid value (in the case of mandatory fields invalid means empty) so you can simple define a class like:
input.error { border: 1px solid red; }
to give instance feedback to user when a field is not valid. No custom scripting is needed.
<script type="text/javascript" src="prototype-1.6.0.2.js"></script> <script type="text/javascript" src="validation.js"></script>
This validation framework will look in all the input fields in the forms and add the appropriate hooks to ensure that only valid forms can be submitted. It will also add the error class to invalid fields when user change the value of the field.
Extenting this framework is damn easy. You can easily add more validations for new css classes.
Click here to download the validation.js
Click here to download the sample
I am using Rails for a while and I used rails to develop the garagesales. I should say the rails is a fantastic framework on top of the fanstastic language. But I am a J2EE developer and coming from the J2EE world there are still things in Rails that I don’t like:
But as the time is passing by I am reading and hearing more good news about the rails. I think that dots are connecting together to make the rails the best web framework of the future:

Hi,
I am writing this post to share my experience in moving for PC to MAC. I made this transition less than two years ago and I couldn’t be happier.
My Previous system
I am a professional IT programmer, previously I had a dell machine with dual boot to windows and Linux. I was using windows for
The reason for me to run linux was:
Moving to apple
I was always admiring apple for its high quality hardware but I was student and I couldn’t afford buying a mac plus I was always trying new programs and products which were not available for mac (sometimes) and I was scared of having a mac only system in my home. After the apple move to Intel and emergence of virtualization softwares like parallels and talks about booting windows on apple (this is before the bootcamp) I realize the I can move to mac and keep my old windows license so I can move to windows if needed. So I ordered the first series of Apple iMac 24″.
Why Apple iMac 24″
Well I was thinking about it alot. I wanted a fast system which was affordable too so my options were iMac and Powerbook. With buying 24″inch iMac I lost the mobility which is a great thing. So now when I go to my friends place I can’t take my laptop so I will spend quality time with them. 24″ monitor is also a great thing. I can open multiple windows (Development IDE, shell and Sql browser) and use them at the same time. It is like having to smaller monitors.
Transition (Look and Feel)
Beside all the good things in Mac, I get used to some of the windows terminologies. at the beginning not having the start menu with list of all programs and not having the task bar for confusing but I get used to in couple of weeks. I also start using the Spot light for running programs. I press the <Ctrl><Space> and first characters of the program that I am going to run and it is much faster than going to start menu and choosing the program from the list of menu. After all the general look and feel is something that people will get used but generally I prefer the OS X look and feel over anything else.
Softwares
I have boot camp and fusion on my computer to be able to run windows and the only thing that I use there now is Yahoo messenger when I want to do a voice chat with friends who don’t have skype or when I want to test my website/webapp in IE6.0/7.0. I occasionally come across some softwares which I can’t run in OS X but it is very rare and become least important with fusion integration inside OS X. TOAD is now one of the few development tools which requires me to use windows (for does of you who never heard of TOAD, it is a GUI for using database).
Performance
My computer is running fast, I can keep photoshop, Dreamweaver, Eclipse, MySql , Apache, Tomcat, … all running and switch between them smoothly. When I am not using the photoshiop for few days (Because I am focusing on development) and switch back to it, system is loading the data smoothly from disk after a small hiccup. I can’t image going back to windows which I think it’s paging system is fundamentally flawed.
Software Installation
I think this is a topic that worth to mention. In windows every program is coming with an installer which create the program and keep some information inside the windows registry. Computer is gradually become slower as more programs are putting stuff in registry and un-install will not remove all the entries in windows registry. But in apple there is no installation. Every program is a directory which has a .app extension and contains a file describing the boot program and applications are keeping their data inside the user home directory. So installing the program is copying the folder (Which is mostly packages inside a .dmg file) and un-installing is just removing the program directory. With this approach there was no need to reinstall my operating system, but in windows I had to reinstall my operating system every 6 months as the system was getting slower by the time.
Conclusion
Apple computer is a computer which “Just works”. It is a little bit more expansive by adding the time that it will save you in installing softwares, customizing the environment, resolving driver issues, … and accepting that time is money. It is much cheaper than equivalent windows system. Plus you will get a productive, ready to use and high quality system. I strongly encourage everyone to buy a mac for their next system upgrade and use windows in fusion (or parallels) for their Windows only programs.
Hi,
I am going to start blogging again. This is my first post.
Cheers
Behrang
I launched the fastgaragesales.com about a month ago. I am noticing that amount of traffic coming to my site from google is increasing slowly from two-three clicks a day to about twelve clicks a day. It is going about as my site have useful content and google is seeing a constantly changing website. I am expecting to get around 500 views per day by the end of this year. 500 views per day means that I will pay for the hosting and few extra dollar in my pocket.
This web based application allows you to store all of your accounts and passwords in one location. It is absolutely safe and secure. It store your passwords in a secure environment that no one on the planet can get access to your passwords without having your master password of course.
read more | digg story
There are plenty of websites, each requires separate login and registration. If you are like me, you are probably already confused and cannot remember all the user names and accounts on different websites</p>
Mypazzwords is the solution to your problem. You create on account with a master password to store and retrieve all of your passwords.
I wrote this website this weekend and I hope you enjoy using it. It is secure and free. http://www.mypazzwords.com
go to Google discussion forum for your questions about using this website: http://groups.google.com.au/group/mypazzwords
Regards
Beyond NG
I finished the http://www.fastgaragesales.com website. You can start posting your garage sales and enjoy this website. Thanks to google free geocoding and productivity of rails I was able to provide this service in less than a month. The total development time was about two weeks (full time). I am already thinking about two next projects that I am going to work on. I created the story board for one of them in side the mingle.. I will talk about that project later on. It is about brining an old game that I used to play with my friends in high school into online word. I will keep you posted and thanks for reading this weblog.
Beyond NG
I always had reservations for rails performance. Ruby is great language it provides many runtime features that increase the programmers productivity but reduce the performance. Also rails is the best web MVC stack that I ever came across. It is fair to say that a ruby code is about 20 times slower than equivalent java or native program. So during writing the my garage sale program, I became concerned about using rails as my development language. It got me to the point that I decided to do some more analysis and googling to choose the best platform before moving forward (BTW my garage sale program is going well I am on the track and hope to be able to finish it by the end of April).
Rails is slow, it is really slow. It will become much faster when it gets its own virtual machine and some byte code optimization like the one that java has. But the richness and plugins and elegance of the framework is too tempting for a developer. So that is the solution for now? There is three solutions to this problem:
Lets do some math; Take my garage sale program as an example, a post will be created once and will be visited 100+ times. So site will have 90% cacheable load and 10% active load. During the 10% active load probably 50% will be backend database and 50% inside the ruby application (probably less in my case as I there is not that much CPU intensive processing other than some image resizing by rmagick and text indexing by ferret which both are ruby front-end and native backend). Furthermore by out souring my images to Amazon S3 I will be able to reduce the rails application even more. So At the end less than 3% of the load should be on the rails application. In this case even if the rails is 5 times slower than any other language the total effect on the performance is about 15%. So how to get to 3% load on application in real world? Here are the recipes that programmers should follow:
After following these recipes and having a program that is scalable here are the steps that I suggest:
Thanks to partials this move should not need lots of refactoring in our code.