update codebase add(@new_code) where @condition
Automatically updating your codebase, by creating processes, that inspects and reflects upon your code, and is intelligently able to understand its semantics, for then to patch your codebase
Join the DZone community and get the full member experience.Join For Free
Imagine if you had something like jQuery, except that it wouldn't react upon HTML DOM nodes, but rather your code. You could do things such as the following illustrates.
Something like this would be able to inspect your codebase, reflect upon it, and potentially patch and change millions of lines of code, on the fly, in a production environment - Literally with ZERO RISK to your production environment. Sounds like a fairy tale ...?
Well, actually you can, but only if you are using the right programming language. Inspecting code, and reflecting upon code, is possible in most programming languages. .Net for instance has Reflection - But the capacities in these regards of Hyperlambda, will dwarf any amount of code reflection capabilities you have ever seen in your life before. Watch the following video to understand what I mean.
Basically, what I am doing in this video, is more or less the jQuery pseudo code I started out with - Allowing me to automate the process of patching my code - Which of course again lends itself to further automation, allowing at least in theory, one single developer, to juggle millions of servers, with millions of lines of code, in a heterogenous codebase - And still be able to securely patch the codebase, without much risk of breaking something somewhere.
The endpoints I creates in the above video contains somewhere between 10 and 50 lines of code - Still they're able to intelligently and securely inspect my entire codebase, given conditions, and some piece of new code - For then to append that code into my existing codebase, if the code meets the conditions I am supplying - And it does it with zero risk - In a live production environment, patching them all literally in seconds. This is only possible because of that every single line of code in Hyperlambda, implicitly contains meta data about exactly what it does. Which again allows my computer to understand its own code, and inspect it, and reflect upon what it does. Try doing the same in C# ... ;)
You can find the code I am using in the above video here.
Opinions expressed by DZone contributors are their own.