How to estimate website project cost when relatively inexperienced?
April 2, 2014 9:41 PM   Subscribe

I have a client who has an existing website written in PHP spaghetti code and has been through a few developers. He wants to add features and upgrade to a modern framework (Django). The website is quite involved (tests, shopping cart, user authentication) and the requested features would add another layer of complexity (teachers and students). I have experience working with Django but I'm not confident enough to estimate the whole thing. Worse still, my client is non-technical and keeps asking for updates while remaining cagey about cost/ trying to lowball instead of considering technical difficulties. How does one proceed?

Two things:
1) I'm new to project planning. I've worked as a full-stack developer before though this is my first time "dealing with a client" and discussing rates. The codebase is a mess and without clairvoyance of knowing what will break what, I've drawn up a functional specification and given a rough estimate (~100 hrs) though the client wants to hear total cost and has budgeted only 5-6K (a bit low in my estimation). I try to explain to him that testing, deployment (Amazon EC2), bug fixes, transitioning PHP to Django code/middleware, feature requests also play a role. Is it better to work hourly or project based in such a situation? Also, though he seems like a reputable guy, what prevents him from screwing me over, adding new features last minute outside contract scope or expecting functionality and then paying? I've already spent many (unpaid) hours setting up a development environment that have not been factored into total cost. Does one need a legal contract (begging the question of having agreed project budget/hourly rate) or can one split up the project into quarterly installments and get paid upon achieving milestones?

2) As I get better at this, is the next logical step incorporating as an LLC? I've been paid a W-2, Paypal, checks and cash for services as an independent contractor before though many friends have formed 1-person web-dev LLCs. Is there any reading material for this process to think in more business savvy terms?

Thanks a bunch MeFi!
posted by bodywithoutorgans to Work & Money (20 answers total) 6 users marked this as a favorite
Worse still, my client is non-technical and keeps asking for updates while remaining cagey about cost/ trying to lowball instead of considering technical difficulties. How does one proceed?
I'm no expert, but... run away.
posted by smcameron at 9:47 PM on April 2, 2014 [12 favorites]

No offense, but you sound totally out of your depth as a consultant. You don't even know what you don't know about this project. Under no circumstances should you do this as a fixed bid. Aside from exhorting you to flee, my next best advice is to find a more experienced consultant, bring them the project, and ask them to take you under their wing and mentor you through it.
posted by ottereroticist at 10:02 PM on April 2, 2014 [2 favorites]

1) This isn't a great short-term deal for you
2) DO IT

Having done projects like this for years, I would not agree to the 100hours nor the $5k. However, you should take this for the EXPERIENCE. You'll better understand where you made incorrect assumptions, etc. You'll learn. The next project will be better. The low $ is for your inexperience in managing a project. That's OK! Once you do a few you will get better and better, have proven yourself - you will get referrals and more work.
posted by Sonic_Molson at 10:05 PM on April 2, 2014 [1 favorite]

You don't need to be an LLC. You're just a guy, take it as 1099, there's no shame and the LLC won't do anything for you.

So, the red flag is also, "been through a few developers." You're going to have to be professional and demanding of him. He's going to pay you for your time because you're a professional, he's going to respond to your questions, he's going to provide what you need to get the job done, and he's going to help guide you toward his goals in response to your expertise. His code's a mess and you're porting it to a different language, there are a lot of unknowns. I'd say 100 hours is a decent figure just to get it working in Django and to see where you are and whether he wants to continue. Tell him to forget about $5-6K, a decent chunk of that is going to be consumed by just figuring out what the code he has does.

Frankly, this guy sounds like a longtime client of mine. It's been quite painful, but he's a good guy and he's learned over the years that applications can be complex software. Non-technicality is likely to foster "Shit's Easy Syndrome." You can manage this by being a pro (but not a dick), and over-communicating. When his flights of fancy result in more features, tell him great, you'll be happy to add the hours onto your estimate, or (better) that you'll deal with those once the original spec is satisfactory.

Make a work agreement that lays out the work you have to do in detail. You don't have to divvy up hours per task or anything, just a bullet list of all the things you can think of. This is what you'll use for boundaries when he asks for additional stuff. I use the NOLO press contract thing, but there are other approaches.

You should be able to set up a baseline development environment easily. Consider that learning time.

You can set it up so you get paid by milestone. I invoice twice a month with a discount for paying within a week.
posted by rhizome at 10:59 PM on April 2, 2014

As a Django developer, this sounds like much, much more than 100 hours. There's no such thing as transitioning code from PHP to Django, unless the PHP code is already well structured along MVC lines, in which case you're just retyping it in Python instead of PHP, but why would you if it's already well-structured? If you're really dealing with spaghetti code, then tens of hours just to understand what's actually going on in the codebase should be expected.

I wouldn't even try to set a fixed price on this, especially with a client who comes into it thinking he's got a cost already and it's about getting you to fit within it. I would say something like this: The scope and risk is too uncertain for a fixed price project. I'll bill hourly and invoice monthly doing a feature match implementation on a proper platform, providing per feature time estimates that are informational, not binding. We'll structure the project so that you own the code repository, so if we part ways halfway through you have certain possesion of all paid-for assets and can find another developer to take over. We'll take an agile approach where you'll always have functional code to see--first a shell site running on EC2, then something into which you can log in, then products to browse, then a cart, then checkout...

The point of this approach, assuming he's a sincere customer, is to acknowledge up front that neither of you have a clue how much this will cost or how long it will take, but that you can work it in bite size chunks where you're confident estimating it, he's confident paying for it, and he's always free to walk away and hire someone else--which paradoxically increases his confidence in you. If you're paid hourly, then it doesn't matter if he changes scope or says "no, I want it another way", because you're getting paid for the work. If he says you didn't deliver and he won't pay for that, then you say "thanks for the work, another programmer can take over from here"; likewise, if he feels you're dogging it, he can say "thanks, we're done now, here's your cheque, another programmer will take over from here."

The point of all this, and you should say this explicitly, is to minimize risk for both parties by keeping deliverables small and well-defined. If he says "how do I know you'll deliver good code?" you say "you can pay a more experienced programmer to spend an hour reviewing my code that took 20 hours, by giving him access to the repo." Acting fearless of review by someone else, of being fired suddenly, of losing a smaller-than-project-sized cheque, is key here.

If he insists that you estimate it and provide a fixed price, you should probably walk away, but if you must, quote an estimate that covers your risk of unknowns, of scope creep, of unforeseen issues, and feel free to tell him that you're inflating your estimate in order to hedge against the risks he's forcing you to take. Tell him he can lower the price by sharing the risk via the previous method.
posted by fatbird at 11:00 PM on April 2, 2014 [16 favorites]

Oh, and a good trick to get the client to understand the complexity of the development job is to get them to develop the feature spec--or in a case like this, to review all functionality and choose what he wants implemented. This can be phrased as "surely there's a lot of stuff in there that you don't need to carry over, and we can reduce cost by selecting only the essentials, shaving off buggy cruft that does nothing but increase expense." This puts the clear burden on him to articulate the feature list in detail and in writing, motivates him to drop irrelevancies and save money, and to agree that his spec is exhaustive and anything not mentioned is a "change request".
posted by fatbird at 11:06 PM on April 2, 2014

This client sounds like a nightmare, but I understand that a nightmare client might be better than no client.

Have you heard of agile billing? It's somewhere between fixed-cost and hourly billing, and might work for a client like this: it gives them control over their budget, but lets you walk away if things get messy.
posted by third word on a random page at 1:54 AM on April 3, 2014

We literally just had this exact same sort of situation come in our office, on a much larger enterprise client, for a much larger project.

It's not in our wheelhouse. We're a PHP shop, and they're asking us to integrate the interfaces of two different systems, both written in nasty Java with the ZK framework and Zul files with inline CSS and business logic and all sorts of nastiness. This is a $100k+ project, and I went to a meeting this morning and explained that this wasn't a good fit for us.

