<?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: Ian</title>
    <description>The latest articles on DEV Community by Ian (@heratyian).</description>
    <link>https://dev.to/heratyian</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%2F920827%2F5224e317-8ed5-4d8e-8af5-ebaf31345916.jpeg</url>
      <title>DEV Community: Ian</title>
      <link>https://dev.to/heratyian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/heratyian"/>
    <language>en</language>
    <item>
      <title>Science of Rapid Skill Acquisition</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Mon, 30 Jun 2025 15:17:39 +0000</pubDate>
      <link>https://dev.to/heratyian/science-of-rapid-skill-acquisition-1e0e</link>
      <guid>https://dev.to/heratyian/science-of-rapid-skill-acquisition-1e0e</guid>
      <description>&lt;h1&gt;
  
  
  Mastering New Skills: Insights from The Science of Rapid Skill Acquisition by Peter Hollins
&lt;/h1&gt;

&lt;p&gt;I recently finished reading The Science of Rapid Skill Acquisition by Peter Hollins. This insightful guide explores strategies to acquire new skills both strategically and effectively. Many of the book's recommendations resonate with techniques I've honed through years of study and personal development. Others align with methods I've intuitively developed in my roles as an English teacher in China and a software development educator. Additionally, there are some suggestions I’ve often neglected due to ingrained habits—perhaps it's time to reconsider! 😅&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Learning Goals (And Why They Matter)
&lt;/h2&gt;

&lt;p&gt;Having a clear purpose guides and focuses your learning journey.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Learning Spanish&lt;/strong&gt;: Is your why to make new friends, read Don Quixote in its original language, or become a tango dancer in Argentina?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most significant skills require personal sacrifice—you’ll need to give up something to achieve them. Understanding your motivation helps maintain commitment and direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Active vs. Reflective Learning
&lt;/h2&gt;

&lt;p&gt;Active learning techniques, such as using flashcards, are highly effective. Merely reading notes passively isn't sufficient. Quizzing yourself helps identify gaps in your knowledge. Practice quizzes are invaluable, and with tools like ChatGPT, you can create customized quizzes based on your textbook or prompts, and even have your answers graded automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Strategic Planning
&lt;/h2&gt;

&lt;p&gt;Research Resources: Find materials that best fit your learning style and goals.&lt;br&gt;
Schedule Study Time: Consistency is key. Allocate specific times for studying to build a routine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequency vs. Duration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Cramming&lt;/strong&gt;: Short, frequent study sessions are more effective than long, infrequent ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Increase Review Frequency&lt;/strong&gt;: Regularly revisiting material helps reinforce learning better than extended single sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Interleaving
&lt;/h2&gt;

&lt;p&gt;Our brains naturally shift between different ideas. Instead of studying the same topic repeatedly (e.g., AAA BBB CCC), interleave different aspects of a skill (e.g., ABC ACB). This approach enhances understanding and retention.&lt;/p&gt;

&lt;h2&gt;
  
  
  Skill Stacking
&lt;/h2&gt;

&lt;p&gt;You don’t need to master one skill to excel. It's really competitive to be the best top 1% in any given skill. Instead, be proficient in several related skills to create a unique edge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Example&lt;/strong&gt;: I already speak Chinese, write software, play tennis, have a cat, ride bikes and teach. Building on these existing skills allows me to develop a distinctive skill set that sets me apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem-Based Learning
&lt;/h2&gt;

&lt;p&gt;Elon Musk champions this approach. Traditional education often focuses on teaching tools rather than addressing real-world problems. Instead of just learning about screwdrivers, tackle a problem like fixing a car. This context helps you understand why and how specific tools are used appropriately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embrace Being Uncomfortable
&lt;/h2&gt;

&lt;p&gt;Learning a new skill inherently involves discomfort. Not understanding something can create insecurity, but it's a sign of growth. When you feel uneasy, lean into it and recognize that you're in the process of learning and improving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leveraging Your Environment
&lt;/h2&gt;

