As a computer programmer do you have a routine before you start to code?

Fredrik Christenson
12 Feb 202510:50

Summary

TLDRIn this video, Frederick discusses his systematic approach to coding, emphasizing the importance of organization and communication. He explains how he begins by creating a story branch with the card ID for easy tracking, clarifying the story card’s requirements with the product manager if necessary. Frederick uses a to-do list to track progress and ensure all tasks are completed before merging. He also assesses existing code to determine if it requires refactoring or can be extended, preferring a modular approach to integrate new features smoothly into the system. His method ensures clarity, efficient collaboration, and high-quality code.

Takeaways

  • 😀 Before starting to code, Frederick creates a feature branch with the ID from the corresponding story card for easy reference and connection to the task.
  • 😀 Story cards can often be poorly written, so it's important to clarify acceptance criteria before starting development.
  • 😀 A conversation with the product manager is vital to ensure the task is well-understood and that there's mutual agreement on what needs to be built.
  • 😀 Frederick uses a bullet point list to document acceptance criteria and tasks to ensure nothing is forgotten and progress can be tracked.
  • 😀 The to-do list helps manage scope creep and maintain focus, with the option to add or cross off items as tasks are completed.
  • 😀 Product managers appreciate the visibility of the to-do list since they can easily track the developer's progress.
  • 😀 When working on existing code, Frederick checks the surrounding code to determine if the new feature can simply be appended or if refactoring is needed.
  • 😀 If the current code is not well-structured, the developer may need to modularize it for easier integration of new functionality.
  • 😀 Before adding new features, Frederick ensures the code is modular, isolating functionality in separate directories to reduce coupling and increase maintainability.
  • 😀 By treating each new piece of functionality like a Lego brick, Frederick ensures that the new code fits smoothly with the existing system, even if some minor refactoring is necessary.
  • 😀 Frederick’s approach emphasizes working within a specific scope, modularizing code, and making incremental changes to avoid large-scale refactoring, which makes future changes more manageable.

Q & A

  • Why does Frederick use the ID from the story card in the branch name?

    -Frederick uses the story card ID in the branch name to easily connect the feature branch to the corresponding task. This helps ensure that the branch is traceable and associated with the specific story card, making it easier to track progress.

  • What is Frederick's approach when he finds poorly written story cards?

    -When Frederick encounters poorly written story cards, he makes sure to define clear acceptance criteria before starting. He also communicates with the product owner or team member to clarify the task and ensure he understands what needs to be done.

  • Why does Frederick create a to-do list in the story card?

    -Frederick creates a to-do list in the story card to track the progress of tasks as he works. This list helps him stay organized and ensures that he can quickly pick up where he left off, especially in cases of context switching or long-running stories.

  • How does Frederick handle existing code when working on new features?

    -Frederick evaluates whether the existing code is in a good enough state to add new functionality or if it requires refactoring. He looks at the surrounding code to decide whether to simply append new functionality or modularize the existing code for easier integration.

  • What is the analogy Frederick uses to explain the importance of code integration?

    -Frederick uses the analogy of building a road with bricks. He compares each new feature to adding a brick to the road, stressing that the quality of previous bricks (code) influences how smoothly the new brick (feature) will fit in. If previous code is poorly structured, it can make it difficult to add new functionality.

  • What does Frederick mean by 'boy scouting' in the context of coding?

    -In the context of coding, 'boy scouting' refers to the practice of improving or cleaning up existing code while working on new features. This can involve small refactors or adjustments to ensure the new functionality fits smoothly into the existing codebase.

  • Why does Frederick prefer modularization when adding new features?

    -Frederick prefers modularization because it reduces coupling between the new feature and the rest of the code. By isolating the new functionality into a separate module, it becomes easier to maintain, test, and remove if necessary, much like working with microservices instead of a monolithic system.

  • How does Frederick ensure that a new feature is flexible and reusable across different parts of the system?

    -Frederick ensures the new feature is flexible and reusable by designing it as a generic module that can be used in multiple contexts. For example, when working on a UI component, he ensures it is designed to fit on any page, not just the specific page he's working on.

  • What is the advantage of having a to-do list for each task in the story card?

    -The advantage of having a to-do list is that it helps Frederick track his progress and stay organized. It also allows him to easily review what’s been done and what still needs to be completed, making it easier to handle interruptions or context switching.

  • What does Frederick do if he finds that a task requires additional refactoring to fit into the existing code?

    -If Frederick finds that the existing code needs additional refactoring to fit the new feature, he takes the time to clean up and refactor the code in the area he is working on. He ensures that his new functionality fits smoothly with the overall system, but does not refactor the entire codebase.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
Coding RoutinesSoftware DevelopmentProgramming WorkflowBranch ManagementFeature BranchAcceptance CriteriaModularizationLegacy CodeAgile MethodologyCode RefactoringDeveloper Tips