Mind Crafting – Avoiding Common Pitfalls in Greenfield Projects

02.11.2023 | 3 min read

Embarking on a greenfield project presents both exciting opportunities and daunting challenges. During the Mind Crafting celebration for Programmer's Day at 10Clouds, our Tech Lead, Tomasz Marciszewski, shed light on the "stupid mistakes" that teams often make in greenfield projects. In this blog post, we'll explore these common blunders and learn how to steer clear of them.

1. Neglecting database indexes

Tomasz emphasized the importance of indexing your databases correctly.

Often underestimated, database indexes can make or break a project's performance.

By identifying the top three most frequently used databases and considering the search patterns (e.g. by user ID or topic), you can significantly enhance query performance. While these optimizations may not always manifest in the development environment, they can be a game-changer in production.

2. Mishandling cron jobs

Cron jobs, essential for automating tasks like file cleanup or midnight processes, can become problematic if not implemented correctly. Tomasz shared a cautionary tale of a misused cron job that caused severe system slowdowns when dealing with a vast number of users. To avoid such issues, ensure that cron jobs are well-written, and consider breaking them into smaller, manageable chunks to prevent overlaps and performance bottlenecks.

3. Overlooking logging


Lack of comprehensive logging can turn debugging into a nightmare, especially in production environments. While console log debugging may suffice during development, diagnosing issues on production machines without proper logs is akin to looking through a tiny keyhole into a vast corridor. It's crucial to ensure that logs persist even when containers die. Tools for aggregating logs across different environments are invaluable allies in diagnosing and resolving issues effectively.

4. Migrating business logic to the frontend

Avoid the temptation to shift significant portions of business logic to the frontend, especially if you have full-stack developers on your team.

The backend is designed to handle sensitive and complex operations securely. Relying heavily on the frontend can lead to exposure of your business logic, making it easier for unauthorized individuals to decipher. Payment providers often offer easier frontend integration but limit control over critical processes, making backend processing essential for security.

5. Delaying test implementation

Postponing test writing until later stages of development can be a costly mistake. As the application gains traction and the client demands frequent changes, having an established testing framework becomes indispensable. Writing tests after the fact can be challenging and is often accompanied by resistance from team members. Start with backend testing at a minimum to ensure the application's reliability and maintainability as it evolves.

6. Ignoring authentication considerations

Authentication is a core element of any application's security. Failing to establish proper authentication mechanisms early in the development process can lead to significant complications down the road.

Tomasz shared a cautionary tale where an authorization oversight allowed administrators access to all client data, leading to a project rewrite. Leveraging existing authentication solutions is recommended to avoid reinventing the wheel.

7. Proceeding with microservices without adequate resources


While microservices offer scalability and flexibility, they come with their own set of challenges. Tomasz advised against taking on microservice projects unless you have both the skills and the budget to manage them effectively. Implementing and maintaining microservices can be resource-intensive, making them unsuitable for all projects.

Closing thoughts

In the race to meet project deadlines and deliver results, it's easy to overlook foundational steps that can save you from future headaches. Tomasz's insights remind us not to skip these crucial aspects of development. By giving due attention to database indexes, cron jobs, logging, logic placement, testing, authentication, and microservices, you can set your greenfield project on a path to success. Remember, the small steps you take today can lead to significant strides in the future of your project.

You may also like these posts

Start a project with 10Clouds

Hire us
cookie