davepeck.orgDave Peck's Master Feedhttps://davepeck.org/en-ushttps://davepeck.org/2025/04/14/pep-787-safer-subprocess-usage-using-t-strings/https://davepeck.org/2025/04/14/pep-787-safer-subprocess-usage-using-t-strings/<p>PEP 787, <a href="https://peps.python.org/pep-0787/"><em>Safer subprocess usage using t-strings</em></a>, is a newly proposed <a href="https://peps.python.org/pep-0001/">PEP</a> that improves the safety of <a href="https://docs.python.org/3/library/subprocess.html">subprocess</a> invocations in Python by building directly on the <a href="/2025/04/11/pythons-new-t-strings/">template strings</a> features of <a href="https://peps.python.org/pep-0750/">PEP 750</a>. I couldn't be more excited to see it! The proposal is <a href="https://discuss.python.org/t/pep-787-safer-subprocess-usage-using-t-strings/">open for feedback</a>.</p> <p>(PS: This new proposal was written by the <a href="https://x.com/nhumrich">two</a> <a href="https://mastodon.social/@ancoghlan">authors</a> of <a href="https://peps.python.org/pep-0501/">PEP 501</a>, which fed directly into the development of <a href="https://peps.python.org/pep-0750/">PEP 750</a>. Nick Humrich offers a good perspective on the history <a href="https://news.ycombinator.com/item?id=43648120">in his recent HN posts</a>.)</p> Mon, 14 Apr 2025 16:10:00 GMTPython's new t-stringshttps://davepeck.org/2025/04/11/pythons-new-t-strings/https://davepeck.org/2025/04/11/pythons-new-t-strings/<p>Template strings, also known as t-strings, have been <a href="https://peps.python.org/pep-0750/">officially accepted</a> as a feature in Python 3.14, which will ship in late 2025. 🎉</p> <p>I'm excited; t-strings open the door to safer more flexible string processing in Python.</p> <h4>What's the big idea with t-strings?</h4> <p>Since they were introduced in Python 3.6, <a href="https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals">f-strings</a> have become a <em>very</em> popular way to format strings. They are concise, readable, and powerful.</p> <p>In fact, they're <em>so</em> delightful that many developers use f-strings for everything... even when they shouldn't!</p> <p>Alas, f-strings are often dangerously (mis)used to format strings that contain user input. I've seen f-strings used for SQL (<code>f"SELECT * FROM users WHERE name = '{user_name}'"</code>) and for HTML (<code>f"&lt;div&gt;{user_name}&lt;/div&gt;"</code>). These are not safe! If <code>user_name</code> contains a malicious value, it can lead to <a href="https://owasp.org/www-community/attacks/SQL_Injection">SQL injection</a> or <a href="https://owasp.org/www-community/attacks/xss/">cross-site scripting</a>.</p> <p>Template strings are a <em>generalization</em> of Python's f-strings. Whereas f-strings immediately become a string, t-strings evaluate to a new type, <code>string.templatelib.Template</code>:</p> <pre><code>from string.templatelib import Template name = "World" template: Template = t"Hello {name}!" </code></pre> <p>Importantly, <code>Template</code> instances are <em>not</em> strings. The <code>Template</code> type does not provide its own <code>__str__()</code> implementation, which is to say that calling <code>str(my_template)</code> does not return a useful value. Templates <em>must</em> be processed before they can be used; that processing code can be written by the developer or provided by a library and can safely escape the dynamic content.</p> <p>We can imagine a library that provides an <code>html()</code> function that takes a <code>Template</code> and returns a safely escaped string:</p> <pre><code>evil = "&lt;script&gt;alert('bad')&lt;/script&gt;" template = t"&lt;p&gt;{evil}&lt;/p&gt;" safe = html(template) assert safe == "&lt;p&gt;&amp;lt;script&amp;gt;alert('bad')&amp;lt;/script&amp;gt;&lt;/p&gt;" </code></pre> <p>Of course, t-strings are useful for more than just safety; they also allow for more flexible string processing. For example, that <code>html()</code> function could return a new type, <code>HTMLElement</code>. It could also accept all sorts of useful substitutions in the HTML itself:</p> <pre><code>attributes = {"src": "roquefort.jpg", "alt": "Yum"} template = t"&lt;img {attributes} /&gt;" element = html(template) assert str(element) == "&lt;img src='roquefort.jpg' alt='Yum' /&gt;" </code></pre> <p>If you've worked with JavaScript, t-strings may feel familiar. They are the pythonic parallel to JavaScript's <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates">tagged templates</a>.</p> <h4>How do I work with t-strings?</h4> <p>To support processing, <code>Template</code>s give developers access to the string and its interpolated values <em>before</em> they are combined into a final string.</p> <p>The <code>.strings</code> and <code>.values</code> properties of a <code>Template</code> return tuples:</p> <pre><code>name = "World" template = t"Hello {name}!" assert template.strings == ("Hello ", "!") assert template.values == (name,) </code></pre> <p>There is always one more (possibly empty) string than value. That is, <code>t"".strings == ("",)</code> and <code>t"{name}".strings == ("", "")</code>.</p> <p>As a shortcut, it's also possible to iterate over a <code>Template</code>:</p> <pre><code>name = "World" template = t"Hello {name}!" contents = list(template) assert contents[0] == "Hello " assert contents[1].value == name assert contents[2] == "!" </code></pre> <p>Developers writing complex processing code can also access the gory details of each interpolation:</p> <pre><code>name = "World" template = t"Hello {name!s:&gt;8}!" assert template.interpolations[0].value == name assert template.interpolations[0].expression == "name" assert template.interpolations[0].conversion == "s" assert template.interpolations[0].format_spec == "&gt;8" </code></pre> <p>In addition to supporting the literal (<code>t"foo"</code>) form, <code>Template</code>s can also be instantiated directly:</p> <pre><code>from string.templatelib import Template, Interpolation template = Template( "Hello ", Interpolation(value="World", expression="name"), "!" ) </code></pre> <p>Strings and interpolations can be provided to the <code>Template</code> constructor in any order.</p> <h4>A simple t-string example</h4> <p>Let's say we wanted to write code to convert all substituted words into pig latin. All it takes is a simple function:</p> <pre><code>def pig_latin(template: Template) -&gt; str: """Convert a Template to pig latin.""" result = [] for item in template: if isinstance(item, str): result.append(item) else: word = item.value if word and word[0] in "aeiou": result.append(word + "yay") else: result.append(word[1:] + word[0] + "ay") return "".join(result) name = "world" template = t"Hello {name}!" assert pig_latin(template) == "Hello orldway!" </code></pre> <p>This is a goofy example; if you'd like to see some <em>less</em> silly examples, check out the <a href="https://github.com/davepeck/pep750-examples/">PEP 750 examples repository</a>.</p> <h4>What's next once t-strings ship?</h4> <p>T-strings are a powerful new feature that will make Python string processing safer and more flexible. I hope to see them used in all sorts of libraries and frameworks, especially those that deal with user input.</p> <p>In addition, I hope that the tooling ecosystem will adapt to support t-strings. For instance, I'd love to see <code>black</code> and <code>ruff</code> format t-string <em>contents</em>, and <code>vscode</code> <em>color</em> those contents, if they're a common type like HTML or SQL.</p> <p>It's been fun to get to know and work with <a href="https://github.com/jimbaker">Jim</a>, <a href="https://github.com/pauleveritt">Paul</a>, <a href="https://github.com/koxudaxi">Koudai</a>, <a href="https://github.com/lysnikolaou">Lysandros</a>, and <a href="https://en.wikipedia.org/wiki/Guido_van_Rossum">Guido</a> on this project and to interact with <a href="https://discuss.python.org/t/pep750-template-strings-new-updates/71594">many more members of the Python community</a> online without whose input PEP 750 simply wouldn't have come together. I can't wait to see what developers build with t-strings once they ship!</p> Fri, 11 Apr 2025 15:31:00 GMThttps://davepeck.org/2025/02/08/we-are-destroying-software/https://davepeck.org/2025/02/08/we-are-destroying-software/<p><a href="https://antirez.com/">Antirez</a> is back with a short list of <a href="https://antirez.com/news/145">how we're destroying software</a>. A few excerpts:</p> <blockquote> <p>We are destroying software with complex build systems.</p> <p>We are destroying software pushing for rewrites of things that work.</p> <p>We are destroying software trying to produce code as fast as possible, not as well designed as possible.</p> <p>...</p> </blockquote> <p>I dunno. It seems like it was ever thus. We've always layered on terrible leaky abstractions and built unfriendly brittle tools. We've always needlessly rewritten systems that work just fine. We've always rushed to get it out the door now, not out the door right.</p> <p>But I do want to call this one out:</p> <blockquote> <p>We are destroying software mistaking it for a purely engineering discipline.</p> </blockquote> <p>So much this. People and politics and life are so much a part of software. The tools we build reflect our values and beliefs. They enable others to promote and entrench their values and beliefs, whether for good or for ill. Let's work to make it for good.</p> <p><a href="https://antirez.com/news/145">Link</a></p> Sat, 08 Feb 2025 19:10:00 GMThttps://davepeck.org/2025/01/21/welp/https://davepeck.org/2025/01/21/welp/<p>Welp. He's back.</p> <p>Yesterday, like all incoming presidents, Trump signed a barrage of executive orders. <em>Unlike</em> other incoming presidents, many of his actions were bizarre, unlawful, or outright unconstitutional. <a href="https://www.lawfaremedia.org/">Lawfare</a> remains my go-to source for both <a href="https://www.lawfaremedia.org/article/trump's-tiktok-executive-order-and-the-limits-of-executive-non-enforcement">cautious analysis</a> and <a href="https://www.lawfaremedia.org/article/documents">original documents</a>.</p> <p>From where I sit, the one truly terrifying action Trump took yesterday was <a href="https://www.lawfaremedia.org/article/trump-pardons-or-commutes-terms-of-all-jan.-6-rioters">pardoning or commuting the terms of every January 6th insurrectionist</a>. What better way to buy the loyalty of his most violent supporters? What better way to ensure future violence should such violence serve his needs?</p> Tue, 21 Jan 2025 17:10:00 GMTSmall tech in 2025https://davepeck.org/2025/01/15/small-tech-in-2025/https://davepeck.org/2025/01/15/small-tech-in-2025/<p>Big tech can fend for itself. For me, small tech — home to all manner of creative computer weirdos — is where the fun is at. Here are some trends I'm keeping an eye on:</p> <h4>The open social web</h4> <p>The open social web hit its stride in 2024. Idealists and software nerds got organized: the <a href="https://socialwebfoundation.org/team/">Social Web Foundation</a> emerged to steward the <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a> ecosystem, <a href="https://freeourfeeds.com">Free Our Feeds</a> started holding <a href="https://atproto.com">ATProto</a>'s feet to the decentralized <a href="https://dustycloud.org/blog/how-decentralized-is-bluesky/">fire</a>, and <a href="https://www.anew.social">A New Social</a> began building <a href="https://fed.brid.gy">bridges</a> between open networks. Independent researchers brought focus to the <a href="https://erinkissane.com/fediverse-governance-drop">challenges of decentralized governance</a> while nonprofits developed new resources for <a href="https://about.iftas.org">federated moderation</a>. And, in early 2025, <a href="https://joinmastodon.org/about">Mastodon</a> took big steps toward <a href="https://blog.joinmastodon.org/2025/01/the-people-should-own-the-town-square/">community ownership</a>.</p> <p>Creative tinkerers have leveraged the social web's openness to build interesting indie businesses. <a href="https://surf.social">Surf.social</a> ships an innovative UI for exploring open social content. <a href="https://murmel.social">Murmel</a> sends top stories from your feed directly to your inbox. <a href="https://masto.host">Mastohost</a> makes it easy to self-host Mastodon. And <a href="https://micro.blog">Micro.blog</a> continues to thoughtfully explore new directions.</p> <h4>Novel use of large language models</h4> <p>While big tech spins its wheels on <a href="https://www.salesforce.com/agentforce/agentic-systems/">"agentic" AI hype</a>, small tech is discovering creative and force-multiplying new uses for LLMs.</p> <p>Researchers like <a href="https://wattenberger.com">Amelia Wattenberger</a>, <a href="https://thesephist.com">Linus Lee</a>, <a href="https://tonybeltramelli.com">Tony Beltramelli</a>, <a href="https://maggieappleton.com">Maggie Appleton</a>, and <a href="https://www.swyx.io">Shawn Wang</a> are all exploring LLM-powered user experiences built on tight feedback loops. My favorite of these interface prototypes <em>avoid</em> chat-like interactions entirely, instead hiding LLMs gently in the background. Gestures lead to LLM invocations, which lead to the further <a href="https://wattenberger.com/thoughts/our-interfaces-have-lost-their-senses">evolution of the interface</a>.</p> <p>Meanwhile, services like <a href="https://citymeetings.nyc">CityMeetings.nyc</a> show the potential for LLMs to transmute piles of unstructured content into actionable insight. CityMeetings breaks down every New York City Council meeting into easily readable and linkable digests. It has become an essential tool for local journalists. Impressively, CityMeetings is a <a href="https://vikramoberoi.com/about/">one-person project</a>!</p> <p>Small tech is (of course!) full of indie devs, who naturally experiment with LLMs for their own software development. AI code assistants like <a href="https://github.com/features/copilot">GitHub Copilot</a> are now omnipresent, and editor workflow innovations from <a href="https://cursor.com">Cursor</a> and <a href="https://windsurfai.org">Windsurf AI</a>, along with chat UX features like <a href="https://support.anthropic.com/en/articles/9487310-what-are-artifacts-and-how-do-i-use-them">Anthropic's Artifacts</a>, suggest where tools might go next. Small tech startups like <a href="https://www.val.town">Val Town</a> have learned from these patterns and introduced <a href="https://www.val.town/townie/signup">their own bespoke AI tools</a> for developers.</p> <h4>Experiments in local-first</h4> <p>The small tech community has a long history of building tools that prioritize user agency and privacy. That's why, when <a href="https://martin.kleppmann.com">Martin Kleppmann</a> and <a href="https://adamwiggins.com">Adam Wiggins</a> introduced the idea of "<a href="https://www.inkandswitch.com/local-first.html">local-first software</a>" architecture, the community paid attention. Local-first applications store data locally, work offline, and sync with other devices when possible — aligning nicely with the ethos of small tech and the open social web.</p> <p>In his fun-to-read <a href="https://macwright.com/2025/01/11/predictions">predictions for 2025</a>, <a href="https://macwright.com/about/">Tom MacWright</a> anticipates that "local-first will have a breakthrough moment". The technical challenges — building sync engines, resolving conflicts, and managing schema migrations — remain substantial, so I don't expect to see a true market breakthrough. That said, new frameworks like <a href="https://zero.rocicorp.dev">Zero</a>, <a href="https://electric-sql.com">Electric</a>, and <a href="https://jazz.tools">Jazz</a> show that indie devs will keep pushing the envelope.</p> <h4>Sustainable and small</h4> <p>I'm always drawn to indie software shops that eschew "traditional" VC financing in favor of a focus on sustainable growth and personal independence. I'm delighted by the sheer amount of <a href="https://www.val.town">technical depth</a>, <a href="https://www.hiddendoor.co">art</a>, <a href="https://home.omg.lol">whimsy</a>, and <a href="https://obsidian.md">nerdy joy</a> I'm seeing from today's crop of small tech startups. Creative experimentation is alive and well. While big tech keeps embiggening, small tech is quietly shaping a more humane and thoughtful future.</p> Wed, 15 Jan 2025 18:43:00 GMThttps://davepeck.org/2025/01/07/severance-theme-song-defiant-piano-jazz/https://davepeck.org/2025/01/07/severance-theme-song-defiant-piano-jazz/<p><i>This is an audio post. You can listen to the audio here: <a href="https://davepeck.org/audio/2025/01/07/davepeck-dot-org_severance-theme-song-defiant-piano-jazz-jam-v2.mp3">Severance theme song: Defiant Piano Jazz</a></i></p><p>It's 2025 and I'm apparently unreasonably excited about the <a href="https://www.youtube.com/watch?v=VwP6M9zS_pQ">upcoming second season of Severance</a>. It's the TV show with the most <em><a href="https://www.imdb.com/title/tt0120601/">Being John Malkovich</a></em> energy since, well, <em>Malkovich</em>.</p> <p>The <a href="https://www.youtube.com/watch?v=NmS3m0OG-Ug">opening theme song</a> was stuck in my head all vacation; I couldn't resist noodling with it on the keys. So here's my defiant piano jazz jam:</p> Tue, 07 Jan 2025 18:31:00 GMThttps://davepeck.org/2024/11/16/bluesky/https://davepeck.org/2024/11/16/bluesky/<p><a href="https://bsky.app">Bluesky</a> has been a veritable <em>party</em> since the election.</p> <p>Since I self-host <a href="https://mastodon.davepeck.org/">my own Mastodon instance</a> I figured I'd give self-hosting a <a href="https://atproto.com/guides/self-hosting">Bluesky PDS</a> a shot, too.</p> <p>The upshot: you can find me on Bluesky as <a href="https://bsky.app/profile/davepeck.org">@davepeck.org</a>.</p> <p>I installed my Bluesky PDS on a tiny server using <a href="https://dokku.com">Dokku</a>, a "personal" Heroku clone. You can read my notes on <a href="/notes/bluesky/self-hosting-a-bluesky-pds-with-dokku/">how to self-host a Bluesky PDS with Dokku</a> if you're interested in the gory details.</p> Sat, 16 Nov 2024 16:43:00 GMTDecompressionhttps://davepeck.org/2024/11/06/decompression/https://davepeck.org/2024/11/06/decompression/<p>It was unexpectedly sunny in Seattle today. The trails and parks were full. Perhaps we were all decompressing.</p> <p>Even with the ample sun and fresh air, it was impossible not to dwell:</p> <p>We can say it was about the economy. We can say it was (sigh) about immigrants taking jobs and importing crime. We can say it was about misogyny and racism.</p> <p>It <em>was</em> about these things, to some degree.</p> <p>But I think they also miss the mark. As I write, the GOP looks poised to sweep it all: the popular vote, both houses of Congress, everything.</p> <p>I see this election as a resounding affirmative vote <em>for</em> Trump and Trumpism. I see it as a strident repudiation of much that came before, the political order of America since at least the Reagan administration. I see it as a statement that our norms and our mores and our rule of law no longer matter except to a minority of us.</p> <p>America is changed. Mending it will require the work not of another election, but of an entire generation.</p> Thu, 07 Nov 2024 04:26:00 GMTPhoto: Lithttps://davepeck.org/2024/11/05/lit/https://davepeck.org/2024/11/05/lit/<a href="https://davepeck.org/2024/11/05/saint-obama-candle-lit.jpg"> <img src="https://davepeck.org/2024/11/05/saint-obama-candle-lit.jpg" /> </a><p>Lit. 🤞</p>Tue, 05 Nov 2024 23:30:00 GMThttps://davepeck.org/2024/11/04/vote/https://davepeck.org/2024/11/04/vote/<p>If you're a U.S. citizen: vote for Kamala Harris.</p> <p>I don't think I need to say more. Just vote.</p> Mon, 04 Nov 2024 18:42:00 GMThttps://davepeck.org/2024/10/18/pep750-template-strings/https://davepeck.org/2024/10/18/pep750-template-strings/<p><a href="https://pep-previews--4124.org.readthedocs.build/pep-0750/">PEP 750: Template Strings</a> proposes a new addition to the Python programming language that generalizes f-strings. Unlike f-strings, t-strings evaluate to a new type, <code>Template</code>, that provides access to the string and its interpolated values <em>before</em> they are combined:</p> <pre><code>name = "World" template: Template = t"Hello {name}" assert template.args[0] == "Hello " assert template.args[1].value == "World" </code></pre> <p>This opens the door to a variety of <a href="https://github.com/davepeck/pep750-examples/">new use cases</a>. The proposal is currently in the draft stage and open for feedback.</p> Fri, 18 Oct 2024 20:31:00 GMThttps://davepeck.org/2024/10/07/quick-trip-to-iceland/https://davepeck.org/2024/10/07/quick-trip-to-iceland/<p>Took a four-day trip to Iceland. What a beautiful place. A quick photo summary:</p> <div><a href="/2024/10/07/iceland-seljalandsfoss-1.jpeg" target="_blank"><img src="/2024/10/07/iceland-seljalandsfoss-1-700.jpeg" alt="Seljalandsfoss Waterfall" /></a><a href="/2024/10/07/iceland-seljalandsfoss-2.jpeg" target="_blank"><img src="/2024/10/07/iceland-seljalandsfoss-2-700.jpeg" alt="Seljalandsfoss Waterfall" /></a><a href="/2024/10/07/iceland-snowfall-peninsula-1.jpeg" target="_blank"><img src="/2024/10/07/iceland-snowfall-peninsula-1-700.jpeg" alt="Snowfall Peninsula" /></a><a href="/2024/10/07/iceland-aurora-1.jpeg" target="_blank"><img src="/2024/10/07/iceland-aurora-1-700.jpeg" alt="Aurora in Iceland" /></a><a href="/2024/10/07/iceland-snowfall-peninsula-2.jpeg" target="_blank"><img src="/2024/10/07/iceland-snowfall-peninsula-2-700.jpeg" alt="Snowfall Peninsula" /></a><a href="/2024/10/07/iceland-seljalandsfoss-3.jpeg" target="_blank"><img src="/2024/10/07/iceland-seljalandsfoss-3-700.jpeg" alt="Seljalandsfoss Waterfall" /></a><a href="/2024/10/07/iceland-kirkjufellsfoss.jpeg" target="_blank"><img src="/2024/10/07/iceland-kirkjufellsfoss-700.jpeg" alt="Kirkjufellsfoss Waterfall" /></a><a href="/2024/10/07/iceland-aurora-3.jpeg" target="_blank"><img src="/2024/10/07/iceland-aurora-3-700.jpeg" alt="Aurora in Iceland" /></a></div> Mon, 07 Oct 2024 21:15:00 GMThttps://davepeck.org/2024/09/16/how-to-monetize-your-blog/https://davepeck.org/2024/09/16/how-to-monetize-your-blog/<p><a href="https://modem.io/blog/blog-monetization/">How to Monetize a Blog</a> seems a bit bland at first. I'm guessing most visitors quickly bounce away.</p> <p>Don't. Keep reading. Becōme.</p> <p><a href="https://modem.io/blog/blog-monetization/">Link</a></p> Mon, 16 Sep 2024 16:20:00 GMThttps://davepeck.org/2024/09/13/saving-voyager-1-bruce-waggoner/https://davepeck.org/2024/09/13/saving-voyager-1-bruce-waggoner/<blockquote> <p>And that's how you fix your 47-year-old computer from 15 billion miles away!</p> </blockquote> <p><a href="https://www.youtube.com/watch?v=dF_9YcehCZo">Fascinating talk</a> by Bruce Waggoner, a mission assurance manager at JPL, about <a href="https://www.youtube.com/watch?v=dF_9YcehCZo">how Voyager 1 was repaired</a> after it effectively <a href="https://blogs.nasa.gov/sunspot/2023/12/12/engineers-working-to-resolve-issue-with-voyager-1-computer/">stopped sending <em>all</em> useful data back to Earth</a> in late 2023.</p> <p><a href="https://www.youtube.com/watch?v=dF_9YcehCZo">Link</a></p> Fri, 13 Sep 2024 22:41:00 GMThttps://davepeck.org/2024/08/27/grace-hopper-lecture/https://davepeck.org/2024/08/27/grace-hopper-lecture/<p>I knew that <a href="https://en.wikipedia.org/wiki/Grace_Hopper">Captain Grace Hopper</a> was an early pioneer in computer programming who just so happened to discover and document <a href="https://americanhistory.si.edu/collections/nmah_334663#:~:text=In%201947%2C%20engineers%20working%20on,the%20language%20of%20computer%20programmers.">the first ever computer bug</a> — a literal moth!</p> <p>But I'd never seen a video of her before.</p> <p>Yesterday, the NSA <a href="https://www.nsa.gov/helpful-links/nsa-foia/declassification-transparency-initiatives/historical-releases/view/article/3880193/capt-grace-hopper-on-future-possibilities-data-hardware-software-and-people-1982/">declassified a lecture Hopper gave in 1982</a> at the age of 75.</p> <p>It's astonishingly prescient. She likens that moment to the days just after Ford introduced the Model T and changed the face of the country forever:</p> <blockquote> <p>I can remember when Riverside Drive in New York City, along the Hudson River, was a dirt road. And on Sunday afternoons, as a family, we would go out on the drive and watch all the beautiful horses and carriages go by. In a whole afternoon, there might be one car.</p> <p>...</p> <p>Whether you recognize it or not, the Model Ts of the computer industry are here. We've been through the preliminaries of the industry. We are now at the beginnings of what <em>will</em> be the largest industry in the United States.</p> </blockquote> <p>But with the Model T came unintended consequences; Hopper foresaw the same for the computer age:</p> <blockquote> <p>I'm quite worried about something.</p> <p>When we built all those roads, and the shopping centers, and all the other things, and provided for automobile transportation... we forgot something. We forgot <em>transportation as a whole</em>. We only looked at the automobile. Because of that, when we need them again, the beds of the railroads are falling apart. [...] If we want to move our tanks from the center of the country to the ports to ship them overseas, there are no flat cars left. [...] The truth of the matter is, we've done a lousy job of managing transportation as a whole.</p> <p>Now as we come to the world of the microcomputer, I think we're facing the same possibility. I'm afraid we will continue to buy pieces of hardware and then put programs on them, when what we should be doing is looking at the underlying thing, which is the total flow of information through any organization, activity, or company. We should be looking at the information flow and <em>then</em> selecting the computers to implement that flow.</p> </blockquote> Tue, 27 Aug 2024 20:03:00 GMThttps://davepeck.org/2024/08/05/how-i-use-ai/https://davepeck.org/2024/08/05/how-i-use-ai/<p>In his excellent piece <em><a href="https://nicholas.carlini.com/writing/2024/how-i-use-ai.html">How I Use "AI"</a></em>, Nicholas Carlini writes:</p> <blockquote> <p>I don't think that "AI" models (by which I mean: large language models) are over-hyped.</p> <p>Yes, it's true that any new technology will attract the grifters. And it is definitely true that many companies like to say they're "Using AI" in the same way they previously said they were powered by "The Blockchain". [...] It's also the case we may be in a bubble. The internet was a bubble that burst in 2000, but the Internet applications we now have are what was previously the stuff of literal science fiction.</p> <p>But the reason I think that the recent advances we've made aren't just hype is that, over the past year, I have spent at least a few hours every week interacting with various large language models, and have been consistently impressed by their ability to solve increasingly difficult tasks I give them.</p> <p>[...]</p> <p>So in this post, I just want to try and ground the conversation.</p> </blockquote> <p>With 50 detailed examples, Nicholas illustrates how LLMs have aided him in deep technical challenges, including learning new programming languages, tackling the complexity of modern GPU development, and more. He repeatedly demonstrates how LLMs can be both immensely useful <em>and</em> comically flawed.</p> <p>Nicholas conveys a broad balanced perspective that <a href="/2022/12/01/phase-transitions/">resonates strongly with me</a>. Is AI a bubble? Sure; there's plenty of malinvestment. Is AI over-hyped? Sure; there are those who claim it's about to replace countless jobs, achieve sentience, or even take over the world. Can AI be harmful? Sure; bias and energy usage are two quite different and troubling considerations. But is AI useless? No, demonstrably not.</p> <p><a href="https://nicholas.carlini.com/writing/2024/how-i-use-ai.html">Link</a></p> Mon, 05 Aug 2024 21:33:00 GMThttps://davepeck.org/2024/07/29/french-weather-reports-with-climate-change-visualizations/https://davepeck.org/2024/07/29/french-weather-reports-with-climate-change-visualizations/<p>French TV weather reports apparently include <a href="https://www.euronews.com/green/2024/07/26/climate-scientists-answer-viewers-questions-on-frances-ratings-topping-weather-forecast">two new climate change graphics</a>:</p> <blockquote> <p>“We see it as the weather being a still image, and the climate being the film in which this image is featured,” explains Audrey Cerdan, climate editor-in-chief at France Télévisions. “If you just see the still image, but you don't show the whole movie, you’re not going to understand the still picture.”</p> </blockquote> <p>The first graphic shows projected global temperature rise, in Celsius, to 8 decimal places:</p> <blockquote> <p>People watched in real time as the counter ticked over from 1.18749863 Celsius above the pre-industrial level to 1.18749864 C. Now, it's ticking past 1.2.</p> </blockquote> <p>The second graphic, <a href="https://showyourstripes.info/">climate stripes</a>, shows annual temperature rise at a glance. Here are the global stripes for 1850 through 2023:</p> <p><a href="https://showyourstripes.info/"><img src="/2024/07/29/global-climate-stripes-1850-2023.png" alt="Global climate stripes for 1850-2023" /></a></p> <p>I admire the simplicity of this visualization. I suppose it can be attacked both for its choice of color scale <em>and</em> for its choice of baseline average (1960 through 2010, somewhat arbitrarily) but, for a TV audience, those details seem much less important than the instinct conveyed.</p> <p>I wonder what further opportunities there are to raise awareness of climate change through this combination of mass media and simple data visualization?</p> <p><a href="https://www.euronews.com/green/2024/07/26/climate-scientists-answer-viewers-questions-on-frances-ratings-topping-weather-forecast">Link</a></p> Mon, 29 Jul 2024 15:33:00 GMThttps://davepeck.org/2024/07/15/follow-the-crypto/https://davepeck.org/2024/07/15/follow-the-crypto/<p><a href="https://www.mollywhite.net/">Molly White</a>, <a href="https://www.mollywhite.net/micro/entry/202407121444">introducing</a> her new project <a href="https://www.followthecrypto.org/">Follow the Crypto</a>:</p> <blockquote> <p>This website provides a real-time lens into the cryptocurrency industry’s efforts to influence 2024 elections in the United States.</p> </blockquote> <p>In addition to shedding much needed light on crypto lobbyist spending, Molly's project is also <a href="https://github.com/molly/follow-the-crypto">open source</a> and can theoretically be targeted at unrelated industries. It'd be fun to see someone build a similar dashboard for fossil fuel influence.</p> <p>Beyond that: I've spent a good chunk of 2024 focused on the upcoming Presidential election and have done quite a bit of analysis of FEC data; I still learned a few things by reading the code.</p> <p><a href="https://www.mollywhite.net/micro/entry/202407121444">Link</a></p> Mon, 15 Jul 2024 17:47:00 GMThttps://davepeck.org/2024/07/08/stubborn/https://davepeck.org/2024/07/08/stubborn/<p><a href="https://www.paulgraham.com/">Paul Graham</a>, writing about "<a href="https://paulgraham.com/persistence.html">The Right Kind of Stubborn</a>":</p> <blockquote> <p>The reason the persistent and the obstinate seem similar is that they're both hard to stop. But they're hard to stop in different senses. The persistent are like boats whose engines can't be throttled back. The obstinate are like boats whose rudders can't be turned.</p> </blockquote> <p>That feels like a useful analogy.</p> <p>When I'm at "startup" events in the Seattle region, I tend to — unfairly, I imagine — reduce the stories I'm told to two axes: "commitment to a goal" and "commitment to an implementation". The entrepreneurs I admire most tend to be highly committed to a clearly articulable goal but only lightly committed to its implementation: for them, implementations are simply hypotheses to test as the business is built.</p> <p><a href="https://paulgraham.com/persistence.html">Link</a></p> Mon, 08 Jul 2024 22:15:00 GMThttps://davepeck.org/2024/06/12/home-cooked-software/https://davepeck.org/2024/06/12/home-cooked-software/<p>From <a href="https://maggieappleton.com/">Maggie Appleton</a>'s conference talk on <a href="https://maggieappleton.com/home-cooked-software">Home-Cooked Software</a>:</p> <blockquote> <p>For the last ~year I've been keeping a close eye on how language models capabilities meaningfully change the speed, ease, and accessibility of software development. The slightly bold theory I put forward in this talk is that we're on a verge of a golden age of local, home-cooked software and a new kind of developer – what I've called the barefoot developer.</p> </blockquote> <p>Like everything on Maggie's site, it's worth a read.</p> <p>For my part, I share Maggie's hopefulness that LLMs will help make software development more accessible to a wider audience. I also appreciate her attempt to broaden the definition of "local-first software" away from its technical roots. I want a flourishing world of community software built by and for the communities it serves.</p> <p>(An aside: "local-first" has always implied "sync engine" to me. And sync engines nearly always end up being complex hard-to-build systems. That's one reason why I'm skeptical that we'll see local-first software architectures take off the way the community seems to hope.)</p> <p><a href="https://maggieappleton.com/home-cooked-software">Link</a></p> Wed, 12 Jun 2024 20:04:00 GMT