<?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: Jethro Lorenzo Garcia Lising</title>
    <description>The latest articles on DEV Community by Jethro Lorenzo Garcia Lising (@jethrolising).</description>
    <link>https://dev.to/jethrolising</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%2F372593%2F7403f538-bc2e-4421-a7b7-724ad16b4a20.jpg</url>
      <title>DEV Community: Jethro Lorenzo Garcia Lising</title>
      <link>https://dev.to/jethrolising</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jethrolising"/>
    <language>en</language>
    <item>
      <title>Flutter localization gotcha with iOS Emulator</title>
      <dc:creator>Jethro Lorenzo Garcia Lising</dc:creator>
      <pubDate>Thu, 16 Jul 2020 16:52:42 +0000</pubDate>
      <link>https://dev.to/jethrolising/flutter-localization-gotcha-with-ios-emulator-235c</link>
      <guid>https://dev.to/jethrolising/flutter-localization-gotcha-with-ios-emulator-235c</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;When you use the &lt;a href="https://pub.dev/packages/intl"&gt;intl&lt;/a&gt; package to get the current locale, it will always return English or 'en', when you use the iOS simulator.&lt;/p&gt;

&lt;p&gt;Even when you set the language and region in the iOS settings, it will always return 'en'.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// This retrieves the current local&lt;/span&gt;
&lt;span class="n"&gt;Intl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getCurrentLocale&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;// returns 'en' using iOS Simulator&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Came across this &lt;a href="https://github.com/flutter/flutter/issues/14128"&gt;github issue&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;And the solution was &lt;a href="https://github.com/flutter/flutter/issues/14128#issuecomment-598011056"&gt;found&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Edit &lt;code&gt;info.plist&lt;/code&gt; found in &lt;code&gt;ios/Runner&lt;/code&gt; and add two configurations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;Localizations&lt;/code&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Add your supported languages or any languages that you need to test.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;Localized resources can be mixed&lt;/code&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Set to YES.&lt;/p&gt;

&lt;p&gt;For good measure, &lt;code&gt;flutter clean&lt;/code&gt; and rebuild.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>ios</category>
      <category>internationalization</category>
    </item>
    <item>
      <title>My Productivity Tools as a Software Engineer</title>
      <dc:creator>Jethro Lorenzo Garcia Lising</dc:creator>
      <pubDate>Sun, 17 May 2020 19:10:12 +0000</pubDate>
      <link>https://dev.to/jethrolising/my-productivity-tools-as-a-software-engineer-427b</link>
      <guid>https://dev.to/jethrolising/my-productivity-tools-as-a-software-engineer-427b</guid>
      <description>&lt;p&gt;Staying organized is hard. As a software engineer, writing code is probably 1/4th of the battle. You have to  stay on top of your knowledge for long-term storage. You need to keep a Dev journal to record your insights. You need an interstitial journal to reflect and switch contexts mindfully.  You need a way to securely and privately track your time spent on projects and to track future-events and meetings.&lt;/p&gt;

&lt;p&gt;This is why I delegate my second brain (long-term) into different apps that handle one and only thing.&lt;/p&gt;

&lt;p&gt;These are the tools I use to manage my projects and my life.  They are mostly found in the Apple ecosystem, but alternatives are listed below.&lt;/p&gt;

&lt;h1&gt;
  
  
  Bear: for knowledge-base
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bear.app/"&gt;Private Markdown Notes for iPhone, iPad and Mac | Bear App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For &lt;a href="https://www.lesswrong.com/posts/T382CLwAjsy3fmecf/how-to-take-smart-notes-ahrens-2017#Permanent_notes"&gt;permanent notes&lt;/a&gt; (zetels) and &lt;a href="https://www.mentalnodes.com/a-gardening-guide-for-your-mind"&gt;trees&lt;/a&gt; (mind garden)&lt;/li&gt;
&lt;li&gt; For &lt;a href="https://www.lesswrong.com/posts/T382CLwAjsy3fmecf/how-to-take-smart-notes-ahrens-2017#Literature_notes"&gt;literature notes&lt;/a&gt; and reference notes as well &lt;/li&gt;
&lt;li&gt;For long-term knowledge&lt;/li&gt;
&lt;li&gt;Good for code-snippets, syntax highlighting is available&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Premium is required for Mac OS and iOS sync&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Alternative: &lt;a href="https://joplinapp.org/"&gt;Joplin - an open source note taking and to-do application with synchronisation capabilities&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Agenda: date-focused working notes with a project context
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://agenda.com/"&gt;Agenda - Date-focused Note Taking.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For notes that do have a project context

