Into The Fray; Or, Code Generation And The Search For Motivation To Learn Programming

Sunday • July 10th 2022 • 5:48:27 pm

Into The Fray; Or, Code Generation And The Search For Motivation To Learn Programming

Sunday • July 10th 2022 • 5:48:27 pm

It is hard to make money from programming all by yourself,
because the products you compete against are made by multiple people.

I suspect most times, you are up against a startup that didn’t take off,
so there is four people with nothing to do.

Only the huge startups that require money to stay afloat shut down,
the small clever ones transform and evolve.

Here, they will see that they have failed, and look at the good decisions they made,
things they bought that really worked for them despite their failure.

And it will just make sense,
to start producing those things for other startups.

Here failure makes them strong, and mature,
it gives them powerful optics, clear vision.

And by contrast, as fancy as their original idea was,
it now becomes a bitter sweet embarrassment.

Usually the lesson they take away,
is do one thing well, and make sure customers are already waiting and willing to pay.

In other words, they begin fixing problems,
that people have, and are ready to pay for.

Sometimes programmers will hire other programmers,
especially if they are in country with a weak economy where code costs less per line.

As ordinary as a group of friends,
making a startup is.

The lone programmer,
is the opposite.

They are a force of chaotic good, perfectly impenetrable genius,
and a Niagara fall of raw and unrefined creativity, unleashed.

But by far, the most intimidating side of their personality,
is a sense of humor, that has ages ago surpassed anything and everything.

The fuel behind their power, is the time,
their company pays for.

A proper corporate programmer, works less than an hour a month,
and it is considered a total failure to do any work at all.

Contrary to the stories, they don’t surf the internet,
that’s what news people writing these articles do.

They build, they program, they invent, they solve impossible challenges,
they refine their skills, and they become a silent and invisible force of nature.

Thousands of their computer programs are scattered across multiple accounts,
most of which they no longer care about.

And although the code is hard to read,
and may mix tabs and spaces, it is as genius an anything by world renowned scientists.

They just don’t give a s*it about rewards,
they like the challenge it self.

You will find it difficult, though not impossible to compete against them,
usually though, you just send them a cake, as a sign of respect and recognition.

This is where you start,
among the Great Hackers.

Programmers so capable,
that they first laugh at the word hacker, and then they reinvent it to adorn themselves with.

Your tools must be on point,
everything you do must be wise, and your choices, impressive.

The path ahead of you if nothing short of enlightenment it self,
so it is hard to make mistakes here.

Simply choose the greatest challenges,
and let them grant you powers to smash the ones that you once thought impossible.

Choose the most popular programming language,
that will not slow you down with data types and memory management.

Today and for foreseeable future that language is JavaScript,
it is often made fun of by people who chose the wrong languages to learn.

Choose the hardest challenge,
that is well within your grasp, and goes in harmony with your programming language.

Choose Code Generation as your mightiest challenge,
with friends or no friends.

Code generation is a great teacher,
and it holds the promise of helping you automatically generate products for sale.

The idea behind code generation is simple,
most of the code that is written is just fluff and boilerplate to glue all the pieces together.

With code generation you just focuses on the important parts,
leaving all the boilerplate to the generator.

Code generators use simple template engines,
I recommend using ejs as it allows you to use plain JavaScript to manipulate JavaScript.

There are advanced techniques such as parsing the JavaScript Abstract Syntax Tree,
but that introduces far too much complexity, for the results it brings.

Sweet.js is a nice example of interacting with the AST,
though it is somewhat off topic here.

As to what code to generate, at least at first,
website themes.

The advantage of using a code generator,
is that you should be able to easily update your code as the underlying libraries change.

At the very least, working on generating products, that are ready for sale,
is a great motivator for learning programming with JavaScript.