In this solo episode, Mike discusses the code refactoring process and then deep dives on work/life balance.\nSegment 1 - What is Refactoring\nRefactoring definitionChanging your code to improve its organization and structure without directly influencing it\u2019s performance\nExplanation of terminologyCode SmellsSomething you notice as your coding that you think will later require a restructure/reorganization\nExtensibilityAbility to later down the road use your current code to extend the capabilities of your program without having to rewrite large portions of code\nMaintainability Make it easier to fix bugs and find issues in your code down the line when you\u2019re not as familiar with it\nExtraction/componentizationTaking functionality from a method and creating its own method so that it becomes reusable to other functions\nSegment 2 - Tips\nRefactor often\nCreate a refactor listWhen you notice a code smell but need to focus on functionality, jot it down in a refactor to do list so you don\u2019t forget to go back and correct\nChange obscure variable names to proper named variables (Maintainability)Also use appropriate variable types. In JS we are limited but we still have the choice between let, const, var\nWhen you notice you\u2019re using the same of similar functionality in multiple functions, externalize that functionality into its own function (extraction/componentization)That could be a seperate function, or it can be a seperate file with a it\u2019s own class and extensible functionalities \nIn vuejs currently you can used Mixins which allow the use of methods across components (in the future this will be handled with hooks)\nRemove old code that you previously commented out\nClean up unused files, folders, functions and images\nChange code to be extensible to your needs (Extensibility)During sprints with short deadlines sometimes you\u2019ll write code to just get something working while realizing that certain functionality that needs to be implemented in the future won\u2019t work with the current implementation\nExample: Internationalization \nRemove unused librariesWe all add libraries as we code to try to meet deadlines faster, but sometimes they don\u2019t work the way we want and we move on to the next one. It\u2019s important to remove them when we realise they don\u2019t fit\nUse tools like prettier and lint to help maintain code structure on a daily basisExample making sure everything is in spaces instead of tabs\nArrow functions instead of expression functions\nAdd comments to sections of code you think need explanation (maintainability) \nWeb News - Work/Life Balance\nOne of the disadvantages of being a contractor/freelancer is not having that 9-5 work structure that you have to follow\nDepending on your situation though it might be an advantage, if your wife works from home also, you can sometimes spend the best parts of the day together. \nInstead of going shopping at peak times you can go earlier and just work when you get back\nTake advantage of off hours for traffic\nA structured day is great, but everyone has a different work rhythm and being able to structure your day based on that can greatly increase productivity. If you work better in the mornings and early evenings you can make the middle of the day your time off for instance\nIf your considering freelancing you have to be able to structure your own days, which seems simple but can really be a challenge.\n\xa0\nYou can find us on...\nFacebook\xa0|\xa0Twitter\xa0|\xa0Instagram\nRSS | Patreon | Spotify\nMedium\xa0|\xa0YouTube\xa0|\xa0GitHub\xa0\nReddit