Code generation

Instant Jun

It’s possible to create artificial junior developer, but does it make any sence?

Artificial solution for artificial problem

Recruiring agencies and recruits stuck in the dillema:

  • Agencies tend to record as much recruis as possible, and ask them to compete for the job.
  • Recruits tend to apply to as much jobs as possible, and ask them to compete for the employee.

Yes, that problem can be easily avoided by “not doing that”, but here we are.

Recruiting agencies try to create at least some funnel for the flood of applications, preferably, automated. And now we have a lot of test systems which make no sence in terms of real IT tasks.

Because, in real life, coding is the tiniest part of software development. Biggest part is interaction with the customer: defining the task details, working with feedback, analysis of limitations etc.

But you are supposed to pass that useless tests anyway, just to reach someone compitent.

So, we have a task defined as a test case. Even more: we are absolutely sure that test is correct.

If the task can be defined as a test case - it can be solved automatically.

Developing tests and developing code is interchangable. We use both in Test Driven Development, because we might have an error in the test itself. We use code to check tests and tests to check the code. And push both parties forward in small steps.

But for recruiting tests thats not the case. We don’t care about bugs in recruiting tests. We can’t fix them anyway. However, that means we should be able to solve that tests automatically.

How?

So let’s check several approaches:

Bruteforce

We can just check all possible combinations of symbols, that will work, but it will take crazy amount of time. My solutions for tests like that are about 500 symbols in size, English alphabet + special symbols will be about 80 letters, so we have 80^500, combinations, thats approximately 3.5*10^931. Build and run tiny test program on my laptop will take about 0.5 second, so that’s not acceptable solution. If I will create a dictionary of words used in actual programs, that can be reduced to, like 10^200 seconds, but that’s too much anyway.

Algorithmic approach

We can reduce choises on each step of generations. For example, if we have { we have to have } later. Also, we can remove some operators like goto or else, as for we do not need them anyway. This way we will have a set of templates, which can be called recursively. That looks more promising, at least if we won’t need to take all possible libraries in consideration.

Neural net

Enter the elephant in the room: https://openai.com/blog/chatgpt/

We can use GAN + additional automated tests (buid + run + check if results match). In GAN we have descriminator, but it has to output “alikeness” of generated solution, which is float, actual tests will gave us boolean. So we need to learn AI by set of examples. Luckely, we have a lot of opensource code everywhere.

Should we?

We definitely can, but should we waste our time on that stupidity? Yes, we can create AI to pass every test that recruiting agency can imagine, and we will bypass all time limitations smoothly and all attempts to check that we are ‘real human beings’ including screen share and cameras etc etc. Because IT is our world, recruiters are aliens here.

But maybe we should teach them how to become native. How to rewiew the code. Learn them to look for methods, not instruments. Make the world better together. Nope, that wont work )