&lt;p&gt;Your surroundings can either give you an advantage or present challenges in learning certain skills. For instance, learning ice sculpting in Florida might be more difficult due to the climate, whereas other environments might offer unique opportunities. Also, make sure to surround yourself with people that support your learning goals. You are the average of the 5 people you spend the most time with. Make sure you spend your time with people that support your goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Learning Goals for 2025
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Speak Cantonese Chinese
&lt;/h3&gt;

&lt;p&gt;I already speak Mandarin Chinese so this would be "skill stacking". My wife and in-laws all speak Cantonese with each other. I also live near Chinatown in Chicago where most locals speak Cantonese (leveraging my environment). My "why" is to communicate more effectively with friends and family.&lt;/p&gt;

&lt;h3&gt;
  
  
  Electronics
&lt;/h3&gt;

&lt;p&gt;I am already proficient in developing software, but the hardware level has always been a bit of a mystery ("skill stacking"). I want to dig a bit deeper into the hardware level and understand how electricity works at a basic level. The principles used in electricity are the foundation of modern life. I want to demystify electricity and electronics. My "why" is to build an electronic musical instrument or wearable headset.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Next Steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Research Great Resources&lt;/li&gt;
&lt;li&gt;Set Up a Learning Schedule&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By implementing these strategies, you can accelerate your skill acquisition and achieve your learning goals more efficiently. Happy learning!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lessons from The Inner Game of Tennis</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Mon, 30 Jun 2025 15:17:12 +0000</pubDate>
      <link>https://dev.to/heratyian/lessons-from-the-inner-game-of-tennis-3cci</link>
      <guid>https://dev.to/heratyian/lessons-from-the-inner-game-of-tennis-3cci</guid>
      <description>&lt;p&gt;I just finished reading &lt;a href="https://www.amazon.com/Inner-Game-Tennis-Classic-Performance/dp/0679778314" rel="noopener noreferrer"&gt;The Inner Game of Tennis by W. Timothy Gallwey&lt;/a&gt;, and it’s much more than a tennis guide. It’s a fascinating exploration of how to get out of your own way, find peace regardless of outcomes, and develop a mindset that enhances both athletic performance and enjoyment.&lt;/p&gt;

&lt;p&gt;Many technology thought leaders discuss the concept of a flow state—a state of focused meditation that can be elusive yet transformative. Learning something with concrete focus, like tennis, offers a valuable opportunity to build intuition about broader flow state concepts. In some ways, accessing a flow state feels as abstract yet foundational as imaginary numbers in mathematics.&lt;/p&gt;

&lt;p&gt;I hadn’t realized how much the mental side of sports was a challenge for me until reading this book. Here are some of my key takeaways:&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two Selves: The "Doer" and the "Teller"
&lt;/h2&gt;

&lt;p&gt;Gallwey introduces the idea of two selves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Self 1 - The "teller" that uses language, analysis, and judgment.&lt;/li&gt;
&lt;li&gt;Self 2 - The "doer," a non-verbal genius responsible for executing actions. Self 2 can breathe, pump blood, coordinate muscles, and perform complex physical tasks with incredible precision.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"Getting it together mentally in tennis involves the learning of several internal skills: 1. learning how to get the clearest possible picture of your desired outcomes; 2. learning how to trust Self 2 to perform at its best and learn from mistakes."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Self 2 doesn’t rely on language; it communicates through imagery and intuition. Gallwey emphasizes the importance of respecting Self 2 as an elder mentor and trusting its capabilities. For this to work, Self 1 must focus on creating a clear mental image of the desired outcome, leaving the execution to Self 2.&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-Judgmental Awareness
&lt;/h2&gt;

&lt;p&gt;One of the book’s core principles is cultivating non-judgmental awareness—the art of observing events as they are, without labeling them as “good” or “bad.”&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The first inner skill to be developed in the Inner Game is that of nonjudgmental awareness... the art of letting go the human inclination to judge ourselves and our performance as either good or bad."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my family sporting competitions, we call this "phonics"- adding verbal emotions to what’s happening. We really should be noticing a mistake without attaching frustration or self-criticism. This practice doesn’t mean ignoring errors; it simply means observing events clearly without letting judgment tighten your movements.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Judgment results in tightness, and tightness interferes with the fluidity required for accurate and quick movement. Relaxation produces smooth strokes and results from accepting your strokes as they are, even if erratic."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Relaxed Concentration
&lt;/h2&gt;

&lt;p&gt;Gallwey calls for a state of “relaxed concentration,” where you allow your body and mind to work together harmoniously. When you trust Self 2 and stay at peace with it, you can perform at your best.&lt;/p&gt;

&lt;p&gt;This resonates with my experience using the &lt;a href="https://www.wimhofmethod.com/breathing-exercises" rel="noopener noreferrer"&gt;Wim Hof breathing technique&lt;/a&gt;. Breathing is a powerful centering mechanism that helps cultivate a relaxed flow state. By focusing on your breath, you can let go of distractions and stay present in the moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applying These Lessons Beyond Tennis
&lt;/h2&gt;

&lt;p&gt;The insights from The Inner Game of Tennis extend far beyond sports. By embracing non-judgmental awareness and learning to trust Self 2, I hope to improve not just in tennis, but in all areas of life. Whether it’s work, relationships, or creative pursuits, these techniques offer a pathway to greater flow, performance, and peace of mind.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Keep A Digital Scratchpad</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Mon, 30 Jun 2025 15:15:45 +0000</pubDate>
      <link>https://dev.to/heratyian/keep-a-digital-scratchpad-1koi</link>
      <guid>https://dev.to/heratyian/keep-a-digital-scratchpad-1koi</guid>
      <description>&lt;p&gt;This gives you the benefit of a more detailed record of your daily activity. Anytime you read a blog or code example save the link in your daily notes. Keep code snippets. Have a place to draft ideas.&lt;/p&gt;

&lt;p&gt;I keep my daily notes in markdown. This allows me to easily add code snippets. This also makes it easy to keep in version control (git) and in a cloud repository (bitbucket) for safekeeping. I keep the notes in a folder called notes, with folders for years/months. Every day I create a new file. For example, &lt;code&gt;2020-03–28_notes.md&lt;/code&gt;. They usually have a pretty similar layout.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# todo&lt;/span&gt;
2020-03-28

&lt;span class="gh"&gt;# notes&lt;/span&gt;
Helpful article
www.wfho.me/articles/3

&lt;span class="gh"&gt;# timesheet&lt;/span&gt;
&lt;span class="p"&gt;*&lt;/span&gt; 8-830 write blog
&lt;span class="p"&gt;*&lt;/span&gt; 830-12 work on specific code task
&lt;span class="p"&gt;*&lt;/span&gt; 1-5 meeting with team
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s about it. It’s nice keeping a ‘scratchpad’.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Sharing Your Localhost with Other Devices Easily</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Thu, 30 Nov 2023 17:40:30 +0000</pubDate>
      <link>https://dev.to/heratyian/sharing-your-localhost-with-other-devices-easily-4o5</link>
      <guid>https://dev.to/heratyian/sharing-your-localhost-with-other-devices-easily-4o5</guid>
      <description>&lt;p&gt;Want to show your local website to others on your network, like a co-worker or on your phone? It's simple if you're using Ruby on Rails. Here's how:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Up Rails Server for Network Access&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By default, the Rails server is only visible to your own computer. To let other devices see it, start the server with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails server -b 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes your server accessible to any device on your network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find Your Computer's Network IP Address&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open your terminal and type:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ifconfig | grep 'inet'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You'll see a list. Look for an entry like &lt;code&gt;inet 10.194.110.231 netmask ....&lt;/code&gt; Here, &lt;code&gt;10.194.110.231&lt;/code&gt; is your IP address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Share Your Site&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, other devices can access your site using your IP address followed by :3000 (the default Rails server port). For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;http://10.194.110.231:3000&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Done!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's it! Your site should now be accessible from other devices on the same network.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using :source_location to unpack Rails magic 🪄🎁</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 17 Oct 2023 14:39:19 +0000</pubDate>
      <link>https://dev.to/heratyian/using-sourcelocation-to-unpack-rails-magic-1ble</link>
      <guid>https://dev.to/heratyian/using-sourcelocation-to-unpack-rails-magic-1ble</guid>
      <description>&lt;p&gt;I just watched &lt;a href="https://www.youtube.com/watch?v=nvuPisDQ1hI" rel="noopener noreferrer"&gt;Eileen Uchitelle - The Magic of Rails - Rails World 2023&lt;/a&gt; and picked up a new tool... &lt;a href="https://ruby-doc.org/core-2.4.1/Method.html#method-i-source_location" rel="noopener noreferrer"&gt;source_location&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This method "Returns the Ruby source filename and line number containing this method or nil if this method was not defined in Ruby (i.e. native)." What does this mean? Well, it helps demystify some of the magic of Rails, which often has something to do with Metaprogramming 👻.&lt;/p&gt;