Fortunately, we had some alternatives that would work for them, that would make it a better fit, and the client is fantastic and understands where we're coming from and trusting us, but what you're describing is a horrible client in the making. This is someone that will drive you nuts, lowball and nickle and dime, not understand why things take longer than you initially said (because as you get further into the awful code, the more you realize it's awful and horrible to work with and reverse engineer, etc) and the project will VERY LIKELY grow to be VERY UNPROFITABLE very quickly.

YOU WILL LOSE MONEY ON THIS PROJECT is what I'm saying. Django's Python. It's nothing to do with the PHP this thing is written in, so you can't just reuse ANY of the existing code. You'll have to work backwards to fully spec the thing out, make sure you're bringing over the core functionality, and you'll have to do so on a budget.

Let's look seriously at your 100 hour estimate. That's 2.5 weeks. You're saying that in 12.5 days you can have all this done? The reverse-engineering is work. It shouldn't be free. The confirming the specifications is work. The actual coding the entire thing in a completely different framework is work. So is validation. So is migration. So is any sort of design, or porting the existing application's design over. AND WE AREN'T EVEN TO NEW FEATURES YET!

What you're describing isn't a small project. It's definitely not an "actual 100 hour" project. It's more likely something you quote 100 hours on, run to 250 or 300 or 450 hours, and then have to battle every step of the way for coming in so far over. The client has already been through this, doesn't trust developers, and it's because no one is giving it to him straight.

Don't be the guy whose eyes are too big for his stomach, unless you're literally nearly on the streets and need the money. Instead, set and manage expectations at every single step. ALWAYS segment your quotes. Try to stay away from fixed bidding and explain that you're estimating things will take "between X and Y hours, probably on the higher end". Make sure X and Y are 3 times what you reasonably think they'll actually take. Keep him up to date every week so that the expectation management is a consistent, persistent process and not "better to ask forgiveness" because you won't get it. (For values of "forgiveness" that = more money.)

There is such a thing as a bad client. There are clients that take up disproportionate amounts of your time, focus, energy, and sanity, and give nothing back. The "experience" is nice, I suppose, but only in the sense of fulfilling one of my favorite quotes:

"Good judgment comes from experience. Experience comes from bad judgment."

This is a bad judgment moment. You will end up regretting taking this project if you don't change your approach (and quote) entirely. You will feel bad because you are a good person and don't want to abandon the client or keep charging him. So YOU will end up eating it on HIS project because of HIS unreasonable demands and YOUR integrity.

This is a mistake. Either run away from it entirely ("sorry, but I don't think I'm a good fit and that I can do what you're looking to have done within this budget, and I don't want to set unrealistic expectations and not meet them") or significantly alter your approach with him so that there are real milestones and a real budget involved.

I'd honestly opt for the former. Learn the lesson of saying no to bad-fit clients now. It's a lesson I've taken literally 10 years to really learn. And I've never once come out better for those clients, except that I know what to FULLY AVOID and turn away now.
posted by disillusioned at 1:55 AM on April 3, 2014 [6 favorites]

This sounds like a bad client, can you contact some of the previous developers and ask them for advice. My guess is you will have a tough time getting paid if you take this on.

Fatbird has it, this is business, structure this into agreed milestones on a T&M basis with payments at each milestone, do not proceed until you have received all outstanding payments. Further set a credit limit of say $1000, do not allow this client to owe you more than this at any stage. I do not expect the client to agree to this and that would be OK by me. Even if you get paid at each milestone, you will probably not get paid for the final one so make ongoing support and enhancement (inclduding cooperation with successive developers) dependant on being paid on full.
posted by epo at 1:56 AM on April 3, 2014

Wow. Run away. If you're estimating 100 hours (2.5 weeks) to basically rewrite an entire site into python from PHP with extra features, you do not have the experience do do this yourself. If his budget is 5-6k, at the high end, thats only 50 bucks an hour as a consultant, which in my world (as a web dev who has been doing this for ages, but living in an area with a high cost of living) is a serious lowball.

I'm on my phone and rushed, otherwise I'd go into a long spiel of how i do estimates. But the short version is break it down into tasks, estimate time and risk, multiply those together, and double the whole thing. Document all those features, as well as all assumptions as a 'contract' and any feature creep is met with a new estimate of cost.

Also -- why django? Is he just looking for a 'modern framework'? Is that the one you suggested, or him?

Ugh. There are just so many things wrong with this. Unless you seriously have no other options, and would be willing to work for months for the 5k, I'd just walk away. But on the other hand, horrible clients and projects like this is something we all do at least once in our careers as freelance web devs... It's how you learn when to run away.

Good luck!
posted by cgg at 6:21 AM on April 3, 2014 [2 favorites]

This will end extraordinarily badly. Leave.

If you wish to help this client, I suggest that you instead try to find an existing service such as BigCartel or Shopify that covers 90% of their needs, and recommend it to them, and THEN leave.

I would not, under any circumstance, take this engagement. There is very little chance that it will create business value for the client, and a very high chance that you will lose money, reputation, and time. Nobody will be happy.

This is not a 100 hour project. And it is definitely not a $6,000 project. Explain to the client that upon further consideration, you've determined that you're not a good fit for the project. Move on.
posted by grudgebgon at 6:25 AM on April 3, 2014 [1 favorite]

In case you need another voice on this side of things, this is unlikely to be a good client relationship. Take the project if you have to choose between the bad client and paying the bills, but there are a lot of alarm bells that others have clearly articulated above.

I will offer up one thought I haven't seen mentioned here though. Who is asking to move this to Python? The client isn't technically oriented, so it seems unlikely that he sees some compelling reason there. For as much hate is heaped on PHP (I do PHP programming professionally, by the way) a lot of excellent web sites get built with less than excellent code underpinning them. If he is budget conscious almost certainly it will be more cost effective to work with the existing language.
posted by dgran at 7:03 AM on April 3, 2014

Response by poster: The previous developer added Django for user authentication (securely hashed passwords instead of stored raw in database) and because the admin dashboard gives the client out of the box customization ability. I'm language agnostic but have more experience in Python and feel more productive with Django - however, having to cobble together custom mod_wsgi to get Apache to work nicely between these two is no fun.
posted by bodywithoutorgans at 7:20 AM on April 3, 2014

Yes yes yes, you need a contract. Work as a 1099 contractor, and look up estimated quarterly self employment taxes. You'll want to calculate withholdings for every payment you receive—it's about 20%. You've quoted a rate of $50/hr. You're making $40/hr post tax. Considering the overhead you're paying, (home electricity/internet/rent usually can't be claimed as business expenses) you're really really not charging enough. This was tough for me, starting out freelancing, didn't have the confidence to charge what I should have. You need to charge much more than you would make as an employee to avoid losing money.