&lt;ul&gt;
&lt;li&gt;some notes you took on a project or meeting&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Assign notes that are “On The Agenda” for focus&lt;/li&gt;
&lt;li&gt;This is great if you keep a &lt;a href="https://opensource.com/article/19/4/what-developer-journal"&gt;dev journal&lt;/a&gt; or an &lt;a href="https://medium.com/better-humans/replace-your-to-do-list-with-interstitial-journaling-to-increase-productivity-4e43109d15ef"&gt;interstitial journal&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Alternative: &lt;a href="https://joplinapp.org/"&gt;Joplin - an open source note taking and to-do application with synchronisation capabilities&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Trello: project and life management
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://trello.com/"&gt;Trello&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A &lt;em&gt;kanban&lt;/em&gt; (signboard, in Japanese)&lt;/li&gt;
&lt;li&gt;Visualize work&lt;/li&gt;
&lt;li&gt;Limiting work in progress&lt;/li&gt;
&lt;li&gt;Follow &lt;a href="https://www.amazon.ca/Personal-Kanban-Mapping-Work-Navigating/dp/1453802266"&gt;Personal Kanban&lt;/a&gt; for how to manage life&lt;/li&gt;
&lt;li&gt;Follow &lt;a href="https://www.atlassian.com/agile/kanban"&gt;Agile&lt;/a&gt; methodology to manage projects &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Standard Notes: secure raw notes
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://standardnotes.org/"&gt;Standard Notes | A Simple And Private Notes App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For secure cross-platform (iOS, Android, Web) notes&lt;/li&gt;
&lt;li&gt;These are good for ephemeral, raw notes without a project context&lt;/li&gt;
&lt;li&gt;Also works as a small password manager&lt;/li&gt;
&lt;li&gt;Alternative: &lt;a href="https://joplinapp.org/"&gt;Joplin - an open source note taking and to-do application with synchronisation capabilities&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Yes Joplin can replace Standard Notes, Agenda, and Bear.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Apple Calendar: appointments and time-blocked events
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Speaks for itself. &lt;/li&gt;
&lt;li&gt;Alternative: Google Calendar&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Apple Reminders: one-time and recurring reminders
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;For recurring reminders (“Take Out Recycling for collection”, “Wash bedsheets”) &lt;/li&gt;
&lt;li&gt;Also good for one-off reminders&lt;/li&gt;
&lt;li&gt;Integrates with Agenda&lt;/li&gt;
&lt;li&gt;Alternative: Google Tasks &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Timewarrior: time-tracking
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://timewarrior.net/"&gt;Timewarrior - Done yet?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;To keep track of the time spent on a project or activity&lt;/li&gt;
&lt;li&gt;Cons: command-line only&lt;/li&gt;
&lt;li&gt;Still looking for a simple, cross platform solution (Web, Desktop, Mobile)&lt;/li&gt;
&lt;li&gt;Alternative for Mobile: &lt;a href="https://github.com/hamaluik/timecop"&gt;GitHub - hamaluik/timecop: A time tracking app that respects your privacy and the gets the job done without being fancy.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>tools</category>
      <category>knowledge</category>
      <category>organization</category>
    </item>
    <item>
      <title>I made a simple meditation app with Flutter in ONE WEEK</title>
      <dc:creator>Jethro Lorenzo Garcia Lising</dc:creator>
      <pubDate>Mon, 11 May 2020 15:41:40 +0000</pubDate>
      <link>https://dev.to/jethrolising/i-made-a-simple-meditation-app-with-flutter-in-one-week-20o9</link>
      <guid>https://dev.to/jethrolising/i-made-a-simple-meditation-app-with-flutter-in-one-week-20o9</guid>
      <description>&lt;p&gt;I was just looking for a clean implementation of a meditation app. I just want something that would get me to meditating as fast as I can.&lt;/p&gt;

&lt;p&gt;I don't want to sign up or be offered a subscription or a paid course, or to even hear a guide. The most popular one like &lt;strong&gt;Headspace&lt;/strong&gt;, and &lt;strong&gt;Calm&lt;/strong&gt; had IAPs and probably some sort of analytics (to keep the shareholders informed! Results have to be measured somehow!).&lt;/p&gt;

&lt;p&gt;I really just wanted a simple meditation app that got to the point as fast and as beautiful as possible.&lt;/p&gt;

&lt;p&gt;So I made my own app: &lt;strong&gt;justBreathe&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's simple a meditation timer. You determine how long the session is; if you want a ticking timer or a beautiful animation; and if you want to hear a gong at the beginning and end of the session.&lt;/p&gt;

&lt;p&gt;This is my gift to the world. If this app helps someone attain clarity, and relaxation, even just one person, then all of the man-hours I've put into it would be worth it.&lt;/p&gt;

&lt;h1&gt;
  
  
  How Flutter enabled my Vision
&lt;/h1&gt;

&lt;p&gt;Flutter really helps developers iterate VERY quickly. Especially for a solo-project, where you literally have the control to create and define your own features, the sky is the limit.&lt;/p&gt;

