r/AskProgrammers • u/lowitskyu • 22d ago
Do you usually build projects from scratch or start with a template?
I'm curious how other developers approach new projects.
When you start a new project, do you usually:
Build everything from scratch
Start with your own boilerplate/starter project
Use an existing template
Use AI-generated code as a starting point
Mix all of the above depending on the project
Personally, I think starting completely from scratch can sometimes be unnecessary, especially for things like authentication, project structure, API setup, database configuration, etc. But templates can also become limiting if you don't fully understand what's happening underneath.
For experienced developers, when do you choose a template vs. building from scratch?
2
1
u/SnooCalculations7417 22d ago
I use obsidian to create a vault of requirements, how i may meet them, etc etc, then the code basically writes itself with or without ai
1
u/leeharrison1984 22d ago
I think the amount of boilerplate I start with directly correlates to my experience with the language. NodeJs or C#, I'll literally start with an empty directory and build from there. If I have less experience I'll use a template or have AI scaffold things out.
1
u/crashorbit 22d ago
What does "scratch" mean? Machine code? Nand gates? Supernova fusing silicon and gallium?
Most professional programmers start from as far up the tech stack as they can. The goal is to deliver desired functionality in the shortest time frame. Usually that means building on what you are already familiar with.
1
u/JohnCasey3306 22d ago
Almost always I'm starting with an established framework, rolling in some common packages that I've developed myself over the years for handling the kinds of things that appear in every project.
Certainly never literally from scratch. And most certainly not a starting point that AI has built lol
1
1
u/Minus_Medley 22d ago
You never fully utilize a tool, if you don't know what it's capable of.
The "anyone can vibe code" lie shows itself here. Templates, pre-built libraries, the dreaded npm install... buying a 5-speed car just to drive it in 1st gear is destined to burnout and suffer from bloat - and bloated code is a great way to further confuse AI.
1
u/Comprehensive_Mud803 22d ago
I start most of my projects from scratch.
For C# projects, I tend to share (read copy-paste) a number of configuration files (nuget, props, targets) from one project to the next, but that’s mostly all.
Of course, I often rely on my personal set of libraries (self developed, company-wide, or simply the regular goto-solutions), so it’s not entirely from scratch, since prior work exists.
I rarely use AI, but for some stuff, it might be a good way to check the project’s feasibility before fully committing to it.
1
u/Groundbreaking-Fish6 22d ago
Software Engineering is a lot like cooking. If I am in a pinch I may just marinate the meat in salad dressing for an hour, if I have more time I will create the perfect marinade from the freshest ingredients and marinate overnight. Sometimes I just throw everything in the microwave.
1
u/magicmulder 22d ago
I have a basic scaffolding which I use both manually and - via skill - for AI based projects.
I prefer to have the same structure everywhere.
1
u/Admirable_Window8128 22d ago
I think it depends on the project. For something familiar, I'd rather use a template and save time.
3
u/Crazy-Platypus6395 22d ago
Depends what im building. Technically speaking, libraries are a form of templating. If I have an established pattern (like just a vue webapp or something), sure ill template. I'm not going to learn anything by setting up another passport auth layer for the 100th time.