Will Bridges

Unconditional Wisdom

Archive for the 'Programming' Category

Migrating Typo To Wordpress

It was not fun to migrate the Typo blog engine I had before to Wordpress. So, I want to save others some trouble. First of all, this is the site that describes the process:

http://blog.ifbydesign.com/2006/06/26/automatic-migration-from-typo-to-wordpress/

However, it’s ancient and the database no longer looks the same at all. You must dump the sql data from your typo database to your wordpress database from the following tables: articles_tags, tags, categorizations, categories and contents. Your wordpress installation should be fresh… DO NOT DO THIS TO A WORDPRESS BLOG THAT IS IN USE! You will lose your data if you do that. Backup your data regardless. I do not guarantee this to work but it worked great for me and I hope it will save someone a great deal of time trying to migrate from Typo to Wordpress. The below script was done with Wordpress 2.5 and Typo 4.1.1. The only thing I didn’t do was I didn’t migrate comments since I didn’t need to because most of my comments from my Typo blog were spam. I’m much happier with Wordpress, even though it’s in PHP )= So, here’s the sql script I modified to take place of the one that’s in this tutorial.

 
MySQL SQL Script For Migration

Allstarlodging - A new kind of lodging software

I’ve been working with AllstarLoding.com for years now to improve their site and their business. They went from being relatively small and managing about 20 cabins to managing 100+ properties in about 3 years. I attribute a large part of their success to their website, of course! They now dominate their area in the Shenandoah Valley of Virginia and are still expanding. The company is also doing well because it’s run by a very sound business man, Carlos Ruiz. He has a lot of foresight and vision. I came to him a year ago when he was thinking about revamping the software I had built him. He wanted to go with an ‘out of the box’ solution and was researching the massive amounts of reservation software out there. I asked him to let me do it in Ruby on Rails and let me sit in on the demonstration for some of these ‘out of the box’ or pre-built solutions. I sat in and gathered all the information I needed to build a very solid reservation system in rails. Now, mind you, I was very new to rails at the time and I’m still cleaning up things that I should have done a different way but it was a learning process and I still created a magnificent piece of software, which is being improved on all the time.

I’m actually working to generalize it so it can be sold to other companies and re-used. There are parts that I built in a very modular fashion but some parts I built very specific to his business. So, now is the tedious part of generalizing, writing tests that should have been written (at the time I wasn’t doing BDD or TDD) and building test instances of the software. This software is not just a reservation system but a complete software solution to vacation rental management and I like to think of it as the tool to use for any vacation oriented business to take over their respective area.

How To Make Sure Specs Are Passing Before Subversion Commit

I jumped on the Behavior Driven Development (BDD) band wagon for development not to long ago. Also, before that, when doing Test Driven Development (TDD) I worked at this company called Outdoor Central. They had it setup where if you committed code to subversion and the tests failed the whole group would get an email saying that you broke the build. That was entertaining and worked okay. But, what if I don't want a commit to be put in if the specs/tests don't pass. Well, that's why I built a pre-commit hook script in ruby and put in in subversion. Now, when someone checks in the server checks out the most recent version of the respository to a temporary location, applies the subversion changes via 'patch' to the temporary check-out and then runs specs against it. If they don't pass it doesn't let them commit. If it does pass they get to move on right along. It's pretty cool. Further it emails me, the admin, a pretty html report of the rspec results so I can see what's going on. I was thinking about implementing an rcov email with every successful commit too but I don't see a need for it yet. However, if you would like to implement it, go ahead. Heres's the scripts for my pre-commit hook:

#!/bin/sh

# PRE-COMMIT HOOK # Save as 'pre-commit' without the .txt in the hooks directory of the subversion repository

REPOS="$1"REV="$2"

# Might need explicit path to ruby instead of just 'ruby'ruby /path/to/runtests.rb "$REPOS" "$REV"

http://wp.invisiwill.com/files/runtests.rb

 

Big Badass Computer System: On The Cheap

I have now, fully functional:

2 Computer systems (laptop: compaq C571NR, $450 retail & 2 year old desktop, cheap, custom built)
2 Operating systems: Latop is running ubuntu linux and desktop is running Windows XP
3  Monitors (22 inch widescreen acer p221w, $330 retail, laptop 15.4 inch monitor and old 19 inch flat screen monitor from wal-mart  $200 about a year ago)

I have all 3 screens and both computers running at the same time. I am using a program called Synergy to be able to use my keyboard and mouse on my laptop and be able to navigate both systems. (Can copy and paste from windows to linux and back, awesome!)
The laptop was a bitch to get working with the proper resolution (1680×1050). Had to hack it but got it working and that took some time but it works now. I'll put the documentation at the end of this on how I got it working.
I have a 750GB external hard drive that cost me $200 at Best Buy, watch those sales…
I have a logitech camera (5000 pro or something) Using it on xp. It was like $70.
I have surround sound logitech speakers. Can't remember cost but less than $50.
I have an HP Officejet 5610 all-in-one which works great with windows or linux. It was about $100 or so when I bought it.

So, on the cheap. Maybe a combined value of $1400 I have one of the best systems I've had in years and can be mobile because of my laptop. A truly incredible combination.

 

Charging Low: Old Clients & Friends

From time to time estimating a project's length can be tricky if you have very little in the way of specs. It's probably best to not even quote the project and go hourly under this cicumstance. About 9 months ago we quoted a client on some work. This client happens to be a close friend of mine. I told him what I thought it would take at the time with the resources I had back then. Since then we've raised our rates by a lot, hired a couple more folks and changed the way we do business. The site was launched behind schedule in an incomplete status. They've asked for all kinds of additions and changes to the project. I was happy to give it to them but didn't warn them every time they asked for something that it was puttting us further behind. We were building a software package that could be reusable and so I didn't mind the extra features.

So, now they are really pissed because the project is still not complete and I only have a week's time this month to dedicate to their project which may or may not be enough. It's a behemoth of a project which is over 100 hours outside of it's budget. So, what to do? Well, I've learned some lessons.

  1. Do not do extra work for a client outside the scope of the project without charging and increasing the deadline (yes, I should know this already but have made this mistake regardless of the fact I know it. Generally make this mistake with friends only.)
  2. When doing work for friends make no or very little special considerations because they are friends after the contract is signed. The contract is in stone and must be followed to a T as much as can be.
  3. With such a large project deal with it in phases if possible and only charge/estimate one phase at a time. If you make an overall project estimate make it very clear that the accuracy could be off by up to 30%.
  4. If specs are unclear or unfinished a deadline and a cost cannot be clear. No exceptions.
  5. When building a software package for a particular company that can be reused pad your quote with extra time.

Back to the question of what is to be done. Well, there isn't much that can be done. I've went back and forth with the client. I've proved my dedication to the completion of the project. Generally I would give a partial refund but because the project is so far over budget it's not a good move. So, all I can do is look over the things that need to be finished and complete the tasks that have the most user impact for the least cost first. After that I need to finish the less important tasks or tasks that have a high cost and low benefit. After that I have to hope that my friendship with the client is strong enough to make up for the issues we have had.

Some of you may say "Will, you so fucked that up." But really, I am not the only responsible party. I talked to the client's wife, who also works for him, and she understands that part of the reason we are behind on the project is also because of additions and changes. So, even if my client doesn't get it at least his wife knows what's up and someone sees the effort I have put in.

Will I salvage this client? Yes, probably. I'm 90% sure. Before this year we had a sketchy reputation with some of our clients but we completely changed the way we do things, the technologies we use and hired people to make up for our lack of ability to complete work. We did a complete 360 and fulfilled my vision of what I wanted the business to be like. This client is one of the last clients from that sketchy past before we did our turn around and I hope to really help them fulfill every vision they have of their company through their website.

O’Reilly - Safari Books Online

I joined O'Reilly's Safari Books Online last night. So for $39.95 a month (the cost of one good tech book) I get access to 3600 tech books available online. I can download to pdf up to 5 chapters of books a month. It seems not all books have downloadable chapters but it's still an incredible buy. I was debating buying myself a book last night and instead that's what I settled on. O'Reilly has long been one of the best publishers of tech books ranging across all topics. The flip side is you have to read the books in your browser (except for the chapters you download per month), which really sucks for some people. They have some cool features like you can bookmark areas in a book and add notes to certain parts of a book. You can also save your favorite books as favorites. The search feature will let you search the contents of an entire book as well as all the titles of a book. Any links within a book can be clicked to go offsite. Also, it's a lot easier to copy and paste code from an online book than it is to manually copy by typing up the code from a physical book. All in all I think it's well worth the money.

My Experience With Hosting: Eapps.com/Railshosting.com

I've been thinking about my experience with hosting and I thought I would write about it. We just bought a dedicated server through hostingrails.com. What a beautiful experience it has been. They held my hand through everything and setup every peice of software I needed. Really, I only paid a $99 setup fee and $290 for the first month and I got a full server (specs here, but I got an additional gig of ram). It's an additional $40 a month for the extra gig of ram so that's why my price is $290 a month. Yes, it is a bit steep of a price given I could lease a server for cheaper but you really get what you pay for. They are specialists in Ruby on Rails and have spent way more time helping me get the server just the way I want it than the $99 setup fee I paid. All this and it's a month to month contract! This means I have no obligation to stay. It's been a while since I have been dealt with in such a fashion. I guess I should expect no less from now on.

Now, let's get to the reason I had to get a new dedicated server. I had a VPS (Virtual Private Server) through eapps.com. They are still running an old version of Apache which doesn't work will with Ruby on Rails and they are using FastCGI for rails sites. Ick. So, I decided, being a decent server admin, that I would install the proper version of Apache and all the things I needed to run Rails properly. Great, that worked okay for about 3 months. Then! All of a sudden my site and all my customer sites are down! Oh no! Come to find out, some of their automated tasks wiped my VPS clean off of their machine. They had no idea how to restore my custom config and they didn't tell me.  So, after a day passed and my customers were yelling at the top of their lungs I said "Okay, give me a new VPS and let me re-install everything". I was able to get a day old database backup from my VPS, which helped a lot. But it took me another day and a half to get the server back to where it was and all of my clients restored. The total cost was almost 5k between my customers loss of business and the time I had to spend restoring everything. Now, let me be clear, eapps is a great host if you are not doing anything Rails oriented. Their support is pretty good and you can reach them by phone most of the time with no wait and their prices are excellent. You can get a VPS for as low as $10 a month! Also, I had a chat with the president of eapps and he has told me about their plan to offer real rails support for hosting in the coming months. I told him the things he will need to do to get it right and offered to help them test anything they come up with. If they listen to my advice I think they will really be an awesome rails hosting company. But, as of now, do not use rails on eapps! Do not do any type of custom config if you are using eapps!

Business is Boomin

Just in the past 8 months BluePaw Software has went from a company that brings in 3-4k a month to a company that brings in 15-20k a month. I think by the end of the year we will be to 25-30k a month. This is a lot of growth. I remember I was posting articles before about our foreign worker strategy. We adjusted that strategy because we couldn't find any really good, viable and cheap workers. While we aren't abandoning that strategy completely we are postponing it till we have some more resources to spare. We have decided instead to find local candidates that are good programmers and have an interest in Ruby on Rails. From there we believe we can mold them to the type of programmers we want.

Yes, the market is a flood with Ruby on Rails programmers. But, we have difficulty finding good ones. We've went through a lot of programmers that we though were weak or didn't like their additude. I ended up hiring a friend in Virginia that used to be an ASP programmer. I'm currently training him on Rails. I'm doing it because he helped me when I was in need in the past and seems to have a strong desire to learn. I told him I would be watching him though and want to make sure he is learning at a good pace. We are paying him to learn so in that situation you want to make sure the guy is really learning. He's been learning for about 6 weeks now. I'm about to really put him through a test of what he's learned so that should prove interesting.

I find it funny that everybody thinks rails is so easy and that anybody could do it. Yes, any descent script kitty may be able to learn rails, however to actually produce clean code that is reusable is a different story. You really have to keep up to date, watch the plugins list, watch the blogs and keep informed by discussing rails to be a great rails programmer. We believe that, our style of business and our charisma is our edge and what keeps us moving in an upward direction with profits.

