Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
This is a basic implementation of the Atari Pong game, but it's missing a few things intentionally and they're left as further exploration for the reader.
- Score
- When a ball goes past a paddle, the other player should score a point. Use context.fillText() to display the score to the screen
When running FastAPI
app, all the logs in console are from Uvicorn
and they do not have timestamp and other useful information. As Uvicorn
applies python logging
module, we can override Uvicorn
logging formatter by applying a new logging configuration.
Meanwhile, it's able to unify the your endpoints logging with the Uvicorn
logging by configuring all of them in the config file log_conf.yaml
.
Before overriding:
uvicorn main:app --reload
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)
Boot the hetzner server in Hetnzer Debain based rescue mode. ssh into it. then:
wget https://mfsbsd.vx.sk/files/iso/14/amd64/mfsbsd-14.0-RELEASE-amd64.iso
qemu-system-x86_64 \
/* | |
STRINGS | |
*/ | |
Assert.Equal(expectedString, actualString); | |
Assert.StartsWith(expectedString, stringToCheck); | |
Assert.EndsWith(expectedString, stringToCheck); | |
// Some can also take optional params | |
Assert.Equal(expectedString, actualString, ignoreCase: true); | |
Assert.StartsWith(expectedString, stringToCheck, StringComparison.OrdinalIgnoreCase); |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
- Score
- When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen