<?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: Michael Simmonds</title>
    <description>The latest articles on DEV Community by Michael Simmonds (@mikesimmonds).</description>
    <link>https://dev.to/mikesimmonds</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%2F786437%2F10d49dfd-5ad2-4e96-9a2d-76726a98ba48.jpg</url>
      <title>DEV Community: Michael Simmonds</title>
      <link>https://dev.to/mikesimmonds</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikesimmonds"/>
    <language>en</language>
    <item>
      <title>Shortening import paths (path aliases) in vite-react-ts with NX mono-repos.</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Fri, 15 Nov 2024 12:01:54 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/shortening-import-paths-path-aliases-in-vite-react-ts-with-nx-mono-repos-ml6</link>
      <guid>https://dev.to/mikesimmonds/shortening-import-paths-path-aliases-in-vite-react-ts-with-nx-mono-repos-ml6</guid>
      <description>&lt;p&gt;The aliases (shortened paths) need to be set in both the root  tsconfig.base.json and vite.config.ts files. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;vite.config.ts will be used at compile time to tell the vite compiler where your files are located. Its critical that both are set up correctly.&lt;/li&gt;
&lt;li&gt;tsconfig is required so typescript knows where the file can be found for intellisense and automatic imports. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The way tsconfig.json files extend one another can cause confusion when setting up path aliases in monorepo projects. Therefore its critical we add out aliases to the tsconfig.base.json file in the root of the mono-repo, not in the tsconfig.json file found in individual apps.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The "extends" property of a tsconfig.json file is poorly named. The properties of the file being extended (often tsconfig.base.json) are &lt;em&gt;overridden&lt;/em&gt; not extended.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To add custom path aliases the following pattern can be used.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Add the path alias to the tsconfig.base.json file in the root of the monorepo.
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "compilerOptions": {
    "paths": {   
      "@&amp;lt;project-name&amp;gt;/&amp;lt;import-alias&amp;gt;": [
        "apps/&amp;lt;app-name&amp;gt;/&amp;lt;path-to-dir&amp;gt;"
      ]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@&amp;lt;project-name&amp;gt;/&amp;lt;import-alias&amp;gt;&lt;/code&gt; is the shortened, readable import path you will use in your files. eg: &lt;code&gt;import {FileName} from '@&amp;lt;project-name&amp;gt;/&amp;lt;import-alias&amp;gt;'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;apps/&amp;lt;app-name&amp;gt;/&amp;lt;path-to-dir&amp;gt;&lt;/code&gt; is the directory that you wish to alias (relative to the tsconfig.base.json file location)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;the @ symbol is not required, but it is the standard pattern to prepend the aliases when using nx.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Add a path alias to the vite.config.ts file inside the app(s) you will be using the alias.
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as path from 'node:path';
export default defineConfig({
    resolve: {
      alias: {
        '@&amp;lt;project-name&amp;gt;/&amp;lt;import-alias&amp;gt;': `${path.resolve(__dirname, './&amp;lt;path-to-dir&amp;gt;')}`
      },
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@&amp;lt;project-name&amp;gt;/&amp;lt;import-alias&amp;gt;&lt;/code&gt; is the same alias as used in the tsconfig file and should match exactly.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;path-to-dir&amp;gt;&lt;/code&gt; is the directory which you wish to alias. NB: this is relative to the location of the vite.config.ts file so the path will be different from the one used in tsconfig.base.json. usually &lt;code&gt;./src/path/to/directory&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup should allow you to user shortened aliases, which act as absolute imports in your Vite-React Typescript projects.&lt;/p&gt;

&lt;p&gt;Goodbye &lt;code&gt;import {filename} from '../../../../relative/import/that/breaks/all/the/time'&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Basic Mastering in Ableton</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Sun, 28 Jan 2024 20:30:26 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/basic-mastering-in-ableton-4n06</link>
      <guid>https://dev.to/mikesimmonds/basic-mastering-in-ableton-4n06</guid>
      <description>&lt;p&gt;Notes on the tips provided in this video:&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=qrroYDVdPUc&amp;amp;ab_channel=AbletonTipsbyPML" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=qrroYDVdPUc&amp;amp;ab_channel=AbletonTipsbyPML&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check you have headroom on the master track ~5db is ok&lt;/li&gt;
&lt;li&gt;Add a limiter to the master track with lookahead to 6ms and the ceiling to -1.0db. Puch the gain until you can ear audible distortion. At that point, wind the gain back by 1db.&lt;/li&gt;
&lt;li&gt;Then add 'ulene loudness meter' after the compressor. If you can't turn the gain on your limiter up and get to around 10Lufs without distortion, then you need to go back to your track and mix it better as one of the sounds is smashing the limiter and needs fixing.&lt;/li&gt;
&lt;li&gt;Add an eq8 to the master track before the limiter. turn off the visualiser on it. We'll come back to this later.&lt;/li&gt;
&lt;li&gt;Next we check the mono and mid/side mixes separately. Set 2 utility plugins on the master track, one with the mono button pressed, one with the mid/side knob turned up to 100%. Now we can listen to both individually and hear what might need to happen in the eq we just added.&lt;/li&gt;
&lt;li&gt;Start with the mid/side. Listen to it and see if its muddy (it often is due to stereo effects bleeding into each other. If it is muddy: turn off the mid/side utility first then set the eq8 to mid/side mode and set a low cut. move the low-cut freq up and down until the track looses its warmth, then pull it back a little bit. Then listen out for elements in the mix that are too forward, or causing mud and use a band-cut to remove them. Eq it up, small changes, this is mastering, not creative. &lt;/li&gt;
&lt;li&gt;Add a glue compressor after the eq and before the limiter. Set the eq on the glue compressor to the fundamental of the kick (use a spectrograph to find it) Set the q quite tight ~3. Set attack a bit slow ~10 and the release fast to about 0.10.
Pull the threshold down until the kick sits in the mix better and feels cleaner. N0 makeup gain.&lt;/li&gt;
&lt;li&gt;Add another eq after the compressor and use this as makeup gain. add gain to it based on how much you lost in the compressor (see the meter) then add a little light eqing as necessary.
We now have a clean sound and can boost it.&lt;/li&gt;
&lt;li&gt;Finally add another compressor at the end of the chain after the one we previously added. Set the set the old one back to 0db ceiling and the new limiter ceiling to -1db with 1.5ms lookahead. Push the gain until you hear audible distortion and then pul it back by 1db as we did before.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should be able to et to -8db LUFS with this. if you cant you may need to think about your mix again.&lt;/p&gt;

</description>
      <category>music</category>
      <category>ableton</category>
    </item>
    <item>
      <title>Long-list of questions to ask in interviews.</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Tue, 26 Sep 2023 08:22:58 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/long-list-of-questions-to-ask-in-interviews-15d2</link>
      <guid>https://dev.to/mikesimmonds/long-list-of-questions-to-ask-in-interviews-15d2</guid>
      <description>&lt;p&gt;This is a ever-growing collection of possible interview questions that may or may not be relevant for any particular interview.&lt;/p&gt;

&lt;p&gt;Its intended as a kitchen-sink reference for use during interview preparation so pick out the ones you want based on the role and what you could not discover about the company before hand.&lt;/p&gt;

&lt;p&gt;This is for my own use: You are more than welcome to reference it too - but there may be some parts that are less relevant to you and your roles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering approach
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What types of engineering problems are you facing these days?&lt;/li&gt;
&lt;li&gt;What is your team’s biggest current challenge?&lt;/li&gt;
&lt;li&gt;What do you see as the engineering team’s role in the company?&lt;/li&gt;
&lt;li&gt;What does a typical day in the life of an engineer look like?&lt;/li&gt;
&lt;li&gt;How does the handoff between frontend and backend engineers work?&lt;/li&gt;
&lt;li&gt;What testing frameworks do you use, what is the policy for testing and how do you mitigate the risk of developers cutting corners on testing when under time-pressure.&lt;/li&gt;
&lt;li&gt;Whats your tech stack?&lt;/li&gt;
&lt;li&gt;How is the interaction between developers and product managers?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Product / Project management
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;How do product, design and engineering collaborate to take an project from idea to deployment?&lt;/li&gt;
&lt;li&gt;How much of a say do engineers have into the design/ux of products?&lt;/li&gt;
&lt;li&gt;Is this a product-focused company or a service-based business?&lt;/li&gt;
&lt;li&gt;How do you review your product roadmap?&lt;/li&gt;
&lt;li&gt;What software do you use (this shows a lot about a company so its great if yo have experienced a few). How long have they been using it and is it used in all cases?&lt;/li&gt;
&lt;li&gt;How much of the work is green-fields vs legacy application and how are developers assigned to each? Do the old-guard get all the new projects?&lt;/li&gt;
&lt;li&gt;Do you have a standard release cycle? (shorter cycles more testing)&lt;/li&gt;
&lt;li&gt;How do you deal with tech dept? Is time set aside for tech dept?&lt;/li&gt;
&lt;li&gt;What do you do when things go wrong? For larger issues do you have retrospectives?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Role progression &amp;amp; Performance
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;If I were to get this position, how would my performance be measured? How often are roles reviewed, and what is the mechanism (Personal Development meetings?)&lt;/li&gt;
&lt;li&gt;If I exceeded the expectations for this role in 6 months, where would you see me going from there?&lt;/li&gt;
&lt;li&gt;What qualities will I need to have to be successful in this position?&lt;/li&gt;
&lt;li&gt;How would you describe a 10x employee if one existed?&lt;/li&gt;
&lt;li&gt;Would my compensation be tied to performance or mostly title and responsibilities?&lt;/li&gt;
&lt;li&gt;Why are you hiring and what do you hope to achieve by hiring for this position?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Professional/Career development
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;How do you ensure the success of new employees through your onboarding process?&lt;/li&gt;
&lt;li&gt;What are the learning / career development opportunities available to your employees?&lt;/li&gt;
&lt;li&gt;Are there opportunities to switch roles internally inside the company down the road? Or do you tend to hire externally?&lt;/li&gt;
&lt;li&gt;Where have previous successful employees in this position progressed to?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Work culture / Team
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Everyone likes to talk about work/life balance - what is your take on it?&lt;/li&gt;
&lt;li&gt;Have you ever seen your CEO or other leaders admit when they were wrong, own it, and make changes?&lt;/li&gt;
&lt;li&gt;What are the company’s top 3-5 values for their employees?&lt;/li&gt;
&lt;li&gt;Would you consider your company to be “remote first / friendly”? What does that look like?&lt;/li&gt;
&lt;li&gt;How would you describe the work environment here—is the work typically more collaborative or more independent?&lt;/li&gt;
&lt;li&gt;How many meetings do developers have? Do developers interact directly with clients and stakeholders, or do they need to go through a PM?&lt;/li&gt;
&lt;li&gt;Why do you like working here?&lt;/li&gt;
&lt;li&gt;What is the teams biggest challenge?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Product market fit / unique value proposition
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What makes you better than all your competitors?&lt;/li&gt;
&lt;li&gt;What problem are you solving that no one else is? (eg. your unique value proposition)&lt;/li&gt;
&lt;li&gt;Where do you see the company growing towards in two to three years?&lt;/li&gt;
&lt;li&gt;What can you tell me about your new products or plans for growth?&lt;/li&gt;
&lt;li&gt;Who is one of your biggest competitors in the field and what is something they do better than you?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Financial health of the company
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is your net revenue retention rate?&lt;/li&gt;
&lt;li&gt;What is the company’s burn rate / runway – eg. how long they can operate without running out of cash?&lt;/li&gt;
&lt;li&gt;How much money has your company raised?&lt;/li&gt;
&lt;li&gt;When do you expect the company to be profitable if they aren’t already?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Credits:
&lt;/h2&gt;

&lt;p&gt;Claeb Mallas: &lt;a href="https://levelupsoftwareengineering.substack.com/p/35-questions-to-ask-while-interviewing" rel="noopener noreferrer"&gt;https://levelupsoftwareengineering.substack.com/p/35-questions-to-ask-while-interviewing&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Time, quality, cost triangle when the client can't choose.</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Thu, 02 Mar 2023 09:26:33 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/time-quality-cost-triangle-when-the-client-cant-choose-4c13</link>
      <guid>https://dev.to/mikesimmonds/time-quality-cost-triangle-when-the-client-cant-choose-4c13</guid>
      <description>&lt;p&gt;The time/quality/cost triangle is well know as a good way to decide where flexibility is in a project.&lt;/p&gt;

&lt;p&gt;In short, the client decides on &lt;strong&gt;one&lt;/strong&gt; of these if is the most important to the business and the other 2 are given more flexibility as specifications and timelines wander.&lt;/p&gt;

&lt;p&gt;Sometime clients refuse to pick one, and say for example: they need time and cost, but will allow for lower quality. this is not enough room for manoeuvre on a project as complex as a web application.&lt;/p&gt;

&lt;p&gt;Therefore:&lt;br&gt;
Only quality is flexible: &lt;br&gt;
The app produced is agreed to be rebuilt properly after a pre-determined time limit (1 or 2 years probably). &lt;/p&gt;

&lt;p&gt;This time limit could be discussed at the time, but deciding this up front allows the client to manage costs, rather than devs coming back after 1 year and telling them that they need a rebuild - because the app has become unmaintainable (and this was predictable a year ago!)&lt;/p&gt;

&lt;p&gt;Be wary of people thinking/pretending this is the same as Agile! It is absolutely not.&lt;/p&gt;

&lt;p&gt;Only Time is flexible:&lt;br&gt;
The app to be produced does not have a fixed deadline, and the client expects longer response times, and does not decide on a launch date until after the app is completed.&lt;/p&gt;

&lt;p&gt;When both quality and time are constrained the company ned the flexibility of allowing devs to move to other projects and deprioritise the one with the flexible time-scale. Having any kind of launch date planned before the app is completed and signed off is a fools errand as it will almost always be missed (and this was predictable at the start of the project!)&lt;/p&gt;

&lt;p&gt;Only Cost is flexible:&lt;br&gt;
The price is not determined before time and the client pays whatever costs are generated whilst trying to rush a high quality app out of the door, even if estimates are inaccurate.&lt;br&gt;
Cost estimates for features cannot be enforced, as more developers will need to be drafted in to finish the app in time. Cost-flexible clients would receive the developer hours from projects whose time is flexible to allow cost saving for the time-flexible projects and time-saving on the cost flexible projects. Csots on these projects can spiral and its imperative that the client is planning for this. Its not fair to wait until the crunch of a project and say that you have run out of budget. The client needs time to gather budget (and this was predictable at the start of the project!)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Setting up an Angular project with Angular cli, GitHub cli and deployment to GH Pages</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Wed, 15 Feb 2023 13:57:34 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/setting-up-an-angular-project-with-angular-cli-github-cli-and-deployment-to-gh-pages-4fdp</link>
      <guid>https://dev.to/mikesimmonds/setting-up-an-angular-project-with-angular-cli-github-cli-and-deployment-to-gh-pages-4fdp</guid>
      <description>&lt;p&gt;This guide uses Angular cli, git cli, GitHub Pages and a package called &lt;a href="https://www.npmjs.com/package/angular-cli-ghpages" rel="noopener noreferrer"&gt;angular-cli-ghpages&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Angular cli (this example uses Angular 13)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Github cli ( this example uses v2.4)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In your workspace spin up a new angular app with:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng new &amp;lt;app-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will prompt you to create a new project, set up a local git repo and make an initial commit for you.&lt;/p&gt;

&lt;p&gt;To create a new repo on GitHub with the command:&lt;br&gt;
&lt;code&gt;gh repo create&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Select 'Push an existing local repository to Github` and follow the interactive prompts.&lt;br&gt;
The repo will need to be public unless you have GitHub Pro.&lt;br&gt;
When offered, set up a remote, &lt;br&gt;
This will create a github repo for your project and set up the remotes so you can push to it easily.&lt;/p&gt;

&lt;p&gt;Now we add the angular-cli-ghpages package. Note the use of ng add, not npm i.&lt;br&gt;
&lt;code&gt;ng add angular-cli-ghpages&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add a script to package.json to simplify deploy.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open package.json.&lt;/li&gt;
&lt;li&gt;In the scripts object add a new line:
&lt;code&gt;"deploy": "ng deploy --base-href=/&amp;lt;your-repo-name&amp;gt;/"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Commit your changes to the main branch&lt;br&gt;
&lt;code&gt;git add .&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git commit -m "added angular-cli-ghpages"&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git push origin main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a new branch called gh-pages (this can be customised, but you will need to select a different branch in the github settings page mentioned below)&lt;br&gt;
&lt;code&gt;git branch gh-pages&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git checkout gh-pages&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git push origin gh-pages&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Set up GitHub Pages in the browser (just need to check this - it should be setup in the correct way by default)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find the repo you just created on GitHub.com&lt;/li&gt;
&lt;li&gt;Setting &amp;gt; Pages&lt;/li&gt;
&lt;li&gt;In Source select deploy from branch (automatic)&lt;/li&gt;
&lt;li&gt;Under branch select gh-pages and /root (automatic)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally - its time to deploy the base application&lt;br&gt;
&lt;code&gt;git checkout main&lt;/code&gt;&lt;br&gt;
&lt;code&gt;npm run deploy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;NB: The deploy script will build your application and overwrite the contents of the gh-pages branch with the compiled build. There is rarely any need to have the gh-pages branch checked out locally, so I suggest you delete it.&lt;/p&gt;

&lt;p&gt;If all is well - your application should be deployed to &lt;code&gt;http://&amp;lt;gh-username&amp;gt;.github.io/&amp;lt;repo-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

</description>
      <category>motivaton</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Consistent architecture is the cornerstone of confident testing.</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Mon, 09 Jan 2023 15:20:49 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/consistent-architecture-is-the-cornerstone-of-confident-testing-22n8</link>
      <guid>https://dev.to/mikesimmonds/consistent-architecture-is-the-cornerstone-of-confident-testing-22n8</guid>
      <description>&lt;p&gt;This post is about the importance of good architecture in the path to creating testable applications. Well architected applications allow a team to work quickly and confidently whilst focussing on the task in hand, rather than worrying that their changes may break existing features.&lt;br&gt;
A consistent approach to UI architecture and creating features is required before you are able to get the most value, and confidence out of the tests you write.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quality takes &lt;del&gt;time&lt;/del&gt; iterations.
&lt;/h2&gt;

&lt;p&gt;Although consistency is important, it is not necessary to have the perfect UI architecture that will last forever straight away - so long as it is considered and documented, a feedback process of working and improvement can begin. Its important that any decisions have buy-in from the whole team - therefore be sure to keep everybody as involved in the process as possible - as they will be the ones giving you feedback to improve further down the line.&lt;/p&gt;

&lt;h2&gt;
  
  
  The importance of framework and tooling agnostic architecture
&lt;/h2&gt;

&lt;p&gt;Anyone who has worked in the industry for any length of time will be aware that the fashionable frameworks and tooling of the time change rapidly. There are use-cases where certain tooling is critical to the success of an application. These cases will be picked up during the specification stage and the temptation to add tooling should always be tempered with the question: "Can this problem be solved with a better architecture rather than tie us into a tool".&lt;/p&gt;

&lt;h2&gt;
  
  
  Architectural design thinking
&lt;/h2&gt;

&lt;p&gt;At the core of good design is creating something that works well without much thought. &lt;a href="https://sensible.com/dont-make-me-think/" rel="noopener noreferrer"&gt;Don't make me think&lt;/a&gt; by Steve Krug and &lt;a href="https://jnd.org/about/" rel="noopener noreferrer"&gt;The design of everyday things&lt;/a&gt; shows these principles in the realm of visual and product design, but the principles are universal. &lt;/p&gt;

&lt;h2&gt;
  
  
  Separation of concerns
&lt;/h2&gt;

&lt;p&gt;Separation of concerns is critical in designing good software as it is universally applicable and forces you to really think about what you are doing, where and why.&lt;br&gt;
Thinking should be done about the problems involved, but not about the framework itself.&lt;br&gt;
Split the problem into primary concerns&lt;br&gt;
Presentation concerns, Business concerns and Data concerns&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture as a cornerstone
&lt;/h2&gt;

&lt;p&gt;In the context of stone masonry cornerstones are the most highly engineered part of a structure. They only make us a small amount of the physical size, however they are completed by the most skilled masons. Strong cornerstones allow the other people working on the structure to build the walls between them more quickly and creatively - without risking the structural integrity of the building.&lt;br&gt;
In the context of development Cornerstone architecture sets the context for the stability of the system. Once these cornerstones have been put in place, the system can be consistent. Having these constraints in place actually improves creativity as you can go any way you like - so and remain confident that the wider product will not be effected.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pit of success
&lt;/h2&gt;

&lt;p&gt;An honourable mention goes to an article called &lt;a href="https://blog.codinghorror.com/falling-into-the-pit-of-success/" rel="noopener noreferrer"&gt;Falling into the Pit of Success&lt;/a&gt; by Jeff Atwood. It is very relevant here as once a team has a strong architecture that they can all work within, they will fall into the pit of success and be able to work more quickly and more confidently in their roles. This breeds a feeling of confidence, self-reliance and developer-happiness which in turn will lead to a better ed product.&lt;/p&gt;

&lt;p&gt;Although this is not a practical guide by any means, I hope that the information has inspired you to create more consistent architectural cornerstones that allow your team more flexibility and creativity as they work.&lt;br&gt;
As always I appreciate feedback and this article is a never-ending work in progress, so feel free to start a discussion and we can all learn from one another.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How I approach testing in Angular and React.</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Sun, 08 Jan 2023 19:09:24 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/how-i-approach-testing-in-angular-and-react-37ni</link>
      <guid>https://dev.to/mikesimmonds/how-i-approach-testing-in-angular-and-react-37ni</guid>
      <description>&lt;h2&gt;
  
  
  Testing is not fun, does not add value to the end user and should be avoided..
&lt;/h2&gt;

&lt;h2&gt;
  
  
  However:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Manual testing sucks more than writing automated tests.&lt;/li&gt;
&lt;li&gt;Writing tests for code you did not write is awful.&lt;/li&gt;
&lt;li&gt;Working on code that has no tests requires a full understanding of every use-case which is a costly overhead and can lead to unanticipated bugs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What type of tests are useful in the front end?
&lt;/h2&gt;

&lt;p&gt;There is some ambiguity in the terms used for testing, so your team may use different definitions, however I find the definitions below are sufficient.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;End to end. Runs commands using a browser and a real API connection. They are to test user stories and covers a lot of different components and their interaction together. A single e2e test can save a lot of functional and unit testing so should be preferred. I like &lt;a href="https://www.cypress.io/" rel="noopener noreferrer"&gt;Cypress&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Functional testing. Used to test components using a virtual dom without a browser. API calls and other external dependencies should be mocked. Here we are testing the functionality of a component or group of components, not the implementation. I like Kent C Dodds &lt;a href="https://testing-library.com/" rel="noopener noreferrer"&gt;testing-library&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit testing. Tests the implementation of a component or function. Only complex business logic or utility functions are worth testing. Functional and e2e tests more accurately mock the users experience and should be preferred. Other types of test offer much better bang-for-your-buck so let's not spend time testing the implementation of every minutiae.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What should be tested?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Critical user paths such as login and store checkouts. (using e2e testing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Things that the PM or Client always monkey test (to save them time). discussing this with the also highlights critical application areas that may not be obvious to the developer. This is a great way to convince managers to allow you time to test the application, as they will be saving time themselves! (using e2e and functional testing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Things that suck to test in the ui. For example things that render based on slow api calls. It's faster to write the tests than monkey test during development. (Functional testing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reusable components or libraries that are used across projects. Thorough testing here adds significant value as one test covers many projects. These are treated as dependances and should not be re-tested in the project that consumes them . (Functional and unit testing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Complex or critical business logic. For example break a complex sorting function into its own file and cover with tests. This conveniently documents the sorting function and means any changes to the spec can be implemented with more confidence. (Unit testing)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Finally:
&lt;/h2&gt;

&lt;p&gt;Is there any point if the client or PM will manually test anyway?&lt;br&gt;
Yes, let them test. If your tests are good they should not find anything unexpected. If they do find something then this will highlight issues at either the specification phase, or your tests where not accounting for all of the requirements.&lt;br&gt;
These feedback loops are central to good software development.&lt;/p&gt;

&lt;p&gt;Thanks for reading - I try to keep these posts as terse as possible but if you have any questions or think that something is just plain wrong. Please comment below so we can learn from one another.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>Omnisharp not working in vscode - fix</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Thu, 15 Sep 2022 15:33:17 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/omnisharp-not-working-in-vscode-fix-1i81</link>
      <guid>https://dev.to/mikesimmonds/omnisharp-not-working-in-vscode-fix-1i81</guid>
      <description>&lt;p&gt;My intellisense for vscode suddenly bailed out on me:&lt;/p&gt;

&lt;p&gt;Before we start mucking about too much let's try some standard things to get it back up and running:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reset the OmniSharp server - Command palette - OmniSharp: Restart OmniSharp.&lt;/li&gt;
&lt;li&gt;Check that OmniSharp is looking at the right project - Command palette - OmniSharp: Select Project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If neither of these work - follow on for another option:&lt;/p&gt;

&lt;p&gt;Microsoft released a new version of the C# extension (v1.25) for vscode that breaks for older projects (the one I'm using is 2.1 :\ ). The tools required for it to work are no longer included in the extension - so you need to download them yourself.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In vscode go to settings (I used workspace settings) and search for "Omnisharp - use modern net" set this to off.&lt;/li&gt;
&lt;li&gt;Mac: &lt;a href="https://www.mono-project.com/download/stable/" rel="noopener noreferrer"&gt;Download&lt;/a&gt; and install Mono that includes the build tools (Visual Studio Channel).
Windows: &lt;a href="https://visualstudio.microsoft.com/downloads/" rel="noopener noreferrer"&gt;Download&lt;/a&gt; and install Visual Studio MSBuild Tools or a full Visual Studio version.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Restart vscode. I had restart the OnmiSharp server (see above) even after a restart of vscode itself.&lt;/p&gt;

&lt;p&gt;If this helps a single person I'll be happy - I lost hours to this!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>vscode</category>
      <category>dotnet</category>
      <category>azure</category>
    </item>
    <item>
      <title>Questions to ask when approached by a recruiter</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Tue, 22 Mar 2022 16:19:05 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/questions-to-ask-when-approached-by-a-recruiter-2a47</link>
      <guid>https://dev.to/mikesimmonds/questions-to-ask-when-approached-by-a-recruiter-2a47</guid>
      <description>&lt;p&gt;They promise the world - and before the ink is dry on the contract the cracks start to become apparent. You don't fit the company culture, all your colleagues wear suits whilst working from home and your CEO is a psychopath... &lt;/p&gt;

&lt;p&gt;How can you improve your chances of getting a job you really love?&lt;/p&gt;

&lt;p&gt;Mindset:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A recruiter's job is to recruit and they have little technical knowledge (and will often get it wrong [sometimes it feels deliberate])&lt;/li&gt;
&lt;li&gt;Companies are desperate for hires and will bend the truth to get you onboard&lt;/li&gt;
&lt;li&gt;Remember you're bending the truth too. It's important to be mindful that everyone in the room is trying to present the best version of themselves... and that's OK.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questions that work:&lt;br&gt;
Spend time writing out the questions that matter to you, from your experience in your professional life. I like to think of this kind of task as an improvable process - good quality questions will illicit good quality responses. Create a process improvement loop by taking careful note of the responses you receive to each question and then refine your questions based on the response by rewording, replacing or keeping each question.&lt;/p&gt;

&lt;p&gt;Have a practice. Just try turning on 'open to work' on LinkedIn for a couple of days - it's likely you will be inundated with requests from recruiters for all sorts of roles. Use these eager-beavers to hone your questions.&lt;/p&gt;

&lt;p&gt;So to put my card on the table, here are the first set of questions I will be responding to recruiters with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What are the remote working arrangements at the company, and when did the company start remote working?&lt;/li&gt;
&lt;li&gt;How big is the company? What is the turnover and how many employees does it have?&lt;/li&gt;
&lt;li&gt;What is the time-frame for filling the vacancy and when would they like me to start work?&lt;/li&gt;
&lt;li&gt;Is there a standard tech stack across the company or does it differ per project? &lt;/li&gt;
&lt;li&gt;How is the company structured? As independently functioning teams or as a single structure with different departments (eg client management dept, operations dept etc)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'll update with the responses I get, and how I use them to improve my questions.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Organising scss in Angular</title>
      <dc:creator>Michael Simmonds</dc:creator>
      <pubDate>Tue, 15 Feb 2022 16:51:05 +0000</pubDate>
      <link>https://dev.to/mikesimmonds/organising-scss-in-angular-188e</link>
      <guid>https://dev.to/mikesimmonds/organising-scss-in-angular-188e</guid>
      <description>&lt;p&gt;Styling in Angular can be a bit intimidating at the start. Hopefully this will shed a bit of high-level light on the situation.&lt;/p&gt;

&lt;p&gt;There are 3 main places to stick your styles in Angular:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Component styles - Style encapsulated to the component.&lt;/li&gt;
&lt;li&gt;Global styles - Styles in the global scope. &lt;/li&gt;
&lt;li&gt;Dependency styles - mixins &amp;amp; variables that other stylesheets depend on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Component styles&lt;br&gt;
These are the easiest to talk about so let's keep it brief. Angular uses the excellent Shadow DOM technique to allow us to encapsulate (protect from outside interference) the styles of our components.&lt;br&gt;
Advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is the mechanism that allows us to create truly reusable components that we can reuse within the same app or in a different project.&lt;/li&gt;
&lt;li&gt;This also makes styling much easier to read and reason about. As our component is only effected by the styles in the (nice and short) stylesheet and the very minimal global styles we may have.&lt;/li&gt;
&lt;li&gt;It improves separation of concerns. The responsibility of styling a component should be with the component itself, as opposed to the wider app.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NB: Component style encapsulation only works within the component tree. Therefore global styles will still effect all components.&lt;/p&gt;

&lt;p&gt;Global Styles:&lt;br&gt;
These are the 'normal' way css works. All of the styles are bundled together from the styles.scss file in the project root and added into the head of index.html. You can find the global styles in the compiled output  - its usually the last tag in the head tag and looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="styles.081464a278750c3f7d11.css"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Global styles do effect all elements inside the app - so it is prudent to be sure anything you add there is truly global, and that a component intended for reuse won't rely on these to be able to render correctly.&lt;br&gt;
I recommend to only have these files (or similar) globally available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;"./app/scss/reset"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;reset&lt;/span&gt; &lt;span class="nt"&gt;browser&lt;/span&gt; &lt;span class="nt"&gt;styles&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nt"&gt;import&lt;/span&gt; &lt;span class="s2"&gt;"./app/scss/typography"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;add&lt;/span&gt; &lt;span class="nt"&gt;font-imports&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nt"&gt;import&lt;/span&gt; &lt;span class="s2"&gt;"./app/scss/base"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;add&lt;/span&gt; &lt;span class="nt"&gt;basic&lt;/span&gt; &lt;span class="nt"&gt;styles&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;like&lt;/span&gt; &lt;span class="nt"&gt;fonts&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The order of the imports in styles.scss is important.&lt;/p&gt;

&lt;p&gt;Dependency styles:&lt;br&gt;
Dependency styles are those that are references all over the app, in different feature modules and often in base.scss. These are most likely to be variables and mixins to keep the app consistent.&lt;br&gt;
The reason that the variables and mixins are not in the global scope is that Angular will compile different style bundles for different lazy-loaded modules or chunks individually. Therefore if a module depends on scss $variables that are in the global scope, then the modules are not truly reusable. This is a bit of a point-of-contention as it could be argued that there is still a dependancy on the variables.scss file, however the variables should be considered similar to an API Interface as most components will rely on the --primary-brand-color regardless of which project they are in.&lt;br&gt;
Dependancy style imports can be quite annoying as they can get very long, and need updating every time you move the component in the filetree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;"../../scss/vars/variables"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;To fix this, an argument can be added to angular.json to let the compiler know where the stylesheets are. This is: stylePreprocessorOptions.includePaths and accepts an array of directories.&lt;br&gt;
I choose to store all of my dependancy styles in a folder called "importable" as shown below:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;json&lt;br&gt;
  "projects": {&lt;br&gt;
    "app-name": {&lt;br&gt;
      ...&lt;br&gt;
      "architect": {&lt;br&gt;
        "build": {&lt;br&gt;
          "builder": "@angular-devkit/build-angular:browser",&lt;br&gt;
          "options": {&lt;br&gt;
            ...&lt;br&gt;
            "styles": ["src/styles.scss"],&lt;br&gt;
            "scripts": [],&lt;br&gt;
            "stylePreprocessorOptions": {&lt;br&gt;
              "includePaths": ["src/app/scss/importable"]&lt;br&gt;
            }&lt;br&gt;
          },&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;NB: It is preferable for the scss stylesheets to go into a folder in the root of the project, rather than inside the /assets folder. The assets folder is generally reserved for public files, which doesn't really apply to your stylesheets!&lt;/p&gt;

&lt;p&gt;As always - Thanks for reading - if you have any comments or corrections please give me a shout.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>scss</category>
    </item>
  </channel>
</rss>
