General Discussions

Literate Programming

PH Bytes

If you really want to get the story of the code you write, follow literate programming for the initial few days. There is a high probability that you might continue once you are used to it which is obviously a very good programming practice.  Literate programming was introduced by Donald Knuth. His idea was to write a program as the thoughts flow.  However the syntax of the program hinders that thought process.

Knuth suggested writing the story of the code as the thoughts flow and embedding suitable code snippets in it. You get the whole program if you pull out only the source code from the story.  Let us see a simple example of how to do literate programming for adding two numbers in C programming language.

#+Title: Program to Add Two Integer Numbers
#+Author: Prakash B H
#+Email: prakash.hegade@gmail.com
#+Date: 31 May 2016

* Introduction
This document explains how…

View original post 331 more words

Advertisements

Let me Know What you Think!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s