Part of the EllisLab Network
   
 
Does anyone constantly start again, from scratch with projects?
Posted: 23 April 2008 05:31 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  104
Joined  12-05-2007

Hey all,

Just wanted to put this out there, so you can either laugh or maybe tell me you do the same thing to make me feel better!

For some unknown reason, I write all my code for a project, I’ll get about 50% of the way through, convince myself I’m doing the wrong thing, I’ve lost track of my code and what it does, things are suddenly complicated and I trash the whole thing and start again.

On a project I’ve been working on, for about 3-4 months, I’ve probably done this four times now. Fair enough, each time I start from scratch, the code gets better but at this rate I’ll never finish.

Does anyone else do this or am I just a weirdo?

Cheers!

Profile
 
 
Posted: 23 April 2008 05:46 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  739
Joined  02-24-2008

Hey raspberry

Yes, I know the feeling. But as long as you constantly improve, I think its not a problem. As long as it doesnt feel right to you, then you need to rewrite it.

But when working with clients to deadlines, do the best job you can but if you start to run out of time, then restarting is not an option.

It all depends on the enviroment.

 Signature 

Sparkplugs - Intuitive add-ons for ExpressionEngine and MojoMotor
—-
Taggable - ExpressionEngine Tagging Module
MojoBlog 2 - MojoMotor Blog Module/Add-on
—-
Freelance Web Developer - @jamierumbelow - http://jamieonsoftware.com

Profile
 
 
Posted: 23 April 2008 05:54 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  104
Joined  12-05-2007

It’s my own project which is lucky, I never have this problem on client projects for some reason, though their projects are a bit more straight forward usually.

Good to know I’m not totally mental.

Profile
 
 
Posted: 23 April 2008 06:16 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  142
Joined  04-18-2007

I used to rewrite from scratch. But when clients are snooping around it’s better to deliver working product as soon as possible. I’d rather prefer reserving more time for planing and research at the beginning instead of more time for rewriting.

Profile
 
 
Posted: 23 April 2008 06:18 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  161
Joined  07-23-2006

think things out on paper first before coding away like a madman smile
i might occasionaly restart on individual parts of a project, never an entire project though

 Signature 

running man webdevelopment

Profile
 
 
Posted: 23 April 2008 06:22 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
RankRank
Total Posts:  104
Joined  12-05-2007

I think planning is my problem, I have a basic idea of what I’m going to do in my head and then get going.

I rarely put anything on paper and I usually think of totally different ideas when I’m coding or doing something, I think that’s why I never bother to plan because I know I’ll come up with something different anyway. Seems I learnt nothing in IT and CS classes.

Profile
 
 
Posted: 23 April 2008 06:55 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  801
Joined  04-20-2006

Taking time to think is sure very important. But we, freelancers, don’t have time to think. We must deliver projects to clients, and time is money. So for sure some of my client website code is horrible and could be re factored if I had maybe a team behind me, but I don’t have a big team, and the goal Number 1 is to make something that work and get money quickly, so we can pay our bills.

In one other hand, I was used to loose time refactoring things starting for each project, but while you start to see that your bills paying are late, this make you code some piece of shit to finish projects… I don’t like this feeling, but what is really important in life? Does client really care about your coding style well organized with nice comments everywhere in the code? Or does he care about the final looking result? Answer is the second option: think about it.

 Signature 

Un blog seo white-hat expliquant quelques techniques intéressantes sur le seo black hat

Ionize CMS - Webdesigner CMS based on CodeIgniter
www.ionizecms.com

My website: Webagency Too Pixel

Profile
 
 
Posted: 24 April 2008 03:51 AM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  161
Joined  07-23-2006

Yes, i’m sure every freelancer will cut some corners to get the job done quickly. But good planning before hand wills ave you time in the long run, you might get stuff done quick for the initial project but maybe when the client asks for an extra feature or a change you might get stuck and give yourself a headache smile

 Signature 

running man webdevelopment

Profile
 
 
Posted: 24 April 2008 04:30 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
RankRankRank
Total Posts:  530
Joined  07-10-2006

I think everyone feels self-doubt at some point in time. New approaches are learned, frameworks get updated, new code beomes available from third-party sources, ideas change, new learning curves to overcome, etc.

