Turning one developer into a hundred developers with the Parrot Coder

TL;DR

www.parrot-coder.com

The Problem

As an entrepreneur with no capital, I’ve become accustomed to working on my own. This is especially true when it comes to software development. While a company can afford to have many people attacking pieces of a problem, as a solo developer you have to take on the whole thing yourself.

With big projects this difference is really felt. Even for something as innocuous as icons, it will become apparent very quickly why in some companies there’s one person just to pick icons… and another just to pick colours!

But for me the biggest problem by far is refactoring code! And at the core of this problem is the sheer number of keystrokes and mouse clicks involved in making changes to a large code base.

Let me demonstrate with an example.

Imagine we’re creating a game with hundreds of characters. And let’s assume there’s shared code that handles everything to do with characters in general (so it’s as D.R.Y. as possible), but then, let’s say, there are these character specific files that encapsulate the differences. Let’s call them CharacterAttributeFiles.

So you make your first character. Which comes with it’s own specific attributes:

This is written in Javascript but it works with any language as long as it’s text in a file. Also the code editor being used is VS Code but it will work with any code editor.

If you’re like me, when it comes time to making the next character you copy and paste this file, or maybe you make a snippet for a new CharacterAttributeFile, and then begin making the changes specific to this next character.

Or second character attributes.

Now let’s say you’re up to your 10th character and you find a problem with this default template you’ve been copying and pasting. Like you forgot to add a name field.

So now you have to propagate this change to 9 other files. Sure it doesn’t take too long and maybe there’s even a cheeky find and replace-all you can do… but then again maybe not. The worst case labour cost is you’ll have to go into 9 files and make the changes.

The problem then starts when you’re at your 100th character and you find one of these worst case scenario bugs. Because now you’re making changes to 99 other files!!!

Or let’s say you want to refactor your code and you decide you want to change the format of your data completely.

Something like this would take some time to propagate manually to 99 other files. Imagine you had a thousand characters!! This is when you start trying to create scripts to do it for you, paired with creative replace-all’s, whatever you can really to avoid the manual method.

And from then on every time you find one of these worst case scenario bugs, or you want to add in a new section to all of them, or you want to refactor the entire file, you’re going back and making changes to all these files again, and again, and again….

So now the problem becomes apparent. Basically, as the number of characters grows so too does the time cost of these revisions.

But here’s the thing…

MOST CODING, IS RE-CODING!!

So the cost of the revisions in terms of keystrokes and clicks increases dramatically the larger your project gets. Not to mention it’s this sort of “coding” where I usually go into auto-pilot mode and start making mistakes…

So what if there was a way to template your code such that as your code develops, so does your template. And then when changes are made, those changes, and only those changes, were instantly propagated to the rest of the code base where this template was being used, while also leaving any existing code untouched and in its correct place…

Introducing the Parrot Coder

So firstly the Parrot Coder is not a code editor. You still use your code editor of choice to develop, then you use the Parrot Coder to reflect those developments to the rest of your code base.

The Parrot Coder is a Dynamic Templating Engine for your code.

It allows you to build up templates dynamically.

The existing paradigm is to apply the template once and start coding… and then you’re on your own.

With the Parrot Coder, you still apply the template and start coding, but if you change the template later, you can re-apply it and the changes will propagate through your code base seamlessly.

This means you can create ever more accurate templates without the hassle of manually propagating changes to existing files.

This enables you to refactor more confidently, knowing the labour cost is going to be significantly reduced.

So now, as the number of characters grows, the time it takes to propagate changes doesn’t.

Creating Parrot File Blueprints

So let’s see how this happens. Firstly we turn this CharacterAttributeFile into a Parrot File Blueprint.

Markers are used wherever a value is going to be different. In the example above we see the Character’s Name has been turned into the marker:

{{{PVariableBlueprint|21}}}

This marker can be used anywhere in your template wherever the Character’s Name appears.

Markers will allow you to set a challenge question, examples and an explanation so you always know where you’re going. This makes bringing new developers onto a project much easier, because now they can just fill in a template which comes with its own guide.

In this next part we see there is a list. Here we can use a repeating section. And again we create Blueprint Variables to make it generic.

These repeating sections come with options to omit first and last separators, fixing things like dangling comma’s immediately. Also all sections allow you to remove line breaks at the end of code blocks which is great when you want something all on one line.

Creating Parrot Files

Once our File Blueprint is made we start generating Parrot Files. One for each file we want to put under this template’s management.

This is where we fill the specifics for each instance.

Adding Unique Sections

The Parrot Coder also lets you add unique sections to any specific file. Furthermore, you can do it with the certainty that if your base template changes these unique sections will still appear in their correct places. So if something doesn’t fit your template you’re covered.

Adding Answers

Adding answers to your template markers is super easy with the Parrot Coder. Just click on the answer button and fill it in. Easy.

Each answer also has an answer marker, so if your answer appears elsewhere just paste in the marker. And now if you change it anywhere it will change automatically everywhere!

Answers can also be multiline and nested.

In the example above we see the answer ‘JaneDaDestroyer’ in the first section, being used in the second section as a nested answer with the marker {{{PVariableAnswer|211|212}}}, and the whole answer in the second block being reproduced in the third block with the {{{PVariableAnswer|214|215}}} marker.

Not only that, but if you want to use an answer in a different case just apply an automatic case conversion. Allowing you to convert any answer.

With these tools something like a variable or object name change can be done in seconds changing everywhere and anywhere that it appears.

Exporting to actual code files

Finally, select the files you want to export to text and hit export. Super easy.

Changing your File Templates

So, to demonstrate the solution to our earlier problem of refactoring the code:

In the Parrot Coder you’d simply change the File Blueprint. This automatically updates all your Parrot Files. And since we haven’t added any new Variable Blueprints, all our Answers are set and ready for export. Then you select all files and export. Done!

EPILOGUE

If you often find yourself calculating how long it will take to do a certain refactor, then the Parrot Coder is for you. Because every time you decide a change will take too long and ditch the idea, your software loses something.

You can start using the Parrot Coder at any stage of your project. In some ways it works even better when you’re half way through because you’ll already have an idea of what templates you’ll need.

But you certainly don’t need templates to get started, because the entire point of the Parrot Coder is to allow you to create them as you go without doing the labour of propagating changes to your existing code base.

Make the changes you want. Let the Parrot Coder do the rest.

To get started on a free 10 day trial, go to www.parrot-coder.com and register.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SakoN

SakoN

Serial entrepreneur, activist and philosopher.