<?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: Diana</title>
    <description>The latest articles on DEV Community by Diana (@dianawebdev).</description>
    <link>https://dev.to/dianawebdev</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%2F3948%2Fb38b995f-c4aa-4cdc-9481-4251173ee26c.jpg</url>
      <title>DEV Community: Diana</title>
      <link>https://dev.to/dianawebdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dianawebdev"/>
    <language>en</language>
    <item>
      <title>Bugfixing my career</title>
      <dc:creator>Diana</dc:creator>
      <pubDate>Thu, 31 Dec 2020 09:31:33 +0000</pubDate>
      <link>https://dev.to/dianawebdev/bugfixing-my-career-121p</link>
      <guid>https://dev.to/dianawebdev/bugfixing-my-career-121p</guid>
      <description>&lt;p&gt;This may be a different kind of year in review post than the ones you've read before.&lt;br&gt;
I'm sharing my story of this year, hoping that you'll learn something from it, so that won't happen to you.&lt;/p&gt;




&lt;p&gt;This year, I lost my love for coding.&lt;/p&gt;

&lt;p&gt;Can you imagine I had a job where I didn't had the desire to start side projects? I was doing what I love (mainly Laravel Development with a huge bit of software and database architecture as well as caring about good UI and UX) on a daily basis, 40+ hours a week. I thrived, I learned, and damn, I was &lt;em&gt;good at my job&lt;/em&gt; (haters coming in 3, 2, 1 ...).&lt;br&gt;
Of course there were bad days, difficult customers and situations, but overall - all was good. The team, the work, the company.&lt;/p&gt;

&lt;p&gt;Then I was assigned to a project of a new customer. Taking care of a huge software monolith, grown over two decades, together with an internal team of theirs. It was &lt;em&gt;bad&lt;/em&gt;, you know.  PHP, without any framework, with oldfashioned HTML and CSS and lots of jQuery. MVC? No. Composer or Autoloading? Nope. Consistent code style, clean code? One hell of a &lt;em&gt;nope&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;First, it was a challenge, so I throwed myself completely at it. I'm doing PHP for several years now and ironically it reminded me of my first projects, so I got into it quite fast (I started coding eleven years old, PHP 4 was still around, no theoretical knowledge at all, but it &lt;em&gt;worked&lt;/em&gt; and &lt;em&gt;it was so fun&lt;/em&gt;!).&lt;br&gt;
I fixed bugs, added new features, everything that had to be done. Still, the codebase was horrible. It screamed »please rewrite me!« painfully, every day I opened up my IDE.&lt;br&gt;
I always had a desire to improve software, so I introduced my knowledge and opinions of modern (web) development to the customer and the team. Small steps first. Consistent code style, add proper documentation, maybe put a Laravel under it to make it at least a bit more secure. Split it into microservices. Inevitable, rebuild it from scratch. &lt;br&gt;
Summarized: The default suggestions you make for transfering a huge monolith that was virtually un-maintainable, breaking apart every hour and being incredible slow to something  better, nicer to work with.&lt;br&gt;
&lt;em&gt;I know that this is a difficult, tedious task.&lt;/em&gt; But there wasn't even the intention to do this. »It works, so why change it?« Yeah, you've got clearly a different definition of »it works« than me.&lt;/p&gt;

&lt;p&gt;So, if you can't change the circumstances, change yourself, right?&lt;br&gt;
I requested to be withdrawed from that particular project, at least for some of my weekly work time. I'm totally fine with maintaining legacy systems, as I mentioned before, it's a challenge and a constant reminder of being grateful for something like Laravel. But if you're doing it every f*cking hour of every f*cking workday, no. Just no.&lt;/p&gt;

&lt;p&gt;Well, to make it short: It didn't work out. That's the problem at being good in your job: You're getting so important for something that you can't be removed from the equation (yeaah hello haters). My bosses promised to appoint me to other  projects the next month. The month after. Again the month after that... you get it.&lt;/p&gt;

&lt;p&gt;I know that it's hard to make the split between making money and keeping your employees happy, not only for a software company, but in general. I don't blame anyone. But if you're postponing your commitments constantly, they wear of. They're not meaningful anymore.&lt;/p&gt;

&lt;p&gt;As the time passed, showing up to work became a daily overcoming. I got up, had breakfast, commuted to work. I was in a bad mood at first, but after some time, not even this anymore. I got dull. I was resignated.&lt;br&gt;
I didn't like coding anymore, I noticed that I got so used to that obscure legacy code that I lost my ability to write good, scalable systems.&lt;br&gt;
This was the last warning sign for me.&lt;/p&gt;