I was pretty concerned at first because I had never managed a business to this degree. Yes, I've been a contractor for about 8 years doing independent work as a programmer and even managed a few people from time to time. But, being a CEO made me nervous and growing so quickly proved to be a serious challenge. At some times, I haven't been sure what my role is or if my role is everything. So, I've started to break apart my roles and look for experts that could satisfy those roles better than me. I still do the things I'm unconfortable with to a certain degree but I take guidance in order to do them from people I'm sure are experts. Things like accounting I've completely given to an accounting firm. It's cheaper for them to use their time to do it then it is for me to use my time to do it. Being a good CEO is about good delegation and focusing on the important details by wading through the confustion.

Pseudo Chain of Command?

Here’s the thing with any given project. You must have a chain of command. Especially in large projects but even in projects with 3 or more people. Programmers have a tendency to keep talking about something till everyone is blue in the face. Discussion is good and a natural part of software development but someone has to be there to draw the line and say ‘no more, we need to build the software now’. It’s quite a difficult thing to do when you are a programmer yourself and you are attempting to find the best way to accomplish a goal. If you aren’t careful you can get caught up in it all. Nobody should ever take a project without first establishing roles and deciding what the chain of command is. Though it is important to listen to everyone involved and not marginalize anyone who may have an important view on the project it is equally important to actually do the work. Using Ruby on Rails as a platform means you can easily change any aspect that does not fit later in the project at little cost. Personally, I still like a good plan of attack but I’m not so concerned about the small details until I come upon them. This is agile development in my opinion. Every once and a while you will find an issue is larger than you first though. But, that is the cost of development sometimes and as long as you built with extensibility in mind changing something shouldn’t be that serious.

The main point here is if you are a contractor or run a contracting company always make sure your contract says who’s in charge, who’s responsibilities are what, and give your project a clear way to resolve arguments quickly if need be. Development should be democratic in planning but more of a monarchy with advisors during programming and it should never be a theocracy!

2.0 State of Mind

The web can host applications that are platform independent and ultimately scalable. That’s what we are working on at Bluepaw. We are working on a set of applications that we can deliver to manage businesses and manage their interaction with the internet. We call this the ‘Paw’ line of centralized software. All software uses Web 2.0 concepts and each piece of software in the line will be built for a type of business.

Each client that has an instance of the software will have the same code that will be a core engine driving the software. There may be modifications for that particular client. Those modifications will enhance the quality of the overall application and will be merged to the core software when they have been tested and we believe there is a possibility other clients will use the modifications. Each client will pay a subscription and hosting fee for the software as well as for the installation and any custom programming for their business. The subscription fee will allow us to bring in future upgrades as the software package improves. We will also take 25% of all income from the software and put it back in to the development of that particular software package.

We will follow a modular style of adding features to the software. Anything that changes the functionality of a the core code would not be merged to the core software as it could break other sites. That is, unless it was a fix to the core code. In that case it would be merged to the core in a very delicate manner.

The first part of doing something like this is a very flexible data model for each business and researching the business in question. In many cases before you start programming you should know the business better than the people or as well as the people in that particular business. Luckily I know a couple industries where I actually know people in the business to launch test sites with and create a buzz. My first intention is to go really cheap or free with a client in the industry we are working with to build the software and in return we get insight in to the business and build a base software package. From that we create a client base and a buzz around the software. Many times people want to know who uses a software package before they buy in to it. So, it’s good to have a client list that use software even if you have to give cutthroat rates. As more people use the software you can raise the value of the software and thus raise the price. Eventually you reach a point where you are making several times the cost of development for the software.

Another strategy we are using to get our development costs low for this ‘Paw’ line of software is to hire outsourced resources as trainees who are good programmers but aren’t familiar with Ruby on Rails or want more experience. We pay them very cheap as they learn and review their work as they go. This way we are training future resources and getting something of great value out of it while we are doing it.

I know you business minded folks are out there reading this. Don’t get any bright ideas! Just kidding. There’s enough room for us all to make money.

Next Page »