&lt;p&gt;I didn't need much to get started. I just needed a State Management solution outside of &lt;code&gt;setState&lt;/code&gt; (because I needed an easy way to pass and share data between Widgets, without implementing my own InheritedWidget or ScopedModel). I read a few articles on it, like &lt;a href="https://flutter.dev/docs/development/data-and-backend/state-mgmt/simple"&gt;Simple App State Management&lt;/a&gt; and &lt;a href="https://medium.com/coding-with-flutter/flutter-state-management-setstate-bloc-valuenotifier-provider-2c11022d871b"&gt;Flutter State Management: setState, BLoC, ValueNotifier, Provider&lt;/a&gt;. &lt;strong&gt;Provider and ChangeNotifier were more than enough for this use-case.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The implementation doesn't have a clear or strong architecture. I just went with what I knew, which was a typical &lt;em&gt;MVC-U&lt;/em&gt; architecture. Well, in this case, &lt;em&gt;Data-Screen-Utils&lt;/em&gt; architecture. I separated the domain of data, business logic, and UI. Though there's much more work to be done in terms of refactoring, &lt;strong&gt;getting to an MVP took less than 3 days&lt;/strong&gt;.&lt;br&gt;
The animations were easy to work with. &lt;/p&gt;

&lt;p&gt;Having had experience with Pebble and animations using C language, working with Dart was a breeze and an absolute pleasure. I implemented page Route transitions with the help of some code from &lt;a href="https://twitter.com/gskinner_team?lang=en"&gt;@gskinner_team&lt;/a&gt; with their article &lt;a href="https://blog.gskinner.com/archives/2020/03/flutter-simplify-your-pageroutes.html"&gt;Flutter: Simplify your PageRoutes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It was easy to add simple animations through the app to make the experience better.&lt;/p&gt;

&lt;p&gt;When I finally had my MVP, I began to work on localization. I used the &lt;a href="https://pub.dev/packages/intl"&gt;intl&lt;/a&gt; package and with the help of &lt;a href="https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl"&gt;Localizely's Intl extension&lt;/a&gt;, (and with the help of my GF and a generous and skilled translator on Reddit), I manage to implement french localizations!&lt;/p&gt;

&lt;h1&gt;
  
  
  Publishing
&lt;/h1&gt;

&lt;p&gt;I was eager to publish. I just had to follow this &lt;a href="https://flutter.dev/docs/deployment/android"&gt;article from flutter.dev on how to release an Android App&lt;/a&gt;. It was easy to do.&lt;/p&gt;

&lt;p&gt;I used fastlane as my CD, but to get to the market fast, I just literally did &lt;code&gt;flutter build appbundle&lt;/code&gt;. Took screenshots and published to production on Google Play Console.&lt;/p&gt;

&lt;p&gt;The review process took 6 days. &lt;strong&gt;This means between planning, developing, publishing this app, the publishing review process took longer than the app creation process!&lt;/strong&gt; Granted it's a simple MVP, but I just want to emphasize how quick the development process was.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Overall, creating a Flutter App allows for the creation of beautiful and performant apps, very quickly. As a one-man team, this project was enjoyable. Flutter really allowed me to express my creativity and fulfill my vision.&lt;/p&gt;

&lt;p&gt;I hope to learn more and create more complex apps.&lt;/p&gt;

&lt;h1&gt;
  
  
  What's Next?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;More translations (Swedish namely)&lt;/li&gt;
&lt;li&gt;Use codemagic to build, test, and release to both App Store and Play Store&lt;/li&gt;
&lt;li&gt;Write some tests (before I add updates and new features)&lt;/li&gt;
&lt;li&gt;And add more beautiful animations!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Check it out and I hope you find the way to ultimate happiness!
&lt;/h3&gt;

&lt;p&gt;Source Code - &lt;a href="https://github.com/jg-l/justBreathe"&gt;https://github.com/jg-l/justBreathe&lt;/a&gt;&lt;br&gt;
Play Store - &lt;a href="https://play.google.com/store/apps/details?id=ca.lising.justbreathe"&gt;https://play.google.com/store/apps/details?id=ca.lising.justbreathe&lt;/a&gt;&lt;br&gt;
Official website - &lt;a href="https://justbreathe.lising.ca/"&gt;https://justbreathe.lising.ca/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>app</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Fish Shell: Functions</title>
      <dc:creator>Jethro Lorenzo Garcia Lising</dc:creator>
      <pubDate>Wed, 29 Apr 2020 15:46:51 +0000</pubDate>
      <link>https://dev.to/jethrolising/fish-shell-functions-2e7i</link>
      <guid>https://dev.to/jethrolising/fish-shell-functions-2e7i</guid>
      <description>&lt;p&gt;In this article, we will explore how to create and save &lt;a href="//fishshell.com/"&gt;fish shell&lt;/a&gt; functions on the fly.&lt;br&gt;