Also, though he seems like a reputable guy, what prevents him from screwing me over, adding new features last minute outside contract scope or expecting functionality and then paying?

Your contract is what keeps him from screwing you over. And the threat of taking him to small claims court should he not keep up his end of the contract. Your contract can be written in plain english, as a letter addressed to him, stating your deliverables, estimated hours, what happens when features are added outside of the original scope, what happens when hours worked are greater than hours estimated, what happens when timetables are not met (on both sides), when payments happen and in what method. State the terms under which this agreement can be voided or broken, and what penalties would apply. Conclude with a line like "I'm looking forward to working with you under these terms and agreements. Please acknowledge your acceptance of these terms with a signature below."

If you don't feel confident writing your own contract, look up boilerplate ones.

I would approach this contract by quoting what you think you can get done in 100 hours/$6k with his statements of the current state of the code base. Yes, he has no idea what state his current code base is in, and neither do you. He is at a business disadvantage by not having the technical knowhow. This is not your fault. You don't need to be a jerk and exploit it either, but you don't need to be a fortune teller either.

You can offer to charge him a flat fee for building a quote and getting elbow deep in his code, but I suspect that wouldn't help you in this situation anyhow.

Either way, when you go ahead with your estimate, be VERY conservative. It won't be his whole crazy list of dreams. Let him know this is all you are promising for $6k. Encourage him to shop around with your specs.

