<?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: darcylol</title>
    <description>The latest articles on DEV Community by darcylol (@darcylol).</description>
    <link>https://dev.to/darcylol</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3031002%2Fe55eec49-c2d6-42f5-8559-9413cb5b3003.png</url>
      <title>DEV Community: darcylol</title>
      <link>https://dev.to/darcylol</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darcylol"/>
    <language>en</language>
    <item>
      <title>Starting as a junior engineer when AI is already in the room</title>
      <dc:creator>darcylol</dc:creator>
      <pubDate>Wed, 01 Jul 2026 10:43:54 +0000</pubDate>
      <link>https://dev.to/darcylol/starting-as-a-junior-engineer-when-ai-is-already-in-the-room-4g7p</link>
      <guid>https://dev.to/darcylol/starting-as-a-junior-engineer-when-ai-is-already-in-the-room-4g7p</guid>
      <description>&lt;p&gt;The other day, I had this epiphany: AI is like gravity.&lt;/p&gt;

&lt;p&gt;Before the AI era, programming felt a bit like cross-country skiing. Your distance and speed depend almost entirely on your own skills, and quad muscles of course🙃. After the AI era, programming started to feel more like Alpine skiing. Gravity is there for everyone. You can use it to accelerate, carve a smooth line, and make a fast run with much less effort. It feels powerful.&lt;/p&gt;

&lt;p&gt;Or you can injure yourself because you lose control. A classic theme.&lt;/p&gt;

&lt;p&gt;In my case, I have experienced both. Gravity did not always work in my favour when skiing, and AI has definitely backstabbed me a few times while coding.&lt;/p&gt;

&lt;p&gt;I started my first software engineering job at the beginning of 2025. AI is not the full picture of software engineering, but it is impossible to pretend it is not part of the picture at all. So instead of asking whether AI is good or bad for junior engineers, I have been thinking more about the moments when I feel grateful to have this tool, and the moments when I am relieved that it is not smart enough to take the decision-making away from me.&lt;/p&gt;




&lt;h3&gt;
  
  
  When AI has been helpful
&lt;/h3&gt;

&lt;p&gt;As juniors, we often feel intimidated about asking senior engineers “stupid” questions. Questions about syntax. Questions about the use case of a specific method. Questions about errors caused by a misspelled word or a missing keyword.&lt;/p&gt;

&lt;p&gt;In those moments, I could direct those very basic questions to AI without worrying that I was bothering someone else. When you are in your first software engineering job, you genuinely do not know much, yet. Having a tool that can help demystify syntax, explain a method, or point out a simple mistake is immensely useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  When AI has made me feel privileged
&lt;/h3&gt;

&lt;p&gt;Another big lesson I have learned is that your dependencies are essentially part of your code. It is your responsibility to understand whether they are fit for purpose and whether they might break your application.&lt;/p&gt;

&lt;p&gt;Here, AI has been genuinely useful as well. It has helped me read and analyse the codebases of dependencies. In Rails, you can run &lt;code&gt;bundle open gem_name&lt;/code&gt; to inspect the source code of a gem you are using. I have always been curious about how things work behind the scenes, and I like digging deeper. Reading the source code has helped me understand edge cases, exceptions, and the cost of certain methods.&lt;/p&gt;

&lt;p&gt;The depth and breadth of high-quality code that AI helps me make sense of at this early stage of my engineering career makes me feel privileged.&lt;/p&gt;

&lt;h3&gt;
  
  
  When AI made me feel powerful
&lt;/h3&gt;

&lt;p&gt;It also made me feel that there were fewer problems that were “too junior” to tackle(although company culture plays a big part in that too). With the help of AI, I was able to write more complex code, adopt more ambitious strategies, and push more changes than I probably would have attempted otherwise.&lt;/p&gt;

&lt;h3&gt;
  
  
  When AI helped me move too fast
&lt;/h3&gt;

&lt;p&gt;Obviously there have been back stabbing moments.&lt;/p&gt;

&lt;p&gt;One time, I was working on optimising background jobs by adding a layer of verification around API responses. From what I had previously tested, and from what is generally true in many examples, a 200 response code usually means a successful response with useful data that we can process. A 400+ response usually means something has gone wrong, and there is not much useful data in the response body.&lt;/p&gt;

&lt;p&gt;I tested this flow with one API and it worked really well. Then I asked AI to help me apply the same pattern to a dozen other APIs. Since the pattern had already been proven correct once, I felt quite confident. I pushed my PR for my colleagues to review.&lt;/p&gt;

