<?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: Nick Cinger</title>
    <description>The latest articles on DEV Community by Nick Cinger (@nebojsac).</description>
    <link>https://dev.to/nebojsac</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%2F53547%2Ffb2887b8-6d78-45b1-bf3c-00d8f3330d1c.jpg</url>
      <title>DEV Community: Nick Cinger</title>
      <link>https://dev.to/nebojsac</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nebojsac"/>
    <language>en</language>
    <item>
      <title>Surviving the Legacy</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Mon, 28 Oct 2019 08:20:46 +0000</pubDate>
      <link>https://dev.to/nebojsac/surviving-the-legacy-136k</link>
      <guid>https://dev.to/nebojsac/surviving-the-legacy-136k</guid>
      <description>&lt;p&gt;Legacy code. Just reading the words out loud will make developers wince. Partially 'cause of their own horrid experiences, but also because of an ongoing meme that Legacy code is &lt;em&gt;literally the worst&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This &lt;em&gt;meme&lt;/em&gt; has origins in reality. Hard to debug and dificult to rewrite code is nobody's &lt;em&gt;dream&lt;/em&gt;. The &lt;em&gt;dream&lt;/em&gt;^tm is building a brand new, fresh out of the oven, no-prior-baggage project in which the code editor is your oyster.&lt;/p&gt;

&lt;p&gt;The dream is definitely &lt;em&gt;not&lt;/em&gt; "going down a decade old rabbit-hole of debugging". The dream &lt;em&gt;might be&lt;/em&gt; "working on a new feature without having to think about how it's going to break another part of the system".&lt;/p&gt;

&lt;p&gt;Alas, you don't always get to pick. You work with the cards you're dealt, and folding your hand is a tempting option. I'm going to make the case for staying in the game even if it feels hopeless at times.&lt;/p&gt;

&lt;p&gt;But first, let's paint a picture of a Legacy code-base.&lt;/p&gt;

&lt;h2&gt;
  
  
  The background
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fu5nz24kn4mtm7umtm2j2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fu5nz24kn4mtm7umtm2j2.jpg" alt="Picture of messy cables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just in case you're not currently working with a monstrosity, let's give you a background of an "imaginary" project. The project is 10 years of tech debt. It had started as a mish-mash of code from several developers, working with no clear guide or vision.&lt;/p&gt;

&lt;p&gt;The higher ups, thinking that 5 average developers are better than 2 great ones, had thought that they were a better cost-to-code ratio. None of the developers had the necessary experience to see where the project was going. They were busy working away on their own little corner of it, not paying attention to the bigger picture.&lt;/p&gt;

&lt;p&gt;So you have several contributors to the code and no style guide. You also have no oversight, no code reviews and &lt;em&gt;obviously&lt;/em&gt; no unit tests nor documentation. But hey, they were churning away, knocking down requirements one by one.&lt;/p&gt;

&lt;p&gt;Since there wasn't a proper release or testing process involved, there were bugs. &lt;em&gt;God&lt;/em&gt; there were bugs. And then the merge conflicts came. And so the developers started dropping off, replaced by other new ones, adding more to the confusion.&lt;/p&gt;

&lt;p&gt;A few years into the project money was growing tight as the product was sub-par in an overcrowded market. Features were coming out too slow and they were too buggy to keep users interested. As a result, deadlines became tighter and code kept getting worse.&lt;/p&gt;

&lt;p&gt;But &lt;em&gt;somehow&lt;/em&gt;, through it all, the project turned a profit a few years in. It had users and money coming in. So now stability of the project is a lot more important than it was while it was still just under development.&lt;/p&gt;

&lt;p&gt;There is still no documentation. The best you could hope for are random code comments and the outdated knowledge base. Unit tests have been poorly implemented. They run too slow and developers have to run them manually. The result: nobody runs the tests.&lt;/p&gt;

&lt;p&gt;A few more years, the project is actually making bank. The code is officially "Legacy" and is a proper pain to work with. But the business can't sit still, it needs features and it needs more developers. Gradually the consequence of the aged code-base become evident.&lt;/p&gt;

&lt;h2&gt;
  
  
  The consequences
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff2zpvf4scli0uapmu65o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff2zpvf4scli0uapmu65o.png" alt="MonkeyUser comic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're Johnny Newdev. You've been hired to supplement the developer team and help them fix bugs and add features. The hope is that you'll be doing more of the latter, but as time goes by you see it's more of the former...&lt;/p&gt;

&lt;p&gt;It took the team lead a week to onboard you. The team is already swamped and now they have to spend time setting you up. Unfortunately they haven't done this in a while and the process is not documented. You're given this Disk Image of what seems to be everything and the kitchen sync of the project, but even that doesn't work. You have the code, a virtual machine and a hastily prepared development database.&lt;/p&gt;

&lt;p&gt;The first few days are spent debugging network and database issues. The rest are you adding the undocumented dependencies to your system. On day 5 you can finally load the website locally without any (major) errors.&lt;/p&gt;

&lt;p&gt;Parts of the system still don't work, but you're told not to worry about it. "We'll set you up once you need to work on those bits" is what you're told. Of course those are the bits that actually need to be worked on, so you spend a few more days setting those up.&lt;/p&gt;

&lt;p&gt;Finally you're fixing your first bug. The lead developer is confident that there's no way you can muck it up, seeing as it's an isolated part of the system.&lt;/p&gt;

&lt;p&gt;Your code is online. Half an hour later the team finds out the signup form is broken. Whatever you did, it worked locally, but the code behaved differently on the server. You go into firefighting mode and fix it &lt;em&gt;on the server&lt;/em&gt; to not waste time with the slow deployment. &lt;em&gt;Yes, for some reason you have root access to the server.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So now that it's fixed, you're terrified of changing anything else. You triple check your code and keep a very close eye on Production once the code is online. This also means you're behind on your deadlines which in turn means you're rushing stuff out, which means you're doing even more firefighting. It becomes an endless, but expected, cycle.&lt;/p&gt;

&lt;p&gt;You think back to this game you played a while back, called Dwarf Fortress. In the game you manage an expedition of dwarfs, mining through the mountains to build out a fortress and accumulate fortune. The game has it's own definition of &lt;a href="http://dwarffortresswiki.org/index.php?title=DF2014:Fun&amp;amp;redirect=no" rel="noopener noreferrer"&gt;FUN&lt;/a&gt;. One of the most common ways to "have FUN" is the so-called "Tantrum spiral".&lt;/p&gt;

&lt;p&gt;It starts with one of your dwarfs getting into a foul mood for whatever reason. Maybe they saw a dead animal, or a piece of art rubs them the wrong way. They now proceed to punch the dwarf nearest to them out of frustration. So now you have two pissed off dwarfs and they spread the mood further. Two become four, four become eight and eventually your entire fort grinds to a halt. Everyone is too exhausted or angry to work and the lack of beer is not helping matters. And then the goblins come - your adventure ends.&lt;/p&gt;

&lt;p&gt;You're seeing the Tantrum Spiral play out before your eyes. Releases are slow and buggy, which means the users are unhappy. Money starts to dry up so management gets pissed. Developers are put under pressure to produce more and produce it faster. The result being that team produces buggier and less stable features, which in turn angers users, which angers management again, which fires a developer in attempts to "fix" the new budget problems. This just makes things worse and the spiral downwards continues.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Damn, just writing that out is giving me anxiety.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The problems are obvious by now and the team is brainstorming solutions.&lt;/p&gt;

&lt;h1&gt;
  
  
  The "not actually solutions"
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff12g3myqlvgnse65fp23.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff12g3myqlvgnse65fp23.jpg" alt="brainstorming session people around a table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Let's start from scratch!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yeah, that would feel great! Just throw away the baggage and use the things you learned to build a better product. So, what does a timeline for this look like?&lt;/p&gt;

&lt;p&gt;The project has &lt;em&gt;years&lt;/em&gt; of features behind it. And although you could build it faster this time, it would still take you a year &lt;em&gt;at least&lt;/em&gt;. That's a whole year of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No new features&lt;/li&gt;
&lt;li&gt;Less new users&lt;/li&gt;
&lt;li&gt;Lost users&lt;/li&gt;
&lt;li&gt;Lost opportunities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And there's no guarantee that the end result is going to be all that great or even on schedule! This is the development equivalent of nuking the planet because you're fed up with wars. The thing is, that's not a sure-fire way to get long-term world peace. Odds are that the newly formed nations will just have history repeat itself.&lt;/p&gt;

&lt;p&gt;Eventually the same problems that got you into this mess are going to start creeping up again - unless you deal with them first. And that's assuming that the business survives a year of code-freeze, even if you could produce that pristine piece of perfection you're imagining.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Let's migrate to this new tech&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No. Just no. Even entertaining this idea as a feasible suggestion is a sign of either a very inexperienced developer, or a developer that loves chasing the new hotness. Neither of those will help you claw your way out of Legacy - they're liable to just plop you into a soon-to-be Legacy code-base.&lt;/p&gt;

