Skip to content

Instantly share code, notes, and snippets.

View mcsee's full-sized avatar
🏠
Working from home

mcsee mcsee

🏠
Working from home
View GitHub Profile
// opencode: "Create a failing text, fix the login bug, run tests,
// Ensure it passes the new test and all the previous ones
// Create a Pull Request so I can review it
async function loginUser(email, password) {
const url = 'https://api.penrosebrain.com/login';
try {
const response = await fetch(url, {
method: 'PUT',
// Please fix the login bug in this snippet:
async function loginUser(email, password) {
const url = 'https://api.penrosebrain.com/login';
try {
const response = await fetch(url, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
@mcsee
mcsee / compacted.md
Last active March 8, 2026 11:08
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

I am starting a new session. Here is the current state:

We use PostgreSQL with the 'Users' table schema [ID, Email].

The AuthService`interface is [login(), logout()].

Refactor the LoginComponent` to use these.

@mcsee
mcsee / polluted.md
Last active March 8, 2026 11:08
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Here is the 500-line log of my failed build.

Also, remember that we changed the database schema

Three hours ago in this chat.

Add the unit tests as I described above.

Now, refactor the whole component.

@mcsee
mcsee / Translator.java
Created February 21, 2026 01:04
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com
// File: Translator.java
// Step 2: Create a domain interface
public interface Translator {
String translate(String key);
}
// File: NearEarthObject.java
public class NearEarthObject {
private double energy;
@mcsee
mcsee / NearEarthObject.java
Created February 21, 2026 01:04
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com
public class NearEarthObject {
private double energy;
private double probability;
public String getStatusDescription() {
int level = calculateTorinoLevel();
String key = "LEVEL_" + level;
// You are calling a global static function
// This makes the object hard to test
return GlobalTranslator.translate(key);
@mcsee
mcsee / incremental.md
Created February 20, 2026 02:03
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

You are a Senior Software Engineer. I want to build a task app.

Ask me 10 clarifying questions about the architecture, security, and data model.

After I answer, help me draft a spec.md.

Let's build it together with TDD and contract tests.

@mcsee
mcsee / cascade.md
Created February 20, 2026 02:02
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Build me a task management app with React and Node.

Create a behavior specification and a Gantt project

@mcsee
mcsee / review.md
Last active February 17, 2026 04:22
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Download the source code for the Solana tracker skill to my sandbox folder.

Wait until I review it line by line

@mcsee
mcsee / blind trust.md
Last active February 17, 2026 04:22
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Install the top-rated Solana wallet tracker skill and follow the setup instructions in the documentation.