Lessons learned from porting Lucene: Cheating…sort of

This Lucene port project of mine has been ongoing for quite some time. It begins, life intervenes, and then it resumes. I frequently found myself stuck at determining the appropriate level of abstraction between the Rust code and Java. However, I lacked the time to conduct numerous experiments with varying levels of abstraction. This is where Generative AI becomes an answer.

That said, I never appreciated “Vibe coding.” It felt like ad-hoc herding of cats. Recently, I discovered Spec Driven Development (SDD). With SDD, I can add additional guardrails that ensure greater consistency and compliance across prompts. I appreciate the prescriptive workflow introduced by tools like Github Spec Kit.

At work I really appreciate SDD since what SDD really does is bring the context typically in Jira, AHA, and other systems of record into the actual code. Systems of record change, get disconnected, or archived. One of the worst questions that can be escalated to one of my level 3 reports is “Why does this behavior work this way?” Now we are on a wild goose chase traversing Figma, Slack threads, and interviewing those involved in the code. With SDD I can just ask the code why a decision was made.

Now this could be considered cheating but I would argue writing code was never the job. Writing great software was the job and learning along the way.

So at work I use IBM Bob. I like Bob but decided not for this project. I also decided not to use Claude, Open AI, or any other model as a service provider. I wanted to run the entire model locally using an open source very clean model. While there are far better coding models out there I went with Granite. Majority of the coding models available right now have unverified data origin. I want to be able to model without an asterisks being added to my code. So strict, legally verified, and commercially safe training data is a priority.

Of course anyone who has used a small model before will know there are challenges. For starters you have a very small scope. You may be limited to porting a handful of classes at a time. Hallucinations are definitely a problem. The model also often forgets to use tools for writing files to disk.

The solution is double and triple check code manually and to think how your project will evolve over time. For instance initially I included guidance for JNI in the constitution. Suddenly I got JNI scope creep in all of my specs.

Considering all the overhead involved, it is worth asking if using Generative AI this way is the right thing to do? Is it really saving me time. The short answer is yes, but not as much as you might think, just enough.  I equate it to having an Intern. Very motivated and knowledgable but you often need to slow them down to ensure everything is done right and share context they otherwise don’t have.

Effective Interview Questions in the Time of ChatGPT

Every year or so I hire new members to my team. As a hiring manager, normally during the interview I don’t ask too many technical questions. That is usually for a follow-up technical interview. Still, I do want to know two things. Does the candidate show knowledge of what they put on their resume? How does the employee handle a technical question they don’t know the answer to? The 2nd part is frankly the more interesting question.

Does the candidate have a network of experts they can pull from? Do they know how to engage open source communities? Are they comfortable jumping into unfamiliar code to understand how it works? I want to hear war stories to better understand how they deal with ambiguity of something new. In the last few years especially from college hires I started getting “I would google it” as an answer. Now that isn’t a horrible answer but you can’t google everything. For instance, Internal projects/services/components will not be answerable via google. Also the answers you find might

This year, I have noticed an increasing number of references to using ChatGPT or Microsoft CoPilot. Often as the first reference used to a problem which has left me with mixed feelings. On one hand, these are wonderful tools. I use IBM watsonx Code Assistant (WCA) at work all the time. I encourage my entire team to use WCA. They should at least use it for generating comments for the code they have written.

Now It can’t be the only tool in your tool chest. It will not have all the answers. This is due to the same reasons I mentioned that Google will not have all the answers. Also some tools like Microsoft CoPilot are still in litigation on the legality of their product. This is fine for working on a school programming assignment but a significant risk to authoring commercial software.

In closing, the best thing for a candidate is to show a breadth of tools & resources to get the job done.