Matt Payne's simple blogMatt Payne's simple blog2023-11-17T21:52:44Zhttps://MattPayne.org/Matt PaynePayne@MattPayne.orgConnections - James Burke2023-11-09T00:00:00Z/posts/Connections/<p>I remember <a href="https://en.wikipedia.org/wiki/Connections_(British_TV_series)">Connectoins - James Burke</a> first go around. Some of the episodes are on <a href="https://youtube.com/playlist?list=PLf02uWXhaGRng_YzH-Ser_VEV4lGSLX_1&si=QsYv0HZ_3Urc3zsD">YouTube</a> now.</p>
<p>I'm delighted to learn that <a href="https://curiositystream.com/">Curiosity Stream</a> is putting out a new Connections series. The <a href="https://youtu.be/o-aAFz0ala0?si=hnY8Pxm1e16vkNnK">trailer for Connections with James Burke</a> is exciting.</p>
Conference Posters2023-11-04T00:00:00Z/posts/Posters/<p>Random google results:</p>
<ol>
<li><a href="https://urc.ucdavis.edu/sites/g/files/dgvnsk3561/files/local_resources/documents/pdf_documents/How_To_Make_an_Effective_Poster2.pdf">How To Make An Effective Poster</a></li>
<li><a href="https://guides.nyu.edu/posters">Poster Basics</a></li>
<li><a href="https://urc.ucdavis.edu/photo-galleries/uc-davis-academic-posters">UC Davis Academic Posters</a></li>
<li><a href="https://urc.ucdavis.edu/creating-effective-academic-posters">Creating Effective Academic Posters</a></li>
</ol>
Yoodli.ai - an AI speech coach2023-10-13T00:00:00Z/posts/yoodli/<p>I became aware of <a href="https://app.yoodli.ai/">Yoodli.ai</a> via Toastmasters.</p>
<p>One can, at no cost (it seems), record up to 59 minutes of a speech and have it analyzed.</p>
<h4>Example one</h4>
<p>Here's an encrypted link to a one minute recording I made. Just ask me if you want the password.</p>
<iframe frameborder="8" width="100%" height="100px" src="https://simplecryptowebredirect.payne.repl.co?embed=true"></iframe>
<h4>Example two</h4>
<p>On 2023 October 11, I used the voice recording feature of my iPhone to record a seven minute speech. It was easy to email myself the recording then upload the file to Yoodli.ai. Here's a screen grab of one part of the application:</p>
<p>"Screen grab of part of Yoodli"
<img src="/static/img/Yoodli3.png" alt="Screen grab of part of Yoodli" /></p>
More Mastodon2023-09-27T00:00:00Z/posts/mastodon1/<p>I'd like to connect <a href="https://mastodon.sandwich.net/@MattPayneOrg">my mastodon -- https://mastodon.sandwich.net/@MattPayneOrg</a> -- with my <a href="https://pinboard.in/u:payne">Pinboard.in account</a>. Maybe other things too...</p>
<p><a href="https://gitlab.com/idotj/mastodon-embed-feed-timeline">Here's some AGPL software</a> that I configured for my account:
<a href="https://github.com/payne/mastodon-embed-feed-timeline">https://github.com/payne/mastodon-embed-feed-timeline</a></p>
<p>And here's the result in github pages, inserted here using an iFrame:</p>
<iframe frameborder="8" width="100%" height="700px" src="https://payne.github.io/mastodon-embed-feed-timeline/"></iframe>
Conference Computer Configuration2023-07-22T00:00:00Z/posts/conferenceComputerConfiguration/<p>Having a linux computer in the cloud to avoid downloading a lot over the conference wifi.<br />
Using mosh means the terminal connection doesn't go away from home to hotel hotspot:</p>
<pre><code>mosh --port 1025 hostname tmux -a
</code></pre>
<p>Here's a list of setups I like. Having a long running server is not good because <a href="https://devops.stackexchange.com/questions/653/what-is-the-definition-of-cattle-not-pets#:~:text=In%20the%20old%20way%20of,like%20cattle%20in%20a%20herd.">servers should not be pets</a>.</p>
<ol>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04">docker & docker compose setup on Ubuntu 22.04 LTS</a></li>
<li><code>visudo</code> and add my non-privilidged account</li>
<li>Since the creation script drops my SSH key into root, as root, <code>cp .ssh/authorized_keys ~mpayne/.ssh/</code> and set the permissions right</li>
<li>as unprivilidged account:
<ol>
<li><code>curl -s "https://get.sdkman.io" | bash</code> to <a href="https://sdkman.io/install">install sdkman.io</a></li>
<li><code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash</code> to <a href="https://github.com/nvm-sh/nvm#installing-and-updating">install nvm</a></li>
<li>Add myself to the docker group, install mosh, & jq</li>
</ol>
</li>
</ol>
<pre><code> sudo usermod -aG docker ${USER}
sudo apt-get install mosh tmux jq git
</code></pre>
<ol>
<li>Setup the tmux status bar to something not default. e.g.</li>
</ol>
<pre><code>➜ cat ~/.tmux.conf
set -g status-bg blue
</code></pre>
<ol>
<li>Thanks to Dave B for suggesting that I add the command number to the prompt: <code>export PS1="\! ${PS1}"</code> at the bottom of <code>.bashrc</code></li>
<li>Add <code>set number</code> to <code>.vimrc</code></li>
</ol>
<h3>Docker Compose and localhost</h3>
<p>During Nebraska Code, I learned that just doing a <code>docker compose up -d</code> will expose ports to the whole Internet. Yikes! I had a redis server open to the whole Internet for a while during a Wednesday workshop. After a bunch of googling and talking to folks I found a <a href="https://stackoverflow.com/a/48208039/167247">stackoverflow</a> that led to <a href="https://github.com/payne/beyond-the-cache/commit/a265c3622e7481c72c59ab78462db2b89f26c5fe">this commit (reference & notes are in the commit)</a>.</p>
<script src="https://gist.github.com/payne/b3afa5848d04f15b607ab99958aac79e.js"></script>
<p>After this is setup, use SSH tunnels to access things running on the server as if they were running on localhost.</p>
Redis Notes2023-07-18T00:00:00Z/posts/redis1/<p>I'm very grateful to have been in a workshop today taught by <a href="https://twitter.com/guyroyse">Guy Royse</a> because I learned a lot about Redis and how to put on a great workshop.</p>
<p>To start, I forked Guy's repo: <a href="https://github.com/guyroyse/beyond-the-cache">https://github.com/guyroyse/beyond-the-cache</a>. My fork (where I will put notes is <a href="https://github.com/payne/beyond-the-cache">https://github.com/payne/beyond-the-cache</a>). I plan to summarize things a bit here in this blog post.</p>
<p>During this conference I've been trying to use a linux computer on the cloud to avoid downloading a lot over the conference wifi. It's been going well. I even started using mosh again (<code>mosh --port 1025 hostname tmux -a</code>).</p>
<p>Because I like <code>docker compose up -d</code> & friends more than plain docker commands, I built a docker compose file first thing. What happened next surprised me.</p>
<p>During Nebraska Code, I learned that just doing a <code>docker compose up -d</code> will expose ports to the whole Internet. Yikes! I had a redis server open to the whole Internet for a while on Wednesday. After a bunch of googling and talking to folks I found a <a href="https://stackoverflow.com/a/48208039/167247">stackoverflow</a> that led to <a href="https://github.com/payne/beyond-the-cache/commit/a265c3622e7481c72c59ab78462db2b89f26c5fe">this commit (reference & notes are in the commit)</a>.</p>
<script src="https://gist.github.com/payne/b3afa5848d04f15b607ab99958aac79e.js"></script>
<h2>I'm excited to try Redis - TIL that redis, at its heart, is a data structure server.</h2>
<ol>
<li><a href="https://redis.io/docs/data-types/">Redis Data Types</a> include lists, sets, hashes, sorted sets, streams, geospatial indexes, bitmaps, bitfields and more via extensions</li>
<li><a href="https://redis.io/docs/data-types/probabilistic/bloom-filter/">Bloom Filter</a></li>
<li><a href="https://redis.io/docs/data-types/probabilistic/hyperloglogs/">HyperLogLog</a></li>
<li><a href="https://youtu.be/ztLsihiCHic">Caching API results video</a> was mentioned during class & I'm watching it now.</li>
<li><a href="https://university.redis.com/">Redis University</a> is free!</li>
<li><a href="https://pinboard.in/u:payne/t:redis/t:jul23">Public Redis bookmarks I noted this month</a> include
<ol>
<li>The <a href="https://developer.redis.com/riot/">Redis Input Output Tool - RIOT</a></li>
<li><a href="https://redis.com/blog/introducing-redis-om-for-node-js/">Redis OM for Node.js</a></li>
<li><a href="https://redis.com/blog/redis-smart-cache/#:~:text=Redis%20Smart%20Cache%20is%20an,developers%20for%20optimizing%20application%20performance">Redis Smart Cache is an open source library that seamlessly adds caching to any JDBC-compliant platform, application, or microservice.</a>
<ol>
<li>I want to look for a demo that shows this off using <a href="https://httpd.apache.org/docs/2.4/programs/ab.html">ab</a>, <a href="https://jmeter.apache.org/">JMeter</a> or <a href="https://rieckpil.de/write-gatling-performance-tests-with-java/">Gatling</a>.</li>
</ol>
</li>
<li><a href="https://github.com/redis/redis-om-spring">Redis-om-Spring: Spring Data Redis extensions for better search, documents models, and more</a>
<ol>
<li><a href="https://redis.io/docs/clients/om-clients/stack-spring/#:~:text=Redis%20Stack%20provides%20a%20seamless,several%20client%20libraries%2C%20including%20Node">Learn how to build with Redis Stack and Spring</a></li>
</ol>
</li>
</ol>
</li>
</ol>
<h2>Misc</h2>
<ol>
<li>TIL <a href="https://www.linkedin.com/pulse/ulid-way-generating-unique-identifiers-also-sortable-time-kisivuli/">ULIDs exist and they are better than UUIDs because they can sorted by time</a></li>
<li><a href="https://hackaday.com/2022/04/09/sdr-listens-in-to-your-tires/">SDR - Software Defined Radio and Tire Sensors</a></li>
</ol>
<h2>Redis as a Graph Database</h2>
<ol>
<li><a href="https://youtu.be/HqwY_TyxeJw">Dungeons, Dragons, and Graph Databases - Guy Royse - NDC London 2022</a> is an amazing talk!
<ol>
<li><a href="https://redis.com/blog/redisgraph-eol/">Redis is phasing out RedisGraph</a> :-(</li>
<li>Maybe it would be fun to redo Guy's talk using <a href="https://age.apache.org/">Apache AGE</a>?</li>
</ol>
</li>
</ol>
Criteria Query example with Spring Boot2023-06-30T00:00:00Z/posts/criteriaQuerySpringBoot/<p>Wanting to be able to search using a <code>filter</code> parameter in a HTTP GET api, I'd like to find &/or build a
Short, Self Contained, Correct (Compilable), Example (sscce) using spring boot 3, JPA, and H2. Here are my notes along the way:</p>
<h3>References</h3>
<ol>
<li><a href="https://youtu.be/qpSasUow1XI">Spring Data JPA -Criteria Queries - The Full Guide</a> seems like a good building block</li>
<li><a href="https://youtu.be/wJBAFZv_KN0">Java Spring Boot - JPA - Hibernate - H2 - Paging with Filtering and Sorting</a> looks good and comes with a github repo](https://github.com/codeforgeyt/jpa-paging-sorting-filtering)</li>
<li><a href="https://medium.com/@cmmapada/advanced-search-and-filtering-using-spring-data-jpa-specification-and-criteria-api-b6e8f891f2bf">Advanced Search and Filtering using Spring Data JPA Specification and Criteria API</a> also comes with a <a href="https://github.com/carlmaps/AdvancedSearch/tree/master/advanced-search-api/advanced-search">github repo</a></li>
<li><a href="https://www.youtube.com/watch?v=KnHG_iJJ__M&list=PLoyb0HJlmv_lvsJv02JKe7hz45oB3qlgX">Spring Boot Criteria API</a> might be a good playlist. I don't spot a github repo :-( He's using LiquidBase....</li>
<li><a href="https://www.baeldung.com/rest-search-language-spring-jpa-criteria">REST Query Language with Spring and JPA Criteria</a> has an exciting headline</li>
</ol>
In Spring Boot - Too Many Public Classes?2023-06-26T00:00:00Z/posts/SpringBootTooManyPublicClasses/<p>Can I take a spring boot MVC CRUD app and</p>
<ol>
<li>lower the number of public classes?
<ol>
<li>As a way to enforce rules like only services should call <code>*Repository.java</code> classes.</li>
<li>And <code>@Entity</code> classes should only be used by services and <code>*Repository.java</code> classes.</li>
</ol>
</li>
</ol>
<p>This idea comes from <a href="https://www.youtube.com/live/H13dYhWP78g?feature=share">Spring Office Hours - Episode 43</a></p>
<p>I want to give it a spin and put some notes in this blog post.</p>
<p>Also, what do you think of the two rules above? Should services only use services? Should <code>@Entity</code> classes only be used by a service to interact with the database via the <code>*Repository.java</code> classes?</p>
Logic2023-06-02T00:00:00Z/posts/Logic/<h2>From <a href="https://youtu.be/Qf03U04rqGQ">31 logical fallacies in 8 minutes</a> by <a href="https://www.youtube.com/@JillBearup">Jill Bearup</a></h2>
<p>This great video references <a href="https://yourlogicalfallacyis.com/">YourLogicalFallacyis.com</a> and talks about these fallacies:</p>
<ol>
<li>Fallacy of Composition</li>
<li>Fallacy of Division</li>
<li>The Gambler's Fallacy</li>
<li>Tu Quoque (Who Are You To Talk?)</li>
<li>Strawman</li>
<li>Ad hominem</li>
<li>Genetic Fallacy</li>
<li>Fallacious Appeal To Authority</li>
<li>Red Herring</li>
<li>Appeal to Emotion</li>
<li>Appeal to Popularity (Bandwagon)</li>
<li>Appeal to Tradition</li>
<li>Appeal to Nature</li>
<li>Appeal to Ignorance</li>
<li>Begging the Question</li>
<li>Equivocation</li>
<li>False Dichotomy (Black or White)</li>
<li>Middle Ground Fallacy</li>
<li>Decision Point Fallacy (Sorites Paradox)</li>
<li>Slippery Slope Fallacy</li>
<li>Hasty Generalisations (Anecdotes)</li>
<li>Faulty Analogy</li>
<li>Burden of Proof</li>
<li>Affirming the Consequent</li>
<li>Denying the Antecedent</li>
<li>Moving the Goalposts</li>
<li>False Cause (and Texas Sharpshooter)</li>
<li>Loaded Question</li>
<li>No True Scotsman</li>
<li>Personal Incredulity</li>
<li>The Fallacy Fallacy</li>
</ol>
<h2>syllogisms</h2>
<p>I have fond memories of <a href="https://en.wikipedia.org/wiki/Syllogism">syllogisms</a> from a high school math class. Wikipedia has a nice & tiny example:</p>
<pre><code>All men are mortal.
Socrates is a man.
Therefore, Socrates is mortal.
</code></pre>
<p><a href="https://thedecisionlab.com/reference-guide/philosophy/syllogism">The Decision Lab has a nice page about syllogism</a>.</p>
<p>Years ago I enjoyed <a href="https://en.wikipedia.org/wiki/Lewis_Carroll">Lewis Carroll</a>'s book <a href="https://www.gutenberg.org/files/28696/28696-h/28696-h.htm">Symbolic Logic</a>.</p>
<p>It would be fun to write some recreational computer programs around syllogisms and talk about them in this post.</p>
TenPercent.com2023-06-01T00:00:00Z/posts/TenPercent/<p>Clearly, I want to write more about this and would benefit from digging into TenPercent.com more.</p>
<h3>From <a href="https://art19.com/shows/ten-percent-happier/episodes/a5a632a6-9361-4979-814f-c45417d3514a">Three Skills for Staying Calm, Sane, and Open in a Chaotic World | Krista Tippett</a></h3>
<ul>
<li>how to live with open questions, counterprogramming against your negativity bias, and getting over the God question.</li>
</ul>
<h3>From <a href="https://art19.com/shows/ten-percent-happier/episodes/859e07c4-3395-491f-a282-fc05544d1586">This Episode Will Make You Stronger | Sister Dang Nghiem</a></h3>
<p>Meditation is like a <a href="https://acaringcounselor.com/the-two-wings-of-the-bird-mindfulness-and-self-compassion/">bird with two wings</a>; one way to describe thing wings is:</p>
<ol>
<li>Stopping the mind</li>
<li>Deep thought</li>
</ol>
Vegetable Garden in Zone 5a - Dreams2023-05-26T00:00:00Z/posts/garden1/<ol>
<li><a href="https://extension.unl.edu/statewide/dodge/vegetable-gardening-101/">Vegetable Gardening 101</a></li>
<li><a href="https://byf.unl.edu/first-steps-vegetable-gardening">First Steps of Vegetable Gardening</a></li>
<li><a href="https://www.legacyschoolne.com/spring-gardening-when-to-plant-in-nebraska/#:~:text=The%20Best%20Time%20to%20Start%20Your%20Spring%20Gardening%20in%20Nebraska,between%20mid%2DMarch%20and%20April.">Best time to Start Spring Gardening in Nebraska</a></li>
</ol>
<h2>Starting to plan</h2>
<h3>Fall Planting -- Garlic and...</h3>
<ol>
<li>Garlic</li>
</ol>
<h3>Spring Planting</h3>
<ol>
<li>Basil from seeds</li>
</ol>
<h3>Late Planting:</h3>
<p><a href="https://www.almanac.com/gardening/planting-calendar/NE/Omaha">Planting Calendar for Omaha, NE</a> tells me I can plant these vegetables to harvest before frost (15 Oct 2023):</p>
<ul>
<li>Carrots -- start seeds before Aug 26</li>
<li>Cucumbers -- start by July 12</li>
<li><s>Fava Beans (grow two to six feet tall) -- Aug 16</s> Dogs can get sick by eating those.</li>
<li>Green Beans (a childhood favorite that Glenn would grow) -- July 12</li>
<li>Lettuce (Glenn grew lots of leaf lettuce) -- Sept 5</li>
<li>Tomatoes -- Seedlings by July 2</li>
<li>Zucchini & Summer Squash -- July 17</li>
</ul>
<p>It's going to be a good summer!</p>
<h2>Tools</h2>
<ol>
<li>Maybe buy a <a href="https://www.darwinsgrip.com/details">Darwin's Grip</a> for my EGO cultivator and trimmer etc</li>
<li>Maybe a subscription to <a href="https://www.growveg.com/subscribeinfo.aspx">Garden Planner</a></li>
<li>Maybe some nice <a href="https://www.amazon.com/Gardeners-Vertex-Lifetime-Tomato-Cage/dp/B07P5V5QST">vertex lifetime tomato cages</a></li>
</ol>
<h2>Compost</h2>
<ol>
<li><a href="https://www.npr.org/2020/04/07/828918397/how-to-compost-at-home">NPR on How to Compost at Home</a></li>
<li><a href="https://www.extension.iastate.edu/smallfarms/dos-and-donts-composting#:~:text=Fall%20is%20a%20good%20time,and%20maintaining%20a%20compost%20pile">Compost Dos & Don'ts</a></li>
</ol>
<h2>YouTube videos that spark interest</h2>
<ol>
<li><a href="https://youtu.be/NlS_dTDsHHQ">New Vegetable Garden: How to Get Started</a> talks about starting with a raised bed (and in the ground).</li>
<li><a href="https://youtu.be/YkSU5dkAREA">Companion Planting Made Simpile</a></li>
</ol>
<h2>Rough draft #1 - 15 feet by 15 feet</h2>
<p><img src="/static/img/garden_idea1.png" alt="garden plan" /></p>
<p>Based on what's <a href="https://www.indiancreeknursery.com/shop/vegetables/4?page=1&limit=60&sort_by=name&sort_order=asc&item_status=in_stock">available localy</a>, I might change from this. Who knows, maybe I'll grow <em>LOTS</em> of tomatoes?</p>
<h2>Omaha is zone 5b</h2>
<p><a href="https://biggarden.org/annual-planting-calendar">https://biggarden.org/annual-planting-calendar</a></p>
<h2>Irrigation Notes</h2>
<p>Don gifted me some things from <a href="https://www.dripdepot.com/">the Drip Depot</a> and I'm excited to use them in the spring. I have some notes in my telegram garden channel.</p>
Cucumber2023-05-14T00:00:00Z/posts/cucumber/<p>It was great fun using
<a href="https://cyber-dojo.org">cyber-dojo.org</a>
and
<a href="https://mobti.me">MOBti.me</a>
to take turns using
<a href="https://github.com/cucumber/cucumber-js">Cucumber</a> to work through a programming exercise. Reminds me of
<a href="https://github.com/payne/ChadPythonStocks/blob/master/cc/features/CoveredCalls.feature">a chat Chad and I had in 2017 exploring</a>
<a href="https://en.wikipedia.org/wiki/Covered_option">covered calls</a>
using python's
<a href="https://jbehave.org/">JBehave.org</a>.</p>
<p>The free online self paced classes from <a href="https://cucumber.io/school/">Cucumber School</a> are great stuff.</p>
<p>I want to:</p>
<ol>
<li>get better at using formatters when running cucumber tests.</li>
<li>consider using cucumber when testing multiple step interactions with several API endpoints</li>
</ol>
ReactJS notes2023-05-07T00:00:00Z/posts/react/<h2>Tutorials</h2>
<ol>
<li><a href="https://react.dev/learn/tutorial-tic-tac-toe">Tutorial: Tic-Tac-Toe</a></li>
<li><a href="https://scrimba.com/">Scrimba</a>
<ol>
<li><a href="https://scrimba.com/learn/learnreact">Learn React</a></li>
<li><a href="https://scrimba.com/learn/reactrouter6">React Router 6</a></li>
</ol>
</li>
<li><a href="https://courses.joshwcomeau.com/">Josh Comeau</a> classes</li>
</ol>
<h2>Misc</h2>
<ol>
<li><code>npm create vite@latest</code> is a good thing to use for starting react (and other apps). Thanks, <a href="https://scrimba.com/learn/learnreact/run-react-locally-with-vite-co5c14c369399240413ef9491">Scrimba for the quick introduction.</a>
<ol>
<li><a href="https://github.com/payne/react_vite-project1/commit/8c18d7c6cac1dbdc3b44c9913dc2e6ba7fcf2da1">Change <code>vite.config.ts</code> before hosing on github pages</a>. Here's a random <a href="https://stackoverflow.com/questions/68076527/how-to-set-vite-config-js-base-public-path">StackOverflow note about vite and base</a></li>
</ol>
</li>
<li>Used create next app <a href="https://github.com/payne/t4_code_along">for my follow along of the Tic-Tac-Toe Tutorial</a></li>
<li><a href="https://payne.github.io/react_a2/feed">https://payne.github.io/react_a2/feed</a> is a tiny CRA where I'm trying to learn some basic router things</li>
</ol>
<h2>Odd learning</h2>
<ol>
<li>Hosting on github pages:
<ol>
<li><a href="https://github.com/payne/react_a2/commit/3e64e3d740caacac297255fd3101e0ec7912de25">Put basename in the BrowserRouter tag</a></li>
<li><a href="https://github.com/payne/react_a2/commit/9467f624b2b51cf844466bdef1c094226e3a2f3e">Adding homepage attribute in package.json</a></li>
<li>The homepage attribute in package.json does not work for apps made with <code>npm create vite@latest</code>: <a href="https://github.com/payne/react_vite-project1/commit/8c18d7c6cac1dbdc3b44c9913dc2e6ba7fcf2da1">Change <code>vite.config.ts</code> before hosing on github pages</a>.</li>
</ol>
</li>
<li>Getting patch files from github commits - thanks <a href="https://stackoverflow.com/questions/21903805/how-to-download-a-single-commit-diff-from-github/21903890#21903890">StackOverflow post that points to Ten Things You Didn't know Git and GitHub Could Do...</a></li>
</ol>
<h2>Putting React into an 11ty post</h2>
<p>Since markdown, with 11ty, can have HTML tags (including script), I can mix
little JavaScript programs into a post. Here's a simple experiment:</p>
<p>Keeping the script tags starting in the first column is important.</p>
<div id="react-app"></div>
<script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin=""></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin=""></script>
<script>
document.onreadystatechange = () => {
const curDate = new Date();
const message = `Hello React! It is now ${curDate}. This paragraph is a tiny react program.`;
element = React.createElement('p', {}, message);
ReactDOM.render(element, document.getElementById('react-app'));
};
</script>
<h3>11ty Plugins to checkout</h3>
<ol>
<li><a href="https://github.com/kaicataldo/eleventy-plugin-react">eleventy-plugin-react</a></li>
<li><a href="https://github.com/kaicataldo/eleventy-plugin-jsx#readme">eleventy-plugin-jsx</a></li>
</ol>
Server Sent Events vs. Websockets2023-05-02T00:00:00Z/posts/sse1/<p>TIL that <a href="https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">server-sent events</a> exist! This is thanks to an awesome
video
<a href="https://youtu.be/6QnTNKOJk5A">"Don't Use Websockets (Until you Try This...)"</a>
from <a href="https://www.youtube.com/@codewithryan">Code with Ryan</a>. Many thanks to Ryan for making this and the YouTube algorithm for showing it to me.</p>
<p>I'm excited to experiment and answer my question: will SSE work where Websockets are blocked? (my guess is yes). Hopefully, I'll update this when I find out.</p>
<p>Random google results that might help include:</p>
<ol>
<li><a href="https://medium.com/zero-equals-false/building-a-chat-application-with-angular-and-spring-reactive-sse-c0fdddcd7d70">Building a Chat application with Angular and Spring Reactive SSE</a> by Hantsy includes a <a href="https://github.com/hantsy/angular-spring-sse-sample">demo project on github</a>
<ol>
<li>When I <a href="https://github.com/payne/angular-spring-sse-sample">forked it</a>, and tried it out in a github codespace I was <strong>NOT</strong> able to get things working:
<ol>
<li><code>docker compose up -d</code> # terminal 1</li>
<li><code>cd server && sdk install kotlin && chmod +x gradlew && ./gradlew build -x test && java -jar build/libs/*.jar </code> # terminal 2</li>
<li><code>cd client && npm install && npm run start</code> # terminal 3
<ol>
<li>My guess is that a different version of node might be needed.</li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
</ol>
<p>The error was:</p>
<pre><code>Compiling @angular/router/testing : es2015 as esm2015
10% building 3/3 modules 0 active(node:10344) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
10% building 3/4 modules 1 active ...er/client/index.js?http://0.0.0.0:0/sockjs-node&sockPath=/sockjs-nodenode:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (/workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/NormalModule.js:417:16)
at /workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/NormalModule.js:452:10
at /workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/NormalModule.js:323:13
at /workspaces/angular-spring-sse-sample/client/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /workspaces/angular-spring-sse-sample/client/node_modules/loader-runner/lib/LoaderRunner.js:203:19
at VirtualFileSystemDecorator.readFile (/workspaces/angular-spring-sse-sample/client/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:47:13)
at processResource (/workspaces/angular-spring-sse-sample/client/node_modules/loader-runner/lib/LoaderRunner.js:202:11)
at iteratePitchingLoaders (/workspaces/angular-spring-sse-sample/client/node_modules/loader-runner/lib/LoaderRunner.js:158:10)
at runLoaders (/workspaces/angular-spring-sse-sample/client/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
at NormalModule.doBuild (/workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/NormalModule.js:295:3)
at NormalModule.build (/workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/NormalModule.js:446:15)
at Compilation.buildModule (/workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/Compilation.js:739:10)
at /workspaces/angular-spring-sse-sample/client/node_modules/webpack/lib/Compilation.js:981:14 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v19.9.0
</code></pre>
<h3>Thanks <a href="https://stackoverflow.com/questions/70582072/npm-run-fails-with-err-ossl-evp-unsupported">StackOverflow</a></h3>
<ol>
<li><code>export NODE_OPTIONS=--openssl-legacy-provider</code></li>
<li>Now <code>npm run start</code> # works :-)</li>
</ol>
<p>But now there is some other problem and I'm late... more later</p>
JS Experiment 12023-04-26T00:00:00Z/posts/JSExperiment1/<p>Since markdown, with 11ty, can have HTML tags (including script), I can mix
little JavaScript programs into a post. Here's a simple experiment:</p>
<p>Here is a div named d1 with an initial value of zero. Clicking the Increment d1 button will (hopefully),
increment the value.</p>
<div id="d1">0</div>
<p><button id="button_d1">Increment d1</button></p>
<script>
document.onreadystatechange = () => {
if (document.readyState === "complete") {
const b = document.getElementById("button_d1")
b.addEventListener("click", (event) => {
console.log(`b click handler ${event}`);
const d1 = document.getElementById("d1");
const d1Value = d1.textContent
d1.textContent = 1 + parseInt(d1Value);
});
console.log(`Just added click handler for button_d1`);
}
};
</script>
OJUG 6 June 20232023-04-24T00:00:00Z/posts/OJUG_6June23/<p><a href="https://raibledesigns.com/">Matt Raible</a> is giving a presentation at <a href="https://OJUG.org">OJUG.org</a> on 6 June 2023.</p>
<p>Presentations to choose from include:</p>
<ol>
<li>Micro Frontends for Java Microservices</li>
<li>OAuth for Java Developers</li>
<li>Comparing Java REST API Frameworks</li>
<li>Reactive Microservices with Spring Boot and JHipster</li>
</ol>
<p>The RCV123 voting software does a great job as a free rank choice voting service. It limits the length of each choice, so I've abreviated some of the talk titles.</p>
<iframe src="https://www.rcv123.org/ballot/dq97icw48eqysf3gMhDzqd?embed=true" title="RCV123 Ballot" width="100%" height="700"></iframe>
Rust looks fun2023-03-29T00:00:00Z/posts/rust1/<p>I'm delighted to be joining a study group working through <a href="https://exercism.org/tracks/rust">https://exercism.org/tracks/rust</a>.</p>
<p>Here are some things that are inspiring or look useful:</p>
<h3>YouTube</h3>
<h4>1: <a href="https://youtu.be/2hXNd6x9sZs">How to Learn Rust</a> from <a href="https://noboilerplate.org/">No Boilerplate</a> mentions:</h4>
<ol>
<li><a href="https://doc.rust-lang.org/stable/book/">The Book: The Rust Programming Language</a>
<ol>
<li><a href="https://rust-book.cs.brown.edu/">https://rust-book.cs.brown.edu/</a> is a version with interactive quizzes.</li>
</ol>
</li>
<li><a href="https://doc.rust-lang.org/rust-by-example/">Rust By Example</a></li>
<li><a href="https://github.com/rust-lang/rustlings">Rustlings</a></li>
</ol>
<p>And it gives a nice shout out to Young's <a href="https://www.amazon.com/Ultralearning-Master-Outsmart-Competition-Accelerate-ebook/dp/B07K6MF8MD/">Ultralearning</a>.</p>
<h4>2: <a href="https://youtu.be/CHRNj5oubwc">Rust Powered Polymorphism ⚡️ With Traits</a> by <a href="https://www.youtube.com/@codetothemoon">Code to the Moon</a></h4>
<ol>
<li>My code along repo is <a href="https://github.com/payne/ctm-traits">https://github.com/payne/ctm-traits</a> and includes a <a href="https://github.com/payne/ctm-traits/releases/tag/windows">release of a MS-Windows build with full debug turned on (which is why it's 5.27 MB)</a></li>
<li><a href="https://rust-book.cs.brown.edu/ch10-00-generics.html">Chapter Ten of The Rust Book</a></li>
</ol>
<h4>3: <a href="https://youtu.be/f82wn-1DPas">Rust's Most Important Containers 📦 10 Useful Patterns</a></h4>
<h3>Happy things</h3>
<p>Things that I've had exerience with that make me happy....</p>
<ol>
<li><a href="https://stackoverflow.com/questions/31492799/cross-compile-a-rust-application-from-linux-to-windows">Cross compiling on Linux targetting MS-Windows I used the instructions in a stackoverflow post</a> that came back from a quick google search.
<ol>
<li><code>vi ~/.cargo/config && cat ~/.cargo/config</code></li>
</ol>
<pre><code>[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"
ar = "x86_64-w64-mingw32-gcc-ar"
</code></pre>
<ol>
<li><code>sudo apt-get install gcc-mingw-w64-x86-64 -y</code></li>
<li><code>rustup target add x86_64-pc-windows-gnu</code></li>
<li><code>cargo build --target=x86_64-pc-windows-gnu</code></li>
<li><code>find target -name "*.exe"</code></li>
</ol>
</li>
<li>Many thanks to Kirby for finding <a href="https://alican.codes/rust-github-actions">this article "How to setup GitHub Actions for Rust to build binaries"</a>. I'm looking forward to trying GitHub Actions.</li>
</ol>
<h3>Goals</h3>
<p>One of my goals is to be contribute code to an open-source cross platform utility that:</p>
<ol>
<li>Is delivered as a stand alone statically linked executable (no installer)</li>
<li>Manages a database stored, without administratively privileges, on storage controlled by the computer (local hard drive or network home folder)</li>
<li>Contains a web server running locally -- that serves a user interface written in react or angular</li>
</ol>
<h3>To try one day</h3>
<ol>
<li><a href="https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer">The VS Code Rust Analyzer</a> works well on my Mac MINI</li>
<li><a href="https://doc.rust-lang.org/clippy/">https://doc.rust-lang.org/clippy/</a></li>
<li><a href="https://github.com/launchbadge/sqlx">https://github.com/launchbadge/sqlx</a> -- Code to the Moon said nice things</li>
<li><a href="https://www.youtube.com/playlist?list=PL2q9pua8FpiUiCv6KmWWhR5Bh8GfElo98">Rust on AWS YouTube Playlist</a></li>
</ol>
Attaching files to PDFs with QPDF2023-03-28T00:00:00Z/posts/qpdf_pandoc_carry_source/<p>Here's a demo that uses <a href="https://qpdf.readthedocs.io/en/stable/cli.html#embedded-files-attachments">QPDF</a> to embed the markdown source code of a file into the PDF generated by <a href="https://pandoc.org/demos.html#examples">pandoc</a>.</p>
<p>Using the <a href="https://raw.githubusercontent.com/payne/pandoc_example/main/eg1.md">example markdown file from the Markdown to reStructuredText example</a> at <a href="https://pandoc.org/try/">https://pandoc.org/try/</a></p>
<p>I'm able to use pandoc to produce <a href="https://github.com/payne/pandoc_example/blob/main/eg1.pdf">eg1.pdf</a> and then attach
<a href="https://raw.githubusercontent.com/payne/pandoc_example/main/eg1.md">eg1.md</a> to eg1.pdf creating <a href="https://github.com/payne/pandoc_example/blob/main/out.pdf">out.pdf</a>. Notice in step 4 that the list of attachements output is shown:</p>
<ol>
<li><code>nix-shell -p pandoc qpdf</code></li>
<li><code>pandoc -s eg1.md -o eg1.pdf</code></li>
<li><code>qpdf eg1.pdf --add-attachment eg1.md -- out.pdf</code></li>
<li><code>qpdf --list-attachments ../out.pdf</code></li>
</ol>
<pre><code>eg1.md -> 146,0
</code></pre>
<ol start="5">
<li><code>qpdf --show-attachment=eg1.md ../out.pdf > fromPDF.md</code></li>
<li><code>diff fromPDF.md ../eg1.md</code></li>
</ol>
<p>I'm very grateful to Brian for pointing out QPDF to me when I went asking about attaching files to PDFs. Thanks, Brian!</p>
Samman Technical Coaching2023-03-05T00:00:00Z/posts/SammanTechnicalCoaching/<p>The presentation
<a href="https://youtu.be/6kq584SbAQI">Technical Coaching with the Samman method - Emily Bache - DDD Europe 2022</a> is very exciting.</p>
<p><a href="https://sammancoaching.org/">https://sammancoaching.org/</a> has materials and points to a book. <a href="https://leanpub.com/u/emilybache">Emily Bache has other books too</a>.</p>
<p>This is very exciting material.</p>
<p>Some referneces:</p>
<ol>
<li><a href="https://www.amazon.com/Training-Back-Room-Sharon-Bowman/dp/0787996629/">Training From the Back of the Room!: 65 Ways to Step Aside and Let Them Learn</a></li>
</ol>
Docker2023-02-27T00:00:00Z/posts/docker/<p>These are numbered to make them easy to talk about, but they are not ordered in importance...</p>
<ol>
<li><a href="https://www.freecodecamp.org/news/the-docker-handbook/">The Docker Handbook</a></li>
<li><a href="https://payne.github.io/docker-compose-talk/">My 2020 docker compose talk</a></li>
<li><a href="https://dockerbook.com/">https://dockerbook.com/</a></li>
<li>Common setups -- <a href="https://github.com/payne/Angular-Flask-Docker-Skeleton">nginx, angular, flask, postgreSQL</a> (is my fork of one randomly choosen google result that I'd like to try out for example)</li>
<li>Links to Linode & Digital Ocean things</li>
<li><a href="https://GitPod.io">Gitpod.io</a> is an exciting service with a generous free tier</li>
<li><a href="https://youtu.be/sYJ3CHtT6WM">GitHub CodeSpaces</a> also has a nice free tier</li>
<li><a href="https://youtu.be/DM65_JyGxCo">NetworkChuck on Docker Compose</a></li>
</ol>
<p>I've started updating this list 27-Feb-2023.</p>
Bootify.io - jump start your spring boot apps2023-02-06T00:00:00Z/posts/bootify1/<h4>Presented at</h4>
<ol>
<li><a href="https://nebraskacode.amegala.com/Sessions/1480">Nebraska Code on Friday July 21 2023 at 4:00 pm</a>
<ol>
<li><a href="https://docs.google.com/presentation/d/10rBCuUt5F-ax3xjvMlo1TxBKr5cw9w59CbeAQDlIz0k/edit?usp=sharing">Work in progress slides</a></li>
</ol>
</li>
</ol>
<p>It's one thing to read about spring boot, spring data JPA and other technology. It's even better to generate a short, self-contained, correct ready-to-run example quickly. <a href="https://www.linkedin.com/in/thomas-surmann-76442419a/">Thomas Surmann</a>'s <a href="https://Bootify.io">Bootify.io</a> web application is fabulous for learning or starting a new application.</p>
<p>Come learn about the SaaS web application <a href="https://Bootify.io">Bootify.io</a>, the "Best developer experience for starting Spring Boot apps ‐ best practices included."</p>
<p>We'll discuss and work through the following (bring your laptop if you'd like to play along):</p>
<ol>
<li>A tour of the free tier of great SaaS that is <a href="https://Bootify.io">Bootify.io</a>
<ol>
<li>Generating many to many relationships with JPA (spring data)</li>
<li><a href="http://h2Database.com">h2Database.com</a> - Quick & easy all Java Database with an easy-to-use web console
<ol>
<li>Then we'll swap h2 out for PostgreSQL.</li>
</ol>
</li>
<li>API generation with swagger (OpenAPI) using Bootify</li>
<li><a href="https://www.thymeleaf.org/">Thymeleaf</a> GUI that sits alongside the APIs</li>
<li><a href="http://HTMX.org">HTMX.org</a> is an excellent (language-neutral) way to mix AJAX into your application for single-page app-like interactivity.</li>
</ol>
</li>
<li>We'll do all the <code>mvn install</code> work in the cloud -- no heavy downloads on wifi. How? We'll demo two cloud development environments.</li>
<li>See how quick & easy it is to use <a href="https://GitPOD.io">GitPOD.io</a>'s free tier. GitPOD.io is a cloud development environment that makes it easy to explore a GitHub repository.</li>
<li>See how quick & easy <a href="https://github.com/features/codespaces">GitHub's Codespaces</a> are to use. Currently, GitHub gives away "up to 60 hours a month free" of Codespaces to each user.</li>
</ol>
<p>We'll use the sample repo <a href="https://github.com/payne/team2">https://github.com/payne/team2</a> that was created in minutes using Bootify.io.</p>
<p>The short link for this presentation is <a href="https://MattPayne.org/bootify">MattPayne.org/bootify</a>.</p>
<ol>
<li><a href="https://www.meetup.com/omahajava/events/291467778/">Omaha Java Users Group on March 2023</a>
<ol>
<li><a href="https://docs.google.com/presentation/d/17Hrw_WGKhFVB5pFsxyyPTHA1paLFLRXmkJ-_lV8RM4o/edit?usp=sharing">Work in progress slides</a></li>
</ol>
</li>
</ol>
<h3></h3>
<p>Here's are some additional notes about bootify things.</p>
<ol>
<li><a href="https://twitter.com/bootify_io">Thomas has a useful twitter presence</a> where he'll announce new <a href="https://Bootify.io">Bootify.io</a> features.</li>
</ol>
Visualizations & Simulations2023-02-05T00:00:00Z/posts/visualizations/<h4>Manim from 3b1b</h4>
<p>https://github.com/initialcommit-com/git-sim
uses https://docs.manim.community/en/stable/index.html of 3b1b fame.</p>
<p>https://pythonbytes.fm/episodes/show/321/a-memorial-to-apps-past talked about git-sim</p>
<h4>Motion Canvas</h4>
<p>https://motion-canvas.github.io/ is talked about in https://youtu.be/H5GETOP7ivs</p>
Rule #24 - Shared code ownership is the goal2023-02-05T00:00:00Z/posts/CoachJoe/<p>YouTube recently introduced me to <a href="https://www.youtube.com/@10minuteswithcoachjoe55">the channel "10 Minutes with Coach Joe."</a> it's fantastic! I'm so excited about this material that I've added a short URL for it: <a href="https://MattPayne.org/cj">MattPayne.org/cj</a>.</p>
<h4>Rule #24 - Shared code ownership is the goal:</h4>
<blockquote>
<p>"Silos of code knowledge are bad. Get to the point where you can change someone's code and they can change your code. It's our code."</p>
</blockquote>
<p><a href="https://youtu.be/R5l8I_Mr2mc"><img src="/static/img/rule24.png" alt="Silos of code knowledge are bad. Get to the point where you can change someone's code and they can change your code. It's our code." /></a></p>
<p><a href="https://youtu.be/R5l8I_Mr2mc">The video</a> has a nice list of major topics with timestamps. I'm very optimistic about shared code ownership.</p>
<p>I'm putting rule #24 at the top of this post because following the rules Coach Joe talks about is one way to achieve shared code ownership and a positive culture.</p>
<p>Here are the videos I'm looking forward to watching in the future:</p>
<ul>
<li>Rule #1: Utilize the 5 SOLID principles</li>
<li>Rule #2: Utilize the 3 laws of TDD</li>
<li>Rule #3: Use meaningful class names</li>
<li>Rule #4: Use meaningful method names</li>
<li>Rule #5: Use meaningful variable names</li>
<li>Rule #6: A class should do only one thing</li>
<li>Rule #7: A method should do only one thing</li>
<li>Rule #8: Unit tests should always make at least 1 assert</li>
<li>Rule #10: No hard coded values</li>
<li>Rule #11: No duplicate code</li>
<li>Rule #12: Avoid unnecessary comments</li>
<li>Rule #13: The class should contain a small number of methods and lines of code</li>
<li>Rule #14: Methods should have few if any parameters</li>
<li>Rule #15: Avoid long if statements</li>
<li>Rule #16: Avoid the switch statement</li>
<li>Rule #19: Run all unit tests frequently</li>
<li>Rule #20: Objects must be easy to create</li>
<li>Rule #21: No type or scope definitions in variable names</li>
<li>Rule #22: Methods should have very few lines of code</li>
<li>Rule #23: Methods should never return null</li>
<li>Rule #24: Shared code ownership is the goal</li>
<li>Rule #25: Avoid nested if/else blocks</li>
<li>Rule #26: Code should be formatted and readable</li>
<li>Rule #29: Unit tests should never be marked with an Ignore attribute</li>
<li>Rule #30: Do not test several method calls in a single unit test</li>
<li>Rule #31: Avoid generating technical debt</li>
<li>Rule #32: Use the proper for loop</li>
<li>Rule #34: Understand the difference between an object and a data structure</li>
<li>Rule #35: Try for 100% code coverage</li>
<li>Rule #37: Boolean parameters should not be passed to methods</li>
<li>Rule #39: Bad code is difficult to test and maintain</li>
<li>Rule #40: Test code you write for happy and unhappy paths</li>
<li>Rule #41: Errors should be caught, not hidden</li>
<li>Rule #42: Do not test infrastructure, frameworks or libraries</li>
<li>Rule #43: Null parameters should not be passed to methods</li>
</ul>
<h5>A list of videos with links</h5>
<ul>
<li><a href="https://YouTu.be/tx3lTeIaLsY">Rule #1 - Utilize the 5 SOLID principles</a></li>
<li><a href="https://YouTu.be/NB_cZE6HRLo">Rule #3 - Use meaningful class names</a></li>
<li><a href="https://YouTu.be/f8ObPAc2d0c">Rule #4 - Use meaningful method names</a></li>
<li><a href="https://YouTu.be/Ef7w8UVMzW4">Rule #6 - A class should do only one thing</a></li>
<li><a href="https://YouTu.be/hu9MVFQoHp4">Rule #7 - A method should do only one thing</a></li>
<li><a href="https://YouTu.be/gzmIFqWW9LQ">Rule #10 - No hard coded values</a></li>
<li><a href="https://YouTu.be/rcuc0SKBhSU">Rule #12 - Avoid unnecessary comments</a></li>
<li><a href="https://YouTu.be/61l3CYOKgCY">Rule #14 - Methods should have few parameters</a></li>
<li><a href="https://YouTu.be/DPZOcgmmyPE">Rule #15 - Avoid long if statements</a></li>
<li><a href="https://YouTu.be/vQSg1jMCMxg">Rule #16 - Avoid the switch statement</a></li>
<li><a href="https://YouTu.be/6ZspnrJIla0">Rule #23 - Methods should never return null</a></li>
<li><a href="https://YouTu.be/R5l8I_Mr2mc">Rule #24 - Shared code ownership is the goal</a></li>
<li><a href="https://YouTu.be/91RBUmbNL1U">Rule #37 - Boolean parameters should not be passed to methods</a></li>
</ul>
FCC - Free Code Camp Musings 12023-02-02T00:00:00Z/posts/fcc_musings1/<p><a href="https://www.freecodecamp.org/">Free Code Camp (FCC)</a> is awesome.<br />
There's <a href="https://www.freecodecamp.org/learn/">excellent self paced gamified learning</a>
and a lot of videos on YouTube. One of my favorites is
<a href="https://www.youtube.com/watch?v=q7tlgZg4Q1o&list=PLWKjhJtqVAbmfoj2Th9fvxhHIeqFO7wOy">Computer Science and Software Engineering Theory with Briana</a>.</p>
<p><a href="https://gwenfaraday.com/">Gwendolyn Faraday</a> wrote a wonderful & useful article about a group in
Indianapolis:
<a href="https://www.freecodecamp.org/news/how-we-created-a-free-coding-school-with-the-freecodecamp-curriculum/">We Created a Local Free Coding School Using the freeCodeCamp Curriculum. Here's What We Learned.</a></p>
<p>In Omaha the <a href="https://www.mysterycodesociety.com/">Mystery Code Society</a> has a terrific track record of
offering "free, beginner to intermediate coding education to people of marginalized genders." There's a ton we can learn from their experience & success.</p>
<p><a href="https://forum.freecodecamp.org/t/how-to-create-a-local-study-group/19532">This October 2021 FCC forum post</a> talks a bit about local FCC study groups.</p>
Ozone - coming back thanks to regulations2023-01-31T00:00:00Z/posts/ozone/<p>It's very wonderful that the Ozone layer of the atmosphere is rejuvenating. And that goverment regulations helped.</p>
<p><a href="https://www.wbur.org/onpoint/2023/01/30/how-the-world-came-together-to-save-the-ozone-layer">WBUR On Point episode on saving the Ozone</a></p>
<p>Free <a href="https://MattPayne.org/nytOzone">NYTimes article on Restoration of the Ozone Layer being back on track</a>.</p>
<p><a href="https://youtu.be/CaLOiGEDPJQ">This YouTube "Why you don’t hear about the ozone layer anymore"</a> is a great explainer.</p>
<p>I wonder what sorts of fun datasets & data journalism is available to read around this topic....</p>
GIS - Maps and more2023-01-29T00:00:00Z/posts/gis/<p>YouTube suggested this great short <a href="https://youtube.com/shorts/jbFhAy-ATM4?feature=share">Website Map with Points using MapLibre</a> from <a href="https://www.youtube.com/@c_yatteau">Courtney Yatteau</a>. The short shows off
<a href="https://maplibre.org/">MapLibre</a>.</p>
<p>I'd like to do a walk tracking application in 2023 and may use
<a href="https://maplibre.org/">MapLibre</a> for that. Hopefully, I'll make notes here as a go...</p>
Exercism.org - Fun programming practice2023-01-28T00:00:00Z/posts/exercism/<p>I'm inspired by Matt Steele's post about <a href="https://steele.blue/advent-of-code/">Advent of Code as Soulcraft</a>:</p>
<p>"scratches an itch to do test-driven-development in as ideal an environment as one could cook up:</p>
<ol>
<li>The problems are well-defined and don't contain business-logic ambiguity</li>
<li>Sample inputs and outputs make for simple test definitions</li>
<li>The two-part nature of each puzzles encourages clean code and the red/green/refactor programming cycles"</li>
</ol>
<p>Today, YouTube suggested a video describing an Exercism programming "challenge"</p>
<p><a href="https://exercism.org/challenges/12in23">https://exercism.org/challenges/12in23</a></p>
<p><a href="https://youtu.be/2refhxXqePI">https://youtu.be/2refhxXqePI</a></p>
Building communities: Stone Soup & starfish2023-01-27T00:00:00Z/posts/tech-community-building/<p>The short URL for this post is <a href="https://mattpayne.org/c">MattPayne.org/c</a>. Like most of my blog this is a work-in-progress (wip) draft that will, hopefully, be updated.</p>
<h3><a href="https://www.mysterycodesociety.com/">Mystery Code Society</a> is AWESOME!!</h3>
<p>I was asked to chat about tech community building & ways people and play a part. There are many ways. The quickest is to donate to <a href="https://www.mysterycodesociety.com/">Mystery Code Society</a>.</p>
<h3>Everyone can add to the Soup</h3>
<p><a href="https://en.wikipedia.org/wiki/Stone_Soup">Stone Soup</a> is a powerful story that I first learned from the book "<a href="https://pragprog.com/titles/tpp20/the-pragmatic-programmer-20th-anniversary-edition/">The Pragmatic Programmer</a>."</p>
<p>Speaking of adding to the soup... <a href="https://OJUG.org">Omaha Java Users Group</a> is looking for speakers. Most computer clubs are. If you're looking for a place to speak, and you live around Omaha, I'm happy to try and help you.</p>
<h4>The hardest parts</h4>
<p>For computer clubs, the hardest things to do are:</p>
<ol>
<li>Finding speakers</li>
<li>Finding places to meet
Like many things, it's easier with a group.</li>
</ol>
<h4>Starfish yourself</h4>
<p><a href="https://github.com/rachelmyers">Rachel Myers</a>' <a href="https://youtu.be/rMYUGwQGLn8">talk about RailsBridge</a> references a book about leaderless organizations: "The Starfish & the Spider." Ideas that caught my eye include:</p>
<ol>
<li>"People doing the work determine the direction of the entire organization."</li>
<li>When a starfish is cut in two, it does not die -- it grows into two seperate starfish
<ol>
<li>"She asked us all to starfish ourselves."</li>
</ol>
</li>
<li>Spend marketting budgets on babysitters and beer
<ol>
<li>In Omaha, I'm unaware of a computer club connected with babysitters. Many churches have daycare centers. Perhaps the computer community could team up with daycare centers?</li>
</ol>
</li>
</ol>
<h3>Boys Scout Explorers</h3>
<ol>
<li>Had a nice experience at <a href="https://www.iwcc.edu/">Iowa Western Community College</a>.
<ol>
<li>IWCC has also hosted several <a href="https://www.coderetreat.org/">Code Retreat</a> events. I hope this happens again, because it is great.</li>
</ol>
</li>
<li>Boy Scouts has a good training program for volunteers.</li>
</ol>
<h3>AIM CoderDojos</h3>
<p>This was a wonderful experience. Each table in a large room:</p>
<ol>
<li>A large rooms with tables and laptops</li>
<li>Three kids and one programmer per table</li>
<li>Awesome AIM staff walking the room helping out</li>
<li>Programmer chats with the kids - as a group they decide what to work on. Usually each kid creates their version of a small program. Sometimes each person works a different project</li>
<li>Programmer chats with the kids - as a group they decide what to work on. Usually each kid creates their version of a small program. Sometimes each person works a different project</li>
</ol>
<h3>NorthStar in March 2019</h3>
<p>Dave & <a href="https://northstar360.org/about/">Northstar</a> is a good set of stories.</p>
<ol>
<li>Some lessons based on <a href="https://youtu.be/hbKN-9o5_Z0">Mary Rose Cook's amazing talk where she live codes space invaders from scratch in JavaScript (about 170 lines).</a>. She has a wonderful web page with the <a href="http://annotated-code.maryrosecook.com/space-invaders/index.html">annotated code</a>.</li>
<li><a href="https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript">JavaScript breakout</a></li>
<li><a href="https://replit.com/">REPLit.com</a></li>
<li><a href="https://p5js.org/">https://p5js.org/</a> and <a href="https://editor.p5js.org/payne/sketches/5CUldNGHp">moving a "ball" accross the screen</a>.</li>
<li>We have hasty notes at ojug.org/m2 etc</li>
</ol>
<h3>Creative Commons</h3>
<p>Lawrence Lessig's <a href="https://youtu.be/JWR6eiiBhf8">2002 talk "Free Culture - Creative Commons"</a> is amazingly thought provoking. Lessig founded the <a href="https://creativecommons.org/">Creative Commons</a>.</p>
<h3>The Golden Rule</h3>
<p>The <a href="https://en.wikipedia.org/wiki/Golden_Rule">Golden Rule</a> and kindness are excellent guiding stars.</p>
<p>The Nike's Just Do It Swoosh and Shia LaBeouf's <a href="https://youtu.be/ZXsQAXx_ao0">"Just Do It" Motivational Speech</a> have merit.</p>
<ol>
<li><a href="https://www.freecodecamp.org/">https://www.freecodecamp.org/</a> has excellent gamified learning, communities, and instructional videos</li>
<li><a href="https://codingbat.com">https://codingbat.com/java</a> is a fun way to practice programming in both java and python</li>
<li>Many <a href="http://codekata.com/kata/kata-kumite-koan-and-dreyfus/">Koans & Katas</a> are free online.</li>
</ol>
<h3>Clubs in other places</h3>
<ol>
<li>The <a href="https://www.recurse.com/">Recurse Center</a> is online & in New York city. They cultivate a heartwarming culture using the <a href="https://www.recurse.com/self-directives">self-directives</a> and other mechanisms.
<ul>
<li>The <a href="https://www.recurse.com/social-rules">social rules</a> "They help create a friendly, intellectual environment where you can spend as much of your energy as possible on programming."
<ol>
<li>No well-actually’s</li>
<li>No feigned surprise</li>
<li>No backseat driving</li>
<li>No subtle -isms</li>
</ol>
</li>
</ul>
</li>
<li>Oklahoma <a href="https://www.techlahoma.org/">https://www.techlahoma.org/</a></li>
</ol>
<h3>Local Conferences are great!</h3>
<ol>
<li>Sometimes there are scholarships to conferences.</li>
<li><a href="https://www.connectaha.com/">ConnectAHA.com</a></li>
<li><a href="https://amegala.com">Amegala.com</a> Conferences</li>
</ol>
Notes from a Vite talk2023-01-19T00:00:00Z/posts/vite-talk/<p><a href="https://steele.blue/">Matt Steele</a> is awesome. He gave a talk on <a href="https://vitejs.dev/">Vite</a> at the <a href="https://www.meetup.com/nebraskajs/events/290791653/">January 2023</a> NebraskaJS Meetup. Here are my notes from the talk.</p>
<h2>Vite</h2>
<p>Vite is a build tool for modern web development. It's a dev server that serves your code via native ES modules during development. It uses <a href="https://rollupjs.org/guide/en/">Rollup</a> under the hood to bundle for production.</p>
<p>Vite is fast. It's fast because it uses native ES modules. It's fast because it uses Rollup. It's fast because it uses <a href="https://esbuild.github.io/">esbuild</a> to bundle for production.</p>
<p>Vite is opinionated. It's opinionated about how you write your code. It's opinionated about how you structure your code. It's opinionated about how you build your code.</p>
<h2>Talk notes</h2>
<ol>
<li>Matt points out that build tools are a pain point and uses some memes to illustrate the pain.</li>
<li>There are similarities on the java side as well.</li>
<li>Why do you build JavaScript? It runs using an interpreter. Why do we have the build tool chains? Matt calls for ideas....
<ol>
<li>Tree shaking is one reason</li>
<li>Bundling is another reason</li>
<li>Compiling the typescript (transpile) is another reason</li>
<li>Code splitting -- seperating the project so that only the code that is needed is loaded.</li>
<li>Minifying the code</li>
<li>The <code>require()</code> function is another reason -- it's not built into browsers. Made popular by node.js. It's a way to load modules.</li>
</ol>
</li>
<li>Webpack is a module bundler is been around for a while. e.g. create react app uses webpack. Angular cli does as well.</li>
<li>What if we used a browser native way to load modules? That's what Vite does. It uses native ES modules. It uses Rollup to bundle for production.</li>
<li>Vite is fast. It's fast because it uses native ES modules. It's fast because it uses Rollup. It's fast because it uses <a href="https://esbuild.github.io/">esbuild</a> to bundle for production.</li>
<li>Vite is opinionated. It's opinionated about how you write your code. It's opinionated about how you structure your code. It's opinionated about how you build your code.</li>
<li>Vite is a dev server. It's a dev server that serves your code via native ES modules during development. It uses Rollup under the hood to bundle for production.</li>
<li>Vite was created by Evan You</li>
<li>you can use vite with angular, 11ty, react, vue, svelte, and more. It has typescript support out of the box.</li>
<li>Vite has a great community. 11ty and angular support is community driven.</li>
</ol>
<h2>Very cool project</h2>
<ol>
<li>Used <a href="https://partytown.builder.io/getting-started">PartyTown</a> to put the analytics in a web worker thread.</li>
<li>vite analytics provides a quadtree view of the dependencies. It's a great way to see what's going on.</li>
<li><a href="https://www.npmjs.com/package/@turf/turf">https://www.npmjs.com/package/@turf/turf</a></li>
<li><a href="https://www.npmjs.com/package/maplibre-gl">https://www.npmjs.com/package/maplibre-gl</a></li>
<li>Use import as a function to load a module. e.g. <code>const maplibregl = await import('maplibre-gl')</code></li>
</ol>
<h2>Q&A</h2>
<ol>
<li>Is there PWA support? A: There's a plugin for that: <a href="https://vite-pwa-org.netlify.app/">https://vite-pwa-org.netlify.app/</a></li>
</ol>
<h2>Similar things</h2>
<ol>
<li><a href="https://parceljs.org/">Parcel</a></li>
<li><a href="https://www.snowpack.dev/">Snowpack</a> has been depricated in favor of Vite.</li>
</ol>
<h2>Meta Frameworks -- tools that use Vite</h2>
<ol>
<li><a href="https://analogjs.org/docs/packages/vite-plugin-angular/overview">Analog</a> -- Angular</li>
<li><a href="https://astro.build/">Astro</a> -- Can use vue, svelte, react, or vanilla js --- a static site generator</li>
</ol>
<h2>Editor support</h2>
<ol>
<li><a href="https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar">Volar</a> -- Vue</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=antfu.vite">Vite</a> -- Vite</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=antfu.vite-svelte">Vite Svelte</a> -- Svelte</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=antfu.vite-react">Vite React</a> -- React</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=antfu.vite-pwa">Vite PWA</a> -- PWA</li>
<li>Vim support -- is there too.</li>
</ol>
<h2>Native Tools</h2>
<p>Uses some of the more modern native tools -- things built from rust and go. e.g. <a href="https://esbuild.github.io/">esbuild</a> is written in go. <a href="https://swc.rs/">swc</a> is written in rust. Tradeoff between type erasure vs. type checking.</p>
<h2>Misc</h2>
<ol>
<li><a href="https://changelog.com/jsparty/212">JSParty deep dive on Vite</a> is a very nice episode.</li>
</ol>
<h2>Some day maybe</h2>
<p>Things I want to try:
<a href="https://medium.com/@hiepxanh/angular-vite-example-is-crazy-fast-3ee4d730020c">https://medium.com/@hiepxanh/angular-vite-example-is-crazy-fast-3ee4d730020c</a></p>
<h2>Afterwards, things I found on google</h2>
<ol>
<li><a href="https://www.youtube.com/@BrandonRobertsDev">https://www.youtube.com/@BrandonRobertsDev</a> who has written about Vite with Angular and is the <a href="https://dev.to/brandontroberts">creator of AnalogJS</a>. I hope <a href="https://2022.allthingsopen.org/sessions/next-generation-angular-applications-with-vite-and-analog/">this talk</a> makes it to YouTube.</li>
<li><a href="https://github.com/hiepxanh/angular-vite-example">https://github.com/hiepxanh/angular-vite-example</a></li>
</ol>
Bowling Tips2023-01-14T00:00:00Z/posts/bowling/<h2>Internet tips</h2>
<ol>
<li><a href="https://youtu.be/t9krKffgA6U">Stop Bowling Like This</a></li>
</ol>
<p>Tips are numbered by not ordered in list of importance.</p>
<h2>My notes to myself (2022-12-31)</h2>
<ol>
<li>Stand a bit more to the left than before. Right foot on the center dot.</li>
<li>Put thumb all the way in the hole -- squeeze, do not pinch</li>
<li>right-hand holds the ball from below</li>
<li>right elbow at 90 degrees</li>
<li>Keep my eye on the second arrow from the right</li>
<li>The left hand supports the weight of the ball</li>
<li>as I take the first step, push the ball out</li>
<li>once the ball is out, my left arm goes out for balance</li>
<li>let the ball and my right arm drop and swing back as I take steps</li>
<li>Slingback forward and release when it's nearly straight again.</li>
<li>Do not let my right arm cross in front of my body.</li>
<li>carry might right arm all the way up past my ear</li>
</ol>
VISjs2023-01-10T00:00:00Z/posts/vis-js/<p>Started noodling with <a href="https://visjs.github.io/vis-network/docs/network">visJS</a>: it's fun and can
parse <a href="https://en.wikipedia.org/wiki/DOT_(graph_description_language)">DOT graph description language</a> of <a href="https://graphviz.org">graphviz</a> fame :-) Here's an example using an embedded <a href="https://replit.com/@payne/vis3graphvizdotfromtextarea#script.js">REPLit</a>:</p>
<iframe frameborder="8" width="100%" height="700px" src="https://vis3graphvizdotfromtextarea.payne.repl.co?embed=true"></iframe>
<p>Try changing the graphviz code in the text area and see what happens.</p>
<p>Used <a href="https://stackoverflow.com/questions/42663203/export-visjs-network-to-jpeg-png-image">this nice stack overflow post</a> to put a PNG generated by visJS on the page. :-)</p>
<p>I'm saving the code from the repl.it to <a href="https://github.com/payne/vis3_graphviz_dot_from_textarea">https://github.com/payne/vis3_graphviz_dot_from_textarea</a>.</p>
<p>Using github pages, there's a live version of the repl here: <a href="https://payne.github.io/vis3_graphviz_dot_from_textarea/">https://payne.github.io/vis3_graphviz_dot_from_textarea/</a></p>
Functional Programming2023-01-02T00:00:00Z/posts/functional_programming/<p>In this week's <a href="https://cassidoo.co/newsletter/">newsletter from Cassidoo</a> pointed to
<a href="https://onsclom.bearblog.dev/">Austin Merrick</a>'s article <a href="https://onsclom.bearblog.dev/functional-programming-how-and-why/">Functional Programming - How and Why</a></p>
<p>This reminds that I want to collect information about functional programming. And study, practice. It'll be fun.</p>
<p>The Exercism.org forum has a great post about <a href="https://forum.exercism.org/t/the-definitive-guide-to-learning-functional-programming/3254">learning functional programming.</a></p>
<h2>Elixir will "soon" get its own post</h2>
<ol>
<li>https://www.elixirnewbie.com/podcast</li>
<li>https://pragmaticstudio.com/courses/elixir</li>
<li>https://exercism.org/tracks/elixir</li>
</ol>
<h2>Books</h2>
<ol>
<li><a href="https://smile.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/">The Little Schemer</a> 4th Edition -- I have a paperback copy. I'm delighted that there's a kindle edition for $10 now. Update: The kindle edition is a poor rendering of the PDF. I returned my copy moments after buying it.</li>
</ol>
Yjs.dev Notes2022-12-18T00:00:00Z/posts/yjs1/<p><a href="https://Yjs.dev">Yjs.dev</a> is a great library. Here are some of my notes about it.</p>
<p>Here's a hastily assembled quick slide deck about my quick repo:</p>
<ul>
<li>Repo: <a href="https://github.com/payne/CytoscapePlay2">https://github.com/payne/CytoscapePlay2</a></li>
<li>GitHub Pages: <a href="https://payne.github.io/CytoscapePlay2/index.html">https://payne.github.io/CytoscapePlay2/index.html</a></li>
</ul>
<p><a href="https://bit.ly/YjsDemo1"><img src="/static/img/YjsDemo1_cover_page.png" alt="presentation link" /></a></p>
JPA & JDBC may be used together in Spring Boot2022-11-27T00:00:00Z/posts/jpa_and_jdbc/<p>Plan to create a blog post around <a href="https://twitter.com/MattPayneOrg/status/1574564066294910977?s=20&t=UM9BkgQ20Al6AJUiPkHErQ">this tweet</a>:</p>
<p>"Yes, you can use Spring Data JPA and Spring Data JDBC together. Spring Boot will do the configuration for you, you just have to make sure that all entities handled by Spring Data JDBC have a @Table annotation." - <a href="https://stackoverflow.com/questions/64624083/is-it-possible-use-spring-data-jpa-with-spring-data-jdbc/64681823#64681823">StackOverflow question 64624083</a></p>
<p>Plan: Perhaps a JPA crud application for teams & players (with a many to many relationship). Then add tags to the players and use JDBC to filter on tags? IDK there are likely better examples.</p>
anti-despair reading list2022-11-23T00:00:00Z/posts/ad_reading_list/<p>An <a href="https://www.tiktok.com/@betterstrangersbooks/video/7168874595234204974">anti-despair reading list</a> by <a href="https://www.tiktok.com/@betterstrangersbooks">Matt Hershberger</a> includes these books:</p>
<ol>
<li><a href="https://smile.amazon.com/Hope-Dark-Untold-Histories-Possibilities-ebook/dp/B01DV1YC30">Hope in the Dark</a> by Rebecca Solnit</li>
<li><a href="https://smile.amazon.com/Paradise-Built-Hell-Extraordinary-Communities-ebook/dp/B003XQEVLM/">A Paradise Built in Hell: The Extraordinary Communities That Arise in Disaster</a> by Rebecca Solnit</li>
<li><a href="https://smile.amazon.com/Reality-Bubble-Hidden-Dangerous-Illusions-ebook/dp/B07FC2N1Q4">The Reality Bubble: How Science Reveals the Hidden Truths that Shape Our World</a> by Ziya Tong</li>
<li><a href="https://smile.amazon.com/Stranger-Than-Can-Imagine-Alternative-ebook/dp/B016HBZ1EU">Stranger Than We Can Imagine: Making Sense of the Twentieth Century</a> by John Higgs</li>
<li><a href="https://smile.amazon.com/Nonviolence-History-Dangerous-Library-Chronicles-ebook/dp/B0017SWRTQ">Nonviolence: The History of a Dangerous Idea</a> by Mark Kurlansky</li>
<li><a href="https://smile.amazon.com/Why-Civil-Resistance-Works-Nonviolent-ebook/dp/B005SZEEXQ">Why Civil Resistance Works: The Strategic Logic of Nonviolent Conflict</a> by Erica Chenoweth and Maria Stephan</li>
</ol>
<p>Hopefully I'll give at least one speech based on the content of each book.</p>
PostgreSQL2022-11-18T00:00:00Z/posts/postgreSQL/<h3><a href="https://youtu.be/hInTeB07xdc?si=SDJ3qAn2xbVb5-bC">YouTube on using PosgreSQL as a database, message queue, and LRU cache!</a></h3>
<p>IDK if I buy what <a href="https://www.youtube.com/@MrCompSciGuy">CompSciGuy</a> is sellling in this video. And it would be fun to try things out and see.</p>
<h3>PostgreSQL is handy in a docker compose network.</h3>
<p>Here's a handy way to run PostgreSQL on a system
that supports docker:</p>
<p><a href="https://github.com/khezen/compose-postgres">https://github.com/khezen/compose-postgres</a></p>
<p>It's nice that it comes with pgadmin. <a href="https://github.com/payne/compose-postgres">My fork is here</a></p>
Culture2022-10-18T00:00:00Z/posts/culture/<h2>Web pages</h2>
<p>I'd like to collect web pages that I can re-read and point others towards. Please send me suggestions.</p>
<h4>Clean Code</h4>
<ol>
<li><a href="https://www.freecodecamp.org/news/clear-code-how-to-write-code-that-is-easy-to-read/">How to write code that is easy to read</a></li>
</ol>
<h4>Code Reviews</h4>
<ol>
<li><a href="https://www.jointaro.com/lesson/3NAbmgiaY3IpvayNIoVl/one-diff-one-thesis-what-every-code-review-should-be-like/">What every code review should be like</a> -- This a free sample to a $350/year paid site. I have not bought a membership.
<ol>
<li>"Don't just dump your entire feature into 1 massive 2,500 line PR" - is one of the points</li>
</ol>
</li>
</ol>
<h2>Books</h2>
<ol>
<li><a href="https://learning.oreilly.com/library/view/team-geek/9781449329839/">Team Geek</a> by <a href="https://learning.oreilly.com/search/?q=author%3A%22Brian%20W.%20Fitzpatrick%22&type=*&order_by=relevance">Fitzpatrick</a></li>
<li><a href="https://smile.amazon.com/How-Win-Friends-Influence-People/dp/0671027034/">How to Win Friends and Influence People</a></li>
</ol>
<h2>Ideas</h2>
<ol>
<li>Be kind</li>
<li>The golden rule</li>
</ol>
<h2>Powerful tools</h2>
<ol>
<li><a href="https://www.recurse.com/social-rules">Recurse Center's Social Rules</a></li>
</ol>
<h2>Avoid arrogance</h2>
<p>Here are some great points from a <a href="https://www.youtube.com/@TiffInTech">Tiff In Tech</a> episode:
<a href="https://www.youtube.com/watch?v=DTBs2aoGPro&list=TLPQMTcwMjIwMjO6Gq8VVo9DtQ&index=8&t=252s">Tips From a Top Tech Recruiter</a>: "Read every line of your resume and ask the question 'so what'" -- What is that telling a potentiall employeer? What is that telling a potential recruiter?</p>
<h3>Three things:</h3>
<ol>
<li>How have you made a company money?</li>
<li>How have you saved a company money?</li>
<li>How have you changed a process, in a meaningful way, within that organization?</li>
</ol>
Toastmasters2022-10-01T00:00:00Z/posts/ToastMasters/<p>In 2023/2024 I've volunteered as an <a href="https://github.com/payne/area32">area director</a>; I'm excited.</p>
<p>New Addition to ToastMaster: <a href="https://toastmasters.yoodli.ai/journal/?pg=1&v=list">Yoodli.ai</a></p>
<p>Web application:</p>
<ol>
<li><a href="https://www.toastmasters.org/education/pathways">https://www.toastmasters.org/education/pathways</a></li>
<li><a href="https://toastmasters.csod.com/LMS/catalog/Welcome.aspx">Base Camp: https://toastmasters.csod.com/LMS/catalog/Welcome.aspx</a></li>
</ol>
<h3>The "Visionary Communication" Pathways</h3>
<p>I'm looking forward to work through <a href="https://toastmasters.csod.com/lms/scorm/clientLMS/Scorm12IframeContainer.aspx?aicc_sid=AICC61SceXpO4dtGN8r_-3qbrZyfCpQO2AFCFaC7FLUVURM&aicc_url=https://toastmasters.csod.com/LMS/scorm/aicc.aspx">"Understanding Your Leadership Style"</a> module.</p>
<h3>Presentation Mastery</h3>
<p>I've done levels 1 & 2 in Presentation Mastery.</p>
<h4>Level 3: "Persuasive Speaking"</h4>
<p>My "Persuasive Speaking" speech in level 3 is titled <a href="https://docs.google.com/presentation/d/1aqEnielsX-pBAM8Cxeg5GtZIxbpT347wXXo2w-Uip10/edit?usp=sharing">"The Rust Programming Language is Important."</a>. I gave this speech to <a href="http://TechTalkers.org">TechTalkers.org</a> on Friday 2022-September-23.</p>
<p>Need to pick two elective projects. Right now I'm thinking about doing:</p>
<h5>1. "Using Presentation Software"</h5>
<h5>2. "Prepare for an Interview"</h5>
<h4>Level 4: "Managing a Difficult Audience"</h4>
<p>Need to pick one elective</p>
<h3>People:</h3>
<ol>
<li><a href="https://makeyourmessageright.com/">https://makeyourmessageright.com/</a>
<ol>
<li>5 legacy DTMs</li>
<li>5 Pathways DTMs</li>
</ol>
</li>
<li><a href="https://road2dtmclub.toastmastersclubs.org/">https://road2dtmclub.toastmastersclubs.org</a></li>
</ol>
tasks, time & programming2022-09-18T00:00:00Z/posts/time/<p>IOme a post about programming & time as well as utilites for working with time.</p>
<h2>Utilities</h2>
<p><a href="https://www.reddit.com/r/commandline/comments/xdok17/remint_a_simple_tui_for_the_remind_calendar/">https://www.reddit.com/r/commandline/comments/xdok17/remint_a_simple_tui_for_the_remind_calendar</a>
bought up my affection for the <a href="https://dianne.skoll.ca/projects/remind/">remind</a> utilty. And it mentions some utilities that I was not aware of.</p>
<p>Also, tasks (here are some labeled but unordered things):</p>
<ol>
<li><a href="https://github.com/naggie/dstask">dstask</a> - "Git powered terminal-based todo/note manager -- markdown note page per task. Single binary!"</li>
<li><a href="https://taskwarrior.org/">Taskwarrior</a> and <a href="https://timewarrior.net/">Timewarrior</a> are powerful and popular.</li>
</ol>
<h2>Java</h2>
<ol>
<li><a href="https://vladmihalcea.com/time-zones-java-web-application/">Time zones in java</a></li>
</ol>
Boarding TheCodingTrain.com2022-08-20T00:00:00Z/posts/BoardingTheCodingTrain/<p>This talk is a work in progress. Hoping to give it at Omaha Bar Camp on 20 August 2022.</p>
<p>Slides are at <a href="https://bit.ly/CodingTrainAug2022">https://bit.ly/CodingTrainAug2022</a>.</p>
<p><a href="https://bit.ly/CodingTrainAug2022"><img src="/static/img/BoardingTheCodingTrain.png" alt="presentation link" /></a></p>
gopass note2022-08-05T00:00:00Z/posts/gopass1/<p>https://www.gopass.pw/ can do a lot. Right now, I just need a little.
It's likely I'll have more post(s) about gopass.<br />
I'm excited to get started with it.</p>
<h2>Setup</h2>
<ol>
<li><code>gpg --batch --passphrase 'secret' --quick-gen-key mpayne default default</code>
<ol>
<li>Quick setup of a GNUpg.org key pair. Use '' if you don't want a passphrase.</li>
</ol>
</li>
<li><code>gopass init mpayne</code></li>
</ol>
<h2>Use -- Create entries and Read entries</h2>
<ol>
<li><code>gopass insert demo1</code></li>
<li><code>gopass show demo1</code></li>
</ol>
<h2>Using in <code>~/.bashrc</code></h2>
<ol>
<li><code>export GPG_TTY=$(tty)</code>
<ol>
<li>so gpg-agent will prompt in a text only world (like just ssh)</li>
</ol>
</li>
<li><code>export APW_DEMO1=$(gopass show demo1)</code>
<ol>
<li>Less than good that the secret password demo1 lives in cleartext in an environment variable. :shrug:</li>
</ol>
</li>
</ol>
Star Trek2022-06-26T00:00:00Z/posts/StarTrek/<p>Enjoying Star Trek could be a nice prompt to practice writing. This post is a place holder.</p>
<p><a href="https://nerdist.com/article/star-trek-strange-new-worlds-gorn-alien-predator/">Strange New Worlds Reinvents the Gorn</a></p>
OLD talk: Bootify.io - jump start your spring boot apps2022-05-12T00:00:00Z/posts/bootify_old/<p>Older and not as good talk. See <a href="https://MattPayne.org/bootify">this better talk please</a>.</p>
<p>Repo where I'm trying things out: <a href="https://github.com/payne/department">https://github.com/payne/department</a></p>
<p>Presentation about my experience: <a href="https://bit.ly/bootify_rocks">https://bit.ly/bootify_rocks</a></p>
YouTube2022-05-04T00:00:00Z/posts/YouTube/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance...</p>
<ol>
<li><a href="https://www.youtube.com/c/TheCodingTrain">The Coding Train</a>
<ol>
<li><a href="https://youtu.be/HerCR8bw_GE">Basics of Programming using p5js for Beginners</a></li>
<li><a href="https://youtu.be/0zac-cDzJwA">Coding Challenge 170: The Monty Hall Problem</a></li>
<li><a href="https://youtu.be/_SRS8b4LcZ8">Local Storage in JavaScript with p5.js</a></li>
</ol>
</li>
<li><a href="https://www.youtube.com/channel/UC9-y-6csu5WGm29I7JiwpnA">Compterphile</a>
<ol>
<li><a href="https://youtu.be/G_UYXzGuqvM">Python Sudoku Solver</a>
<ol>
<li>Best paired with <a href="https://youtu.be/5jwV3zxXc8E">Laziness in Python</a></li>
</ol>
</li>
</ol>
</li>
</ol>
A Drop of Web Dev With Python's Flask - using REPL.it2022-02-25T00:00:00Z/posts/flask_on_replit/<p>Slides are at <a href="http://bit.ly/flask_on_REPLit">http://bit.ly/flask_on_REPLit</a>.</p>
<p><a href="http://bit.ly/flask_on_REPLit"><img src="/static/img/flask-replit-talk.png" alt="presentation link" /></a></p>
Datasette.io is great & easy2021-11-07T00:00:00Z/posts/datasette1/<p>https://calmcode.io/datasette/introduction.html is a nice introduction to https://datasette.io/</p>
<pre><code>select name, thing from person, thing, person_thing pt where person.id = pt.person_id and thing.id = pt.thing_id;
</code></pre>
<p>For this example, there are three text CSV files to start with:</p>
<pre><code>person.csv
id,name
1,Matt
2,Tracey
3,Pascal
4,Poppy
thing.csv
id,thing
1,computers
2,knitting
3,dogging
person_thing.csv
id,person_id,thing_id
1,1,1
2,2,2
3,3,3
4,4,3
</code></pre>
<p>Put these in a SQLite database like so:</p>
<ol>
<li><code>csvs-to-sqlite person.csv thing.csv person_thing.csv eg.db</code></li>
<li><code>datasette eg.db</code></li>
</ol>
A Python Mini Tour -- Implementing Rank Choice Voting2021-08-14T00:00:00Z/posts/python_rcv/<p>Slides are at <a href="http://bit.ly/pyAug2021">http://bit.ly/pyAug2021</a></p>
<p><a href="http://bit.ly/pyAug2021"><img src="/static/img/python-rcv.png" alt="presentation link" /></a></p>
Graphviz's DOT language for fun and profit2021-05-14T00:00:00Z/posts/graphviz_dot/<p>Slides are at <a href="http://bit.ly/dot_is_fun">http://bit.ly/dot_is_fun</a></p>
<p><a href="http://bit.ly/dot_is_fun"><img src="/static/img/dot-is-fun.png" alt="presentation link" /></a></p>
JQ and JQPlay.org2021-04-19T00:00:00Z/posts/JsonPath/<p>https://jqplay.org/</p>
<p>https://jqplay.org/s/wyRrxoIy8g</p>
<p>These can be handy when working with <code>MockMVC</code> tests. TODO: Explain more</p>
<p><a href="https://app.pluralsight.com/profile/author/steven-haines">Steven Haines'</a> great <a href="Pluralsight.com">Pluralsight.com</a> class <a href="https://app.pluralsight.com/library/courses/tdd-spring-junit5/table-of-contents">TDD with Spring and JUnit 5</a></p>
Amazing People2021-03-21T00:00:00Z/posts/AmazingPeople/<ol>
<li>Barbara Liskov
<ul>
<li><a href="https://www.quantamagazine.org/barbara-liskov-is-the-architect-of-modern-algorithms-20191120/">The Architect of Modern Algorithms</a></li>
<li><a href="https://youtu.be/_jTc1BTFdIo">How Data Abstraction changed Computing forever | Barbara Liskov | TEDxMIT</a></li>
<li><a href="https://youtu.be/VFh8wT57R50">Barbara Liskov on the Future of Computer Science</a></li>
</ul>
</li>
<li>Betty Love
<ul>
<li><a href="https://www.youtube.com/watch?v=bO6iPLT9Qos&t=744s">2023-August-17 University of Nebraska system's Outstanding Teaching and Creative Activity award at the Board of Regents meeting</a></li>
</ul>
</li>
<li><a href="https://maryrosecook.com/">Mary Rose Cook</a>
<ul>
<li><a href="https://youtu.be/hbKN-9o5_Z0?si=O9YX1gzKI25WC6gQ">Mary Live Codes A JavaScript Game From Scratch – Mary Rose Cook / Front-Trends 2014</a></li>
</ul>
</li>
<li><a href="">Stan Wileman</a></li>
</ol>
ElasticSearch notes2021-03-18T00:00:00Z/posts/ElasticSearchFun/<p>A quick way to https://github.com/payne/elasticsearch1</p>
Tweeting Application - Hobby as a SaaS2021-03-11T00:00:00Z/posts/TweetingSaaS/<p>https://github.com/payne/tweeting is work in progress (wip) that will send scheduled reminder tweets. I'll be updating this post (and maybe making others too) as I make progress on this hobby SaaS.</p>
Nice Spring Boot JPA book2020-12-20T00:00:00Z/posts/SpringJPABook/<p><a href="https://learning.oreilly.com/library/view/spring-boot-persistence/9781484256268/"><img src="/static/img/SpringBootPersistence.jpg" alt="Book Cover" /></a></p>
<p><a href="https://learning.oreilly.com/library/view/spring-boot-persistence/9781484256268/">Spring Boot Persistence Best Practices: Optimize Java Persistence Performance in Spring Boot Applications</a>
by <a href="https://learning.oreilly.com/search/?query=author%3A%22Anghel%20Leonard%22&extended_publisher_data=true&highlight=true&include_assessments=false&include_case_studies=true&include_courses=true&include_playlists=true&include_collections=true&include_notebooks=true&is_academic_institution_account=false&source=user&sort=relevance&facet_json=true&page=0&include_facets=false&include_scenarios=true&include_sandboxes=true&json_facets=true">Anghel Leonard</a>
is handy because I can wonder into the ebook and quickly get concrete techniques that are very helpful.
For example the <a href="https://github.com/payne/Hibernate-SpringBoot/tree/master/HibernateSpringBootManyToManyBidirectional">ManyToMany example</a> was easy to get working and explained well in the book. Since I used that Leonard's repository for the book has been updated -- it's great that it's being updated. https://github.com/AnghelLeonard/Hibernate-SpringBoot</p>
Using DTOs in Spring Boot MVC applications2020-12-13T00:00:00Z/posts/SpringMvcDTOs/<p>Many spring boot applications use Spring MVC to provide RESTful APIs or create a GUI for a web browser.
These applications frequently use DTO (data transfer objects) in the controller layer instead of using JPA <code>@Entity</code> classes everywhere.</p>
<p>Is this <a href="https://en.wikipedia.org/wiki/Cargo_cult_programming">cargo cult programming</a> or a good idea? My opinion is that it's a good idea, except for very tiny applications.</p>
<p>I'm in favor of:</p>
<ol>
<li><a href="https://www.thymeleaf.org/">Thymeleaf</a> and <code>@Controller</code> layer share DTOs</li>
<li>These DTOs should be simple as possible...</li>
<li>DTOs are passed from the <code>@Controller</code> layer to/from the <code>@Service</code> layer.</li>
<li>The <code>@Service</code> layer uses the DTOs to build <code>@Entity</code> objects for use with the JPA <code>@Repository</code> objects. Lazy loading in JPA is sweet.
<code>@Service</code> classes loop through the <code>@Entity</code> objects to build the DTOs. This way the logic around pagination and lazy loading is isolated
to the <code>@Service</code> classes.</li>
</ol>
<h2>References</h2>
<ol>
<li>Popular static analysis tool, SonarQube has a rule: <a href="https://rules.sonarsource.com/java/tag/spring/RSPEC-4684">Persistent entities should not be used as arguments of "@RequestMapping" methods</a> failure to follow this rule results in a critical finding.</li>
<li><a href="https://www.adam-bien.com/roller/abien/entry/how_evil_are_actually_data">How evil are Data Transfer Objects (DTOs)?</a> is a post from 2009 (pre spring boot, but not spring). It talks about how DTOs are a common solution to a common problem and that DTOs are not perfect.</li>
<li>StackOverflow has a nice discussion of <a href="https://stackoverflow.com/questions/61303236/how-to-use-dtos-in-the-controller-service-and-repository-pattern">How to use DTOs in the Controller, Service and Repository pattern</a></li>
</ol>
<p>There are many reasons
<a href="https://stackoverflow.com/users/5221149/andreas">Andreas</a>'s answer is great. It acknowledges that in small projects people sometime use <code>@Entity</code> classes in the MVC layer and the importance of not doing that as projects get larger.</p>
<p>I'll
quote
<a href="https://stackoverflow.com/users/5221149/andreas">Andreas</a>'s
answer below, in the rest of this post, (because it's a great answer):</p>
<p>In today programming with Spring MVC and interactive UIs, there are really 4 layers to a web application:</p>
<ul>
<li>
<p>UI Layer (Web Browser, JavaScript)</p>
</li>
<li>
<p>MVC Controller, i.e. Spring components annotated with @Controller</p>
</li>
<li>
<p>Service Layer, i.e. Spring components annotated with @Service</p>
</li>
<li>
<p>Data Access Layer, i.e. Spring components annotated with @Repository</p>
</li>
</ul>
<p>Every time one of these layers interact with the underlying layer, they need to send/receive data, which generally are POJOs, to transfer the data between layers. These POJOs are DTOs, aka Data Transfer Objects.</p>
<p>Only DTOs should be used between layers, and they are not necessarily the same, e.g. the Service Layer may apply business logic to DTOs received from the Data Access Layer, so the DTOs of the Service Layer API is different from the Data Access Layer API. Similarly, the Controller may rearrange the data to prepare it for presentation (grouping, summaries, ...), so the data sent to the web browser is different from the data received from the Service Layer.</p>
<p>With full abstraction, the Data Access Layer's API should not reflect the technology of the Data Access, i.e. whether it is using JDBC, JPA, NoSQL, a web service, or some other means of storing/retrieving the data. This means that Entity classes shouldn't make it outside the Data Access Layer.</p>
<p>Most projects don't need that level of abstraction, so it is common for a DTO to be an Entity class, and to flow all the way from the Data Access Layer to the Controller, where it is used either by a View, or is send to the web browser, encoded as JSON.</p>
<p>It depends on the size and complexity of the project. The bigger the project, the more important it becomes to make each layer as abstract/standalone as possible.</p>
Getting Started with Spring Boot2020-09-24T00:00:00Z/posts/start_spring_boot/<h3>Annotations that are good to know</h3>
<ol>
<li><code>@Autowired</code> is sometimes handy even though constructor injection is preferred sometimes. Lombok's <code>@RequiredArgsConstructor</code> is often used with constructor injection.
<ol>
<li><code>@Qualifier("nameOfBean")</code> helps when fetching a bean that has been named with the <code>(name="nameOfBean")</code> parameter to an annotation. There's an example in
<a href="https://antkorwin.com/statemachine/statemachine.html#_a_multiple_configuration_of_state_machines_in_one_project">Antkorwin's spring state machine (SSM) notes</a></li>
</ol>
</li>
</ol>
<h3>A talk about getting started with spring boot</h3>
<ol>
<li>Repository is at <a href="https://payne.github.io/docker-compose-talk/">https://github.com/payne/spring-boot-getting-started-talk</a></li>
<li><a href="https://docs.google.com/presentation/d/1xRTFnt7I3BYV6ZkVXkopP5vido1KWNhPfXYnLxVP50k/edit?usp=sharing">Here are the slides</a></li>
</ol>
<p><a href="https://docs.google.com/presentation/d/1xRTFnt7I3BYV6ZkVXkopP5vido1KWNhPfXYnLxVP50k/edit?usp=sharing"><img src="/static/img/start-spring-boot.png" alt="presentation link" /></a></p>
<h3>YouTubes</h3>
<ol>
<li><a href="https://youtu.be/UgX5lgv4uVM">Spring Boot Tutorial for Beginners - 2023 Crash Course using Spring Boot 3</a> by <a href="https://www.youtube.com/@DanVega">Dan Vega</a></li>
<li><a href="https://www.youtube.com/watch?v=r7v6EPph3f0&list=PLhPyEFL5u-i0MHw41OapxjLlsl0s2XQyE">Spring Boot Playlist</a> from <a href="https://www.youtube.com/@shadsluiter">Professor Sluiter</a></li>
</ol>
Firebase notes2020-06-01T00:00:00Z/posts/firebase/<p>https://firebase.googleblog.com/2020/05/local-firebase-emulator-ui.html?m=1</p>
Lisp and Friends2020-05-31T00:00:00Z/posts/lisp-and-friends/<p>This looks interesting. When to check it out?</p>
<p><a href="https://leanpub.com/lovinglisp/read#leanpub-auto-setting-up-your-common-lisp-development-system-and-quicklisp">Loving Common Lisp, or the Savvy Programmer's Secret Weapon</a> by <a href="https://markwatson.com/">Mark Watson</a></p>
<p>His website is amazing!</p>
Front Fava with Docker2020-05-30T00:00:00Z/posts/docker-fava/<p>Goal is to use <code>docker-compose up -d</code> to have https://github.com/beancount/fava/tree/master/contrib/docker
only be accessible after some form of authentication is done.</p>
<ol>
<li>https://github.com/bitly/oauth2_proxy is archived but has some nice pointers to current work.</li>
</ol>
<p>I used this during my
(August 2020 OLUG.org talk about docker-compose](https://payne.github.io/docker-compose-talk/)</p>
Books about Computer Programming2020-04-19T00:00:00Z/posts/ProgrammingBooks/<p>These are numbered to make them easy to talk about but they are not ordered in importance...</p>
<ol>
<li>Free: <a href="https://greenteapress.com/wp/think-java-2e/">Think Java</a></li>
<li><a href="https://github.com/getify/You-Dont-Know-JS">You Don't Know JS series</a></li>
<li><a href="https://thecodingtrain.com/learning/nature-of-code/">Nature of Code</a>
<ol>
<li>https://github.com/nature-of-code/noc-book-2</li>
</ol>
</li>
</ol>
<p>and many more....</p>
Chrombooks - Linux for everyone2020-02-23T00:00:00Z/posts/chromebook-talk/<p>I fell in love with Chromebooks when I read Kenn White's fantastic July 2017
article "<a href="https://blog.lessonslearned.org/building-a-more-secure-development-chromebook/">My $169 development Chromebook</a>."<br />
Here's a quote of some of his excellent points (please read his whole article):</p>
<h2>"Goals</h2>
<ol>
<li>A very modest budget (ideally <$200 USD, all in)</li>
<li>8-10 hour real-world battery life</li>
<li>A first-class, local/non-connected dev environment for my current toolchain:</li>
<li>go, c/c++, node.js, git, curl, nginx, postgres...</li>
<li>Standard network tools (openssl cli, nmap, tcpdump...)</li>
<li>Strong hardware-backed verification & mutual auth</li>
<li>Open source, actively developed software whenever possible</li>
<li>Bonus: secure messaging, voice, video chat, Netflix</li>
</ol>
<h2>Anti-Features</h2>
<p>The finished environment should not:</p>
<ol>
<li>bypass core OS security</li>
<li>disable Verified Boot</li>
<li>require sudo/root for dev environment</li>
<li>rely on Crouton or Ubuntu</li>
<li>require (or assume) an always-on network"</li>
</ol>
<hr />
<p>Several nice overview videos include:</p>
<ol>
<li><a href="https://www.youtube.com/watch?v=7zqNbcQ8JHQ">Why Use a Chromebook</a> March 10, 2019</li>
<li><a href="https://www.youtube.com/watch?v=yTGs-CekbhY">Got a New Chromebook? 10 Things you need to know</a> Dec 31, 2018</li>
<li><a href="https://www.youtube.com/watch?v=7Ha3ZpvLTdA">How to Replace Your PC with a Chromebook</a> Jan 22, 2019</li>
</ol>
<p>My work in progress <a href="https://docs.google.com/document/d/1Np-e_TzJt8q4STBFfNAHnYkfEKmc06OMqBJwa0gVV3k/edit?usp=sharing">notes</a>
are online and my W-I-P presentation are <a href="https://docs.google.com/presentation/d/1fXO12av5Qy0UVXM_kmto-IyBsQcuVT9XqQ3O0SmTaI4/edit?usp=sharing">here:</a></p>
<p><a href="https://docs.google.com/presentation/d/1fXO12av5Qy0UVXM_kmto-IyBsQcuVT9XqQ3O0SmTaI4/edit?usp=sharing"><img src="/static/img/chromebook-talk.png" alt="presentation link" /></a></p>
Netlify & Gatsby?2020-02-23T00:00:00Z/posts/2020-gn/<p>This might be helpful: https://www.netlify.com/blog/2016/02/24/a-step-by-step-guide-gatsby-on-netlify/</p>
Learning Web Programming with Games2020-02-01T00:00:00Z/posts/games-web-programmers-play/<p>There are a bunch of these (plan to add to this list as time goes by):</p>
<ol>
<li><a href="https://flexboxfroggy.com/">Flexbox Froggy</a></li>
<li><a href="https://flukeout.github.io/">CSS Diner</a></li>
<li>http://www.flexboxdefense.com/</li>
<li>https://mastery.games/ has some great games. Some cost money.</li>
</ol>
<p>This is a nice list:
https://dev.to/paco_ita/train-your-javascript-skills-with-online-games-289m</p>
Angular2020-01-10T00:00:00Z/posts/angular/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance (like many of my posts, I add to this over time)...</p>
<ol>
<li><a href="https://angular.io/tutorial">Angular.io's Tour of Heroes Tutorial</a></li>
<li><a href="https://jcoop.io/angular-practice-exercises/">practice exercises for Pluralsight’s Angular Fundamentals course</a></li>
<li><a href="https://angular-university.io/course/angular-material-course">Angular University Material Course</a></li>
<li><a href="https://app.pluralsight.com/search/?q=angular%20deborah%20kurata&type=video-course&m_sort=relevance&query_id=8e573afc-1498-4a61-9ea1-e1a4cb504a33&is_auto_suggested=true&source=autocomplete&tag_level3_filter=3ebd3ad3-8e2d-4958-907f-388e1fb08a66">Pluralsight's Deborah Kurata Angular classes</a></li>
<li><a href="https://material.angular.io/">https://material.angular.io/</a></li>
<li><a href="https://www.youtube.com/channel/UClb3aBqsBD_srhaSGTAEq-Q">Brandon Roberts</a> YouTube channel</li>
<li><a href="https://www.youtube.com/watch?v=G0bBLvWXBvc&t=4s">Inspirational 20 minute YouTube - walkthru of building a PWA for TicTacToe - 2019-Sept-16</a></li>
<li><a href="https://github.com/avatsaev/angular-learning-resources">List of Angular Learning Resources</a></li>
</ol>
<h3>Where to deploy?</h3>
<ol>
<li><a href="https://www.netlify.com/blog/get-started-with-angular-on-netlify-quickly/">Netlify has a nice angular starter that fits well in a subdomain</a>. When I tried it on 23-Dec-2022, it made a github repo for me: <a href="https://github.com/payne/angular-quickstart">https://github.com/payne/angular-quickstart</a></li>
</ol>
<h3>PWA things <a href="https://pinboard.in/u:payne/t:pwa+angular">https://pinboard.in/u:payne/t:pwa+angular</a></h3>
<p>My (wip) short talk on writing progressive web applications with angular is here: <a href="https://MattPayne.org/PWA">MattPayne.org/PWA</a>.</p>
<ol>
<li><a href="https://rodrigokamada.github.io/angular-pwa/">Simple Demo</a>, its <a href="https://github.com/rodrigokamada/angular-pwa">repo</a> and <a href="https://dev.to/rodrigokamada/adding-the-progressive-web-application-pwa-to-an-angular-application-4g1e">an article about it</a>
<ol>
<li>My follow along repo is <a href="https://github.com/payne/try-angular-pwa">https://github.com/payne/try-angular-pwa</a></li>
</ol>
</li>
<li><a href="https://web.dev/creating-pwa-with-angular-cli/">Create a Progressive Web App with the Angular CLI</a> is pointed at by some angular documentation: <a href="https://angular.io/guide/service-worker-intro">https://angular.io/guide/service-worker-intro</a></li>
</ol>
<h3>Local Storage</h3>
<ol>
<li><a href="https://blog.briebug.com/blog/managing-local-storage-in-angular">Managing Local Storage in Angular</a> is a well ranked random google search result.</li>
</ol>
Backlogs2020-01-01T00:00:00Z/posts/backlog/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance (like many of my posts, I add to this over time)...</p>
<ol>
<li><a href="https://reverentgeek.com/configure-eleventy-to-host-a-custom-mastodon-alias/">Using a Mastodon Alias</a></li>
<li>Make an AWS Lambda that runs graphviz's dot for authorized clients</li>
<li>Try https://www.npmjs.com/package/eleventy-plugin-embed-everything</li>
<li>Try to figure out how to put react apps into 11ty blog posts -- hopefully something better than just using replIT.com embedding.
<ol>
<li>Try https://slinkity.dev/docs/quick-start/</li>
</ol>
</li>
<li>https://github.com/vaadin</li>
</ol>
<p>Someday, I'd like to find a nicer way to manage a public backlog</p>
Tracking things2019-11-24T00:00:00Z/posts/tracking/<p>I'm excited to start using the <a href="https://github.com/CoralineAda/lftm">low-friction task managment system</a>. I'm dreaming of combining this with <a href="https://TaskWarrior.org">TaskWarrior.org</a> and the amazing open source mobile application <a href="https://inthe.am/about">InThe.AM</a>.</p>
<p>This post will hold things I've learned and things I'm trying to learn.... hopefully it will be useful to future me and perhaps future you too.</p>
<h3>Trying to learn</h3>
<ol>
<li>How to track daily habits (eating, exercise, etc). Is good to have seven day tags, and seven contexts?
<ol>
<li><code>task add Exercise due:today recure:daily +habit</code></li>
<li><code>task context define monday +monday or +habit</code> # Current context should include tasks tagged with habit</li>
</ol>
</li>
<li>How to use these tools as a sort of electronic bullet journal</li>
<li>How to use these tools to do regular retrospectives</li>
</ol>
<h3>Learned</h3>
<ol>
<li>Excitement is easy because the tools seem so amazing!</li>
<li><code>task add Exercise due:today recure:daily +habit</code></li>
<li><code>task context define monday +monday or +habit</code></li>
<li><code>task 34 done loaded shelfs</code> # Puts a note with the done</li>
<li><code>task 34 show</code> # Shows the note with a timestamp</li>
<li><code>task add Change Furnace Filter due:2020-01-25 recur:quarterly +home +habit project:chores</code> # no space after :</li>
</ol>
<h3>taskwarrior backup to github</h3>
<ol>
<li>Top google hit is https://github.com/smaboshe/taskwarrior-backup that just makes binary tarballs of the folder. It would be nice to be able to see the changes to the files in the commits.</li>
<li>Second google result https://github.com/kostajh/task-git looks great. It's not synchronization and says:</li>
</ol>
<blockquote>
<p>"It is recommended to use the Taskwarrior database only on one machine, as you will be resolving conflicts if using the same task database on multiple machines."</p>
</blockquote>
TermUX.com Rocks!2019-08-01T00:00:00Z/posts/termux/<p>[TermUX.com] is an android application containing a Linux distro (no X-Windows). I've installed it
on my ChromeBook via the Play Store.</p>
<p>It's a bit of a pain to get things from termux into the rest of the chromebook. I like:</p>
<ol>
<li><code>python -m http.server</code></li>
<li>http://100.115.92.2:8000/ # Note I get the IP # for TermUX using <code>ifconfig</code> and looking at the IP for the arc0 interface.</li>
</ol>
BeanCount2019-07-04T00:00:00Z/posts/BeanCount/<h2>Getting Started</h2>
<ol>
<li><code>python3 -m venv BCenv</code></li>
<li><code>source BCenv/bin/activate</code></li>
<li><code>pip install fava</code></li>
</ol>
<pre><code>(env) mpayne@Payne:/mnt/c/Users/Payne/BeanCount$ nl ledger.beancount
1 option "title" "Matt Learning Beancount"
2 option "operating_currency" "USD"
3 2014-01-01 open Assets:Checking
4 2014-01-01 open Equity:Opening-Balances
5 2014-01-02 * "Deposit"
6 Assets:Checking 100.00 USD
7 Equity:Opening-Balances
(env) mpayne@Payne:/mnt/c/Users/Payne/BeanCount$
</code></pre>
<pre><code>
</code></pre>
Heroku.com for Java2019-05-27T00:00:00Z/posts/HerokuJava/<p>HeroKU.com is wonderful for many reasons. One of which is that you don't need a credit card to get a free account and deploy your application.</p>
<p>Background:</p>
<ol>
<li>https://devcenter.heroku.com/articles/intro-for-java-developers</li>
<li>https://devcenter.heroku.com/articles/java-webapp-runner
<ol>
<li>https://github.com/payne/herokuhello is a working example. I like this technique because it's usuing a normal WAR. This WAR is run locally by a utility, and run on HeroKU.com via the <code>Procfile</code> script.</li>
</ol>
</li>
</ol>
AWS2019-05-26T00:00:00Z/posts/AWS/<p>Amazon Web Services (AWS) is to cloud computing
<strong>::</strong>
Kleenex is to tissue</p>
<h3>Nots from Jan 2023</h3>
<ol>
<li><a href="https://medium.com/@weibeld/the-aws-cli-just-got-much-better-31d102feac4b">Medium post on AWS CLI</a></li>
<li><a href="https://hsingh.hashnode.dev/setup-a-mock-aws-locally-using-localstack">Hashnode post on LocalStack</a></li>
</ol>
<h3>Notes from 2019</h3>
<p>Things that are handy:</p>
<ol>
<li>One year of some free services: <a href="https://aws.amazon.com/free/">https://aws.amazon.com/free/</a></li>
<li><a href="https://aws.qwiklabs.com">https://aws.qwiklabs.com</a></li>
<li><a href="https://acloud.guru/">https://acloud.guru/</a></li>
<li><a href="https://linuxacademy.com/">https://linuxacademy.com/</a></li>
<li><a href="https://www.pluralsight.com/">https://www.pluralsight.com/</a></li>
<li><a href="https://learning.oreilly.com/home/">https://learning.oreilly.com/home/</a></li>
</ol>
<p>In the Omaha AWS Meetup's lab a while back, a nice blog post was used as a lab.</p>
<p><a href="https://www.cloudshiftstrategies.com/flasklambdalab.html">https://www.cloudshiftstrategies.com/flasklambdalab.html</a> is the "punch-and-run" very simple lab from yesterday's AWS Meetup. It's easy to follow. It uses
<a href="https://www.zappa.io/">https://www.zappa.io/</a>
to deploy a premade flask app:
<a href="https://github.com/peterb154/flask_lambda_lab">https://github.com/peterb154/flask_lambda_lab</a></p>
<p>My simple instance is <a href="https://0khv79381f.execute-api.us-east-1.amazonaws.com/dev">https://0khv79381f.execute-api.us-east-1.amazonaws.com/dev</a>
They did a nifty thing where they try and show how slow the lambda instances are:
<a href="https://github.com/peterb154/flask_lambda_lab/blob/lesson3/app/__init__.py#L16">https://github.com/peterb154/flask_lambda_lab/blob/lesson3/app/<strong>init</strong>.py#L16</a></p>
Murach's Servlets & JSPs2019-05-05T00:00:00Z/posts/Murach-Servlets-JSPs/<p>One of the things that struck me as I start to look at the source code that accompanies "Murach's Servlets & JSPs" is that it's formatted for netbeans. It didn't take long to convert one of the examples to use maven. https://github.com/payne/Ch7ex3</p>
<p>I'm thinking of taking the little I learned doing this, and writing a simple convertor to go from the Murach's NetBeans directory structure to something that's more popular in Omaha. Of course, once you have maven it's quick to convert to gradle.</p>
Python2019-05-04T00:00:00Z/posts/python/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance...</p>
<ol>
<li><a href="https://wiki.python.org/moin/BeginnersGuide">Official Python Beginner's Guide</a></li>
<li>Great collection of articles and short videos: <a href="https://calmcode.io/">Calm Code</a></li>
</ol>
Linux2019-05-04T00:00:00Z/posts/linux/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance...</p>
<ol>
<li><a href="https://www.freecodecamp.org/news/the-linux-commands-handbook/">The Linux Command Handbook</a></li>
</ol>
Java2019-05-04T00:00:00Z/posts/java/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance...</p>
<ol>
<li><a href="https://docs.oracle.com/javase/tutorial/">The Java Tutorials</a>
<ol>
<li><a href="https://docs.oracle.com/javase/tutorial/essential/exceptions/index.html">Exceptions</a></li>
<li><a href="https://docs.oracle.com/javase/tutorial/essential/io/index.html">Basic Input Output</a></li>
<li><a href="https://docs.oracle.com/javase/tutorial/collections/index.html">Collections</a></li>
</ol>
</li>
<li><a href="https://codingbat.com/java">CodingBat</a> is fun practice</li>
<li><a href="https://github.com/matyb/java-koans">Java Koans</a></li>
</ol>
<h2>SonarQube rules are like city hall -- you can't fight SonarQube rules set by the man</h2>
<ol>
<li><a href="https://rules.sonarsource.com/java/RSPEC-1488">RSPEC-1488: No handy variable for the thing being returned</a></li>
</ol>
Git2019-05-04T00:00:00Z/posts/git/<p>These are numbered to make them easy to talk about,
but they are not ordered in importance...</p>
<ol>
<li>Book <a href="https://git-scm.com/book/en/v2">Pro Git</a></li>
<li>A tutorial & game about git: <a href="https://github.com/benthayer/git-gud">Git Gud</a></li>
<li>Like many, I use <a href="https://nvie.com/posts/a-successful-git-branching-model/">git flow</a> day to day.</li>
</ol>
Books2019-05-04T00:00:00Z/posts/books/<p>These are numbered to make them easy to talk about but they are not ordered in importance...</p>
<ol>
<li><a href="https://smile.amazon.com/Bossypants-Tina-Fey-ebook/dp/B0047Y0FGY/">Bossypants by Tina Fey</a></li>
<li><a href="https://smile.amazon.com/Yes-Please-Amy-Poehler-ebook/dp/B00IHZS39A/">Yes, Please by Amy Poehler</a></li>
<li><a href="https://smile.amazon.com/Cats-Cradle-Novel-Kurt-Vonnegut-ebook/dp/B000SEH13C">Cat's Cradle by Kurt Vonnegut</a></li>
<li><a href="https://www.amazon.com/Grit-Passion-Perseverance-Angela-Duckworth-ebook/dp/B010MH9V3W">Grit: The Power of Passion & Perseverance</a> by <a href="https://angeladuckworth.com/">Angela Duckworth</a></li>
<li>Growth <a href="https://smile.amazon.com/Mindset-Psychology-Carol-S-Dweck-ebook/dp/B000FCKPHG/">Mindset by Dweck</a></li>
<li><a href="https://www.amazon.com/gp/product/B0040JHNQG/">A Guide to the Good Life: The Ancient Art of Stoic Joy by William Irvine</a></li>
<li><a href="https://www.amazon.com/Silver-Linings-Playbook-Novel-ebook/dp/B001ANSSDC">The Silver Linings Playbook</a> by <a href="https://en.wikipedia.org/wiki/Matthew_Quick">Matthew Quick</a>
<ul>
<li>"If clouds are blocking the sun, there will always be a silver lining that reminds me to keep on trying."</li>
<li>"I am practicing being kind over being right."</li>
</ul>
</li>
</ol>
<p>and many more.... In the future it would be great fun to turn this into a fun little javascript program and integrate one of those 100 books everyone should read list...</p>
Fred's ImageMagick TextEffect Utility2019-04-21T00:00:00Z/posts/imagemagick-texteffect/<p>Thanks, Fred! I really like your
<a href="http://www.fmwconcepts.com/imagemagick/texteffect/index.php">texteffect</a>
utility.</p>
<ol>
<li><code>for f in 'Breakfast' 'Lunch' 'Dinner'; do ./texteffect -t $f -s plain -e normal -f Arial -p 48 -c royalblue -b white -S 1024x768 $f.png; done</code></li>
<li><code>ls -l *.png</code></li>
</ol>
<pre><code>-rwxrwxrwx 1 mpayne mpayne 39547 Apr 21 15:55 Breakfast.png
-rwxrwxrwx 1 mpayne mpayne 27169 Apr 21 15:55 Dinner.png
-rwxrwxrwx 1 mpayne mpayne 26342 Apr 21 15:55 Lunch.png
</code></pre>
<ol start="3">
<li><code>file *.png</code></li>
</ol>
<pre><code>Breakfast.png: PNG image data, 1014 x 190, 16-bit/color RGB, non-interlaced
Dinner.png: PNG image data, 994 x 256, 16-bit/color RGB, non-interlaced
Lunch.png: PNG image data, 985 x 277, 16-bit/color RGB, non-interlaced
</code></pre>
<p>Now to try the generated images on on the
<a href="https://smile.amazon.com/Calendar-Reminder-Dementia-Sufferers-Alzheimers/dp/B07J47XP34/ref=sr_1_fkmrnull_3?crid=1KY4F7LNEWODG&keywords=vefaii+dementia+clock&qid=1555879600&s=gateway&sprefix=Vefaii+clock%2Caps%2C177&sr=8-3-fkmrnull">Vefaii clock</a></p>
Computation art from FizzBuzz using p5js2019-03-14T00:00:00Z/posts/p5js-fizz-buzz/<iframe frameborder="0" width="100%" height="800px" src="https://replit.com/@payne/FizzBuzzGrid?embed=true"></iframe>
<h2>Links and notes from my 3/14/19 talk at <a href="https://www.meetup.com/Omaha-Ruby-Meetup/events/xggmrqyzfbsb/">Omaha Ruby & Open Source Meetup</a></h2>
<ol>
<li>
<p><a href="https://replit.com/@payne/FizzBuzzGrid">https://github.com/TechOmaha/TechOmaha.Dataset</a></p>
</li>
<li>
<p><a href="https://github.com/payne/jQueryBootStrapExaqmple1">https://github.com/payne/jQueryBootStrapExaqmple1</a> simple silly example of consuming the data. Renders here:
<a href="http://payne.github.io/jQueryBootStrapExaqmple1/">http://payne.github.io/jQueryBootStrapExaqmple1/</a> I know you can do better! I challenge you to do better, please!!?!!</p>
</li>
<li>
<p><a href="https://www.google.com/search?q=the+coding+train&rlz=1CAHJUL_enUS789US791&oq=the+coding+train&aqs=chrome..69i57j0l5.2271j0j4&sourceid=chrome&ie=UTF-8">The Coding Train</a> from NYU!</p>
</li>
<li>
<p><a href="https://shiffman.net/a2z/">Programming from A to Z</a> is amazing series on text processing that includes how to implement a Markov Chain (used for predictive completion when sending text messages, etc)</p>
</li>
<li>
<p><a href="http://p5js.org">http://p5js.org</a>
was created by <a href="http://lauren-mccarthy.com/teaching/p5-js">Lauren McCarthy</a> is amazing, wonderful, and fun.</p>
</li>
<li>
<p><a href="https://editor.p5js.org/">https://editor.p5js.org/</a> is a free online IDE for writing p5js programs in JavaScript</p>
</li>
<li>
<p><a href="https://editor.p5js.org/payne/sketches/ByzXjdY14">https://editor.p5js.org/payne/sketches/ByzXjdY14</a> is a nice intro example I like to talk about while lunching with people</p>
</li>
<li>
<p><a href="https://editor.p5js.org/payne/sketches/rkYJAgSpX">https://editor.p5js.org/payne/sketches/rkYJAgSpX</a> is the Fizz Buzz Computational "art piece" that I talked about. It's also on REPLit.com at <a href="https://replit.com/@payne/FizzBuzzGrid">https://replit.com/@payne/FizzBuzzGrid</a></p>
</li>
<li>
<p><a href="https://www.manning.com/books/generative-art">https://www.manning.com/books/generative-art</a> is one of the books I hope to read someday.</p>
</li>
</ol>
<h3>Thank you for letting me pitch my excitement to you</h3>
<p>Note: On Medium.com I published <a href="https://medium.com/@MattPayneOrg/programmers-first-computational-art-piece-a02f3c412606">Programmer's First Computational Art Piece</a>.</p>
Money2017-05-05T00:00:00Z/posts/money/<ol>
<li><a href="https://twitter.com/adammgrant/status/515102207726059520?lang=en">Money is like oxygen: you need it to breath</a></li>
<li>It's important to have a <a href="http://mattpayne.org/posts/f-off-fund/">rainy day fund</a></li>
<li>I think it is important to talk with each other about money. <a href="https://thefinancialdiet.com/">https://thefinancialdiet.com/</a>
leads the way.</li>
<li>Yes, the love of money is a root of all evil. And it's important that we team up so having a rainy day fund is more important than having a fancy car...</li>
<li>My favorite way of saving/investng is <a href="https://www.madfientist.com/jl-collins-interview/">The Simple Path to Wealth</a></li>
<li>I'm inspired by <a href="https://www.madfientist.com/vicki-robin-interview/">Vicki Robin's Your Money or your Life</a></li>
<li><a href="https://www.daveramsey.com/fpu">Dave Ramsey's Financial Peace University</a> should be taken by every couple. Or something like it.</li>
<li><a href="https://minafi.com/profiles/adam">Adam</a>'s <a href="https://minafi.com/">https://minafi.com/</a> is great! Please work through his <a href="https://minafi.com/interactive-guide-early-retirement-financial-independence">Interactive Guide to Financial Independence</a></li>
<li><a href="https://www.youneedabudget.com/">YNAB - You Need a Budget</a> is a very handy utility. It's crippled because there are no backups or change control.</li>
<li><a href="https://plaintextaccounting.org/">PlainTextAccounting.org</a> intrests me, and I have not started practicing it, yet.</li>
</ol>
<h2><a href="https://thefinancialdiet.com/the-20-point-checklist-for-getting-good-with-money-in-your-20s/">TFD's</a> <a href="https://www.youtube.com/watch?v=HeR8oQj7Va0&t=1104s">20 Point Checklist for getting good with Money</a></h2>
<p>I really like this video! The title contains "in your 20s" but IMHO this qualifier is not needed because the list works for all adults.</p>
<p>Thanks to <a href="https://www.youtube.com/channel/UCagjaJIsu86Mqb2LmOHyKRQ">Helena Durst</a> for this great high level recap she posted in the video's
comments.</p>
<ol>
<li>Analyze your purchases, start to understand your money</li>
<li>Create a current budget, understand where you are</li>
<li>Identify your goals in life</li>
<li>Create a goal budget (50/30/20 rule)</li>
<li>Get to know your credit score</li>
<li>Find a financial buddy to help you on your journey</li>
<li>Start working on your emergency fund (be able to live off that fund for 3 months)</li>
<li>Do a 1 month financial cleanse (go on a radical budget, eg 50% of your income)</li>
<li>Know your professional industry and how to advance in it</li>
<li>Set up an additional stream of income (babysitting, dogwalking to investment and real estate), dont be dependent on one stream of income (your regular job)</li>
<li>Get over your fear of credit cards and get comfortable with them</li>
<li>Make your bank accounts as smart as possible</li>
<li>Learn to speak the language of money</li>
<li>Set up at least one retirement account</li>
<li>Write out your 5 year strategy for getting what you are worth at work</li>
<li>Work on 1 major money hang-up (dont feel shame about your money issues)</li>
<li>Set up regular money check-ins</li>
<li>Refresh your budget at least once a year</li>
<li>Create monthly spending challenges</li>
<li>Consider working with a professional (certified financial planners, accountants)</li>
</ol>
<h2>Your Money or your life</h2>
<p>From <a href="https://yourmoneyoryourlife.com/book-summary/">https://yourmoneyoryourlife.com/book-summary/</a></p>
<p>Ask yourself these questions:</p>
<ol>
<li>Do you have enough money?</li>
<li>Are you spending enough time with family and friends?</li>
<li>Do you come home from your job full of life?</li>
<li>Do you have time to participate in things you believe are worthwhile?</li>
<li>If you were laid off from your job, would you see it as an opportunity?</li>
<li>Are you satisfied with the contribution you have made to the world?</li>
<li>Are you at peace with money?</li>
<li>Does your job reflect your values?</li>
<li>Do you have enough savings to see you through six months of normal living expenses?</li>
<li>Is your life whole? Do all the pieces — your job, your expenditures, your relationships, your values — fit together?</li>
</ol>
<h2>FI</h2>
<ol>
<li><a href="http://aymeric.gaurat.net/2011/free-financial-independence-spreadsheet/">http://aymeric.gaurat.net/2011/free-financial-independence-spreadsheet/</a></li>
</ol>
<h3>Informative & Well done videos</h3>
<ol>
<li><a href="https://youtu.be/SEItn9Csitg">The Truth About FIRE - Is Early Retirement Actually Possible?</a></li>
</ol>
cartesianProduct(a, b)2017-03-03T00:00:00Z/posts/CartesianProduct/<pre><code class="language-java">package learning;
import com.google.common.collect.Sets;
import java.util.*;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
public class CartesianProductTest {
@Test
public void test() {
Set<String> a = new HashSet<>(Arrays.asList("a", "b", "c"));
Set<String> b = new HashSet<>(Arrays.asList("1", "2"));
Set<List<String>> ab = Sets.cartesianProduct(a, b);
assertThat(ab.toString(),
is("[[a, 1], [a, 2], [b, 1], [b, 2], [c, 1], [c, 2]]"));
}
}
</code></pre>
Guava Cache with Removal Listener2017-03-01T00:00:00Z/posts/Guava-Cache/<pre><code class="language-java">package learning;
import com.google.common.base.Ticker;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.RemovalListener;
import com.google.common.cache.RemovalNotification;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class CacheTests {
final Set<String> removed = new HashSet<>();
@Before
public void setup() {
removed.clear();
}
@Test
public void simpleTest() throws Exception {
FakeTicker t = new FakeTicker();
CacheBuilder<String, Boolean> builder = CacheBuilder.newBuilder().expireAfterWrite(10, TimeUnit.MILLISECONDS)
.removalListener(new SimpleRemovalListener()).ticker(t);
Cache<String, Boolean> cache = builder.build();
cache.put("A123", true);
cache.size();
t.advance(11, TimeUnit.MILLISECONDS);
cache.put("A124", true);
cache.put("A125", true);
assertThat(removed.size(), is(1));
}
class SimpleRemovalListener implements RemovalListener {
@Override
public void onRemoval(RemovalNotification notification) {
System.out.println("onRemoval notification=" + notification);
removed.add((String) notification.getKey());
}
}
// http://stackoverflow.com/questions/29990788/guava-ticker-cache-expire
class FakeTicker extends Ticker {
private final AtomicLong nanos = new AtomicLong();
/** Advances the ticker value by {@code time} in {@code timeUnit}. */
public FakeTicker advance(long time, TimeUnit timeUnit) {
nanos.addAndGet(timeUnit.toNanos(time));
return this;
}
@Override
public long read() {
long value = nanos.getAndAdd(0);
System.out.println("is called " + value);
return value;
}
}
}
</code></pre>
git rebase2017-02-07T00:00:00Z/posts/git-clean/<h2>git rebase origin/master puts commits on top</h2>
<ol>
<li>git checkout feature-branch</li>
<li>git fetch</li>
<li>git rebase origin/master
This is better than the <code>git fetch && git merge origin/master</code> because it makes better looking git history logs.</li>
</ol>
<p>So, <a href="https://jonas.github.io/tig/">tig</a>
output looks nice and straight.</p>
<pre><code>2017-03-03 12:06 Matt Payne o [master] [origin/master] Guava is good
2017-03-02 00:10 Matt Payne o Example test. Needs writeup and a bunch of links.
2017-03-03 12:01 Matt Payne o formatting
2017-03-03 12:00 Matt Payne o Yay Guava!
2017-03-02 00:09 Matt Payne o Start at logistic links
2017-02-04 23:46 Matt Payne o Project ideas added.
2017-01-02 23:13 Matt Payne o Better Java
2017-01-01 22:44 Matt Payne o nice icons
2016-12-31 00:26 Matt Payne o c9.io and emberJS
</code></pre>
Better Java?2017-01-02T00:00:00Z/posts/Better-Java/<p><a href="https://www.seancassidy.me/">Sean Cassidy</a>'s <a href="https://github.com/cxxr/better-java">Better Java</a> notes are exciting.</p>
Handy MindMaps Tool2016-12-16T00:00:00Z/posts/mindmaps/<p><a href="http://drichard.org/">David Richard</a> wrote amazing mindmaps software. It was very easy to build and deploy a copy to a
<a href="https://pages.github.com/">gh-pages</a> branch.</p>
<p>One of the manythings I like about David's software is the json export and import.</p>
<p>My frozen in time build is in a github page at <a href="https://payne.github.io/mindmaps/">https://payne.github.io/mindmaps/</a></p>
<p>What do you like for mind mapping?</p>
I wish everyone had this fund2016-09-25T00:00:00Z/posts/f-off-fund/<p>This is <a href="https://thebillfold.com/a-story-of-a-fuck-off-fund-648401263659#.igevrxz1e">an amazing and powerful story</a> by <a href="https://twitter.com/pauletteperhach">Paulette Perhach</a>. Please read the whole thing. It is inspiring.</p>
<blockquote>
<p>"Wait. This story sucks. If it were one of those Choose Your Own Adventures, here’s where you’d want to flip back, start over, rewrite what happens to you."</p>
</blockquote>
<p>I think it is important to talk with each other about money.</p>
<p><a href="http://www.huffingtonpost.com/paulette-perhach/a-story-of-a-fuck-off-fund_b_9065308.html">Story posted at Huffington Post</a></p>
ffmpeg in Scotch Box2016-09-24T00:00:00Z/posts/2016-09-24---ffmpeg-in-scotch-box/<p><a href="https://box.scotch.io/">"Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time."</a></p>
<p>But it doesn't come with <a href="https://ffmpeg.org/">ffmpeg</a>. While working small project taking the sound from one video and "pasting" it onto a video that just shows the presenting monitor,
<a href="http://stackoverflow.com/questions/12938581/ffmpeg-mux-video-and-audio-from-another-video-mapping-issue">stack overflow said</a>
to do this:</p>
<pre><code>ffmpeg -i presentation_monitor_no_sound.mp4 -i room_video_and_audio.mp4 -c copy -map 0:0 -map 1:1 -shortest output.mp4
</code></pre>
<p>and it worked great!</p>
<p><a href="http://stackoverflow.com/questions/12938581/ffmpeg-mux-video-and-audio-from-another-video-mapping-issue"><img src="/static/img/ffmpeg_diagram_2016_09_24.png" alt="title" /></a>
Scotch Box comes with a lot of great stuff, but no ffmpeg. Since Scotch Box is running Ubuntu 14.04 LTS (Trusty Tahr).<br />
It took a few minutes to install ffmpeg. Here's a note to my future self on google helped me discover how to do it.</p>
<ol>
<li>apt-get install ffmpeg
<ol>
<li>this failed.</li>
</ol>
</li>
<li>cat /etc/issue
<ol>
<li>this shows that it's Ubuntu 14.04. This allowed for googling that pointed to:</li>
</ol>
</li>
<li>add-apt-repository ppa:mc3man/trusty-media</li>
<li>apt-get update</li>
<li>echo $?</li>
<li>apt-get install ffmpeg
<ol>
<li>Things worked this time :-)</li>
</ol>
</li>
</ol>
Free Learning?2016-09-10T00:00:00Z/posts/free-learning/<p>I too am a big fan of both
<a href="https://www.freecodecamp.com">FreeCodeCamp.com</a> and
<a href="https://www.lynda.com">Lynda.com</a>.<br />
The <a href="https://www.youtube.com/playlist?list=PLWKjhJtqVAbmfoj2Th9fvxhHIeqFO7wOy">Computer Science and Software Engineering Theory with Briana</a> are fantastic! I like that they are small and well labeled. They can be watched in order or you can just jump to what you want to learn.</p>
<h2>Other free learning resources I've seen include:</h2>
<p>I'm mostly interested in software development.</p>
<p><a href="https://www.youtube.com/watch?v=qZKvZzRynLE">How to teach yourself code</a> is a 17 minute interview that contains some wonderful advice. I have put my notes from this video in a post about <a href="http://mattpayne.org/learning/2016/09/10/teach-yourself-code.html">teach yourself code</a>.</p>
<h3>Web applications</h3>
<ol>
<li><a href="http://codingbat.com/">CodingBat</a></li>
<li><a href="https://www.codewars.com/">CodeWars</a> horrible name, nice website.</li>
<li><a href="https://www.codingame.com/home">CodinGame.com</a> much better name!</li>
</ol>
<h3>Blogs and videos</h3>
<ol>
<li><a href="http://www.leveluplunch.com/">Level Up Lunch</a></li>
<li><a href="http://www.baeldung.com/category/weekly-review/">Java Web Weekly Review from Baeldung</a></li>
</ol>
<h3>Software to download</h3>
<ol>
<li><a href="http://exercism.io/">exercism.io</a></li>
</ol>
Teach Yourself Code2016-09-10T00:00:00Z/posts/2016-09-10-teach-yourself-code/<p>If you have the money, buy some education! It will accelerate your learning.</p>
<p><a href="https://www.youtube.com/watch?v=qZKvZzRynLE">“How to Teach Yourself Code”</a> makes five points:</p>
<ol>
<li>Code Everyday
<ol>
<li><a href="http://ejohn.org/blog/write-code-every-day/">Write Code Every Day by John Resig</a></li>
<li>Build up intrinsic motivation where you feel your work is its own reward.</li>
<li>Focus on three days in a row</li>
<li>Focus on three weeks in a row</li>
<li>Focus on three months in a row — then it’s a habit!</li>
<li>Can always fall off of a habit. Then get back on!</li>
<li><a href="http://pomodorotechnique.com/">Pomodoro Technique</a>
<ol>
<li>30 minutes — 25 minutes then five minute break</li>
<li>Once in the zone, may not want/need a break.</li>
<li>Start with three consecutive days of pomodoro</li>
</ol>
</li>
</ol>
</li>
<li>Hang out with other people who code
<ol>
<li>Critical for building intrinsic motivation</li>
<li>Feel accountable to them. Want to report good things about writing programs.</li>
<li>Pair programming</li>
<li>The meet up hack
<ol>
<li>Like insects — they are just as scared of you as you are of them.</li>
</ol>
</li>
<li>Momentum is a big deal!!</li>
</ol>
</li>
<li>The tools really don’t matter. What matters is working — producing programs.
<ol>
<li>Don’t get hung up on tools. This is a common way to procrastinate that doesn’t feel like procrastinating.</li>
</ol>
</li>
<li>Don’t worry what to build. Focus on how to build it.</li>
<li>Contribute to open source (Legacy Code).</li>
</ol>
Gradle Intro2013-10-23T00:00:00Z/posts/gradle-intro/<p><a href="http://payne.github.io/GradleIntro2013">Slides for Gradle Introduction</a> are not the best talk I've ever given. There are a few handy things in there....</p>
Stoicism - dichotomy of control2012-06-22T00:00:00Z/posts/Stoicism/<p>Stoicism is very attractive.</p>
<p>There are <a href="https://dailystoic.com/what-is-stoicism-a-definition-3-stoic-exercises-to-get-you-started/">articles</a> and <a href="https://www.amazon.com/gp/product/B0040JHNQG/">books</a> about stoicism.</p>
<p>This post is for me to keep some tidbits about stoicism.</p>
<h3>YouTube Videos</h3>
<ol>
<li><a href="https://youtu.be/Sbgpjcf-i8I">Stoicism in The Shawshank Redemption – Meditations I.</a></li>
<li><a href="https://youtu.be/tXi5J6NH_mw">Stoicism in Gladiator – Meditations II.</a></li>
</ol>