&lt;p&gt;There are a lot of methods that get defined at runtime, so it can be difficult to figure out where they are coming from. Let's say we have a model &lt;code&gt;Post&lt;/code&gt; which &lt;code&gt;has_many :comments&lt;/code&gt;. We don't define a &lt;code&gt;comments&lt;/code&gt; method, we just say there is a 1 to many relationship. We can use &lt;code&gt;source_location&lt;/code&gt; to dig a little deeper and find exactly how that method is defined.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;
&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;method&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:comments&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;source_location&lt;/span&gt;
&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"rails/activerecord/lib/active_record/associations/builder/association.rb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;103&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Super cool right?&lt;/p&gt;

&lt;p&gt;Next time you see a method and you don't understand how/where it was defined, try using &lt;code&gt;source_location&lt;/code&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Add multiple subdomains to your rails 7 app.</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Tue, 27 Jun 2023 17:03:15 +0000</pubDate>
      <link>https://dev.to/heratyian/add-multiple-subdomains-to-your-rails-7-app-1kjo</link>
      <guid>https://dev.to/heratyian/add-multiple-subdomains-to-your-rails-7-app-1kjo</guid>
      <description>&lt;p&gt;Subdomains are a great way to organize different parts of your app. You might have an &lt;code&gt;api&lt;/code&gt; subdomain, &lt;code&gt;news&lt;/code&gt; subdomain, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  routes.rb
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;constraints&lt;/span&gt; &lt;span class="ss"&gt;subdomain: &lt;/span&gt;&lt;span class="s1"&gt;'my-subdomain'&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c1"&gt;# add routes&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  development.rb
&lt;/h2&gt;

&lt;p&gt;Add new hosts to your development.rb configuration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hosts&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s2"&gt;"my-subdomain.my-domain.local"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Development Environment
&lt;/h2&gt;

&lt;p&gt;Add development subdomain(s) to your /etc/hosts file so it routes to your development server&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;127.0.0.1 my-subdomain.my-domain.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't forget to add port 3000! You'll go this url in your browser. &lt;code&gt;my-subdomain.my-domain.local:3000&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Heroku
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzik1tkg9qlhl5e8rqnr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzik1tkg9qlhl5e8rqnr.png" alt="Image description" width="800" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DNS Configuration
&lt;/h2&gt;

&lt;p&gt;Add a &lt;code&gt;CNAME&lt;/code&gt; record for each subdomain in your DNS configuration.&lt;/p&gt;

&lt;p&gt;Use the &lt;code&gt;domain name&lt;/code&gt; and &lt;code&gt;DNS Target&lt;/code&gt; from Heroku.&lt;/p&gt;

&lt;p&gt;That's it! You should be good to go.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>dns</category>
      <category>heroku</category>
    </item>
    <item>
      <title>Rails app running slow? Running into memory issues?</title>
      <dc:creator>Ian</dc:creator>
      <pubDate>Thu, 22 Jun 2023 15:21:01 +0000</pubDate>
      <link>https://dev.to/heratyian/rails-app-running-slow-running-into-memory-issues-2bal</link>
      <guid>https://dev.to/heratyian/rails-app-running-slow-running-into-memory-issues-2bal</guid>
      <description>&lt;p&gt;Try adding require false in your gemfile. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;gem "my-bloated-memory-hog", require: false&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You'll need to add the &lt;code&gt;require "my-bloated-memory-hog"&lt;/code&gt; wherever you need access to this gem. BUT, your app will be much less of a memory hog.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
