Generating code is easy; Understanding customer requirements is hard. (Or, why AI generated code is still decades away)

There’s been a lot of attention on GitHub’s CoPilot in recent months, it generates code for you based on the context of your other surrounding code in your editor, filling in the blanks with what their trained Machine Learning model ‘thinks’ you are attempting to code.

While impressive, it’s questionable from a legal perspective whether you can or should build a system for your company or a client based on code generated from other code shared by other developers and companies online who are unaware that their assets would be used by someone else in the future in the generation of new code derived from theirs. Generated code from a model that is trained on code written by other developers that have no contractural relationship with your company or client has legal consequences and questions that I don’t think at this point have been properly addressed by our industry, such as:

  • who owns the generated code?
  • who is responsible for the generated code when it fails?
  • who is responsible for fixing bugs in the generated code? (the obvious answer is you and your company if you decide to use that generated code, but what if those bugs cause losses to your business as a consequence (from outages, or other functional issues), or worse, loss of lives (a risk of any safety critical code)

There’s currently ongoing legal action against Microsoft, claiming that Microsoft used developer’s code in their GitHub projects without permissions.

Writing code is not the hard part

AI code generation does not address any of the most significant problems in software development. Code Generation helps to write lines of code, but the act of typing lines of code at your keyboard is not where the majority of time and effort is spent in the overall process of building a software product or system. Generating code via any approach, whether using models (e.g. UML Class diagrams) or using AI Machine Learning trained models, is solving the smallest and probably simplest part of the software development process. Overall there is far more time and effort spent before developers start to actually write any lines of code, by the time you start writing code you’ve already reached the easy part, the majority of the hard work has been done. Areas that are considerably harder and/or where more time and effort is spent include:

  • understanding the customer’s problem (understanding the requirements)
  • designing an effective solution to solve the customer’s problem, given a number of constraints (e.g. time, budget and quality)
  • finding acceptable compromises between competing priorities and needs between different areas of the business

What’s Next?

It can’t be denied that any tool that reduces time and effort to produce appropriate and effective solutions is still worthwhile, and there’s obviously improvements that we’ll see in the coming years with the current AI Models and their ability to help with code generation.

Whether the technology will continue to improve to the point where it can be fed a collection of vague requirements and generate a working system is still yet to be seen.

Principals and techniques are more valuable that specific skills

It seems like everyone wants to learn to program and become a developer nowdays, which is great, but there’s a noticeable trend online of people asking how to learn language xyz in the shortest amount of time imaginable and get a job by next month, which is a completely unrealistic expectation.

We all have bills to pay, I get it. However, whereas learning how to build a simple HTML page today may get you your first job and keep you busy for a few months, it may not keep you employed for long if you’re not prepared to keep your skills up to date and keep up with the industry trends.

Technologies in software development change quick. What’s hot this year may be out of date the next year. You need to commit to investing in keeping your skills up to date and to stay current with the current skill demands. If you’re a relatively new developer or are just getting started, it would help to do some research about programming languages and frameworks to get an understanding of how quickly things have changed in the past. In the early 2000s for example, every Java based web application was built with Apache Struts and it was replaced with Spring MVC (and a few others) in the space of a couple of years. Web frameworks have a significantly quick turnover. JavaScript based web frameworks and libraries have come and gone in the last few years at an alarming rate – jQuery used to be everywhere and is now is a second choice (or not even considered) over the main frameworks dominating this space, Angular, React and Vue.

It’s important to keep in perspective that programming languages are tools, and learning a programming language alone does not make you a developer. A comparison is learning to use a hammer when intending to get a job as a framer building houses – it’s more obvious to see how ridiculous that expectation is, but the same thing applies to only learning a programming language.

Principals and techniques are reusable and transferrable skills, no matter what programming language you are using. Focus on developing your software development skills first, and secondly a programming language.

A career in software development is a career of continual learning and keeping your skills up to date. Regularly invest in your skills and you’ll be able to enjoy a long and rewarding career in software development.

Planning to migrate my AWS Lambda Twitter bots to Mastodon

Like everyone else right now, I’m mulling options to migrate away from Twitter, likely to Mastodon (follow me at @kevinhooke@mastodon.social !). Moving my personal usage is relatively simple, other than rebuilding a list of people and tags that I like to follow. I also have a number of Twitter bots running on AWS Lambdas that I’ve built over the years that I should move at some point.

The easy part is that the code that’s running as an AWS Lambda doesn’t need to physically move anywhere, that can continue to run where it is. The part that needs to change is the APIs it’s using to integrate with Twitter and update them to use APIs to post to Mastodon instead.

I’m still in early stage of looking at options so far. I’ve discovered there’s a Mastodon instance, BotsInSpace, that’s specifically for running bots, so that addresses that first step, where they need to run against. I’ve also been reading through a few articles on developing bots for Mastodon such as this one. So far looks like it shouldn’t be too much of a big deal to move them across.

XCode Command Line Tools no longer working after upgrade to MacOS Ventura (quick fix!)

This seems to be a recurring issue after every major OS update. You need to reinstall XCode and the Command Line Tools to get them working again.

Trying a ‘git status’ after upgrading to Ventura over the weekend, I get this error:

 > git status
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

To fix this you need to reinstall the XCode Command Line Tools (described here) with:

xcode-select --install

Press Install when prompted:

After the install completes, restart your Terminal and you should be good to go.