With specific regard to elitemedia’s comments, writing decent comments and using clean coding approaches on-the-fly is more a matter of self-discipline and developing good habits. This might take a bit of time as you are developing your own personal approaches to coding, but sooner or later you reach a point where it just becomes natural and less time intensive. With a decent IDE, you can pretty much automate phpdoc-style comment insertion using macros. For me, the key to making money on a consistant manner (making a decent living) is maximizing code reuse. I use my modified version of CodeIgniter for this reason and my own collection of libraries to extend the basic framework. Actually, my collection of library extensions is much lighter these days because of CodeIgniter.

I favor using the old modular spearations approach prior to Matchbox from the same author (Zacharias), so I plan out most projects as modules on-the-fly while creating the directory structures for my applications. I really don’t spend much time doing this. Most applications need a base set of modules, so I maintain a base set of CI files along with whatever extensions and modules I always use and use those files as a basis for starting anything new. I think of this as my personal framework in the sense that it eliminates a lot of the initial work I might have to repeat for any new project.

If you think in terms of modules and code modules as loosely coupled application elements, you can reuse them over and over again and use existing modules as the basis for creating new ones. Also, you can refactor the code in modules individually as time permits during low peak periods of work. I save a lot of time and maximize earning because of this. In your particular case, this might help you a lot because it might eliminate the need to start off completely from scratch. If you find yourself in a scheduling bind and release code you feel insecure about, you can always go back and update it after shipping deliverables and send the customer an update as time permits (which can work in your favor if you handle it right because it gives the customer a sense of getting added value for the money they paid out).

I have some customers who demand additional documentation such as UML diagrams or test code. As elitemedia suggests, delivering code and getting paid is of critical importance when working on your own, so I generally do that stuff as an after thought at this time mainly becuase I have not applied myself to incorporate those needs into my everyday coding approaches (something, I have been working on with minor-to-moderate success).

Lastly, those feelings you get will most likely subside after you feel better in control of programming in general. Getting to that point is more a matter of feeling self satification in whatever you are working on and how you are applying your coding skills. If you don’t feel in control of whatever you are doing, self doubt is going to enter the picture. All the while, you need to learn how to do all this quickly. What you are doing now is probably ok if you think of it as a learning experience because you’re obviously learning new approaches during each cycle.

Profile
 
 
Posted: 24 April 2008 04:38 AM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  727
Joined  08-03-2006

I rewrote my template parser four (five?) times before I got something I was happy with (can still be improved, so I’ll rewrite parts of it someday raspberry).
I quite often remake things from scratch, which isn’t really the best when you have a deadline waiting.

 Signature 

RapidDataMapper: My new ORM, is now released!

IgnitedRecord: Old ORM

MPTtree: A model to handle trees in a database.

YAYParser - Yet Another YAML Parser

Profile
 
 
Posted: 24 April 2008 04:59 AM   [ Ignore ]   [ # 10 ]  
Summer Student
Avatar
Total Posts:  30
Joined  08-18-2007

Sometimes I rewrote my whole app and I understand the feeling of having to handle something that never finishes. When there is a deadline, this is definitely not a warm feeling…

 Signature 

Amatuer

Profile
 
 
Posted: 24 April 2008 09:54 AM   [ Ignore ]   [ # 11 ]  
Grad Student
Avatar
Rank
Total Posts:  88
Joined  11-06-2006

PLAN, APPROVE, DEVELOP

 Signature 

Senior Web Architect
Hale Technology Group
@jkevinburton

Profile
 
 
Posted: 24 April 2008 01:28 PM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  709
Joined  06-07-2007

I used to restart from scratch…until I bought and read Refactoring by Martin Fowler…i suggest you do the same.

 Signature 

jtaby.com

Profile
 
 
Posted: 28 April 2008 04:15 AM   [ Ignore ]   [ # 13 ]  
Summer Student
Avatar
Total Posts:  26
Joined  04-21-2008

I’m still rewriting often, but instead of scrapping the whole project, I just slop together a skeleton version on my day off. If anything dawns on me I’ll try to incorporate it, if it’s too much to implement, the project continues without it. Also I’m finally making better reusable code and agree that it helps drastically. Usually in the mornings when my mind’s fresh I’ll pick a small module, and streamline it a little at a time till it’s done. Good way to get the brain going in the morning and it saves you time on future projects and rewrites. smile

 Signature 

Officially Ignited cheese

Profile