The Billionaire Gentleman Scholar

Table of Contents

Diogenes in His Barrel

I spent the past two weeks in one of the deepest rabbit holes I’ve ever fallen into.

I’ve been developing software, which is a ridiculous statement given that I’ve never properly learned computer programming and I have no idea how to build software.

You can probably guess where this is going.

I’ve been using AI to write code for me. The AI also tells me what to do with that code, step by step.

It really feels like one of the craziest changes that has ever occurred in my life working with words on a computer.

I’ve always wanted to build software, and I’ve always dabbled, but as a busy man with a different career, I’ve never really crossed the threshold. I never really acquired the power to build. The joy and exhilaration of speed-typing lines and lines of code, and the satisfaction of producing a useful, interesting, creative tool. And now, just all of a sudden, I can.

It’s not just that you can build software with English as your programming language, it’s that you can keep going—you can make consistent progress rapidly, getting more advanced as you go, and I have not yet found any ceiling.

You encounter problems and errors, but then you just zoom into them, have the AI solve them, and then you’re moving forward again. I know that skilled engineers possess reams of knowledge and ability I may never replicate with machine assistants—I make no such claims.

But I can tell you what I have seen. And I can tell you what I have learned so far.

Though I do not expect to build a billion-dollar empire of one-man software products myself, I suspect that someone will.

For every billionaire software developer, there will be hundreds or thousands of millionaire software developers.

And what’s most exciting to me is that I think we’ll see many millionaire software developers who never even learned to code (the old way). People like me—wordcels, scholars, tinkerers—will build whole portfolios of modest but valuable software products for hyper-niche use-cases.

In this post, I’ll tell you how I think about this.

And I will tell you how to get started.

At the bottom, I’ll include one detailed prompt for building your first web app and two of my best scripts for reading and writing tasks (entity-dense summarization of arbitrarily long texts, and turning your essays into subtle and tasteful tweets in your style).

English as a Programming Language: The Prose <> Code Flywheel

In a context of technological acceleration, it’s all about positive feedback loops.

If you can’t insert your creativity into some kind of positive feedback loop, you’re not going to make it through the next bottleneck.

So let’s talk about one specific feedback loop that is insanely exciting to me, and it’s immediately available right now.

It’s what I’ve been doing the past two weeks.

In fact, I almost don’t want to tell you about it.

I want to make more progress and tell you only after a few months, but who cares? It’s just too interesting not to share.

And I want you to do it, also. So we can compare notes and promote each others’ projects.

Writers should build software to make themselves better writers and more prolific publishers.

Then use AI to build niche software you can sell to your particular niche audience.

Because software is the highest-leverage form of monetization, any writer who succeeds on this path could very well jump way ahead of the others in terms of audience and profit.

The edge in publishing feeds the edge in monetization, and the profits are plowed back into the publishing system, and so on.

I’m not claiming I’ll be the first to crack this code. But I can try!

How to Build Software With Natural Language

I’ve built two fully-functioning web apps so far. One is deployed to the web, the other will be soon. They both do things, and they both can take payments that go into my bank account. Each one took about a week of focused effort. Crucially, the second is way better and more valuable than the first.

In this section, I will teach you how to build your first web app without knowing a thing about programming or software.

Start with the best currently available LLM: ChatGPT. Literally, just tell it what you want your app to do. Just say the functional requirements from the user’s perspective, let the LLM decide the technical approach. Add things like: “Tell me exactly what to do, and in what order.”

It will generally start with an outline of the tasks. Save that outline somewhere, then go back and ask it to explain, in detail, each particular item, one at a time. Say things like “Tell me the exact files to create and where to place them” and “Give me all of the exact code I need to put in this file.”

One tip: At the outset, tell ChatGPT that you want to build your app using Replit. Replit is just a web platform for developers, it abstracts out all of the most annoying technical stuff you’re most likely to get snagged on using your own computer. With Replit and ChatGPT, you could have a functioning minimal prototype in an hour or less. Make a free account on Replit and just do what the LLM says. When you’re done on Replit, though, you can just export the entire codebase of the app (including all the technical background stuff you outsourced to Replit).

At that point, just tell ChatGPT for guidance on how to deploy your app to the web. I recommend Render, which is like Heroku but cheaper. You can start with free (though the app will go down when it’s not being used). Or you can pay $7/mo to keep your app humming on the web full time.