&lt;p&gt;You should stick with battle-tested frameworks and processes for a few reasons. For starters, your team probably has more experience with it, and even if they don't the internet has years of solutions to problems with the given tech. Imagine going to Google and not finding a solution to your problem?&lt;/p&gt;

&lt;p&gt;Even worse, imagine going to Google and the only result is a link to the same question you have. But it has no answer yet and it was posted only &lt;em&gt;8 hours ago&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Best case scenario, the new tech is supported long enough for you to finish your migration project. Worst case, it's abandoned for the &lt;em&gt;next trendy piece of tech&lt;/em&gt; while you're mid-way through the rewrite. &lt;em&gt;Good luck rewriting the rewrite.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Granted, if the tech you're using is already deprecated, you should at least entertain the idea of a proper upgrade.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;In that case, let's work on cleaning up the current code without working on new features.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This idea is not going to make it past management, and for good reason. Again you're putting the business at risk, and with it your chances of making it to the end release. But this is the closest one to an actual solution, and with a few more pointers it can be part of your battle-plan.&lt;/p&gt;

&lt;p&gt;I think we've painted a bleak enough picture. Let's talk solutions!&lt;/p&gt;

&lt;h2&gt;
  
  
  How does one fix "debt"? You start paying it off.
&lt;/h2&gt;

&lt;p&gt;First of all, the Legacy code-base is not the cause of your problems. It's just the most glaring of all the side-effects. And if googling medical conditions online has taught me anything, it's that you should treat the cause and not the symptoms!&lt;/p&gt;

&lt;p&gt;Start fixing what got you into this mess in the first place.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Standardize processes around development&lt;/em&gt;. It's more than just style guides and folder structures for your code. It means &lt;em&gt;actually writing documentation&lt;/em&gt;. It means &lt;em&gt;automating deployments&lt;/em&gt;. Automated tests have to be the &lt;em&gt;cornerstone&lt;/em&gt; of your project, and not just an afterthought.&lt;/p&gt;

&lt;p&gt;Obviously you're picking up where you left off with your code. You can't throw it all out (&lt;em&gt;we went over this&lt;/em&gt;) but you can follow some guidelines that will clean things up in the long run.&lt;/p&gt;

&lt;p&gt;Anything new that you write has to be &lt;em&gt;good, unit-tested, documented code&lt;/em&gt;. You don't have time to go over the entire code-base, but as you touch parts of the &lt;em&gt;bad&lt;/em&gt; code, you &lt;em&gt;make a point of cleaning it up&lt;/em&gt;. Again, this means documenting it, adding test coverage and making sure it goes through a code review. There are several approaches to this, but those are topics of their own.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Allow for new features, because the business needs to keep running&lt;/em&gt;. But don't allow anything half-assed, under-researched or rushed out. You're already spending hours every week dealing with the fallout of the current code. You can't afford to add more tech-debt to your project. &lt;/p&gt;

&lt;p&gt;So now you have an idea of what your schedule looks like. Part of it is working on new features. Part of it is doing cleanup of old code and part of it is "firefighting" due to the aforementioned code. A third of your development time each week should be spent on cleanup and optimization. This is going to hurt in the short run, but pay off in the long run.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Maintenance is you spending time on a launchpad today, so that you can propel your project forward tomorrow.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The goal is to pay down as much of the tech-debt now so that you can increase productivity down the road. This kind of maintenance is a constant thing. Make sure it's part of your development schedule moving forward.&lt;/p&gt;

&lt;p&gt;You could throw more money at the problem by increasing the team size, but that's not going to be efficient. It depends on the business side: are you now producing features fast enough? If the answer is &lt;em&gt;no&lt;/em&gt;(as if it's ever &lt;em&gt;yes&lt;/em&gt;, when asking management), then you need to make sure you have a decent developer on-boarding process.&lt;/p&gt;

&lt;p&gt;If budget does not allow for growing the team then the scope of the project should be dialed down. You need to make sure you have a good balance of productivity and code quality. You can't always have &lt;em&gt;perfect&lt;/em&gt; code, but make sure that it's at least &lt;em&gt;maintainable&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And, in case it's not obvious, the developers need to convince the rest of the company that whatever you decided on is the way to go. This means convincing them that you need to make this investment, and that it &lt;em&gt;will&lt;/em&gt; pay off. The tech-debt metaphor is familiar and easily digestible - use it in your arguments.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Pay-off
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm5pvk2dp3gdlx1f6u0eu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm5pvk2dp3gdlx1f6u0eu.jpg" alt="Picture of neatly tied cables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Obviously, the above is a lot to commit to. But the results are tangible. The project can be salvaged. Legacy becomes maintainable and keeps making money. Once there's more money you can get crazier with development. You can break the monolith down to micro-services. You can migrate everything to AWS. You can change your mind and string the micro-service back into a single code-base.&lt;/p&gt;

&lt;p&gt;All that &lt;em&gt;and more&lt;/em&gt; you can do &lt;em&gt;after&lt;/em&gt; you've solved the underlying problems of your project, and kept the business running in the process.&lt;/p&gt;

&lt;p&gt;You now have predictable releases. You have a stable product. You have well-tested, documented code that you can work on with more confidence. You do less firefighting, you anger less users, the business makes more money and the development team can keep growing efficiently. Happier developers, happier users, happier management = successful product.&lt;/p&gt;

&lt;p&gt;The exact architecture and approach of your "survival" can take many forms. Share your horror stories and successes in the comments and let's show the developer world that there is a light at the end of the Legacy tunnel. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;attribution:&lt;/em&gt; cover image is from the game &lt;a href="http://www.bay12games.com/dwarves/" rel="noopener noreferrer"&gt;Dwarf Fortress&lt;/a&gt;, &lt;em&gt;&lt;a href="https://www.flickr.com/photos/alq666/2248613780/" rel="noopener noreferrer"&gt;messy cables&lt;/a&gt;&lt;/em&gt;, &lt;em&gt;&lt;a href="https://www.flickr.com/photos/dvanzuijlekom/11340344573/" rel="noopener noreferrer"&gt;neat cables&lt;/a&gt;&lt;/em&gt;, &lt;em&gt;&lt;a href="https://www.flickr.com/photos/luigimengato/15531955577/" rel="noopener noreferrer"&gt;brainstorming&lt;/a&gt;&lt;/em&gt;, _&lt;a href="https://www.monkeyuser.com/2019/v-201/" rel="noopener noreferrer"&gt;Comic from MonkeyUser.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>refactoring</category>
      <category>programming</category>
      <category>management</category>
    </item>
    <item>
      <title> How to kill your motivation in 4 easy steps</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Wed, 16 Jan 2019 08:49:31 +0000</pubDate>
      <link>https://dev.to/nebojsac/-how-to-kill-your-motivation-in-4-easy-steps-38ia</link>
      <guid>https://dev.to/nebojsac/-how-to-kill-your-motivation-in-4-easy-steps-38ia</guid>
      <description>&lt;p&gt;Keeping your motivation in-check can be difficult, and while it seems like it's something that's totally out of our control, we can impact it in significant ways. Your motivation will swing up and down based on whatever your circumstances are, but let's talk about ways of keeping those pesky dopamine levels down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Never say "No"
&lt;/h2&gt;

&lt;p&gt;If you don't already have a soul-crushing task to work on, look no further than your immediate surroundings. People are brimming with ideas that they are 100% behind, as long as they don't have to do the work. And they're willing to give you lots of &lt;em&gt;free exposure&lt;/em&gt;! I mean really, who could turn that sweet deal down?&lt;/p&gt;

&lt;p&gt;What's more, these ideas are &lt;em&gt;everywhere&lt;/em&gt;. To really get demotivated quick, take on 3 of these at once to make sure you have a steady supply of &lt;code&gt;"when's this gonna be done?"&lt;/code&gt;'s, and &lt;code&gt;"my nephew could have done it in one afternoon"&lt;/code&gt;'s. Nothing kills willpower more quickly than working on a project you don't care about, for people who don't care about you, while seeing 0 returns.&lt;/p&gt;

&lt;p&gt;If you already have a paid gig, just remember to accept any project, idea or responsibility that the company throws your way. Saying "No" looks bad, you know? Even if it's something way out-of-left-field, I'm sure you can pick it up in a weekend. I mean, Marketing, Programming, SEO, Management, DevOps, Photoshop - these are interchangeable skillsets. And then, once your TODO list still says "MONDAY TASKS" and you're well into &lt;em&gt;Thursday&lt;/em&gt;, you'll start to feel your motivation slip away. &lt;/p&gt;

&lt;h2&gt;
  
  
  Take on overambitious goals
&lt;/h2&gt;

