Jump to content

Programming

From 太極
Revision as of 08:54, 12 February 2026 by Brb (talk | contribs) (Be a good programmer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

TIOBE Index

Developer tools

34 Best Developer Tools for Building Modern Apps

Learn any programming language

Variable naming

Data Scientists, Your Variable Names Are a Mess. Clean Up Your Code

Alternatives to "tmp"

  • tempVar
  • buffer
  • placeholder
  • interim
  • transient
  • auxiliary
  • provisional

Collaboration

9 ways to improve collaboration between developers and designers

Code review

Deployment environment

Manifest file 清單檔案

Manifest file. A manifest file in computing is a file containing metadata for a group of accompanying files that are part of a set or coherent unit. For example, the files of a computer program may have a manifest describing the name, version number, license and the constituent files of the program.

Coding Standards

Be a good programmer

Organize your utility files and functions

Stop Writing Utility Functions in Python (Here's the Better Pattern)

Instead of

source("utils.R") 
format_date(x) # 你完全不知道:format 的是哪種日期?
validate_input(df)  # validate 的是什麼資料?
process_data(df)    # process 的是哪種資料流程?

Replacing utility.R with

users/validation.R
billing/dates.R
orders/processing.R

and use them like

billing::format_invoice_date()
orders::process_pending_orders()

Python 用 class 來處理有規則的邏輯。在 R 裡,你可以用:

  • R6 class
  • S3 method
  • S4 class

R 裡真正適合放 utils 的只有:

  • 純函式(pure function)
  • 無狀態
  • 與 domain 無關
  • 在任何專案都適用

Research code

The Good Research Code Handbook

Code club

Ten simple rules to increase computational skills among biologists with Code Clubs

Tutorials

Keeping Your Code Clean With Prettier

Keeping Your Code Clean With Prettier, the playground.

$ cat > tmp.js <<EOF
(function ()
{
    window.alert('ok')
}())
EOF
$ npx prettier --write tmp.js
$ cat tmp.js
(function () {
  window.alert("ok");
})();