-2

Every time I am working on a project, specially a project from scratch, I always feel like I am doing a messy job. I feel bugged all the time by the need or organizing code that is clean or proper way.

For example;

  • Avoid hard-coding file paths in gulpfile.
  • Require all node modules in similar fashion.
  • What should be the ideal directory structure for this project.
  • UI. The *** UI.

The Question

What are the strategies I can follow to not drown into that world? Thinking over and over on the organization aspect of the project gets me really low on productivity.

In general, how to approach a project from scratch so I can get the most done without the code organization overhead?


Notes after the possible duplicate flag

I can understand why this is flagged as possible duplicate as the question is more of an overview rather than a specific question.

The question I have is more about what kind of mentality a programmer should have when starting a project from scratch so they end up delivering more rather than getting trapped by code organization issues.

2

3 Answers 3

1

This post reads like you really are feeling the frustration - I can empathise. There are a few things that could help you through this;

  • A good book on code construction etc. Code complete 2 is often cited in this regard
  • More or better familiarity with you tools
    • Using their features well
    • Making peace with their short comings, no tool is perfect
  • Time, it takes practise to get really good at what you do. Some say 10 years/10'000 hours
  • Study and follow common techniques with the tools and languages you use, study your favourite open source projects - they may not be perfect, but there are lessons there

Do not forget that shipping code is a feature, get it out the door; best is the enemy of good, get it good enough, make peace with that and ship it.

1
  • 1
    Thanks a lot! It really feels like I need to peace out with things the way they are keeping real priority stuff in mind. I wish i could feed my brain straight forward instructions! Commented Aug 5, 2015 at 9:59
0

You can try and allocate a finite timeframe for working on organization. For example, spend 1 hour each day organizing the things you mentioned, and spend the rest of your time on functionality. If something bugs you when you work but it doesn't have any functional purpose, add it to a list that you refer to when organizing.

0

I would suggest to read more "Software-Architect-Books", but you are not alone with this feeling.

First rule: do not panic!

Do you ever heard of design patterns? These are helpful structures, which can help you to structure your code even better for your requirements.

Another way to "not drown into that world" is to read through this Book about "Clean Code".

Reading is the key for your problem. Collect more knowledge about how to structure your programs and you problems will fade away.

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