<?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: Riya Dattani</title>
    <description>The latest articles on DEV Community by Riya Dattani (@riyadattani).</description>
    <link>https://dev.to/riyadattani</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%2F182100%2F8493c017-41b3-4621-a12d-510768025a19.jpeg</url>
      <title>DEV Community: Riya Dattani</title>
      <link>https://dev.to/riyadattani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/riyadattani"/>
    <language>en</language>
    <item>
      <title>Deep dive into pair programming</title>
      <dc:creator>Riya Dattani</dc:creator>
      <pubDate>Thu, 13 Mar 2025 13:57:15 +0000</pubDate>
      <link>https://dev.to/riyadattani/deep-dive-into-pair-programming-3gde</link>
      <guid>https://dev.to/riyadattani/deep-dive-into-pair-programming-3gde</guid>
      <description>&lt;p&gt;Before I switched careers into software development, I didn't have a clue of what a complex system looked like, how they are created and the effort spent building them. I had a misconception that programmers spent a lot of time writing code independently. When I started learning how to code and speaking to developers about their experiences, I was quite astonished at the collaborative culture within software development. In my job, I continually interact with other developers, the product owner, the UX/UI designers and sometimes the stakeholders of the product we are working to build. I am encouraged to not only share my thoughts on technical aspects, but on UX/UI prototypes and on the value of the features we are building for our users. My role as a software developer is much more than just coding. In this blog however, I want to focus on how developers collaborate through pair programming.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pair programming
&lt;/h2&gt;

&lt;p&gt;Pair programming is where two developers work together to solve a problem. Whilst there are advantages to pairing most of the time, I think there are some occasions when it is better to work individually.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When&lt;/em&gt; it is suitable to pair? Well, it depends on what the specific task entails. Is it a laborious task of deleting dead code or is it a new search feature? There are some tasks that are just not worth the time of two developers. One of the developers is likely to sit and stare at the screen watching the other developer continue with the task. I put together a non-exhaustive list of questions that I would ask myself to determine if its worth pairing or not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is it beneficial for another member of the team to have context of the code that will be added (or refactored)? Knowledge sharing is encouraged so that every developer is familiar with the entire code base and is comfortable enough to pick up any ticket on the board.&lt;/li&gt;
&lt;li&gt;Is this a learning opportunity for another developer? The work may not be something new and shiny but say you had a new joiner and you were touching some part of the code that would help them understand the project better.&lt;/li&gt;
&lt;li&gt;Can the work be broken down into extremely small tasks where it makes sense to divide and conquer rather than pair? For example, it might make more sense to divide a bunch of small UI tweaks if they are relatively straight forward.&lt;/li&gt;
&lt;li&gt;Is this a growth opportunity for a budding developer to work on a task individually? It is liberating and exciting for a novice to tackle a challenging task themselves. It is an opportunity for them to make mistakes, learn about their thought process when analysing a technical problem and get feedback on their work.&lt;/li&gt;
&lt;li&gt;Are you in the &lt;em&gt;mood&lt;/em&gt; to pair? This is a tough one because it is so subjective. Some developers would love to just plug in their headphones and get on with their task. Some need a social break because pairing can be extremely exhausting since you have to communicate for long periods of time over difficult code stuff. Pairing contributes to overall productivity but &lt;em&gt;up to a certain point&lt;/em&gt;. I think you can experience diminishing returns when it becomes tiring and you cannot optimally contribute. I think most people can sense when this happens and they should just be honest about wanting to branch off and work on something solo.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of pair programming:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Driver-navigator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a classic pair programming style. One developer is the person on the wheel (i.e. keyboard) and their role is to type code. The other acts as the "observer" and their role is to review the code on-the-go and navigate the driver on &lt;em&gt;what&lt;/em&gt; to code. This exercise should involve the navigator explaining &lt;em&gt;how&lt;/em&gt; they plan to solve a problem and prompt the driver to codify that idea. The navigator should avoid dictating the code word for word to the driver. I think this pairing practice is useful when a more experienced developer is coaching another developer on how to code.&lt;/p&gt;

