Knowledgebase

Reading Code in an Unfamiliar Language Print

  • programminglanguages, programming, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Understanding what you did not write.

WHY IT MATTERS

You will inherit code in languages you do not know.

WHAT TO ESTABLISH FIRST

What the program is for Where execution begins How it is built and run

WHAT TO LOOK FOR

The structure: how files and directories are organised

Dependencies declared Configuration Tests, which document intended behaviour

WHY TESTS FIRST

They show what the code is supposed to do, in examples.

WHAT TO TRACE

One path through the program, from entry to output.

WHY ONE PATH

It teaches more than reading everything superficially.

WHAT TO IGNORE INITIALLY

Syntax you do not recognise, if the intent is clear from context.

WHAT TO LOOK UP

Constructs appearing repeatedly.

WHAT TO USE

An editor with navigation, so you can follow definitions.

WHAT TO DO BEFORE CHANGING ANYTHING

Get it running Get its tests passing Make a trivial change and observe the effect

WHAT TO RECORD

Notes of what you learn, since you will need them again.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot