<?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: Angelika Cathor</title>
    <description>The latest articles on DEV Community by Angelika Cathor (@atyborska93).</description>
    <link>https://dev.to/atyborska93</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%2F21696%2F61668b38-a491-44cf-881d-a116c522224a.jpg</url>
      <title>DEV Community: Angelika Cathor</title>
      <link>https://dev.to/atyborska93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atyborska93"/>
    <language>en</language>
    <item>
      <title>Link Phoenix debug page stack trace to your editor</title>
      <dc:creator>Angelika Cathor</dc:creator>
      <pubDate>Sun, 22 Mar 2020 15:57:53 +0000</pubDate>
      <link>https://dev.to/atyborska93/link-phoenix-debug-page-stack-trace-to-your-editor-4p46</link>
      <guid>https://dev.to/atyborska93/link-phoenix-debug-page-stack-trace-to-your-editor-4p46</guid>
      <description>&lt;p&gt;If you ever worked on a Phoenix app, you might have seen this debug page when an error is raised:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fogj59wy306quxer6frv7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fogj59wy306quxer6frv7.png" alt="A debug page of a Phoenix app" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Generating those debug pages when an error happens is a feature turned on by setting &lt;code&gt;config :my_app, MyAppWeb.Endpoint, debug_errors: true&lt;/code&gt;, which can be found in &lt;code&gt;config/dev.exs&lt;/code&gt; of a freshly-created Phoenix app. It actually comes from &lt;code&gt;Plug.Debugger&lt;/code&gt;, not Phoenix itself &lt;sup&gt;(&lt;a href="https://github.com/phoenixframework/phoenix/blob/c0269e3768bc1de7826698ed202ac739cc1d45ca/lib/phoenix/endpoint.ex#L419-L421" rel="noopener noreferrer"&gt;source&lt;/a&gt;)&lt;/sup&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="c1"&gt;# phoenixframework/phoenix - lib/phoenix/endpoint.ex#L419-L421&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;var!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="ss"&gt;:debug_errors&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="no"&gt;Plug&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="no"&gt;Debugger&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="ss"&gt;otp_app:&lt;/span&gt; &lt;span class="nv"&gt;@otp_app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Plug.Debugger&lt;/code&gt; offers an option to generate links in the stack trace directly to your editor &lt;sup&gt;(&lt;a href="https://github.com/elixir-plug/plug/blob/45165d978e59d18df8b8085e4e158997dcac19a3/lib/plug/debugger.ex#L80-L89" rel="noopener noreferrer"&gt;source&lt;/a&gt;)&lt;/sup&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="c1"&gt;# elixir-plug/plug - lib/plug/debugger.ex#L80-L89&lt;/span&gt;
