<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yosh</title>
    <description>The latest articles on DEV Community by Yosh (@yoshed-it).</description>
    <link>https://dev.to/yoshed-it</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2126923%2F4489770a-d808-44c5-85bd-9fade94301c3.jpg</url>
      <title>DEV Community: Yosh</title>
      <link>https://dev.to/yoshed-it</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yoshed-it"/>
    <language>en</language>
    <item>
      <title>List Comprehension and Regae</title>
      <dc:creator>Yosh</dc:creator>
      <pubDate>Thu, 26 Sep 2024 22:14:32 +0000</pubDate>
      <link>https://dev.to/yoshed-it/list-comprehension-and-regae-4ne6</link>
      <guid>https://dev.to/yoshed-it/list-comprehension-and-regae-4ne6</guid>
      <description>&lt;h2&gt;
  
  
  Ah. The moment I've been dreading.
&lt;/h2&gt;

&lt;p&gt;The first post with my own thoughts, opinions, and possible knowledge breakdown.&lt;/p&gt;

&lt;p&gt;Mind you, dear reader, this is not a deep dive or an incredible breakdown of Python's ability to one-line a for-loop, append to a list, and return some data. No, no. This is just showcasing how fun—and how dumb—little things can come together to make something dumber... yes... but also kind of neat.&lt;/p&gt;

&lt;p&gt;So, let's light this dumpster fire! Hooray!&lt;/p&gt;




&lt;h2&gt;
  
  
  A Story:
&lt;/h2&gt;

&lt;p&gt;In my younger days, working at a summer camp, learning the ways of being young and from a famously hippie-esque island... I heard a song. Man, was it catchy. Not Justin Bieber catchy, but catchy nonetheless. A song I never knew would have a significant impact on how I started to learn to write code. A song named... &lt;strong&gt;"Pass the Dutchie."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, you might be thinking, "What the shit does a reggae song have to do with programming?" All ears, please.&lt;/p&gt;




&lt;h2&gt;
  
  
  Passing the Dutchie... List Comprehension Style:
&lt;/h2&gt;

&lt;p&gt;If you're like me, list comprehensions might have looked like some wizard-science, one-liner that’s supposed to "simplify" everything. That sweet, sweet "Pythonic" way. But instead, it had me feeling like my brain cogs were kind of grinding to a halt (You ever lean into the monitor and squint? - Yeah... exactly).&lt;/p&gt;

&lt;p&gt;It was like I was being asked to pass some mystical, magical "dutchie" (cough.. variable.. cough) to the left-hand side, but I had no idea what I was passing, where it was going, or why it mattered. (Okay, I did, but for the sake of the story...)&lt;/p&gt;

&lt;p&gt;Let me break it down: &lt;strong&gt;list comprehensions&lt;/strong&gt; are all about passing things along, just like in the song. It’s a way to filter and transform lists, all in one neat line. You should see some of the coding horrors I've written just for the sake of &lt;em&gt;"hey look, I shoved it into 1 line of code! Points for Gryffindor!"&lt;/em&gt; which I'm SURE most of y'all can relate to,(I really prefer multiple lines of code, ya know... readability).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why List Comprehensions Matter:&lt;/strong&gt; Instead of using multiple lines of loops and &lt;code&gt;append()&lt;/code&gt; methods, list comprehensions allow you to write concise, readable code in fewer lines. They’re often faster, too, making them a favorite tool for Python devs when working with lists.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;So... for those of us who may or mayn't or may've (wow, autocorrect just took me for a wild ride there), I give you my brain's solution to understanding the most basic of basic list comprehension:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;left_hand_side&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dutchie&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;pon the left hand side&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;catchyReggaeFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lyrics&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;where_the_dutchie_is_passed_to&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pass the &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pon_the&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; pon the left hand side&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pon_the&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;lyrics&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;pon_the&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dutchie&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;where_the_dutchie_is_passed_to&lt;/span&gt;

&lt;span class="n"&gt;printer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;catchyReggaeFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left_hand_side&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;printer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;['pass the dutchie pin the left hand side']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point of this silly example is to show that list comprehensions are all about passing things along—just like the dutchie. In this case, I’m filtering out "dutchie" from the list and passing it into the new list.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Takeout... er, Takeaway:
&lt;/h2&gt;