&lt;p&gt;Huge thanks to a colleague who actually tested the code in her environment, I realised the assumption did not hold everywhere. Some APIs return partial error responses in a different way. Even when the request is bad, or when the requested resource does not exist, they can still return a 200 response code, with the error described inside the response body itself.&lt;/p&gt;

&lt;p&gt;That mistake humbled me. It taught me several important lessons:&lt;/p&gt;

&lt;p&gt;First, even in the age of AI, never skip the most basic habit of programming: always, always test your code in your own environment.&lt;/p&gt;

&lt;p&gt;Second, do not over-generalise a problem just because AI makes it easy to produce a large amount of code. It is tempting to become ambitious and “complete” more than the task actually requires. &lt;/p&gt;

&lt;p&gt;Third, my own engineering abilities define how far I can safely leverage AI. If AI produces something far beyond my ability to maintain, reason about, or truly understand, then it has not made me more capable. &lt;/p&gt;

&lt;p&gt;Back to my ski metaphor, it has simply placed me on a piste beyond my current ability. Well technically, you can always get down the mountain right? But hey at what cost?🤷🏻‍♀️&lt;/p&gt;

&lt;h3&gt;
  
  
  When I was glad that AI didn't take that from me
&lt;/h3&gt;

&lt;p&gt;There have also been moments when I was grateful that AI did not do the thinking for me.&lt;/p&gt;

&lt;p&gt;One of the biggest learning moments I had came from a task where I needed to write a long background job. The job had to filter users based on several different criteria and use Action Mailer to send a customised monthly report email. At first, I wrote everything inside one huge job. Then I moved on to writing tests and immediately got stuck. I did not know where to start testing the whole thing.&lt;/p&gt;

&lt;p&gt;During a coffee break, some object-oriented programming fundamentals and the Model-View-Controller pattern suddenly popped into my head. I realised there was a much better way to structure the code.&lt;/p&gt;

&lt;p&gt;I broke the different user criteria down into smaller methods, scopes in Rails terms, and moved them into the model layer. I created an Action Mailer to handle the email logic. By the end of the refactoring, the job itself was only a few lines long, simply assembling all the pieces together.&lt;/p&gt;

&lt;p&gt;It felt as satisfying as building a Lego set.&lt;/p&gt;

&lt;p&gt;I do not think this experience is unique. There is no real shortcut to comprehending something conceptual. It is by immersing yourself in the code, getting stuck, and constantly challenging whether there is a better way that you start to develop the so call "taste" and "instinct" in software design.&lt;/p&gt;

&lt;p&gt;Had AI simply spoon-fed me the right answer from the beginning, I probably wouldn't have learned that lesson as deeply. &lt;/p&gt;




&lt;p&gt;I wanted to write about my journey of changing jobs as a software engineer because I have just completed my first software engineering role. Mumbling this experience is my way of processing the complex feelings that came with saying goodbye to this job.&lt;/p&gt;

&lt;p&gt;I also recently attended &lt;a href="https://brightonruby.com/" rel="noopener noreferrer"&gt;Brighton Ruby&lt;/a&gt;(for Rubyists in the UK or beyond, I highly recommend that) , where I joined a workshop discussion about AI. During that conversation, some people mentioned that juniors are drowning. Others questioned whether it is still meaningful to recruit juniors at this stage.&lt;/p&gt;

&lt;p&gt;Well, I can only speak from my own experience. To me, it is not a replacement for learning. It is not a shortcut to judgement. But it is a new force in the environment, like gravity on a mountain.&lt;/p&gt;

&lt;p&gt;And you still need to learn how to ski, metaphorically. You really should.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>career</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Many ways to express one thing in Ruby (_n syntax, _ prefix, &amp; ampersand)</title>
      <dc:creator>darcylol</dc:creator>
      <pubDate>Tue, 08 Apr 2025 21:55:50 +0000</pubDate>
      <link>https://dev.to/darcylol/many-ways-to-express-one-thing-in-ruby-n-syntax-prefix-ampersand-2h0j</link>
      <guid>https://dev.to/darcylol/many-ways-to-express-one-thing-in-ruby-n-syntax-prefix-ampersand-2h0j</guid>
      <description>&lt;p&gt;Today, coding in Ruby reminds me of the days when I was learning French. I wasn’t bad at expressing myself, but I struggled with vocabulary. One day, I needed to draft a professional email in French. After spending hours checking my grammar and searching for the right words, I hoped my language teacher would give me the green light to send it out.&lt;/p&gt;

&lt;p&gt;While she acknowledged that I had conveyed the meaning correctly, she also pointed out that I was repeating myself. She then introduced me to different ways to say the same thing, just to avoid using the same word.&lt;/p&gt;

&lt;p&gt;Below is an example of expressing the same thing in many ways in Ruby. This is an array of arrays, where each inner array contains a date and a volume value. Our goal is to calculate the total volume. &lt;br&gt;
&lt;code&gt;[["2025-05", 1400], ["2025-04", 4200], ["2025-03", 3100]]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here are a few ways to do that in Ruby:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Deconsctructure manually by assigning variables to each element&lt;br&gt;
&lt;code&gt;total_volume = data.sum { |date, volume| volume }&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deconsctructure manually and only assign variable that you are going to use. '_' in this context is considered as a thrown-away or not-used element&lt;br&gt;
&lt;code&gt;total_volume = data.sum { | _, volume | volume }&lt;/code&gt;&lt;br&gt;
You can use chain map and sum.&lt;br&gt;
&lt;code&gt;total_volume = data.map { | _, volume | volume }.sum&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deconsctructure and make use of numbered parameter. Ruby reads the patter of each inner array (e.g ["2025-05", 1400]), first element("2025-05") as _1, second element (1400) as _2. &lt;br&gt;
&lt;code&gt;total_volume = data.sum { _2 }&lt;/code&gt;&lt;br&gt;
reference: &lt;a href="https://ruby-doc.org/core-2.7.0/Proc.html#class-Proc-label-Numbered+parameters" rel="noopener noreferrer"&gt;https://ruby-doc.org/core-2.7.0/Proc.html#class-Proc-label-Numbered+parameters&lt;/a&gt;&lt;br&gt;
It felt odd, but saving time and space to name your variable in an iteration. Why not? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here is the part when things get "Frenchy"(aka inconsistent and full of exceptions). Let's say now the data I need to deal with changes to&lt;br&gt;
&lt;code&gt;new_data = [[1400, "2025-05"], [4200, "2025-04"], [3100, "2025-03"]]&lt;/code&gt;. &lt;br&gt;
Now the volume is the first element of each inner array, and we want to sum all those volumes.&lt;br&gt;
From what we learned earlier, it might feel natural to write:&lt;br&gt;
&lt;code&gt;total_volume = new_data.sum { _1 }&lt;/code&gt;&lt;br&gt;
But nope! ❌ Since there is only 1 parameter, the destructuring magic disappears and _1 just gives you the whole pair, not the first item in the pair([1400, "2025-05"]). &lt;br&gt;
Hence if you are only passing _1 in the block, you have to index into the array explicitly. Like this:&lt;br&gt;
&lt;code&gt;total_volume = data.sum { _1[0]}&lt;/code&gt;&lt;br&gt;
To go back to the example at the beginning of the article, you can write below to achieve the same result&lt;br&gt;
&lt;code&gt;total_volume = data.sum { _1.last}&lt;/code&gt;&lt;br&gt;
Confusing! Isn't it? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &amp;amp; ampersand operator to represent the iterating element. Note: This approach calls a method on the element, so use : instead of .&lt;br&gt;
&lt;code&gt;total_volume = data.sum(&amp;amp;:last)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;total_volume = data.map(&amp;amp;:last).sum&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ruby 4.0 introduces another possibility using &lt;code&gt;it&lt;/code&gt;, which is like a variable automatically assigned to call the iteracted item.&lt;br&gt;
&lt;code&gt;total_volumn = data.sum { it.last }&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ruby often feels like a language built on the motto:&lt;br&gt;
“There should be many -- and sometimes too many ways to do it, implicit or explicitly.”&lt;/p&gt;

&lt;p&gt;(Yes I am trying to contradict the Zen of Python: "there should be one-- and preferably only one --obvious way to do it")&lt;/p&gt;

&lt;p&gt;I like shortcuts. I like flexibility. But I’m not always convinced a language needs so many different ways to say the same thing. Ideally, I’d rather use a language to express many different ideas.&lt;/p&gt;

&lt;p&gt;So, what about you?&lt;/p&gt;

&lt;p&gt;What’s your favourite (or least favourite) Ruby shorthand? And if you code in another language, does it offer similar shortcuts?&lt;/p&gt;

&lt;p&gt;Let’s chat 👇&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>rails</category>
    </item>
  </channel>
</rss>