&lt;p&gt;A sure-fire way to get started on the path of moti-death, is to get yourself something unachievable to strive for. This might be more of a long-con thing as it will take you a while to get to the &lt;em&gt;disappointment&lt;/em&gt; phase_ but trust me, you &lt;em&gt;will&lt;/em&gt; get there.&lt;/p&gt;

&lt;p&gt;There are a few important guidelines you need to follow for this to have it's full effect.&lt;/p&gt;

&lt;p&gt;First of, &lt;strong&gt;avoid any planning or research before committing to a deadline&lt;/strong&gt;. The only way to fail spectacularly is to not be aware of what you're getting yourself into. Just dive straight in! Or as we say in my native language: &lt;em&gt;"Go throat-first into the strawberries"&lt;/em&gt;. For bonus points, give an estimate 5 seconds after hearing the idea for the first time.&lt;/p&gt;

&lt;p&gt;Even if it's something you could definitely see yourself doing, put yourself into a no-win situation by making and planning around unrealistic timelines. Even if you somehow manage to finish the task you'll finish it 200% over the promised deadline and this will take all the wind out of your sails.&lt;/p&gt;

&lt;p&gt;And right on time to start that next project, which is already late due the lateness of the previous one! You're demotivated, and you haven't even started, kudos!&lt;/p&gt;

&lt;h2&gt;
  
  
  Allow all distractions
&lt;/h2&gt;

&lt;p&gt;In the internet-era, this is the easiest thing ever. Be sure to allow all the notifications. Preferably with on-screen pop-ups and sound. Put the idea in your head that you need to see and respond to every message &lt;em&gt;immediately&lt;/em&gt;. The phone &lt;em&gt;must not&lt;/em&gt; go into "sleep" mode. Keep it within your view at all times. Every call might be urgent.&lt;/p&gt;

&lt;p&gt;The point is to avoid being focussed. Focus leads to getting into &lt;em&gt;the zone&lt;/em&gt;, and that leads to high levels of motivation - and we can't have that!&lt;/p&gt;

&lt;p&gt;An easy way to accomplish this with zero effort is to work from home, or in an open-floor office, without setting any boundaries. Just let the natural flow of your surroundings generate the distractions for you. Remember to not put on your headphone either, can't have people thinking you're unapproachable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Work over-time, get burned out
&lt;/h2&gt;

&lt;p&gt;I mean &lt;em&gt;obviously&lt;/em&gt; the only way you can even hope to meet those promises, right? Right!?&lt;/p&gt;

&lt;p&gt;All the feel-good quotes tell you that if you just &lt;em&gt;give it your all&lt;/em&gt; you're sure to succeed. &lt;strong&gt;BUZZZ&lt;/strong&gt; WRONG. Giving it &lt;em&gt;your all&lt;/em&gt; is just a fast-track to the double-motivation-dip, because now you've not only failed, but you failed &lt;strong&gt;spectacularly&lt;/strong&gt;. You are left feeling exhausted with an overarching feeling of inadequacy.&lt;/p&gt;

&lt;p&gt;Once you're properly burned out, your motivation will be in the negative numbers at this point. You won't be able to do any meaningful work for weeks probably, so you'll be safe from getting &lt;em&gt;too&lt;/em&gt; motivated for some time to come! Just remember to always push yourself to the edge - and then right over that edge!&lt;/p&gt;

&lt;p&gt;And remember kids: Treating yourself mean will scare away that Dopamine!&lt;/p&gt;

</description>
      <category>motivation</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Fixing your Documentation Problem</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Sat, 27 Oct 2018 16:03:07 +0000</pubDate>
      <link>https://dev.to/nebojsac/-fixing-your-documentation-problem-oll</link>
      <guid>https://dev.to/nebojsac/-fixing-your-documentation-problem-oll</guid>
      <description>&lt;p&gt;You might feel like you don't really have a problem, but statistically speaking, you probably do. And even if you do have documentation, there are ways of making a better habit out of writing it.&lt;/p&gt;

&lt;p&gt;We'll go over a few of the go-to excuses(not to be confused with "excuses for using &lt;code&gt;goto&lt;/code&gt;") and discuss approaches to fixing this.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of contents:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;The Pains&lt;/li&gt;
&lt;li&gt;The Excuses&lt;/li&gt;
&lt;li&gt;The Solutions&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  The Pains
&lt;/h1&gt;

&lt;p&gt;If you've worked on any project that is not 100% your own making, you've had plenty of problems due to outdated or lacking documentation. I don't mean to invoke those painful memories(feel free to skip ahead), but let's go through some of the more serious ones, for those that haven't shared in the &lt;em&gt;joy&lt;/em&gt; of coding blind.&lt;/p&gt;

&lt;p&gt;You're plopped into a project for the first time, and &lt;em&gt;if you're lucky&lt;/em&gt; you have colleagues that have been here longer than you that can help guide you. And if you're born under a lucky star, they will have the patience to help you and documentation to point you too.&lt;/p&gt;

&lt;p&gt;But, alas, most are not so lucky. Most likely you're thrown into the deep end by yourself. Alternatively, you're not alone but your colleagues are too busy drowning in the same mess. Lack of documentation means you're stabbing in the dark, breaking things more often than not, and regularly misinterpreting how the system works.&lt;/p&gt;

&lt;p&gt;Your days are filled with reading logs and stack traces, putting &lt;code&gt;var_dump($data);exit();&lt;/code&gt;s everywhere while you attempt to make heads or tails of the thing. By the end of the week you're exhausted and your TODO list isn't any shorter. This might sounds like a Legacy^tm problem, but it happens with young projects as well.&lt;/p&gt;

&lt;p&gt;To make matters worse, you quickly become part of the problem. There are no "documentation guidelines" on the project, and you don't have time to be the first one to get the ball rolling. Instead, you rely on your own notes, spread across your notepad and .txt files. More often than not you go into the source code, 5 levels deep in the stack, to figure out how to fix minor spelling issues.&lt;/p&gt;

&lt;p&gt;The day you figure out how to use &lt;code&gt;CTRL+SHIFT+F&lt;/code&gt;(find in files) is the day you decide that &lt;em&gt;you don't even need documentation&lt;/em&gt;, because you know your way around. And this becomes one of the many crutches you'll need to get by on the project.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Excuses
&lt;/h1&gt;

&lt;p&gt;Programmers tend to think of themselves as highly rational people. And this may very well be the case, but they take it a step too far, by rationalizing their mistakes and laziness, thus making it very hard to change their habits.&lt;/p&gt;

&lt;p&gt;The favorite excuse (of us all, I might add) is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I comment my code well enough, I don't need extra documentation."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While it might be true that your code is the &lt;em&gt;pinnacle of descriptiveness&lt;/em&gt;, the fact is that if you have to dive into the code to understand a feature you're already making a mistake. It makes sense to dive into the source to make estimates or understand the nuances of the process, but &lt;strong&gt;if you're looking at source code to understand a feature, you have a documentation problem.&lt;/strong&gt; Now, dialing this excuse up to &lt;strong&gt;11&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"My code is descriptive enough, I don't need documentation on top of it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This can only be true if you're writing the simplest of CRUD apps. And even with CRUD apps there's a case to be made for proper docs. Additionally, &lt;em&gt;you're not the only person needing the documentation&lt;/em&gt;. As the company grows the documentation will become useful to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Other developers&lt;/li&gt;
&lt;li&gt;QA testers&lt;/li&gt;
&lt;li&gt;Sales and Marketing&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;You&lt;/em&gt;, 6 months after writing the feature&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The list goes on, and the sooner you start writing docs, the less issues you'll have down the road.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Sorry, we don't have time to write documentation, we move fast and break things!"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the same excuse used for the lack of writing unit tests, and in both cases the result of the new habit will &lt;em&gt;save you time down the road&lt;/em&gt;. Sure, in the short term it seems like a waste of time, but it pays dividends as you go.&lt;/p&gt;

&lt;p&gt;Not to mention that writing documentation takes comparably &lt;em&gt;no time at all&lt;/em&gt;. I know, &lt;em&gt;it feels like forever&lt;/em&gt; when you're writing documentation, but you're actually done within 30 minutes or less, for any single feature.&lt;/p&gt;

&lt;p&gt;The only &lt;em&gt;somewhat reasonable&lt;/em&gt; excuse to not write documentation is that the project is so small that it doesn't really need documentation. But here's a simple rule of thumb for your project size:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If it's worth building, it's worth documenting.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  The Solutions
&lt;/h1&gt;