&lt;p&gt;But I was not ready to leave this company. Not because of financial manners, but out of emotions, simple loyalty. I was still attached to my team, I didn't want to let them down with that huge amount of work.&lt;/p&gt;

&lt;p&gt;So I started side projects for compensation. I learned a whole new part of software development, did no web development, but rather mobile development (Flutter) to get as far away from my daily job as possible. I even purchased a $ 3,000 MacBook in a different color to cut off all connotations. Hell, I was &lt;em&gt;desperate&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The joy came back. The delight of clean and structured code. I coded a few evenings during the week and often full weekends. It didn't feel like work, it felt like playing and having fun again.&lt;/p&gt;

&lt;p&gt;But there was an implicit problem with this: The hurdle to get back to my day job after the weekends grow bigger. Good thing is, the atmosphere in the company changed, so my loyality faded as well.&lt;br&gt;
I made one last attempt. One last stand up to try to get my daily job back to what it was once.&lt;/p&gt;

&lt;p&gt;Nope, did not work again.&lt;/p&gt;

&lt;p&gt;So I resigned - without having something new in sight. I didn't care.&lt;/p&gt;

&lt;p&gt;I allowed myself to just exist for a few weeks and I know this is a privilige not everybody has. I really appreciated that because it gave me the chance to recalibrate. To ask myself, what should my life as a developer look like?&lt;br&gt;
I released my app, got back to freelancing and found a few solid clients. &lt;br&gt;
Do I earn more than before? Hell, no. But to be honest, I don't have the need for unnecessary luxury stuff and I never got into coding because of the money. I got into coding because it feels like my vocation, not like work.  &lt;/p&gt;

&lt;p&gt;But, oh dear, the contentment. The silence in my mind, the serenity. The feeling of doing meaningful work, of expressing myself, contributing to a bigger thing. That's... invaluable. Nothing you can express in a salary.&lt;/p&gt;




&lt;p&gt;I don't claim that when you have side projects you need to leave your job. But sometimes you should pause for a moment. Ask yourself, why do you start your side projects? Pure joy, can't get enough of coding next to your day job? Go for it! &lt;br&gt;
But if there is even a little doubt in this, dig deeper. Is it compensation for your employment like I described? Then maybe you should change your situation.&lt;/p&gt;

&lt;p&gt;Finding meaning and joy in development again was the main storyline of my 2020, on top of all that pandemic and other weird stuff that happened.&lt;br&gt;
It was an interesting year. I had a lot of lows, but I also have the feeling that I grown a lot in different parts of myself. &lt;/p&gt;

&lt;p&gt;Have a nice day and an even nicer 2021.&lt;/p&gt;

</description>
      <category>career</category>
      <category>yearinreview</category>
      <category>reflection</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What's your commit strategy in personal projects?</title>
      <dc:creator>Diana</dc:creator>
      <pubDate>Sat, 05 Dec 2020 16:15:45 +0000</pubDate>
      <link>https://dev.to/dianawebdev/what-s-your-commit-strategy-in-personal-projects-3coe</link>
      <guid>https://dev.to/dianawebdev/what-s-your-commit-strategy-in-personal-projects-3coe</guid>
      <description>&lt;p&gt;One commit for every feature, regardless how long you'll work on it? One commit a day, regardless which features or bugfixes you worked on?&lt;/p&gt;

&lt;p&gt;Or do you go full git-style? Particular Branches for dev and release, a new branch for every feature, one commit for every little part of the feature?&lt;br&gt;
Do you even have your own ticket systems or user stories?&lt;/p&gt;

&lt;p&gt;What's your workflow with versioning in personal projects?&lt;br&gt;
Looking forward to your comments and thoughts.&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>discuss</category>
      <category>git</category>
    </item>
    <item>
      <title>Localization of a Flutter App</title>
      <dc:creator>Diana</dc:creator>
      <pubDate>Thu, 29 Oct 2020 09:25:50 +0000</pubDate>
      <link>https://dev.to/dianawebdev/localization-of-a-flutter-app-1g47</link>
      <guid>https://dev.to/dianawebdev/localization-of-a-flutter-app-1g47</guid>
      <description>&lt;p&gt;&lt;em&gt;In this article I share some facts, tips and magic about the Localization of a Flutter App.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A few weeks ago I spent nearly a whole day in localizing and translating my app, &lt;a href="http://nabit.app/"&gt;Nabit - Minimalist Habit Tracker App&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are plenty tutorials and a good documentation considering the technical way, but here a few tips and tricks that I collected after this lengthy - but rewarding! - process.&lt;/p&gt;

