## Description
I've been feeling burnt out from writing code for a while and I don't know why. I remember starting feelings this way a while ago, like while I worked at Cigna and that burned the shit out of me, especially with my father dying and COVID happening in the middle of my career.
However this doesn't mean that I don't like to write code. It feels like something that I don't really want to do, even though I like thinking about solving difficult problems and working on them until they come to fruition.
## An Example of LLM Prompting for Programming
Reference: [An example of LLM prompting for programming - Martin Fowler](https://martinfowler.com/articles/2023-chatgpt-xu-hao.html)
### Primary Prompt
```text
The current system is an online white board system. Tech stack: typescript, react, redux, konvajs, and react-konva. And vitest, react testing library for model, view model and related hooks, cypress component tests for view.
All codes should be written in the teck stack mentioned above. Requirement should be implemented as react components in the MVVM architecture pattern.
There are 2 types of view model in the system.
1. Shared view model. View model that represents states shared among local and remote users.
2. Local view model. View model that represents states only applicable to local user
Here are the common implementation strategy:
1. Shared view model is implemented as Redux store slice. Tested in vitest
2. Local view model is implemented as React component props or states (by useState hook), unless for global local view model, which is also implemented as Redux store slice. Tested in vitest.
3. Hooks are used as the major view helpers to retrieve data from shared view model. For most the case, it will use 'createSelector' and 'useSelector' for memorization. Tested in vitest and react testing library.
4. Don't dispatch action directly to change the states of shared view model, use an encapsulated view model interface instead. In the interface, each redux action is mapped to a method. Tested in vitest.
5. View is consist of konva shapes, and implemented as react component via react-konva. Tested in cypress component tests
Here are certain patterns should be followed when impement and test the component
1. When write test, use describe instead of test
2. Data-drive tests are preferred
3. When test the view component, vake view model via the view model interface
Awareness Layer
Requirement:
Display other users' awareness info(cursor, name, and o nline information) on the whiteboard.
AC1: Don't display local user
AC2: When remote user changes cursor location, display the change in animation
Provide an overall solution following the guidance mentioned above. Hint, keep all awareness information into a Kova layer, and an awareness info component to render cursor and name. Don't generate code. Describe the solution, and breaking the solution down as a task list based on the guidance mentioned above. And we will refer this task list as our master plan
```
### Takeaways
- Most of the prompt sets out the design guidelines for the generated code
- Refined this by putting prompts into [[ChatGPT]], looking at the result, and crafting the prompt to make it generate in the style he wanted.
- Specifically said "Don't generate code" and instead outline the approach in [[General Knowledge]]
-