{"@attributes":{"version":"2.0"},"channel":{"title":"DEV Community: Adri\u00e1n Norte","description":"The latest articles on DEV Community by Adri\u00e1n Norte (@anortef).","link":"https:\/\/dev.to\/anortef","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%2F17515%2F7e849d72-b505-4c2b-8d56-f03326c3f72c.jpeg","title":"DEV Community: Adri\u00e1n Norte","link":"https:\/\/dev.to\/anortef"},"language":"en","item":[{"title":"Podcast solution","pubDate":"Mon, 29 Jul 2019 08:42:49 +0000","link":"https:\/\/dev.to\/anortef\/podcast-solution-3eek","guid":"https:\/\/dev.to\/anortef\/podcast-solution-3eek","description":"<p>Hello, I want to be able to listen to my podcasts on mobile and in PC while keeping in sync what have I listened and what I have added between the two platforms.<\/p>\n\n<p>Is there any solution for this?<\/p>\n\n<p>Thanks.<\/p>\n\n<p>PS: It should work with Android.<\/p>\n\n","category":"help"},{"title":"Some apps I use as a DevOps","pubDate":"Tue, 23 Jul 2019 19:05:16 +0000","link":"https:\/\/dev.to\/anortef\/some-apps-i-use-as-a-devops-33fb","guid":"https:\/\/dev.to\/anortef\/some-apps-i-use-as-a-devops-33fb","description":"<p>I'm usually on osX so most tools are for that environment.<\/p>\n\n<h1>\n  \n  \n  Utility apps\n<\/h1>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/www.alfredapp.com\/\" rel=\"noopener noreferrer\">AlfredApp<\/a>\n<\/h3>\n\n<p>This adds a spotlight like feature with plugins and commands, I particularly enjoy \"screen saver\"(to start it and lock the screen) and \"empty trash\"<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/getbitbar.com\/\" rel=\"noopener noreferrer\">BitBar<\/a>\n<\/h3>\n\n<p>This adds elements to the status bar with the output of the scripts you put on its plugin folder. The project has lots of scripts that you can download but I prefer to use my own, like the one to see how much RAM I have consumed and another that shows how many dockers do I have running at the moment.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/www.enpass.io\/\" rel=\"noopener noreferrer\">Enpass<\/a>\n<\/h3>\n\n<p>It's a nice password manager that stores the vaults on your computer (with the option to sync using your own accounts on cloud providers) and runs on any major platform.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/fitztrev.github.io\/shuttle\/\" rel=\"noopener noreferrer\">Shuttle<\/a>\n<\/h3>\n\n<p>A configurable ssh shortcuts that I mainly use to list and access my ~\/.ssh\/config.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/www.macbartender.com\/\" rel=\"noopener noreferrer\">Bartender<\/a>\n<\/h3>\n\n<p>For when you have way too many icons on the status bar.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/gifox.io\/\" rel=\"noopener noreferrer\">Gifox<\/a>\n<\/h3>\n\n<p>A nice tool to record the screen and make a gif with it, really useful to explain workflows in Jira.<\/p>\n\n<h1>\n  \n  \n  Terminal stuff\n<\/h1>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/iterm2.com\/\" rel=\"noopener noreferrer\">iTerm<\/a>\n<\/h3>\n\n<p>The emulator that everyone should use.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/ohmyz.sh\/\" rel=\"noopener noreferrer\">oh-my-zsh<\/a>\n<\/h3>\n\n<p>Of course, you should use zsh with this to have plugins and themes.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/github.com\/zsh-users\/zsh-autosuggestions\" rel=\"noopener noreferrer\">zsh-autosuggestions<\/a>\n<\/h3>\n\n<p>This is hands down my favorite plugin for zsh. It uses your history to suggest autocompletion.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/github.com\/zsh-users\/zsh-syntax-highlighting\" rel=\"noopener noreferrer\">zsh-syntax-highlighting<\/a>\n<\/h3>\n\n<p>If the command you are writing is not in $PATH it shows in red otherwise in green.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/github.com\/koalaman\/shellcheck\" rel=\"noopener noreferrer\">Shellcheck<\/a>\n<\/h3>\n\n<p>A linter for shell scripts.<\/p>\n\n<h1>\n  \n  \n  VSCode extensions\n<\/h1>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=CoenraadS.bracket-pair-colorizer\" rel=\"noopener noreferrer\">Bracket Pair Colorizer<\/a>\n<\/h3>\n\n<p>It uses different colors for different sets of brackets, it is extremely useful when you have gone a little wild with the if.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=oderwat.indent-rainbow\" rel=\"noopener noreferrer\">Indent Rainbow<\/a>\n<\/h3>\n\n<p>It uses colors to show each column of indentation making very easy to fix indentation errors(looking at you YAML...).<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=markis.code-coverage\" rel=\"noopener noreferrer\">Code Coverage<\/a>\n<\/h3>\n\n<p>Tool to highlight lines not covered by unit tests.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=kisstkondoros.vscode-codemetrics\" rel=\"noopener noreferrer\">CodeMetrics<\/a>\n<\/h3>\n\n<p>Computes complexity in TypeScript \/ JavaScript files.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-azuretools.vscode-docker\" rel=\"noopener noreferrer\">Docker<\/a>\n<\/h3>\n\n<p>Adds syntax highlighting, commands, hover tips, and linting for Dockerfile and docker-compose files.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=felipecaputo.git-project-manager\" rel=\"noopener noreferrer\">Git Project Manager<\/a>\n<\/h3>\n\n<p>It allows you to change easily between git projects.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=johnpapa.vscode-peacock\" rel=\"noopener noreferrer\">Peacock<\/a>\n<\/h3>\n\n<p>Subtly change the workspace color of your workspace. Ideal when you have multiple VS Code instances and you want to quickly identify which is which. This is probably one of my most used extensions. shootout to <\/p>\n<div class=\"ltag__user ltag__user__id__138665\">\n    <a href=\"\/john_papa\" class=\"ltag__user__link profile-image-link\">\n      <div class=\"ltag__user__pic\">\n        <img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F138665%2Fcee5c68d-3bd2-4042-af64-5214952d6c30.jpg\" alt=\"john_papa image\">\n      <\/div>\n    <\/a>\n  <div class=\"ltag__user__content\">\n    <h2>\n<a class=\"ltag__user__link\" href=\"\/john_papa\">John Papa<\/a>Follow\n<\/h2>\n    <div class=\"ltag__user__summary\">\n      <a class=\"ltag__user__link\" href=\"\/john_papa\">Husband, father, &amp; Catholic enjoying life with my family. Working @ Microsoft. Disney fanatic, web and mobile developer<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=humao.rest-client\" rel=\"noopener noreferrer\">Rest Client<\/a>\n<\/h3>\n\n<p>A little and simple rest client inside VSCode.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Shan.code-settings-sync\" rel=\"noopener noreferrer\">Settings Sync<\/a>\n<\/h3>\n\n<p>Synchronize Settings, Snippets, Themes, File Icons, Launch, Keybindings, Workspaces, and Extensions Across Multiple Machines Using GitHub Gist.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=shardulm94.trailing-spaces\" rel=\"noopener noreferrer\">Trailing Spaces<\/a>\n<\/h3>\n\n<p>Highlight trailing spaces.<\/p>\n\n","category":"productivity"},{"title":"Do you really need Kubernetes in your company\/startup?","pubDate":"Mon, 17 Jun 2019 10:37:00 +0000","link":"https:\/\/dev.to\/anortef\/do-you-really-need-kubernetes-in-your-company-startup-1ec0","guid":"https:\/\/dev.to\/anortef\/do-you-really-need-kubernetes-in-your-company-startup-1ec0","description":"<p>Let me start saying that I love Kubernetes, I even have a personal one for my things but I'm an experienced DevOps and it is in my spare time.<\/p>\n\n<p>Usually, you want the complexity of the technical solutions your company uses to increase on complexity accordingly to your needs.<\/p>\n\n<p>You may think: <em>whoa! I need to have autodiscovery between my microservices, a load balancer for the HTTP API and everything must be declared as a code to be maintainable without a shady guy from Ops<\/em><\/p>\n\n<p>And of course, you need that, especially the last part, but is really Kubernetes the only thing that can give you that?<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/docs.docker.com\/compose\/\">Docker-Compose<\/a>\n<\/h3>\n\n<p>Its a tool written in Python that let you define environments using YAML.<\/p>\n\n<p>The good things about this are that you can use this to make and maintain the developer's local environment and If you have only one production server (very little startup) you can even use the same YAML files used to develop your solution to deploy it into the server.<\/p>\n\n<p>The bad thing is that it is not really designed to run on a cluster so you are limited to a one and only production machine.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/docs.docker.com\/engine\/swarm\/\">Docker Swarm<\/a>\n<\/h3>\n\n<p>It's a solution that comes with Docker and allows to manage several machines with Docker as one cluster.<\/p>\n\n<p>In essence, Swarm and Kubernetes do the same but are not the same. The good thing about Swarm is that you can reuse the same YAML files that you were using with docker-compose and, in the pipeline, add the scaling stuff they need on Swarm.<br>\nYou can use things like Traefik to manage the access and you can reuse it if you switch to Kubernetes later on.<\/p>\n\n<p>The only problem is that it lacks good observability when reaching a good size.<\/p>\n\n<h3>\n  \n  \n  <a href=\"https:\/\/kubernetes.io\/\">Kubernetes<\/a>\n<\/h3>\n\n<p>Kubernetes is a generalist container orchestrator, therefore it doesn't deal with Docker concepts but with abstractions that represent concepts inside the ecosystem, like Pods.<\/p>\n\n<p>The good thing about Kubernetes is that is really easy to manage deploys and release cycles using either Kubernetes definitions (YAML or JSON) or Helm charts (a kind of deploy config on repositories) and you can even, with some tinkering around, use docker-compose files to do the deploys. It is also absurdly robust once correctly set up.<\/p>\n\n<p>The cons are that it is not an easy piece of software to manage (the internals) and deploy, thus needing a DevOps team taking care of it.<\/p>\n\n<h3>\n  \n  \n  My Conclusions\n<\/h3>\n\n<p>The key here is to understand where you are, if you are still preparing an MVP to launch and the only thing in your infrastructure is a webserver then you are better off with docker-compose and progressively go up.<\/p>\n\n<p>Also, if your Kubernetes will have more orchestrator services than services is orchestrating then you may be better off with Swarm.<\/p>\n\n<p>All I wanted with this is to make people think about the technologies they choose to use, accidental complexity carries a cost and it should not be taken lightly so don't let the hype get you.<\/p>\n\n","category":["kubernetes","devops","docker","hype"]},{"title":"You don't know TDD","pubDate":"Sun, 17 Mar 2019 16:20:22 +0000","link":"https:\/\/dev.to\/anortef\/you-dont-know-tdd-47a","guid":"https:\/\/dev.to\/anortef\/you-dont-know-tdd-47a","description":"<p>Okay, maybe you think you know what TDD is but let me tell you a story. <\/p>\n\n<p>Some years ago there was this young developer who thought that, even when she\/he had a lot to learn, she\/he at least got a pretty solid foundation. She\/He knew that coupling is bad and classes should be single responsibility and the methods inside the class should be also single responsibility in order to produce maintainable and extensible software. <\/p>\n\n<p>To this point, most of us can resonate with this story and laugh at ourselves for being that naive. Of course, we think we write decoupled code now but the truth is most developers don't know what TDD is and they write coupled code, less coupled that some years ago because of practice, but coupled none the less. Proof of that is on your companies repositories and how developers shudder every time they need to change something on the codebase. <\/p>\n\n<h2>\n  \n  \n  TDD is not Unit Testing but Unit Testing is TDD.\n<\/h2>\n\n<p>TDD, as the name implies, is the practice of developing software aided by tests. One of the tools are Unit Tests but if you only use those you get something like this:<\/p>\n\n<p><iframe class=\"tweet-embed\" id=\"tweet-687672086152753152-526\" src=\"https:\/\/platform.twitter.com\/embed\/Tweet.html?id=687672086152753152\">\n<\/iframe>\n\n  \/\/ Detect dark theme\n  var iframe = document.getElementById('tweet-687672086152753152-526');\n  if (document.body.className.includes('dark-theme')) {\n    iframe.src = \"https:\/\/platform.twitter.com\/embed\/Tweet.html?id=687672086152753152&amp;theme=dark\"\n  }\n\n\n\n<\/p>\n\n<p>Integration tests serve the purpose of checking that your code makes overall sense and does what is expected to do. <\/p>\n\n<p>So, what purpose Unit Tests serve?<\/p>\n\n<p>Unit Test most people think they exist to ensure the contract between classes and they are right but those tests also allow the developer to ensure the quality of the code by listening to the test.<\/p>\n\n<h2>\n  \n  \n  Listening to the tests.\n<\/h2>\n\n<p>A Unit Test shouldn't take more than three or five lines of code and a couple of minutes to write, assuming there is no accidental complexity. If your test is long or hard to write it is a signal of coupling. <\/p>\n\n<p>Tests usually are kinda like \"given X to ClassA.cat() it will call ClassB.fox() with X*Y\" and then you write the call and an assertion, depending on which language and framework this should take two or three lines. If ClassA.cat() does more than multiply then your test will become harder and harder the more things ClassA does because you need to come up with the output to assert against and if your code does a lot of things it would become more difficult to ensure the assertion value.<\/p>\n\n<h2>\n  \n  \n  Applying TDD to the daily code.\n<\/h2>\n\n<p>Red green refactor is great but is not for everyone neither for all the scenarios.<\/p>\n\n<p>Here is how I do things: I write a test that says \"ClassA.cat() calls ClassB.fox()\". I call those test the design tests and use them to build the general structure of the classes. Then, I write the ones that specify the values received and the expected outputs and design the detail of which class does what, in this phase usually the design test get modified because there was some hidden coupling.<\/p>\n\n<p>After those happy test, I write some tests to handle errors and some with other values to ensure nothing weird happens. Then, I write integration tests.<\/p>\n\n<p>And that is more or less it. Also, sorry for my English.<\/p>\n\n","category":["tdd","development"]},{"title":"Explaining Scrum story points","pubDate":"Sat, 23 Feb 2019 10:18:52 +0000","link":"https:\/\/dev.to\/anortef\/explaining-scrum-story-points-3mn1","guid":"https:\/\/dev.to\/anortef\/explaining-scrum-story-points-3mn1","description":"<p>After many years using Scrum and lots of companies later, I have seen that people have a tendency to assign timings to story points like 3 points = 8hour work. This is bad for planning and makes you unable to use one of the properties of Scrum.<\/p>\n\n<p>Let's start by quickly recalling the point of the story points and what do we seek to obtain by using them.<\/p>\n\n<p>Software development teams aren't usually a uniform mind of similar expertise and experience, some people are better at the backend, some have more years of experience, and so on. These differences make them think that they can solve a particular problem in X hours but that X greatly differs on value from member to member of the team and add to that the fact that we, software developers, are way too optimistic at estimating timings. How can we solve these problems?<\/p>\n\n<p>Fortunately, software developers are extremely good at assessing the complexity of a problem and the appraisal difference between a senior and a junior regarding complexity is not that big when compared to difference while comparing timings.<\/p>\n\n<p>So, by relating story points to the complexity we gain a more general consensus about the workload of a given problem thus allowing the team to be able to predict how much complexity they can tackle on a given stretch of time.<\/p>\n\n<h2>\n  \n  \n  Important things to take into account:\n<\/h2>\n\n<ul>\n<li><p>Always remember that this is an iterative process that yields better results the more iterations it runs, so don't expect the first sprint to nail the points.<\/p><\/li>\n<li><p>Never ever change the points assigned to a story. One of the things you expect to gain is predictability and for that, you need to maintain the same error pattern your team has. If you change the value of a story after a sprint that pattern will be blurred or directly lost.<\/p><\/li>\n<li><p>It's the product owner job to translate the amount of complexity a team can tackle into timings for upper management and that should never be a concern for the developers.<\/p><\/li>\n<li><p>If you reduce the number of story points to fit more complexity on the sprint you are only cheating yourself.<\/p><\/li>\n<\/ul>\n\n","category":["scrum","points","agile"]},{"title":"Good code","pubDate":"Fri, 07 Dec 2018 19:19:35 +0000","link":"https:\/\/dev.to\/anortef\/good-code-5bcd","guid":"https:\/\/dev.to\/anortef\/good-code-5bcd","description":"<p>I always hear developers say \"We must write good code\" or \"That code is bad\" but what is good code and what is bad code?<\/p>\n\n<p>First of all, we are engineers and what is engineering? A very basic description is: To solve a problem using the state of the art at the lower cost.<\/p>\n\n<p>Now we have to find where the costs are in software development, the costs are mainly divided in two: creation and maintenance. Being maintenance the one that is the biggest by orders of magnitude therefore we need to lower the cost of maintenance. <\/p>\n\n<p>We have found that TDD and some others called \"good practices\" help make software maintenance costs lower by reducing refactoring risks or making a well structured class system. Therefore a codebase with a 90% code coverage and a very low <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cyclomatic_complexity\">cyclomatic complexity<\/a> isn't good code because it have those but because thanks to those it keeps it's maintenance cost low.<\/p>\n\n<p>With all of this said we can say then that good code is the one that is cheapest to produce (being maintenance inside the production cost) and a good engineer is the one that can produces good code.<\/p>\n\n<p>What are your opinions about this?<\/p>\n\n","category":["basics","discuss"]},{"title":"why branching on git is wrong","pubDate":"Sat, 27 Oct 2018 14:00:46 +0000","link":"https:\/\/dev.to\/anortef\/why-branching-on-git-is-wrong-1pao","guid":"https:\/\/dev.to\/anortef\/why-branching-on-git-is-wrong-1pao","description":"<p>Lots of people often code using feature branching on git to avoid the hassle of conflicts while doing pull and\/or to avoid pushing incomplete features that would break the system for all the team.<\/p>\n\n<p>I find these reasons to be baseless and some even harmful to the development cicle. Trying to develop in your little temporal bubble without being distracted by the rest of your team it's a bad idea, imagine the following: <\/p>\n\n<p>A team of five people have to do a painting of a big landscape, so they split the canvas in five pieces and then each of them paints their part without even looking at what their partners are doing and in two weeks they put all the five pieces together to deliver the product. What do you expect will happen? of course the painting will be a mess with miss aligned items on it that will need to be redrawn at the last minute pulling an all nighter on the worst case. Sounds familiar?<\/p>\n\n<p>How can we work on a single branch without breaking stuff and without continuous conflict? <\/p>\n\n<p>First the conflict part: Communication is key, daily meetings are there for a reason and should be used to smooth cooperation between developers working at the same classes.<\/p>\n\n<p>Now, the scariest part: How to commit half baked features without breaking stuff? or even more, how to commit a new feature that we aren't sure is working correctly? Well, one of the best things about everyone working at the same branch is that if something breaks it will be noticed quickly and fixed at an early stage and therefore less painful process.<\/p>\n\n<p>For the part of committing without breaking the system for everyone there is a very good technique called \"feature toggling\". Basically what you do is put an if like this:<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nx\">useNewLogic<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">awesomeNewFeatureEntryPoint<\/span><span class=\"p\">();<\/span>\n<span class=\"p\">}<\/span> <span class=\"k\">else<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">legacyEntryPoint<\/span><span class=\"p\">();<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>This allows to run the new code when you want and where you want without risking all the environments and such.<\/p>\n\n<p>This way of working also benefits of the fact that because everyone is working at the same place if your new feature conflicts with some change of class contract you can fix it quickly, it means that you are doing continuous integration.<\/p>\n\n<p>One way I have found in my personal experience that people that comes used to work with branches feels more comfortable to do the switch is to have two branches, for example: develop and master. With the only way to put things on master is via a pull request.<\/p>\n\n<p>I would love to read your opinions of this matter on the comments.<\/p>\n\n","category":["git","branches","ci"]}]}}