&lt;span class="sd"&gt;"""
If a `PLUG_EDITOR` environment variable is set, `Plug.Debugger` will
use it to generate links to your text editor. The variable should be
set with `__FILE__` and `__LINE__` placeholders which will be correctly
replaced. For example (with the [TextMate](http://macromates.com) editor):

  txmt://open/?url=file://__FILE__&amp;amp;line=__LINE__

Or, using Visual Studio Code:

  vscode://file/__FILE__:__LINE__
"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will need to find out if your editor supports a custom URL scheme that will open files in it. In &lt;code&gt;Plug.Debugger&lt;/code&gt;'s code, there are examples for &lt;strong&gt;TextMate&lt;/strong&gt; (&lt;code&gt;txmt://open/?url=file://__FILE__&amp;amp;line=__LINE__&lt;/code&gt;) and &lt;strong&gt;Visual Studio Code&lt;/strong&gt; (&lt;code&gt;vscode://file/__FILE__:__LINE__&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;I personally use &lt;strong&gt;RubyMine&lt;/strong&gt;, which supports the scheme &lt;code&gt;x-mine&lt;/code&gt;, which means I can build URLs like this: &lt;code&gt;x-mine://open?file=__FILE__&amp;amp;line=__LINE__&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can always try out if the custom scheme works for you by trying to open in your browser a link to a file that exists on your machine, e.g. &lt;code&gt;x-mine://open?file=/Users/angelika/.gitignore&amp;amp;line=3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once you figure out your editor's custom URL scheme and how to pass the file name and line number in that URL, you need to set the environment variable &lt;code&gt;PLUG_EDITOR&lt;/code&gt; to that URL. Make sure to use &lt;code&gt;__FILE__&lt;/code&gt; as the file name placeholder and &lt;code&gt;__LINE__&lt;/code&gt; as the line number placeholder.&lt;/p&gt;

&lt;p&gt;How to achieve that depends on your operating system and shell. On macOS, using bash as my shell, I needed to add this line to my &lt;code&gt;~/.bash_profile&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.bash_profile&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PLUG_EDITOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'x-mine://open?file=__FILE__&amp;amp;line=__LINE__'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before restarting your Phoenix server to see the results, do not forget to reload the file (&lt;code&gt;. ~/.bash_profile&lt;/code&gt;) in an existing shell session or just open a new session.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh1cyecmtdxr6hpb3mn3b.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh1cyecmtdxr6hpb3mn3b.gif" alt="A gif showing a debug page in Phoenix and how clicking on a file name opens that file in RubyMine" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;
When I click on the file name in the stack trace, that file opens in RubyMine, on the line that caused the error.



</description>
      <category>elixir</category>
      <category>phoenix</category>
    </item>
    <item>
      <title>I18n process for a Phoenix app?</title>
      <dc:creator>Angelika Cathor</dc:creator>
      <pubDate>Mon, 09 Dec 2019 11:09:42 +0000</pubDate>
      <link>https://dev.to/atyborska93/i18n-process-for-a-phoenix-app-3b7p</link>
      <guid>https://dev.to/atyborska93/i18n-process-for-a-phoenix-app-3b7p</guid>
      <description>&lt;p&gt;I would love to hear about your experiences with translating Phoenix apps. I'm interested both in maintaining an app with many languages, and adding a totally new language to an existing app.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What does the process look like? &lt;/li&gt;
&lt;li&gt;Which tools do you use to allow translators work on the translations?&lt;/li&gt;
&lt;li&gt;Do you even have dedicated translators?&lt;/li&gt;
&lt;li&gt;How do you provide context for the translators so that they know what exactly they're translating? Working in pairs with someone who knows the app, writing descriptions, attaching screenshots? Or are you able to do in-app translations with some JS magic?&lt;/li&gt;
&lt;li&gt;Do you use Gettext or something else? Do you use more than one Gettext domain?&lt;/li&gt;
&lt;li&gt;How many languages do you have to handle?&lt;/li&gt;
&lt;li&gt;What is the biggest pain point of your process?&lt;/li&gt;
&lt;li&gt;How do you handle quality assurance of the translations?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any and all answers will be appreciated!&lt;/p&gt;

</description>
      <category>dicuss</category>
      <category>question</category>
      <category>phoenix</category>
      <category>i18n</category>
    </item>
    <item>
      <title>How to give great code reviews</title>
      <dc:creator>Angelika Cathor</dc:creator>
      <pubDate>Sun, 19 May 2019 17:23:24 +0000</pubDate>
      <link>https://dev.to/atyborska93/how-to-give-great-code-reviews-44jg</link>
      <guid>https://dev.to/atyborska93/how-to-give-great-code-reviews-44jg</guid>
      <description>&lt;p&gt;&lt;em&gt;This post was initially published &lt;a href="https://angelika.me/2019/05/19/how-to-give-great-code-reviews/" rel="noopener noreferrer"&gt;on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To give great code reviews, you need to know why you are doing code reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we review code?
&lt;/h2&gt;

&lt;p&gt;We all know that code reviews are important, but why? They can catch some bugs and prevent terrible design decisions from going to production, but is that their only function? &lt;/p&gt;

&lt;p&gt;In my experience, a great code review has three important goals:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keeping the team up to date with a changing codebase.&lt;/li&gt;
&lt;li&gt;Improving the quality of the project.&lt;/li&gt;
&lt;li&gt;Providing feedback for the developer.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Keeping up to date with a changing codebase
&lt;/h2&gt;

&lt;p&gt;Giving code reviews forces developers to read the parts of the code that they themselves didn't work on. This improves the team's overall knowledge of the codebase. As a result, task planning goes more smoothly and the accuracy of time/complexity estimations increases.&lt;/p&gt;

&lt;h3&gt;
  
  
  I. Find out the &lt;em&gt;why&lt;/em&gt; first
&lt;/h3&gt;

&lt;p&gt;To be able to understand a code change, you must first understand why it was made.&lt;/p&gt;

&lt;p&gt;Most of us work with some kind of issue tracking system. Identify the issue/ticket associated with this code change and read it thoroughly, including the comments. Read the description of the pull request if there is any. This will give you context necessary not only to understand the changes themselves, but to judge if the changes fit the requirements.&lt;/p&gt;

&lt;p&gt;Without context, for example, hardcoding a dot as the decimal separator for numbers seems reasonable for your US-only app, but if you read the ticket, you would know that your company is expanding to other countries and now the user's locale needs to be involved in &lt;a href="https://en.wikipedia.org/wiki/Decimal_separator#Arabic_numerals" rel="noopener noreferrer"&gt;choosing the decimal separator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If there is no issue/ticket, and no PR description, write down a description of your own and include it as part of the review. If you misunderstood the purpose, the reviewee is likely to point that out.&lt;/p&gt;

&lt;h3&gt;
  
  
  II. Read, don't skim
&lt;/h3&gt;

&lt;p&gt;Don't be content with a simple "looks good to me". All well-formatted code looks good when you skim it! You want to read the changes and &lt;strong&gt;really understand them&lt;/strong&gt;. Yes, it's difficult. Yes, it will take more time. Yes, it's worth it. It will also increase your chances of catching not-so-obvious project quality issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improving project quality
&lt;/h2&gt;

&lt;p&gt;Having a second pair of eyes look at the code before it goes to production is a good way to catch &lt;em&gt;some&lt;/em&gt; bugs and ensure the code will be maintainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  III. Always run the code
&lt;/h3&gt;

&lt;p&gt;One-line change? Run the code. Just CSS changes? Run the code. Just translations? RUN. THE. CODE.&lt;/p&gt;

&lt;p&gt;Do not kid yourself into thinking that everyone always compiles and runs the project after every change they make. We should... but we don't. You know, those times when you have just 5 minutes left before you need to leave the office, and you have just one more trivial change to make, but you don't have the time to verify it.&lt;/p&gt;

&lt;p&gt;Ensuring that the project still compiles and runs without throwing exceptions is the least you can do as a reviewer. It's a &lt;strong&gt;simple sanity check&lt;/strong&gt;. So you should do it.&lt;/p&gt;

&lt;p&gt;If there were any user-visible changes introduced, make sure you see them with your own eyes. Click through the new UI components.&lt;/p&gt;

&lt;p&gt;Run the tests. Yes, I know the CI is supposed to do that. But maybe there are flaky tests that will pass on CI by chance? Or maybe there is a bug that only appears on your macOS, but the CI is running Linux? Maybe somebody didn't follow the correct naming pattern for the test file and the test runner ignored the file altogether?&lt;/p&gt;

&lt;p&gt;Do the changes include database migrations? End your review process by rolling them back, checking out &lt;code&gt;master&lt;/code&gt; and checking if the project still runs.&lt;/p&gt;

&lt;h3&gt;
  
  
  IV. Do not nitpick
&lt;/h3&gt;

&lt;p&gt;Somebody inserted two empty lines where they were only supposed to insert one? Don't mention it. The reviewee's &lt;strong&gt;patience&lt;/strong&gt; to fix problems that you have with their code &lt;strong&gt;is limited&lt;/strong&gt; and you don't want to waste it on trivial issues.&lt;/p&gt;

&lt;p&gt;Instead, try to find an automated solution that is going to ensure all those trivial details are detected automatically and suggest that your team starts using it.&lt;/p&gt;

&lt;h3&gt;
  
  
  V. Focus on readability issues that can't be detected automatically
&lt;/h3&gt;

&lt;p&gt;Once you have your automated tools validating function name length and proper indentation, you can focus on the important stuff that only a human can catch.&lt;/p&gt;

&lt;p&gt;Do those function/variable names make sense to you? Do they use the project's vocabulary consistently? Could they be confusing? Are there any ambiguous abbreviations?&lt;/p&gt;

&lt;p&gt;Fun story: I once spent 10 minutes believing that the app I was working on had a feature where guest users (non-paying users invited by paying users with subscriptions) are allowed to invite more guest users because somebody named a variable &lt;code&gt;sub_guest&lt;/code&gt; instead of &lt;code&gt;subscription_guest&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Providing feedback for the developer
&lt;/h2&gt;

&lt;p&gt;Good feedback is feedback that &lt;strong&gt;reinforces somebody's good habits&lt;/strong&gt;, and helps notice and remove bad habits. For your feedback to have any impact at all, you need to &lt;strong&gt;ensure that you are being listened to&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  VI. Always say something nice
&lt;/h3&gt;

&lt;p&gt;I don't care how trivial the code changes are. You can always say something positive. The more specific the positive feedback is, the better.&lt;/p&gt;

&lt;p&gt;It might be hard to come up with something if you never did this before, so here are some generic examples for inspiration:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Good job! I tried my best to find bugs in your code, but couldn't.&lt;/p&gt;

&lt;p&gt;Thanks for fixing that typo, I wasn't aware this is the correct spelling of that word.&lt;/p&gt;

&lt;p&gt;I love how you named this function. It's immediately obvious what it does.&lt;/p&gt;

&lt;p&gt;Wow, that's neat. I wasn't aware of this feature of our programming language / this framework / this library.&lt;/p&gt;

&lt;p&gt;I like that you added all of this new code in a new file. It was tempting to put it in the existing file, but that would make the existing file way too big.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are afraid to sound silly for appreciating trivial things, ask yourself how you feel when you receive a code review. Are you excited? Or are you dreading it because you know that in the best case, it will be neutral silent approval, but in the worst case, it will be full of harsh criticism? Do you really want your coworkers to dread receiving reviews from you just because you are afraid of sounding silly?&lt;/p&gt;

&lt;p&gt;Another important role of &lt;strong&gt;positive feedback&lt;/strong&gt; is that it &lt;strong&gt;makes the reviewee more open to your negative feedback&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Do you have that one family member that uses every chance they see you to complain about you? You gained weight again, your sibling makes more money than you do, and you should smile more... How likely are you to actually consider their complaints as valid points that will inspire you to improve yourself? Not at all? Well, receiving only negative feedback from the same coworker for months feels the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  VII. Avoid judgemental and bossy language
&lt;/h3&gt;

&lt;p&gt;The easiest way to stop sounding judgemental and bossy is to &lt;strong&gt;assume you are wrong&lt;/strong&gt;, and the reviewee is right. &lt;strong&gt;Then ask questions&lt;/strong&gt; that will help you realize why you are wrong. After all, they probably spent much more time working on this code than you spent on reviewing it. They are more likely to understand the details.&lt;/p&gt;

&lt;p&gt;Do not say &lt;em&gt;"&lt;del&gt;don't do this, do that&lt;/del&gt;"&lt;/em&gt;. You don't want to cultivate in your coworkers the ability to follow orders. You want them to think creatively and critically. Besides, nobody likes to be bossed around.&lt;/p&gt;

&lt;p&gt;Instead, say &lt;em&gt;"what would you think about..."&lt;/em&gt;. Signal that you are open to a conversation. People are more motivated to do something if they were involved in making the decision.&lt;/p&gt;

&lt;p&gt;Do not say &lt;em&gt;"&lt;del&gt;why don't you just...&lt;/del&gt;"&lt;/em&gt;. This phrase suggests that your solution is the obvious choice and the reviewee is stupid for not using it. It might trigger a defensive reaction that will make otherwise smart and reasonable people passionately defend a flawed position.&lt;/p&gt;

&lt;p&gt;Instead, say &lt;em&gt;"have you considered...?"&lt;/em&gt;, explain why your solution would be advantageous in this situation and follow up with a friendly invitation to prove you wrong, e.g. &lt;em&gt;"...or did I miss something?"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Now, I am not saying you are actually always wrong. But &lt;strong&gt;you are definitely not always right&lt;/strong&gt;. This approach will make it easier for both you and the reviewee to admit when either of you is wrong &lt;strong&gt;without losing face&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  GitHub PR reviews
&lt;/h4&gt;

&lt;p&gt;GitHub has a feature that allows you to mark your pull request review as &lt;em&gt;comment&lt;/em&gt;, &lt;em&gt;accept&lt;/em&gt;, or &lt;em&gt;request changes&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I tend to avoid &lt;em&gt;requesting changes&lt;/em&gt; unless I am absolutely certain something needs to be changed. &lt;em&gt;Requesting changes&lt;/em&gt; is bossy language and doesn't leave much room for debate. I will make &lt;em&gt;comment&lt;/em&gt; reviews until all my questions have been addressed, and then &lt;em&gt;accept&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Great code reviews take time to do, but they will improve not only your project but your knowledge of the project and &lt;strong&gt;your relationship with your team&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Remember: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeping up to date with a changing codebase

&lt;ul&gt;
&lt;li&gt;I. Find out the &lt;em&gt;why&lt;/em&gt; first&lt;/li&gt;
&lt;li&gt;II. Read, don't skim&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Improving project quality

&lt;ul&gt;
&lt;li&gt;III. Always run the code&lt;/li&gt;
&lt;li&gt;IV. Do not nitpick&lt;/li&gt;
&lt;li&gt;V. Focus on readability issues that can't be detected automatically&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Providing feedback for the developer

&lt;ul&gt;
&lt;li&gt;VI. Always say something nice&lt;/li&gt;
&lt;li&gt;VII. Avoid judgemental and bossy language&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>codereview</category>
      <category>feedback</category>
      <category>codequality</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Working less than 40h a week?</title>
      <dc:creator>Angelika Cathor</dc:creator>
      <pubDate>Mon, 22 Oct 2018 10:09:13 +0000</pubDate>
      <link>https://dev.to/atyborska93/working-less-than-40h-a-week-1p1l</link>
      <guid>https://dev.to/atyborska93/working-less-than-40h-a-week-1p1l</guid>
      <description>&lt;p&gt;Do you work less than 40h a week as a regular employee (not a freelancer)?&lt;/p&gt;

&lt;p&gt;Most of us are familiar with the craziness around hiring experienced developers. We can't fill empty spots on our own teams, and constantly receive a sea of spam on LinkedIn.&lt;/p&gt;

&lt;p&gt;Some companies go out of their way to lure people. Fancy offices with kicker tables, free fruits, cereal, sweets, sometimes even a company car, and of course higher and higher salaries.&lt;/p&gt;

&lt;p&gt;But what if I don't want more money, but more free time?&lt;/p&gt;

&lt;p&gt;How realistic it is to ask for a shorter working day, let's say, 6h a day? Or maybe a shorter week, 8h a day, but Fridays off?&lt;/p&gt;

&lt;p&gt;I don't have any children or sick relatives I need to take care of, I just want to enjoy life a bit more.&lt;/p&gt;

&lt;p&gt;Does anyone here have such an arrangement on a regular employment contract? If yes, in which part of the World?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
    </item>
    <item>
      <title>What my bathroom window taught me about code quality</title>
      <dc:creator>Angelika Cathor</dc:creator>
      <pubDate>Sun, 06 Aug 2017 19:28:22 +0000</pubDate>
      <link>https://dev.to/atyborska93/what-my-bathroom-window-taught-me-about-code-quality</link>
      <guid>https://dev.to/atyborska93/what-my-bathroom-window-taught-me-about-code-quality</guid>
      <description>&lt;p&gt;&lt;em&gt;This post was initially published &lt;a href="http://angelika.me/2017/08/06/what-my-bathroom-window-taught-me-about-code-quality/" rel="noopener noreferrer"&gt;on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When my boyfriend moved into our current apartment, he realized there is a small flaw in the bathroom - only the bottom part of the window was made from frosted glass. The top half was crystal clear and would expose everything that happens in the bathroom to the neighbors on upper floors.&lt;/p&gt;

&lt;p&gt;He needed to cover the window to have some privacy.&lt;/p&gt;

&lt;p&gt;The proper solutions to covering a window are curtains, shutters, roller blinds, or frosted window film. The first three have the advantage of having two states, the window can be either covered or uncovered without dismantling the thing, but they also block the sunlight. The last one covers the window all the time but lets the sunlight in.&lt;/p&gt;

&lt;p&gt;All of them require planning and money, and are not doable on a single evening, especially when the shops had already closed for the day.&lt;/p&gt;

&lt;p&gt;My boyfriend needed to take a shower in that bathroom that evening.&lt;/p&gt;

&lt;p&gt;His solution - tape a piece of cardboard to the window.&lt;/p&gt;

&lt;p&gt;Almost a year later, that window is still covered by the same piece of cardboard. Why? Because it was the solution with the highest ratio of value to cost.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was quick and cheap. The required materials, tape and cardboard, were already in the apartment.&lt;/li&gt;
&lt;li&gt;It is effective. It completely stops the neighbors from seeing what they should not see.&lt;/li&gt;
&lt;li&gt;It is not a problem that the cardboard stops sunlight. The bathroom already gets plenty of sunlight from the bottom window.&lt;/li&gt;
&lt;li&gt;It is not a problem that the window cannot be easily covered and uncovered without tearing down the cardboard. The window is too high to reach without a ladder.&lt;/li&gt;
&lt;li&gt;It is not a problem that the cardboard is ugly. We do not really care.&lt;/li&gt;
&lt;li&gt;There are no young and impressionable interior designers coming over to our apartment, looking at that window and thinking that a cardboard stuck to the window is a good design pattern.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So... what's the point?
&lt;/h2&gt;

&lt;p&gt;This is just a silly example, but it made me think about how I approach the quality of the code I write and the code I expect from others.&lt;/p&gt;

&lt;p&gt;I suffer from perfectionism. My coworkers complain that I can be too demanding of them (but also of myself). Sometimes I catch myself being really stubborn during a code review (sincere apologies to everyone that was ever affected). If that happens, I try to stop and ask myself - what is this code for?&lt;/p&gt;

&lt;p&gt;The value of the code is the usability it brings to the user, not its cleanliness or beauty.&lt;/p&gt;

&lt;p&gt;The price of the code is the time and the energy spent to develop it.&lt;/p&gt;

&lt;p&gt;Usually, bad code is expensive. Bad code is hard to understand. Bad code is hard to debug. Bad code is hard to extend. Because of all of these reasons, bad code also decreases the value that can be delivered in the future.&lt;/p&gt;

&lt;p&gt;But sometimes, just sometimes, you know you are writing code that will never again be read, and will never be modified. You know it will be used, maybe just once or twice, and then it will be thrown away. That is when bad code is cheap.&lt;/p&gt;

&lt;p&gt;I understand now that a good software developer is not somebody who delivers good, clean code all the time, but somebody that is able to assess the situation and deliver a solution with the highest ratio of value to (&lt;strong&gt;long-term&lt;/strong&gt;) cost. Even if that means writing a quick dirty hack once in a while.&lt;/p&gt;

&lt;p&gt;Oh, but try to make sure no young and impressionable junior developers will come over to your code base, look at that bad code and think it's a good design pattern since a respected developer like yourself wrote it. Maybe leave a word of warning in a comment?&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="c1"&gt;# Here be dragons!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Forgive me, Father, for I have sinned...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ~~~ POLICE LINE DO NOT CROSS ~~~ POLICE LINE DO NOT CROSS ~~~&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# I was young and I needed the money.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>bestpractices</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
