├── .cursorrules ├── .gitignore ├── LICENSE ├── README.md ├── app.py ├── assets ├── paul_graham.png ├── pg_banner.png └── tutorial.png ├── audio_cache ├── 06c7d83c87af6ebde5d01d67008f7dfe.wav ├── 0c8e8547c808686ace7e04a8858da3b6.wav ├── 0cf59056ceb422ae4fc0420020436dfa.wav ├── 0ea44e3886b9c2ea951eb9617dd28c3a.wav ├── 1912fe16d15d7a9a4ce0d022b3a6eaae.wav ├── 2de08675b0994df30511142f84fb6436.wav ├── 3187c9a8d838eff7fb486077ca0e9cb4.wav ├── 3cbd8013a459a953724ebc258d3d6897.wav ├── 3ce16a061f4637ff1d4f879dc0414de6.wav ├── 43aa7dc17b0f6a45fd730c82be417010.wav ├── 43f1ff906e6011bf2a8ce2e21edabd03.wav ├── 46b46eca6731b5e44573c5c1b92f9ffd.wav ├── 47e41011426e0c21f24550aa09d402a8.wav ├── 47ec650426fec0b53d322650583cf389.wav ├── 5598ba8733141cd78c7aaa2fc87d3f98.wav ├── 55c052a4262bebcabea603b76d2f1c86.wav ├── 59345c9cab2aff7c6d52d1ab599a30b1.wav ├── 5a534727fa7ec6a3684e3a28df4807e3.wav ├── 5a6be2c97141c51f088bc2e4324c6509.wav ├── 630112ddf739f66bab0bc244256d519a.wav ├── 64426303acfa676aa8a46ca4a32d1acd.wav ├── 644911722941c4dfdfd65759a739ac42.wav ├── 78f579c229f3966f664e37260f795550.wav ├── 84e1106561e5a3d0c4a3b5b8e28d8729.wav ├── a1fd2b16fd58e23968f73ac60aec7dbf.wav ├── a769629026cca1003079490e1e18e593.wav ├── aaac1851b307c9c1ecf450b0665440c8.wav ├── b096d3a9ed78ee2bbb90632f6cdd3766.wav ├── b2832fa35be237f8615acbeee2a88a58.wav ├── b3d0e7925c7ffad98ef57ff239329f7f.wav ├── c021bf4ecd4159f1ab21f8cb2eeb71ca.wav ├── c02ba92c9c60d4b38c73d84eaf1c44ad.wav ├── d0489760bf13effd9b5b6cad0723a005.wav ├── d4c7e53b885dfe61c34ce46f9526ded0.wav ├── e4708585916d085913965724edaef345.wav ├── e94b7641422991360a287c100963a146.wav └── f8825f6103b7992ac30c4c6f9272d682.wav ├── data ├── 1.txt ├── 10.txt ├── 100.txt ├── 101.txt ├── 102.txt ├── 103.txt ├── 104.txt ├── 105.txt ├── 106.txt ├── 107.txt ├── 108.txt ├── 109.txt ├── 11.txt ├── 110.txt ├── 111.txt ├── 112.txt ├── 113.txt ├── 114.txt ├── 115.txt ├── 116.txt ├── 117.txt ├── 118.txt ├── 119.txt ├── 12.txt ├── 120.txt ├── 121.txt ├── 122.txt ├── 123.txt ├── 124.txt ├── 125.txt ├── 126.txt ├── 127.txt ├── 128.txt ├── 129.txt ├── 13.txt ├── 130.txt ├── 131.txt ├── 132.txt ├── 133.txt ├── 134.txt ├── 135.txt ├── 136.txt ├── 137.txt ├── 138.txt ├── 139.txt ├── 14.txt ├── 140.txt ├── 141.txt ├── 142.txt ├── 143.txt ├── 144.txt ├── 145.txt ├── 146.txt ├── 147.txt ├── 148.txt ├── 149.txt ├── 15.txt ├── 150.txt ├── 151.txt ├── 152.txt ├── 153.txt ├── 154.txt ├── 155.txt ├── 156.txt ├── 157.txt ├── 158.txt ├── 159.txt ├── 16.txt ├── 160.txt ├── 161.txt ├── 162.txt ├── 163.txt ├── 164.txt ├── 165.txt ├── 166.txt ├── 167.txt ├── 168.txt ├── 169.txt ├── 17.txt ├── 170.txt ├── 171.txt ├── 172.txt ├── 173.txt ├── 174.txt ├── 175.txt ├── 176.txt ├── 177.txt ├── 178.txt ├── 179.txt ├── 18.txt ├── 180.txt ├── 181.txt ├── 182.txt ├── 183.txt ├── 184.txt ├── 185.txt ├── 186.txt ├── 187.txt ├── 188.txt ├── 189.txt ├── 19.txt ├── 190.txt ├── 191.txt ├── 192.txt ├── 193.txt ├── 194.txt ├── 195.txt ├── 196.txt ├── 197.txt ├── 198.txt ├── 199.txt ├── 2.txt ├── 20.txt ├── 200.txt ├── 201.txt ├── 202.txt ├── 203.txt ├── 204.txt ├── 205.txt ├── 206.txt ├── 207.txt ├── 208.txt ├── 209.txt ├── 21.txt ├── 210.txt ├── 211.txt ├── 212.txt ├── 213.txt ├── 214.txt ├── 215.txt ├── 216.txt ├── 217.txt ├── 218.txt ├── 219.txt ├── 22.txt ├── 220.txt ├── 221.txt ├── 222.txt ├── 223.txt ├── 224.txt ├── 225.txt ├── 226.txt ├── 227.txt ├── 228.txt ├── 229.txt ├── 23.txt ├── 230.txt ├── 231.txt ├── 232.txt ├── 233.txt ├── 234.txt ├── 235.txt ├── 236.txt ├── 237.txt ├── 238.txt ├── 239.txt ├── 24.txt ├── 240.txt ├── 241.txt ├── 242.txt ├── 243.txt ├── 244.txt ├── 245.txt ├── 246.txt ├── 247.txt ├── 248.txt ├── 249.txt ├── 25.txt ├── 250.txt ├── 251.txt ├── 252.txt ├── 253.txt ├── 254.txt ├── 255.txt ├── 256.txt ├── 257.txt ├── 258.txt ├── 259.txt ├── 26.txt ├── 260.txt ├── 261.txt ├── 262.txt ├── 263.txt ├── 264.txt ├── 265.txt ├── 266.txt ├── 267.txt ├── 268.txt ├── 269.txt ├── 27.txt ├── 270.txt ├── 271.txt ├── 272.txt ├── 273.txt ├── 274.txt ├── 275.txt ├── 276.txt ├── 277.txt ├── 278.txt ├── 279.txt ├── 28.txt ├── 280.txt ├── 281.txt ├── 282.txt ├── 283.txt ├── 284.txt ├── 285.txt ├── 286.txt ├── 287.txt ├── 288.txt ├── 289.txt ├── 29.txt ├── 290.txt ├── 291.txt ├── 292.txt ├── 293.txt ├── 294.txt ├── 295.txt ├── 296.txt ├── 297.txt ├── 298.txt ├── 299.txt ├── 3.txt ├── 30.txt ├── 300.txt ├── 301.txt ├── 302.txt ├── 303.txt ├── 304.txt ├── 305.txt ├── 306.txt ├── 307.txt ├── 308.txt ├── 309.txt ├── 31.txt ├── 310.txt ├── 311.txt ├── 312.txt ├── 313.txt ├── 314.txt ├── 315.txt ├── 316.txt ├── 317.txt ├── 318.txt ├── 319.txt ├── 32.txt ├── 320.txt ├── 321.txt ├── 322.txt ├── 323.txt ├── 324.txt ├── 325.txt ├── 326.txt ├── 327.txt ├── 328.txt ├── 329.txt ├── 33.txt ├── 330.txt ├── 331.txt ├── 332.txt ├── 333.txt ├── 334.txt ├── 335.txt ├── 336.txt ├── 337.txt ├── 338.txt ├── 339.txt ├── 34.txt ├── 340.txt ├── 341.txt ├── 342.txt ├── 343.txt ├── 344.txt ├── 345.txt ├── 346.txt ├── 347.txt ├── 348.txt ├── 349.txt ├── 35.txt ├── 350.txt ├── 351.txt ├── 352.txt ├── 353.txt ├── 354.txt ├── 36.txt ├── 37.txt ├── 38.txt ├── 39.txt ├── 4.txt ├── 40.txt ├── 41.txt ├── 42.txt ├── 43.txt ├── 44.txt ├── 45.txt ├── 46.txt ├── 47.txt ├── 48.txt ├── 49.txt ├── 5.txt ├── 50.txt ├── 51.txt ├── 52.txt ├── 53.txt ├── 54.txt ├── 55.txt ├── 56.txt ├── 57.txt ├── 58.txt ├── 59.txt ├── 6.txt ├── 60.txt ├── 61.txt ├── 62.txt ├── 63.txt ├── 64.txt ├── 65.txt ├── 66.txt ├── 67.txt ├── 68.txt ├── 69.txt ├── 7.txt ├── 70.txt ├── 71.txt ├── 72.txt ├── 73.txt ├── 74.txt ├── 75.txt ├── 76.txt ├── 77.txt ├── 78.txt ├── 79.txt ├── 8.txt ├── 80.txt ├── 81.txt ├── 82.txt ├── 83.txt ├── 84.txt ├── 85.txt ├── 86.txt ├── 87.txt ├── 88.txt ├── 89.txt ├── 9.txt ├── 90.txt ├── 91.txt ├── 92.txt ├── 93.txt ├── 94.txt ├── 95.txt ├── 96.txt ├── 97.txt ├── 98.txt └── 99.txt ├── docs └── design.md ├── flow.py ├── main.py ├── meta.csv ├── offline_processing.py ├── output ├── chunk_metadata.json └── essay_index.faiss ├── requirements.txt └── utils ├── __init__.py ├── audio_cache ├── 1a88396305914171cdc8363b0f5a7e85.wav ├── 44fa37880728388737edc075545ef9f5.wav └── d0504743ab8cf2c2757ed12ecc2c22ab.wav ├── call_llm.py ├── data_loader.py ├── embedding.py ├── text_chunker.py ├── text_to_speech.py └── vector_search.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules/ 3 | vendor/ 4 | .pnp/ 5 | .pnp.js 6 | 7 | # Build outputs 8 | dist/ 9 | build/ 10 | out/ 11 | *.pyc 12 | __pycache__/ 13 | 14 | # Environment files 15 | .env 16 | .env.local 17 | .env.*.local 18 | .env.development 19 | .env.test 20 | .env.production 21 | 22 | # IDE - VSCode 23 | .vscode/* 24 | !.vscode/settings.json 25 | !.vscode/tasks.json 26 | !.vscode/launch.json 27 | !.vscode/extensions.json 28 | 29 | # IDE - JetBrains 30 | .idea/ 31 | *.iml 32 | *.iws 33 | *.ipr 34 | 35 | # IDE - Eclipse 36 | .project 37 | .classpath 38 | .settings/ 39 | 40 | # Logs 41 | logs/ 42 | *.log 43 | npm-debug.log* 44 | yarn-debug.log* 45 | yarn-error.log* 46 | 47 | # Operating System 48 | .DS_Store 49 | Thumbs.db 50 | *.swp 51 | *.swo 52 | 53 | # Testing 54 | coverage/ 55 | .nyc_output/ 56 | 57 | # Temporary files 58 | *.tmp 59 | *.temp 60 | .cache/ 61 | 62 | # Compiled files 63 | *.com 64 | *.class 65 | *.dll 66 | *.exe 67 | *.o 68 | *.so 69 | 70 | # Package files 71 | *.7z 72 | *.dmg 73 | *.gz 74 | *.iso 75 | *.jar 76 | *.rar 77 | *.tar 78 | *.zip 79 | 80 | # Database 81 | *.sqlite 82 | *.sqlite3 83 | *.db 84 | 85 | # Optional npm cache directory 86 | .npm 87 | 88 | # Optional eslint cache 89 | .eslintcache 90 | 91 | # Optional REPL history 92 | .node_repl_history -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Zachary Huang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Ask AI Paul Graham

2 | 3 | ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg) 4 | 5 | Didn't get into YC? Don't worry—now you can ask AI Paul Graham for personalized startup advice. Paul will be there whenever you need him. 6 | 7 |
8 |
9 | 10 | IMAGE ALT TEXT 11 | 12 |
13 |
14 | 15 | - 🔥🔥🔥 [Try Live Demo](https://pocket-pg-851564657364.us-east1.run.app/) 16 | 17 | - Design Doc: [docs/design.md](docs/design.md), Flow Source Code: [flow.py](flow.py) 18 | 19 | ## I built this in just an hour, with this framework... 20 | 21 | - The secret weapon is [Pocket Flow](https://github.com/The-Pocket/PocketFlow), a 100-line LLM framework that lets LLM Agents (e.g., Cursor AI) build Apps for you 22 | 23 | - Step-by-step YouTube development tutorial: 24 | 25 |
26 |
27 | 28 | IMAGE ALT TEXT 29 | 30 |
31 |
32 | 33 | ## How to Run 34 | 35 | 1. Implement functions in the `utils/` directory based on your chosen APIs. 36 | 37 | 2. Install dependencies and run the program: 38 | 39 | ```bash 40 | pip install -r requirements.txt 41 | python main.py 42 | ``` 43 | 44 | 3. To run the application server: 45 | 46 | ```bash 47 | streamlit run app.py 48 | ``` 49 | 50 | 4. If you change the data in the `data/` directory or the `meta.csv` file, ensure you run the offline processing script to generate the index and metadata: 51 | 52 | ```bash 53 | python offline_processing.py 54 | ``` 55 | -------------------------------------------------------------------------------- /assets/paul_graham.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/assets/paul_graham.png -------------------------------------------------------------------------------- /assets/pg_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/assets/pg_banner.png -------------------------------------------------------------------------------- /assets/tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/assets/tutorial.png -------------------------------------------------------------------------------- /audio_cache/06c7d83c87af6ebde5d01d67008f7dfe.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/06c7d83c87af6ebde5d01d67008f7dfe.wav -------------------------------------------------------------------------------- /audio_cache/0c8e8547c808686ace7e04a8858da3b6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/0c8e8547c808686ace7e04a8858da3b6.wav -------------------------------------------------------------------------------- /audio_cache/0cf59056ceb422ae4fc0420020436dfa.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/0cf59056ceb422ae4fc0420020436dfa.wav -------------------------------------------------------------------------------- /audio_cache/0ea44e3886b9c2ea951eb9617dd28c3a.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/0ea44e3886b9c2ea951eb9617dd28c3a.wav -------------------------------------------------------------------------------- /audio_cache/1912fe16d15d7a9a4ce0d022b3a6eaae.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/1912fe16d15d7a9a4ce0d022b3a6eaae.wav -------------------------------------------------------------------------------- /audio_cache/2de08675b0994df30511142f84fb6436.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/2de08675b0994df30511142f84fb6436.wav -------------------------------------------------------------------------------- /audio_cache/3187c9a8d838eff7fb486077ca0e9cb4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/3187c9a8d838eff7fb486077ca0e9cb4.wav -------------------------------------------------------------------------------- /audio_cache/3cbd8013a459a953724ebc258d3d6897.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/3cbd8013a459a953724ebc258d3d6897.wav -------------------------------------------------------------------------------- /audio_cache/3ce16a061f4637ff1d4f879dc0414de6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/3ce16a061f4637ff1d4f879dc0414de6.wav -------------------------------------------------------------------------------- /audio_cache/43aa7dc17b0f6a45fd730c82be417010.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/43aa7dc17b0f6a45fd730c82be417010.wav -------------------------------------------------------------------------------- /audio_cache/43f1ff906e6011bf2a8ce2e21edabd03.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/43f1ff906e6011bf2a8ce2e21edabd03.wav -------------------------------------------------------------------------------- /audio_cache/46b46eca6731b5e44573c5c1b92f9ffd.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/46b46eca6731b5e44573c5c1b92f9ffd.wav -------------------------------------------------------------------------------- /audio_cache/47e41011426e0c21f24550aa09d402a8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/47e41011426e0c21f24550aa09d402a8.wav -------------------------------------------------------------------------------- /audio_cache/47ec650426fec0b53d322650583cf389.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/47ec650426fec0b53d322650583cf389.wav -------------------------------------------------------------------------------- /audio_cache/5598ba8733141cd78c7aaa2fc87d3f98.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/5598ba8733141cd78c7aaa2fc87d3f98.wav -------------------------------------------------------------------------------- /audio_cache/55c052a4262bebcabea603b76d2f1c86.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/55c052a4262bebcabea603b76d2f1c86.wav -------------------------------------------------------------------------------- /audio_cache/59345c9cab2aff7c6d52d1ab599a30b1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/59345c9cab2aff7c6d52d1ab599a30b1.wav -------------------------------------------------------------------------------- /audio_cache/5a534727fa7ec6a3684e3a28df4807e3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/5a534727fa7ec6a3684e3a28df4807e3.wav -------------------------------------------------------------------------------- /audio_cache/5a6be2c97141c51f088bc2e4324c6509.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/5a6be2c97141c51f088bc2e4324c6509.wav -------------------------------------------------------------------------------- /audio_cache/630112ddf739f66bab0bc244256d519a.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/630112ddf739f66bab0bc244256d519a.wav -------------------------------------------------------------------------------- /audio_cache/64426303acfa676aa8a46ca4a32d1acd.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/64426303acfa676aa8a46ca4a32d1acd.wav -------------------------------------------------------------------------------- /audio_cache/644911722941c4dfdfd65759a739ac42.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/644911722941c4dfdfd65759a739ac42.wav -------------------------------------------------------------------------------- /audio_cache/78f579c229f3966f664e37260f795550.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/78f579c229f3966f664e37260f795550.wav -------------------------------------------------------------------------------- /audio_cache/84e1106561e5a3d0c4a3b5b8e28d8729.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/84e1106561e5a3d0c4a3b5b8e28d8729.wav -------------------------------------------------------------------------------- /audio_cache/a1fd2b16fd58e23968f73ac60aec7dbf.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/a1fd2b16fd58e23968f73ac60aec7dbf.wav -------------------------------------------------------------------------------- /audio_cache/a769629026cca1003079490e1e18e593.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/a769629026cca1003079490e1e18e593.wav -------------------------------------------------------------------------------- /audio_cache/aaac1851b307c9c1ecf450b0665440c8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/aaac1851b307c9c1ecf450b0665440c8.wav -------------------------------------------------------------------------------- /audio_cache/b096d3a9ed78ee2bbb90632f6cdd3766.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/b096d3a9ed78ee2bbb90632f6cdd3766.wav -------------------------------------------------------------------------------- /audio_cache/b2832fa35be237f8615acbeee2a88a58.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/b2832fa35be237f8615acbeee2a88a58.wav -------------------------------------------------------------------------------- /audio_cache/b3d0e7925c7ffad98ef57ff239329f7f.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/b3d0e7925c7ffad98ef57ff239329f7f.wav -------------------------------------------------------------------------------- /audio_cache/c021bf4ecd4159f1ab21f8cb2eeb71ca.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/c021bf4ecd4159f1ab21f8cb2eeb71ca.wav -------------------------------------------------------------------------------- /audio_cache/c02ba92c9c60d4b38c73d84eaf1c44ad.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/c02ba92c9c60d4b38c73d84eaf1c44ad.wav -------------------------------------------------------------------------------- /audio_cache/d0489760bf13effd9b5b6cad0723a005.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/d0489760bf13effd9b5b6cad0723a005.wav -------------------------------------------------------------------------------- /audio_cache/d4c7e53b885dfe61c34ce46f9526ded0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/d4c7e53b885dfe61c34ce46f9526ded0.wav -------------------------------------------------------------------------------- /audio_cache/e4708585916d085913965724edaef345.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/e4708585916d085913965724edaef345.wav -------------------------------------------------------------------------------- /audio_cache/e94b7641422991360a287c100963a146.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/e94b7641422991360a287c100963a146.wav -------------------------------------------------------------------------------- /audio_cache/f8825f6103b7992ac30c4c6f9272d682.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/audio_cache/f8825f6103b7992ac30c4c6f9272d682.wav -------------------------------------------------------------------------------- /data/102.txt: -------------------------------------------------------------------------------- 1 | How to Lose Time and Money 2 | 3 | July 2010 4 | 5 | When we sold our startup in 1998 I suddenly got a lot of money. I now had to think about something I hadn't had to think about before: how not to lose it. I knew it was possible to go from rich to poor, just as it was possible to go from poor to rich. But while I'd spent a lot of the past several years studying the paths from poor to rich, I knew practically nothing about the paths from rich to poor. Now, in order to avoid them, I had to learn where they were. 6 | 7 | So I started to pay attention to how fortunes are lost. If you'd asked me as a kid how rich people became poor, I'd have said by spending all their money. That's how it happens in books and movies, because that's the colorful way to do it. But in fact the way most fortunes are lost is not through excessive expenditure, but through bad investments. 8 | 9 | It's hard to spend a fortune without noticing. Someone with ordinary tastes would find it hard to blow through more than a few tens of thousands of dollars without thinking "wow, I'm spending a lot of money." Whereas if you start trading derivatives, you can lose a million dollars (as much as you want, really) in the blink of an eye. 10 | 11 | In most people's minds, spending money on luxuries sets off alarms that making investments doesn't. Luxuries seem self-indulgent. And unless you got the money by inheriting it or winning a lottery, you've already been thoroughly trained that self-indulgence leads to trouble. Investing bypasses those alarms. You're not spending the money; you're just moving it from one asset to another. Which is why people trying to sell you expensive things say "it's an investment." 12 | 13 | The solution is to develop new alarms. This can be a tricky business, because while the alarms that prevent you from overspending are so basic that they may even be in our DNA, the ones that prevent you from making bad investments have to be learned, and are sometimes fairly counterintuitive. 14 | 15 | A few days ago I realized something surprising: the situation with time is much the same as with money. The most dangerous way to lose time is not to spend it having fun, but to spend it doing fake work. When you spend time having fun, you know you're being self-indulgent. Alarms start to go off fairly quickly. If I woke up one morning and sat down on the sofa and watched TV all day, I'd feel like something was terribly wrong. Just thinking about it makes me wince. I'd start to feel uncomfortable after sitting on a sofa watching TV for 2 hours, let alone a whole day. 16 | 17 | And yet I've definitely had days when I might as well have sat in front of a TV all day — days at the end of which, if I asked myself what I got done that day, the answer would have been: basically, nothing. I feel bad after these days too, but nothing like as bad as I'd feel if I spent the whole day on the sofa watching TV. If I spent a whole day watching TV I'd feel like I was descending into perdition. But the same alarms don't go off on the days when I get nothing done, because I'm doing stuff that seems, superficially, like real work. Dealing with email, for example. You do it sitting at a desk. It's not fun. So it must be work. 18 | 19 | With time, as with money, avoiding pleasure is no longer enough to protect you. It probably was enough to protect hunter-gatherers, and perhaps all pre-industrial societies. So nature and nurture combine to make us avoid self-indulgence. But the world has gotten more complicated: the most dangerous traps now are new behaviors that bypass our alarms about self-indulgence by mimicking more virtuous types. And the worst thing is, they're not even fun. -------------------------------------------------------------------------------- /data/11.txt: -------------------------------------------------------------------------------- 1 | The way to get new ideas is to notice anomalies: what seems strange, or missing, or broken? You can see anomalies in everyday life (much of standup comedy is based on this), but the best place to look for them is at the frontiers of knowledge. 2 | 3 | Knowledge grows fractally. From a distance its edges look smooth, but when you learn enough to get close to one, you'll notice it's full of gaps. These gaps will seem obvious; it will seem inexplicable that no one has tried x or wondered about y. In the best case, exploring such gaps yields whole new fractal buds. 4 | 5 | 6 | -------------------------------------------------------------------------------- /data/110.txt: -------------------------------------------------------------------------------- 1 | 2 | What Kate Saw in Silicon Valley 3 | 4 | August 2009 5 | 6 | Kate Courteau is the architect who designed Y Combinator's office. Recently we managed to recruit her to help us run YC when she's not busy with architectural projects. Though she'd heard a lot about YC since the beginning, the last 9 months have been a total immersion. 7 | 8 | I've been around the startup world for so long that it seems normal to me, so I was curious to hear what had surprised her most about it. This was her list: 9 | 10 | 11 | 12 | 1. How many startups fail. 13 | 14 | Kate knew in principle that startups were very risky, but she was surprised to see how constant the threat of failure was — not just for the minnows, but even for the famous startups whose founders came to speak at YC dinners. 15 | 16 | 2. How much startups' ideas change. 17 | 18 | As usual, by Demo Day about half the startups were doing something significantly different than they started with. We encourage that. Starting a startup is like science in that you have to follow the truth wherever it leads. In the rest of the world, people don't start things till they're sure what they want to do, and once started they tend to continue on their initial path even if it's mistaken. 19 | 20 | 3. How little money it can take to start a startup. 21 | 22 | In Kate's world, everything is still physical and expensive. You can barely renovate a bathroom for the cost of starting a startup. 23 | 24 | 4. How scrappy founders are. 25 | 26 | That was her actual word. I agree with her, but till she mentioned this it never occurred to me how little this quality is appreciated in most of the rest of the world. It wouldn't be a compliment in most organizations to call someone scrappy. 27 | 28 | What does it mean, exactly? It's basically the diminutive form of belligerent. Someone who's scrappy manages to be both threatening and undignified at the same time. Which seems to me exactly what one would want to be, in any kind of work. If you're not threatening, you're probably not doing anything new, and dignity is merely a sort of plaque. 29 | 30 | 5. How tech-saturated Silicon Valley is. 31 | 32 | "It seems like everybody here is in the industry." That isn't literally true, but there is a qualitative difference between Silicon Valley and other places. You tend to keep your voice down, because there's a good chance the person at the next table would know some of the people you're talking about. I never felt that in Boston. The good news is, there's also a good chance the person at the next table could help you in some way. 33 | 34 | 6. That the speakers at YC were so consistent in their advice. 35 | 36 | Actually, I've noticed this too. I always worry the speakers will put us in an embarrassing position by contradicting what we tell the startups, but it happens surprisingly rarely. 37 | 38 | When I asked her what specific things she remembered speakers always saying, she mentioned: that the way to succeed was to launch something fast, listen to users, and then iterate; that startups required resilience because they were always an emotional rollercoaster; and that most VCs were sheep. 39 | 40 | I've been impressed by how consistently the speakers advocate launching fast and iterating. That was contrarian advice 10 years ago, but it's clearly now the established practice. 41 | 42 | 7. How casual successful startup founders are. 43 | 44 | Most of the famous founders in Silicon Valley are people you'd overlook on the street. It's not merely that they don't dress up. They don't project any kind of aura of power either. "They're not trying to impress anyone." 45 | 46 | Interestingly, while Kate said that she could never pick out successful founders, she could recognize VCs, both by the way they dressed and the way they carried themselves. 47 | 48 | 8. How important it is for founders to have people to ask for advice. 49 | 50 | (I swear I didn't prompt this one.) Without advice "they'd just be sort of lost." Fortunately, there are a lot of people to help them. There's a strong tradition within YC of helping other YC-funded startups. But we didn't invent that idea: it's just a slightly more concentrated form of existing Valley culture. 51 | 52 | 9. What a solitary task startups are. 53 | 54 | Architects are constantly interacting face to face with other people, whereas doing a technology startup, at least, tends to require long stretches of uninterrupted time to work. "You could do it in a box." 55 | 56 | 57 | 58 | By inverting this list, we can get a portrait of the "normal" world. It's populated by people who talk a lot with one another as they work slowly but harmoniously on conservative, expensive projects whose destinations are decided in advance, and who carefully adjust their manner to reflect their position in the hierarchy. 59 | 60 | That's also a fairly accurate description of the past. So startup culture may not merely be different in the way you'd expect any subculture to be, but a leading indicator. -------------------------------------------------------------------------------- /data/111.txt: -------------------------------------------------------------------------------- 1 | The Trouble with the Segway 2 | 3 | July 2009 4 | 5 | The Segway hasn't delivered on its initial promise, to put it mildly. There are several reasons why, but one is that people don't want to be seen riding them. Someone riding a Segway looks like a dork. 6 | 7 | My friend Trevor Blackwell built his own Segway, which we called the Segwell. He also built a one-wheeled version, the Eunicycle, which looks exactly like a regular unicycle till you realize the rider isn't pedaling. He has ridden them both to downtown Mountain View to get coffee. When he rides the Eunicycle, people smile at him. But when he rides the Segwell, they shout abuse from their cars: "Too lazy to walk, ya fuckin homo?" 8 | 9 | Why do Segways provoke this reaction? The reason you look like a dork riding a Segway is that you look smug. You don't seem to be working hard enough. 10 | 11 | Someone riding a motorcycle isn't working any harder. But because he's sitting astride it, he seems to be making an effort. When you're riding a Segway you're just standing there. And someone who's being whisked along while seeming to do no work — someone in a sedan chair, for example — can't help but look smug. 12 | 13 | Try this thought experiment and it becomes clear: imagine something that worked like the Segway, but that you rode with one foot in front of the other, like a skateboard. That wouldn't seem nearly as uncool. 14 | 15 | So there may be a way to capture more of the market Segway hoped to reach: make a version that doesn't look so easy for the rider. It would also be helpful if the styling was in the tradition of skateboards or bicycles rather than medical devices. 16 | 17 | Curiously enough, what got Segway into this problem was that the company was itself a kind of Segway. It was too easy for them; they were too successful raising money. If they'd had to grow the company gradually, by iterating through several versions they sold to real users, they'd have learned pretty quickly that people looked stupid riding them. Instead they had enough to work in secret. They had focus groups aplenty, I'm sure, but they didn't have the people yelling insults out of cars. So they never realized they were zooming confidently down a blind alley. -------------------------------------------------------------------------------- /data/115.txt: -------------------------------------------------------------------------------- 1 | Why Twitter is a Big Deal 2 | 3 | April 2009 4 | 5 | Om Malik is the most recent of many people to ask why Twitter is such a big deal. 6 | 7 | The reason is that it's a new messaging protocol, where you don't specify the recipients. New protocols are rare. Or more precisely, new protocols that take off are. There are only a handful of commonly used ones: TCP/IP (the Internet), SMTP (email), HTTP (the web), and so on. So any new protocol is a big deal. But Twitter is a protocol owned by a private company. That's even rarer. 8 | 9 | Curiously, the fact that the founders of Twitter have been slow to monetize it may in the long run prove to be an advantage. Because they haven't tried to control it too much, Twitter feels to everyone like previous protocols. One forgets it's owned by a private company. That must have made it easier for Twitter to spread. -------------------------------------------------------------------------------- /data/116.txt: -------------------------------------------------------------------------------- 1 | The Founder Visa 2 | 3 | April 2009 4 | 5 | I usually avoid politics, but since we now seem to have an administration that's open to suggestions, I'm going to risk making one. The single biggest thing the government could do to increase the number of startups in this country is a policy that would cost nothing: establish a new class of visa for startup founders. 6 | 7 | The biggest constraint on the number of new startups that get created in the US is not tax policy or employment law or even Sarbanes-Oxley. It's that we won't let the people who want to start them into the country. 8 | 9 | Letting just 10,000 startup founders into the country each year could have a visible effect on the economy. If we assume 4 people per startup, which is probably an overestimate, that's 2500 new companies. Each year. They wouldn't all grow as big as Google, but out of 2500 some would come close. 10 | 11 | By definition these 10,000 founders wouldn't be taking jobs from Americans: it could be part of the terms of the visa that they couldn't work for existing companies, only new ones they'd founded. In fact they'd cause there to be more jobs for Americans, because the companies they started would hire more employees as they grew. 12 | 13 | The tricky part might seem to be how one defined a startup. But that could be solved quite easily: let the market decide. Startup investors work hard to find the best startups. The government could not do better than to piggyback on their expertise, and use investment by recognized startup investors as the test of whether a company was a real startup. 14 | 15 | How would the government decide who's a startup investor? The same way they decide what counts as a university for student visas. We'll establish our own accreditation procedure. We know who one another are. 16 | 17 | 10,000 people is a drop in the bucket by immigration standards, but would represent a huge increase in the pool of startup founders. I think this would have such a visible effect on the economy that it would make the legislator who introduced the bill famous. The only way to know for sure would be to try it, and that would cost practically nothing. -------------------------------------------------------------------------------- /data/117.txt: -------------------------------------------------------------------------------- 1 | Five Founders 2 | 3 | April 2009 4 | 5 | Inc recently asked me who I thought were the 5 most interesting startup founders of the last 30 years. How do you decide who's the most interesting? The best test seemed to be influence: who are the 5 who've influenced me most? Who do I use as examples when I'm talking to companies we fund? Who do I find myself quoting? 6 | 7 | 1. Steve Jobs 8 | 9 | I'd guess Steve is the most influential founder not just for me but for most people you could ask. A lot of startup culture is Apple culture. He was the original young founder. And while the concept of "insanely great" already existed in the arts, it was a novel idea to introduce into a company in the 1980s. 10 | 11 | More remarkable still, he's stayed interesting for 30 years. People await new Apple products the way they'd await new books by a popular novelist. Steve may not literally design them, but they wouldn't happen if he weren't CEO. 12 | 13 | Steve is clever and driven, but so are a lot of people in the Valley. What makes him unique is his sense of design. Before him, most companies treated design as a frivolous extra. Apple's competitors now know better. 14 | 15 | 2. TJ Rodgers 16 | 17 | TJ Rodgers isn't as famous as Steve Jobs, but he may be the best writer among Silicon Valley CEOs. I've probably learned more from him about the startup way of thinking than from anyone else. Not so much from specific things he's written as by reconstructing the mind that produced them: brutally candid; aggressively garbage-collecting outdated ideas; and yet driven by pragmatism rather than ideology. 18 | 19 | The first essay of his that I read was so electrifying that I remember exactly where I was at the time. It was High Technology Innovation: Free Markets or Government Subsidies? and I was downstairs in the Harvard Square T Station. It felt as if someone had flipped on a light switch inside my head. 20 | 21 | 3. Larry & Sergey 22 | 23 | I'm sorry to treat Larry and Sergey as one person. I've always thought that was unfair to them. But it does seem as if Google was a collaboration. 24 | 25 | Before Google, companies in Silicon Valley already knew it was important to have the best hackers. So they claimed, at least. But Google pushed this idea further than anyone had before. Their hypothesis seems to have been that, in the initial stages at least, all you need is good hackers: if you hire all the smartest people and put them to work on a problem where their success can be measured, you win. All the other stuff—which includes all the stuff that business schools think business consists of—you can figure out along the way. The results won't be perfect, but they'll be optimal. If this was their hypothesis, it's now been verified experimentally. 26 | 27 | 4. Paul Buchheit 28 | 29 | Few know this, but one person, Paul Buchheit, is responsible for three of the best things Google has done. He was the original author of GMail, which is the most impressive thing Google has after search. He also wrote the first prototype of AdSense, and was the author of Google's mantra "Don't be evil." 30 | 31 | PB made a point in a talk once that I now mention to every startup we fund: that it's better, initially, to make a small number of users really love you than a large number kind of like you. If I could tell startups only ten sentences, this would be one of them. 32 | 33 | Now he's cofounder of a startup called Friendfeed. It's only a year old, but already everyone in the Valley is watching them. Someone responsible for three of the biggest ideas at Google is going to come up with more. 34 | 35 | 5. Sam Altman 36 | 37 | I was told I shouldn't mention founders of YC-funded companies in this list. But Sam Altman can't be stopped by such flimsy rules. If he wants to be on this list, he's going to be. 38 | 39 | Honestly, Sam is, along with Steve Jobs, the founder I refer to most when I'm advising startups. On questions of design, I ask "What would Steve do?" but on questions of strategy or ambition I ask "What would Sama do?" 40 | 41 | What I learned from meeting Sama is that the doctrine of the elect applies to startups. It applies way less than most people think: startup investing does not consist of trying to pick winners the way you might in a horse race. But there are a few people with such force of will that they're going to get whatever they want. -------------------------------------------------------------------------------- /data/12.txt: -------------------------------------------------------------------------------- 1 | The Need to Read 2 | 3 | November 2022 4 | 5 | In the science fiction books I read as a kid, reading had often been replaced by some more efficient way of acquiring knowledge. Mysterious "tapes" would load it into one's brain like a program being loaded into a computer. 6 | 7 | That sort of thing is unlikely to happen anytime soon. Not just because it would be hard to build a replacement for reading, but because even if one existed, it would be insufficient. Reading about x doesn't just teach you about x; it also teaches you how to write. [1] 8 | 9 | Would that matter? If we replaced reading, would anyone need to be good at writing? 10 | 11 | The reason it would matter is that writing is not just a way to convey ideas, but also a way to have them. 12 | 13 | A good writer doesn't just think, and then write down what he thought, as a sort of transcript. A good writer will almost always discover new things in the process of writing. And there is, as far as I know, no substitute for this kind of discovery. Talking about your ideas with other people is a good way to develop them. But even after doing this, you'll find you still discover new things when you sit down to write. There is a kind of thinking that can only be done by writing. 14 | 15 | There are of course kinds of thinking that can be done without writing. If you don't need to go too deeply into a problem, you can solve it without writing. If you're thinking about how two pieces of machinery should fit together, writing about it probably won't help much. And when a problem can be described formally, you can sometimes solve it in your head. But if you need to solve a complicated, ill-defined problem, it will almost always help to write about it. Which in turn means that someone who's not good at writing will almost always be at a disadvantage in solving such problems. 16 | 17 | You can't think well without writing well, and you can't write well without reading well. And I mean that last "well" in both senses. You have to be good at reading, and read good things. [2] 18 | 19 | People who just want information may find other ways to get it. But people who want to have ideas can't afford to. 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Notes 32 | 33 | [1] Audiobooks can give you examples of good writing, but having them read to you doesn't teach you as much about writing as reading them yourself. 34 | 35 | [2] By "good at reading" I don't mean good at the mechanics of reading. You don't have to be good at extracting words from the page so much as extracting meaning from the words. -------------------------------------------------------------------------------- /data/13.txt: -------------------------------------------------------------------------------- 1 | What You (Want to)* Want 2 | 3 | November 2022 4 | 5 | Since I was about 9 I've been puzzled by the apparent contradiction between being made of matter that behaves in a predictable way, and the feeling that I could choose to do whatever I wanted. At the time I had a self-interested motive for exploring the question. At that age (like most succeeding ages) I was always in trouble with the authorities, and it seemed to me that there might possibly be some way to get out of trouble by arguing that I wasn't responsible for my actions. I gradually lost hope of that, but the puzzle remained: How do you reconcile being a machine made of matter with the feeling that you're free to choose what you do? [1] 6 | 7 | The best way to explain the answer may be to start with a slightly wrong version, and then fix it. The wrong version is: You can do what you want, but you can't want what you want. Yes, you can control what you do, but you'll do what you want, and you can't control that. 8 | 9 | The reason this is mistaken is that people do sometimes change what they want. People who don't want to want something — drug addicts, for example — can sometimes make themselves stop wanting it. And people who want to want something — who want to like classical music, or broccoli — sometimes succeed. 10 | 11 | So we modify our initial statement: You can do what you want, but you can't want to want what you want. 12 | 13 | That's still not quite true. It's possible to change what you want to want. I can imagine someone saying "I decided to stop wanting to like classical music." But we're getting closer to the truth. It's rare for people to change what they want to want, and the more "want to"s we add, the rarer it gets. 14 | 15 | We can get arbitrarily close to a true statement by adding more "want to"s in much the same way we can get arbitrarily close to 1 by adding more 9s to a string of 9s following a decimal point. In practice three or four "want to"s must surely be enough. It's hard even to envision what it would mean to change what you want to want to want to want, let alone actually do it. 16 | 17 | So one way to express the correct answer is to use a regular expression. You can do what you want, but there's some statement of the form "you can't (want to)* want what you want" that's true. Ultimately you get back to a want that you don't control. [2] 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | Notes 30 | 31 | [1] I didn't know when I was 9 that matter might behave randomly, but I don't think it affects the problem much. Randomness destroys the ghost in the machine as effectively as determinism. 32 | 33 | [2] If you don't like using an expression, you can make the same point using higher-order desires: There is some n such that you don't control your nth-order desires. -------------------------------------------------------------------------------- /data/14.txt: -------------------------------------------------------------------------------- 1 | Alien Truth 2 | 3 | October 2022 4 | 5 | If there were intelligent beings elsewhere in the universe, they'd share certain truths in common with us. The truths of mathematics would be the same, because they're true by definition. Ditto for the truths of physics; the mass of a carbon atom would be the same on their planet. But I think we'd share other truths with aliens besides the truths of math and physics, and that it would be worthwhile to think about what these might be. 6 | 7 | For example, I think we'd share the principle that a controlled experiment testing some hypothesis entitles us to have proportionally increased belief in it. It seems fairly likely, too, that it would be true for aliens that one can get better at something by practicing. We'd probably share Occam's razor. There doesn't seem anything specifically human about any of these ideas. 8 | 9 | We can only guess, of course. We can't say for sure what forms intelligent life might take. Nor is it my goal here to explore that question, interesting though it is. The point of the idea of alien truth is not that it gives us a way to speculate about what forms intelligent life might take, but that it gives us a threshold, or more precisely a target, for truth. If you're trying to find the most general truths short of those of math or physics, then presumably they'll be those we'd share in common with other forms of intelligent life. 10 | 11 | Alien truth will work best as a heuristic if we err on the side of generosity. If an idea might plausibly be relevant to aliens, that's enough. Justice, for example. I wouldn't want to bet that all intelligent beings would understand the concept of justice, but I wouldn't want to bet against it either. 12 | 13 | The idea of alien truth is related to Erdos's idea of God's book. He used to describe a particularly good proof as being in God's book, the implication being (a) that a sufficiently good proof was more discovered than invented, and (b) that its goodness would be universally recognized. If there's such a thing as alien truth, then there's more in God's book than math. 14 | 15 | What should we call the search for alien truth? The obvious choice is "philosophy." Whatever else philosophy includes, it should probably include this. I'm fairly sure Aristotle would have thought so. One could even make the case that the search for alien truth is, if not an accurate description of philosophy, a good definition for it. I.e. that it's what people who call themselves philosophers should be doing, whether or not they currently are. But I'm not wedded to that; doing it is what matters, not what we call it. 16 | 17 | We may one day have something like alien life among us in the form of AIs. And that may in turn allow us to be precise about what truths an intelligent being would have to share with us. We might find, for example, that it's impossible to create something we'd consider intelligent that doesn't use Occam's razor. We might one day even be able to prove that. But though this sort of research would be very interesting, it's not necessary for our purposes, or even the same field; the goal of philosophy, if we're going to call it that, would be to see what ideas we come up with using alien truth as a target, not to say precisely where the threshold of it is. Those two questions might one day converge, but they'll converge from quite different directions, and till they do, it would be too constraining to restrict ourselves to thinking only about things we're certain would be alien truths. Especially since this will probably be one of those areas where the best guesses turn out to be surprisingly close to optimal. (Let's see if that one does.) 18 | 19 | Whatever we call it, the attempt to discover alien truths would be a worthwhile undertaking. And curiously enough, that is itself probably an alien truth. 20 | 21 | -------------------------------------------------------------------------------- /data/151.txt: -------------------------------------------------------------------------------- 1 | An Alternative Theory of Unions 2 | 3 | May 2007 4 | 5 | People who worry about the increasing gap between rich and poor generally look back on the mid twentieth century as a golden age. In those days we had a large number of high-paying union manufacturing jobs that boosted the median income. I wouldn't quite call the high-paying union job a myth, but I think people who dwell on it are reading too much into it. 6 | 7 | Oddly enough, it was working with startups that made me realize where the high-paying union job came from. In a rapidly growing market, you don't worry too much about efficiency. It's more important to grow fast. If there's some mundane problem getting in your way, and there's a simple solution that's somewhat expensive, just take it and get on with more important things. EBay didn't win by paying less for servers than their competitors. 8 | 9 | Difficult though it may be to imagine now, manufacturing was a growth industry in the mid twentieth century. This was an era when small firms making everything from cars to candy were getting consolidated into a new kind of corporation with national reach and huge economies of scale. You had to grow fast or die. Workers were for these companies what servers are for an Internet startup. A reliable supply was more important than low cost. 10 | 11 | If you looked in the head of a 1950s auto executive, the attitude must have been: sure, give 'em whatever they ask for, so long as the new model isn't delayed. 12 | 13 | In other words, those workers were not paid what their work was worth. Circumstances being what they were, companies would have been stupid to insist on paying them so little. 14 | 15 | If you want a less controversial example of this phenomenon, ask anyone who worked as a consultant building web sites during the Internet Bubble. In the late nineties you could get paid huge sums of money for building the most trivial things. And yet does anyone who was there have any expectation those days will ever return? I doubt it. Surely everyone realizes that was just a temporary aberration. 16 | 17 | The era of labor unions seems to have been the same kind of aberration, just spread over a longer period, and mixed together with a lot of ideology that prevents people from viewing it with as cold an eye as they would something like consulting during the Bubble. 18 | 19 | Basically, unions were just Razorfish. 20 | 21 | People who think the labor movement was the creation of heroic union organizers have a problem to explain: why are unions shrinking now? The best they can do is fall back on the default explanation of people living in fallen civilizations. Our ancestors were giants. The workers of the early twentieth century must have had a moral courage that's lacking today. 22 | 23 | In fact there's a simpler explanation. The early twentieth century was just a fast-growing startup overpaying for infrastructure. And we in the present are not a fallen people, who have abandoned whatever mysterious high-minded principles produced the high-paying union job. We simply live in a time when the fast-growing companies overspend on different things. -------------------------------------------------------------------------------- /data/153.txt: -------------------------------------------------------------------------------- 1 | Two Kinds of Judgement 2 | 3 | April 2007 4 | 5 | There are two different ways people judge you. Sometimes judging you correctly is the end goal. But there's a second much more common type of judgement where it isn't. We tend to regard all judgements of us as the first type. We'd probably be happier if we realized which are and which aren't. 6 | 7 | The first type of judgement, the type where judging you is the end goal, include court cases, grades in classes, and most competitions. Such judgements can of course be mistaken, but because the goal is to judge you correctly, there's usually some kind of appeals process. If you feel you've been misjudged, you can protest that you've been treated unfairly. 8 | 9 | Nearly all the judgements made on children are of this type, so we get into the habit early in life of thinking that all judgements are. 10 | 11 | But in fact there is a second much larger class of judgements where judging you is only a means to something else. These include college admissions, hiring and investment decisions, and of course the judgements made in dating. This kind of judgement is not really about you. 12 | 13 | Put yourself in the position of someone selecting players for a national team. Suppose for the sake of simplicity that this is a game with no positions, and that you have to select 20 players. There will be a few stars who clearly should make the team, and many players who clearly shouldn't. The only place your judgement makes a difference is in the borderline cases. Suppose you screw up and underestimate the 20th best player, causing him not to make the team, and his place to be taken by the 21st best. You've still picked a good team. If the players have the usual distribution of ability, the 21st best player will be only slightly worse than the 20th best. Probably the difference between them will be less than the measurement error. 14 | 15 | The 20th best player may feel he has been misjudged. But your goal here wasn't to provide a service estimating people's ability. It was to pick a team, and if the difference between the 20th and 21st best players is less than the measurement error, you've still done that optimally. 16 | 17 | It's a false analogy even to use the word unfair to describe this kind of misjudgement. It's not aimed at producing a correct estimate of any given individual, but at selecting a reasonably optimal set. 18 | 19 | One thing that leads us astray here is that the selector seems to be in a position of power. That makes him seem like a judge. If you regard someone judging you as a customer instead of a judge, the expectation of fairness goes away. The author of a good novel wouldn't complain that readers were unfair for preferring a potboiler with a racy cover. Stupid, perhaps, but not unfair. 20 | 21 | Our early training and our self-centeredness combine to make us believe that every judgement of us is about us. In fact most aren't. This is a rare case where being less self-centered will make people more confident. Once you realize how little most people judging you care about judging you accurately—once you realize that because of the normal distribution of most applicant pools, it matters least to judge accurately in precisely the cases where judgement has the most effect—you won't take rejection so personally. 22 | 23 | And curiously enough, taking rejection less personally may help you to get rejected less often. If you think someone judging you will work hard to judge you correctly, you can afford to be passive. But the more you realize that most judgements are greatly influenced by random, extraneous factors—that most people judging you are more like a fickle novel buyer than a wise and perceptive magistrate—the more you realize you can do things to influence the outcome. 24 | 25 | One good place to apply this principle is in college applications. Most high school students applying to college do it with the usual child's mix of inferiority and self-centeredness: inferiority in that they assume that admissions committees must be all-seeing; self-centeredness in that they assume admissions committees care enough about them to dig down into their application and figure out whether they're good or not. These combine to make applicants passive in applying and hurt when they're rejected. If college applicants realized how quick and impersonal most selection processes are, they'd make more effort to sell themselves, and take the outcome less personally. -------------------------------------------------------------------------------- /data/157.txt: -------------------------------------------------------------------------------- 1 | Learning from Founders 2 | 3 | January 2007 4 | 5 | (Foreword to Jessica Livingston's Founders at Work.) 6 | 7 | Apparently sprinters reach their highest speed right out of the blocks, and spend the rest of the race slowing down. The winners slow down the least. It's that way with most startups too. The earliest phase is usually the most productive. That's when they have the really big ideas. Imagine what Apple was like when 100% of its employees were either Steve Jobs or Steve Wozniak. 8 | 9 | The striking thing about this phase is that it's completely different from most people's idea of what business is like. If you looked in people's heads (or stock photo collections) for images representing "business," you'd get images of people dressed up in suits, groups sitting around conference tables looking serious, Powerpoint presentations, people producing thick reports for one another to read. Early stage startups are the exact opposite of this. And yet they're probably the most productive part of the whole economy. 10 | 11 | Why the disconnect? I think there's a general principle at work here: the less energy people expend on performance, the more they expend on appearances to compensate. More often than not the energy they expend on seeming impressive makes their actual performance worse. A few years ago I read an article in which a car magazine modified the "sports" model of some production car to get the fastest possible standing quarter mile. You know how they did it? They cut off all the crap the manufacturer had bolted onto the car to make it look fast. 12 | 13 | Business is broken the same way that car was. The effort that goes into looking productive is not merely wasted, but actually makes organizations less productive. Suits, for example. Suits do not help people to think better. I bet most executives at big companies do their best thinking when they wake up on Sunday morning and go downstairs in their bathrobe to make a cup of coffee. That's when you have ideas. Just imagine what a company would be like if people could think that well at work. People do in startups, at least some of the time. (Half the time you're in a panic because your servers are on fire, but the other half you're thinking as deeply as most people only get to sitting alone on a Sunday morning.) 14 | 15 | Ditto for most of the other differences between startups and what passes for productivity in big companies. And yet conventional ideas of professionalism have such an iron grip on our minds that even startup founders are affected by them. In our startup, when outsiders came to visit we tried hard to seem "professional." We'd clean up our offices, wear better clothes, try to arrange that a lot of people were there during conventional office hours. In fact, programming didn't get done by well-dressed people at clean desks during office hours. It got done by badly dressed people (I was notorious for programmming wearing just a towel) in offices strewn with junk at 2 in the morning. But no visitor would understand that. Not even investors, who are supposed to be able to recognize real productivity when they see it. Even we were affected by the conventional wisdom. We thought of ourselves as impostors, succeeding despite being totally unprofessional. It was as if we'd created a Formula 1 car but felt sheepish because it didn't look like a car was supposed to look. 16 | 17 | In the car world, there are at least some people who know that a high performance car looks like a Formula 1 racecar, not a sedan with giant rims and a fake spoiler bolted to the trunk. Why not in business? Probably because startups are so small. The really dramatic growth happens when a startup only has three or four people, so only three or four people see that, whereas tens of thousands see business as it's practiced by Boeing or Philip Morris. 18 | 19 | This book can help fix that problem, by showing everyone what, till now, only a handful people got to see: what happens in the first year of a startup. This is what real productivity looks like. This is the Formula 1 racecar. It looks weird, but it goes fast. 20 | 21 | Of course, big companies won't be able to do everything these startups do. In big companies there's always going to be more politics, and less scope for individual decisions. But seeing what startups are really like will at least show other organizations what to aim for. The time may soon be coming when instead of startups trying to seem more corporate, corporations will try to seem more like startups. That would be a good thing. 22 | -------------------------------------------------------------------------------- /data/163.txt: -------------------------------------------------------------------------------- 1 | The Island Test 2 | 3 | July 2006 4 | 5 | I've discovered a handy test for figuring out what you're addicted to. Imagine you were going to spend the weekend at a friend's house on a little island off the coast of Maine. There are no shops on the island and you won't be able to leave while you're there. Also, you've never been to this house before, so you can't assume it will have more than any house might. 6 | 7 | What, besides clothes and toiletries, do you make a point of packing? That's what you're addicted to. For example, if you find yourself packing a bottle of vodka (just in case), you may want to stop and think about that. 8 | 9 | For me the list is four things: books, earplugs, a notebook, and a pen. 10 | 11 | There are other things I might bring if I thought of it, like music, or tea, but I can live without them. I'm not so addicted to caffeine that I wouldn't risk the house not having any tea, just for a weekend. 12 | 13 | Quiet is another matter. I realize it seems a bit eccentric to take earplugs on a trip to an island off the coast of Maine. If anywhere should be quiet, that should. But what if the person in the next room snored? What if there was a kid playing basketball? (Thump, thump, thump... thump.) Why risk it? Earplugs are small. 14 | 15 | Sometimes I can think with noise. If I already have momentum on some project, I can work in noisy places. I can edit an essay or debug code in an airport. But airports are not so bad: most of the noise is whitish. I couldn't work with the sound of a sitcom coming through the wall, or a car in the street playing thump-thump music. 16 | 17 | And of course there's another kind of thinking, when you're starting something new, that requires complete quiet. You never know when this will strike. It's just as well to carry plugs. 18 | 19 | The notebook and pen are professional equipment, as it were. Though actually there is something druglike about them, in the sense that their main purpose is to make me feel better. I hardly ever go back and read stuff I write down in notebooks. It's just that if I can't write things down, worrying about remembering one idea gets in the way of having the next. Pen and paper wick ideas. 20 | 21 | The best notebooks I've found are made by a company called Miquelrius. I use their smallest size, which is about 2.5 x 4 in. The secret to writing on such narrow pages is to break words only when you run out of space, like a Latin inscription. I use the cheapest plastic Bic ballpoints, partly because their gluey ink doesn't seep through pages, and partly so I don't worry about losing them. 22 | 23 | I only started carrying a notebook about three years ago. Before that I used whatever scraps of paper I could find. But the problem with scraps of paper is that they're not ordered. In a notebook you can guess what a scribble means by looking at the pages around it. In the scrap era I was constantly finding notes I'd written years before that might say something I needed to remember, if I could only figure out what. 24 | 25 | As for books, I know the house would probably have something to read. On the average trip I bring four books and only read one of them, because I find new books to read en route. Really bringing books is insurance. 26 | 27 | I realize this dependence on books is not entirely good—that what I need them for is distraction. The books I bring on trips are often quite virtuous, the sort of stuff that might be assigned reading in a college class. But I know my motives aren't virtuous. I bring books because if the world gets boring I need to be able to slip into another distilled by some writer. It's like eating jam when you know you should be eating fruit. 28 | 29 | There is a point where I'll do without books. I was walking in some steep mountains once, and decided I'd rather just think, if I was bored, rather than carry a single unnecessary ounce. It wasn't so bad. I found I could entertain myself by having ideas instead of reading other people's. If you stop eating jam, fruit starts to taste better. 30 | 31 | So maybe I'll try not bringing books on some future trip. They're going to have to pry the plugs out of my cold, dead ears, however. -------------------------------------------------------------------------------- /data/168.txt: -------------------------------------------------------------------------------- 1 | See Randomness 2 | 3 | April 2006, rev August 2009 4 | 5 | Plato quotes Socrates as saying "the unexamined life is not worth living." Part of what he meant was that the proper role of humans is to think, just as the proper role of anteaters is to poke their noses into anthills. 6 | 7 | A lot of ancient philosophy had the quality — and I don't mean this in an insulting way — of the kind of conversations freshmen have late at night in common rooms: 8 | What is our purpose? Well, we humans are as conspicuously different from other animals as the anteater. In our case the distinguishing feature is the ability to reason. So obviously that is what we should be doing, and a human who doesn't is doing a bad job of being human — is no better than an animal. 9 | Now we'd give a different answer. At least, someone Socrates's age would. We'd ask why we even suppose we have a "purpose" in life. We may be better adapted for some things than others; we may be happier doing things we're adapted for; but why assume purpose? 10 | 11 | The history of ideas is a history of gradually discarding the assumption that it's all about us. No, it turns out, the earth is not the center of the universe — not even the center of the solar system. No, it turns out, humans are not created by God in his own image; they're just one species among many, descended not merely from apes, but from microorganisms. Even the concept of "me" turns out to be fuzzy around the edges if you examine it closely. 12 | 13 | The idea that we're the center of things is difficult to discard. So difficult that there's probably room to discard more. Richard Dawkins made another step in that direction only in the last several decades, with the idea of the selfish gene. No, it turns out, we're not even the protagonists: we're just the latest model vehicle our genes have constructed to travel around in. And having kids is our genes heading for the lifeboats. Reading that book snapped my brain out of its previous way of thinking the way Darwin's must have when it first appeared. 14 | 15 | (Few people can experience now what Darwin's contemporaries did when The Origin of Species was first published, because everyone now is raised either to take evolution for granted, or to regard it as a heresy. No one encounters the idea of natural selection for the first time as an adult.) 16 | 17 | So if you want to discover things that have been overlooked till now, one really good place to look is in our blind spot: in our natural, naive belief that it's all about us. And expect to encounter ferocious opposition if you do. 18 | 19 | Conversely, if you have to choose between two theories, prefer the one that doesn't center on you. 20 | 21 | This principle isn't only for big ideas. It works in everyday life, too. For example, suppose you're saving a piece of cake in the fridge, and you come home one day to find your housemate has eaten it. Two possible theories: 22 | a) Your housemate did it deliberately to upset you. He knew you were saving that piece of cake. 23 | 24 | b) Your housemate was hungry. 25 | I say pick b. No one knows who said "never attribute to malice what can be explained by incompetence," but it is a powerful idea. Its more general version is our answer to the Greeks: 26 | Don't see purpose where there isn't. 27 | Or better still, the positive version: 28 | See randomness. -------------------------------------------------------------------------------- /data/170.txt: -------------------------------------------------------------------------------- 1 | March 2006, rev August 2009 2 | 3 | A couple days ago I found to my surprise that I'd been granted a patent. It issued in 2003, but no one told me. I wouldn't know about it now except that a few months ago, while visiting Yahoo, I happened to run into a Big Cheese I knew from working there in the late nineties. He brought up something called Revenue Loop, which Viaweb had been working on when they bought us. 4 | 5 | The idea is basically that you sort search results not in order of textual "relevance" (as search engines did then) nor in order of how much advertisers bid (as Overture did) but in order of the bid times the number of transactions. Ordinarily you'd do this for shopping searches, though in fact one of the features of our scheme is that it automatically detects which searches are shopping searches. 6 | 7 | If you just order the results in order of bids, you can make the search results useless, because the first results could be dominated by lame sites that had bid the most. But if you order results by bid multiplied by transactions, far from selling out, you're getting a better measure of relevance. What could be a better sign that someone was satisfied with a search result than going to the site and buying something? 8 | 9 | And, of course, this algorithm automatically maximizes the revenue of the search engine. 10 | 11 | Everyone is focused on this type of approach now, but few were in 1998. In 1998 it was all about selling banner ads. We didn't know that, so we were pretty excited when we figured out what seemed to us the optimal way of doing shopping searches. 12 | 13 | When Yahoo was thinking of buying us, we had a meeting with Jerry Yang in New York. For him, I now realize, this was supposed to be one of those meetings when you check out a company you've pretty much decided to buy, just to make sure they're ok guys. We weren't expected to do more than chat and seem smart and reasonable. He must have been dismayed when I jumped up to the whiteboard and launched into a presentation of our exciting new technology. 14 | 15 | I was just as dismayed when he didn't seem to care at all about it. At the time I thought, "boy, is this guy poker-faced. We present to him what has to be the optimal way of sorting product search results, and he's not even curious." I didn't realize till much later why he didn't care. In 1998, advertisers were overpaying enormously for ads on web sites. In 1998, if advertisers paid the maximum that traffic was worth to them, Yahoo's revenues would have decreased. 16 | 17 | Things are different now, of course. Now this sort of thing is all the rage. So when I ran into the Yahoo exec I knew from the old days in the Yahoo cafeteria a few months ago, the first thing he remembered was not (fortunately) all the fights I had with him, but Revenue Loop. 18 | 19 | "Well," I said, "I think we actually applied for a patent on it. I'm not sure what happened to the application after I left." 20 | 21 | "Really? That would be an important patent." 22 | 23 | So someone investigated, and sure enough, that patent application had continued in the pipeline for several years after, and finally issued in 2003. 24 | 25 | The main thing that struck me on reading it, actually, is that lawyers at some point messed up my nice clear writing. Some clever person with a spell checker reduced one section to Zen-like incomprehensibility: 26 | Also, common spelling errors will tend to get fixed. For example, if users searching for "compact disc player" end up spending considerable money at sites offering compact disc players, then those pages will have a higher relevance for that search phrase, even though the phrase "compact disc player" is not present on those pages. 27 | (That "compat disc player" wasn't a typo, guys.) 28 | 29 | For the fine prose of the original, see the provisional application of February 1998, back when we were still Viaweb and couldn't afford to pay lawyers to turn every "a lot of" into "considerable." 30 | 31 | 32 | -------------------------------------------------------------------------------- /data/171.txt: -------------------------------------------------------------------------------- 1 | Why YC 2 | 3 | March 2006, rev August 2009 4 | 5 | Yesterday one of the founders we funded asked me why we started Y Combinator. Or more precisely, he asked if we'd started YC mainly for fun. 6 | 7 | Kind of, but not quite. It is enormously fun to be able to work with Rtm and Trevor again. I missed that after we sold Viaweb, and for all the years after I always had a background process running, looking for something we could do together. There is definitely an aspect of a band reunion to Y Combinator. Every couple days I slip and call it "Viaweb." 8 | 9 | Viaweb we started very explicitly to make money. I was sick of living from one freelance project to the next, and decided to just work as hard as I could till I'd made enough to solve the problem once and for all. Viaweb was sometimes fun, but it wasn't designed for fun, and mostly it wasn't. I'd be surprised if any startup is. All startups are mostly schleps. 10 | 11 | The real reason we started Y Combinator is neither selfish nor virtuous. We didn't start it mainly to make money; we have no idea what our average returns might be, and won't know for years. Nor did we start YC mainly to help out young would-be founders, though we do like the idea, and comfort ourselves occasionally with the thought that if all our investments tank, we will thus have been doing something unselfish. (It's oddly nondeterministic.) 12 | 13 | The real reason we started Y Combinator is one probably only a hacker would understand. We did it because it seems such a great hack. There are thousands of smart people who could start companies and don't, and with a relatively small amount of force applied at just the right place, we can spring on the world a stream of new startups that might otherwise not have existed. 14 | 15 | In a way this is virtuous, because I think startups are a good thing. But really what motivates us is the completely amoral desire that would motivate any hacker who looked at some complex device and realized that with a tiny tweak he could make it run more efficiently. In this case, the device is the world's economy, which fortunately happens to be open source -------------------------------------------------------------------------------- /data/180.txt: -------------------------------------------------------------------------------- 1 | After the Ladder 2 | 3 | August 2005 4 | 5 | Thirty years ago, one was supposed to work one's way up the corporate ladder. That's less the rule now. Our generation wants to get paid up front. Instead of developing a product for some big company in the expectation of getting job security in return, we develop the product ourselves, in a startup, and sell it to the big company. At the very least we want options. 6 | 7 | Among other things, this shift has created the appearance of a rapid increase in economic inequality. But really the two cases are not as different as they look in economic statistics. 8 | 9 | Economic statistics are misleading because they ignore the value of safe jobs. An easy job from which one can't be fired is worth money; exchanging the two is one of the commonest forms of corruption. A sinecure is, in effect, an annuity. Except sinecures don't appear in economic statistics. If they did, it would be clear that in practice socialist countries have nontrivial disparities of wealth, because they usually have a class of powerful bureaucrats who are paid mostly by seniority and can never be fired. 10 | 11 | While not a sinecure, a position on the corporate ladder was genuinely valuable, because big companies tried not to fire people, and promoted from within based largely on seniority. A position on the corporate ladder had a value analogous to the "goodwill" that is a very real element in the valuation of companies. It meant one could expect future high paying jobs. 12 | 13 | One of main causes of the decay of the corporate ladder is the trend for takeovers that began in the 1980s. Why waste your time climbing a ladder that might disappear before you reach the top? 14 | 15 | And, by no coincidence, the corporate ladder was one of the reasons the early corporate raiders were so successful. It's not only economic statistics that ignore the value of safe jobs. Corporate balance sheets do too. One reason it was profitable to carve up 1980s companies and sell them for parts was that they hadn't formally acknowledged their implicit debt to employees who had done good work and expected to be rewarded with high-paying executive jobs when their time came. 16 | 17 | In the movie Wall Street, Gordon Gekko ridicules a company overloaded with vice presidents. But the company may not be as corrupt as it seems; those VPs' cushy jobs were probably payment for work done earlier. 18 | 19 | I like the new model better. For one thing, it seems a bad plan to treat jobs as rewards. Plenty of good engineers got made into bad managers that way. And the old system meant people had to deal with a lot more corporate politics, in order to protect the work they'd invested in a position on the ladder. 20 | 21 | The big disadvantage of the new system is that it involves more risk. If you develop ideas in a startup instead of within a big company, any number of random factors could sink you before you can finish. But maybe the older generation would laugh at me for saying that the way we do things is riskier. After all, projects within big companies were always getting cancelled as a result of arbitrary decisions from higher up. My father's entire industry (breeder reactors) disappeared that way. 22 | 23 | For better or worse, the idea of the corporate ladder is probably gone for good. The new model seems more liquid, and more efficient. But it is less of a change, financially, than one might think. Our fathers weren't that stupid. -------------------------------------------------------------------------------- /data/186.txt: -------------------------------------------------------------------------------- 1 | Writing, Briefly 2 | 3 | March 2005 4 | 5 | (In the process of answering an email, I accidentally wrote a tiny essay about writing. I usually spend weeks on an essay. This one took 67 minutes—23 of writing, and 44 of rewriting.) 6 | 7 | I think it's far more important to write well than most people realize. Writing doesn't just communicate ideas; it generates them. If you're bad at writing and don't like to do it, you'll miss out on most of the ideas writing would have generated. 8 | 9 | As for how to write well, here's the short version: Write a bad version 1 as fast as you can; rewrite it over and over; cut out everything unnecessary; write in a conversational tone; develop a nose for bad writing, so you can see and fix it in yours; imitate writers you like; if you can't get started, tell someone what you plan to write about, then write down what you said; expect 80% of the ideas in an essay to happen after you start writing it, and 50% of those you start with to be wrong; be confident enough to cut; have friends you trust read your stuff and tell you which bits are confusing or drag; don't (always) make detailed outlines; mull ideas over for a few days before writing; carry a small notebook or scrap paper with you; start writing when you think of the first sentence; if a deadline forces you to start before that, just say the most important sentence first; write about stuff you like; don't try to sound impressive; don't hesitate to change the topic on the fly; use footnotes to contain digressions; use anaphora to knit sentences together; read your essays out loud to see (a) where you stumble over awkward phrases and (b) which bits are boring (the paragraphs you dread reading); try to tell the reader something new and useful; work in fairly big quanta of time; when you restart, begin by rereading what you have so far; when you finish, leave yourself something easy to start with; accumulate notes for topics you plan to cover at the bottom of the file; don't feel obliged to cover any of them; write for a reader who won't read the essay as carefully as you do, just as pop songs are designed to sound ok on crappy car radios; if you say anything mistaken, fix it immediately; ask friends which sentence you'll regret most; go back and tone down harsh remarks; publish stuff online, because an audience makes you write more, and thus generate more ideas; print out drafts instead of just looking at them on the screen; use simple, germanic words; learn to distinguish surprises from digressions; learn to recognize the approach of an ending, and when one appears, grab it. -------------------------------------------------------------------------------- /data/193.txt: -------------------------------------------------------------------------------- 1 | Bradley's Ghost 2 | 3 | November 2004 4 | 5 | A lot of people are writing now about why Kerry lost. Here I want to examine a more specific question: why were the exit polls so wrong? 6 | 7 | In Ohio, which Kerry ultimately lost 49-51, exit polls gave him a 52-48 victory. And this wasn't just random error. In every swing state they overestimated the Kerry vote. In Florida, which Bush ultimately won 52-47, exit polls predicted a dead heat. 8 | 9 | (These are not early numbers. They're from about midnight eastern time, long after polls closed in Ohio and Florida. And yet by the next afternoon the exit poll numbers online corresponded to the returns. The only way I can imagine this happening is if those in charge of the exit polls cooked the books after seeing the actual returns. But that's another issue.) 10 | 11 | What happened? The source of the problem may be a variant of the Bradley Effect. This term was invented after Tom Bradley, the black mayor of Los Angeles, lost an election for governor of California despite a comfortable lead in the polls. Apparently voters were afraid to say they planned to vote against him, lest their motives be (perhaps correctly) suspected. 12 | 13 | It seems likely that something similar happened in exit polls this year. In theory, exit polls ought to be very accurate. You're not asking people what they would do. You're asking what they just did. 14 | 15 | How can you get errors asking that? Because some people don't respond. To get a truly random sample, pollsters ask, say, every 20th person leaving the polling place who they voted for. But not everyone wants to answer. And the pollsters can't simply ignore those who won't, or their sample isn't random anymore. So what they do, apparently, is note down the age and race and sex of the person, and guess from that who they voted for. 16 | 17 | This works so long as there is no correlation between who people vote for and whether they're willing to talk about it. But this year there may have been. It may be that a significant number of those who voted for Bush didn't want to say so. 18 | 19 | Why not? Because people in the US are more conservative than they're willing to admit. The values of the elite in this country, at least at the moment, are NPR values. The average person, as I think both Republicans and Democrats would agree, is more socially conservative. But while some openly flaunt the fact that they don't share the opinions of the elite, others feel a little nervous about it, as if they had bad table manners. 20 | 21 | For example, according to current NPR values, you can't say anything that might be perceived as disparaging towards homosexuals. To do so is "homophobic." And yet a large number of Americans are deeply religious, and the Bible is quite explicit on the subject of homosexuality. What are they to do? I think what many do is keep their opinions, but keep them to themselves. 22 | 23 | They know what they believe, but they also know what they're supposed to believe. And so when a stranger (for example, a pollster) asks them their opinion about something like gay marriage, they will not always say what they really think. 24 | 25 | When the values of the elite are liberal, polls will tend to underestimate the conservativeness of ordinary voters. This seems to me the leading theory to explain why the exit polls were so far off this year. NPR values said one ought to vote for Kerry. So all the people who voted for Kerry felt virtuous for doing so, and were eager to tell pollsters they had. No one who voted for Kerry did it as an act of quiet defiance. -------------------------------------------------------------------------------- /data/197.txt: -------------------------------------------------------------------------------- 1 | The Python Paradox 2 | 3 | August 2004 4 | 5 | In a recent talk I said something that upset a lot of people: that you could get smarter programmers to work on a Python project than you could to work on a Java project. 6 | 7 | I didn't mean by this that Java programmers are dumb. I meant that Python programmers are smart. It's a lot of work to learn a new programming language. And people don't learn Python because it will get them a job; they learn it because they genuinely like to program and aren't satisfied with the languages they already know. 8 | 9 | Which makes them exactly the kind of programmers companies should want to hire. Hence what, for lack of a better name, I'll call the Python paradox: if a company chooses to write its software in a comparatively esoteric language, they'll be able to hire better programmers, because they'll attract only those who cared enough to learn it. And for programmers the paradox is even more pronounced: the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job. 10 | 11 | Only a few companies have been smart enough to realize this so far. But there is a kind of selection going on here too: they're exactly the companies programmers would most like to work for. Google, for example. When they advertise Java programming jobs, they also want Python experience. 12 | 13 | A friend of mine who knows nearly all the widely used languages uses Python for most of his projects. He says the main reason is that he likes the way source code looks. That may seem a frivolous reason to choose one language over another. But it is not so frivolous as it sounds: when you program, you spend more time reading code than writing it. You push blobs of source code around the way a sculptor does blobs of clay. So a language that makes source code ugly is maddening to an exacting programmer, as clay full of lumps would be to a sculptor. 14 | 15 | At the mention of ugly source code, people will of course think of Perl. But the superficial ugliness of Perl is not the sort I mean. Real ugliness is not harsh-looking syntax, but having to build programs out of the wrong concepts. Perl may look like a cartoon character swearing, but there are cases where it surpasses Python conceptually. 16 | 17 | So far, anyway. Both languages are of course moving targets. But they share, along with Ruby (and Icon, and Joy, and J, and Lisp, and Smalltalk) the fact that they're created by, and used by, people who really care about programming. And those tend to be the ones who do it well. -------------------------------------------------------------------------------- /data/2.txt: -------------------------------------------------------------------------------- 1 | Writes and Write-Nots 2 | 3 | October 2024 4 | 5 | I'm usually reluctant to make predictions about technology, but I feel fairly confident about this one: in a couple decades there won't be many people who can write. 6 | 7 | One of the strangest things you learn if you're a writer is how many people have trouble writing. Doctors know how many people have a mole they're worried about; people who are good at setting up computers know how many people aren't; writers know how many people need help writing. 8 | 9 | The reason so many people have trouble writing is that it's fundamentally difficult. To write well you have to think clearly, and thinking clearly is hard. 10 | 11 | And yet writing pervades many jobs, and the more prestigious the job, the more writing it tends to require. 12 | 13 | These two powerful opposing forces, the pervasive expectation of writing and the irreducible difficulty of doing it, create enormous pressure. This is why eminent professors often turn out to have resorted to plagiarism. The most striking thing to me about these cases is the pettiness of the thefts. The stuff they steal is usually the most mundane boilerplate — the sort of thing that anyone who was even halfway decent at writing could turn out with no effort at all. Which means they're not even halfway decent at writing. 14 | 15 | Till recently there was no convenient escape valve for the pressure created by these opposing forces. You could pay someone to write for you, like JFK, or plagiarize, like MLK, but if you couldn't buy or steal words, you had to write them yourself. And as a result nearly everyone who was expected to write had to learn how. 16 | 17 | Not anymore. AI has blown this world open. Almost all pressure to write has dissipated. You can have AI do it for you, both in school and at work. 18 | 19 | The result will be a world divided into writes and write-nots. There will still be some people who can write. Some of us like it. But the middle ground between those who are good at writing and those who can't write at all will disappear. Instead of good writers, ok writers, and people who can't write, there will just be good writers and people who can't write. 20 | 21 | Is that so bad? Isn't it common for skills to disappear when technology makes them obsolete? There aren't many blacksmiths left, and it doesn't seem to be a problem. 22 | 23 | Yes, it's bad. The reason is something I mentioned earlier: writing is thinking. In fact there's a kind of thinking that can only be done by writing. You can't make this point better than Leslie Lamport did: 24 | If you're thinking without writing, you only think you're thinking. 25 | So a world divided into writes and write-nots is more dangerous than it sounds. It will be a world of thinks and think-nots. I know which half I want to be in, and I bet you do too. 26 | 27 | This situation is not unprecedented. In preindustrial times most people's jobs made them strong. Now if you want to be strong, you work out. So there are still strong people, but only those who choose to be. 28 | 29 | It will be the same with writing. There will still be smart people, but only those who choose to be. 30 | -------------------------------------------------------------------------------- /data/20.txt: -------------------------------------------------------------------------------- 1 | Weird Languages 2 | 3 | August 2021 4 | 5 | When people say that in their experience all programming languages are basically equivalent, they're making a statement not about languages but about the kind of programming they've done. 6 | 7 | 99.5% of programming consists of gluing together calls to library functions. All popular languages are equally good at this. So one can easily spend one's whole career operating in the intersection of popular programming languages. 8 | 9 | But the other .5% of programming is disproportionately interesting. If you want to learn what it consists of, the weirdness of weird languages is a good clue to follow. 10 | 11 | Weird languages aren't weird by accident. Not the good ones, at least. The weirdness of the good ones usually implies the existence of some form of programming that's not just the usual gluing together of library calls. 12 | 13 | A concrete example: Lisp macros. Lisp macros seem weird even to many Lisp programmers. They're not only not in the intersection of popular languages, but by their nature would be hard to implement properly in a language without turning it into a dialect of Lisp. And macros are definitely evidence of techniques that go beyond glue programming. For example, solving problems by first writing a language for problems of that type, and then writing your specific application in it. Nor is this all you can do with macros; it's just one region in a space of program-manipulating techniques that even now is far from fully explored. 14 | 15 | So if you want to expand your concept of what programming can be, one way to do it is by learning weird languages. Pick a language that most programmers consider weird but whose median user is smart, and then focus on the differences between this language and the intersection of popular languages. What can you say in this language that would be impossibly inconvenient to say in others? In the process of learning how to say things you couldn't previously say, you'll probably be learning how to think things you couldn't previously think. 16 | -------------------------------------------------------------------------------- /data/203.txt: -------------------------------------------------------------------------------- 1 | Filters that Fight Back 2 | 3 | August 2003 4 | 5 | We may be able to improve the accuracy of Bayesian spam filters by having them follow links to see what's waiting at the other end. Richard Jowsey of death2spam now does this in borderline cases, and reports that it works well. 6 | 7 | Why only do it in borderline cases? And why only do it once? 8 | 9 | As I mentioned in Will Filters Kill Spam?, following all the urls in a spam would have an amusing side-effect. If popular email clients did this in order to filter spam, the spammer's servers would take a serious pounding. The more I think about this, the better an idea it seems. This isn't just amusing; it would be hard to imagine a more perfectly targeted counterattack on spammers. 10 | 11 | So I'd like to suggest an additional feature to those working on spam filters: a "punish" mode which, if turned on, would spider every url in a suspected spam n times, where n could be set by the user. [1] 12 | 13 | As many people have noted, one of the problems with the current email system is that it's too passive. It does whatever you tell it. So far all the suggestions for fixing the problem seem to involve new protocols. This one wouldn't. 14 | 15 | If widely used, auto-retrieving spam filters would make the email system rebound. The huge volume of the spam, which has so far worked in the spammer's favor, would now work against him, like a branch snapping back in his face. Auto-retrieving spam filters would drive the spammer's costs up, and his sales down: his bandwidth usage would go through the roof, and his servers would grind to a halt under the load, which would make them unavailable to the people who would have responded to the spam. 16 | 17 | Pump out a million emails an hour, get a million hits an hour on your servers. 18 | 19 | We would want to ensure that this is only done to suspected spams. As a rule, any url sent to millions of people is likely to be a spam url, so submitting every http request in every email would work fine nearly all the time. But there are a few cases where this isn't true: the urls at the bottom of mails sent from free email services like Yahoo Mail and Hotmail, for example. 20 | 21 | To protect such sites, and to prevent abuse, auto-retrieval should be combined with blacklists of spamvertised sites. Only sites on a blacklist would get crawled, and sites would be blacklisted only after being inspected by humans. The lifetime of a spam must be several hours at least, so it should be easy to update such a list in time to interfere with a spam promoting a new site. [2] 22 | 23 | High-volume auto-retrieval would only be practical for users on high-bandwidth connections, but there are enough of those to cause spammers serious trouble. Indeed, this solution neatly mirrors the problem. The problem with spam is that in order to reach a few gullible people the spammer sends mail to everyone. The non-gullible recipients are merely collateral damage. But the non-gullible majority won't stop getting spam until they can stop (or threaten to stop) the gullible from responding to it. Auto-retrieving spam filters offer them a way to do this. 24 | 25 | Would that kill spam? Not quite. The biggest spammers could probably protect their servers against auto-retrieving filters. However, the easiest and cheapest way for them to do it would be to include working unsubscribe links in their mails. And this would be a necessity for smaller fry, and for "legitimate" sites that hired spammers to promote them. So if auto-retrieving filters became widespread, they'd become auto-unsubscribing filters. 26 | 27 | In this scenario, spam would, like OS crashes, viruses, and popups, become one of those plagues that only afflict people who don't bother to use the right software. 28 | 29 | 30 | 31 | Notes 32 | 33 | [1] Auto-retrieving filters will have to follow redirects, and should in some cases (e.g. a page that just says "click here") follow more than one level of links. Make sure too that the http requests are indistinguishable from those of popular Web browsers, including the order and referrer. 34 | 35 | If the response doesn't come back within x amount of time, default to some fairly high spam probability. 36 | 37 | Instead of making n constant, it might be a good idea to make it a function of the number of spams that have been seen mentioning the site. This would add a further level of protection against abuse and accidents. 38 | 39 | [2] The original version of this article used the term "whitelist" instead of "blacklist". Though they were to work like blacklists, I preferred to call them whitelists because it might make them less vulnerable to legal attack. This just seems to have confused readers, though. 40 | 41 | There should probably be multiple blacklists. A single point of failure would be vulnerable both to attack and abuse. -------------------------------------------------------------------------------- /data/205.txt: -------------------------------------------------------------------------------- 1 | If Lisp is So Great 2 | 3 | May 2003 4 | 5 | If Lisp is so great, why don't more people use it? I was asked this question by a student in the audience at a talk I gave recently. Not for the first time, either. 6 | 7 | In languages, as in so many things, there's not much correlation between popularity and quality. Why does John Grisham (King of Torts sales rank, 44) outsell Jane Austen (Pride and Prejudice sales rank, 6191)? Would even Grisham claim that it's because he's a better writer? 8 | 9 | Here's the first sentence of Pride and Prejudice: 10 | It is a truth universally acknowledged, that a single man in possession of a good fortune must be in want of a wife. 11 | "It is a truth universally acknowledged?" Long words for the first sentence of a love story. 12 | 13 | Like Jane Austen, Lisp looks hard. Its syntax, or lack of syntax, makes it look completely unlike the languages most people are used to. Before I learned Lisp, I was afraid of it too. I recently came across a notebook from 1983 in which I'd written: 14 | I suppose I should learn Lisp, but it seems so foreign. 15 | Fortunately, I was 19 at the time and not too resistant to learning new things. I was so ignorant that learning almost anything meant learning new things. 16 | 17 | People frightened by Lisp make up other reasons for not using it. The standard excuse, back when C was the default language, was that Lisp was too slow. Now that Lisp dialects are among the faster languages available, that excuse has gone away. Now the standard excuse is openly circular: that other languages are more popular. 18 | 19 | (Beware of such reasoning. It gets you Windows.) 20 | 21 | Popularity is always self-perpetuating, but it's especially so in programming languages. More libraries get written for popular languages, which makes them still more popular. Programs often have to work with existing programs, and this is easier if they're written in the same language, so languages spread from program to program like a virus. And managers prefer popular languages, because they give them more leverage over developers, who can more easily be replaced. 22 | 23 | Indeed, if programming languages were all more or less equivalent, there would be little justification for using any but the most popular. But they aren't all equivalent, not by a long shot. And that's why less popular languages, like Jane Austen's novels, continue to survive at all. When everyone else is reading the latest John Grisham novel, there will always be a few people reading Jane Austen instead. -------------------------------------------------------------------------------- /data/213.txt: -------------------------------------------------------------------------------- 1 | What Languages Fix 2 | 3 | Kevin Kelleher suggested an interesting way to compare programming languages: to describe each in terms of the problem it fixes. The surprising thing is how many, and how well, languages can be described this way. 4 | 5 | 6 | Algol: Assembly language is too low-level. 7 | 8 | Pascal: Algol doesn't have enough data types. 9 | 10 | Modula: Pascal is too wimpy for systems programming. 11 | 12 | Simula: Algol isn't good enough at simulations. 13 | 14 | Smalltalk: Not everything in Simula is an object. 15 | 16 | Fortran: Assembly language is too low-level. 17 | 18 | Cobol: Fortran is scary. 19 | 20 | PL/1: Fortran doesn't have enough data types. 21 | 22 | Ada: Every existing language is missing something. 23 | 24 | Basic: Fortran is scary. 25 | 26 | APL: Fortran isn't good enough at manipulating arrays. 27 | 28 | J: APL requires its own character set. 29 | 30 | C: Assembly language is too low-level. 31 | 32 | C++: C is too low-level. 33 | 34 | Java: C++ is a kludge. And Microsoft is going to crush us. 35 | 36 | C#: Java is controlled by Sun. 37 | 38 | Lisp: Turing Machines are an awkward way to describe computation. 39 | 40 | Scheme: MacLisp is a kludge. 41 | 42 | T: Scheme has no libraries. 43 | 44 | Common Lisp: There are too many dialects of Lisp. 45 | 46 | Dylan: Scheme has no libraries, and Lisp syntax is scary. 47 | 48 | Perl: Shell scripts/awk/sed are not enough like programming languages. 49 | 50 | Python: Perl is a kludge. 51 | 52 | Ruby: Perl is a kludge, and Lisp syntax is scary. 53 | 54 | Prolog: Programming is not enough like logic. -------------------------------------------------------------------------------- /data/215.txt: -------------------------------------------------------------------------------- 1 | Why Arc Isn't Especially Object-Oriented 2 | 3 | There is a kind of mania for object-oriented programming at the moment, but some of the smartest programmers I know are some of the least excited about it. 4 | 5 | My own feeling is that object-oriented programming is a useful technique in some cases, but it isn't something that has to pervade every program you write. You should be able to define new types, but you shouldn't have to express every program as the definition of new types. 6 | 7 | I think there are five reasons people like object-oriented programming, and three and a half of them are bad: 8 | 9 | 10 | Object-oriented programming is exciting if you have a statically-typed language without lexical closures or macros. To some degree, it offers a way around these limitations. (See Greenspun's Tenth Rule.) 11 | 12 | Object-oriented programming is popular in big companies, because it suits the way they write software. At big companies, software tends to be written by large (and frequently changing) teams of mediocre programmers. Object-oriented programming imposes a discipline on these programmers that prevents any one of them from doing too much damage. The price is that the resulting code is bloated with protocols and full of duplication. This is not too high a price for big companies, because their software is probably going to be bloated and full of duplication anyway. 13 | 14 | Object-oriented programming generates a lot of what looks like work. Back in the days of fanfold, there was a type of programmer who would only put five or ten lines of code on a page, preceded by twenty lines of elaborately formatted comments. Object-oriented programming is like crack for these people: it lets you incorporate all this scaffolding right into your source code. Something that a Lisp hacker might handle by pushing a symbol onto a list becomes a whole file of classes and methods. So it is a good tool if you want to convince yourself, or someone else, that you are doing a lot of work. 15 | 16 | If a language is itself an object-oriented program, it can be extended by users. Well, maybe. Or maybe you can do even better by offering the sub-concepts of object-oriented programming a la carte. Overloading, for example, is not intrinsically tied to classes. We'll see. 17 | 18 | Object-oriented abstractions map neatly onto the domains of certain specific kinds of programs, like simulations and CAD systems. 19 | I personally have never needed object-oriented abstractions. Common Lisp has an enormously powerful object system and I've never used it once. I've done a lot of things (e.g. making hash tables full of closures) that would have required object-oriented techniques to do in wimpier languages, but I have never had to use CLOS. 20 | 21 | Maybe I'm just stupid, or have worked on some limited subset of applications. There is a danger in designing a language based on one's own experience of programming. But it seems more dangerous to put stuff in that you've never needed because it's thought to be a good idea. -------------------------------------------------------------------------------- /data/216.txt: -------------------------------------------------------------------------------- 1 | 2 | What Made Lisp Different 3 | 4 | December 2001 (rev. May 2002) 5 | (This article came about in response to some questions on the LL1 mailing list. It is now incorporated in Revenge of the Nerds.) 6 | 7 | When McCarthy designed Lisp in the late 1950s, it was a radical departure from existing languages, the most important of which was Fortran. 8 | 9 | Lisp embodied nine new ideas: 10 | 11 | 12 | 1. Conditionals. A conditional is an if-then-else construct. We take these for granted now. They were invented by McCarthy in the course of developing Lisp. (Fortran at that time only had a conditional goto, closely based on the branch instruction in the underlying hardware.) McCarthy, who was on the Algol committee, got conditionals into Algol, whence they spread to most other languages. 13 | 14 | 2. A function type. In Lisp, functions are first class objects-- they're a data type just like integers, strings, etc, and have a literal representation, can be stored in variables, can be passed as arguments, and so on. 15 | 16 | 3. Recursion. Recursion existed as a mathematical concept before Lisp of course, but Lisp was the first programming language to support it. (It's arguably implicit in making functions first class objects.) 17 | 18 | 4. A new concept of variables. In Lisp, all variables are effectively pointers. Values are what have types, not variables, and assigning or binding variables means copying pointers, not what they point to. 19 | 20 | 5. Garbage-collection. 21 | 22 | 6. Programs composed of expressions. Lisp programs are trees of expressions, each of which returns a value. (In some Lisps expressions can return multiple values.) This is in contrast to Fortran and most succeeding languages, which distinguish between expressions and statements. 23 | 24 | It was natural to have this distinction in Fortran because (not surprisingly in a language where the input format was punched cards) the language was line-oriented. You could not nest statements. And so while you needed expressions for math to work, there was no point in making anything else return a value, because there could not be anything waiting for it. 25 | 26 | This limitation went away with the arrival of block-structured languages, but by then it was too late. The distinction between expressions and statements was entrenched. It spread from Fortran into Algol and thence to both their descendants. 27 | 28 | When a language is made entirely of expressions, you can compose expressions however you want. You can say either (using Arc syntax) 29 | 30 | (if foo (= x 1) (= x 2)) 31 | 32 | or 33 | 34 | (= x (if foo 1 2)) 35 | 36 | 7. A symbol type. Symbols differ from strings in that you can test equality by comparing a pointer. 37 | 38 | 8. A notation for code using trees of symbols. 39 | 40 | 9. The whole language always available. There is no real distinction between read-time, compile-time, and runtime. You can compile or run code while reading, read or run code while compiling, and read or compile code at runtime. 41 | 42 | Running code at read-time lets users reprogram Lisp's syntax; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp's use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using s-expressions, an idea recently reinvented as XML. 43 | 44 | 45 | When Lisp was first invented, all these ideas were far removed from ordinary programming practice, which was dictated largely by the hardware available in the late 1950s. 46 | 47 | Over time, the default language, embodied in a succession of popular languages, has gradually evolved toward Lisp. 1-5 are now widespread. 6 is starting to appear in the mainstream. Python has a form of 7, though there doesn't seem to be any syntax for it. 8, which (with 9) is what makes Lisp macros possible, is so far still unique to Lisp, perhaps because (a) it requires those parens, or something just as bad, and (b) if you add that final increment of power, you can no longer claim to have invented a new language, but only to have designed a new dialect of Lisp ; -) 48 | 49 | Though useful to present-day programmers, it's strange to describe Lisp in terms of its variation from the random expedients other languages adopted. That was not, probably, how McCarthy thought of it. Lisp wasn't designed to fix the mistakes in Fortran; it came about more as the byproduct of an attempt to axiomatize computation. -------------------------------------------------------------------------------- /data/218.txt: -------------------------------------------------------------------------------- 1 | The Roots of Lisp 2 | 3 | May 2001 4 | (I wrote this article to help myself understand exactly what McCarthy discovered. You don't need to know this stuff to program in Lisp, but it should be helpful to anyone who wants to understand the essence of Lisp — both in the sense of its origins and its semantic core. The fact that it has such a core is one of Lisp's distinguishing features, and the reason why, unlike other languages, Lisp has dialects.) 5 | 6 | In 1960, John McCarthy published a remarkable paper in which he did for programming something like what Euclid did for geometry. He showed how, given a handful of simple operators and a notation for functions, you can build a whole programming language. He called this language Lisp, for "List Processing," because one of his key ideas was to use a simple data structure called a list for both code and data. 7 | 8 | It's worth understanding what McCarthy discovered, not just as a landmark in the history of computers, but as a model for what programming is tending to become in our own time. It seems to me that there have been two really clean, consistent models of programming so far: the C model and the Lisp model. These two seem points of high ground, with swampy lowlands between them. As computers have grown more powerful, the new languages being developed have been moving steadily toward the Lisp model. A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add to it, piecemeal, parts taken from the Lisp model, like runtime typing and garbage collection. 9 | 10 | In this article I'm going to try to explain in the simplest possible terms what McCarthy discovered. The point is not just to learn about an interesting theoretical result someone figured out forty years ago, but to show where languages are heading. The unusual thing about Lisp — in fact, the defining quality of Lisp — is that it can be written in itself. To understand what McCarthy meant by this, we're going to retrace his steps, with his mathematical notation translated into running Common Lisp code. -------------------------------------------------------------------------------- /data/223.txt: -------------------------------------------------------------------------------- 1 | Lisp for Web-Based Applications 2 | 3 | After a link to Beating the Averages was posted on slashdot, some readers wanted to hear in more detail about the specific technical advantages we got from using Lisp in Viaweb. For those who are interested, here are some excerpts from a talk I gave in April 2001 at BBN Labs in Cambridge, MA. -------------------------------------------------------------------------------- /data/225.txt: -------------------------------------------------------------------------------- 1 | This Year We Can End the Death Penalty in California 2 | 3 | November 2016 4 | 5 | If you're a California voter, there is an important proposition on your ballot this year: Proposition 62, which bans the death penalty. 6 | 7 | When I was younger I used to think the debate about the death penalty was about when it's ok to take a human life. Is it ok to kill a killer? 8 | 9 | But that is not the issue here. 10 | 11 | The real world does not work like the version I was shown on TV growing up. The police often arrest the wrong person. Defendants' lawyers are often incompetent. And prosecutors are often motivated more by publicity than justice. 12 | 13 | In the real world, about 4% of people sentenced to death are innocent. So this is not about whether it's ok to kill killers. This is about whether it's ok to kill innocent people. 14 | 15 | A child could answer that one for you. 16 | 17 | This year, in California, you have a chance to end this, by voting yes on Proposition 62. But beware, because there is another proposition, Proposition 66, whose goal is to make it easier to execute people. So yes on 62, no on 66. 18 | 19 | It's time. -------------------------------------------------------------------------------- /data/25.txt: -------------------------------------------------------------------------------- 1 | An NFT That Saves Lives 2 | 3 | May 2021 4 | 5 | Noora Health, a nonprofit I've supported for years, just launched a new NFT. It has a dramatic name, Save Thousands of Lives, because that's what the proceeds will do. 6 | 7 | Noora has been saving lives for 7 years. They run programs in hospitals in South Asia to teach new mothers how to take care of their babies once they get home. They're in 165 hospitals now. And because they know the numbers before and after they start at a new hospital, they can measure the impact they have. It is massive. For every 1000 live births, they save 9 babies. 8 | 9 | This number comes from a study of 133,733 families at 28 different hospitals that Noora conducted in collaboration with the Better Birth team at Ariadne Labs, a joint center for health systems innovation at Brigham and Women’s Hospital and Harvard T.H. Chan School of Public Health. 10 | 11 | Noora is so effective that even if you measure their costs in the most conservative way, by dividing their entire budget by the number of lives saved, the cost of saving a life is the lowest I've seen. $1,235. 12 | 13 | For this NFT, they're going to issue a public report tracking how this specific tranche of money is spent, and estimating the number of lives saved as a result. 14 | 15 | NFTs are a new territory, and this way of using them is especially new, but I'm excited about its potential. And I'm excited to see what happens with this particular auction, because unlike an NFT representing something that has already happened, this NFT gets better as the price gets higher. 16 | 17 | The reserve price was about $2.5 million, because that's what it takes for the name to be accurate: that's what it costs to save 2000 lives. But the higher the price of this NFT goes, the more lives will be saved. What a sentence to be able to write. -------------------------------------------------------------------------------- /data/26.txt: -------------------------------------------------------------------------------- 1 | The Real Reason to End the Death Penalty 2 | 3 | April 2021 4 | 5 | When intellectuals talk about the death penalty, they talk about things like whether it's permissible for the state to take someone's life, whether the death penalty acts as a deterrent, and whether more death sentences are given to some groups than others. But in practice the debate about the death penalty is not about whether it's ok to kill murderers. It's about whether it's ok to kill innocent people, because at least 4% of people on death row are innocent. 6 | 7 | When I was a kid I imagined that it was unusual for people to be convicted of crimes they hadn't committed, and that in murder cases especially this must be very rare. Far from it. Now, thanks to organizations like the Innocence Project, we see a constant stream of stories about murder convictions being overturned after new evidence emerges. Sometimes the police and prosecutors were just very sloppy. Sometimes they were crooked, and knew full well they were convicting an innocent person. 8 | 9 | Kenneth Adams and three other men spent 18 years in prison on a murder conviction. They were exonerated after DNA testing implicated three different men, two of whom later confessed. The police had been told about the other men early in the investigation, but never followed up the lead. 10 | 11 | Keith Harward spent 33 years in prison on a murder conviction. He was convicted because "experts" said his teeth matched photos of bite marks on one victim. He was exonerated after DNA testing showed the murder had been committed by another man, Jerry Crotty. 12 | 13 | Ricky Jackson and two other men spent 39 years in prison after being convicted of murder on the testimony of a 12 year old boy, who later recanted and said he'd been coerced by police. Multiple people have confirmed the boy was elsewhere at the time. The three men were exonerated after the county prosecutor dropped the charges, saying "The state is conceding the obvious." 14 | 15 | Alfred Brown spent 12 years in prison on a murder conviction, including 10 years on death row. He was exonerated after it was discovered that the assistant district attorney had concealed phone records proving he could not have committed the crimes. 16 | 17 | Glenn Ford spent 29 years on death row after having been convicted of murder. He was exonerated after new evidence proved he was not even at the scene when the murder occurred. The attorneys assigned to represent him had never tried a jury case before. 18 | 19 | Cameron Willingham was actually executed in 2004 by lethal injection. The "expert" who testified that he deliberately set fire to his house has since been discredited. A re-examination of the case ordered by the state of Texas in 2009 concluded that "a finding of arson could not be sustained." 20 | 21 | Rich Glossip has spent 20 years on death row after being convicted of murder on the testimony of the actual killer, who escaped with a life sentence in return for implicating him. In 2015 he came within minutes of execution before it emerged that Oklahoma had been planning to kill him with an illegal combination of drugs. They still plan to go ahead with the execution, perhaps as soon as this summer, despite new evidence exonerating him. 22 | 23 | I could go on. There are hundreds of similar cases. In Florida alone, 29 death row prisoners have been exonerated so far. 24 | 25 | Far from being rare, wrongful murder convictions are very common. Police are under pressure to solve a crime that has gotten a lot of attention. When they find a suspect, they want to believe he's guilty, and ignore or even destroy evidence suggesting otherwise. District attorneys want to be seen as effective and tough on crime, and in order to win convictions are willing to manipulate witnesses and withhold evidence. Court-appointed defense attorneys are overworked and often incompetent. There's a ready supply of criminals willing to give false testimony in return for a lighter sentence, suggestible witnesses who can be made to say whatever police want, and bogus "experts" eager to claim that science proves the defendant is guilty. And juries want to believe them, since otherwise some terrible crime remains unsolved. 26 | 27 | This circus of incompetence and dishonesty is the real issue with the death penalty. We don't even reach the point where theoretical questions about the moral justification or effectiveness of capital punishment start to matter, because so many of the people sentenced to death are actually innocent. Whatever it means in theory, in practice capital punishment means killing innocent people. -------------------------------------------------------------------------------- /data/28.txt: -------------------------------------------------------------------------------- 1 | Write Simply 2 | 3 | March 2021 4 | 5 | I try to write using ordinary words and simple sentences. 6 | 7 | That kind of writing is easier to read, and the easier something is to read, the more deeply readers will engage with it. The less energy they expend on your prose, the more they'll have left for your ideas. 8 | 9 | And the further they'll read. Most readers' energy tends to flag part way through an article or essay. If the friction of reading is low enough, more keep going till the end. 10 | 11 | There's an Italian dish called saltimbocca, which means "leap into the mouth." My goal when writing might be called saltintesta: the ideas leap into your head and you barely notice the words that got them there. 12 | 13 | It's too much to hope that writing could ever be pure ideas. You might not even want it to be. But for most writers, most of the time, that's the goal to aim for. The gap between most writing and pure ideas is not filled with poetry. 14 | 15 | Plus it's more considerate to write simply. When you write in a fancy way to impress people, you're making them do extra work just so you can seem cool. It's like trailing a long train behind you that readers have to carry. 16 | 17 | And remember, if you're writing in English, that a lot of your readers won't be native English speakers. Their understanding of ideas may be way ahead of their understanding of English. So you can't assume that writing about a difficult topic means you can use difficult words. 18 | 19 | Of course, fancy writing doesn't just conceal ideas. It can also conceal the lack of them. That's why some people write that way, to conceal the fact that they have nothing to say. Whereas writing simply keeps you honest. If you say nothing simply, it will be obvious to everyone, including you. 20 | 21 | Simple writing also lasts better. People reading your stuff in the future will be in much the same position as people from other countries reading it today. The culture and the language will have changed. It's not vain to care about that, any more than it's vain for a woodworker to build a chair to last. 22 | 23 | Indeed, lasting is not merely an accidental quality of chairs, or writing. It's a sign you did a good job. 24 | 25 | But although these are all real advantages of writing simply, none of them are why I do it. The main reason I write simply is that it offends me not to. When I write a sentence that seems too complicated, or that uses unnecessarily intellectual words, it doesn't seem fancy to me. It seems clumsy. 26 | 27 | There are of course times when you want to use a complicated sentence or fancy word for effect. But you should never do it by accident. 28 | 29 | The other reason my writing ends up being simple is the way I do it. I write the first draft fast, then spend days editing it, trying to get everything just right. Much of this editing is cutting, and that makes simple writing even simpler. -------------------------------------------------------------------------------- /data/29.txt: -------------------------------------------------------------------------------- 1 | Donate Unrestricted 2 | 3 | March 2021 4 | 5 | The secret curse of the nonprofit world is restricted donations. If you haven't been involved with nonprofits, you may never have heard this phrase before. But if you have been, it probably made you wince. 6 | 7 | Restricted donations mean donations where the donor limits what can be done with the money. This is common with big donations, perhaps the default. And yet it's usually a bad idea. Usually the way the donor wants the money spent is not the way the nonprofit would have chosen. Otherwise there would have been no need to restrict the donation. But who has a better understanding of where money needs to be spent, the nonprofit or the donor? 8 | 9 | If a nonprofit doesn't understand better than its donors where money needs to be spent, then it's incompetent and you shouldn't be donating to it at all. 10 | 11 | Which means a restricted donation is inherently suboptimal. It's either a donation to a bad nonprofit, or a donation for the wrong things. 12 | 13 | There are a couple exceptions to this principle. One is when the nonprofit is an umbrella organization. It's reasonable to make a restricted donation to a university, for example, because a university is only nominally a single nonprofit. Another exception is when the donor actually does know as much as the nonprofit about where money needs to be spent. The Gates Foundation, for example, has specific goals and often makes restricted donations to individual nonprofits to accomplish them. But unless you're a domain expert yourself or donating to an umbrella organization, your donation would do more good if it were unrestricted. 14 | 15 | If restricted donations do less good than unrestricted ones, why do donors so often make them? Partly because doing good isn't donors' only motive. They often have other motives as well — to make a mark, or to generate good publicity [1], or to comply with regulations or corporate policies. Many donors may simply never have considered the distinction between restricted and unrestricted donations. They may believe that donating money for some specific purpose is just how donation works. And to be fair, nonprofits don't try very hard to discourage such illusions. They can't afford to. People running nonprofits are almost always anxious about money. They can't afford to talk back to big donors. 16 | 17 | You can't expect candor in a relationship so asymmetric. So I'll tell you what nonprofits wish they could tell you. If you want to donate to a nonprofit, donate unrestricted. If you trust them to spend your money, trust them to decide how. 18 | 19 | 20 | 21 | 22 | 23 | Note 24 | 25 | [1] Unfortunately restricted donations tend to generate more publicity than unrestricted ones. "X donates money to build a school in Africa" is not only more interesting than "X donates money to Y nonprofit to spend as Y chooses," but also focuses more attention on X. -------------------------------------------------------------------------------- /data/326.txt: -------------------------------------------------------------------------------- 1 | this is a super common question where they where someone wants to start a startup and they're like well how do I get a co-founder or how do I get my first employees and my advice is the following first you have to convince yourself if you're not fully committed or if you have grave doubts that your idea is any good or it's even worth trying how can you ever convince someone else and people can tell if you don't believe in the thing you're doing and so if you really have that fire that you're onto something that's worth doing and you're convinced then it's much easier to convince other people to join you and you can tell them that you can tell them how commit you are and frankly the same thing goes for getting your first customers getting your first partners giving your first employees for everyone it all comes down to this core of you being convinced of the story that you're telling it in it being true to you and then your confidence will flow out to everyone else okay so how do you convince yourself and what does it mean to convince yourself do you ever know that feeling where an idea enters your head and you like can't sleep at night and you can't think about anything else but it and it starts to pervade your thoughts that's a good sign that's a sign that you might have a startup idea or a drive to work on something that'll have the kind of magnetism and power to keep you on it awhile if you just can't get it out of your head if you immediately are cynical about it and you're negative on it and you're just not that excited about it that's a sign that you're not convinced this is something that comes out in YC companies a lot is I always encourage people to work on the thing that they are very excited about and obsessed with even at the expense of working an idea that may seem easier to raise money for that may seem more commercially viable that may seem more like something that impresses other people and the reason I encourage this is I have consistently seen teams that don't believe in the thing they're doing secretly and they're not convinced by when they run into a rough patch and everyone always does but when they run into a rough patch they give up and I've seen teams where they really deeply are convinced of what they're working on they're convinced at the very least that they want to keep working together they want to keep their startup going and I've seen those teams overcome almost every kind of setback you can over you you can have you can run out of money and somehow survive you can get in you could have to completely pivot and change your idea but if you believe in what you're doing and in the big sense you can recover from that you could have team members quit you name it and if there's something deeply held in the mind of the startup founders about why they're doing what they're doing they can keep going right and if you're just like I'm just trying this look you know things won't work out the reason you should work on things that you really care about is the following it would appear that it's equally hard to succeed in a startup that you don't care about and one that you do and it's almost equally hard to succeed in a startup that's a very ambitious audacious idea as it is to do something super incremental that's not that exciting and if we assume for a second that those are equally difficult to accomplish do you see why you should definitely do on the way more audacious idea or the thing you're way more excited about right what's the point it's almost like if you have to travel a thousand miles to go somewhere you want to visit versus travel a thousand miles to somewhere that you have you're ambivalent about always go to the place you're much more excited about and the fact is your excitement and enthusiasm about it will encourage the chance that you're actually going to get there so sometimes people ask can you build excitement over time I don't really have anything that I'm that I'm super excited about yet but I have a few ideas absolutely you can get more excited you can follow more in love with an idea or you can fall more in love with entrepreneurship by doing it on the side and kind of discerning if you get more and more excited about spending time on it or less right like if if it feels like fun it feels like not work to work on your startup or your side project or what have you and it's just something you want to do because it's entertaining or enjoyable to you that's a good sign and I have seen people they kind of do something on the side and it's not exactly meant to be a business but people like it and the positive feedback loop of putting something out in the world and having people recognize it and appreciate it makes them more and more excited about spending more time on it and so you can definitely get data points from the external world that cause you to take your side project or your idea more seriously and so in conclusion to convince other people to join your startup you first have to convince yourself you -------------------------------------------------------------------------------- /data/332.txt: -------------------------------------------------------------------------------- 1 | yeah I just wanted to spend a couple of minutes talking about something that I think is absolutely vital to startup success but although it's fundamental is often somewhat overlooked and that is really the invention the creation of the story of your startup this might sound obvious or basic but it turns out that getting this right is actually not intuitively important and the reason it is so important is because startups are so hard they're so very very hard it is almost certainly going to be the hardest most difficult thing you will do in your professional career and if you don't create a story for the right story that you can tell yourself to keep going when things go wrong you'll quit and your startup will die so it's worthwhile my YC partner Aaron Harris who's going to be giving a lecture later on in start-up school thinks and talks a lot about stories and I'm indebted to him for a number of the ideas and what I'm about to say so there are stories and there are stories and the famous author Ian Forrester maybe said it best many many decades ago when he gave this example so the King died and then the Queen died is certainly a story but it's not a very interesting story is it it's not a story that grabs you it's not a story you necessarily care about but the King died and then the Queen died of grief well there's something there there's something that grabbed me there's something human there there's something in that story that seems to matter and it turns out founders spend a lot of time telling stories they tell stories about what they're doing they tell stories about the future that they're trying to create they tell stories originally maybe to their parents to their friends to they're family eventually two co-founders potential customers partners in the company investors but most of all they need to tell a story that resonates with themselves it's the story of your startup that will nourish you that will keep you going through hard times and setbacks it's a story that will persuade you to actually do this crazy thing and it's the story that will maybe just for those others per Sade them to join you on your journey how crazy it is to convince someone else to follow you on such an uncertain path it's not easy so we actually spend a lot of time at YC helping people craft and sometimes even reimagine their stories you -------------------------------------------------------------------------------- /data/36.txt: -------------------------------------------------------------------------------- 1 | Modeling a Wealth Tax 2 | 3 | August 2020 4 | 5 | Some politicians are proposing to introduce wealth taxes in addition to income and capital gains taxes. Let's try modeling the effects of various levels of wealth tax to see what they would mean in practice for a startup founder. 6 | 7 | Suppose you start a successful startup in your twenties, and then live for another 60 years. How much of your stock will a wealth tax consume? 8 | 9 | If the wealth tax applies to all your assets, it's easy to calculate its effect. A wealth tax of 1% means you get to keep 99% of your stock each year. After 60 years the proportion of stock you'll have left will be .99^60, or .547. So a straight 1% wealth tax means the government will over the course of your life take 45% of your stock. 10 | 11 | (Losing shares does not, obviously, mean becoming net poorer unless the value per share is increasing by less than the wealth tax rate.) 12 | 13 | Here's how much stock the government would take over 60 years at various levels of wealth tax: 14 | 15 | wealth tax government takes 16 | 0.1% 6% 17 | 0.5% 26% 18 | 1.0% 45% 19 | 2.0% 70% 20 | 3.0% 84% 21 | 4.0% 91% 22 | 5.0% 95% 23 | A wealth tax will usually have a threshold at which it starts. How much difference would a high threshold make? To model that, we need to make some assumptions about the initial value of your stock and the growth rate. 24 | 25 | Suppose your stock is initially worth $2 million, and the company's trajectory is as follows: the value of your stock grows 3x for 2 years, then 2x for 2 years, then 50% for 2 years, after which you just get a typical public company growth rate, which we'll call 8%. [1] Suppose the wealth tax threshold is $50 million. How much stock does the government take now? 26 | 27 | wealth tax government takes 28 | 0.1% 5% 29 | 0.5% 23% 30 | 1.0% 41% 31 | 2.0% 65% 32 | 3.0% 79% 33 | 4.0% 88% 34 | 5.0% 93% 35 | It may at first seem surprising that such apparently small tax rates produce such dramatic effects. A 2% wealth tax with a $50 million threshold takes about two thirds of a successful founder's stock. 36 | 37 | The reason wealth taxes have such dramatic effects is that they're applied over and over to the same money. Income tax happens every year, but only to that year's income. Whereas if you live for 60 years after acquiring some asset, a wealth tax will tax that same asset 60 times. A wealth tax compounds. 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | Note 46 | 47 | [1] In practice, eventually some of this 8% would come in the form of dividends, which are taxed as income at issue, so this model actually represents the most optimistic case for the founder. -------------------------------------------------------------------------------- /data/38.txt: -------------------------------------------------------------------------------- 1 | Orthodox Privilege 2 | 3 | July 2020 4 | 5 | "Few people are capable of expressing with equanimity opinions which differ from the prejudices of their social environment. Most people are even incapable of forming such opinions." 6 | 7 | — Einstein 8 | 9 | 10 | There has been a lot of talk about privilege lately. Although the concept is overused, there is something to it, and in particular to the idea that privilege makes you blind — that you can't see things that are visible to someone whose life is very different from yours. 11 | 12 | But one of the most pervasive examples of this kind of blindness is one that I haven't seen mentioned explicitly. I'm going to call it orthodox privilege: The more conventional-minded someone is, the more it seems to them that it's safe for everyone to express their opinions. 13 | 14 | It's safe for them to express their opinions, because the source of their opinions is whatever it's currently acceptable to believe. So it seems to them that it must be safe for everyone. They literally can't imagine a true statement that would get you in trouble. 15 | 16 | And yet at every point in history, there were true things that would get you in trouble to say. Is ours the first where this isn't so? What an amazing coincidence that would be. 17 | 18 | Surely it should at least be the default assumption that our time is not unique, and that there are true things you can't say now, just as there have always been. You would think. But even in the face of such overwhelming historical evidence, most people will go with their gut on this one. 19 | 20 | In the most extreme cases, people suffering from orthodox privilege will not only deny that there's anything true that you can't say, but will accuse you of heresy merely for saying there is. Though if there's more than one heresy current in your time, these accusations will be weirdly non-deterministic: you must either be an xist or a yist. 21 | 22 | Frustrating as it is to deal with these people, it's important to realize that they're in earnest. They're not pretending they think it's impossible for an idea to be both unorthodox and true. The world really looks that way to them. 23 | 24 | Indeed, this is a uniquely tenacious form of privilege. People can overcome the blindness induced by most forms of privilege by learning more about whatever they're not. But they can't overcome orthodox privilege just by learning more. They'd have to become more independent-minded. If that happens at all, it doesn't happen on the time scale of one conversation. 25 | 26 | It may be possible to convince some people that orthodox privilege must exist even though they can't sense it, just as one can with, say, dark matter. There may be some who could be convinced, for example, that it's very unlikely that this is the first point in history at which there's nothing true you can't say, even if they can't imagine specific examples. 27 | 28 | But in general I don't think it will work to say "check your privilege" about this type of privilege, because those in its demographic don't realize they're in it. It doesn't seem to conventional-minded people that they're conventional-minded. It just seems to them that they're right. Indeed, they tend to be particularly sure of it. 29 | 30 | Perhaps the solution is to appeal to politeness. If someone says they can hear a high-pitched noise that you can't, it's only polite to take them at their word, instead of demanding evidence that's impossible to produce, or simply denying that they hear anything. Imagine how rude that would seem. Similarly, if someone says they can think of things that are true but that cannot be said, it's only polite to take them at their word, even if you can't think of any yourself. -------------------------------------------------------------------------------- /data/39.txt: -------------------------------------------------------------------------------- 1 | Coronavirus and Credibility 2 | 3 | April 2020 4 | 5 | I recently saw a video of TV journalists and politicians confidently saying that the coronavirus would be no worse than the flu. What struck me about it was not just how mistaken they seemed, but how daring. How could they feel safe saying such things? 6 | 7 | The answer, I realized, is that they didn't think they could get caught. They didn't realize there was any danger in making false predictions. These people constantly make false predictions, and get away with it, because the things they make predictions about either have mushy enough outcomes that they can bluster their way out of trouble, or happen so far in the future that few remember what they said. 8 | 9 | An epidemic is different. It falsifies your predictions rapidly and unequivocally. 10 | 11 | But epidemics are rare enough that these people clearly didn't realize this was even a possibility. Instead they just continued to use their ordinary m.o., which, as the epidemic has made clear, is to talk confidently about things they don't understand. 12 | 13 | An event like this is thus a uniquely powerful way of taking people's measure. As Warren Buffett said, "It's only when the tide goes out that you learn who's been swimming naked." And the tide has just gone out like never before. 14 | 15 | Now that we've seen the results, let's remember what we saw, because this is the most accurate test of credibility we're ever likely to have. I hope. -------------------------------------------------------------------------------- /data/41.txt: -------------------------------------------------------------------------------- 1 | Being a Noob 2 | 3 | January 2020 4 | 5 | When I was young, I thought old people had everything figured out. Now that I'm old, I know this isn't true. 6 | 7 | I constantly feel like a noob. It seems like I'm always talking to some startup working in a new field I know nothing about, or reading a book about a topic I don't understand well enough, or visiting some new country where I don't know how things work. 8 | 9 | It's not pleasant to feel like a noob. And the word "noob" is certainly not a compliment. And yet today I realized something encouraging about being a noob: the more of a noob you are locally, the less of a noob you are globally. 10 | 11 | For example, if you stay in your home country, you'll feel less of a noob than if you move to Farawavia, where everything works differently. And yet you'll know more if you move. So the feeling of being a noob is inversely correlated with actual ignorance. 12 | 13 | But if the feeling of being a noob is good for us, why do we dislike it? What evolutionary purpose could such an aversion serve? 14 | 15 | I think the answer is that there are two sources of feeling like a noob: being stupid, and doing something novel. Our dislike of feeling like a noob is our brain telling us "Come on, come on, figure this out." Which was the right thing to be thinking for most of human history. The life of hunter-gatherers was complex, but it didn't change as much as life does now. They didn't suddenly have to figure out what to do about cryptocurrency. So it made sense to be biased toward competence at existing problems over the discovery of new ones. It made sense for humans to dislike the feeling of being a noob, just as, in a world where food was scarce, it made sense for them to dislike the feeling of being hungry. 16 | 17 | Now that too much food is more of a problem than too little, our dislike of feeling hungry leads us astray. And I think our dislike of feeling like a noob does too. 18 | 19 | Though it feels unpleasant, and people will sometimes ridicule you for it, the more you feel like a noob, the better. -------------------------------------------------------------------------------- /data/43.txt: -------------------------------------------------------------------------------- 1 | The Two Kinds of Moderate 2 | 3 | December 2019 4 | 5 | There are two distinct ways to be politically moderate: on purpose and by accident. Intentional moderates are trimmers, deliberately choosing a position mid-way between the extremes of right and left. Accidental moderates end up in the middle, on average, because they make up their own minds about each question, and the far right and far left are roughly equally wrong. 6 | 7 | You can distinguish intentional from accidental moderates by the distribution of their opinions. If the far left opinion on some matter is 0 and the far right opinion 100, an intentional moderate's opinion on every question will be near 50. Whereas an accidental moderate's opinions will be scattered over a broad range, but will, like those of the intentional moderate, average to about 50. 8 | 9 | Intentional moderates are similar to those on the far left and the far right in that their opinions are, in a sense, not their own. The defining quality of an ideologue, whether on the left or the right, is to acquire one's opinions in bulk. You don't get to pick and choose. Your opinions about taxation can be predicted from your opinions about sex. And although intentional moderates might seem to be the opposite of ideologues, their beliefs (though in their case the word "positions" might be more accurate) are also acquired in bulk. If the median opinion shifts to the right or left, the intentional moderate must shift with it. Otherwise they stop being moderate. 10 | 11 | Accidental moderates, on the other hand, not only choose their own answers, but choose their own questions. They may not care at all about questions that the left and right both think are terribly important. So you can only even measure the politics of an accidental moderate from the intersection of the questions they care about and those the left and right care about, and this can sometimes be vanishingly small. 12 | 13 | It is not merely a manipulative rhetorical trick to say "if you're not with us, you're against us," but often simply false. 14 | 15 | Moderates are sometimes derided as cowards, particularly by the extreme left. But while it may be accurate to call intentional moderates cowards, openly being an accidental moderate requires the most courage of all, because you get attacked from both right and left, and you don't have the comfort of being an orthodox member of a large group to sustain you. 16 | 17 | Nearly all the most impressive people I know are accidental moderates. If I knew a lot of professional athletes, or people in the entertainment business, that might be different. Being on the far left or far right doesn't affect how fast you run or how well you sing. But someone who works with ideas has to be independent-minded to do it well. 18 | 19 | Or more precisely, you have to be independent-minded about the ideas you work with. You could be mindlessly doctrinaire in your politics and still be a good mathematician. In the 20th century, a lot of very smart people were Marxists — just no one who was smart about the subjects Marxism involves. But if the ideas you use in your work intersect with the politics of your time, you have two choices: be an accidental moderate, or be mediocre. 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Notes 32 | 33 | [1] It's possible in theory for one side to be entirely right and the other to be entirely wrong. Indeed, ideologues must always believe this is the case. But historically it rarely has been. 34 | 35 | [2] For some reason the far right tend to ignore moderates rather than despise them as backsliders. I'm not sure why. Perhaps it means that the far right is less ideological than the far left. Or perhaps that they are more confident, or more resigned, or simply more disorganized. I just don't know. 36 | 37 | [3] Having heretical opinions doesn't mean you have to express them openly. It may be easier to have them if you don't. 38 | 39 | Thanks to Austen Allred, Trevor Blackwell, Patrick Collison, Jessica Livingston, Amjad Masad, Ryan Petersen, and Harj Taggar for reading drafts of this. -------------------------------------------------------------------------------- /data/44.txt: -------------------------------------------------------------------------------- 1 | Fashionable Problems 2 | 3 | December 2019 4 | 5 | I've seen the same pattern in many different fields: even though lots of people have worked hard in the field, only a small fraction of the space of possibilities has been explored, because they've all worked on similar things. 6 | 7 | Even the smartest, most imaginative people are surprisingly conservative when deciding what to work on. People who would never dream of being fashionable in any other way get sucked into working on fashionable problems. 8 | 9 | If you want to try working on unfashionable problems, one of the best places to look is in fields that people think have already been fully explored: essays, Lisp, venture funding — you may notice a pattern here. If you can find a new approach into a big but apparently played out field, the value of whatever you discover will be multiplied by its enormous surface area. 10 | 11 | The best protection against getting drawn into working on the same things as everyone else may be to genuinely love what you're doing. Then you'll continue to work on it even if you make the same mistake as other people and think that it's too marginal to matter. -------------------------------------------------------------------------------- /data/47.txt: -------------------------------------------------------------------------------- 1 | Novelty and Heresy 2 | 3 | November 2019 4 | 5 | If you discover something new, there's a significant chance you'll be accused of some form of heresy. 6 | 7 | To discover new things, you have to work on ideas that are good but non-obvious; if an idea is obviously good, other people are probably already working on it. One common way for a good idea to be non-obvious is for it to be hidden in the shadow of some mistaken assumption that people are very attached to. But anything you discover from working on such an idea will tend to contradict the mistaken assumption that was concealing it. And you will thus get a lot of heat from people attached to the mistaken assumption. Galileo and Darwin are famous examples of this phenomenon, but it's probably always an ingredient in the resistance to new ideas. 8 | 9 | So it's particularly dangerous for an organization or society to have a culture of pouncing on heresy. When you suppress heresies, you don't just prevent people from contradicting the mistaken assumption you're trying to protect. You also suppress any idea that implies indirectly that it's false. 10 | 11 | Every cherished mistaken assumption has a dead zone of unexplored ideas around it. And the more preposterous the assumption, the bigger the dead zone it creates. 12 | 13 | There is a positive side to this phenomenon though. If you're looking for new ideas, one way to find them is by looking for heresies. When you look at the question this way, the depressingly large dead zones around mistaken assumptions become excitingly large mines of new ideas. -------------------------------------------------------------------------------- /data/49.txt: -------------------------------------------------------------------------------- 1 | General and Surprising 2 | 3 | September 2017 4 | 5 | The most valuable insights are both general and surprising. F = ma for example. But general and surprising is a hard combination to achieve. That territory tends to be picked clean, precisely because those insights are so valuable. 6 | 7 | Ordinarily, the best that people can do is one without the other: either surprising without being general (e.g. gossip), or general without being surprising (e.g. platitudes). 8 | 9 | Where things get interesting is the moderately valuable insights. You get those from small additions of whichever quality was missing. The more common case is a small addition of generality: a piece of gossip that's more than just gossip, because it teaches something interesting about the world. But another less common approach is to focus on the most general ideas and see if you can find something new to say about them. Because these start out so general, you only need a small delta of novelty to produce a useful insight. 10 | 11 | A small delta of novelty is all you'll be able to get most of the time. Which means if you take this route, your ideas will seem a lot like ones that already exist. Sometimes you'll find you've merely rediscovered an idea that did already exist. But don't be discouraged. Remember the huge multiplier that kicks in when you do manage to think of something even a little new. 12 | 13 | Corollary: the more general the ideas you're talking about, the less you should worry about repeating yourself. If you write enough, it's inevitable you will. Your brain is much the same from year to year and so are the stimuli that hit it. I feel slightly bad when I find I've said something close to what I've said before, as if I were plagiarizing myself. But rationally one shouldn't. You won't say something exactly the same way the second time, and that variation increases the chance you'll get that tiny but critical delta of novelty. 14 | 15 | And of course, ideas beget ideas. (That sounds familiar.) An idea with a small amount of novelty could lead to one with more. But only if you keep going. So it's doubly important not to let yourself be discouraged by people who say there's not much new about something you've discovered. "Not much new" is a real achievement when you're talking about the most general ideas. 16 | 17 | It's not true that there's nothing new under the sun. There are some domains where there's almost nothing new. But there's a big difference between nothing and almost nothing, when it's multiplied by the area under the sun. -------------------------------------------------------------------------------- /data/50.txt: -------------------------------------------------------------------------------- 1 | Charisma / Power 2 | 3 | January 2017 4 | 5 | People who are powerful but uncharismatic will tend to be disliked. Their power makes them a target for criticism that they don't have the charisma to disarm. That was Hillary Clinton's problem. It also tends to be a problem for any CEO who is more of a builder than a schmoozer. And yet the builder-type CEO is (like Hillary) probably the best person for the job. 6 | 7 | I don't think there is any solution to this problem. It's human nature. The best we can do is to recognize that it's happening, and to understand that being a magnet for criticism is sometimes a sign not that someone is the wrong person for a job, but that they're the right one. -------------------------------------------------------------------------------- /data/51.txt: -------------------------------------------------------------------------------- 1 | The Risk of Discovery 2 | 3 | January 2017 4 | 5 | Because biographies of famous scientists tend to edit out their mistakes, we underestimate the degree of risk they were willing to take. And because anything a famous scientist did that wasn't a mistake has probably now become the conventional wisdom, those choices don't seem risky either. 6 | 7 | Biographies of Newton, for example, understandably focus more on physics than alchemy or theology. The impression we get is that his unerring judgment led him straight to truths no one else had noticed. How to explain all the time he spent on alchemy and theology? Well, smart people are often kind of crazy. 8 | 9 | But maybe there is a simpler explanation. Maybe the smartness and the craziness were not as separate as we think. Physics seems to us a promising thing to work on, and alchemy and theology obvious wastes of time. But that's because we know how things turned out. In Newton's day the three problems seemed roughly equally promising. No one knew yet what the payoff would be for inventing what we now call physics; if they had, more people would have been working on it. And alchemy and theology were still then in the category Marc Andreessen would describe as "huge, if true." 10 | 11 | Newton made three bets. One of them worked. But they were all risky. -------------------------------------------------------------------------------- /data/57.txt: -------------------------------------------------------------------------------- 1 | A Way to Detect Bias 2 | 3 | October 2015 4 | 5 | This will come as a surprise to a lot of people, but in some cases it's possible to detect bias in a selection process without knowing anything about the applicant pool. Which is exciting because among other things it means third parties can use this technique to detect bias whether those doing the selecting want them to or not. 6 | 7 | You can use this technique whenever (a) you have at least a random sample of the applicants that were selected, (b) their subsequent performance is measured, and (c) the groups of applicants you're comparing have roughly equal distribution of ability. 8 | 9 | How does it work? Think about what it means to be biased. What it means for a selection process to be biased against applicants of type x is that it's harder for them to make it through. Which means applicants of type x have to be better to get selected than applicants not of type x. [1] Which means applicants of type x who do make it through the selection process will outperform other successful applicants. And if the performance of all the successful applicants is measured, you'll know if they do. 10 | 11 | Of course, the test you use to measure performance must be a valid one. And in particular it must not be invalidated by the bias you're trying to measure. But there are some domains where performance can be measured, and in those detecting bias is straightforward. Want to know if the selection process was biased against some type of applicant? Check whether they outperform the others. This is not just a heuristic for detecting bias. It's what bias means. 12 | 13 | For example, many suspect that venture capital firms are biased against female founders. This would be easy to detect: among their portfolio companies, do startups with female founders outperform those without? A couple months ago, one VC firm (almost certainly unintentionally) published a study showing bias of this type. First Round Capital found that among its portfolio companies, startups with female founders outperformed those without by 63%. [2] 14 | 15 | The reason I began by saying that this technique would come as a surprise to many people is that we so rarely see analyses of this type. I'm sure it will come as a surprise to First Round that they performed one. I doubt anyone there realized that by limiting their sample to their own portfolio, they were producing a study not of startup trends but of their own biases when selecting companies. 16 | 17 | I predict we'll see this technique used more in the future. The information needed to conduct such studies is increasingly available. Data about who applies for things is usually closely guarded by the organizations selecting them, but nowadays data about who gets selected is often publicly available to anyone who takes the trouble to aggregate it. 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Notes 26 | 27 | [1] This technique wouldn't work if the selection process looked for different things from different types of applicants—for example, if an employer hired men based on their ability but women based on their appearance. 28 | 29 | [2] As Paul Buchheit points out, First Round excluded their most successful investment, Uber, from the study. And while it makes sense to exclude outliers from some types of studies, studies of returns from startup investing, which is all about hitting outliers, are not one of them. -------------------------------------------------------------------------------- /data/58.txt: -------------------------------------------------------------------------------- 1 | Write Like You Talk 2 | 3 | October 2015 4 | 5 | Here's a simple trick for getting more people to read what you write: write in spoken language. 6 | 7 | Something comes over most people when they start writing. They write in a different language than they'd use if they were talking to a friend. The sentence structure and even the words are different. No one uses "pen" as a verb in spoken English. You'd feel like an idiot using "pen" instead of "write" in a conversation with a friend. 8 | 9 | The last straw for me was a sentence I read a couple days ago: 10 | The mercurial Spaniard himself declared: "After Altamira, all is decadence." 11 | It's from Neil Oliver's A History of Ancient Britain. I feel bad making an example of this book, because it's no worse than lots of others. But just imagine calling Picasso "the mercurial Spaniard" when talking to a friend. Even one sentence of this would raise eyebrows in conversation. And yet people write whole books of it. 12 | 13 | Ok, so written and spoken language are different. Does that make written language worse? 14 | 15 | If you want people to read and understand what you write, yes. Written language is more complex, which makes it more work to read. It's also more formal and distant, which gives the reader's attention permission to drift. But perhaps worst of all, the complex sentences and fancy words give you, the writer, the false impression that you're saying more than you actually are. 16 | 17 | You don't need complex sentences to express complex ideas. When specialists in some abstruse topic talk to one another about ideas in their field, they don't use sentences any more complex than they do when talking about what to have for lunch. They use different words, certainly. But even those they use no more than necessary. And in my experience, the harder the subject, the more informally experts speak. Partly, I think, because they have less to prove, and partly because the harder the ideas you're talking about, the less you can afford to let language get in the way. 18 | 19 | Informal language is the athletic clothing of ideas. 20 | 21 | I'm not saying spoken language always works best. Poetry is as much music as text, so you can say things you wouldn't say in conversation. And there are a handful of writers who can get away with using fancy language in prose. And then of course there are cases where writers don't want to make it easy to understand what they're saying—in corporate announcements of bad news, for example, or at the more bogus end of the humanities. But for nearly everyone else, spoken language is better. 22 | 23 | It seems to be hard for most people to write in spoken language. So perhaps the best solution is to write your first draft the way you usually would, then afterward look at each sentence and ask "Is this the way I'd say this if I were talking to a friend?" If it isn't, imagine what you would say, and use that instead. After a while this filter will start to operate as you write. When you write something you wouldn't say, you'll hear the clank as it hits the page. 24 | 25 | Before I publish a new essay, I read it out loud and fix everything that doesn't sound like conversation. I even fix bits that are phonetically awkward; I don't know if that's necessary, but it doesn't cost much. 26 | 27 | This trick may not always be enough. I've seen writing so far removed from spoken language that it couldn't be fixed sentence by sentence. For cases like that there's a more drastic solution. After writing the first draft, try explaining to a friend what you just wrote. Then replace the draft with what you said to your friend. 28 | 29 | People often tell me how much my essays sound like me talking. The fact that this seems worthy of comment shows how rarely people manage to write in spoken language. Otherwise everyone's writing would sound like them talking. 30 | 31 | If you simply manage to write in spoken language, you'll be ahead of 95% of writers. And it's so easy to do: just don't let a sentence through unless it's the way you'd say it to a friend. -------------------------------------------------------------------------------- /data/60.txt: -------------------------------------------------------------------------------- 1 | Why It's Safe for Founders to Be Nice 2 | 3 | August 2015 4 | 5 | I recently got an email from a founder that helped me understand something important: why it's safe for startup founders to be nice people. 6 | 7 | I grew up with a cartoon idea of a very successful businessman (in the cartoon it was always a man): a rapacious, cigar-smoking, table-thumping guy in his fifties who wins by exercising power, and isn't too fussy about how. As I've written before, one of the things that has surprised me most about startups is how few of the most successful founders are like that. Maybe successful people in other industries are; I don't know; but not startup founders. [1] 8 | 9 | I knew this empirically, but I never saw the math of why till I got this founder's email. In it he said he worried that he was fundamentally soft-hearted and tended to give away too much for free. He thought perhaps he needed "a little dose of sociopath-ness." 10 | 11 | I told him not to worry about it, because so long as he built something good enough to spread by word of mouth, he'd have a superlinear growth curve. If he was bad at extracting money from people, at worst this curve would be some constant multiple less than 1 of what it might have been. But a constant multiple of any curve is exactly the same shape. The numbers on the Y axis are smaller, but the curve is just as steep, and when anything grows at the rate of a successful startup, the Y axis will take care of itself. 12 | 13 | Some examples will make this clear. Suppose your company is making $1000 a month now, and you've made something so great that it's growing at 5% a week. Two years from now, you'll be making about $160k a month. 14 | 15 | Now suppose you're so un-rapacious that you only extract half as much from your users as you could. That means two years later you'll be making $80k a month instead of $160k. How far behind are you? How long will it take to catch up with where you'd have been if you were extracting every penny? A mere 15 weeks. After two years, the un-rapacious founder is only 3.5 months behind the rapacious one. [2] 16 | 17 | If you're going to optimize a number, the one to choose is your growth rate. Suppose as before that you only extract half as much from users as you could, but that you're able to grow 6% a week instead of 5%. Now how are you doing compared to the rapacious founder after two years? You're already ahead—$214k a month versus $160k—and pulling away fast. In another year you'll be making $4.4 million a month to the rapacious founder's $2 million. 18 | 19 | Obviously one case where it would help to be rapacious is when growth depends on that. What makes startups different is that usually it doesn't. Startups usually win by making something so great that people recommend it to their friends. And being rapacious not only doesn't help you do that, but probably hurts. [3] 20 | 21 | The reason startup founders can safely be nice is that making great things is compounded, and rapacity isn't. 22 | 23 | So if you're a founder, here's a deal you can make with yourself that will both make you happy and make your company successful. Tell yourself you can be as nice as you want, so long as you work hard on your growth rate to compensate. Most successful startups make that tradeoff unconsciously. Maybe if you do it consciously you'll do it even better. 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Notes 32 | 33 | [1] Many think successful startup founders are driven by money. In fact the secret weapon of the most successful founders is that they aren't. If they were, they'd have taken one of the acquisition offers that every fast-growing startup gets on the way up. What drives the most successful founders is the same thing that drives most people who make things: the company is their project. 34 | 35 | [2] In fact since 2 ≈ 1.05 ^ 15, the un-rapacious founder is always 15 weeks behind the rapacious one. 36 | 37 | [3] The other reason it might help to be good at squeezing money out of customers is that startups usually lose money at first, and making more per customer makes it easier to get to profitability before your initial funding runs out. But while it is very common for startups to die from running through their initial funding and then being unable to raise more, the underlying cause is usually slow growth or excessive spending rather than insufficient effort to extract money from existing customers. -------------------------------------------------------------------------------- /data/61.txt: -------------------------------------------------------------------------------- 1 | Change Your Name 2 | 3 | August 2015 4 | 5 | If you have a US startup called X and you don't have x.com, you should probably change your name. 6 | 7 | The reason is not just that people can't find you. For companies with mobile apps, especially, having the right domain name is not as critical as it used to be for getting users. The problem with not having the .com of your name is that it signals weakness. Unless you're so big that your reputation precedes you, a marginal domain suggests you're a marginal company. Whereas (as Stripe shows) having x.com signals strength even if it has no relation to what you do. 8 | 9 | Even good founders can be in denial about this. Their denial derives from two very powerful forces: identity, and lack of imagination. 10 | 11 | X is what we are, founders think. There's no other name as good. Both of which are false. 12 | 13 | You can fix the first by stepping back from the problem. Imagine you'd called your company something else. If you had, surely you'd be just as attached to that name as you are to your current one. The idea of switching to your current name would seem repellent. [1] 14 | 15 | There's nothing intrinsically great about your current name. Nearly all your attachment to it comes from it being attached to you. [2] 16 | 17 | The way to neutralize the second source of denial, your inability to think of other potential names, is to acknowledge that you're bad at naming. Naming is a completely separate skill from those you need to be a good founder. You can be a great startup founder but hopeless at thinking of names for your company. 18 | 19 | Once you acknowledge that, you stop believing there is nothing else you could be called. There are lots of other potential names that are as good or better; you just can't think of them. 20 | 21 | How do you find them? One answer is the default way to solve problems you're bad at: find someone else who can think of names. But with company names there is another possible approach. It turns out almost any word or word pair that is not an obviously bad name is a sufficiently good one, and the number of such domains is so large that you can find plenty that are cheap or even untaken. So make a list and try to buy some. That's what Stripe did. (Their search also turned up parse.com, which their friends at Parse took.) 22 | 23 | The reason I know that naming companies is a distinct skill orthogonal to the others you need in a startup is that I happen to have it. Back when I was running YC and did more office hours with startups, I would often help them find new names. 80% of the time we could find at least one good name in a 20 minute office hour slot. 24 | 25 | Now when I do office hours I have to focus on more important questions, like what the company is doing. I tell them when they need to change their name. But I know the power of the forces that have them in their grip, so I know most won't listen. [3] 26 | 27 | There are of course examples of startups that have succeeded without having the .com of their name. There are startups that have succeeded despite any number of different mistakes. But this mistake is less excusable than most. It's something that can be fixed in a couple days if you have sufficient discipline to acknowledge the problem. 28 | 29 | 100% of the top 20 YC companies by valuation have the .com of their name. 94% of the top 50 do. But only 66% of companies in the current batch have the .com of their name. Which suggests there are lessons ahead for most of the rest, one way or another. 30 | 31 | 32 | 33 | 34 | 35 | Notes 36 | 37 | [1] Incidentally, this thought experiment works for nationality and religion too. 38 | 39 | [2] The liking you have for a name that has become part of your identity manifests itself not directly, which would be easy to discount, but as a collection of specious beliefs about its intrinsic qualities. (This too is true of nationality and religion as well.) 40 | 41 | [3] Sometimes founders know it's a problem that they don't have the .com of their name, but delusion strikes a step later in the belief that they'll be able to buy it despite having no evidence it's for sale. Don't believe a domain is for sale unless the owner has already told you an asking price. 42 | 43 | Thanks to Sam Altman, Jessica Livingston, and Geoff Ralston for reading drafts of this. -------------------------------------------------------------------------------- /data/62.txt: -------------------------------------------------------------------------------- 1 | What Microsoft Is this the Altair Basic of? 2 | 3 | February 2015 4 | 5 | One of the most valuable exercises you can try if you want to understand startups is to look at the most successful companies and explain why they were not as lame as they seemed when they first launched. Because they practically all seemed lame at first. Not just small, lame. Not just the first step up a big mountain. More like the first step into a swamp. 6 | 7 | A Basic interpreter for the Altair? How could that ever grow into a giant company? People sleeping on airbeds in strangers' apartments? A web site for college students to stalk one another? A wimpy little single-board computer for hobbyists that used a TV as a monitor? A new search engine, when there were already about 10, and they were all trying to de-emphasize search? These ideas didn't just seem small. They seemed wrong. They were the kind of ideas you could not merely ignore, but ridicule. 8 | 9 | Often the founders themselves didn't know why their ideas were promising. They were attracted to these ideas by instinct, because they were living in the future and they sensed that something was missing. But they could not have put into words exactly how their ugly ducklings were going to grow into big, beautiful swans. 10 | 11 | Most people's first impulse when they hear about a lame-sounding new startup idea is to make fun of it. Even a lot of people who should know better. 12 | 13 | When I encounter a startup with a lame-sounding idea, I ask "What Microsoft is this the Altair Basic of?" Now it's a puzzle, and the burden is on me to solve it. Sometimes I can't think of an answer, especially when the idea is a made-up one. But it's remarkable how often there does turn out to be an answer. Often it's one the founders themselves hadn't seen yet. 14 | 15 | Intriguingly, there are sometimes multiple answers. I talked to a startup a few days ago that could grow into 3 distinct Microsofts. They'd probably vary in size by orders of magnitude. But you can never predict how big a Microsoft is going to be, so in cases like that I encourage founders to follow whichever path is most immediately exciting to them. Their instincts got them this far. Why stop now? -------------------------------------------------------------------------------- /data/63.txt: -------------------------------------------------------------------------------- 1 | The Ronco Principle 2 | 3 | January 2015 4 | 5 | No one, VC or angel, has invested in more of the top startups than Ron Conway. He knows what happened in every deal in the Valley, half the time because he arranged it. 6 | 7 | And yet he's a super nice guy. In fact, nice is not the word. Ronco is good. I know of zero instances in which he has behaved badly. It's hard even to imagine. 8 | 9 | When I first came to Silicon Valley I thought "How lucky that someone so powerful is so benevolent." But gradually I realized it wasn't luck. It was by being benevolent that Ronco became so powerful. All the deals he gets to invest in come to him through referrals. Google did. Facebook did. Twitter was a referral from Evan Williams himself. And the reason so many people refer deals to him is that he's proven himself to be a good guy. 10 | 11 | Good does not mean being a pushover. I would not want to face an angry Ronco. But if Ron's angry at you, it's because you did something wrong. Ron is so old school he's Old Testament. He will smite you in his just wrath, but there's no malice in it. 12 | 13 | In almost every domain there are advantages to seeming good. It makes people trust you. But actually being good is an expensive way to seem good. To an amoral person it might seem to be overkill. 14 | 15 | In some fields it might be, but apparently not in the startup world. Though plenty of investors are jerks, there is a clear trend among them: the most successful investors are also the most upstanding. [1] 16 | 17 | It was not always this way. I would not feel confident saying that about investors twenty years ago. 18 | 19 | What changed? The startup world became more transparent and more unpredictable. Both make it harder to seem good without actually being good. 20 | 21 | It's obvious why transparency has that effect. When an investor maltreats a founder now, it gets out. Maybe not all the way to the press, but other founders hear about it, and that investor starts to lose deals. [2] 22 | 23 | The effect of unpredictability is more subtle. It increases the work of being inconsistent. If you're going to be two-faced, you have to know who you should be nice to and who you can get away with being nasty to. In the startup world, things change so rapidly that you can't tell. The random college kid you talk to today might in a couple years be the CEO of the hottest startup in the Valley. If you can't tell who to be nice to, you have to be nice to everyone. And probably the only people who can manage that are the people who are genuinely good. 24 | 25 | In a sufficiently connected and unpredictable world, you can't seem good without being good. 26 | 27 | As often happens, Ron discovered how to be the investor of the future by accident. He didn't foresee the future of startup investing, realize it would pay to be upstanding, and force himself to behave that way. It would feel unnatural to him to behave any other way. He was already living in the future. 28 | 29 | Fortunately that future is not limited to the startup world. The startup world is more transparent and unpredictable than most, but almost everywhere the trend is in that direction. 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | Notes 40 | 41 | [1] I'm not saying that if you sort investors by benevolence you've also sorted them by returns, but rather that if you do a scatterplot with benevolence on the x axis and returns on the y, you'd see a clear upward trend. 42 | 43 | [2] Y Combinator in particular, because it aggregates data from so many startups, has a pretty comprehensive view of investor behavior. -------------------------------------------------------------------------------- /data/64.txt: -------------------------------------------------------------------------------- 1 | What Doesn't Seem Like Work? 2 | 3 | January 2015 4 | 5 | My father is a mathematician. For most of my childhood he worked for Westinghouse, modelling nuclear reactors. 6 | 7 | He was one of those lucky people who know early on what they want to do. When you talk to him about his childhood, there's a clear watershed at about age 12, when he "got interested in maths." 8 | 9 | He grew up in the small Welsh seacoast town of Pwllheli. As we retraced his walk to school on Google Street View, he said that it had been nice growing up in the country. 10 | 11 | "Didn't it get boring when you got to be about 15?" I asked. 12 | 13 | "No," he said, "by then I was interested in maths." 14 | 15 | In another conversation he told me that what he really liked was solving problems. To me the exercises at the end of each chapter in a math textbook represent work, or at best a way to reinforce what you learned in that chapter. To him the problems were the reward. The text of each chapter was just some advice about solving them. He said that as soon as he got a new textbook he'd immediately work out all the problems — to the slight annoyance of his teacher, since the class was supposed to work through the book gradually. 16 | 17 | Few people know so early or so certainly what they want to work on. But talking to my father reminded me of a heuristic the rest of us can use. If something that seems like work to other people doesn't seem like work to you, that's something you're well suited for. For example, a lot of programmers I know, including me, actually like debugging. It's not something people tend to volunteer; one likes it the way one likes popping zits. But you may have to like debugging to like programming, considering the degree to which programming consists of it. 18 | 19 | The stranger your tastes seem to other people, the stronger evidence they probably are of what you should do. When I was in college I used to write papers for my friends. It was quite interesting to write a paper for a class I wasn't taking. Plus they were always so relieved. 20 | 21 | It seemed curious that the same task could be painful to one person and pleasant to another, but I didn't realize at the time what this imbalance implied, because I wasn't looking for it. I didn't realize how hard it can be to decide what you should work on, and that you sometimes have to figure it out from subtle clues, like a detective solving a case in a mystery novel. So I bet it would help a lot of people to ask themselves about this explicitly. What seems like work to other people that doesn't seem like work to you? -------------------------------------------------------------------------------- /data/68.txt: -------------------------------------------------------------------------------- 1 | How You Know 2 | 3 | December 2014 4 | 5 | I've read Villehardouin's chronicle of the Fourth Crusade at least two times, maybe three. And yet if I had to write down everything I remember from it, I doubt it would amount to much more than a page. Multiply this times several hundred, and I get an uneasy feeling when I look at my bookshelves. What use is it to read all these books if I remember so little from them? 6 | 7 | A few months ago, as I was reading Constance Reid's excellent biography of Hilbert, I figured out if not the answer to this question, at least something that made me feel better about it. She writes: 8 | Hilbert had no patience with mathematical lectures which filled the students with facts but did not teach them how to frame a problem and solve it. He often used to tell them that "a perfect formulation of a problem is already half its solution." 9 | That has always seemed to me an important point, and I was even more convinced of it after hearing it confirmed by Hilbert. 10 | 11 | But how had I come to believe in this idea in the first place? A combination of my own experience and other things I'd read. None of which I could at that moment remember! And eventually I'd forget that Hilbert had confirmed it too. But my increased belief in the importance of this idea would remain something I'd learned from this book, even after I'd forgotten I'd learned it. 12 | 13 | Reading and experience train your model of the world. And even if you forget the experience or what you read, its effect on your model of the world persists. Your mind is like a compiled program you've lost the source of. It works, but you don't know why. 14 | 15 | The place to look for what I learned from Villehardouin's chronicle is not what I remember from it, but my mental models of the crusades, Venice, medieval culture, siege warfare, and so on. Which doesn't mean I couldn't have read more attentively, but at least the harvest of reading is not so miserably small as it might seem. 16 | 17 | This is one of those things that seem obvious in retrospect. But it was a surprise to me and presumably would be to anyone else who felt uneasy about (apparently) forgetting so much they'd read. 18 | 19 | Realizing it does more than make you feel a little better about forgetting, though. There are specific implications. 20 | 21 | For example, reading and experience are usually "compiled" at the time they happen, using the state of your brain at that time. The same book would get compiled differently at different points in your life. Which means it is very much worth reading important books multiple times. I always used to feel some misgivings about rereading books. I unconsciously lumped reading together with work like carpentry, where having to do something again is a sign you did it wrong the first time. Whereas now the phrase "already read" seems almost ill-formed. 22 | 23 | Intriguingly, this implication isn't limited to books. Technology will increasingly make it possible to relive our experiences. When people do that today it's usually to enjoy them again (e.g. when looking at pictures of a trip) or to find the origin of some bug in their compiled code (e.g. when Stephen Fry succeeded in remembering the childhood trauma that prevented him from singing). But as technologies for recording and playing back your life improve, it may become common for people to relive experiences without any goal in mind, simply to learn from them again as one might when rereading a book. 24 | 25 | Eventually we may be able not just to play back experiences but also to index and even edit them. So although not knowing how you know things may seem part of being human, it may not be. -------------------------------------------------------------------------------- /data/78.txt: -------------------------------------------------------------------------------- 1 | October 2012 2 | 3 | One advantage of Y Combinator's early, broad focus is that we see trends before most other people. And one of the most conspicuous trends in the last batch was the large number of hardware startups. Out of 84 companies, 7 were making hardware. On the whole they've done better than the companies that weren't. 4 | 5 | They've faced resistance from investors of course. Investors have a deep-seated bias against hardware. But investors' opinions are a trailing indicator. The best founders are better at seeing the future than the best investors, because the best founders are making it. 6 | 7 | There is no one single force driving this trend. Hardware does well on crowdfunding sites. The spread of tablets makes it possible to build new things controlled by and even incorporating them. Electric motors have improved. Wireless connectivity of various types can now be taken for granted. It's getting more straightforward to get things manufactured. Arduinos, 3D printing, laser cutters, and more accessible CNC milling are making hardware easier to prototype. Retailers are less of a bottleneck as customers increasingly buy online. 8 | 9 | One question I can answer is why hardware is suddenly cool. It always was cool. Physical things are great. They just haven't been as great a way to start a rapidly growing business as software. But that rule may not be permanent. It's not even that old; it only dates from about 1990. Maybe the advantage of software will turn out to have been temporary. Hackers love to build hardware, and customers love to buy it. So if the ease of shipping hardware even approached the ease of shipping software, we'd see a lot more hardware startups. 10 | 11 | It wouldn't be the first time something was a bad idea till it wasn't. And it wouldn't be the first time investors learned that lesson from founders. 12 | 13 | So if you want to work on hardware, don't be deterred from doing it because you worry investors will discriminate against you. And in particular, don't be deterred from applying to Y Combinator with a hardware idea, because we're especially interested in hardware startups. 14 | 15 | We know there's room for the next Steve Jobs. But there's almost certainly also room for the first . -------------------------------------------------------------------------------- /data/81.txt: -------------------------------------------------------------------------------- 1 | The Top of My Todo List 2 | 3 | April 2012 4 | 5 | A palliative care nurse called Bronnie Ware made a list of the biggest regrets of the dying. Her list seems plausible. I could see myself — can see myself — making at least 4 of these 5 mistakes. 6 | 7 | If you had to compress them into a single piece of advice, it might be: don't be a cog. The 5 regrets paint a portrait of post-industrial man, who shrinks himself into a shape that fits his circumstances, then turns dutifully till he stops. 8 | 9 | The alarming thing is, the mistakes that produce these regrets are all errors of omission. You forget your dreams, ignore your family, suppress your feelings, neglect your friends, and forget to be happy. Errors of omission are a particularly dangerous type of mistake, because you make them by default. 10 | 11 | I would like to avoid making these mistakes. But how do you avoid mistakes you make by default? Ideally you transform your life so it has other defaults. But it may not be possible to do that completely. As long as these mistakes happen by default, you probably have to be reminded not to make them. So I inverted the 5 regrets, yielding a list of 5 commands 12 | Don't ignore your dreams; don't work too much; say what you think; cultivate friendships; be happy. 13 | which I then put at the top of the file I use as a todo list. -------------------------------------------------------------------------------- /data/86.txt: -------------------------------------------------------------------------------- 1 | A Word to the Resourceful 2 | 3 | January 2012 4 | 5 | A year ago I noticed a pattern in the least successful startups we'd funded: they all seemed hard to talk to. It felt as if there was some kind of wall between us. I could never quite tell if they understood what I was saying. 6 | 7 | This caught my attention because earlier we'd noticed a pattern among the most successful startups, and it seemed to hinge on a different quality. We found the startups that did best were the ones with the sort of founders about whom we'd say "they can take care of themselves." The startups that do best are fire-and-forget in the sense that all you have to do is give them a lead, and they'll close it, whatever type of lead it is. When they're raising money, for example, you can do the initial intros knowing that if you wanted to you could stop thinking about it at that point. You won't have to babysit the round to make sure it happens. That type of founder is going to come back with the money; the only question is how much on what terms. 8 | 9 | It seemed odd that the outliers at the two ends of the spectrum could be detected by what appeared to be unrelated tests. You'd expect that if the founders at one end were distinguished by the presence of quality x, at the other end they'd be distinguished by lack of x. Was there some kind of inverse relation between resourcefulness and being hard to talk to? 10 | 11 | It turns out there is, and the key to the mystery is the old adage "a word to the wise is sufficient." Because this phrase is not only overused, but overused in an indirect way (by prepending the subject to some advice), most people who've heard it don't know what it means. What it means is that if someone is wise, all you have to do is say one word to them, and they'll understand immediately. You don't have to explain in detail; they'll chase down all the implications. 12 | 13 | In much the same way that all you have to do is give the right sort of founder a one line intro to a VC, and he'll chase down the money. That's the connection. Understanding all the implications — even the inconvenient implications — of what someone tells you is a subset of resourcefulness. It's conversational resourcefulness. 14 | 15 | Like real world resourcefulness, conversational resourcefulness often means doing things you don't want to. Chasing down all the implications of what's said to you can sometimes lead to uncomfortable conclusions. The best word to describe the failure to do so is probably "denial," though that seems a bit too narrow. A better way to describe the situation would be to say that the unsuccessful founders had the sort of conservatism that comes from weakness. They traversed idea space as gingerly as a very old person traverses the physical world. [1] 16 | 17 | The unsuccessful founders weren't stupid. Intellectually they were as capable as the successful founders of following all the implications of what one said to them. They just weren't eager to. 18 | 19 | So being hard to talk to was not what was killing the unsuccessful startups. It was a sign of an underlying lack of resourcefulness. That's what was killing them. As well as failing to chase down the implications of what was said to them, the unsuccessful founders would also fail to chase down funding, and users, and sources of new ideas. But the most immediate evidence I had that something was amiss was that I couldn't talk to them. 20 | 21 | 22 | 23 | 24 | 25 | Notes 26 | 27 | [1] A YC partner wrote: 28 | 29 | My feeling with the bad groups is that coming into office hours, they've already decided what they're going to do and everything I say is being put through an internal process in their heads, which either desperately tries to munge what I've said into something that conforms with their decision or just outright dismisses it and creates a rationalization for doing so. They may not even be conscious of this process but that's what I think is happening when you say something to bad groups and they have that glazed over look. I don't think it's confusion or lack of understanding per se, it's this internal process at work. 30 | 31 | With the good groups, you can tell that everything you say is being looked at with fresh eyes and even if it's dismissed, it's because of some logical reason e.g. "we already tried that" or "from speaking to our users that isn't what they'd like," etc. Those groups never have that glazed over look. -------------------------------------------------------------------------------- /data/87.txt: -------------------------------------------------------------------------------- 1 | Schlep Blindness 2 | 3 | January 2012 4 | 5 | There are great startup ideas lying around unexploited right under our noses. One reason we don't see them is a phenomenon I call schlep blindness. Schlep was originally a Yiddish word but has passed into general use in the US. It means a tedious, unpleasant task. 6 | 7 | No one likes schleps, but hackers especially dislike them. Most hackers who start startups wish they could do it by just writing some clever software, putting it on a server somewhere, and watching the money roll in—without ever having to talk to users, or negotiate with other companies, or deal with other people's broken code. Maybe that's possible, but I haven't seen it. 8 | 9 | One of the many things we do at Y Combinator is teach hackers about the inevitability of schleps. No, you can't start a startup by just writing code. I remember going through this realization myself. There was a point in 1995 when I was still trying to convince myself I could start a company by just writing code. But I soon learned from experience that schleps are not merely inevitable, but pretty much what business consists of. A company is defined by the schleps it will undertake. And schleps should be dealt with the same way you'd deal with a cold swimming pool: just jump in. Which is not to say you should seek out unpleasant work per se, but that you should never shrink from it if it's on the path to something great. 10 | 11 | The most dangerous thing about our dislike of schleps is that much of it is unconscious. Your unconscious won't even let you see ideas that involve painful schleps. That's schlep blindness. 12 | 13 | The phenomenon isn't limited to startups. Most people don't consciously decide not to be in as good physical shape as Olympic athletes, for example. Their unconscious mind decides for them, shrinking from the work involved. 14 | 15 | The most striking example I know of schlep blindness is Stripe, or rather Stripe's idea. For over a decade, every hacker who'd ever had to process payments online knew how painful the experience was. Thousands of people must have known about this problem. And yet when they started startups, they decided to build recipe sites, or aggregators for local events. Why? Why work on problems few care much about and no one will pay for, when you could fix one of the most important components of the world's infrastructure? Because schlep blindness prevented people from even considering the idea of fixing payments. 16 | 17 | Probably no one who applied to Y Combinator to work on a recipe site began by asking "should we fix payments, or build a recipe site?" and chose the recipe site. Though the idea of fixing payments was right there in plain sight, they never saw it, because their unconscious mind shrank from the complications involved. You'd have to make deals with banks. How do you do that? Plus you're moving money, so you're going to have to deal with fraud, and people trying to break into your servers. Plus there are probably all sorts of regulations to comply with. It's a lot more intimidating to start a startup like this than a recipe site. 18 | 19 | That scariness makes ambitious ideas doubly valuable. In addition to their intrinsic value, they're like undervalued stocks in the sense that there's less demand for them among founders. If you pick an ambitious idea, you'll have less competition, because everyone else will have been frightened off by the challenges involved. (This is also true of starting a startup generally.) 20 | 21 | How do you overcome schlep blindness? Frankly, the most valuable antidote to schlep blindness is probably ignorance. Most successful founders would probably say that if they'd known when they were starting their company about the obstacles they'd have to overcome, they might never have started it. Maybe that's one reason the most successful startups of all so often have young founders. 22 | 23 | In practice the founders grow with the problems. But no one seems able to foresee that, not even older, more experienced founders. So the reason younger founders have an advantage is that they make two mistakes that cancel each other out. They don't know how much they can grow, but they also don't know how much they'll need to. Older founders only make the first mistake. 24 | 25 | Ignorance can't solve everything though. Some ideas so obviously entail alarming schleps that anyone can see them. How do you see ideas like that? The trick I recommend is to take yourself out of the picture. Instead of asking "what problem should I solve?" ask "what problem do I wish someone else would solve for me?" If someone who had to process payments before Stripe had tried asking that, Stripe would have been one of the first things they wished for. 26 | 27 | It's too late now to be Stripe, but there's plenty still broken in the world, if you know how to see it. -------------------------------------------------------------------------------- /data/90.txt: -------------------------------------------------------------------------------- 1 | The Patent Pledge 2 | 3 | August 2011 4 | 5 | I realized recently that we may be able to solve part of the patent problem without waiting for the government. 6 | 7 | I've never been 100% sure whether patents help or hinder technological progress. When I was a kid I thought they helped. I thought they protected inventors from having their ideas stolen by big companies. Maybe that was truer in the past, when more things were physical. But regardless of whether patents are in general a good thing, there do seem to be bad ways of using them. And since bad uses of patents seem to be increasing, there is an increasing call for patent reform. 8 | 9 | The problem with patent reform is that it has to go through the government. That tends to be slow. But recently I realized we can also attack the problem downstream. As well as pinching off the stream of patents at the point where they're issued, we may in some cases be able to pinch it off at the point where they're used. 10 | 11 | One way of using patents that clearly does not encourage innovation is when established companies with bad products use patents to suppress small competitors with good products. This is the type of abuse we may be able to decrease without having to go through the government. 12 | 13 | The way to do it is to get the companies that are above pulling this sort of trick to pledge publicly not to. Then the ones that won't make such a pledge will be very conspicuous. Potential employees won't want to work for them. And investors, too, will be able to see that they're the sort of company that competes by litigation rather than by making good products. 14 | 15 | Here's the pledge: 16 | No first use of software patents against companies with less than 25 people. 17 | I've deliberately traded precision for brevity. The patent pledge is not legally binding. It's like Google's "Don't be evil." They don't define what evil is, but by publicly saying that, they're saying they're willing to be held to a standard that, say, Altria is not. And though constraining, "Don't be evil" has been good for Google. Technology companies win by attracting the most productive people, and the most productive people are attracted to employers who hold themselves to a higher standard than the law requires. [1] 18 | 19 | The patent pledge is in effect a narrower but open source "Don't be evil." I encourage every technology company to adopt it. If you want to help fix patents, encourage your employer to. 20 | 21 | Already most technology companies wouldn't sink to using patents on startups. You don't see Google or Facebook suing startups for patent infringement. They don't need to. So for the better technology companies, the patent pledge requires no change in behavior. They're just promising to do what they'd do anyway. And when all the companies that won't use patents on startups have said so, the holdouts will be very conspicuous. 22 | 23 | The patent pledge doesn't fix every problem with patents. It won't stop patent trolls, for example; they're already pariahs. But the problem the patent pledge does fix may be more serious than the problem of patent trolls. Patent trolls are just parasites. A clumsy parasite may occasionally kill the host, but that's not its goal. Whereas companies that sue startups for patent infringement generally do it with explicit goal of keeping their product off the market. 24 | 25 | Companies that use patents on startups are attacking innovation at the root. Now there's something any individual can do about this problem, without waiting for the government: ask companies where they stand. 26 | 27 | 28 | 29 | Patent Pledge Site 30 | 31 | 32 | 33 | Notes: 34 | 35 | [1] Because the pledge is deliberately vague, we're going to need common sense when intepreting it. And even more vice versa: the pledge is vague in order to make people use common sense when interpreting it. 36 | 37 | So for example I've deliberately avoided saying whether the 25 people have to be employees, or whether contractors count too. If a company has to split hairs that fine about whether a suit would violate the patent pledge, it's probably still a dick move. -------------------------------------------------------------------------------- /data/92.txt: -------------------------------------------------------------------------------- 1 | Founder Control 2 | 3 | December 2010 4 | 5 | Someone we funded is talking to VCs now, and asked me how common it was for a startup's founders to retain control of the board after a series A round. He said VCs told him this almost never happened. 6 | 7 | Ten years ago that was true. In the past, founders rarely kept control of the board through a series A. The traditional series A board consisted of two founders, two VCs, and one independent member. More recently the recipe is often one founder, one VC, and one independent. In either case the founders lose their majority. 8 | 9 | But not always. Mark Zuckerberg kept control of Facebook's board through the series A and still has it today. Mark Pincus has kept control of Zynga's too. But are these just outliers? How common is it for founders to keep control after an A round? I'd heard of several cases among the companies we've funded, but I wasn't sure how many there were, so I emailed the ycfounders list. 10 | 11 | The replies surprised me. In a dozen companies we've funded, the founders still had a majority of the board seats after the series A round. 12 | 13 | I feel like we're at a tipping point here. A lot of VCs still act as if founders retaining board control after a series A is unheard-of. A lot of them try to make you feel bad if you even ask — as if you're a noob or a control freak for wanting such a thing. But the founders I heard from aren't noobs or control freaks. Or if they are, they are, like Mark Zuckerberg, the kind of noobs and control freaks VCs should be trying to fund more of. 14 | 15 | Founders retaining control after a series A is clearly heard-of. And barring financial catastrophe, I think in the coming year it will become the norm. 16 | 17 | Control of a company is a more complicated matter than simply outvoting other parties in board meetings. Investors usually get vetos over certain big decisions, like selling the company, regardless of how many board seats they have. And board votes are rarely split. Matters are decided in the discussion preceding the vote, not in the vote itself, which is usually unanimous. But if opinion is divided in such discussions, the side that knows it would lose in a vote will tend to be less insistent. That's what board control means in practice. You don't simply get to do whatever you want; the board still has to act in the interest of the shareholders; but if you have a majority of board seats, then your opinion about what's in the interest of the shareholders will tend to prevail. 18 | 19 | So while board control is not total control, it's not imaginary either. There's inevitably a difference in how things feel within the company. Which means if it becomes the norm for founders to retain board control after a series A, that will change the way things feel in the whole startup world. 20 | 21 | The switch to the new norm may be surprisingly fast, because the startups that can retain control tend to be the best ones. They're the ones that set the trends, both for other startups and for VCs. 22 | 23 | A lot of the reason VCs are harsh when negotiating with startups is that they're embarrassed to go back to their partners looking like they got beaten. When they sign a termsheet, they want to be able to brag about the good terms they got. A lot of them don't care that much personally about whether founders keep board control. They just don't want to seem like they had to make concessions. Which means if letting the founders keep control stops being perceived as a concession, it will rapidly become much more common. 24 | 25 | Like a lot of changes that have been forced on VCs, this change won't turn out to be as big a problem as they might think. VCs will still be able to convince; they just won't be able to compel. And the startups where they have to resort to compulsion are not the ones that matter anyway. VCs make most of their money from a few big hits, and those aren't them. 26 | 27 | Knowing that founders will keep control of the board may even help VCs pick better. If they know they can't fire the founders, they'll have to choose founders they can trust. And that's who they should have been choosing all along. -------------------------------------------------------------------------------- /data/93.txt: -------------------------------------------------------------------------------- 1 | Tablets 2 | 3 | December 2010 4 | 5 | I was thinking recently how inconvenient it was not to have a general term for iPhones, iPads, and the corresponding things running Android. The closest to a general term seems to be "mobile devices," but that (a) applies to any mobile phone, and (b) doesn't really capture what's distinctive about the iPad. 6 | 7 | After a few seconds it struck me that what we'll end up calling these things is tablets. The only reason we even consider calling them "mobile devices" is that the iPhone preceded the iPad. If the iPad had come first, we wouldn't think of the iPhone as a phone; we'd think of it as a tablet small enough to hold up to your ear. 8 | 9 | The iPhone isn't so much a phone as a replacement for a phone. That's an important distinction, because it's an early instance of what will become a common pattern. Many if not most of the special-purpose objects around us are going to be replaced by apps running on tablets. 10 | 11 | This is already clear in cases like GPSes, music players, and cameras. But I think it will surprise people how many things are going to get replaced. We funded one startup that's replacing keys. The fact that you can change font sizes easily means the iPad effectively replaces reading glasses. I wouldn't be surprised if by playing some clever tricks with the accelerometer you could even replace the bathroom scale. 12 | 13 | The advantages of doing things in software on a single device are so great that everything that can get turned into software will. So for the next couple years, a good recipe for startups will be to look around you for things that people haven't realized yet can be made unnecessary by a tablet app. 14 | 15 | In 1938 Buckminster Fuller coined the term ephemeralization to describe the increasing tendency of physical machinery to be replaced by what we would now call software. The reason tablets are going to take over the world is not (just) that Steve Jobs and Co are industrial design wizards, but because they have this force behind them. The iPhone and the iPad have effectively drilled a hole that will allow ephemeralization to flow into a lot of new areas. No one who has studied the history of technology would want to underestimate the power of that force. 16 | 17 | I worry about the power Apple could have with this force behind them. I don't want to see another era of client monoculture like the Microsoft one in the 80s and 90s. But if ephemeralization is one of the main forces driving the spread of tablets, that suggests a way to compete with Apple: be a better platform for it. 18 | 19 | It has turned out to be a great thing that Apple tablets have accelerometers in them. Developers have used the accelerometer in ways Apple could never have imagined. That's the nature of platforms. The more versatile the tool, the less you can predict how people will use it. So tablet makers should be thinking: what else can we put in there? Not merely hardware, but software too. What else can we give developers access to? Give hackers an inch and they'll take you a mile. -------------------------------------------------------------------------------- /data/94.txt: -------------------------------------------------------------------------------- 1 | What We Look for in Founders 2 | 3 | Want to start a startup? Get funded by Y Combinator. 4 | 5 | October 2010 6 | 7 | (I wrote this for Forbes, who asked me to write something about the qualities we look for in founders. In print they had to cut the last item because they didn't have room.) 8 | 9 | 1. Determination 10 | 11 | This has turned out to be the most important quality in startup founders. We thought when we started Y Combinator that the most important quality would be intelligence. That's the myth in the Valley. And certainly you don't want founders to be stupid. But as long as you're over a certain threshold of intelligence, what matters most is determination. You're going to hit a lot of obstacles. You can't be the sort of person who gets demoralized easily. 12 | 13 | Bill Clerico and Rich Aberman of WePay are a good example. They're doing a finance startup, which means endless negotiations with big, bureaucratic companies. When you're starting a startup that depends on deals with big companies to exist, it often feels like they're trying to ignore you out of existence. But when Bill Clerico starts calling you, you may as well do what he asks, because he is not going away. 14 | 15 | 2. Flexibility 16 | 17 | You do not however want the sort of determination implied by phrases like "don't give up on your dreams." The world of startups is so unpredictable that you need to be able to modify your dreams on the fly. The best metaphor I've found for the combination of determination and flexibility you need is a running back. He's determined to get downfield, but at any given moment he may need to go sideways or even backwards to get there. 18 | 19 | The current record holder for flexibility may be Daniel Gross of Greplin. He applied to YC with some bad ecommerce idea. We told him we'd fund him if he did something else. He thought for a second, and said ok. He then went through two more ideas before settling on Greplin. He'd only been working on it for a couple days when he presented to investors at Demo Day, but he got a lot of interest. He always seems to land on his feet. 20 | 21 | 3. Imagination 22 | 23 | Intelligence does matter a lot of course. It seems like the type that matters most is imagination. It's not so important to be able to solve predefined problems quickly as to be able to come up with surprising new ideas. In the startup world, most good ideas seem bad initially. If they were obviously good, someone would already be doing them. So you need the kind of intelligence that produces ideas with just the right level of craziness. 24 | 25 | Airbnb is that kind of idea. In fact, when we funded Airbnb, we thought it was too crazy. We couldn't believe large numbers of people would want to stay in other people's places. We funded them because we liked the founders so much. As soon as we heard they'd been supporting themselves by selling Obama and McCain branded breakfast cereal, they were in. And it turned out the idea was on the right side of crazy after all. 26 | 27 | 4. Naughtiness 28 | 29 | Though the most successful founders are usually good people, they tend to have a piratical gleam in their eye. They're not Goody Two-Shoes type good. Morally, they care about getting the big questions right, but not about observing proprieties. That's why I'd use the word naughty rather than evil. They delight in breaking rules, but not rules that matter. This quality may be redundant though; it may be implied by imagination. 30 | 31 | Sam Altman of Loopt is one of the most successful alumni, so we asked him what question we could put on the Y Combinator application that would help us discover more people like him. He said to ask about a time when they'd hacked something to their advantage—hacked in the sense of beating the system, not breaking into computers. It has become one of the questions we pay most attention to when judging applications. 32 | 33 | 5. Friendship 34 | 35 | Empirically it seems to be hard to start a startup with just one founder. Most of the big successes have two or three. And the relationship between the founders has to be strong. They must genuinely like one another, and work well together. Startups do to the relationship between the founders what a dog does to a sock: if it can be pulled apart, it will be. 36 | 37 | Emmett Shear and Justin Kan of Justin.tv are a good example of close friends who work well together. They've known each other since second grade. They can practically read one another's minds. I'm sure they argue, like all founders, but I have never once sensed any unresolved tension between them. -------------------------------------------------------------------------------- /data/97.txt: -------------------------------------------------------------------------------- 1 | September 2010 2 | 3 | The reason startups have been using more convertible notes in angel rounds is that they make deals close faster. By making it easier for startups to give different prices to different investors, they help them break the sort of deadlock that happens when investors all wait to see who else is going to invest. 4 | 5 | By far the biggest influence on investors' opinions of a startup is the opinion of other investors. There are very, very few who simply decide for themselves. Any startup founder can tell you the most common question they hear from investors is not about the founders or the product, but "who else is investing?" 6 | 7 | That tends to produce deadlocks. Raising an old-fashioned fixed-size equity round can take weeks, because all the angels sit around waiting for the others to commit, like competitors in a bicycle sprint who deliberately ride slowly at the start so they can follow whoever breaks first. 8 | 9 | Convertible notes let startups beat such deadlocks by rewarding investors willing to move first with lower (effective) valuations. Which they deserve because they're taking more risk. It's much safer to invest in a startup Ron Conway has already invested in; someone who comes after him should pay a higher price. 10 | 11 | The reason convertible notes allow more flexibility in price is that valuation caps aren't actual valuations, and notes are cheap and easy to do. So you can do high-resolution fundraising: if you wanted you could have a separate note with a different cap for each investor. 12 | 13 | That cap need not simply rise monotonically. A startup could also give better deals to investors they expected to help them most. The point is simply that different investors, whether because of the help they offer or their willingness to commit, have different values for startups, and their terms should reflect that. 14 | 15 | Different terms for different investors is clearly the way of the future. Markets always evolve toward higher resolution. You may not need to use convertible notes to do it. With sufficiently lightweight standardized equity terms (and some changes in investors' and lawyers' expectations about equity rounds) you might be able to do the same thing with equity instead of debt. Either would be fine with startups, so long as they can easily change their valuation. 16 | 17 | Deadlocks weren't the only problem with fixed-size equity rounds. Another was that startups had to decide in advance how much to raise. I think it's a mistake for a startup to fix upon a specific number. If investors are easily convinced, the startup should raise more now, and if investors are skeptical, the startup should take a smaller amount and use that to get the company to the point where it's more convincing. 18 | 19 | It's just not reasonable to expect startups to pick an optimal round size in advance, because that depends on the reactions of investors, and those are impossible to predict. 20 | 21 | Fixed-size, multi-investor angel rounds are such a bad idea for startups that one wonders why things were ever done that way. One possibility is that this custom reflects the way investors like to collude when they can get away with it. But I think the actual explanation is less sinister. I think angels (and their lawyers) organized rounds this way in unthinking imitation of VC series A rounds. In a series A, a fixed-size equity round with a lead makes sense, because there is usually just one big investor, who is unequivocally the lead. Fixed-size series A rounds already are high res. But the more investors you have in a round, the less sense it makes for everyone to get the same price. 22 | 23 | The most interesting question here may be what high res fundraising will do to the world of investors. Bolder investors will now get rewarded with lower prices. But more important, in a hits-driven business, is that they'll be able to get into the deals they want. Whereas the "who else is investing?" type of investors will not only pay higher prices, but may not be able to get into the best deals at all. -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import argparse 4 | from flow import online_flow 5 | from utils.vector_search import load_index 6 | 7 | def initialize_system(config): 8 | """Load necessary resources at system startup.""" 9 | print(f"Loading system resources from {config['output_dir']}...") 10 | 11 | # Load FAISS index 12 | faiss_index_path = os.path.join(config['output_dir'], "essay_index.faiss") 13 | faiss_index = load_index(faiss_index_path) 14 | print(f"Loaded FAISS index from {faiss_index_path}") 15 | 16 | # Load chunk metadata (includes text content) 17 | metadata_path = os.path.join(config['output_dir'], "chunk_metadata.json") 18 | with open(metadata_path, "r") as f: 19 | chunk_metadata = json.load(f) 20 | print(f"Loaded {len(chunk_metadata)} chunks from {metadata_path}") 21 | 22 | return { 23 | "faiss_index": faiss_index, 24 | "chunk_metadata": chunk_metadata 25 | } 26 | 27 | def main(args): 28 | # Initialize system with resources 29 | system_resources = initialize_system({"output_dir": args.output_dir}) 30 | 31 | # Process user queries in a loop 32 | while True: 33 | # Get user query 34 | query = input("\nAsk a question about Paul Graham's essays (or type 'exit' to quit): ") 35 | if query.lower() in ['exit', 'quit', 'q']: 36 | break 37 | 38 | # Create shared data for this query 39 | shared = { 40 | # System resources 41 | "faiss_index": system_resources["faiss_index"], 42 | "chunk_metadata": system_resources["chunk_metadata"], 43 | 44 | # Query 45 | "query": query 46 | } 47 | 48 | # Run the online processing flow 49 | online_flow.run(shared) 50 | 51 | # Display results 52 | print("\n" + "-" * 50) 53 | if not shared.get("is_valid_query", True): 54 | print(f"Query was determined to be off-topic. Reason: {shared.get('rejection_reason', 'Unknown')}") 55 | print(f"Paul Graham's response: \n\n{shared['final_response']}") 56 | print("-" * 50) 57 | print(f"Audio response available with hash: {shared['audio_file_hash']}") 58 | print(f"(Check the audio_cache directory for the MP3 file)") 59 | 60 | if __name__ == "__main__": 61 | parser = argparse.ArgumentParser(description="AI Paul Graham - Ask questions about Paul Graham's essays") 62 | parser.add_argument("--output-dir", type=str, default="output", 63 | help="Directory where processed files are stored") 64 | 65 | args = parser.parse_args() 66 | main(args) -------------------------------------------------------------------------------- /offline_processing.py: -------------------------------------------------------------------------------- 1 | import os 2 | import argparse 3 | from flow import offline_flow 4 | 5 | def main(args): 6 | # Define paths 7 | data_dir = args.data_dir 8 | meta_csv = args.meta_csv 9 | output_dir = args.output_dir 10 | 11 | # Create output directory if it doesn't exist 12 | os.makedirs(output_dir, exist_ok=True) 13 | 14 | # Define shared data structure for the flow 15 | shared = { 16 | # Input paths 17 | "data_dir": data_dir, 18 | "meta_csv": meta_csv, 19 | 20 | # Output paths 21 | "faiss_index_path": os.path.join(output_dir, "essay_index.faiss"), 22 | "metadata_path": os.path.join(output_dir, "chunk_metadata.json"), 23 | } 24 | 25 | print("Starting offline processing...") 26 | print(f"Data directory: {data_dir}") 27 | print(f"Metadata CSV: {meta_csv}") 28 | print(f"Output directory: {output_dir}") 29 | 30 | # Run the offline processing flow 31 | offline_flow.run(shared) 32 | 33 | print("\nOffline processing completed successfully!") 34 | print(f"FAISS index saved to: {shared['faiss_index_path']}") 35 | print(f"Chunk metadata saved to: {shared['metadata_path']}") 36 | print(f"Processed {len(shared['chunks'])} chunks from {len(shared['essays'])} essays") 37 | 38 | if __name__ == "__main__": 39 | parser = argparse.ArgumentParser(description="Process Paul Graham essays for RAG") 40 | parser.add_argument("--data-dir", type=str, default="data", 41 | help="Directory containing the essay text files") 42 | parser.add_argument("--meta-csv", type=str, default="meta.csv", 43 | help="Path to CSV file with essay metadata") 44 | parser.add_argument("--output-dir", type=str, default="output", 45 | help="Directory to save processed files") 46 | 47 | args = parser.parse_args() 48 | main(args) -------------------------------------------------------------------------------- /output/essay_index.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/output/essay_index.faiss -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pocketflow>=0.0.1 2 | openai>=1.0.0 3 | scikit-learn>=1.0.0 4 | pandas>=1.3.0 5 | numpy>=1.20.0 6 | streamlit>=1.20.0 7 | faiss-cpu>=1.7.0 8 | pyyaml>=6.0.0 9 | anthropic>=0.23.2 10 | google-cloud-aiplatform 11 | google-genai -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/utils/__init__.py -------------------------------------------------------------------------------- /utils/audio_cache/1a88396305914171cdc8363b0f5a7e85.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/utils/audio_cache/1a88396305914171cdc8363b0f5a7e85.wav -------------------------------------------------------------------------------- /utils/audio_cache/44fa37880728388737edc075545ef9f5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/utils/audio_cache/44fa37880728388737edc075545ef9f5.wav -------------------------------------------------------------------------------- /utils/audio_cache/d0504743ab8cf2c2757ed12ecc2c22ab.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-AI-Paul-Graham/eb304ff3774606a2bdb67cc4065605c4ac2f8ca7/utils/audio_cache/d0504743ab8cf2c2757ed12ecc2c22ab.wav -------------------------------------------------------------------------------- /utils/call_llm.py: -------------------------------------------------------------------------------- 1 | from anthropic import AnthropicVertex 2 | import os 3 | from functools import lru_cache 4 | 5 | @lru_cache(maxsize=1000) 6 | def call_llm(prompt: str) -> str: 7 | client = AnthropicVertex( 8 | region=os.getenv("ANTHROPIC_REGION", "us-east5"), 9 | project_id=os.getenv("ANTHROPIC_PROJECT_ID", "your-project-id") 10 | ) 11 | response = client.messages.create( 12 | max_tokens=1024, 13 | messages=[{"role": "user", "content": prompt}], 14 | model="claude-3-7-sonnet@20250219" 15 | ) 16 | return response.content[0].text 17 | 18 | if __name__ == "__main__": 19 | test_prompt = "Hello, how are you?" 20 | response = call_llm(test_prompt) 21 | print(f"Test successful. Response: {response}") 22 | -------------------------------------------------------------------------------- /utils/data_loader.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pandas as pd 3 | 4 | def load_data(data_dir, meta_csv): 5 | """Load essays and metadata from files. 6 | 7 | Args: 8 | data_dir (str): Directory containing the essay text files 9 | meta_csv (str): Path to the CSV file with metadata 10 | 11 | Returns: 12 | tuple: (essays_dict, metadata_dataframe) 13 | essays_dict: Dictionary mapping file_id to essay text 14 | metadata_dataframe: Pandas DataFrame with essay metadata 15 | """ 16 | metadata = pd.read_csv(meta_csv) 17 | essays = {} 18 | 19 | for filename in os.listdir(data_dir): 20 | if filename.endswith('.txt'): 21 | with open(os.path.join(data_dir, filename), 'r', encoding='utf-8') as f: 22 | file_id = filename.split('.')[0] 23 | essays[file_id] = f.read() 24 | 25 | return essays, metadata 26 | 27 | if __name__ == "__main__": 28 | # Example usage 29 | import sys 30 | 31 | # Get current directory 32 | current_dir = os.path.dirname(os.path.abspath(__file__)) 33 | # Go up one level to project root 34 | project_root = os.path.dirname(current_dir) 35 | 36 | data_dir = os.path.join(project_root, "data") 37 | meta_csv = os.path.join(project_root, "meta.csv") 38 | 39 | if os.path.exists(data_dir) and os.path.exists(meta_csv): 40 | essays, metadata = load_data(data_dir, meta_csv) 41 | 42 | print(f"Loaded {len(essays)} essays") 43 | print(f"Metadata shape: {metadata.shape}") 44 | 45 | # Print a sample essay 46 | if essays: 47 | sample_id = next(iter(essays)) 48 | print(f"\nSample essay (ID: {sample_id}):") 49 | print(f"{essays[sample_id][:200]}...") 50 | else: 51 | print(f"Data directory or metadata file not found.") 52 | print(f"Expected data directory: {data_dir}") 53 | print(f"Expected metadata file: {meta_csv}") -------------------------------------------------------------------------------- /utils/embedding.py: -------------------------------------------------------------------------------- 1 | from vertexai.language_models import TextEmbeddingInput, TextEmbeddingModel 2 | from functools import lru_cache 3 | 4 | @lru_cache(maxsize=1000) 5 | def get_embedding(text): 6 | """Get embedding vector for a text using Vertex AI. 7 | 8 | Args: 9 | text (str): The text to embed 10 | 11 | Returns: 12 | list: The embedding vector 13 | """ 14 | # Instantiate the embedding model 15 | model = TextEmbeddingModel.from_pretrained("text-embedding-005") 16 | 17 | # Prepare input for the embedding 18 | embedding_input = TextEmbeddingInput(text, "RETRIEVAL_DOCUMENT") 19 | 20 | # Fetch embedding (this returns a list; we take [0] since we have 1 input) 21 | embedding_obj = model.get_embeddings([embedding_input])[0] 22 | 23 | # Extract the actual values from the TextEmbedding object 24 | embedding_vector = embedding_obj.values 25 | 26 | return embedding_vector 27 | 28 | if __name__ == "__main__": 29 | # Test the embedding function 30 | sample_text = "This is a test sentence to embed." 31 | embedding = get_embedding(sample_text) 32 | print(f"Embedding dimension: {len(embedding)}") 33 | print(f"First few values: {embedding[:5]}") -------------------------------------------------------------------------------- /utils/text_chunker.py: -------------------------------------------------------------------------------- 1 | def chunk_text(text, chunk_size=2000, overlap=500): 2 | """Split text into overlapping chunks of approximately chunk_size chars. 3 | 4 | Args: 5 | text (str): The text to chunk 6 | chunk_size (int): Target size of each chunk in characters 7 | overlap (int): Number of overlapping characters between chunks 8 | 9 | Returns: 10 | list: List of text chunks 11 | """ 12 | # Guard against invalid parameters that would cause infinite loops 13 | if overlap >= chunk_size: 14 | overlap = chunk_size // 2 # Default to 50% overlap if invalid 15 | 16 | chunks = [] 17 | start = 0 18 | while start < len(text): 19 | end = min(start + chunk_size, len(text)) 20 | if end < len(text) and end - start == chunk_size: 21 | # Try to find a good breaking point 22 | last_period = text.rfind('.', start, end) 23 | if last_period > start + 0.5 * chunk_size: 24 | end = last_period + 1 25 | 26 | chunks.append(text[start:end]) 27 | 28 | # Ensure we make forward progress 29 | if end == len(text): 30 | # We've reached the end of the text 31 | break 32 | 33 | # Move forward by at least 1 character if overlap would prevent progress 34 | start = min(end, start + max(1, end - start - overlap)) 35 | 36 | return chunks 37 | 38 | if __name__ == "__main__": 39 | # Test the chunking function 40 | sample_text = "This is a test paragraph. It contains several sentences. " * 10 41 | chunks = chunk_text(sample_text, chunk_size=2000, overlap=500) 42 | 43 | print(f"Original text length: {len(sample_text)}") 44 | print(f"Number of chunks: {len(chunks)}") 45 | for i, chunk in enumerate(chunks): 46 | print(f"Chunk {i+1} (length {len(chunk)}): {chunk[:50]}...") -------------------------------------------------------------------------------- /utils/text_to_speech.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | import subprocess 4 | import base64 5 | import hashlib 6 | import os 7 | 8 | def synthesize_text_to_speech(text, output_dir="audio_cache"): 9 | """ 10 | Synthesizes text to speech using Google Cloud Text-to-Speech API. 11 | Generates a filename based on a hash of the input text. 12 | 13 | Args: 14 | text (str): The text to convert to speech 15 | output_dir (str): Directory to save audio files 16 | 17 | Returns: 18 | str: Filename (hash) if successful, None otherwise 19 | """ 20 | # Create hash of the text for filename 21 | text_hash = hashlib.md5(text.encode('utf-8')).hexdigest() 22 | filename = f"{text_hash}.wav" 23 | filepath = os.path.join(output_dir, filename) 24 | 25 | # Check if file already exists (caching) 26 | if os.path.exists(filepath): 27 | return text_hash 28 | 29 | # Ensure output directory exists 30 | os.makedirs(output_dir, exist_ok=True) 31 | 32 | # Get the Google Cloud project ID 33 | project = subprocess.check_output( 34 | ["gcloud", "config", "list", "--format=value(core.project)"] 35 | ).decode().strip() 36 | 37 | # Get an access token 38 | token = subprocess.check_output( 39 | ["gcloud", "auth", "print-access-token"] 40 | ).decode().strip() 41 | 42 | # Prepare the JSON payload 43 | payload = { 44 | "input": { 45 | "text": text 46 | }, 47 | "voice": { 48 | "languageCode": "en-US", 49 | "name": "en-US-Chirp3-HD-Puck" 50 | }, 51 | "audioConfig": { 52 | "audioEncoding": "LINEAR16" 53 | } 54 | } 55 | 56 | # Set the headers 57 | headers = { 58 | "Content-Type": "application/json", 59 | "X-Goog-User-Project": project, 60 | "Authorization": f"Bearer {token}", 61 | } 62 | 63 | # Make the POST request 64 | url = "https://texttospeech.googleapis.com/v1/text:synthesize" 65 | response = requests.post(url, headers=headers, json=payload) 66 | response.raise_for_status() # Raises an error if the request fails 67 | 68 | # The response contains a base64-encoded audio content 69 | audio_content = response.json().get("audioContent") 70 | 71 | with open(filepath, "wb") as out_file: 72 | out_file.write(base64.b64decode(audio_content)) 73 | return text_hash 74 | 75 | if __name__ == "__main__": 76 | text_to_speak = ( 77 | "Pocket Flow is A 100-line minimalist LLM framework. humm. This is a test. humm." 78 | ) 79 | result = synthesize_text_to_speech(text_to_speak) 80 | print(f"Result hash: {result}") --------------------------------------------------------------------------------