&lt;p&gt;In a company with a development team of any meaningful size(ie, &lt;code&gt;&amp;gt;0&lt;/code&gt;) you will come to know the joys of having a process. Whether you're a tester, a manager &lt;em&gt;or a developer&lt;/em&gt;, you'll already know that a project needs some guidelines in place for the more "boring" work, so that more thought can be put into the "fun" work.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Document first, ask questions later.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have to admit, when I got this idea, I thought it was revolutionary: along the lines of "Test Driven Development"; and that I was being &lt;em&gt;super-clever&lt;/em&gt; by naming it &lt;strong&gt;"Documentation Driven Development"&lt;/strong&gt;. And then I did a quick Google search and realized that it's not a crazy new idea, and that people have been doing it for years(or decades, if you include "waterfall" based projects).&lt;/p&gt;

&lt;p&gt;Alas, I'm not as smart as my mom thinks(&lt;em&gt;sorry mom!&lt;/em&gt;), but I think the idea bears repeating. &lt;strong&gt;Before you dive into the code, write up the documentation.&lt;/strong&gt;. And before you start rolling your eyes: yes, you can't get every detail right before getting to the code. But you can get the "story" right. You can get the "business value" and "usage patterns" right. There's a lot to gain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You get to jot down your thoughts, to flesh out the idea&lt;/li&gt;
&lt;li&gt;You get to run the documentation by other people, to make sure you understood the problem correctly&lt;/li&gt;
&lt;li&gt;You have a clear road-map of work involved, as well as a list of edge-cases and "nice-to-haves" for the future&lt;/li&gt;
&lt;li&gt;And with all of this &lt;strong&gt;you're fixing your documentation problem&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think about it like this. &lt;em&gt;Nobody feels like writing documentation after the fact&lt;/em&gt;. Once you've banged out that big feature, you feel like grabbing a coffee and taking a break. But, if you have documentation &lt;em&gt;ahead of the code&lt;/em&gt;, then suddenly you're writing it while the initial idea is still fresh.&lt;/p&gt;

&lt;p&gt;The whole idea has a lot of overlap with TDD, which it also has a great synergy with.&lt;/p&gt;

&lt;p&gt;That said, &lt;strong&gt;don't forget to document the changes and bug-fixes&lt;/strong&gt;. If you don't do that as well, you're setting yourself up for &lt;em&gt;documentation rot&lt;/em&gt;. It's a lot like technical debt, in that it will come back to bite you in the ass in the future.&lt;/p&gt;

&lt;p&gt;As a bonus, start documenting every bigger post-mortem, describing how you discovered and fixed big problems at the project. This is a big topic on it's own.&lt;/p&gt;

&lt;p&gt;Even if you already have a big project and no documentation, now's the time to start. Like Gandhi said, the only better time for starting documentation than today, is yesterday, &lt;em&gt;or something along those lines&lt;/em&gt;. You start by documenting new features, and continue by documenting anything you touch or change. Much like with writing automated tests, and increasing your test coverage.&lt;/p&gt;

&lt;p&gt;And before you know it, you'll have a great reference point for all of your team-mates, and maybe even your users! Who knows, if you do this correctly, you'll stop cussing out your past self, for being too lazy to write it.&lt;/p&gt;

</description>
      <category>documentation</category>
    </item>
    <item>
      <title>Keeping your scripts alive and healthy</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Fri, 24 Aug 2018 15:12:33 +0000</pubDate>
      <link>https://dev.to/nebojsac/keeping-your-scripts-alive-and-healthy-jk2</link>
      <guid>https://dev.to/nebojsac/keeping-your-scripts-alive-and-healthy-jk2</guid>
      <description>&lt;p&gt;There comes a time in every sysadmins life when he needs to let his scripts take on a life of their own. They start working on big jobs for hours on end, and it becomes unreasonable to keep staring at the terminal to make sure everything is ok.&lt;/p&gt;

&lt;p&gt;But, like any good helicopter-parent will tell you, you can't trust your &lt;del&gt;kids&lt;/del&gt; scripts to do the right thing! Your job is to bring them up correctly, point them in the right direction and &lt;del&gt;hope&lt;/del&gt; make sure they make the right decisions. Here's a handy check-list to put the &lt;del&gt;mental&lt;/del&gt; &lt;em&gt;fun&lt;/em&gt; back in &lt;em&gt;fundamental&lt;/em&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Be clear! Absolute paths everywhere.
&lt;/h2&gt;

&lt;p&gt;One of the more common gotchas when writing scripts is assuming the startup directory of the script. You can't afford to be vague like that! Don't let them guess the context, hard-code it in.&lt;/p&gt;

&lt;p&gt;For example, you're testing your script locally, and it's looking great! You are now prepared to say &lt;em&gt;"It works on machine!"&lt;/em&gt; even after it breaks in production! But that won't save you once your script just does not start from the crontab, because of something simple, like a bad log path.&lt;/p&gt;

&lt;p&gt;Ways to approach this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define the absolute paths within constants on top of the script&lt;/li&gt;
&lt;li&gt;Include the paths from the environment&lt;/li&gt;
&lt;li&gt;Or get the current directory path from within the script&lt;/li&gt;
&lt;li&gt;Require the "start path" be provided when running the script as an argument&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Keep tabs on them! Log everything.
&lt;/h2&gt;

&lt;p&gt;So, while you're looking directly at the output as it's happening, it behaves wonderfully! Your &lt;del&gt;child&lt;/del&gt; script is a well-behaved and productive member of its environment. Surely you can let them do things on their own?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WRONG&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're not paranoid at this point, you're just unaware of all the things that can go wrong! From paths and permissions and all the way to broken loops and undefined behaviour, there's a myriad of things that can break - and you should have a paper trail of it happening.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The last thing you want is having to debug a major outage by having to cause another one!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you're running your script as a cronjob, it's easy to log the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;0 9 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; bash /var/scripts/check_messages.sh &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/var/scripts/logs/check_messages.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above will run the script once a day, but will write to the same log file every day, overwriting it. So you can get yesterdays output. That's the least you can do. Also notice the absolute path for the log file as well! We're not messing around.&lt;/p&gt;

&lt;p&gt;Alternatively you can have logging within the script itself. A few things to keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use timestamps everywhere! You need to know when something happened.&lt;/li&gt;
&lt;li&gt;If you think it's needed, include email alerts, so you're notified about critical issues on time.&lt;/li&gt;
&lt;li&gt;If you're keeping most of your logs, use &lt;code&gt;logrotate&lt;/code&gt;. You don't want to run out of disk space because of your logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Don't assume that it won't fail! Supervise it.
&lt;/h2&gt;

&lt;p&gt;Say your script is some kind of polling script, or something that needs to run &lt;em&gt;forever&lt;/em&gt;. That's not something you should be starting and stopping from the crontab. It's also not ideal to get a notification just when it dies - it should restart on it's own as well.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Supervisord&lt;/code&gt; to the rescue!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is an awesome tool you &lt;em&gt;need&lt;/em&gt; to be using in these cases. It's like the best personal trainer out there! He never sleeps and just runs after your processes yelling "No slacking! Keep running!".&lt;/p&gt;

&lt;p&gt;For example, I've recently had issues with the Docker deamon dying from time to time. Obviously, me jumping into the server to start it up again was unproductive, so I added this to the &lt;code&gt;supervisord&lt;/code&gt; config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[program:dockerd]
command=dockerd
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/dockerd-supervisor.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells it to &lt;em&gt;supervise&lt;/em&gt; the &lt;code&gt;dockerd&lt;/code&gt; process, and to restart it when it dies. It also logs what's happening to a log file we can use for debugging later on.&lt;/p&gt;

&lt;p&gt;And this works with your own scripts as well! It's also neat if you have a script that only runs for 1 hour and needs to start back up again. This way you avoid having potential same-process overlap like when using cronjobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Have a way to stop them! Teach them the signals.
&lt;/h2&gt;

&lt;p&gt;Eventually, you'll want to be able to tell the fruit of your &lt;del&gt;loins&lt;/del&gt; keyboard to hold on a second while you reconsider what's been happening. If you don't plan for this ahead of time you might end up sending hard-kill signals like &lt;code&gt;SIGKILL&lt;/code&gt; which can have nasty consequences.&lt;/p&gt;

&lt;p&gt;Bad things that could happen by killing a script mid-way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File permissions stay wrong&lt;/li&gt;
&lt;li&gt;Corrupted files or database data&lt;/li&gt;
&lt;li&gt;Orphan processes and half-processed data&lt;/li&gt;
&lt;li&gt;Unreleased resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To avoid the above, you should put in a &lt;code&gt;SIGTERM&lt;/code&gt; handler. You can do this in most any scripting language, I even have it working in my PHP scripts. &lt;/p&gt;

&lt;p&gt;This way the script can finish what it's doing, process it's current batch of data, finish writing that CSV file line, and release all the used resources. So, when you write &lt;code&gt;killall -s SIGTERM dockerd&lt;/code&gt; you let it finish what it's doing before it stops.&lt;/p&gt;

