GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Kirino Kousaka (kirino@shitpost.cloud)'s status on Monday, 26-May-2025 01:51:51 JSTKirino KousakaKirino Kousaka
    in reply to
    • :ihavenomouth:
    • 翠星石
    • ✙ dcc :pedomustdie: :phear_slackware:
    • Phantasm
    • pistolero
    • waff
    Random blog-posts about my own ideas :D

    I follow a mixture of uncle bob's clean code and (try) to follow nasa's specifications. I find writing code to be easiest for me to follow and maintain in this way.

    Namely:

    (NASA)
    1. All loops must have fixed bounds.
    2. Restrict functions to a single printed page.
    3. Restrict the scope of data to the smallest possible.
    4. Compile with all warnings active; all warnings should be addressed.

    (CLEAN CODE)
    5. Follow standard conventions.
    6. Reduce complexity as much as possible.
    7. A class should know only its direct dependencies.
    8. If you do something a certain way, do all similar things in the same way.
    9. Choose descriptive and unambiguous names.
    10. Replace magic numbers with named constants.
    11. Functions should prefer fewer arguments.
    12. Don't write redundant comments.

    (NOT SURE BUT IT'S ALWAYS HELPED ME!)
    13. The software should be modular, I should be able to rip out an entire library / module and have the rest still work.
    14. Cancel out of a function as quick as possible (avoid if/else and prefer if (return) return.

    There are others I try to follow but they're less explicit and not things I actively think about.
    In conversationabout 4 days ago from shitpost.cloudpermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.