Posts Tagged ‘software development’

AI Won’t Take Over Programming; It’ll Morph Programming 

February 4, 2023

Despite ChatGPT raising the spectre of AI replacing programmers, an experiment I did implies a shift of the role of programmers rather than replacement. Programmers will not be irrelevant in the AI-powered future. They will just “program” in a very different way.

The Screen for the ChatGPT-generated todo app.

Society will always need people to translate raw ideas into something that makes sense to a computer. The form that communication takes may change over time, as it has in the past. Today, no one programs directly in machine code. Everyone works in a higher-level language. Even compilers themselves are now written in a higher-level language, usually C (Rust may take over that privilege, but that’s another blog post). 

In the same way, in the future, no programmers will write imperative code. At some point, languages like C, Rust, and Java won’t be used by humans. I used to think that we would develop declarative languages to program in, but now that I’ve been playing with ChatGPT, I wonder if programmers in the future will use natural language to describe what they want the computer to do.

This line of thought led to me doing an experiment to see what it was like to write a real program with ChatGPT. I started simple. I asked ChatGPT to write a To-Do App in React Redux. I typed the code in and asked follow-up questions to solve the errors I got. After a great deal of back and forth with ChatGPT, I finally got a complete, working project that implements a To-Do App in React Redux. You can look at the code at https://github.com/ziroby/todo-chatgpt in the v1-react-redux directory.

So what was it like working with ChatGPT to produce real code? It felt like I was talking to an errant child with more confidence than ability. ChatGPT always responded to my questions, but the code wasn’t a coherent whole. The first bit of code it gave me had an error in it that caused a blank page to display and an error in the console. I had to ask it to solve each error, and it didn’t always respond with the corrected original code. Instead, it would answer how to fix it in general, rather than for the specific code it generated.

Whenever a person originally learns programming, one of the things they learn is how to use the error messages received to learn how to program better. Deciphering error messages is very much a core skill for programmers. I feel like ChatGPT was lacking that ability.

I wonder what would happen if you gave ChatGPT access to a complete development environment and had it try to work out how to generate a complete project under different constraints. It seems like there’s a possibility of unsupervised learning. Or maybe it needs partially supervised learning, where a human gives it a task and it learns how to create a complete program to solve that task.

Back to the original question, will AI take over programming? My experiment showed that ChatGPT and similar programs will not take over programming. However, they will morph programming into something different. I see a future where “programmers” will talk to humans to find out what they want to be built, then talk to AIs to describe the program in terms the AI can understand. This will be a process, as the human asks the AI to refine each iteration of the program to add more to it. 

I allude to this today when people ask me to describe my job. I respond that my job is to write a task in terms that are so simple, even a computer can understand it. The future will just have the computer able to understand a task in more complex terms, but it will still need a human in the loop.

Thanks Prometheus

November 10, 2022

Prometheus is the name of an open source tool used for gathering metrics. I’m amazed at how appropriate the name is. 

Prometheus is the Greek god who gave fire to humankind. But there’s a lot more to that story. “Prometheus” literally means forethought, as in thinking about something and planning before you act. His brother is Epimethius, which literally means afterthought, as in doing things before you think about it and then thinking about it afterwards and going, “oops!”  Epimethius gave humankind Pandora and her box. Oops.

To the ancient Greeks, pretty much every abstract noun was a god. But they also retained their aspect as that abstract noun. That’s why when Discord wasn’t invited to a party, she sent an apple that she knew would start a fight, and when it did, there was discord, and so Discord really did attend the party.

So when we say that Prometheus gave fire to humankind, we’re also saying that the way you make a fire is through forethought. Forethought is crucial to making a fire. You need dry wood, kindling, a safe place for the fire, and the all illusive spark to start the fire, whether that spark is a flint and steel, two sticks, or a lighter that hasn’t run out of lighter fluid. To assemble these ingredients, you need to think about it before you act. You need to exercise forethought. 

That’s why it makes sense to call a metric gathering system Prometheus. To collect metrics on your system, you have to instrument the different parts. You have to instrument it before the failure that you want to analyse. 

Many applications, like your database or messaging system, have instrumentation built in. (Thank you, app developers, for your forethought). But you still have to wire it in and get it collected and sent to Prometheus. Your application code needs instrumentation added. You have to add something to expose system metrics, and for application specific metrics, you have to add the code to count and log what you’re interested in capturing. And then you need to make sure it gets to Prometheus.

Getting an application instrumented is an intricate process. And above all, it requires forethought. Thank you, Prometheus.

Austin Code Dojo

May 8, 2012

Anouncing
The All-New, Re-Imagined
Austin Code Dojo
Austin Code Dojo

This Dojo is a place for various forms of programming practice, just as a martial arts dojo is a place for various forms of martial arts practices.  We will have a beginners kata for new coders, students, and managers who used to code; and a more advanced kata, if there’s interest.  We also welcome all other forms of cooperative programming practice.  Solve a programming challenge, hack on an open source project, share some code you’re working on, or just talk about programming stuff in a friendly, unstructured atmosphere.  The point is group practice of all sorts.
(more…)

How do you tell a master craftsman?

January 17, 2011

I asked my 12-year old son today what it means to be a craftsman and a master craftsman (of any profession). Then we went on to discuss how you can tell that someone is a master craftsman. I find his answer illuminating:

  1. They should be able to talk their craft and, if you’re not a master yourself, they will lose you and go over your head and talk about things you don’t understand. This was from a child’s view, but I interpret it as “They must be able to talk up their craft”.
  2. They should be able to create a sample on demand. He was thinking about small crafts when he mentioned it, but when we talked about bigger things (like skyscrapers), we decided a small test problem would suffice.
  3. (and this I think is the most important one) They should show you their previous work. They should be able to say, “Look, I created these high quality things in the past, so I can create high quality things for you in the future.”

The book Software Craftsmanship book mentions that to be a master, you must have a masterpiece. To claim that you’re a master, you must be able to show some really good work. So in our discussion of how do you tell a master craftsman, the answer is simple: look at their work.

When you hire an artist (painter, photographer, sculptor, etc.), you look at their portfolio. All artists have one, and it’s how they get work. So, if we’re craftsman, we should have portfolios. Résumés are similar to portfolios, but a) they don’t emphasize actual completed works enough, and b) they’re dry and boring. So maybe we need to start making multimedia portfolios to highlight our abilities as a craftsman. I picture web sites with screen shots, customer testimonials, sample code, links to your blog and other sites, and links to free software or other non-work projects you’ve created.

The key here is, if you want to convince someone that you’re a master craftsman, show them your work and your masterpieces.

Ron “Ziroby” Romero
http://www.ziroby.com (which has some portfolio elements, but needs to talk about my actual for-pay work)

[cross-posted to the Software Craftmanship list at http://groups.google.com/group/software_craftsmanship/browse_thread/thread/a9a03d96ff298a26 ]

Austin Style Code Dojo

August 22, 2010

Here in Austin, Texas, we’ve just started weekly dojos. Our dojo style is similar to Randoori, but without pairing (instead of pairs, we’re all one set).  In Randoori terms, we use something similar to Ping Pong.

The flow goes like this: One of the coders writes a failing test.  Lately we’ve discussed the proper API in detail during this step.  I think we’re trying to learn the wisdom of proper test structure.

Once the test fails, that person sits down, and someone else goes to the keyboard.  That person solves the test, does any refactoring, and writes a failing test.  Then they pass the keyboard.

It continues like that, with each person doing “Fix it.  Refactor. Break it.  Pass Keyboard”.

We’ve been working in very small groups of about 3-5.  In that size, everyone sees what’s going on and gets a chance to drive.  We don’t have a projector, which isn’t too bad since the groups are small. (But if someone wants to lend us one, it could be useful.)

We allow discussions and suggestions and comments at any time (not just on a green bar), but the rule is “the person at the keyboard is supreme dictator”.  They can choose to ignore everyone else, or go with whatever suggestion they choose.

We’re still working out the bumps, but we seem to have a good system going.  If you’re in Austin and have a Monday evening free, come join us at Genuine Joe’s Coffeehouse from 8 – 10 pm.

What comes next after TDD katas?

August 16, 2010

What comes next after TDD katas?  UI Testing?  Mocks?  Design Patterns?

I’ve been doing TDD katas and dojos for a while now, and I think I’ve learned the first lesson.  I know the cadence of “break it, fix it, refactor”.  I understand Baby Steps and The Simplest Thing That Could Possible Work.  I get the importance of test choice in guiding the evolution of design.

So what’s my next lesson?  What’s the next thing the katas and dojos can teach me?  Maybe I need to figure out how to test UIs, and how to make testable UIs. The Humble Dialog Box may provide insight and direction there.  A coworker suggested that I need to learn mocks, maybe JMock or RhinoMocks.  I think there’s a kata in there somewhere.  I’ve tried the Publish/Subscribe example from JMock, but that feels too simple, a Hello World of JMock.  What’s a more complex kata that needs mocks to solve?  Or maybe I need to find a way to incorporate Design Patterns into my solutions.  So far I’ve evolved very simple designs, so they haven’t needed Design Patterns.

So what’s the next lesson to learn from code katas?  I know there’s a lesson in there somewhere, and I feel like I’m on the verge of learning it.  What is that lesson?

What Matters in a Dojo?

July 18, 2010

We in the Austin Code Dojo have been doing weekly dojos for four weeks now, in Genuine Joe Coffeehouse in North Austin, Texas. We’ve been learning a lot in these sessions.  Here are some of my notes.  These mostly talk about what matters in a dojo.  What are the important things we’re doing and why are we doing things this way?

(more…)

The Transmission Analogy

June 3, 2010

It’s been said that memory management is like automotive transmission. I agree, but, unlike Joel Spolsky, I don’t think that implies that implies one should prefer languages that manage memory for you.

(more…)

Quick Code Kata Restrospective

May 31, 2010

I’ve been doing Coding Katas three to five days a week for the last several weeks. I mentioned this to a friend, and he asked to join me. We did the reversi Kara, and learned some good stuff.  We learned to start with empty test cases and progress slowly from there.  We discovered we had to trust ourselves to pick which test cases to write, rather than doing complete comprehensive tests.  Finally, we wrote down lessons learned, which let us contemplate the process later.

(more…)

TDD FizzBuzz on the Android

May 23, 2010

I’m starting Android development, but I want to work in a Test Driven development (TDD) way. I’ve looked at the Notepad Tutorial, but each step is too big, and it’s not at all TDD. This blog post describes the first step I took.
(more…)