&lt;p&gt;Also, minor side-note: if you have &lt;code&gt;sleep()&lt;/code&gt; code in your script, the sleeping will be skipped to speed things up after it receives the &lt;code&gt;SIGTERM&lt;/code&gt; signal. Speaking of sleeping...&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make sure they're not selfish! Don't overload the system.
&lt;/h2&gt;

&lt;p&gt;The great(and terrible) thing about your scripts running is that they will try to get the most out of the resources available. So if they're transferring a 1TB file over the network, you'll wish you'd changed the WiFi password!&lt;/p&gt;

&lt;p&gt;They need to realize that they're not the only one in the &lt;del&gt;flat&lt;/del&gt; server and that they need to clean up after themselves, as well as not hog the utilities.&lt;/p&gt;

&lt;p&gt;There's a few guidelines you can go by to make sure they play &lt;em&gt;nice&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When transferring over the network, use upper limits. For example &lt;code&gt;rsync&lt;/code&gt; has the &lt;code&gt;--bwlimit&lt;/code&gt; parameter for this.&lt;/li&gt;
&lt;li&gt;When bombarding the database with queries, give it some leeway - sleep the script from time to time.&lt;/li&gt;
&lt;li&gt;When writing heavily to the disk, make sure it's not hogging the disk that the database uses.&lt;/li&gt;
&lt;li&gt;If possible, have it run during off-peak hours, and monitor the server performance.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;So that's my list of "script" lessons I've learned the hard way - so you don't have to! Do share your tips in the comments as well, and point me (and others) to other nice resources on the subject.&lt;/p&gt;

&lt;p&gt;You can never be too careful with them!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Mandatory disclamer: I do not condone helicopter parenting when it involves real children as opposed to child processes.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>scripts</category>
      <category>terminal</category>
      <category>bash</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Konsole, SublimeText and PAC Manager for a devs workflow</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Sat, 04 Aug 2018 19:30:44 +0000</pubDate>
      <link>https://dev.to/nebojsac/konsole-sublimetext-and-pac-manager-for-a-devs-workflow-a2k</link>
      <guid>https://dev.to/nebojsac/konsole-sublimetext-and-pac-manager-for-a-devs-workflow-a2k</guid>
      <description>&lt;p&gt;To start, my Operating System of choice is Ubuntu. Right now I'm on 16.04 but plan to move to 18.04 by the end of the year. The only thing lacking are Adobe programs, but that's not a huge issue for me, as I mostly deal with backend work.&lt;/p&gt;

&lt;p&gt;I've used Windows for years, and it was &lt;em&gt;ok&lt;/em&gt; but not great for development. At one point I got myself a Macbook Air, and used that for a while, enjoying the terminal, especially &lt;strong&gt;iTerm&lt;/strong&gt;, but really disliking how &lt;em&gt;closed&lt;/em&gt; the entire Mac system felt. I ended up frying the thing accidentaly with coffee, and the fact that I couldn't just open it up myself really ticked me off, so I swore off Macs after that. I'm just too used to messing with my rigs: something that I had with Windows machines, and have again with my Lenovo Thinkpad. I've happily openned it and added an SSD and extra RAM to help it everything smoothly.&lt;/p&gt;

&lt;p&gt;For the most part I really like Ubuntu, but there are some things that get to me. The one ongoing issue is driver trouble, as my WiFi randomly disconnects for a second, and &lt;em&gt;god forbid&lt;/em&gt; I put the laptop in sleep mode. Waking it up leaves me without WiFi or sometimes a functioning audio jack.&lt;/p&gt;

&lt;p&gt;That aside, I love what I can get done and set up on Ubuntu, and I'm still growing into it. Bonus points for it basically being a great way to practice my DevOps skills, which are part of my daily work.&lt;/p&gt;

&lt;h1&gt;
  
  
  Code Editor: Sublime Text 3
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fx9m6m6h9d0b8q5r9sawy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fx9m6m6h9d0b8q5r9sawy.png" alt="Sublime Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My first few years of dev work I used Notepad++. I liked it compared to the bigger tools at the time and felt that I'd learn code faster than if I was using something with autocomplete. That worked out great, but only because I was mostly doing PHP, and not something in dire need of an IDE, like Java or .NET. A few years into my career I switched from Windows to Mac. As Notepad++ wasn't available, I started looking around fo something similar. I found Sublime Text 2(at the time) and immediately fell lin love.&lt;/p&gt;

&lt;p&gt;It had everything I loved about Notepad++ with extra bells and whistles. The most important things were speed and customizability. The only thing that beats Sublime in terms of speed is VIM, and I haven't found the time to learn it - although I'm looking to try at some point. Also I have massive respect for the creator of Sublime for making it free to use(nagware) and for the inovations he brought to the table, which others later copied.&lt;/p&gt;

&lt;p&gt;The plugins I probably notice the most:&lt;/p&gt;

&lt;h2&gt;
  
  
  For syntax:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Todo.txt Syntax&lt;/strong&gt; - I use that in my "todo" file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Markdown Extended&lt;/strong&gt; and &lt;strong&gt;Markdown Preview&lt;/strong&gt; - our documentation is in Markdown&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VCS Gutter&lt;/strong&gt; - basic Git and Mercurial indicators for new/removed/changed lines&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For cleanup and readability:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FileDiffs&lt;/strong&gt; - easily compare files or snippets for differences&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQL Beautifier&lt;/strong&gt; - indents SQL&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON Reindent&lt;/strong&gt; - reindents JSON&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTML Tidy&lt;/strong&gt; - reindents HTML (we work with a lot of HTML emails)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code Styling:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PHP Beautifier&lt;/strong&gt; - cleans up PHP (indentation, brackets, etc)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PHP Array Syntax converter&lt;/strong&gt; - convert &lt;code&gt;array()&lt;/code&gt; to &lt;code&gt;[]&lt;/code&gt; syntax&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DocBlockr&lt;/strong&gt; - generates Doc Blocks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And a few more minor ones. I end up doing "plugin purges" from time to time, to keep Sublime snappy.&lt;/p&gt;

&lt;h1&gt;
  
  
  Terminal usage: Konsole, OhMyZsh and PAC Manager
&lt;/h1&gt;

&lt;p&gt;Since leaving Macs, there is only one thing I miss: &lt;strong&gt;iTerm&lt;/strong&gt;. I have yet to find a tool that's so powerful, yet so easy to set up. I've tried everything available on Linux and no one tool does it for me. What I loved about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;great keyboard shortcuts for managing sessions&lt;/li&gt;
&lt;li&gt;saved and predefined sessions you can re-use&lt;/li&gt;
&lt;li&gt;new sessions are super easy to set up and use&lt;/li&gt;
&lt;li&gt;You can start specific server connections, with specific commands, with keyboard shortcuts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, I know tools like &lt;em&gt;terminator&lt;/em&gt; can probably do most of this, but I don't want to have to be a 1337 hacker to get my tools to do what I want them to do. I'm willing to spend some time on it, but if I can't figure it out in a few hours, I move on to the next one. I ended up finding a good balance with Konsole. It gives me a nice customizable starting session, with a few nice shortcuts. It's not good enough for managing servers so I use PAC manager which feels a bit clunky at times but is actually great if you want a lot of ready commands to send to servers. Both of these take longer to set up than iTerm, but together they do a great job.&lt;/p&gt;

&lt;p&gt;With PAC manager it's easy for me to open a dozen SSH tabs, some for viewing logs, others for monitoring performance on the server, and some for running commands. The only problem with PAC (that I didn't notice until writing this post) is that it hasn't been updated in 2 years. I've been using it for the past 4 years or so, and I don't see a particular update need, it runs great on every Ubuntu version I've used so far.&lt;/p&gt;

&lt;p&gt;Also, my Konsole looks like this on boot-up:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyi9p5e68nwvaidvgitim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyi9p5e68nwvaidvgitim.png" alt="screenshot of Konsole"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The matrix looking numbers are from the command &lt;code&gt;cmatrix&lt;/code&gt; I use it as a screensaver. Once I start typing they go away. I use OhMyZsh for my shell, it just makes shell usage easier and overall nicer.&lt;/p&gt;

&lt;p&gt;I use the default 4 workspaces in Ubuntu, and keep my windows organized in 4 groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Editor (Sublime)&lt;/li&gt;
&lt;li&gt;Browser(s)&lt;/li&gt;
&lt;li&gt;Terminal (Konsole)&lt;/li&gt;
&lt;li&gt;Server terminal (PAC)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Miscellaneous apps get opened wherever makes the most sense at the time.&lt;/p&gt;

&lt;p&gt;Once I have some time I'd love to set up i3wm and learn how to use it. I've seen some great setups over on Reddit. I tend to take a few hours per month to tweak one or two things about my setup. It's easy to get lost in it, so I limit myself, otherwise I'd be tweaking for days!&lt;/p&gt;

&lt;p&gt;There's a whole slew of minor tweaks I did to make my system feel like &lt;em&gt;my system&lt;/em&gt;, but this is the birds eye view. I urge you to share your setup with us as well, as one can always pick up some pointers from posts like those.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>console</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What kind of content do you want to see more of on Dev.to?</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Wed, 25 Jul 2018 10:34:55 +0000</pubDate>
      <link>https://dev.to/nebojsac/what-kind-of-content-do-you-want-to-see-more-of-on-devto-128o</link>
      <guid>https://dev.to/nebojsac/what-kind-of-content-do-you-want-to-see-more-of-on-devto-128o</guid>
      <description>&lt;p&gt;I've got a few ideas floating around I'll never get to, and some things I want to see, so I wanted to hear from you folks as well. Figured this could be a useful resource for new people here that don't have any topic ideas :)&lt;/p&gt;

&lt;p&gt;I'll leave my suggestions in the comments, and you do the same.&lt;/p&gt;

&lt;p&gt;As a bonus, the replies to comments should be links to articles scratching that particular itch, in case the original commenter didn't see the article before!&lt;/p&gt;

</description>
      <category>content</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Slack keeps interrupting you, but you can stop it</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Thu, 12 Jul 2018 13:18:32 +0000</pubDate>
      <link>https://dev.to/nebojsac/slack-keeps-interrupting-you-but-you-can-stop-it-883</link>
      <guid>https://dev.to/nebojsac/slack-keeps-interrupting-you-but-you-can-stop-it-883</guid>
      <description>&lt;p&gt;&lt;em&gt;Or "Avoiding death by a thousand cuts". With your productivity being the victim.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The cheapest way to kill a programmers productivity, is to get him on a company Slack team, include him on all the channels, and give everyone free reign to poke, ping and prod him at will. The onslaught of dings, popups and push notifications will tire him out pretty quickly. &lt;/p&gt;

&lt;p&gt;Just as humanity hasn't yet evolved to deal with online social networks, so too programmers are still a few generations away from fully figuring out how to survive instant messaging. And not just programmers, this includes any profession that needs to stay focussed for &lt;strong&gt;hours at a time&lt;/strong&gt; to get meaningful work done.&lt;/p&gt;

&lt;p&gt;Slack might cost &lt;em&gt;only&lt;/em&gt; $5 per user, but if you take into account the lost productivity I bet that figure becomes just a rounding error on your balance sheet. That is, if you're not using Slack correctly.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Slack &lt;em&gt;isn't&lt;/em&gt;
&lt;/h1&gt;

&lt;p&gt;Ok, so here's the thing. We've been blaming Slack for concentration-genocide ever since it became the &lt;em&gt;de facto&lt;/em&gt; chat tool. Companies love it, clients love it, but programmers only tolerate it. I'm going to argue that we've just been using it wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Slack is not meant to be real-time
&lt;/h2&gt;

&lt;p&gt;Think about the forums of old. You would leave a well thought out message, hoping to get an answer, and go about your day. You would either return a lot later, or once you've received the (pretty slow to arrive) email notification of a reply.&lt;/p&gt;

&lt;p&gt;You would be greeted by a similarly well thought out message. Not 10 sentence fragments spread out across a line each, and certainly not someone’s incoherent train of thought, the point of which was lost mid way.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Somewhere along the way...&lt;/p&gt;

&lt;p&gt;We decided&lt;/p&gt;

&lt;p&gt;that this&lt;/p&gt;

&lt;p&gt;is an acceptable way to communicate.&lt;/p&gt;

&lt;p&gt;Please. Stop.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not only does it vibrate my phone off the table, it breaks up a single message into a dozen &lt;strong&gt;interruptions&lt;/strong&gt;. It's also hard to read, and a lot of the time the point of the message changes by the time the &lt;em&gt;"thread"&lt;/em&gt; unravels.&lt;/p&gt;

&lt;p&gt;Type out a single &lt;em&gt;coherent&lt;/em&gt; paragraph of text. Break it up into multiple sentences or lines if you want, but keep it in a &lt;em&gt;single&lt;/em&gt; message. That way you're minimizing clutter and noise. If you want to send 20 screen-shots, zip them up. Nobody wants to scroll through 3 screen-space-heights worth of vertical phone backgrounds.&lt;/p&gt;

&lt;p&gt;As a bonus, as you're writing out these long messages, you might answer your own question. This happens to me daily. By the time I'm on my 3rd line of the message, I realize that I can either figure it out myself or that the answer was simpler than I thought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Slack is not an issue tracker
&lt;/h2&gt;

&lt;p&gt;Can we burn this one onto the Slack sidebar or something? If your company is already using a project management tool like Trello, Jira or Redmine, there is zero reason to report an issue straight into chat. You've got the right tool for the job, &lt;em&gt;use it&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Yes, something may not be clear. Yes, you might not be sure it's an actual issue. Yes, you want it done quickly. But you still want your other projects to keep moving. "Slack tasks" quickly bury a team in "minor urgent sidetracking" to the point where the issue tracker loses it's purpose. Anything worth reporting is worth reporting in the issue tracker, and discussed, elaborated &lt;strong&gt;or closed&lt;/strong&gt; there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chat is not a replacement for a call
&lt;/h2&gt;

&lt;p&gt;Here's a little exercise for your. It has to do with timing. The next time you need to "discuss something real quick", take note of the timestamps of the first and last message once it's done. I bet you that you're looking at something like 8 sentences spread out over 10 minutes, or about "1 sentence per minute".&lt;/p&gt;

&lt;p&gt;And during all of this you can't get anything done. Or maybe you can, but you risk messing up, due to lack of concentration. You're effectively &lt;em&gt;blocked&lt;/em&gt; for that time, until the conversation wraps up. Compare this with a call in which you could get the point across in 2 minutes, and take the spare 8 minutes to provide more needed information. And once you hang up you're not left wondering if you're going to get another message before you go back to your code editor.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Anything demanding your attention now better be important
&lt;/h2&gt;

&lt;p&gt;Chat is asynchronous and should be used as such. The problem arises with the default Slack settings and behaviours. You hear the notification and you run to see what's up &lt;em&gt;on the off chance that it's important&lt;/em&gt;. 99% of the time, it's not.&lt;/p&gt;

&lt;p&gt;And if you have those browser pop-up notifications enabled, I wonder how you get anything done during the day. Unless your attention is needed &lt;em&gt;right this very instant&lt;/em&gt; then it's not worth the interruption.&lt;/p&gt;

&lt;p&gt;Also, when did this become the norm:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Hey, I just sent you an email, let me know once you read it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;10 times out of 10 it's not urgent enough to warrant that message. They'll see it when they see it. And they'll respond once they have a response ready. At least email doesn't have any pretence of being real-time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb1w72vjcd1pgaa9py0uc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb1w72vjcd1pgaa9py0uc.jpg" alt="Hey did you see my email?" width="650" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Ways to retain your Sanity
&lt;/h1&gt;

&lt;p&gt;Now that I'm done complaining, here's a list of ways for your to minimize interruptions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kill the notifications
&lt;/h2&gt;

&lt;p&gt;First things first, update all the channel notification preferences to "mentions only". There's no reason for you to be notified for every message in there.&lt;/p&gt;

&lt;p&gt;Also, since you can't really do this for private messages, teach your team/company to use public channels more often than private messages. Also, teach them to not tag you unless it requires immediate attention - you'll see it when you see it.&lt;/p&gt;

&lt;p&gt;Oh, and disable the browser pop-up notification, that thing shouldn't exist in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Establish some ground rules
&lt;/h2&gt;

&lt;p&gt;There are a few very simple rules you can share with your Slack team to minimize interruptions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try and group your chat messages into fewer bigger messages, to reduce notifications.&lt;/li&gt;
&lt;li&gt;Don't @ someone in a public channel unless it's urgent.&lt;/li&gt;
&lt;li&gt;If you're replying with an "Ok." or "Thanks!" a few minutes later or more, use the emoji reactions instead, to acknowledge the message.&lt;/li&gt;
&lt;li&gt;Again, use public channels more often than private ones.&lt;/li&gt;
&lt;li&gt;If you have more than 2 questions, best schedule a short call.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduce Zen Hours or Zen Days
&lt;/h2&gt;

&lt;p&gt;Ok, this ones my personal favourite. There's a DnD mode in Slack, which Snoozes your notifications - even the private message ones - and it's awesome. In the event that the building is on fire, the sender can "break through" your DnD mode to get the message to you, but most of the time they won't feel the need to.&lt;/p&gt;

&lt;p&gt;Now, to not be constantly in DnD mode, as the company probably needs you available and reading chat from time to time, you should establish certain "Zen" chunks of time.&lt;/p&gt;

&lt;p&gt;Here at Pathway, we do a single Zen Day per week, but you might be able to get away with multiple ones. Or maybe do 3 Zen Hours each day.&lt;/p&gt;

