Log inSign up
TestDriven.io
24.3K posts
Image
user avatar
TestDriven.io
@testdrivenio
Teaching practical programming through real-world applications. Tweets by @MikeHerman and @JanGiacomelli.
Denver, CO
testdriven.io
Joined December 2017
168
Following
38.5K
Followers
  • user avatar
    TestDriven.io
    @testdrivenio
    Aug 23, 2021
    Python Clean Code Tip: Use how and when to use decorators šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Nov 20, 2021
    Python clean code tip: Use enums to group related constants šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Aug 27, 2021
    Python Clean Code Tip: Check the quality of your code inside your CI pipeline Use: - black - code formatting - isort - optimize imports - bandit - check for security vulnerabilities - safety - check for security vulnerabilities of dependencies Github Actions Example šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Sep 15, 2022
    Python Clean Code Tip: Avoid using too many attributes on a single object. Try to cluster them to improve cohesion, reduce coupling, and improve readability šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Aug 28, 2021
    Python Clean Code Tip: Use dataclasses when only storing attributes inside your class instances to reduce the amount of boilerplate code šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Feb 6, 2021
    Python tip: To generate a random password you should use the secrets module For example, you can generate a random password of length 21 containing letters, number, and special charactersšŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Aug 20, 2021
    Python Clean Code Tip: Don't use flags in functions Flags are variables passed to functions, which the function uses to determine its behavior. They are considered bad because functions should only perform one task. -> split your function into smaller functions.
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Sep 28, 2022
    Python Clean Code Tip: Check the quality of your code inside your CI pipeline. - flake8 - style guide enforcer - black - code formatting - isort - optimize imports - bandit - check for security vulnerabilities - safety - check for security vulnerabilities of dependencies šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Sep 12, 2021
    Python Clean Code Tip: Use a list comprehension to filter lists instead of for loop šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Sep 24, 2021
    Python Clean Code Tip: Avoid using too many attributes on a single object. Try to cluster them to improve cohesion, reduce coupling, and improve readability šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Aug 19, 2021
    Python Clean Code Tip: Keep your arguments at a minimum Ideally, your functions should only have one to two arguments. If you need to provide more arguments to the function, you can create a config object which you pass to the function or split it into multiple functions.
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Nov 4, 2022
    Python clean code tip: Use a dictionary to remove duplicates from a list and maintain order šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Sep 14, 2022
    Python Clean Code Tip: Avoid setting attributes of your objects outside of the constructor. Instead, implement methods that map to real-world concepts. Why? To ensure attributes exist and are easily discoverable. šŸ‘‡
    Image
  • user avatar
    TestDriven.io
    @testdrivenio
    Nov 22, 2021
    Python clean code tip: Use dependency injection to simplify testing šŸ‘‡
    Image

New to X?

Sign up now to get your own personalized timeline!

Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

TermsĀ·PrivacyĀ·CookiesĀ·AccessibilityĀ·Ads InfoĀ·Ā© 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up