<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title><![CDATA[Jake McCrary's articles on typescript]]></title>
  <link href="https://jakemccrary.com/atom.xml" rel="self"/>
  <link href="https://jakemccrary.com/"/>
  <updated>2026-03-14T17:06:03+00:00</updated>
  <id>https://jakemccrary.com/</id>
  <author>
    <name><![CDATA[Jake McCrary]]></name>
  </author>
  <entry>
    <id>https://jakemccrary.com/blog/2020/10/03/go-create-silly-small-programs/index.html</id>
    <link href="https://jakemccrary.com/blog/2020/10/03/go-create-silly-small-programs/index.html"/>
    <title><![CDATA[Go create silly, small programs]]></title>
    <updated>2020-10-03T23:59:59+00:00</updated>
    <content type="html"><![CDATA[<div><p>Over the summer, I developed a couple of small, sort of silly programs. One, <a href="https://jakemccrary.com/experiments/photo-fit/">Photo Fit</a>, is a little tool that runs in a web browser and resizes photos to fit as your phone&apos;s background. The other, <a href="https://default-equipment.herokuapp.com/">Default Equipment</a>, runs on Heroku and automates changing the &quot;bike&quot; of my Strava-tracked e-bike rides to be my <a href="https://onewheel.com/">onewheel</a>.</p><p>These weren&apos;t created to solve large problems in the world. There is no plan to make any money with them. As of October 2020, Default Equipment doesn&apos;t even work for other people (though it could, send me a message if you&apos;d like to use it and I&apos;ll get around to it).</p><p>Each was created to fix a minor annoyance in my life and, because these tools can live on the Internet, they can fix the same minor annoyance in other lives.</p><p>With an increasing amount of software in the world, being able to write software is nearly sorcery<a href="#fn-1" id="fnref1"><sup>1</sup></a>. As a developer, you can identify a problem in the world and then change the world to remove that problem. And, depending on the problem, you can remove it for everyone else.</p><p>Software developers aren&apos;t alone in being able to identify problems and remove them through creation. Carpenters can build shelves for their books. Cooks can prepare food to remove hunger. You can come up with nearly an infinite number of other examples.</p><p>The difference is that a solo developer can solve problems for an unknown number of other folks. This is enabled by the Internet enabled ease of distribution. This is very powerful.</p><p>Developers can expose their solution to others through a web application. Desktop or mobile applications can be distributed through various app stores or made available as a download. Source code can be made available for others to run. Being able to distribute easily and cheaply is a game changer.</p><p>A developer&apos;s change to the world might be a minor improvement. Photo Fit might never be used by anyone besides me. But it is still out there, making the world slightly better. It is available for someone to stumble upon when they are also annoyed by the same problem.</p><p>It felt good to write these tiny, useful programs. If you scope them small enough, there is a definitive ending point<a href="#fn-2" id="fnref2"><sup>2</sup></a>. This lets you feel that finishing-a-project satisfaction quickly. The small size also allows you experiment with new techniques and tools without committing to a large and ongoing commitment.</p><p>I wrote both Photo Fit and Default Equipment in TypeScript. Before the beginning of summer, I didn&apos;t know TypeScript and had little exposure to Node.js. Now I have some experience with both and gained that while making small improvements to my life and potentially the lives of others.</p><p>If you haven&apos;t developed software to solve a small problem recently, I&apos;d recommend doing it. Don&apos;t hesitate to remove a problem that feels silly. Removing those problems can still make your life slightly better and gives you an opportunity to learn. It feels good to remove an annoyance from your life. If you can, make that software available to others so their lives are improved as well. Take advantage of the power of easy distribution to improve the world and not just your tiny slice of it.</p><ol class="footnotes"><li class="footnote" id="fn-1"><p>This is taken to an extreme in the fantasy series <a href="https://www.goodreads.com/series/131379-magic-2-0">Magic 2.0</a>.<a href="#fnref1">↩</a></p></li><li class="footnote" id="fn-2"><p>Excluding any ongoing maintenance. But if you&apos;re making something small enough you can approach near zero ongoing maintenance. One of my longest running solve-my-own-problems application, Book Robot, has been operating for nearly 7 years with minimal effort.<a href="#fnref2">↩</a></p></li></ol></div>]]></content>
  </entry>
  <entry>
    <id>https://jakemccrary.com/blog/2020/07/03/introducing-photo-fit/index.html</id>
    <link href="https://jakemccrary.com/blog/2020/07/03/introducing-photo-fit/index.html"/>
    <title><![CDATA[Introducing Photo Fit]]></title>
    <updated>2020-07-03T23:59:59+00:00</updated>
    <content type="html"><![CDATA[<div><p>Earlier this year, I wanted to use a landscape photo as my background on my phone. It wasn&apos;t the photo below but we can use it as an example.</p><p><img alt="Landscape image of my keyboard" src="/images/photo-fit/keyboard-new-keycaps.jpg" title="Landscape image of my keyboard" /></p><p>When I made it my background, my phone<a href="#fn-1" id="fnref1"><sup>1</sup></a> zoomed in to make it fit the portrait orientation of the phone.</p><p><img alt="Screenshot of phone with zoomed in keyboard photo" src="/images/photo-fit/phone-background-before.jpg" title="Screenshot of phone with zoomed in keyboard photo" /></p><p>This is not great. I don&apos;t want a zoomed in version that fits my vertical phone. I want to see the whole photo with black bars at the top and bottom</p><p>I tried to find a way to add these bars using my phone. I couldn&apos;t find an easy way.</p><p>At this point, a reasonable solution would have been transferring the photo to a computer, editing it, and transferring it back to my phone. I didn&apos;t do that. Instead, I wrote a little TypeScript<a href="#fn-2" id="fnref2"><sup>2</sup></a> web app that adds the bars for you. You open the website on your phone, select an image, and then download a properly sized image.</p><p><img alt="Screenshot of phone with properly fitting image" src="/images/photo-fit/phone-background-after.jpg" title="Screenshot of phone with properly fitting image" /></p><p>The tool uses the canvas API and does all of the work in the browser itself. It was a fun, bite-sized project and it gave me an excuse to write some TypeScript and do some web programming. This was the first time I&apos;ve written TypeScript since learning it and I haven&apos;t done any web programming in a while.</p><p>Making <a href="/experiments/photo-fit/">Photo Fit</a> was not a fast approach to changing my phone&apos;s background. But, now the tool exists and anyone, including future me, can quickly resize their photo from the comfort of their own phone.</p><p><a href="/experiments/photo-fit/">Photo Fit</a> is live and available for others to use. I&apos;ve only tested it on my own phone and desktop browsers. It might not work! If you do try it and something weird happens, plese let me know.</p><ol class="footnotes"><li class="footnote" id="fn-1"><p>A Samsung S8 running Android 9<a href="#fnref1">↩</a></p></li><li class="footnote" id="fn-2"><p>I recently learned some TypeScript through <a href="https://www.executeprogram.com">Execute Program</a>. Execute program is a really neat application of spaced repetition for learning programming concepts.<a href="#fnref2">↩</a></p></li></ol></div>]]></content>
  </entry>
</feed>