&lt;p&gt;Before I start, a few recommendations for the technical side:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://flutter.dev/docs/development/accessibility-and-localization/internationalization#appendix-updating-the-ios-app-bundle"&gt;Internationalizing Flutter apps (Official Flutter Documentation)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@aruny3/flutter-localization-eae4c45acad"&gt;Flutter Localization by @aruny3 at Medium&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Start with Localization as soon as you start with your App
&lt;/h2&gt;

&lt;p&gt;This seems obvious - but I made this mistake. I started my app in English and didn't even think about supporting other languages too soon. But then a lot of my friends and family members wanted to use my app, and a few of them were not that good in the english language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed things up!
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Use capsule methods
&lt;/h3&gt;

&lt;p&gt;Encapsulating logic is a good way for speeding up the localization process and provide easy-to-read code. I implemented multi-language support by following the tutorial above and the official Flutter documentation. With this, I would have to call &lt;code&gt;Localizations.of&amp;lt;NabitLocalizations&amp;gt;(context, NabitLocalizations).$TRANSLATION_GETTER&lt;/code&gt; every time I needed a translation. To be honest, I am a big fan of short, expressive code, so inside my Localizations class, I created a wrapper method for this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;static NabitLocalizations of(BuildContext context) {
   return Localizations.of&amp;lt;NabitLocalizations&amp;gt;(context, NabitLocalizations);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now I just have to call &lt;code&gt;NabitLocalizations.of(context).$TRANSLATION_GETTER&lt;/code&gt; now, which is at least a bit shorter and easier to read.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use user snippets / live templates
&lt;/h3&gt;

&lt;p&gt;Especially if you do the translation after you started your App and you already have a lot of text strings, a bit of IDE automation can be helpful, because you will have to write a lot of getters and other repetitive stuff like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String get habitsSaved {
   return _localizedValues[locale.languageCode]['habits']['saved'];
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Automation to the rescue! It's called »User Snippets« in VS Code or »Live Templates« in different JetBrains-Products. I created e.g. this one for the types of getters above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"NabitLocalizationGetter": {
  "prefix": [
    "nlg"
  ],
  "body": [
    "\nString get ${1} {\n\treturn _localizedValues[locale.languageCode]['${2}']['${3}'];\n}\n\n${4}"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I use the shortcut »nlg« and navigate by hitting tab through the placeholders: Name of the getter, first array key, second array key. The last placeholder ${4} is set two lines below the getter and allows me to start with another one right away.&lt;/p&gt;

&lt;p&gt;Another user snippet I created is called by typing »nl« and hitting tab for a quick access to my translations inside the Flutter-Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"NabitLocalization": {
  "prefix": [
    "nl"
  ],
  "body": [
    "NabitLocalizations.of(context).${1}"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can manage all of your snippets  inside VS Code by hitting &lt;code&gt;cmd + shift + P&lt;/code&gt; (&lt;code&gt;ctrl + shift + P&lt;/code&gt; on Windows), type "User snippets" and hit enter. More information about this can be found in the documentation of VS Code itself or the respective documentation of your IDE.&lt;/p&gt;

&lt;h2&gt;
  
  
  You'll need the build context everywhere you call for an translation!
&lt;/h2&gt;

&lt;p&gt;I like to abstract my Flutter methods as much as possible to make reusing them easy. But be careful: This is also kind of obvious, but you need a BuildContext everywhere you call for a translated text!&lt;/p&gt;

&lt;h2&gt;
  
  
  Consider other localization tasks
&lt;/h2&gt;

&lt;p&gt;Don't forget about customizable date formatting, time formats (AM/PM, 24h) or even timezones - but this is a completely different topic!&lt;/p&gt;

&lt;h2&gt;
  
  
  Last but not least: Watch your mouth! ;)
&lt;/h2&gt;

&lt;p&gt;I shouldn't have to mention that - but I have seen to many bad translated apps in my career to not point it out again: Pay attention to your translations. Write grammatically correct, eloquent and easy-to-understand sentences. There's not much worse than the Google Translator, if you need help with translations, consider asking a friend who is fluent in your targeted language - or even a professional interpreter. Deepl is at the moment one of the better online translation tools, but even if you use this, let someone check your final translations before you release your app.&lt;/p&gt;

&lt;p&gt;With all of this - thanks for reading! Happy to hear your thoughts and experiences about Flutter Localization.&lt;/p&gt;

&lt;h6&gt;
  
  
  (Random Fact, don't take it too serious: You don't speak German in Bavaria. You speak Bavarian, in many varieties... and even I, born and raised here, do not understand all of them.)
&lt;/h6&gt;

</description>
      <category>flutter</category>
      <category>todayilearned</category>
      <category>dart</category>
      <category>localization</category>
    </item>
  </channel>
</rss>
