<strong>Topics covered in this episode:</strong><br>
<ul>
<li><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"><strong>Joining Strings in Python: A</strong></a><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"> </a><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"><strong>"Huh"</strong></a><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"> <strong>Moment</strong></a></li>
<li><a href="https://www.mensurdurakovic.com/hard-to-swallow-truths-they-wont-tell-you-about-software-engineer-job/">10 hard-to-swallow truths they won't tell you about software engineer job</a></li>
<li><a href="https://www.xlwings.org/blog/my-thoughts-on-python-in-excel"><strong>My thoughts on Python in Excel</strong></a></li>
<li><strong>Extra, extra, extra</strong></li>
<li><strong>Extras</strong></li>
<li><strong>Joke</strong></li>
</ul><a href='https://www.youtube.com/watch?v=Xi9FM1pZQZ0' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="390">Watch on YouTube</a><br>
<p><strong>About the show</strong></p>
<p>Sponsored by ScoutAPM: <a href="https://pythonbytes.fm/scout"><strong>pythonbytes.fm/scout</strong></a></p>
<p><strong>Connect with the hosts</strong></p>
<ul>
<li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li>
<li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li>
<li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li>
</ul>
<p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too.</p>
<p>Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it. </p>
<p><strong>Brian #1:</strong> <a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"><strong>Joining Strings in Python: A</strong></a><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"> </a><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"><strong>"Huh"</strong></a><a href="https://berglyd.net/blog/2024/06/joining-strings-in-python/"> <strong>Moment</strong></a></p>
<ul>
<li>Veronica Berglyd Olsen</li>
<li><p>Standard solution to “read lines from a file, do some filtering, create a multiline string”:</p>
<pre><code>f = open("input_file.txt")
filtered_text = "\n".join(x for x in f if not x.startswith("#"))
</code></pre></li>
<li><p>This uses a generator, file reading, and passes the generator to join.</p></li>
<li><p>Another approach is to add brackets and pass that generator to a list comprehension:</p>
<pre><code>f = open("input_file.txt")
filtered_text = "\n".join([x for x in f if not x.startswith("#")])
</code></pre></li>
<li><p>At first glance, this seems to just be extra typing, but it’s actually faster by 16% on CPython due to the implementation of .join() doing 2 passes on input if passed a generator. </p>
<ul>
<li>From Trey Hunner: “I do know that it’s not possible to do 2 passes over a generator (since it’d be exhausted after the first pass) so from my understanding, the generator version requires an extra step of storing all the items in a list first.”</li>
</ul></li>
</ul>
<p><strong>Michael #2:</strong> <a href="https://www.mensurdurakovic.com/hard-to-swallow-truths-they-wont-tell-you-about-software-engineer-job/">10 hard-to-swallow truths they won't tell you about software engineer job</a></p>
<ol>
<li>College will not prepare you for the job</li>
<li>You will rarely get greenfield projects</li>
<li>Nobody gives a BLANK about your clean code</li>
<li>You will sometimes work with incompetent people</li>
<li>Get used to being in meetings for hours</li>
<li>They will ask you for estimates a lot of times</li>
<li>Bugs will be your arch-enemy for life</li>
<li>Uncertainty will be your toxic friend</li>
<li>It will be almost impossible to disconnect from your job</li>
<li>You will profit more from good soft skills than from good technical skills</li>
</ol>
<p><strong>Brian #3:</strong> <a href="https://www.xlwings.org/blog/my-thoughts-on-python-in-excel"><strong>My thoughts on Python in Excel</strong></a></p>
<ul>
<li>Felix Zumstein</li>
<li>Interesting take on one person’s experience with trying Python in Excel.</li>
<li>“We wanted an alternative to VBA, but got an alternative to the Excel formula language”</li>
<li>“Python runs in the cloud on Azure Container Instances and not inside Excel.”</li>
<li>“DataFrames are great, but so are NumPy arrays and lists.”</li>
<li>… lots of other interesting takaways.</li>
</ul>
<p><strong>Michael #4:</strong> <strong>Extra, extra, extra</strong></p>
<ul>
<li><a href="https://www.codeinacastle.com/python-zero-to-hero-2024?utm_source=pythonbytes">Code in a castle</a> - Michael’s Python Zero to Hero course in Tuscany</li>
<li><a href="https://www.bleepingcomputer.com/news/security/polyfillio-javascript-supply-chain-attack-impacts-over-100k-sites/">Polyfill.io JavaScript supply chain attack impacts over 100K sites</a>
<ul>
<li>Now required reading: <a href="https://blog.wesleyac.com/posts/why-not-javascript-cdn">Reasons to avoid Javascript CDNs</a></li>
</ul></li>
<li><a href="https://arstechnica.com/security/2024/06/mac-info-stealer-malware-distributed-through-google-ads/">Mac users served info-stealer malware through Google ads</a></li>
<li><a href="https://fosstodon.org/@mkennedy/112712603915775986">HTMX for the win</a>!</li>
<li>ssh to <a href="https://www.shellhacks.com/ssh-execute-remote-command-script-linux/">run remote commands</a>
<pre><code>> ssh user@server "command_to_run --arg1 --arg2"</code></pre></li>
</ul>
<p><strong>Extras</strong> </p>
<p>Brian:</p>
<ul>
<li><a href="https://ludic.mataroa.blog/blog/i-will-fucking-piledrive-you-if-you-mention-ai-again/?utm_source=pocket_shared">A fun </a><a href="https://ludic.mataroa.blog/blog/i-will-fucking-piledrive-you-if-you-mention-ai-again/">reaction</a><a href="https://ludic.mataroa.blog/blog/i-will-fucking-piledrive-you-if-you-mention-ai-again/?utm_source=pocket_shared"> to AI </a>- I will not be showing the link on our live stream, due to colorful language.</li>
</ul>
<p>Michael:</p>
<ul>
<li><a href="https://talkpython.fm/castle">Coding in a Castle</a> Developer Education Event</li>
<li><a href="https://www.bleepingcomputer.com/news/security/polyfillio-javascript-supply-chain-attack-impacts-over-100k-sites/">Polyfill.io JavaScript supply chain attack impacts over 100K sites</a>
<ul>
<li>See <a href="https://blog.wesleyac.com/posts/why-not-javascript-cdn">Reasons to avoid Javascript CDNs</a></li>
</ul></li>
</ul>
<p><strong>Joke:</strong> <a href="https://www.reddit.com/r/programminghumor/comments/1dkfm5p/html/">HTML Hacker</a></p>
↧