Re: On Complex Source Code Reading Strategy

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Zeray Kalayu *EXTERN*'" <tiggreen87(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: On Complex Source Code Reading Strategy
Date: 2017-07-26 07:46:36
Message-ID: A737B7A37273E048B164557ADEF4A58B60D61EAB@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeray Kalayu wrote:
> I want to be PG hacker but it seems a complex beast to find my way out in it.
> So, can anyone suggest me from his experience/style the general
> approaches/techniques/strategies on how to read complex source code in
> general and PG in particular effectively.
>
> Can you remember your being novice to PostgreSQL hacking and write
> your experience/style to me and probably to other novices as well.
>
> There are some guidelines in PG wiki but they are far from the truth
> of down the rabbit hole.
>
> I believe that there is plethora of knowledge and skill sets in the PG
> hackers head not to be found in any kind of written material and thus,
> that It would be great if any PG hacker could write his
> experience/style of PG hacking so that is of useful asset for PG
> hacking beginners.

I'm not the most competent hacker around, but maybe that qualifies
me to answer your question :^)

I assume that you have read the documentation and know your
way around PostgreSQL.

Find something that you need and want to work on - maybe some
shortcoming or missing feature of PostgreSQL. The TODO list
(https://wiki.postgresql.org/wiki/Todo) may give some inspiration,
but be cautioned that it contains mostly things that nobody
could reach consensus on or implement easily.

Best is to work on something that serves your own need.
You don't have to work on core PostgreSQL, it could also be a
server extension.

If you have some project, you have an angle from which to tackle
the large body of code that PostgreSQL is.
As always, start with a design. Ask the list before you start coding.

Another good and commendable path into the source is to review
patches (https://wiki.postgresql.org/wiki/Reviewing_a_Patch)
This is higly appreciated, because there is always a shortage of
reviewers, and you get to see how other people go about changing the code.
There is a lot to learn this way!

You will find that the PostgreSQL source is mostly well written,
well documented and well structured.

Yours,
Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-07-26 07:58:08 map_partition_varattnos() and whole-row vars
Previous Message Zeray Kalayu 2017-07-26 06:54:53 On Complex Source Code Reading Strategy