Settings

Theme

Ask HN: How do you start new projects?

3 points by josepmdc 5 years ago · 3 comments · 1 min read


I often find myself wanting to start a new project but I always find the initial setup to be overwhelming. I start asking questions like "What project structure should I use?" or "Is this library the best one for my needs?".

I waste a lot of time on that initial research up to a point I get tired and abandon the project.

So, what process do you follow when starting new projects?

Jugurtha 5 years ago

Here's what you can do:

Clone a project that you respect a lot; it could be a library, a framework, or a database. Anything.

Go into that directory and type:

  git log --reverse
Then, for the first ten to fifteen commits' HASH, do:

  git show HASH

Do it for many projects that matter and that are useful and popular. You'll find one thing in common: the structures in the "initial commit" are most likely long gone.

Obsessing about getting things right in order to get started makes prevents you from getting started and getting things done. This is a malady.

None of what you are obsessing about matters or will survive.

You want to start? Write a text file where you explain what your code does, then write the code that does it. If you are writing a library, give usage examples of the API. Shop it around if you're building it for others [does this make sense to you?]. Then write the backend to make that API real.

But, a great way to start is to write code snippets and functions that do what you want, put them in a utils file, add to it, and then refactor it.

zaitanz 5 years ago

For me, it's always about focusing on proving my idea correct as fast as possible.

I think X would be cool. - How quickly can I test if X is cool with quick and dirty tactics. I tend to use notepad and make notes along the way, so I can flesh it out into something reproducible later. If the idea doesn't work, at least I have a text file of my process and thinking during that time.

If it does work, I find being able to scaffold your projects quickly is key. Build a script that creates a common set of folders and a new git repository. Things like (notes, source, libraries, docs, archives etc). From here, you can just add things to your git repository as you develop/test/build your idea. It doesn't have to be a project that involves code, as you can manage any files from a git repository. They key is having that scaffolding.

  • buffaloo 5 years ago

    Could you expand on this some? Do you have a blog or something? This interests me.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection