CodeFaster

CodeFaster

Share this post

CodeFaster
CodeFaster
RLWs

RLWs

Tyler Adams's avatar
Tyler Adams
May 05, 2020
∙ Paid

Share this post

CodeFaster
CodeFaster
RLWs
7
Share

Code faster by writing your code as an RLW (an original acronym introduced in this piece that stands for Read, Logic, Write) using the RLW template. RLWs are faster to code than other code because they’re faster to test and less coupled. Faster testing means faster debugging which means faster coding. And less coupling means less communication which means faster coding.

Non-RLW

Consider the following code that’s not an RLW. It’s fast to write and well structured, although slow to unit test and debug. It’s short, 38 lines, and solves a simple algorithmic programming problem from my apprentice Chris Liu.

#!/usr/bin/env python3

import sys

def is_s_int(s):
    try:
        int(s)
        return True
    except ValueError:
        return False

def main():
    t = int(sys.stdin.readline())
    for i in range(t):
        n = int(sys.stdin.readline())
        current_answer = ord(sys.stdin.readline()[0])
        for j in range(n-1):
            relative_position = sys.stdin.readline().strip()…

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Tyler Adams
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share