This is useful if you need to automate things in the shell.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tested on fish version: 3.0.2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Create a function
&lt;/h1&gt;

&lt;p&gt;Use &lt;code&gt;funced&lt;/code&gt; &lt;a href="https://fishshell.com/docs/current/cmds/funced.html"&gt;[1]&lt;/a&gt; to edit and create a &lt;code&gt;function&lt;/code&gt;&lt;a href="https://fishshell.com/docs/current/cmds/function.html#cmd-function"&gt;[2]&lt;/a&gt; interactively.&lt;br&gt;
It will provide a scaffold to write a function on the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ funced
function hello
    echo hello world
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Tip: If you have &lt;code&gt;$EDITOR&lt;/code&gt; configured, it will open that instead&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hitting Enter will save the function &lt;code&gt;hello&lt;/code&gt; into this session. Running &lt;code&gt;hello&lt;/code&gt; will echo "hello world".&lt;/p&gt;

&lt;p&gt;This function will only be available for this session. It will not be saved for future sessions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Save a function
&lt;/h1&gt;

&lt;p&gt;To save our &lt;code&gt;hello&lt;/code&gt; function so that we can use it in future sessions, we use &lt;code&gt;funcsave&lt;/code&gt;&lt;a href="https://fishshell.com/docs/current/cmds/funcsave.html"&gt;[3]&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--59v1fgbe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ucr7oy6qgh8s59u2ts0f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--59v1fgbe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ucr7oy6qgh8s59u2ts0f.png" alt="Saving a function"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will save &lt;code&gt;hello&lt;/code&gt; into a file in our configuration directory, where it will automatically be loaded for future sessions.&lt;/p&gt;

&lt;p&gt;You can see this function saved in &lt;code&gt;~/.config/fish/functions/hello.fish&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Make your functions descriptive
&lt;/h1&gt;

&lt;p&gt;It's always good to document our functions, especially if we are writing it with the intent to share with other people. For that, we use the &lt;code&gt;--description&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;funced hello&lt;/code&gt; to edit the previously defined &lt;code&gt;hello&lt;/code&gt; function. Now we can make any changes and use &lt;code&gt;funcsave&lt;/code&gt; if we want to save it.&lt;/p&gt;

&lt;p&gt;Continuing our previous example we can define a description option to set a description for our function. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---0vZjE2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tey2leb35nrx0945o52p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---0vZjE2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tey2leb35nrx0945o52p.png" alt="Assigning descriptions to functions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tip: you can use &lt;code&gt;-d&lt;/code&gt; as a shortcut to &lt;code&gt;--description&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Function arguments
&lt;/h1&gt;

&lt;p&gt;If we want to make our &lt;code&gt;hello&lt;/code&gt; function say what we want, we can use arguments! &lt;/p&gt;

&lt;p&gt;In our function, we have access to &lt;code&gt;$argv&lt;/code&gt; which is a &lt;a href="https://fishshell.com/docs/current/index.html#variables-lists"&gt;variable list&lt;/a&gt; of arguments that the function received.&lt;/p&gt;

&lt;p&gt;This is a welcomed changed from bash which has numbered variables like &lt;code&gt;$1&lt;/code&gt; to access the first argument of the function.&lt;/p&gt;

&lt;p&gt;If we wanted the first argument of a function, we simply call &lt;code&gt;$argv[1]&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rsU9JNU---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1vulykmal7eewa0qumki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rsU9JNU---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1vulykmal7eewa0qumki.png" alt="Using function arguments"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Fish shell indices start at 1, not 0. Fish tries to be modern this way.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Use named function arguments
&lt;/h1&gt;

&lt;p&gt;To make it more readable, we can use named arguments. This is much friendlier to read compared to &lt;code&gt;$argv[1]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CXTPGIZs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ominmh41ucwxpiynt4am.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CXTPGIZs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ominmh41ucwxpiynt4am.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--arguments&lt;/code&gt; or &lt;code&gt;-a&lt;/code&gt; option allows us to specify variable names for arguments that we specify.&lt;/p&gt;

&lt;p&gt;The variable &lt;code&gt;$greeting&lt;/code&gt; and &lt;code&gt;$name&lt;/code&gt; correspond to the first and second arguments of the &lt;code&gt;say&lt;/code&gt; function.&lt;/p&gt;

&lt;h1&gt;
  
  
  Learn More
&lt;/h1&gt;

&lt;p&gt;I hope you learned a new thing about the fish shell and how to write your own functions! You can always read more about fish shell functions &lt;a href="https://fishshell.com/docs/current/cmds/function.html#cmd-function"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Until then, keep learning! &lt;/p&gt;

</description>
      <category>fish</category>
      <category>functions</category>
      <category>cli</category>
      <category>terminal</category>
    </item>
  </channel>
</rss>