That’s pretty much it. If you hit any snag, or GPT tells you to do something you don’t understand, just ask it to explain that thing. If the app in Replit gives you error, just copy and paste the full error into ChatGPT.

You will occasionally fall into a dead end. A local maximum where no amount of additional asking will clear the way forward. You’ll know you’ve hit a wall when your requests for help start cycling: Try A. You try A and report the error. Try B, it tells you. You try B and report the error. Try A, it says… Once this happens a few times, stop. Delete your recent changes and go back to the last working version of the app, and just try a different approach to whatever you were originally seeking. Ask for it differently, perhaps lightly nudging it away from the errors you got on the first approach. “Give me the code I need to accept a payment through Stripe, but I do not want a complicated checkout process. Give me the simplest possible way to do this.” That kind of thing.

Finally, you may need to consult the docs of the APIs you wish to use. If GPT does not know the API well, you can often copy and paste into GPT key parts of the API docs. “Here is what a correctly structured API call looks like,” or “Here is what the response will look like…” If you don’t know what an API is, ask it. You can also ask it to recommend APIs.

As I shared with you many weeks ago, the first not-completely-trivial app that I built exclusively with ChatGPT is an app that will print and mail a letter to anyone in the USA. I updated it this week, by the way. I overhauled the design, added mobile responsiveness, and included an image of what the printed letters look like.

A Revolutionary New Way to Communicate with Loved Ones

I’m not expecting my Electromagnetic Papyrograph to change the world or make much money, but it gave me all the proof I needed to keep tinkering.

Recursively Self-Improving Writers

Then, about two weeks ago, I had a real idea…

And now we’re getting closer to that feedback loop I was talking about before.

Over the past few months, I’ve developed several custom LLM prompts that are tailored to help me with various editorial tasks (I’ll also share some of these at the bottom of this post).

But I have a very strong opinion here…

A lot of people are thinking about AI very badly when it comes to the question of writing. A lot of people talk about these tools as if we’re going to have them think for us. Or as if they can be important sparring partners. You hear phrases like this a lot right now, “sparring partners.”

I don’t buy it.

At least not yet.

Currently, I would never let any of these tools anywhere near the task of creating, discovering, or even suggesting ideas to me. Who knows what dark forces you’re summoning!

My mind, my perspective, my education, my motivations, my dreams, and my values are all far more interesting and meaningful and powerful than anything these machines can generate out of thin air. At least for now, and I suspect for quite a long time.

The long term future is very hard to know, so I’m generally not interested in talking about that. I’m interested in the medium term and what can be done.

Now, today, what these tools can absolutely handle are the mechanical aspects of writing and publishing.

Spelling and grammar, for instance, is essentially the application of well defined algorithms.

Translating from one language to another is not as artistic as some people want you to think it is; it’s an algorithm.

Taking some unstructured observations and turning them into a logically sequenced format. That’s not creative or artistic either, it’s mechanical.

Turning an essay into a video outline, or lecture notes—mechanical. Speaking or lecturing, I would not outsource. But turning one format into another is mechanical.

These are all examples of the kind of work that you could train an 18-year-old intern to do for you, while keeping all of your published work 100% original, personal, and in your authentic voice. If your ideas are good and intelligent, the published items will be good and intelligent. If your ideas are bad and stupid, the published items will be bad and stupid. There is no cheating here on anything that matters.

That’s what the AIs are right now: Good, but not genius, 18-year-old interns who are willing to work day and night for an extremely small salary—around $20/mo, or maybe ~$100/mo if you’re doing this stuff every day with the API.

In a capitalist economy, if it’s possible and it produces an edge, someone will do it. Smart writers must learn how to use their new interns correctly—not too much, but also not too little. I think the correct heuristic is to offload as much of the mechanical labor as possible.

Following this heuristic to its limit, could I build a software system that handles all of the mechanical labors of a modern internet writer, in one organized set of pipelines? At the limit, all I would do is live, read, think, and write down the essential ideas, arguments, experiences, concepts, implications, and conclusions that I discover in my research and life—then everything else is lightly edited, chopped up, formatted, and delivered over multiple public channels. All executed automatically through a series of scripts and finely-optimized LLM calls.

Everything is 100% composed of what I input—my ideas, my words, my style— Nothing more than me, and nothing less than me. It’s only the non-human legwork that’s being radically streamlined.

