Coding with ChatGPT

Foreword (creating an application to remove image duplicates)

The following document was produced by ChatGPT describing a two-day effort to build an application that I really needed. I was fully capable of doing the application on my own, but I know that accomplishing it would have taken a comparatively very long time and would have required these steps that I did not need to do (or figure out on my own) because of my collaboration with ChatGPT:

Learn Go

Learn the fyne framework

Troubleshoot the many “gotchas” in IDE setup as well as numerous errors (ChatGPT is not omniscient)

Make my first ever native Windows executable

I have wanted to do this project for more than a year, but I just could not get myself to grind it out. Using ChatGPT and after two days, I now have an application (at least an MVP) that I can use to pare down my thousands of images, ensuring that I have no duplicates.

I guess the main roadblock for me before considering ChatGPT is that I detest the time and effort required to master a language and a framework to the point of actually getting anything done. I have experience in this. Over the (many) years, I have used BASIC, Java, PowerBuilder, Scala, C, Linux scripts along with many various frameworks and toolsets. This collaboration with ChatGPT made the process fun for me. My main tasks in this effort were to feed ChatGPT decent requirements, bite off and focus on discrete, cumulative increments.

I noticed some interesting things about ChatGPT along the way: For instance, when focusing on the part of the application where the user opens the resulting table and is able to click the row to show the image, ChatGPT seemed to get confused and refused to reproduce the entire code set. The code it was giving me to use seemed incomplete and it was not clear to me what was going on. At this point, I carved out that one piece of functionality to a sub-project and got the table interface working, then I had ChatGPT fold that working subset back into the main project.

Another interesting thing is that version 4o is just fine for this work, but that the o3-mini-high version seems to be much more technically focused and seems to have better technical reasoning skills. I found, however, that I preferred working with 4o as the interaction was more natural.

I asked ChatGPT to produce a document describing the project:

——————————————-

Title: Retrospective: Building a Photo Deduplication Application in Go

Author: Benjamin Toso

Date: April 1, 2025

Summary:

This retrospective outlines the journey of designing and building a photo deduplication application using the Go programming language, with ChatGPT as a coding and learning partner. It highlights the tools, architecture, development process, and lessons learned — ideal for readers interested in solo development, learning Go, or collaborating with AI on real-world projects.

Objective:

To reflect on the process of designing and building a desktop application for identifying and managing duplicate image files using the Go programming language, with guidance and support from ChatGPT. This document combines the detailed planning process with key retrospective insights.

Project Overview:

This project began with a desire to solve a personal problem — the need to organize and deduplicate a large archive of image files spread across multiple drives. With no prior experience in Go, I set out to build a cross-platform, efficient desktop application that could work entirely offline.

ChatGPT as a Partner:

One of the most significant enablers of this project was using ChatGPT as a development partner. The AI proved highly effective at:

1. Translating high-level requirements into functional, idiomatic Go code.

2. Iteratively building out components with explanations tailored to my learning pace.

3. Helping manage project scope and architectural design.

Key Lessons and Insights:

1. ChatGPT is really good at building code: With thoughtful prompts and context, ChatGPT generates reliable Go code that works and includes explanations that help reinforce learning.

2. Small iterations are the key to understanding: Each milestone focused on a minimal functional slice — a button, a hash function, a database insert — which built both competence and confidence.

3. Interaction trains both the user and ChatGPT: As I refined my questions and described my needs more clearly, ChatGPT’s responses became more targeted. This mutual adaptation accelerated development.

Features Implemented:

1. Folder selection and recursive scanning

2. Image file identification by extension

3. Hash-based duplicate detection using SHA-256

4. SQLite database to store file records and hashes

5. GUI using Fyne to display duplicates grouped by hash

6. Preview capability for standard image types (via external apps)

7. Safe design — no automatic deletion or file movement

Technology Stack:

- Language: Go (Golang)

- GUI Framework: Fyne

- Database: SQLite

- Hashing: SHA-256 (crypto/sha256)

Architecture:

1. UI Layer: Handles window creation, folder picking, and result display.

2. File Scanner: Recursively walks the selected directory and filters image files.

3. Hasher: Computes SHA-256 hashes of images.

4. Database Module: Records path, filename, size, modtime, and hash.

5. Duplicate Analyzer: Groups and displays files with matching hashes.

User Flow:

1. Launch the application.

2. Select a folder to scan.

3. App recursively processes image files and stores data.

4. After scanning, duplicate groups are displayed.

5. Users can preview files or open them externally.

Design Philosophy:

- Local-first, no cloud

- Minimal dependencies

- Clear, focused UI

- Iterative learning through real code

Reflections:

This was a rewarding journey into both software craftsmanship and human-AI collaboration. I gained fluency in Go, confidence in designing real-world tools, and an appreciation for the power of incremental progress. ChatGPT served not just as a code assistant, but as a thinking partner — offering clarity, context, and encouragement.

Next Steps:

- Extend support to Windows/Linux [note… I actually did most of the work in Windows… Since I am producing this document using my Mac, ChatGPT assumes that the work was done on this machine]

- Add image previews within the app [pretty much done]

- Introduce optional filters and tags for better organization

- Build report/export functionality

Conclusion:

The photo deduplication project became more than a tool — it was a framework for learning, a case study in human-AI collaboration, and a reminder that meaningful software can emerge from a series of very small, understandable steps. With ChatGPT and curiosity as co-pilots, I turned a concept into a working reality.


Sufian Abu

CIO/SVP/VP | Senior IT, Data & Advanced Analytics (Big Data, ML/AI, GenAI), Strategy, Governance, PMO & Transformation Leader | Led $2.5B worth of Enterprise-wide Implementations

1mo

This is really nice achievement Ben! Looking forward to meeting you soon.

Like
Reply

To view or add a comment, sign in

More articles by Benjamin Toso MS

Insights from the community

Others also viewed

Explore topics