<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Copilot on blog.iankulin.com</title><link>https://blog.iankulin.com/tags/copilot/</link><description>Recent content in Copilot on blog.iankulin.com</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Mon, 03 Mar 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.iankulin.com/tags/copilot/index.xml" rel="self" type="application/rss+xml"/><item><title>Where I'm up to with AI for coding</title><link>https://blog.iankulin.com/where-im-up-to-with-ai-for-coding/</link><pubDate>Mon, 03 Mar 2025 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/where-im-up-to-with-ai-for-coding/</guid><description>&lt;p&gt;There&amp;rsquo;s still plenty of controversy about LLMs for coding, and not without reason. But I thought I&amp;rsquo;d run through what I&amp;rsquo;ve tried, and where I&amp;rsquo;ve landed for using AI. Also what the pitfalls are, where it&amp;rsquo;s useful and how it&amp;rsquo;s changed my practice.&lt;/p&gt;
&lt;h3 id="issues"&gt;Issues&lt;/h3&gt;
&lt;h5 id="training-data"&gt;Training data&lt;/h5&gt;
&lt;p&gt;The training data for large language models generally is problematic. There&amp;rsquo;s no doubt that they have been trained on copyright material. With code it&amp;rsquo;s slightly less murky since there is a high availability of good quality open source data with attached licenses to train models on. No doubt this include code written by people who don&amp;rsquo;t approve of it being used by AI, but I think the popular reading of most open source licenses is that using it for training is fine.&lt;/p&gt;
&lt;h4 id="accuracy"&gt;Accuracy&lt;/h4&gt;
&lt;p&gt;Another area where AI code is better than other AI use is in verifiability. It&amp;rsquo;s possible to write good tests to verify a lot of software behaviour. This somewhat negates the problem of hallucinations.&lt;/p&gt;
&lt;h4 id="energy-use"&gt;Energy Use&lt;/h4&gt;
&lt;p&gt;Energy use is an issue I don&amp;rsquo;t really have an answer for. When IT companies are investigating owning their own power stations that&amp;rsquo;s a clear sign that this is a problem that the experts expect to get worse than better. I&amp;rsquo;ve lived through so many IT bubbles now that I&amp;rsquo;m sure that the hype around AI will die down somewhat and there won&amp;rsquo;t be VC money for adding AI to products to make them worse in a few years. Hopefully, AI will be left running in the areas only where it&amp;rsquo;s genuinely helpful like most of the previous IT fashions.&lt;/p&gt;
&lt;p&gt;I also have a growing suspicion that we might have got to the end of the performance gains of making models bigger. Surely by now all of the data that can be gobbled up has been, and the improvements seem to be coming in smaller steps. I imagine future gains won&amp;rsquo;t involve making models bigger, but integrating them into tasks more effectively or building them to be more focused.&lt;/p&gt;
&lt;p&gt;Nevertheless, for the moment, the power usage, especially for training, and especially that the US energy mix now looks like it&amp;rsquo;s moving away from renewables, is my main concern about AI use.&lt;/p&gt;
&lt;h4 id="leaking-data"&gt;Leaking Data&lt;/h4&gt;
&lt;p&gt;Another issue is leaking data. This does not overly affect me since I open source my code anyway, but anyone using it in a real job would have to be following policy on this which in most cases would be - don&amp;rsquo;t use it. There are a couple of problems related to the AI vacuuming up all it&amp;rsquo;s context from everything in your projects that does worry me - Because I&amp;rsquo;m so comfortable in VS Code and git, I keep all my work notes as markdown and manage them in VS Code, and I also use plain text accounting (BeanCount). I don&amp;rsquo;t want any of that data heading out into the AI behemoths, so I&amp;rsquo;m constantly turning the plugins off and on.&lt;/p&gt;
&lt;p&gt;It is possible to use local models, especially if you&amp;rsquo;re on a Mac. I&amp;rsquo;ve used &lt;a href="https://ollama.com/"&gt;Ollama&lt;/a&gt; with the &lt;a href="https://marketplace.visualstudio.com/items?itemName=Continue.continue"&gt;Continue&lt;/a&gt; plugin for code completion and kept my data to myself. More about this experience later.&lt;/p&gt;
&lt;h3 id="what-ive-tried"&gt;What I&amp;rsquo;ve tried&lt;/h3&gt;
&lt;p&gt;I used Github Copilot for the trial period and was so impressed with it I paid for the service for a couple of months. This was mainly for code completion although I did use the chat a bit - it just wasn&amp;rsquo;t as comfortable in the editor.&lt;/p&gt;
&lt;p&gt;I switched to &lt;a href="https://codeium.com/"&gt;Codeium&lt;/a&gt; after hearing Kevin Howe on a &lt;a href="https://syntax.fm/show/728/ai-superpowers-with-kevin-hou-and-codeium"&gt;Syntax episode&lt;/a&gt;. For code, this seems right on par with my (now outdated) experience of Github Copilot. Copilot did seem a bit better at figuring things out from the context though - for example my plain text accounting format is probably not in the training data for either service, but when I was letting it they both would produce suggestions in the correct format, but Copilot was making better suggestions. For example it would suggest an expense was for fuel if the payee was a petrol station who appeared elsewhere in my current file.&lt;/p&gt;
&lt;p&gt;I then discovered Ollama, and with an M1 MacBook it&amp;rsquo;s a really simple matter to just pull models down and play with them. Mostly at the command line, but I did use &lt;a href="https://github.com/open-webui/open-webui"&gt;Open Web UI&lt;/a&gt; a bit for a more ChatGPT like experience. I played around with trying to do RAG via Open Web UI but with poor results.&lt;/p&gt;
&lt;p&gt;Using Ollama (which provides a REST type API to your models) I switched to the Continue VS Code plugin so I could do code-completion locally. This worked fine, but, 1) it was a bit slower than Copilot or Codeium. Only by a bit, but the difference was it was thinking slower than me, so I would have to wait for it, whereas with the big online services I was constantly typing over their suggestions, so I gave up on it. If my current M1 MacBook dies I&amp;rsquo;ll buy an M4 and try this again.&lt;/p&gt;
&lt;p&gt;I have used, and continue to use, a combination of Claude, ChatGPT, V0, and DeepSeek Coder in the web browser chat modes. In fact, this is probably my main use. I don&amp;rsquo;t pay for any of them (thank you venture capitalists) and just move across to a different one when I run out of free queries.&lt;/p&gt;
&lt;p&gt;Most of this use is the sort of questions you might ask your mates at work - how would you tackle this? what a good library for? what do you think of this approach? can you have a look over my code and suggest improvements? Working in webchat mode reduces the context available (compared to your entire project) but I&amp;rsquo;ve grown to actually prefer the tight control it gives me when I&amp;rsquo;m asking specific code questions.&lt;/p&gt;
&lt;h3 id="how-i-use-it-now"&gt;How I use it now&lt;/h3&gt;
&lt;p&gt;I use Codeium via its VS Code plugin for code completion. Sometimes this is amazing - it spits out what&amp;rsquo;s in your head, and follows your naming conventions etc. Other times it doesn&amp;rsquo;t and I just keep typing.&lt;/p&gt;
&lt;p&gt;What it&amp;rsquo;s really good at is anything repetitive. I especially love it for tests, once I&amp;rsquo;ve written a couple of tests against edge cases in my code, it gets the flavour of what I want and starts writing good ones, including some I wouldn&amp;rsquo;t have thought of which is gold. This is often a tab, tab, tab, exercise.&lt;/p&gt;
&lt;p&gt;I spend a lot of time in long form conversations in the web interfaces of the major chatbots. Usually this is quite fruitful. I often get it to generate code, or to add behaviours to code I&amp;rsquo;ve given it which I then transfer over manually. If it gets into a muddle, I usually clear it&amp;rsquo;s memory and start a new chat or move over to a different service. Having the wrong ideas or code in the context seems to lead to a chain of stupider and stupider attempts to fix the symptoms of a problem rather than going back and identifying it. It&amp;rsquo;s possible that my fresh explanation of what I&amp;rsquo;m trying to do, the code I&amp;rsquo;ve got and what the issue is is also helpful in this restart.&lt;/p&gt;
&lt;h3 id="how-its-changed-my-style"&gt;How it&amp;rsquo;s changed my style&lt;/h3&gt;
&lt;p&gt;With any tool, using it well involves understanding it&amp;rsquo;s strengths and leaning into them. AI is no different, and here&amp;rsquo;s the things I do to help it help me, or things that it&amp;rsquo;s made possible.&lt;/p&gt;
&lt;p&gt;The first change has just been to improve my craft in ways I should have been otherwise, but as a solo developer you can let slide. This is stuff like clear comments, thoughtful descriptive names, and good separation of ideas. This helps the AI as much as it would help someone reviewing your code, or future you when you come back to maintain it. I like my files to be smaller than I used to. 500 lines is a guideline for me.&lt;/p&gt;
&lt;p&gt;I already liked old and popular tech before, but now I really like it. Think of the difference of the training corpus for Node/Express vs the latest iteration of SveltKit V2. You just get better answers and suggestions for things the AI knows better.&lt;/p&gt;
&lt;p&gt;The last change is that I&amp;rsquo;m much more likely to change to an appropriate library or technology. The annoying friction of not knowing the exact syntax for things disappears since the AI can generate code with correct syntax for me. It makes my programming skills much more portable. Of course you need to invest in some of the high level understandings to know what you should want to do, but once you know that, you don&amp;rsquo;t need to know what to type to achieve that in the way you did a couple of years ago.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m sure I should know better how to regex, and to remember the common ffmpeg or rsync flags, but I&amp;rsquo;m never going back to spend time on those jobs!&lt;/p&gt;</description></item><item><title>Using LLMs for coding</title><link>https://blog.iankulin.com/using-llms-for-coding/</link><pubDate>Mon, 01 Jul 2024 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/using-llms-for-coding/</guid><description>&lt;p&gt;&lt;a href="https://madmuseum.org/events/ghost-shell"&gt;&lt;img src="https://blog.iankulin.com/images/ghost-in-the-shell_07.jpg" alt="Ghost in the Shell
© Manga Entertainment 1996
"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This post looks at the context for some of my thinking about AI for supporting software development, and where I&amp;rsquo;ve landed on it for the time being.&lt;/p&gt;
&lt;h3 id="the-landscape"&gt;The landscape&lt;/h3&gt;
&lt;p&gt;I &lt;a href="https://blog.iankulin.com/chatgpts-code-writing/"&gt;briefly wrote about ChatGPT&amp;rsquo;s&lt;/a&gt; coding ability at the end of 2022. The wide availability of this tool marked the beginning of what I think can fairly be described as a revolution. The controversies that have crystalised since have not dampened my amazement of this step forward in what compute can do, especially around natural language processing.&lt;/p&gt;
&lt;p&gt;The next big news in this story was Microsoft&amp;rsquo;s launch of Github Copilot. In business terms this was a brilliant move - owning the most popular code editor, and leveraging the world&amp;rsquo;s biggest collection of public code to create a product that &lt;a href="https://visualstudiomagazine.com/Articles/2024/02/05/copilot-numbers.aspx"&gt;millions of people&lt;/a&gt; are prepared to pay $10 a month for can only be regarded as a success.&lt;/p&gt;
&lt;p&gt;At the same time as Microsoft established a new revenue stream, LLMs have been an exciting area of open source growth, especially the excellent Python libraries and the tools in the LangChain ecosystem.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not all rainbows and unicorns though - there&amp;rsquo;s a few valid points that AI skeptics have coalesced around.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Training data - although this is a bigger issue for general models (where masses of web content has been vacuumed up) than it is for code, it is still an issue. If a model is trained on some non-permissively licensed code, and the generative AI I&amp;rsquo;m using includes that code in a commit, then a license, or at least some ethics have been breached.&lt;/li&gt;
&lt;li&gt;Quality (1) - You can see from the feature images in many of the posts in this blog during my MidJourney enthusiasm that generative AI is not perfect. Before I abandoned them I started to prefer the mangled writing and fingers of the engines, but no one wants the software equivalent of mangled fingers in their codebases. I suspect this particular aspect of the quality of the code will probably have a technological solution - we&amp;rsquo;re in the very early days after all.&lt;/li&gt;
&lt;li&gt;Quality (2) - A trickier quality problem is people writing code using AI where they do not fully understand the code they are committing. I imagine this is going to be a growing issue for projects, especially anything with a profit motive such as bug bonuses. Projects have mechanisms like code reviews and pull requests, but if submissions can be low-effort and checking them is high-effort, that asymmetry is going to be painful.&lt;/li&gt;
&lt;li&gt;Poisoned well - As the amount of AI code in codebases increases, then AI is trained on those codebases this will quickly become a snake eating it&amp;rsquo;s tail as AI is training itself on it&amp;rsquo;s own code. If allowed, this would tend to slowly evolve future codebases to use techniques favoured by early coding LLMs. The current amount of machine influenced code on &lt;a href="https://decrypt.co/147191/no-human-programmers-five-years-ai-stability-ceo"&gt;GitHub is definitely not 41%&lt;/a&gt; but it must be some, and is likely to increase, so this is a factor that will need some thought.&lt;/li&gt;
&lt;li&gt;Exfiltrating code - if you use an external LLM, such as GitHub Copilot to write commercial code, who can see your code? Since it&amp;rsquo;s being transmitted to the AI in order to make autocomplete suggestions, the answer is Microsoft, or some other company. How does that intersect with your company&amp;rsquo;s policies? I assume, based on the questions I&amp;rsquo;ve asked Copilot over the last year, that I&amp;rsquo;d never be considered for a coding job at Microsoft :-)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="i-for-one-welcome-our-new-robot-overlords"&gt;I, for one, welcome our new robot overlords&lt;/h3&gt;
&lt;img src="https://blog.iankulin.com/images/hailants-1.jpg" width="512" alt=""&gt;
&lt;p&gt;In an industry particularly known for excessive hype-cycles, it&amp;rsquo;s important to critically examine what we&amp;rsquo;re doing, but for the moment, I&amp;rsquo;ve landed on the position that these are good tools for me to use. Here&amp;rsquo;s my thinking.&lt;/p&gt;
&lt;p&gt;My situation is that I&amp;rsquo;m a very experienced developer, with solid expertise in several languages and programing paradigms, and with a degree that was strong in looking at the meta level of languages and software development processes, but, I&amp;rsquo;ve got no professional experience in modern languages. Because of this, a lot of my process has been knowing what I wanted to do, using google or stack overflow to figure out the mechanics of that in whatever language I&amp;rsquo;m using, then translating that into the context of the code I&amp;rsquo;m working on. Generative AI fits extremely well into that need - instead of jumping into a browser window to look something up, I&amp;rsquo;m just writing a descriptive comment of my intentions, then tabbing through the suggestions to chose an approach.&lt;/p&gt;
&lt;p&gt;My particular style is also well suited to these tools - I like clear, simple to reason about code. If I can write a pure function for something, I do. I like to break my code up into separated concerns with clear interfaces, I don&amp;rsquo;t prematurely optimise. I use descriptive variable, function and object names. I like to work with established, well documented languages and popular libraries, and I prefer to reduce external dependencies. All of these habits make it easier for an AI assistant to access the context of what I&amp;rsquo;m doing, and therefore to make better quality suggestions.&lt;/p&gt;
&lt;h3 id="my-journey"&gt;My journey&lt;/h3&gt;
&lt;p&gt;I started out using ChatGPT 3 then 3.5 as a sort of super-google/stack-overflow eliminator.&lt;/p&gt;
&lt;p&gt;Then with the public launch of &lt;a href="https://github.com/features/copilot"&gt;GitHub Copilot&lt;/a&gt;, I trialed that in VSCode and it was a great experience. I guess they didn&amp;rsquo;t invent the idea for the greyed out auto-complete suggestion you can tab to accept, but it feels like a natural way to work with this stuff.&lt;/p&gt;
&lt;p&gt;I paid for Copilot for a couple of months. But then heard about &lt;a href="https://codeium.com/"&gt;Codium&lt;/a&gt;, probably on &lt;a href="https://syntax.fm/show/728/ai-superpowers-with-kevin-hou-and-codeium"&gt;Syntax&lt;/a&gt;, which is free for individual developers (for now - thank you VC funding). I haven&amp;rsquo;t done any careful comparisons, but its definitely of the same order. I suspect Copilot is doing something better with the local context. For example I use a plain text accounting system called &lt;a href="https://beancount.github.io/docs/beancount_language_syntax.html#transactions"&gt;Bean Count&lt;/a&gt; in VSCode. Copilot is able to understand these transactions and make much useful suggestions than Codium. I assume this is just inferred from my local files since there would not be much training data for them, and it suggests the correct accounts based on the payees which must be from local context.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve probably done more work with Codium, 80% of it on Javascript, than with Copilot. It&amp;rsquo;s definitely a workable solution and a great choice if you want a Copilot type experience without paying for it, or have questions about Microsoft&amp;rsquo;s training data.&lt;/p&gt;
&lt;p&gt;More recently I&amp;rsquo;ve started playing with local models to avoid the problem of exfiltrating my code - I strongly feel I can&amp;rsquo;t use AI assisted coding with client code if I don&amp;rsquo;t know what&amp;rsquo;s happening it. If I can run a local model, that problem is avoided.&lt;/p&gt;
&lt;p&gt;I code on an early M1 MacBook, so &lt;a href="https://ollama.com/"&gt;Ollama&lt;/a&gt; is an easy to use choice. I&amp;rsquo;ve tried &lt;a href="https://ai.meta.com/blog/meta-llama-3/"&gt;llama3&lt;/a&gt; and &lt;a href="https://qwenlm.github.io/blog/codeqwen1.5/"&gt;codeqwen1.5&lt;/a&gt; in the terminal for a bit, but missed the ChatGPT web experience. To get that back, I&amp;rsquo;ve been running &lt;a href="https://openwebui.com/"&gt;Open WebUI&lt;/a&gt; in a docker container.&lt;/p&gt;
&lt;p&gt;More recently, I&amp;rsquo;ve installed the &lt;a href="https://docs.continue.dev/intro"&gt;Continue&lt;/a&gt; VSCode extension that allows those Ollama managed models to work in VSCode, including the auto-suggestions (following &lt;a href="https://www.davegray.codes/posts/bye-copilot-how-to-create-a-local-ai-coding-assistant-for-free"&gt;Dave Gray&amp;rsquo;s blog post&lt;/a&gt;). I&amp;rsquo;ve got a few long flights coming up over the next week, so it will be good to be able to work offline with that help.&lt;/p&gt;
&lt;p&gt;I haven&amp;rsquo;t really done more than play with CodeQwen in VSCode via Continue so far, but my initial impression is that it&amp;rsquo;s comparable to Copilot, although the extra second of waiting for auto-suggestions did make me look up M3max MacBook pricing. Logic tells you that a 4GB model on a MacBook is going to be less capable than the giant GPT4 powered Copilot, but &lt;a href="https://qwenlm.github.io/blog/codeqwen1.5/"&gt;this comparison&lt;/a&gt; suggests the difference is not an order of magnitude (although the model size is). From limited playing around in small JavaScript codebases, they seem similar, with the local model just being a bit slower.&lt;/p&gt;
&lt;p&gt;If this is a revolution, it&amp;rsquo;s one we&amp;rsquo;re at the start of, and I certainly reserve the right to change my mind about AI assistance in coding, but I suspect it&amp;rsquo;s our future and I&amp;rsquo;m excited at the productivity boost it currently gives me working in languages I&amp;rsquo;m new to.&lt;/p&gt;</description></item></channel></rss>