I have a personal web project I cut my teeth on learning how to program. I wrote it in PHP and learned as I went. I eventually I re-factored it to use MVC and removed all mixing of php/html.

Right now it has no users, save myself, and it makes no money. I have a strong desire to rewrite the entire app. Which really isn't that large of an app.

I have a lot of reasons why I should not rewrite it. I know that I should move forward. It's a working app now and it will only set me back to rewrite it. But I can't shake this feeling that I would be better off using a different programming language in the long run. That I'd enjoy it more. That I'd feel comfortable with it. I feel like my one good reason to rewrite my app is that I have a gut feeling that I should.

PHP seems like a hack thrown together. I want to use a language that feels more elegant to me.

Any feedback you have would be welcome.

  • 1
    Eh, if it is your personal hobby horse do whatever you like, it is fun.
    – Gaurav
    Commented Feb 22, 2011 at 10:54
  • A significant reason I don't want to rewrite is that I don't want to lose the time I've already put in. I'm sure that in the long run it will be better for me to rewrite. I'll learn more, I'll use better tools. Commented Feb 22, 2011 at 18:42

9 Answers 9


If your the only user and there are no deadlines or constraints why not rewrite it. It sounds like mainly an academic exercise anyway so you can't really lose.


I have a lot of reasons why I should not rewrite it. I know that I should move forward. It's a working app now and it will only set me back to rewrite it.

Rewriting something that is written in PHP in another language is moving forward.


Leave it. Go find some users. If you can't find any, there's no need to rewrite it. If you do find users, they'll probably push your project in directions you never considered. These new directions will eventually break things and you'll be forced to rewrite. Change your tech then if it makes sense.

If this project is just for fun, do what ever you want. A good rewrite is often as refreshing as a colonic cleanse. Then again, not rewriting frees up some of your time so you can start a new project. New projects can be even better than a colonic cleanse. Done right, they're as full of hope and possibility as an uncooked brisket.

  • It's for fun, learning, and maybe one day I can make it a business. Commented Feb 21, 2011 at 22:51

Every time you rewrite something, you understand it better, the underlying structures simplify and the implementation becomes cleaner.

I would delete and rewrite everything three times if I had the time to do so.

  • I learned a ton when I re-factored my app the first time. It changed so much you could consider it a rewrite. Commented Feb 21, 2011 at 22:48
  • 1
    @Supermighty You'd be surprised at how much there is left to learn when you rewrite it for the second time.
    – biziclop
    Commented Feb 21, 2011 at 22:58

I would start a different project, with different challenges. It would also be a good way to learn a new programming language. You've rewritten it once, why not leave it alone for now and start something fresh? Rewrite it in the future, when you have much more experience and you'll see how far you've progressed.


If you want to rewrite it, rewrite it. You dont 'need' any reason other than your own gut telling you to do so. Its your application, no one knows it better than you. The only thing worse than doing a complete re-write of an application is blindly following maxims such as 're-writes are always bad'.

Think of such maxims as the 'pirate code'. Not law... just general guidelines. They should never be a substitute for your own judgement.


What's the difference between art and design? If you're doing art, you decide when you are done. If you're doing design, the client decides when you are done.

If you have no client, the decision to refactor or rewrite is entirely yours. Do what makes you happy.

I've found it useful to approach the same problem in a different language, just because the idioms and facilities of each language give me an alternate perspective on the problem. The worst possible thing that can happen in your case is that you'll find that you gained no new insight for the time you spent. But that's extremely unlikely.

As someone with lots of experience outside php who's suffered through some legacy php code that I'd give anything to be able to completely rewrite, but probably won't find sponsorship for anytime soon, I find your position, free from the constraints of the needs of a business owner, somewhat enviable. If you have the opportunity, and there isn't some more compelling problem you want to attack, why not rewrite?

  • I need to stop myself from seeking perfection. I think that in part I'm doing that. I know there isn't any perfect programming language. I'm just looking for one with a better feel (better chi) than PHP. Commented Feb 22, 2011 at 18:39

If I were in you place, I would go for it, and you can keep you current site on-line while you work. You can even use the existing site to guide you though the rewrite, by pointing what works well and what don't works so well and how to fix that. Note that this is you base requirements, the implementation if a different thing. Also I sense that you want to learn another web language, and this is one case where you can do it without many risks, but be careful to analyze the language that you want to use, so that you don't make a step larger than you you. (For example from PHP to J2EE...)

  • This is basically my plan as it stands now. I'm looking around for another web language to use and I'm pretty sure it's going to be Python. It's the language that's giving me the best overall feel so far. Commented Feb 22, 2011 at 18:37

PHP can feel as elegant as the developer wants it to, it just happens that alot of PHP code is poor. Switching language may make your code better because you are forced to work a specific way but there is nothing stopping you doing that now with PHP.

As for the rewrite, give it a try, you will know fairly quickly if you have learnt anything and if it was positive. Assuming you do a good job it should be easier to maintain and update in the future, also, you may end up with some code for other projects.

  • I don't want to be the kind of person who can only do it "if I had the right tool". But I can't shake the feeling that PHP is cludgy, and cobbled together. I have my eye on Python. Commented Feb 21, 2011 at 22:56
  • It just may not be for you but in the right hands it isn't cludgy, luckily though we have so many choices. I've been a PHP developer for 11 years and tbh if I had a choice I would go back an learn something else but not because of any deficiency with PHP. I'm attempting to learn C# atm, PHP pays the bills though. Commented Feb 21, 2011 at 23:05
  • 1
    It's not the syntax I find cludgy. Rather that every thing is in a global namespace, there are a ton of functions with odd and confusing names, and inconsistency all over the place (argument order being one of them). But it doesn't pay the bills for me, so I guess it's a good time to learn something else if I desire it. Commented Feb 21, 2011 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.