&lt;p&gt;In my opinion, 20 minutes or less is a reasonable amount of time to write some useful code. These short sessions encourage developers to make small, iterative changes because you would ideally want to integrate that code often. Switching between the two roles is important because the perspective on the code is different. The drivers job is to think about the nitty gritty of the code at hand. The navigator can think more strategically about the bigger picture such as potential obstacles that might arise.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The key to pairing is to switch roles frequently.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In practice, these guidelines are not always strictly followed. There have been a number of times in my own experience where a developer and I have not switched roles for an hour or even more sometimes. Those sessions drained us and rendered us unmotivated. Ultimately, since the work still needs to be done, the solution is less thought through and important steps such as refactoring could be missed out of laziness. Switching roles increases the participation from each developer and thus the energy levels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Ping pong&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ping pong pair programming is a fun way to program and it revolves around writing tests. In this style, developer X writes a test and developer Y writes the code to pass that test. Developer Y then writes the next test and developer X has to write the code to pass the test. This is a great technique because you are following Test Driven Development (TDD). TDD is a whole other topic in itself but, writing tests that reflect the desired &lt;em&gt;behaviour&lt;/em&gt; is a good &lt;em&gt;tool&lt;/em&gt; to design good, modular software. Read &lt;a href="https://quii.dev/The_Why_of_TDD" rel="noopener noreferrer"&gt;this post&lt;/a&gt; written by my colleague if you are interested in a convincing article about TDD.&lt;/p&gt;

&lt;p&gt;This is my favourite pairing style. A major plus point is that the developer writing the test is focusing on writing a useful test without the solution in mind because the solution will be implemented by their pairing partner. This leads to clear, understandable tests and therefore a good chance of well-designed production code. I like how the code can evolve in an unexpected way when bouncing off each other's code and tests.&lt;/p&gt;

&lt;p&gt;The well-known TDD steps should be followed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Red&lt;/strong&gt;: write a failing test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Green&lt;/strong&gt;: write the minimum amount of code to pass the test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refactor&lt;/strong&gt;: refactor the code to improve your solution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the important steps to remember is the refactoring stage because it is your moment to &lt;strong&gt;design well&lt;/strong&gt;! You have reliable tests and working software so refactoring should only improve the quality of your code (if done correctly of course). Can you spot a pattern in your code? Can you extract some code to make it more readable?  Are you injecting dependencies in a function or a class? Are you following &lt;a href="https://en.wikipedia.org/wiki/SOLID" rel="noopener noreferrer"&gt;SOLID principles&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Diverge-converge&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is not a very well-known technique but it is something I picked up whilst I was at a coding bootcamp. This technique involves two developers diverging out on their own to figure out how they would solve a problem and then converging back together to discuss and decide what they will implement. I think this technique useful when there is not a concrete plan on how to make something work. This method is suitable if the task requires a lot of research or reading through documentation which is more efficiently done solo rather than in a pair. The developers could perform a spike to see if their solution actually works (a spike is experimenting/exploring with some code). However, once you figure out something viable, it is important to bin all that code and start again using TDD.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after pairing
&lt;/h2&gt;

&lt;p&gt;There are different pair programming methods to &lt;em&gt;code&lt;/em&gt; together. But when picking up a task, there are other important ceremonies before and after coding.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kick-off&lt;/strong&gt;: Fully understand the use case by fleshing it out with the rest of the team including any non-devs that can provide more context. I find breaking down the scenarios into a test case structure e.g. "given, when, then" is quite helpful. Think about any dependencies you may have beforehand e.g. how are you going to integrate with an external service?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start pair programming&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Definition of done&lt;/strong&gt;: Once you finish a story, run through a sanity checklist (approved by the team) to determine if you have sufficiently done the task to an agreed standard with your pairing partner.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Silos
&lt;/h2&gt;

