Skip to content

Instantly share code, notes, and snippets.

@poemswe
poemswe / writing.md
Last active February 20, 2026 17:30
Claude Writing Rules

Personal Writing Rules

Apply these on top of Strunk's Elements of Style when writing or editing prose.

Punctuation:

  • No colons. Use conjunctions, commas, or split into separate sentences.
  • No em dashes. Use commas, conjunctions, or new sentences.
  • No semicolons unless joining two closely related independent clauses.

Sentence structure:

@poemswe
poemswe / Coding_Rules.md
Last active March 25, 2026 18:04
Claude.md for Best Practices

Rules

Code Quality

  • Don't write comments, code is source of truth. The code should speak for itself
  • Don't reinvent the wheel. Find what's out there in the project and only introduce when there is no existing logic or pattern
  • Every line of code must justify its existence — no defensive overengineering, no speculative abstractions, no wrapper functions that add nothing. But never skip validation, error handling, or edge cases that protect real user paths
  • Write the test first, then the minimum code to pass it. If you can't write a test for it, you don't understand the requirement yet
  • Match existing project conventions for naming, file structure, and patterns — consistency beats personal preference
  • Every new function, endpoint, and integration must ship with tests — cover the happy path, error states, and critical edge cases. Coverage on changed files must be ≥90%
public class ExampleClient {
@AnyThread
public ExampleClient(Context context, @NonNull Configuration config) {
}
@UiThread
public void doSomething() {
}
@poemswe
poemswe / ExampleClient.java
Created May 2, 2020 10:52
Building Android Library From Scratch
// don't do this
public ExampleClient(Context context, Configuration config) {
}
// do this
public ExampleClient(Context context, @NonNull Configuration config) {
}
@poemswe
poemswe / ExampleClient.java
Last active May 2, 2020 11:55
Building Android Library From Scratch
public class ExampleClient {
public static final String ENVIRONMENT_DEV = "DEV";
public static final String ENVIRONMENT_PROD = "PROD";
public static final String ENVIRONMENT_STAGING = "STG";
@Retention(RetentionPolicy.SOURCE)
@StringDef({ENVIRONMENT_DEV, ENVIRONMENT_PROD, ENVIRONMENT_STAGING})
public @interface Environment {
}
public class ExampleClient {
public static enum Environment {
DEV, STAGING, PROD
}
private ExampleClient(Context context, String key, int logLevel, Environment environment) {
}
private static Builder {
@poemswe
poemswe / ExampleClient.kt
Last active May 2, 2020 10:29
Building Android Library From Scratch
public class Configuration(val context: Context, val key: String) {
var environment: String = "dev"
}
public ExampleClient(Context context, Configuration config) {
}
//initialisation
val config = Configuration(context, key)
config.environment = "prod"
@poemswe
poemswe / ExampleClient.java
Created May 2, 2020 10:23
Building Android Library From Scratch
public class ExampleClient {
private Context context;
private String key;
private int logLevel;
private String environment;
public ExampleClient(Context context, String key, int logLevel, String environment) {
}
@poemswe
poemswe / ExampleClient.java
Last active May 2, 2020 11:56
Building Android Library From Scratch
public class ExampleClient {
private ExampleClient(Context context, String key, int logLevel, String environment) {
}
private static Builder {
private Context context;
@poemswe
poemswe / bash-cheatsheet.sh
Created March 9, 2016 05:42 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04