&lt;p&gt;What this means is that your DnD mode is on, and everyone knows not to send you Slack messages at that time, unless it's important. This works better with company buy-in, but in reality, you can get away with just using DnD for bigger chunks of time anyway. Your brain will still have you checking Slack from time to time, but now it's &lt;em&gt;on your terms&lt;/em&gt; instead of it being an interruption.&lt;/p&gt;

&lt;h1&gt;
  
  
  Bottom-line
&lt;/h1&gt;

&lt;p&gt;Slack is not a bad tool, but we as a society are still not sure what a proper Slack etiquette is. We don't understand what our message does on the other end, nor do we understand the cost of interruptions. As more is done on the topic, and we get saner chat defaults, things are going to get better, but until then: Snooze your Slack.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.redd.it/o1gnotfxi4k01.png" rel="noopener noreferrer"&gt;MonkeyUser.com comic.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.commitstrip.com/wp-content/uploads/2017/05/Strip-Drivers-de-limprimante-non-install%C3%A9s-650-finalenglishUD-1.jpg" rel="noopener noreferrer"&gt;CommitStrip&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What Programmers Can Learn From Starcraft Pro-gamers</title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Tue, 13 Feb 2018 14:50:56 +0000</pubDate>
      <link>https://dev.to/nebojsac/what-programmers-can-learn-from-starcraft-progamers--163k</link>
      <guid>https://dev.to/nebojsac/what-programmers-can-learn-from-starcraft-progamers--163k</guid>
      <description>&lt;p&gt;&lt;em&gt;Had to re-read that title a few times? Yeah, me too.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Starcraft is a big Esports game which has it's competitors put out crazy amounts of coordinated &lt;em&gt;keyboard mashing&lt;/em&gt; to &lt;em&gt;out-mash&lt;/em&gt; their opponent. The main metric defining the damage they're doing to their keyboard is &lt;strong&gt;APM&lt;/strong&gt;, or &lt;strong&gt;Actions Per Minute&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;APM tells us how many mouse clicks and keyboard presses the player is doing per minute.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;a href="http://us.battle.net/sc2/en/profile/5164266/1/Zinger/"&gt;average Joe&lt;/a&gt; will be doing around 100 APM, and while it's not the only indicator of player level, it's still a decent metric. The &lt;a href="http://us.battle.net/sc2/en/profile/1786820/1/DarK/"&gt;best of the best&lt;/a&gt; go upwards of 300 APM, with some going over 400 APM, especially in intense micro battles.&lt;/p&gt;

&lt;p&gt;To give you an idea of what that means, the average person that can type on their keyboard without looking at it is going to be doing between 100 and 200 characters per minute. Now, take a look at this guy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zo5gNxsA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://i.imgur.com/mKO8klk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zo5gNxsA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://i.imgur.com/mKO8klk.gif" alt="Keyboard Mashing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take into account that the 300+ APM is used to manage multiple simultaneous in-game battles, as well as the players economy, and you'll realize that it's &lt;strong&gt;a lot more than just random button mashing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Getting up to those kinds of numbers, and making those numbers win you tournaments requires a lot of practice.&lt;/p&gt;

&lt;p&gt;Programmers and Starcraft players spend a lot of their time on their keyboard, and while the &lt;em&gt;key mashing&lt;/em&gt; speed is not comparable, there are a few other parallels that we can draw.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keyboard shortcuts up your game
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DhDUELjq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://i.imgur.com/Z5EI5Fd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DhDUELjq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://i.imgur.com/Z5EI5Fd.gif" alt="Starcraft army movement"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The most glaring difference between someone just starting out with a computer and someone with more experience is the ratio of mouse to keyboard usage.&lt;/strong&gt; Technically, you can play Starcraft with just the mouse, but realistically, the more you use keyboard shortcuts, the better your overall performance will be.&lt;/p&gt;

&lt;p&gt;In Starcraft you can group your army units so they're easily selectable with the numeric keys. You can do the same for your production and research structures. Otherwise you'll be using your mouse to move the game camera, then to select the units or buildings, to then pick what to build or do with your mouse. Add that other actions like attacking and spell-casting, and you're spending a lot of time moving your mouse across the screen.&lt;/p&gt;

&lt;p&gt;To an experienced player this is painful to watch. It's like when you're watching your &lt;em&gt;computer-challenged&lt;/em&gt; parent copy files: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"OK, I want to copy all the photos in this folder, so I click in the top left corner and start dragging." &lt;em&gt;scroll scroll scroll&lt;/em&gt; "Gosh darn it, I didn't mean to pick this last photo, let's start over." &lt;em&gt;scroll scroll scroll&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes, it's &lt;em&gt;that&lt;/em&gt; bad.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Kg5yi46T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9rcmksjk32bdnkd9ln83.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kg5yi46T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9rcmksjk32bdnkd9ln83.jpg" alt="Keyboard Shortcuts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In programming, it's the same if you're moving through your files, cycling tabs, saving files, running builds etc with just your mouse. &lt;strong&gt;By switching to your keyboard, you'll save seconds on each of your actions.&lt;/strong&gt; And while these may add up only slightly over time, more importantly they let you focus on the work you're doing. This is why some programmers are switching to Vim and giving term &lt;em&gt;keyboard warrior&lt;/em&gt; a new meaning.&lt;/p&gt;

&lt;p&gt;Creating muscle-memory for keyboard shortcuts let's you focus more on your code than on navigating the UI of your editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consistency is key
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tBqBd6-H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://enetdown.org/outgoing/posts/2016/06/19/gfx/github-streak-1000-days-20160322.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tBqBd6-H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://enetdown.org/outgoing/posts/2016/06/19/gfx/github-streak-1000-days-20160322.png" alt="Github streak"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're looking at getting better fast, you need to practice &lt;em&gt;every day&lt;/em&gt;. &lt;strong&gt;Most programming beginners make the mistake of taking big breaks&lt;/strong&gt; between code-learning sessions.&lt;/p&gt;

&lt;p&gt;For example, if you take a break for an entire week, you're going to outright &lt;em&gt;forget&lt;/em&gt; a lot of stuff you've learned recently. You need to keep learning every day, even if it's just for an hour or two. Of course life gets tends to get in the way but you should be actively fighting to create a consistent schedule.&lt;/p&gt;

&lt;p&gt;In Starcraft this usually means that you'll start forgetting the more minute details of the strategies you want to use and you'll start making several mistakes. This adds up and may end up costing you the match.&lt;/p&gt;

&lt;p&gt;In both cases, this doesn't mean you can't mix it up a bit. You could be reading strategy guides, blog posts or discussion forums to stay in the loop. Or you could watch others code or play in real-time - there's actually a lot of programmers streaming on &lt;a href="https://www.liveedu.tv"&gt;LiveEdu.tv&lt;/a&gt;, although it's going to be a tad less exciting than watching someone play your favorite Esport.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team Houses keep you motivated
&lt;/h2&gt;

&lt;p&gt;Whether you're just learning or are already a professional (ie. your keyboard mashing is earning you money) surrounding yourself with like-minded people is going to help propel you forward.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x3iUJ8A0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/tg3Wm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x3iUJ8A0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/tg3Wm.jpg" alt="Team House"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In South Korea the concept of a &lt;em&gt;Team House&lt;/em&gt; is relatively common in Esports. It's basically a frat house with less jocks and more nerds. The idea is that you're practicing Starcraft day-in and day-out, making it a full-time thing.&lt;/p&gt;

&lt;p&gt;Of course you can do this at home, but you're going to be spending a lot more time explaining to Mom that &lt;em&gt;"I can't pause, it's an online game!"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Even though you'll be surrounded with friends, you'll be less likely to just slack-off, because, at least theoretically, they take their work seriously and this is going to put subtle pressure on you to stay productive and not open &lt;a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"&gt;YouTube&lt;/a&gt; after 5 minutes of practice.&lt;/p&gt;

&lt;p&gt;Coworking is the Team House equivalent for learners and remote workers. Even if they're not all programmers and it's a mix of different types of work, like design or content-writing, &lt;strong&gt;the important part is that you're surrounded by people that are there to stay productive.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As an added bonus now you have someone to play a few casual games with, whether it be Starcraft or Ping-pong. You can let yourself unwind a bit and still be more productive than you would be sitting alone at home.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;While Starcraft &lt;em&gt;skillz&lt;/em&gt; don't translate directly into programming there's a lot any coder can learn from the habits of the pros. And the next time your CS teacher catches you playing Starcraft in Computer class, just tell him you're leveling up your APM!&lt;/p&gt;