&lt;p&gt;We talked about &lt;em&gt;how&lt;/em&gt; developers can work together but I think it's interesting to note &lt;em&gt;why&lt;/em&gt; working in silos can damage overall output.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A developer can be shoehorned into building one specific part of the system just because they are most familiar with it. What happens when they leave or are on holiday for an extended period of time? Other team members are likely to take a long time to familiarise themselves with the code and question some decisions (especially if they are not documented).&lt;/li&gt;
&lt;li&gt;A developer can miss out on instant feedback and may need to wait for a pull request (PR) review depending on the teams workflow. Having another pair of eyes providing instant feedback and understanding the thought process is more efficient than reading a PR and requesting changes (and then reviewing subsequent changes on top of that). In fact through pairing, there would not be a need to raise a PR since your pairing partner has worked on the code with you. If you pair regularly and trust the developers on your team, why not consider trunk-based development? Make small iterative changes and &lt;em&gt;really&lt;/em&gt; practice continuous integration by working on the most recent codebase.&lt;/li&gt;
&lt;li&gt;Two heads are better than one. To design code that is sustainable, scaleable and all the lovely things developers want, you need to think about it. Discussing ideas, possibilities and architecture with another developer usually always produces a better outcome.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of pair programming
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Knowledge sharing. Mitigating knowledge gaps leads to better decision making, increases the ability to work smarter and faster as a team and increases engagement.&lt;/li&gt;
&lt;li&gt;Coaching and mentoring opportunities. More experienced developers have a chance to nurture less experienced developers and hone in on their coaching or teaching skills.&lt;/li&gt;
&lt;li&gt;Increased communication. It is an opportunity to ask questions and discuss the reasoning behind the code. If you can explain the code to another developer well, it probably makes sense. If you can explain the code to a non-techie, then you are definitely doing something right - it's a very useful skill to explain code in lament terms.&lt;/li&gt;
&lt;li&gt;Create and build relationships with other developers. You are likely to talk about other non-work related things and connect with your colleagues on a deeper level. Having this strong synergy and an open, comfortable relationship within a team will foster a fun culture where people enjoy coming to work, trust each other and thus accelerate productivity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, I think pair programming can be quite enjoyable if done correctly. Here are my top tips to pairing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Don't hog the keyboard. &lt;strong&gt;Switch roles&lt;/strong&gt; often and work in small steps. Maybe try to use the &lt;a href="https://en.wikipedia.org/wiki/Pomodoro_Technique#Description" rel="noopener noreferrer"&gt;Pomodoro technique&lt;/a&gt;?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Take breaks!&lt;/strong&gt; Thinking, talking and typing can get exhausting so it's refreshing to take frequent short breaks.&lt;/li&gt;
&lt;li&gt;Are you in a &lt;strong&gt;"pairing mood"?&lt;/strong&gt; If not, be honest about it and maybe work on something that can be done by yourself for a while.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotate the pairs&lt;/strong&gt;. Anchor a story to one developer but change their pair partner everyday. This spreads knowledge and forces the developer anchored to the story to reevaluate and reinforce their decisions by explaining them again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Riya xo&lt;/p&gt;

</description>
      <category>pairprogramming</category>
    </item>
    <item>
      <title>IntelliJ Shortcuts (for Mac)</title>
      <dc:creator>Riya Dattani</dc:creator>
      <pubDate>Mon, 09 Dec 2024 10:49:24 +0000</pubDate>
      <link>https://dev.to/riyadattani/intellij-shortcuts-for-mac-4fca</link>
      <guid>https://dev.to/riyadattani/intellij-shortcuts-for-mac-4fca</guid>
      <description>&lt;p&gt;Be an expert at using your tools so you can concentrate on solving problems! I couldn't find a short and practical IntelliJ shortcuts cheat sheet, so here are the ones I generally use, categorised by activity.&lt;/p&gt;

&lt;h3&gt;
  
  
  The OG shortcuts
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;SHIFT + SHIFT&lt;/code&gt; - the IntelliJ search for &lt;em&gt;anything&lt;/em&gt; including files, actions, symbols etc... press tab to be more specific.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OPTION + ENTER&lt;/code&gt; - gives you a list of things you can do depending on where you are. For example, if you are in the middle of an argument list you can put all arguments in one line or multiple lines or add the argument names. This is one example of MANY. Just keep pressing it. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + V&lt;/code&gt; - a log of all the recent things in your clipboard (this is interestingly one of the most useful things).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Navigating the code
&lt;/h3&gt;