&lt;p&gt;If you’re struggling with abstract concepts like list comprehensions—you’re not alone. Everyone starts out feeling like this stuff is wizard-level magic, but it starts to make sense after a while. Like the chorus of a catchy song, once you hear it enough, it sticks.&lt;/p&gt;

&lt;p&gt;So there it is: my journey from confusion to understanding list comprehensions, one dutchie at a time.&lt;/p&gt;

&lt;p&gt;Now, didn't we all have a good time?&lt;/p&gt;

</description>
      <category>python</category>
      <category>discuss</category>
      <category>coding</category>
      <category>learning</category>
    </item>
    <item>
      <title>Whelp. Here I am.</title>
      <dc:creator>Yosh</dc:creator>
      <pubDate>Thu, 26 Sep 2024 19:07:58 +0000</pubDate>
      <link>https://dev.to/yoshed-it/whelp-here-i-am-27b1</link>
      <guid>https://dev.to/yoshed-it/whelp-here-i-am-27b1</guid>
      <description>&lt;p&gt;That’s right, folks. I’ve joined the &lt;em&gt;dozens&lt;/em&gt; of bloggers out there on the interwebs. I’m here to preach the gospel of Yosh (that’s me, by the way).&lt;/p&gt;

&lt;p&gt;So, I guess I should properly introduce myself to the world:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sup. I’m Yosh.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I grow up, I wanna be a programmer (at least until the neurodivergence kicks in and I decide I wanna be a potter, cobbler, or landlord—I have a passion for painting over door handles). What kind, you ask? Hell if I know! Right now, I’m just trying to soak up as much as I can about everything. I do have a soft spot for Python, Security, and shiny things like design, 3D, cloud, and AI. Yeah, I’m all over the place.&lt;/p&gt;

&lt;p&gt;After years of slinging pans in the kitchen, I decided to make the leap into coding and went through a bootcamp in '19 (right before the world went completely sideways -- Go Pandemics!). Sure, I fell off the coding wagon for a bit and ended up back in the kitchen, but now I’m back at it—giving the tech world my best shot. Have I cracked the job market yet? No. But hey, persistence is key, right? Or at least that’s what they keep telling me.&lt;/p&gt;

&lt;p&gt;This is my first-ever real blog (RIP to my tragic Myspace posts about love lost and bad punk rock). So, bear with me.&lt;/p&gt;

&lt;p&gt;And now, for your reading pleasure, here’s a bit about me… in limerick form:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There once was a chef named Yoshi,&lt;br&gt;
Whose dishes were never too flashy.&lt;br&gt;
He slaved at the stove,&lt;br&gt;
But to code he did strove,&lt;br&gt;
And now writes a blog that’s quite trashy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Aside from that &lt;em&gt;chef’s kiss&lt;/em&gt; limerick, you can expect me to throw in whatever I’m learning aboot (aka struggling with), probably some bitchy and sarcastic commentary about UI design I hate, and a rant or two about JavaScript (we all know it’s a hot mess... but I should learn it... and I do like it...). If you’re lucky, I might even toss in a recipe or two, all while dreaming of my sitcom spin-off.&lt;/p&gt;

&lt;p&gt;Despite all of the above (you did read it, right?), I’m actually pretty stoked to show my future employers (who, dear god, I hope are plotting my onboarding), my friends (yep, I have a few!), my wife, and my dog/cat that I can actually stick with a project. Plus, maybe show a little bit of accountability for the first time in my life.&lt;/p&gt;

&lt;p&gt;Anywho, thanks for letting me ramble. Wait… scratch that. Thank me. I’m thanking myself.&lt;/p&gt;

&lt;p&gt;That was cathartic as fuck.&lt;/p&gt;

&lt;p&gt;So stick around, probably-not-sports-fans, and join me next time as I wrestle with something that &lt;em&gt;seems&lt;/em&gt; simple but turns my brain into spaghetti. Maybe I’ll nail it—or at least have a good rant lined up. Either way, it’s gonna be fun.!&lt;/p&gt;

&lt;p&gt;Smooches,&lt;br&gt;
Yosh&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the year of our AI Overlords, 2023, September 26th&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>python</category>
    </item>
  </channel>
</rss>