&lt;h2&gt;
  
  
  References:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.eslgaming.com/article/team-houses-and-why-they-matter-1676"&gt;&lt;em&gt;Team Houses and why they matter&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://enetdown.org"&gt;Image of Github streak taken from http://enetdown.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.liveedu.tv"&gt;LiveEdu.tv&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://appletree.or.kr"&gt;Keyboard shortcut image found via Google on appletree.or.kr&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://starcraft2.com/en-us/"&gt;Starcraft recently became Free 2 Play, if you like RTS games, grab it&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.reddit.com/r/starcraft/"&gt;The best place to &lt;del&gt;argue&lt;/del&gt; learn about Starcraft is on Reddit&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Stay tuned for a follow-up post! Follow me here or on Twitter, &lt;a href="https://twitter.com/nebojsac"&gt;@nebojsac&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>games</category>
      <category>productivity</category>
    </item>
    <item>
      <title>You are not your Framework </title>
      <dc:creator>Nick Cinger</dc:creator>
      <pubDate>Wed, 31 Jan 2018 08:30:32 +0000</pubDate>
      <link>https://dev.to/nebojsac/you-are-not-your-framework-3cm6</link>
      <guid>https://dev.to/nebojsac/you-are-not-your-framework-3cm6</guid>
      <description>&lt;p&gt;There is a worrying trend developing among web developers that should be raising red flags in the community. We've gotten so good at promoting Best Practices^tm, Best Frameworks^tm and Don't Reinvent The Wheel^tm, that we forgot to let new developers make their own mistakes, and learn the ins and outs of webdev in the process.&lt;/p&gt;

&lt;p&gt;Code boot-camps, intern positions in companies and online forums alike have drifted towards pushing the greenhorns to &lt;em&gt;"just use the framework"&lt;/em&gt;. Sure there are tedious things they shouldn't be re-writing on every project, like authentication, input sanitizing and cache handling, but they are missing out by not learning how it's done. Except for encryption: &lt;em&gt;Don't roll your own crypto&lt;/em&gt;. Unless you're &lt;a href="https://twitter.com/CiPHPerCoder"&gt;this guy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And I get it, you're new, time is short, you want to skip all the checkpoints and go straight for the finish line. So now you're looking at job postings, online discussions and blog posts to find out which is &lt;strong&gt;the best&lt;/strong&gt; framework to use. Depending on the current year it might come down to a choice between Laravel and Symfony, or maybe CakePHP, Yii and Codeigniter. So now you have your framework and you &lt;strong&gt;steam-roll&lt;/strong&gt; through the "build a blog" tutorial within a single weekend. You venture online proclaiming that you know all there is to know about this &lt;em&gt;so-called&lt;/em&gt; MVC paradigm.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"I just put my HTML/CSS _here&lt;/em&gt;, my database stuff &lt;em&gt;there&lt;/em&gt; and my session stuff &lt;em&gt;all over the god damn place, and _look Ma', I'm doing MVC!".&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Great, this is already a lot better than that mess of &lt;strong&gt;includes&lt;/strong&gt; and &lt;strong&gt;requires&lt;/strong&gt; you had with &lt;code&gt;footer.php&lt;/code&gt; and &lt;code&gt;functions.php&lt;/code&gt; on &lt;strong&gt;every damn&lt;/strong&gt; web request. Now all you need to do is tell the framework what you want, and &lt;em&gt;poof&lt;/em&gt; you've got some instant &lt;del&gt;bloat&lt;/del&gt; feature on your hands that does stuff you don't see and don't even try to understand.&lt;/p&gt;

&lt;p&gt;A week later, you have the Framework^tm sticker, it's on your CV listed under &lt;strong&gt;"proficient in:"&lt;/strong&gt; and you're calling yourself &lt;em&gt;A Web Bagel Meister&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And this is perfectly fine. &lt;em&gt;If you're 1-2 years into web development.&lt;/em&gt; There's nothing wrong with putting on some training wheels. But &lt;em&gt;for goodness sake&lt;/em&gt; learn to ride a bicycle after a while - don't just title your portfolio &lt;strong&gt;"Tricycle Expert"&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Red Flags for the Hiring Process
&lt;/h2&gt;

&lt;p&gt;It's your right to look for the kind of work you'd like to work on. It's also a reality that a lot of what's out there is going to be work on existing, potentially &lt;em&gt;legacy&lt;/em&gt; systems. And there's a good chance it won't be written in Framework^tm.&lt;/p&gt;

&lt;p&gt;If you're shown a piece of the system and asked how you would improve this code-base, and your immediate response is &lt;em&gt;"I would rewrite it all into Framework^tm"&lt;/em&gt; you're going to get a polite smile, a nod and your printed CV in the bin.&lt;/p&gt;

&lt;p&gt;Your favourite framework is not the solution to everything. &lt;strong&gt;I know you have a shiny new hammer&lt;/strong&gt;, but we're not going to let you &lt;strong&gt;chop wood with it&lt;/strong&gt;. Re-writing a multi-year code-base in your favourite framework is &lt;strong&gt;NEVER-EVER&lt;/strong&gt; a valid business decision. &lt;/p&gt;

&lt;p&gt;There's a case to be made for migrating an old system by writing new features in a separate &lt;em&gt;fresh&lt;/em&gt; codebase, and gradually moving bits and pieces out of the legacy system. But I've recently had too many interviewees and new hires think that re-writing a decade-old project into the current hotness is a good idea, to consider it a slip of the tongue.&lt;/p&gt;

&lt;p&gt;I've asked people to do simple stuff, like loop over results, write to a file and use an existing Model and &lt;code&gt;findById()&lt;/code&gt; method. The interviewee with 5+ years of PHP experience reached directly for classes and helper functions from their favourite Framework, even though the task was explicit in making the new Class decoupled. As if there is something inherently &lt;em&gt;dirty&lt;/em&gt; in using &lt;code&gt;file_put_contents()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;"But how can I get out of this and move on with my skillset? Tell me it's not too late &lt;em&gt;senpai&lt;/em&gt;" - you sob as you cling to my kimono. It's not too late, and here a few guidelines:&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't be a Framework^tm Developer
&lt;/h2&gt;

&lt;p&gt;Be a Developer, with MVC framework experience, and hopefully some vanilla PHP to back it up. Learn about Design Patterns. Read &lt;a href="http://www.phptherightway.com/"&gt;"PHP the Right way"&lt;/a&gt;. Do not participate in Framework Wars. I repeat, do &lt;em&gt;not&lt;/em&gt; participate in Framework Wars.&lt;/p&gt;

&lt;p&gt;If you get all defensive every time someone critics a tool you use, it might be time to step back and rethink your position.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write decoupled code
&lt;/h2&gt;

&lt;p&gt;This will force you to &lt;strong&gt;actually learn OOP&lt;/strong&gt; PHP. No, you're not giving up all the niceties of the framework by doing this - you're writing cleaner, more maintainable code that's easier to test. Do it, you'll thank me later. And if in 5 years you decide to rewrite it in your Favourite Framework+1^tm anyway, this will make it a lot easier.&lt;/p&gt;

&lt;p&gt;One of my biggest "A-ha!" moments was when I realized that &lt;em&gt;I'm allowed&lt;/em&gt; to actually create my own folders and class types within the framework directory structure. You mean I can write my own &lt;code&gt;CleanerProxyFactoryGenerators&lt;/code&gt;, and I don't have to cram it all into Controllers or Models!?? &lt;em&gt;&lt;a href="https://medium.com/the-falconry/skinny-models-skinny-controllers-fat-services-e04cfe2d6ae"&gt;Bye bye Fat Models, hello Services&lt;/a&gt;&lt;/em&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Get under the hood as often as possible
&lt;/h2&gt;

&lt;p&gt;If you don't learn how the &lt;em&gt;magic&lt;/em&gt; works under the hood, you're at risk of being bitten by weird bugs, or being stuck in &lt;strong&gt;debug hell&lt;/strong&gt; for days at a time.&lt;br&gt;
Sometimes you don't really need that framework method, many of them are just bloated &lt;code&gt;foreach&lt;/code&gt; loops or array manipulators. Yes, it may cover more edge-cases, but it's open source: take a look and make an informed decision on whether to use it.&lt;/p&gt;

&lt;p&gt;If you're blindly doing things the Framework Way^tm, you won't understand the performance cost associated with it. There is nothing inherently wrong in using &lt;strong&gt;vanilla PHP/JS/Ruby&lt;/strong&gt; to solve the problem, and there's a good chance that it'll solve the problem an order of magnitude faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Continue learning and trying new things
&lt;/h2&gt;

&lt;p&gt;It's going to be hard to become an evangelist for a single framework once you realize that it's not the end-all to web development. More than likely, it does a lot of stuff right, and a few things wrong. This becomes more apparent once you know frameworks with different subsets of correctness and wrongness.&lt;/p&gt;

&lt;p&gt;All in all, as long as you're aware that there's a problem, you can be helped. It's a natural part of learning, but as such it's a stepping stone that you need to move past.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;^Unless ^you're ^using ^CakePHP, ^in ^which ^case ^you're ^golden, ^and ^don't ^need ^to ^change.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>php</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
