Skip to content

Instantly share code, notes, and snippets.

Software Engineering Philosophy & Development Protocol

1. Global Integrity & Topology

  • System Awareness: Before implementation, map the dependency graph and system topology. Ensure local changes preserve global invariants and do not trigger "Shotgun Surgery."
  • Orthogonality: Design for independence. Ensure that changes in one module do not leak side effects into others. Minimize coupling and maximize cohesion.

2. Intent & Abstraction Hierarchy

  • Intent-Revealing Design: Prioritize human readability and intent over machine cleverness. Use naming that explains "Why" rather than "How."
  • Single Level of Abstraction (SLA): Adhere strictly to the Single Responsibility Principle (SRP). Each function must operate at a consistent level of abstraction and have exactly one reason to change.
@fmachado
fmachado / prompt-debug
Created May 23, 2023 11:36
prompt-debug
You did not follow my instructions. Explain to me, step by step, what caused you to [OUTCOME], and then point out where in the overall logic this occurred in my original prompt. Answer my question instead of performing the action, and do not provide a corrected version.
Overall, the listed strategies are helpful for learning and retaining new information.
However, some improvements can be made for clarity and effectiveness.
- Leverage the Pareto Principle for learning
Improved Prompt: "Identify the 20% of [topic or skill] that will yield 80% of the desired results and provide a step-by-step learning plan to master it."
- Utilize the Feynman Technique for deeper understanding
Improved Prompt: "Explain [topic or skill] in the simplest terms possible, as if teaching it to a complete beginner. Identify gaps in my understanding and recommend resources to fill them."
- Optimize learning through interleaving
@fmachado
fmachado / chatgpt-tech-interviewer.txt
Last active May 30, 2023 19:02
ChatGPT Tech Interviewer - just copy and paste the following text into ChatGPT (3.5 or 4) prompt.
From now on you are now "ChatGPT Tech Interviewer", a specialist on interviewing candidates for jobs at tech companies. The following rules are strict and must be follow as it is:
1 - Your main objective is to mimic a real job interview for a tech company;
2 - You will start by introducing yourself and why it's important to be extensively prepared for a tech interview;
3 - You will then ask me in which industry I am applying for a job. Cite "E-commerce", "Finance and banking (FinTech)", "Healthcare", "Education" as examples. Wait for my answer;
4 - You will then ask me for what job position I am applying for. All your next questions must be related with this job position and seniority level. Wait for my answer;
5 - You will then ask me a relevant question and wait for my answer. After I give you an answer, you will review it regarding how clear it is and explain what I could do to improve it using a language compatible with my seniority level. Do not mention that you will review my answer;
6 - You will keep a
@imjasonh
imjasonh / markdown.css
Last active September 3, 2025 22:12
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@stevebourne
stevebourne / Gemfile
Created April 15, 2012 19:28
Add facebook auth to a Clearance app, using omniauth-facebook
gem 'omniauth'
gem 'omniauth-facebook'
gem 'clearance'
@wtaysom
wtaysom / where_is.rb
Created September 23, 2011 08:57
A little Ruby module for finding the source location where class and methods are defined.
module Where
class <<self
attr_accessor :editor
def is_proc(proc)
source_location(proc)
end
def is_method(klass, method_name)
source_location(klass.method(method_name))