&lt;p&gt;Hopping around the codebase to follow a trail is probably what you spend a lot of your time doing. You&lt;br&gt;
might as well be super efficient at it!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;CMD + B&lt;/code&gt; - declarations of the variable/function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + OPTION + B&lt;/code&gt; - implementations of the interface/function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + U&lt;/code&gt; - go UP to the interface it implements&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + E&lt;/code&gt; - got to recent files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F2&lt;/code&gt; - go to next error&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + 1&lt;/code&gt; - view project sidebar&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + [&lt;/code&gt; - back&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + ]&lt;/code&gt; - forward&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + F12&lt;/code&gt; - view the structure of the file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + BACKSPACE&lt;/code&gt; - go to the last edited bit of code&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CTRL + SHIFT + DOWN/UP KEY&lt;/code&gt; - hop down or up the methods in the file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + UP&lt;/code&gt; - navigate up the hierarchy&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + ,&lt;/code&gt; - IntelliJ settings&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OPTION + F12&lt;/code&gt; - go to terminal&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + W&lt;/code&gt; - close tab&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Refactoring
&lt;/h3&gt;

&lt;p&gt;Ninja developer level.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;OPTION + T&lt;/code&gt; - when your cursor is on the function, this shortcut will give you a menu of what you can do (some of
the most common ones are listed below)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + V&lt;/code&gt; - extract to a variable&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + N&lt;/code&gt; - inline variable&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + M&lt;/code&gt; - extract to a method&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + F6&lt;/code&gt; - change signature of the function (it will automatically update it everywhere it's used)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SHIFT + F6&lt;/code&gt; - rename variable&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F6&lt;/code&gt; - move class/interface/function to a different file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CTRL + OPTION + O&lt;/code&gt; - (not zero but the letter "O") to optimise imports &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + DOWN&lt;/code&gt; - when your cursor is on the name of the function/class, use this to move the whole block&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + ENTER&lt;/code&gt; - IntelliJ will autocomplete the block like "if" or "when"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + OPTION + SHIFT + L&lt;/code&gt; - reformat the whole file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OPTION + OPTION + DOWN KEY&lt;/code&gt; - multiple curses in the same location on the next line&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OPTION + UP/DOWN KEY&lt;/code&gt; - Expand/shrink highlighted code within bounded contexts &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + F&lt;/code&gt; - find all&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + R&lt;/code&gt; - replace all&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CTRL + G&lt;/code&gt; - highlight text and use this shortcut, it will find the next bit that matches that code one by one &lt;em&gt;with a cursor&lt;/em&gt; and then you can edit it&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Tests
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;CMD + R&lt;/code&gt; - re-run the previous test&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + R&lt;/code&gt; - run the test your cursor is on&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + N&lt;/code&gt; - in the test class, this shortcut will provide you with a menu of options to create test/setup/teardown func&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + D&lt;/code&gt; - debug the test you are on&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Actions
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;CMD + SHIFT + A&lt;/code&gt; - the ultimate shortcut to access the IntelliJ action window. Once you are here you can search for any action you want to do. Here are some of the ones I use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable soft-wrap&lt;/li&gt;
&lt;li&gt;Split screen and move right&lt;/li&gt;
&lt;li&gt;Open blank diff window&lt;/li&gt;
&lt;li&gt;Zoom&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Git
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;CMD + T&lt;/code&gt; - git stash, git rebase/merge, git pop - done automatically&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + OPTION + N&lt;/code&gt; - when you are on the git window, use this shortcut to create a branch&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + K&lt;/code&gt; - commit&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + K&lt;/code&gt; - push&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Create your own
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Templates&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can do magic. You can create templates linked to particular words. For example, you can configure IntelliJ to spit out this code when you write the word "test":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Test
fun `$NAME$`() {
    $END$
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cursor will automatically  be at &lt;code&gt;$NAME$&lt;/code&gt; so you can immediately type out the name. When you press enter, the cursor jumps to &lt;code&gt;$END$&lt;/code&gt; which will allow you to land in the right place to write your test. &lt;/p&gt;

&lt;p&gt;P.s. this particular helper already exists in IntelliJ (listed above). Within a test class, use &lt;code&gt;CMD + N&lt;/code&gt; and a list of options will pop up to create a test / set up / tear down func.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Settings -&amp;gt; Editor -&amp;gt; Live templates -&amp;gt; Kotlin (for example) -&amp;gt; Add a template&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keyboard shortcuts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Settings -&amp;gt; Keymap&lt;/code&gt; - this is tricky because there could be clashes with other MAC/IntelliJ shortcuts&lt;/p&gt;

&lt;h2&gt;
  
  
  Practice makes perfect
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/daviddenton/refactoring-golf" rel="noopener noreferrer"&gt;Refactoring golf&lt;/a&gt; is a fun exercise to practice! &lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus - Google Chrome shortcuts
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;CMD + T&lt;/code&gt; - new tab&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + SHIFT + T&lt;/code&gt; - re-open closed tab&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + [&lt;/code&gt; - back&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + ]&lt;/code&gt; - forward&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CTRL + TAB&lt;/code&gt; - hop to next tab&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + W&lt;/code&gt; - close tab&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + N&lt;/code&gt; - new Chrome window&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + BACKTICK&lt;/code&gt; - tab to other Chrome window&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F12&lt;/code&gt; - open developer tools&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CMD + TAB&lt;/code&gt; - go to different application&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you know any other exciting shortcuts, leave a comment. &lt;/p&gt;

</description>
      <category>intellij</category>
      <category>shortcuts</category>
      <category>efficiency</category>
    </item>
    <item>
      <title>My journey to writing my blog in Go</title>
      <dc:creator>Riya Dattani</dc:creator>
      <pubDate>Wed, 14 Apr 2021 18:12:09 +0000</pubDate>
      <link>https://dev.to/riyadattani/my-journey-to-writing-my-blog-in-go-5b4j</link>
      <guid>https://dev.to/riyadattani/my-journey-to-writing-my-blog-in-go-5b4j</guid>
      <description>&lt;p&gt;Originally posted on &lt;a href="http://www.riyadattani.com" rel="noopener noreferrer"&gt;www.riyadattani.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built my blog (&lt;a href="http://www.riyadattani.com" rel="noopener noreferrer"&gt;www.riyadattani.com&lt;/a&gt;) from scratch, without a blog engine. I used Go to build it and some html + css to make it look pretty.&lt;br&gt;
This is my first personal project in Go, in fact, its my first personal project on a live&lt;br&gt;
website. &lt;a href="https://twitter.com/DattaniRiya" rel="noopener noreferrer"&gt;Tweet me&lt;/a&gt; if you have any feedback whether its kind, mean or funny!&lt;/p&gt;

&lt;p&gt;So I made the decision to make a blog in Go because it was different language to what I normally use at work (Node) and&lt;br&gt;
when I was introduced to it, it felt fun and simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  First attempt
&lt;/h3&gt;

&lt;p&gt;Once the decision was made, the question was where do I begin? I surfed the web and looked for other desirable blogs. I gathered a list of my favourite features and thought I would figure out a way to replicate them. I wanted very cool&lt;br&gt;
features like an animated background and an interactive interface such as a built in game. These features sounded&lt;br&gt;
fabulous but in reality, they were a nice-to-have rather than necessary. Frankly, the more I thought about what my blog&lt;br&gt;
should look like, the more I ventured further away from the purpose of the blog: to share articles. "Agile" developers&lt;br&gt;
would say I envisioned a shiny gold standard website rather than a MVP (Minimum Viable Product).&lt;/p&gt;

&lt;p&gt;I started building the &lt;code&gt;Hello World&lt;/code&gt; version of my site and I cheated a little by not writing any tests. Not very long after, I frantically searched for tutorials to get me these fancy features. I was directed to multiple plugins, I&lt;br&gt;
read a lot of stack overflow and I spent most of my time searching for resources on google rather than coding... I&lt;br&gt;
eventually got frustrated. Naturally, I didn't want to open the project anymore because I didn't really know what to do&lt;br&gt;
and where to start.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I needed to go back to the basics and start simple.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On a fine Hackday, I was experimenting with Hotwire and Go with my colleagues. We built a simple todo list app with&lt;br&gt;
basic CRUD functionality. Thanks to the fast, non-hassle set up to get a website up and running in Go, once the bare&lt;br&gt;
bones were wired up, we iteratively fleshed out all the routes and basically built the app in a day. The simplicity&lt;br&gt;
inspired me to start building my blog again. The process felt easy, simple and doable. I wanted to restart building it&lt;br&gt;
using the same strategy and foundation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Second attempt
&lt;/h3&gt;

&lt;p&gt;Before my second attempt, I reflected on my previous approach/process and learned from my mistakes. Here were my&lt;br&gt;
learnings:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Remember the &lt;em&gt;purpose&lt;/em&gt; of what I am trying to build. As a programmer, we should focus on WHAT, WHY and HOW we are&lt;br&gt;
going to solve a specific problem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt;: I want to build a blog where I can share articles of topics that I am interested in and I am learning
about.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why&lt;/strong&gt;: I want to build a network and connect with people who have similar interests, share knowledge that other
people might find useful and practice communicating through writing effectively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How&lt;/strong&gt;: I made a decision to not use a blog engine and to build the blog from scratch in Go in an &lt;em&gt;iterative&lt;/em&gt; way. Whilst a blog engine would easily achieve my goals, I would not have gained this invaluable learning experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Decide on the &lt;em&gt;MVP&lt;/em&gt;: I wrote down 2 features which I think I need for my blog to be functional.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A home page which has a list of my blogs in descending order by date.&lt;/li&gt;
&lt;li&gt;The blogs are links that open up on a separate page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Write &lt;em&gt;tests&lt;/em&gt; or you will regret it in the future.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go through &lt;a href="https://github.com/quii/learn-go-with-tests" rel="noopener noreferrer"&gt;Learn Go With Tests&lt;/a&gt; to learn how to test the code &lt;em&gt;correctly&lt;/em&gt; in Go.&lt;/li&gt;
&lt;li&gt;What would be included in my acceptance test? Do I need one?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have a &lt;em&gt;process&lt;/em&gt; and develop it to be more systematic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Github Issues&lt;/strong&gt;:  I used these to keep a backlog of tasks, bugs and general thoughts that need doing especially
when they crop up in the middle of something else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous Integration&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;I tried to apply some processes from work to make it as easy as possible to continuously integrate my code to
the live site. I created a github action that builds and deploys the code, every time I push to master. I
always work on master.&lt;/li&gt;
&lt;li&gt;I took this opportunity to learn more about docker. I used docker to build my code in a container and this is
used by Heroku when deploying my site.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't bother following a tutorial. Figure out what you &lt;em&gt;want&lt;/em&gt; to build in the simplest way possible. I started with a&lt;br&gt;
hard coded blog list on the site and then aimed to replace it with non-hard coded blogs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In retrospect, I would have &lt;em&gt;still&lt;/em&gt; done things differently if I took another shot at creating this blog again. I guess&lt;br&gt;
that's the best (or worst) thing about software development - nothing is perfect and there is &lt;em&gt;always&lt;/em&gt; room to improve.&lt;br&gt;
Looking back at my second attempt at building this blog, here is what I would've done differently:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;TDD it. No, I mean &lt;em&gt;actually&lt;/em&gt; TDD it. Yes, I realised that writing &lt;em&gt;no tests&lt;/em&gt; would hurt me in the future and make me
less confident in my code, but I still did not &lt;em&gt;strictly&lt;/em&gt; follow TDD. I added a couple of tests with respect to my
router after writing it up and I realised I probably would've created a better solution if I had tested it first.&lt;/li&gt;
&lt;li&gt;Don't get obsessed over the CSS - this can be done over time. The perfectionist in me was running around in circles.
Instead of focusing on the most important task, I wanted to make the site look pixel perfect.&lt;/li&gt;
&lt;li&gt;Get feedback on the code and the design as soon as possible.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In hindsight, building this blog has been a fantastic learning experience! I felt technically challenged and I learned about the process of creating a website from scratch to live. &lt;/p&gt;

</description>
      <category>go</category>
    </item>
  </channel>
</rss>
