Nowadays I do not write useful commit messages anymore.
The main reason is that most repositories I work in professionally use squash merges, meaning that all commits done in a branch are squashed into a single commit when merging the branch into the main branch.
The commit message of the squash commit is usually the title of the pull request, meaning that the individual commit messages are not very useful anymore.
The commit message ends up containing the PR description, which gives the what and why of the changes, which is generally enough.
With the rise of LLMs I have never found myself looking at the commit history and the commit messages to understand why things changed.
If something isn’t working, I simply get the LLM to help me fix the problem.
Pre-LLMs era
#
- One liner describing what changed (not period terminated)
- A few lines describing in more details why things changed
- GPG signed commit
How to Write a Git Commit Message
#
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
References
#
When joining a new project without tests, here is the value you need to provide through the addition of tests:
- the application works and doesn’t crash
- the application works and supports a few input cases
- the application works and supports a variety of input cases
- the application works and is robust to most input cases
- Write a test that tests the common case usage of your function
- Write tests that cover edge cases of your function
- Write tests to cover all statements, branches, paths
A table of probabilities is built
The ratio 1/drop chance is used to compute a total drop chance
A number is generated in the range 0-total drop chance
A table lookup is done to find the associated item
Item properties are randomly rolled
Different table lookup may be built depending on the difficulty setting as well as the current act
The rarity of an enemy pack may either change the random generator distribution or some other mean to modify the probability of higher quality items from dropping
The pseudo random number generator is initialized each game and does not depend on the current time (to avoid issue with reading some timer which may have the same value over many iterations or may be slow to read)
When an enemy is killed, we want to determine how many items will drop
An initial seed is computed and stored in the game save file
Based on this seed, the world is pseudo randomly computed, using a certain chunk/block/tile size (e.g., 32x32, 128x128)
The world map is only generated on-demand, that is, as far as the player can see
When a new chunk is discovered, its blocks are computed and persisted in the save file
If there are no active components in a chunk that is not visible, the game will obviously not render it, it will only simulate it (position, item, velocity, etc)
Certain thing, for instance alien types and alien base size, may only be computed once they are observed. At first, maybe only a location anchor will exist to indicate where they should spawn, but the rest will be generated only when needed.
Client/server
Per region servers
Login/authentication server
Lobby server
Store server
- buy champion/runes
Transfer player from lobby to game server
- champion selection
- spectators
Per game server
- Coordinates all 10 players within the game
- controls game events dragon/baron/npc/player gold
- compute damage
- end game lobby
Game client
- Display animations
- play game state according to server
An initial seed is computed and stored in the game save file
Based on this seed, the world is pseudo randomly computed, using a certain chunk/block/tile size (e.g., 32x32, 128x128)
The world map is only generated on-demand, that is, as far as the player can see
When a new chunk is discovered, its blocks are computed and persisted in the save file
If there are no active components in a chunk that is not visible, the game will obviously not render it, it will only simulate it (position, item, velocity, etc)
Authentication/Login server
Per game server
- compute damage simulation
- in game chat
- decide game victory
- returns end game stats for ui (or done client side?)
Game client
- display game ui
- play animations
- send commands to game server
Local backend
- record game
- compute game simulation
- communicate game state to game client
It’s highly common when working that priorities shift and that sometimes you have way more on your plate than you can handle.
No need to panic!
- Ignore your task list
- Use your brain and create a fresh list of what you think is the most important
- Prioritize using the importance/urgency matrix
Context
#
Checklists are a highly effective way to make sure that critical elements of a routine are done. As such, I want to explore and make checklists for different things that are important in my life.
Life
#
Software development
#
Machine learning
#
See also
#
References
#