I would never publish anything under my own name that is not, in fact, my work.

But this authenticity and fidelity is not necessarily anti-technological. It’s a matter of tasteful prompt-engineering. In other words, whereas unscrupulous copywriters might want LLM tools to churn out a thousand generic blog posts an hour, thoughtful writers will want LLM tools to not plagiarize and not add anything at all. This is what I’ve been playing with for months now: Designing prompts and pipelines of prompts that can change my own original ideas and text as little as possible, while executing the kind of valuable labor that writers have outsourced to editors and assistants for hundreds of years.

It’s also a matter of fine-tuning the models, which is something I haven’t played with yet. Though I do think that’s going to be an important part of the pipeline, which I’ll start testing soon.

But imagine this pipeline is completely built out. Assume it’s only half as good as I sketched it. Any writer who uses this pipeline is going to be able to publish much more, and much better, than those who don’t.

Then they’ll start using AI to build software tools that are custom fit to the needs of their audience.

By the way, whoever solves the application of AI to publishing efficiency can turn that into a paid software product in its own right. That’s actually what I’ve been working on specifically over the past couple weeks—my second piece of software. I’ve been obsessed, it’s the deepest rabbit hole I’ve fell into since I got into Urbit.

I actually right now have a working web app with login and authentication and a database and everything, where each page is one of my custom pipelines that I’ve built for editorial tasks. The outputs are much, much better than anything I’ve found anywhere else. Just because the quality of outputs is super domain-specific and requires a lot of tinkering for custom use-cases.

I want to make it better before I release it, but it works. I’m using it for real work every day.

Conclusion: The Billionaire Gentleman Scholar

Anyway, that is how you get to the billionaire gentleman scholar: One interesting, freethinking man builds an audience with their ideas, builds software products for their audience, and uses the money to scale more audience and more software. Eventually they build recursively self-improving software, which they are also selling as its own product. One man, a billion dollars. What do you think? Is it possible? I think we’ll see it within 20 years.

Again, I’m not saying it will be me. But you can bet I’m going to tinker in this direction!

I’m just reporting what I see, and I see this opportunity. Someone is going to figure it out, or multiple people are going to figure it out, and you’re gonna have weird individual thinkers and writers who are also building strange software systems and wiring these things up in bizarre ways that unlock explosive amounts of value at scale through different kinds of positive feedback loops like the ones I’ve sketched here.

It makes me think of the wild Victorian tinkerers, the men who would be up all night in their study working by oil lamps on some harebrained mechanical invention. And maybe .001% of them got rich. Except now, the new gentlemen scholars have incredible leverage, the leverage of global, instantaneous, free publishing and the leverage of AI-assisted software development.

I can’t wait to see how it develops, and I hope that you, too, will experiment with these opportunities.

For paying subscribers, below you will find a few highly effective prompts and one prompt pipeline (a Python script) that I’ve had the most success with.

One detailed prompt for starting the process of building your first web app. Starting with this prompt you could probably get a very simple concept up and running in one evening.

Summarize arbitrarily long texts (like books) into key points with high density (low fluff, high on names, facts, and entities). Most freely available summarizers tools are terrible and only work on short texts.

Turn any essay into subtle, thoughtful, understated tweets in the style of the essay author. Then use the tweets to compose a thoughtful, understated Twitter thread. Every tweet generation tool I’ve ever seen generates ridiculous crap because the average tweet, historically, is garbage.

Build Your First App

Enter this into ChatGPT. I would like to create a Python Flask app on Replit that uses the [INSERT NAME OF API HERE] API to let a user [INSERT WHAT THE APP DOES]. The app should have a front-end web page that has [INSERT WHAT THE APP SHOULD HAVE]. If there is any error then the app should throw an error, including the error output, so the user can see the error information. Be extra careful with your approach and choose an approach that has the highest likelihood of succeeding on the first try. Write the code so that it will be easy to troubleshoot if the app does not work on the first try. I will have you walk me through every step I should take with Replit, telling me exactly what files to create and the code I should put in them. Begin by giving me a detailed outline of the plan, including subpoints for every single task that I will need to accomplish.

Entity-Dense Summarization of Arbitrarily Long Texts

You must update: OPENAI_API_KEY and YOUR-INPUT-TEXT.txt. import json import requests import os from math import ceil

