| description | Ask for action items from a wall of text |
|---|
TL;DR — What from that wall of text is an action item that I NEED to know?
| description | Ask for action items from a wall of text |
|---|
TL;DR — What from that wall of text is an action item that I NEED to know?
Minimal reproduction of a rendering bug that affects Bubble Tea v2 applications running inside JetBrains GoLand (and all IntelliJ-based IDEs).
GoLand's built-in terminal uses JediTerm, which does not correctly handle all ANSI escape sequences. Specifically, CBT (Cursor Backward Tab) sequences emitted by ultraviolet's differential renderer can cause invalid screen rendering when transitioning between layouts of different widths.
This program demonstrates the issue by toggling between two views recorded from a real Bubble Tea application:
This illustrates how to use Claude Code for development, allowing it to generate "AI slop" but then periodically using it to rearchitect and clean up the slop.
I directed Claude Code to generate both of these two (2) documents. The file rearchitecture_plan.md was created a while back when it was developing code with bugs that it could not fix so I asked it to review, critique, and identify areas for architectural improvement.
The file fix_plan.md was created after we worked on the project significantly more until it became unmaintainable again, so I pointed it at the refactor_plan.md and asked it to review the code again, and fix_plan.md was born.
And frankly, it got everything pretty much exactly right.
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Check if both arguments are provided | |
| if [ $# -ne 2 ]; then | |
| echo "Rename a Jetbrains IDE project" | |
| echo "Usage:" | |
| echo " $(basename "$0") <old_project_name> <new_project_name> [<projects_dir default=~/Projects>]" | |
| exit 1 |
This solution is built on top of Go's log/slog package and leverages slog.Default(). To use it a developer should declare a package variable logger in every package that is part of their Go project that needs to perform logging (e.g. a package containing only type, var and/or const declarations would usually not need a logger.go file.)
Add a logger.go file to every packages and then add this line to the file, updating it with the package's name:
var logger = logging.NewPackageLogger("<package_name>") This uses a small logging package you can find below which has a Logger type simply to embed slog.Log. This allows adding extra methods beyond that provided by slog.Logger and to preprocess calls to *slog.Logger if we later find that to be needed.
| package main_test | |
| import ( | |
| "testing" | |
| ) | |
| type Lexer struct { | |
| input string // the string being scanned. | |
| pos int // current position in the input. | |
| } |
| // readType reads a type from r at off of name. It adds types to the | |
| // type cache, appends new typedef types to typedefs, and computes the | |
| // sizes of types. Callers should pass nil for typedefs; this is used | |
| // for internal recursion. | |
| func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Offset]Type, fixups *typeFixer) (t Type, err error) { | |
| var e *Entry | |
| var ok bool | |
| var addressSize int | |
| var typ Type | |
| var nextDepth int |
| // readType reads a type from r at off of name. It adds types to the | |
| // type cache, appends new typedef types to typedefs, and computes the | |
| // sizes of types. Callers should pass nil for typedefs; this is used | |
| // for internal recursion. | |
| func (d *Data) readType(name string, r typeReader, off Offset, typeCache map[Offset]Type, fixups *typeFixer) (t Type, err error) { | |
| var e *Entry | |
| var ok bool | |
| var addressSize int | |
| var typ Type | |
| var nextDepth int |
| { | |
| "meta": { | |
| "theme": "kendall" | |
| }, | |
| "basics": { | |
| "name": "Mike Schinkel", | |
| "label": "Senior Engineer specializing in Go, OpenAPI, Kubernetes, AWS, and CI/CD", | |
| "photo": "https://www.gravatar.com/avatar/c988a2da603a19e827a39ab4d9186909?s=200&r=pg&d=mm", | |
| "summary": "I am looking a long-term contract role working to enhance software products where my unique set of Go development, OpenAPI, Kubernetes AWS, and CI/CD skills and experience can have a big impact. And I will be really excited if the project I get to work on is open source.", | |
| "location": { |
| package main | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "mime" | |
| "net/http" | |
| "net/url" |