Should he come back, state in your contract that you will bill for actual hours worked, and at $6000 you will prepare the code for hand-off to another developer, or continue working at your agreed rate.

It will make your life easier if you can reach the conservative milestones you estimated, though your contract states you'll bill actual hours worked. You can decide if you'll fudge your hours should you be coming up short. I would not suggest you let him know you're giving him a discount, because he'll hold that over you.

If you start working, and shit is all kinds of fucked up and you will significantly blow your estimate, let him know early. Explain in detail, and with code snippets. Again, offer to prep for hand-off and bill for hours worked, and encourage him shop it out with your snippets and explanation. Or get him to agree to let you bill for actual hours worked, again with the $6k trigger in effect.

Once the scope of the original contract has been reached, do this all over again. A new contract for the next steps, features he wants, timetables, penalties, etc.

Good luck! You'll learn a lot from the bad clients. :)
posted by fontophilic at 7:23 AM on April 3, 2014

the only thing you will get out of fixed price billing for this project is a very intimate understanding of why you shouldn't do fixed price billing.
posted by lescour at 7:26 AM on April 3, 2014 [6 favorites]

An accountant will be well worth it if you pay for an hour or two to get advice on LLC versus S corp or whatever. Just pay for advice there.

As for your client... Send them on their way. They are not for you. They have been through multiple developers? Probably because no one else will work for them ever again after their experience with this client? ;)

Failing that, whatever time amount you or they have already thought of as "reasonable", multiply that by at least 6.

Then tell them you will charge them by the hour, and that you estimate $$$ as an appropriate upfront amount to reserve your time and availability - when that money is in your bank account, you will start the work.

Hourly is the only reasonable way to do web stuff. My husband the other day was telling me about this article he found here in the blue page about how no one can possible ever estimate how long a web project takes. It's just not possible to do it. I have no clue what it was called but maybe someone else can provide a link and you can read it (and send it to your client...).

If they send you emails all day about the project or call you - don't answer right away. Let emails sit, let voicemails wait. Answer twice a day, and explain you are WORKING the rest of the day and every minute they use up asking for an update becomes 20 minutes as you attempt to get settled back into work.

And of course you will charge them hourly for all those updates they want via phone or email or whatever.
posted by AllieTessKipp at 8:47 AM on April 3, 2014

I've been writing PHP code for more than a decade and I've seen it done very well and very poorly.

An entire app written in spaghetti PHP could easily take more than 100 hours to fully trace and convert to a manageable MVC spec.

A previous project involved converting a pretty decent MVC PHP app to Ruby on Rails. That project took more than 100 hours despite the fact that I wrote the original PHP app and knew it inside and out.

The fact that you've already got part of the app in Django and part in PHP is not a plus, it is a giant, blinking red flag.

Knowing only what I've seen in this question, I wouldn't be surprised to see this be a 300+ hour project, start to finish.
posted by toomuchpete at 9:26 AM on April 3, 2014 [2 favorites]

There's no way this much work gets done for $5-6K without you taking a haircut. Clients who are "cagey" and cheap on the front end never get better. Nthing: RUN AWAY.
posted by randomkeystrike at 3:02 PM on April 3, 2014

There is no fucking way this is 100 hours. No. Fucking. Way. You are not qualified to do this job, so only do it if you want the learning experience of learning how badly you underestimated the work to do this project.
posted by ch1x0r at 7:20 PM on April 3, 2014

Adding to what the above folks said: if you take this job, do not proceed without a) a written, signed contract, b) a nominal down payment (at least 20% of the total). If your client refuses either, they are not serious and should be let go.
posted by 4midori at 11:50 AM on April 4, 2014 [1 favorite]

« Older At the risk of sounding super ironically lame, I...   |   Live bedbug invasion - AGH! Newer »
This thread is closed to new comments.