notes/hugo/public/programming/general/coding-for-humans/index.html
2025-03-09 01:47:23 +10:30

242 lines
8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en-us">
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>My New Hugo Site</title>
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description" content="Coding for humans
Code is instructions for machines.
BUT
Code is read by humans.
Humans need to be able to understand code easily.
Not all humans think about code the same way
SO
Write maintainable code
If design is about usability, coding is about maintainability
Write boring code that&rsquo;s easily modified and extended
Consistent patterns
Avoid obscure and fancy syntax
Aim for maximum readability
Use dev tools to make the job easier and less error-prone
Syntax highlighting
Code completion
Linters and formatters
Static analysis
Statically typed languages or type hinting
Write documentation to guide devs
Explain how programs work so devs don&rsquo;t have to reverse-engineer your
team&rsquo;s work.
Explain the reasoning behind obscure solutions.
Document pitfalls you&rsquo;ve fallen into so other devs don&rsquo;t do the same.
Write code that accommodates different kinds of devs. Devs can be:
Inexperienced:
New to the codebase
Opinionated
Impatient
Bored
Tired
Pressured
">
<meta name="generator" content="Hugo 0.145.0">
<meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" href="/ananke/css/main.min.css" >
<link rel="canonical" href="http://localhost:1313/programming/general/coding-for-humans/">
<meta property="og:url" content="http://localhost:1313/programming/general/coding-for-humans/">
<meta property="og:site_name" content="My New Hugo Site">
<meta property="og:title" content="My New Hugo Site">
<meta property="og:description" content="Coding for humans Code is instructions for machines. BUT
Code is read by humans. Humans need to be able to understand code easily. Not all humans think about code the same way SO
Write maintainable code If design is about usability, coding is about maintainability Write boring code thats easily modified and extended Consistent patterns Avoid obscure and fancy syntax Aim for maximum readability Use dev tools to make the job easier and less error-prone Syntax highlighting Code completion Linters and formatters Static analysis Statically typed languages or type hinting Write documentation to guide devs Explain how programs work so devs dont have to reverse-engineer your teams work. Explain the reasoning behind obscure solutions. Document pitfalls youve fallen into so other devs dont do the same. Write code that accommodates different kinds of devs. Devs can be: Inexperienced: New to the codebase Opinionated Impatient Bored Tired Pressured">
<meta property="og:locale" content="en_us">
<meta property="og:type" content="article">
<meta property="article:section" content="programming">
<meta itemprop="name" content="My New Hugo Site">
<meta itemprop="description" content="Coding for humans Code is instructions for machines. BUT
Code is read by humans. Humans need to be able to understand code easily. Not all humans think about code the same way SO
Write maintainable code If design is about usability, coding is about maintainability Write boring code thats easily modified and extended Consistent patterns Avoid obscure and fancy syntax Aim for maximum readability Use dev tools to make the job easier and less error-prone Syntax highlighting Code completion Linters and formatters Static analysis Statically typed languages or type hinting Write documentation to guide devs Explain how programs work so devs dont have to reverse-engineer your teams work. Explain the reasoning behind obscure solutions. Document pitfalls youve fallen into so other devs dont do the same. Write code that accommodates different kinds of devs. Devs can be: Inexperienced: New to the codebase Opinionated Impatient Bored Tired Pressured">
<meta itemprop="wordCount" content="147">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="My New Hugo Site">
<meta name="twitter:description" content="Coding for humans Code is instructions for machines. BUT
Code is read by humans. Humans need to be able to understand code easily. Not all humans think about code the same way SO
Write maintainable code If design is about usability, coding is about maintainability Write boring code thats easily modified and extended Consistent patterns Avoid obscure and fancy syntax Aim for maximum readability Use dev tools to make the job easier and less error-prone Syntax highlighting Code completion Linters and formatters Static analysis Statically typed languages or type hinting Write documentation to guide devs Explain how programs work so devs dont have to reverse-engineer your teams work. Explain the reasoning behind obscure solutions. Document pitfalls youve fallen into so other devs dont do the same. Write code that accommodates different kinds of devs. Devs can be: Inexperienced: New to the codebase Opinionated Impatient Bored Tired Pressured">
</head><body class="ma0 avenir bg-near-white development">
<header>
<div class="bg-black">
<nav class="pv3 ph3 ph4-ns" role="navigation">
<div class="flex-l justify-between items-center center">
<a href="/" class="f3 fw2 hover-white no-underline white-90 dib">
My New Hugo Site
</a>
<div class="flex-l items-center">
<div class="ananke-socials"></div>
</div>
</div>
</nav>
</div>
</header>
<main class="pb7" role="main">
<article class="flex-l flex-wrap justify-between mw8 center ph3">
<header class="mt4 w-100">
<aside class="instapaper_ignoref b helvetica tracked ttu">
Programmings
</aside><div id="sharing" class="mt3 ananke-socials"></div>
<h1 class="f1 athelas mt3 mb1"></h1>
</header>
<div class="nested-copy-line-height lh-copy serif f4 nested-links mid-gray pr4-l w-two-thirds-l"><h1 id="coding-for-humans">Coding for humans</h1>
<ul>
<li>Code is instructions for machines.</li>
</ul>
<p>BUT</p>
<ul>
<li>Code is read by humans.</li>
<li>Humans need to be able to understand code easily.</li>
<li>Not all humans think about code the same way</li>
</ul>
<p>SO</p>
<ul>
<li>Write maintainable code
<ul>
<li>If design is about usability, coding is about maintainability</li>
</ul>
</li>
<li>Write boring code that&rsquo;s easily modified and extended
<ul>
<li>Consistent patterns</li>
<li>Avoid obscure and fancy syntax</li>
<li>Aim for maximum readability</li>
</ul>
</li>
<li>Use dev tools to make the job easier and less error-prone
<ul>
<li>Syntax highlighting</li>
<li>Code completion</li>
<li>Linters and formatters</li>
<li>Static analysis</li>
<li>Statically typed languages or type hinting</li>
</ul>
</li>
<li>Write documentation to guide devs
<ul>
<li>Explain how programs work so devs don&rsquo;t have to reverse-engineer your
team&rsquo;s work.</li>
<li>Explain the reasoning behind obscure solutions.</li>
<li>Document pitfalls you&rsquo;ve fallen into so other devs don&rsquo;t do the same.</li>
</ul>
</li>
<li>Write code that accommodates different kinds of devs. Devs can be:
<ul>
<li>Inexperienced:</li>
<li>New to the codebase</li>
<li>Opinionated</li>
<li>Impatient</li>
<li>Bored</li>
<li>Tired</li>
<li>Pressured</li>
</ul>
</li>
</ul>
<ul class="pa0">
</ul>
<div class="mt6 instapaper_ignoref">
</div>
</div>
<aside class="w-30-l mt6-l">
</aside>
</article>
</main>
<footer class="bg-black bottom-0 w-100 pa3" role="contentinfo">
<div class="flex justify-between">
<a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="http://localhost:1313/" >
&copy; My New Hugo Site 2025
</a>
<div><div class="ananke-socials"></div>
</div>
</div>
</footer>
</body>
</html>