Saturday, September 10

Demystifying Code : Developer Tea

https://spec.fm/podcasts/developer-tea/38389

Book: letters on a page.
Those letters represent a story.

Code is very similar to this.
Code is like a book in a lot of ways.
Code should be considered a representation of ideas.

So how can you start demystifying code.

Three basic ideas for comprehending code, things you need to identify specifically to comprehend code:

1. Identify the writing style.
(4:00)
Code just like books has an author.
All code has been authored by someone, perhaps multiple people.
The style of code is influenced by a lot of things and you need to understand what style of code you are reading.

The style is influenced by:
- the language it is written in.
- the author.
- the job of the code.

paradigms: functional, object-oriented...
author: verbose (many comments / less comments)...

2. Identify the setting.

Where is this code being run?
server, client-browser, distributed...

Collaborating... ?

Is it a part of legacy code?

3. Identify the plot of the code.

Unlike most books, most code doesn't read top to bottom. Instead it's gonna read more like a choose your adventure novel.

What function starts the code?

Mostly, code has more than one entry and exit points.

What is the big idea the full story of this particular piece of code?

What is the starting point and the outcome?
Why does this code exist?
Do I have enough information to understand the big idea?

Once you understand the purpose for the code, you'll likely be able to identify the big plot points in the code you are working on.
database, user login, views.

No comments:

Post a Comment