openai_key = “OPENAI_API_KEY” # Add your OpenAI key here

Read the text from input.txt

with open(“YOUR-INPUT-TEXT.txt”, “r”) as f: text = f.read()

summary = ” custom_pretext = “Article: {{” # Add your custom pretext here custom_posttext = """}} You will generate increasingly concise entity-dense summaries of the above article. Repeat the following 2 steps 5 times.

Step 1: Identify 1-3 informative entities (delimited) from the article which are missing from the previously generated summary. Step 2: Write a new denser summary of identical length which covers every entity and detail from the previous summary plus the missing entities.

A missing entity is

  • Relevant: to the main stories.
  • Specific: descriptive yet concise (5 words or fewer).
  • Novel: not in the previous summary.
  • Faithful: present in the article.
  • Anywhere: located in the article.

Guidelines:

  • The first summary should be long (4-5 sentences, ~80 words), yet highly non-specific, containing little information beyond the entities marked as missing. Use overly verbose language and fillers (e.g., “this article discusses”) to reach ~80 words.
  • Make every word count. Rewrite the previous summary to improve flow and make space for additional entities.
  • Make space with fusion, compression, and removal of uninformative phrases like “the article discusses”.
  • The summaries should become highly dense and concise, yet self-contained, e.g., easily understood without the article.
  • Missing entities can appear anywhere in the new summary.
  • Never drop entities from the previous summary. If space cannot be made, add fewer new entities.

Remember: Use the exact same number of words for each summary.

Reply with only the final, densest summary. Reply with only one summary. Do not mention other summaries or missing entities. """ chunk_size = 15000 overlap_size = 250

Calculate the number of iterations required

num_iterations = ceil(len(text) / (chunk_size - overlap_size))

…

for i in range(num_iterations): start_idx = i * (chunk_size - overlap_size) chunk = text[start_idx:start_idx + chunk_size] chunk_with_custom_text = custom_pretext + chunk + custom_posttext

Make the POST request to the OpenAI API

res = requests.post( ‘https://api.openai.com/v1/chat/completions’, headers={ ‘Content-Type’: ‘application/json’, ‘Authorization’: f’Bearer {openai_key}’ }, json={ ‘model’: ‘gpt-4’, ‘messages’: [ { ‘role’: ‘system’, ‘content’: ‘You are a helpful assistant.’ }, { ‘role’: ‘user’, ‘content’: chunk_with_custom_text } ], ‘max_tokens’: 300, ‘temperature’: 0.5 } )

Append the result of the API call to the summary

summary += ’ ’ + json.loads(res.text)[‘choices’][0][‘message’][‘content’].strip()

Write the summary to output.txt

with open(“output.txt”, “w”) as f: f.write(summary.strip())

Generate Subtle Tweets From an Essay in the Style of the Author

This script will take your essay text, extract key points, and use function-calling to create a subtle thread composed of your ideas. It works and it’s damn better than any tweet generator I’ve ever seen yet, personally, but it could be improved and refined in many ways.

You must update: OPENAI_API_KEY and YOUR-INPUT-TEXT.txt. import os import openai import requests import re import json

Load API key from .env file

openai.api_key = ‘YOUR_OPENAI_API_KEY’

def remove_hashtags_from_list(text_list): return [re.sub(r’#\w+’, ”, text) for text in text_list]

def generate_tweets(article_content): completion = openai.Completion.create( model=“gpt-3.5-turbo-instruct”, prompt=f”You recently graduated with an English degree from Harvard and now I’ve hired you as a writer.
I will give you an essay that you wrote, and you will write 15 tweets from it, according to 15 templates I will give you.
If you write anything corny, clichĂŠ, unthoughtful, pretentious, vulgar, crass, or strident, your career will be over.
Write the tweets in the same style and tone as the essay.
Write all tweets in the first person voice (for example, ‘I think’) because you wrote the essay.
Do not refer to ‘the essay’ or ‘the article’ or ‘the author’.
Do not use any hashtags or emoji under any circumstances, or you will be fired.
Here is the essay: {article_content}
Here are the templates:\

  • I just published a post on $MainTopic1, $MainTopic2, and $MainTopic3\
  • Summarize the main point of the essay.\
  • Extract a quote that best approximates the main idea of the essay.\
  • Paraphrase the Key Quote Tweet without using quotes.\
  • Extract a quote that represents the most surprising claim in the essay.\
  • Extract as a quote a whole paragraph that captures the essay’s best moment.\
  • Paraphrase the most surprising claim in the essay.\
  • Pose three question that the essay raises but may not fully answer.\
  • Highlight any statistic or data point from the essay. If there is none, ignore this and don’t tell me about it.\
  • Make a point, suggested by the essay, which goes against conventional wisdom.\
  • Make a light-hearted or humorous comment related to the essay in all lowercase.\
  • Ask for readers’ opinions or experiences related to one of the essay’s topics.\
  • Summarize a claim from the essay that is likely to spark debate or outrage.\
  • Create a poll related to a contentious issue raised by the essay.\
  • Write the most insane and outrageous declaration you can think of, based on the essay.

    Format your reply as a list of 15.” , max_tokens=1000, temperature=.25 ) tweets = completion.choices[0].text.strip().split(‘\n’) return tweets

thread_custom_functions = [ { ‘name’: ‘extract_main_topic_and_key_ideas’, ‘description’: ‘extract main topic and key ideas’, ‘parameters’: { ‘type’: ‘object’, ‘properties’: { ‘MainIdea’: { ‘type’: ‘string’, ‘description’: ‘Main idea of the thread’ }, ‘KeyIdea1’: { ‘type’: ‘string’, ‘description’: ‘First key idea of the thread.’ }, ‘KeyIdea2’: { ‘type’: ‘string’, ‘description’: ‘Second key idea of the thread.’ }, ‘KeyIdea3’: { ‘type’: ‘string’, ‘description’: ‘Third key idea of the thread.’ } } } }

def extract_ideas(tweets): response = openai.ChatCompletion.create( model=“gpt-4”, messages=[ { ‘role’: ‘system’, ‘content’: ‘You are a helpful assistant that extracts ideas from text.’ }, { ‘role’: ‘user’, ‘content’: f’{tweets}’ } ], max_tokens=300, temperature=.25, functions = thread_custom_functions, function_call = ‘auto’ )

ideas = json.loads(response[‘choices’][0][‘message’][‘function_call’][‘arguments’]) return ideas

def hook_tweet(ideas): """Insert the ideas into a hook tweet"""

return ( f”I’m interested in {ideas[‘MainIdea’][0].lower() + ideas[‘MainIdea’][1:]}\n” f”\n” f”- {ideas[‘KeyIdea1’]}\n” f”- {ideas[‘KeyIdea2’]}\n” f”- {ideas[‘KeyIdea3’]}” )

def generate_thread_with_hook(tweets): """Generate a Twitter thread with a hook tweet"""

hook = hook_tweet(extract_ideas(tweets))

Call OpenAI API to generate a Twitter thread

response = openai.ChatCompletion.create( model=“gpt-4”, messages=[ { ‘role’: ‘system’, ‘content’: ‘You are a helpful assistant that generates Twitter threads. ’ }, { ‘role’: ‘user’, ‘content’: f’Your job is to write a Twitter thread with the following information: """{tweets}"""\n Your thread must start with this tweet verbatim:\n {hook} 1/\n’ } ], max_tokens=300, temperature=.15 )

thread = response[‘choices’][0][‘message’][‘content’].split(‘\n’) return thread

if name == “main”:

Read the content from ‘text.txt’

with open(‘YOUR-INPUT-TEXT.txt’, ‘r’) as f: article_content = f.read()

Generate tweets and remove hashtags

tweets = generate_tweets(article_content) tweets = remove_hashtags_from_list(tweets)

Extract ideas and generate hook

ideas = extract_ideas(tweets) hook = hook_tweet(ideas)

Generate thread with hook

thread = generate_thread_with_hook(tweets) thread = remove_hashtags_from_list(thread)

Write the generated tweets, thread, hook and extracted ideas to ‘output.txt’

tweets_str = “\n”.join(tweets) thread_str = “\n”.join(thread) ideas_str = json.dumps(ideas, indent=4)

output_str = f”Tweets:\n{tweets_str}\n\nThread:\n{thread_str}\n\nHook:\n{hook}\n\nExtracted Ideas:\n{ideas_str}”

with open(‘output.txt’, ‘w’) as f: f.write(output_str)