First Understand the Problem, Then Write the Code

First Understand the Problem, Then Write the Code

Diving straight into coding without fully understanding the problem can lead to inefficiencies, technical debt, and ultimately, solutions that don't fully address the needs of the users or the business. To avoid this, it’s crucial to spend time exploring and understanding the problem space before writing any code. Here are some effective strategies to help you do that:

1. Event Storming: Use this collaborative workshop technique to map out system events and gain a shared understanding of the domain among all stakeholders.

2. Domain Storytelling (DST): Visualize business processes through stories told by domain experts, helping the development team understand the context in which the software operates.

3. Example Mapping: Break down user stories into concrete examples to clarify requirements, identify potential issues, and ensure that everyone is on the same page before coding begins.

4. Genchi Genbutsu (Go and See): Engage directly with customers and observe their environment to better understand the challenges they face, leading to more user-centered solutions.

5. Starter Kata: Adopt a structured, step-by-step approach to problem-solving that encourages continuous discovery and learning before committing to code.

Why Not Start with Code?

- Code ≠ Progress: Writing code might feel productive, but if you haven’t fully understood the problem, it can lead to unnecessary rework and frustration.

- Technical Debt: Coding without a clear understanding often introduces bugs and complexity, leading to long-term maintenance issues that slow down future development.

- Modernization Isn’t Just Rewriting: Modernizing a system isn’t about simply converting old code to a new language or framework. It’s an opportunity to rethink the user experience, improve product functionality, streamline business processes, and simplify the domain model. Simply rewriting PL/SQL code in Java, for example, doesn’t solve underlying problems or add value.

Modernization: More Than Just Code

When modernizing a system, the focus should not just be on rewriting the existing codebase with new technologies. Instead, it’s about taking a holistic approach:

- Rethink UX and Product Functionality: Use modernization as a chance to redesign the user experience and ensure the system meets current user needs more effectively.

- Streamline Business Processes: Aim to simplify and optimize business processes, removing any unnecessary complexity that may have built up over time.

- Refine the Domain Model: Take this opportunity to refine the domain model so that it accurately represents the current business reality and is easier to maintain.

However, it’s important to recognize that not every part of the system needs a complete overhaul. Over-engineering can lead to higher costs and delays in delivering the most critical modernization efforts. Focus on high-value areas that will benefit most from modernization rather than applying the same level of effort across the entire system.

Understanding the problem is the most critical step in creating effective software solutions. Before writing code, invest time in techniques like Event Storming, Domain Storytelling, Example Mapping, Genchi Genbutsu, and Starter Kata to thoroughly explore the problem space. Remember, coding is not the same as solving the problem—it’s just one step in the process. By prioritizing problem understanding, you can ensure that your solutions are well-aligned with the needs of the users and the business, leading to more successful outcomes and effective modernization efforts.

Mustafa DO?ANAY

Oracle DBA, PO, Senior System Architect at ING Turkey

6 个月

Good point, we similarly experience that thing. If you do not need that sql, do not use it :)

The process is more important to reaching the outcome than the outcome itself before you start.

Nicolas Fr?nkel ????????

Developer Advocate at Loft Labs

6 个月

We all come to the same conclusion... after a while https://blog.frankel.ch/discuss-problem-not-solution/

Cem Meri?

Enterprise Architect at ING Türkiye

6 个月

Great advice!

要查看或添加评论,请登录

Altu? Bilgin Alt?nta?的更多文章

社区洞察

其他会员也浏览了