Developer Week 047

Courses

Boot.Dev Back-end Developer Career Path (~53.04%) (šŸ“ˆ +1.36%)

10. Build a Maze Solver DONE

10.4.0 Drawing Some Lines

Learned the difference between self.variable and self.__variable

GPT

The choice between self.__variable and self.variable in Python class design reflects intentions around visibility, encapsulation, and internal use.

  • self.variable – Public attribute
  • self._variable – Protected (by convention only)
  • self.__variable – Private (name-mangled)

I think I was supposed to know this already, but clearly forgot.

Build a Maze Solver in Python

11. Learn Memory Management (26/101 modules)

11.2.3

In C, splitting code into files likeĀ coord.c,Ā coord.h, andĀ main.cĀ is a practice calledĀ modular programming. Here’s how each file serves a distinct purpose:

coord.hĀ (Header file):

This file declares the structures and function prototypes (signatures) of your coordinate utilities. By including it in other files, the compiler knows about your types and functions—even if their actual implementation is somewhere else.
For example, it tells the compiler ā€œthere’s a function calledĀ scale_coordinateĀ that returns aĀ struct Coordinate."

coord.cĀ (Implementation file):

This implements (defines) the functions declared inĀ coord.h. All the logic—the instructions for struct manipulation and coordinate math—lives here.
By separating this from the header, you can change how functions work without breaking code that calls them, as long as you keep the interface the same.

main.cĀ (Driver/test file):**

This is the entry point: it contains theĀ main()Ā function and any code to run your program or tests. It relies on the declarations inĀ coord.hĀ and the real code inĀ coord.c.

Why does C do this?
  • It keeps code organized and easier to maintain.
  • It allows teams to work on different parts independently.
  • It helps prevent “duplicate symbols” and other compilation errors.
In summary:
  • Header files declareĀ whatĀ exists,
  • Implementation files defineĀ howĀ things work,
  • Main (or other) files use these pieces to create the program’s behavior.

12. Personal Project 1 (3/4)

01 Build Notes Sarah - AI Line Editor

Sarah MVP Development Roadmap