Skip to content

Commit 922b7f6

Browse files
committed
restructure table to fix responsive design issue
1 parent 556f525 commit 922b7f6

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

src/posts/a_philosophy_of_software_design.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,17 @@ This generality ensures a cleaner separation between classes. For example, a gen
298298

299299
Special-purpose designs are discouraged because they frequently result in information leakage.
300300

301-
| Design Style | Example (Text Editor API) | Outcome |
302-
| :------------------ | :------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
303-
| **Special-Purpose** | Methods like `void backspace(Cursor cursor)` or `void deleteSelection(Selection selection)`. | This leaks user interface abstractions (like "selection") into the underlying text class, increasing cognitive load and complexity. |
304-
| **General-Purpose** | Methods like `void insert(Position position, String newText)` and `void delete(Position start, Position end)`. | The interface is based on fundamental text operations, hiding application-specific logic. This allows the same method to be reused for different actions (e.g., implementing backspace, delete key, or selection deletion using the generic `delete` method). |
301+
**Special Purpose**
302+
303+
Methods like `void backspace(Cursor cursor)` or `void deleteSelection(Selection selection)`.
304+
305+
These leak user interface abstractions (like `Selection`) into the underlying text class, increasing cognitive load and complexity.
306+
307+
**General Purpose**
308+
309+
Methods like `void insert(Position position, String newText)` and `void delete(Position start, Position end)`.
310+
311+
These interfaces are based on fundamental text operations, hiding application-specific logic. This allows the same method to be reused for different actions (e.g., implementing backspace, delete key, or selection deletion using the generic `delete` method).
305312

306313
### Questions To Ask Yourself
307314

0 commit comments

Comments
 (0)