<?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>Forem: Hasib Ahmed</title>
    <description>The latest articles on Forem by Hasib Ahmed (@1solation).</description>
    <link>https://forem.com/1solation</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%2F937596%2F6b3c4af6-95e9-4ab9-9be1-4996ea6cadf1.jpg</url>
      <title>Forem: Hasib Ahmed</title>
      <link>https://forem.com/1solation</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/1solation"/>
    <language>en</language>
    <item>
      <title>Creating value and coding with a purpose - lessons by The Lean Startup</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Wed, 30 Oct 2024 14:50:27 +0000</pubDate>
      <link>https://forem.com/1solation/creating-value-and-coding-with-a-purpose-lessons-by-the-lean-startup-532h</link>
      <guid>https://forem.com/1solation/creating-value-and-coding-with-a-purpose-lessons-by-the-lean-startup-532h</guid>
      <description>&lt;p&gt;Imagine the scenario; after six intense months of coding, you’ve released the most intricate feature ever. Your code is optimised, unit tests are 100% green, and you’re feeling like a true engineering wizard. But... your users? They don’t care. Why? Because they didn’t need it in the first place! 🫠 Enter &lt;em&gt;The Lean Startup&lt;/em&gt; by Eric Ries, the ultimate guide to developing products that users &lt;em&gt;actually want&lt;/em&gt; through quick iterations, real feedback, and agile principles.&lt;/p&gt;

&lt;p&gt;The book introduces a tech-driven, no-nonsense approach to building impactful software. For any developer aiming to ship features that deliver real value, &lt;em&gt;The Lean Startup&lt;/em&gt; is packed with advice on how to iterate faster, learn from real users, and avoid wasting time on code that doesn’t move the needle.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Build-Measure-Learn: Think Better, Not Just Faster
&lt;/h3&gt;

&lt;p&gt;At the heart of &lt;em&gt;The Lean Startup&lt;/em&gt; is the &lt;strong&gt;Build-Measure-Learn&lt;/strong&gt; cycle, which pushes us to break down big ideas into quick prototypes we can test with real users. Instead of crafting a fully-featured masterpiece right out of the gate, you build a &lt;strong&gt;Minimum Viable Product (MVP)&lt;/strong&gt;—a stripped-down version with just enough functionality to gather feedback and validate your assumptions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Think about frameworks like &lt;strong&gt;React&lt;/strong&gt; and &lt;strong&gt;Vue&lt;/strong&gt; that allow you to quickly build and iterate on UIs. You can also employ &lt;strong&gt;feature toggles&lt;/strong&gt; that allow you to deploy features behind a flag, so you can expose them to specific users for testing without a full release. And with containerisation tools like &lt;strong&gt;Docker&lt;/strong&gt;, spinning up isolated environments for early feature testing becomes a breeze.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It Boosts Productivity:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
An MVP mentality reduces overengineering and helps you focus on the core user experience. This saves you (and your team) from investing hundreds of hours into features that might not even make the final cut. Plus, faster iteration means quicker insights, which leads to smarter development.&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%2Fq64vj9q82umxskhck605.gif" 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%2Fq64vj9q82umxskhck605.gif" alt="Mr bean realisation" width="498" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Validated Learning: Data-Driven Development
&lt;/h3&gt;

&lt;p&gt;In &lt;em&gt;The Lean Startup&lt;/em&gt;, Ries emphasises &lt;strong&gt;validated learning&lt;/strong&gt;: the process of using data to confirm whether or not you’re building something users actually want. This is where tools for &lt;strong&gt;A/B testing&lt;/strong&gt; come in, such as &lt;strong&gt;AWS Evidently&lt;/strong&gt; or through &lt;strong&gt;Azure DevOps&lt;/strong&gt; for experiments. Instead of building in the dark, validated learning lets you measure actual user responses to specific changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Using &lt;strong&gt;A/B testing&lt;/strong&gt; tools, you can gather clear data on user engagement, feature effectiveness, and even UI preferences. Metrics from &lt;strong&gt;Google Analytics&lt;/strong&gt; or services such as those from &lt;strong&gt;Amplitude&lt;/strong&gt; can also help you track real-time engagement, user flow, and retention, letting you adjust before a full launch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It Broadens Developer Perspective:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Validated learning forces developers to think critically about each line of code in terms of user impact, not just technical elegance. Focusing on the “why” behind every feature allows developers to make informed decisions that bring value and impact, rather than just fulfilling a checklist.&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%2Frgv991s0tt2lea95qs0n.gif" 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%2Frgv991s0tt2lea95qs0n.gif" alt="why gif" width="178" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Experimentation and Feature Prototypes: Try, Fail, Iterate, Repeat
&lt;/h3&gt;

&lt;p&gt;With &lt;em&gt;The Lean Startup&lt;/em&gt;, experimentation isn’t just a buzzword; it’s a core principle. Developers are encouraged to create &lt;strong&gt;feature prototypes&lt;/strong&gt; (or skeletons of features) that allow for rapid testing and iteration without a full-scale build-out. This agile approach makes it easy to pivot quickly if a feature doesn’t perform as expected, avoiding the dreaded “sunk cost” trap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Leveraging &lt;strong&gt;Agile methodologies&lt;/strong&gt; like &lt;strong&gt;Scrum&lt;/strong&gt; or &lt;strong&gt;Kanban&lt;/strong&gt;, you can break down features into small, manageable sprints that focus on building and testing core functionality first. &lt;strong&gt;Story mapping&lt;/strong&gt; and &lt;strong&gt;user journey mapping&lt;/strong&gt; can also help align each development sprint with real user needs, allowing you to deliver incremental improvements and test ideas without overcommitting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It Promotes Innovative Thinking:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Developers can focus on creating quick, functional skeletons that can be tested, measured, and iterated upon in small sprints. This process encourages creative, outside-the-box thinking and helps developers become more adaptable. Plus, fewer bloated features and more fine-tuned ones means happier users!&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%2Fv0jy9v4ko3yq8vvl1bxo.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%2Fv0jy9v4ko3yq8vvl1bxo.png" alt="steps of building a MVP" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Listening to Customers Early and Often: Tighten the Feedback Loop
&lt;/h3&gt;

&lt;p&gt;In &lt;em&gt;The Lean Startup&lt;/em&gt;, it’s all about keeping the &lt;strong&gt;feedback loop&lt;/strong&gt; tight. Instead of waiting until the entire feature is built out, developers can engage with users right from the MVP stage. This can be achieved by exposing new features to a small user segment and collecting their feedback via &lt;strong&gt;in-app surveys&lt;/strong&gt; or tools like &lt;strong&gt;Hotjar&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Customer feedback tools let you gather in-the-moment reactions from users. By setting up early feedback channels, you can catch usability issues, feature gaps, or misalignments early on and adjust based on what real users say.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It Leads to Better Code:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Regular customer feedback is an accountability system for developers. Knowing users will be testing the feature keeps the focus on functionality, simplicity, and clarity, minimising code bloat. Plus, it gives developers a real sense of accomplishment when they see users enjoying their work.&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%2Fouj3gfev97kw21hkpkfk.gif" 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%2Fouj3gfev97kw21hkpkfk.gif" alt="user feedback meme" width="360" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Avoiding Vanity Metrics and the Trap of “Success Theater”
&lt;/h3&gt;

&lt;p&gt;One of the most important lessons in &lt;em&gt;The Lean Startup&lt;/em&gt; is the need to avoid “success theatre” - getting excited about vanity metrics that don’t actually measure user impact. This can mean tracking sign-ups without engagement, clicks without retention, or installs without usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Using data visualisation tools like &lt;strong&gt;Tableau&lt;/strong&gt; or &lt;strong&gt;Grafana&lt;/strong&gt; can help teams track meaningful metrics like user retention, active engagement, and feature utilisation. For backend-heavy projects, &lt;strong&gt;ELK Stack (Elasticsearch, Logstash, Kibana)&lt;/strong&gt; can track and visualise logs to show how features are actually being used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It Helps You Code with Purpose:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When developers see their code's impact (or lack thereof) on real metrics, it helps everyone stay focused on what users actually need, rather than just what looks good on a dashboard. This insight also allows teams to deprioritise underused features and prioritise high-value improvements.&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%2F6hgyfvbm1komqe6bhd4w.gif" 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%2F6hgyfvbm1komqe6bhd4w.gif" alt="focus gif" width="498" height="498"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  TL;DR: Creating value and coding with a purpose - lessons by &lt;em&gt;The Lean Startup&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;For developers, &lt;em&gt;The Lean Startup&lt;/em&gt; offers a transformative approach to coding. It’s all about getting real-world feedback as fast as possible, adapting to what users want, and avoiding the “code for code’s sake” trap which is all too easy to fall into.&lt;/p&gt;

&lt;p&gt;Here’s how you can apply &lt;em&gt;The Lean Startup&lt;/em&gt; principles today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔄 &lt;strong&gt;MVP First&lt;/strong&gt;: Use frameworks such as React to speed up the boilerplate creation and build prototypes fast and gather data quickly.&lt;/li&gt;
&lt;li&gt;📈 &lt;strong&gt;Measure with Purpose&lt;/strong&gt;: Use A/B testing and real user data (e.g. Google Analytics) to validate your assumptions.&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Experiment Boldly&lt;/strong&gt;: Use agile methods to deliver, test, and pivot in small, manageable sprints.&lt;/li&gt;
&lt;li&gt;💬 &lt;strong&gt;Feedback Loops&lt;/strong&gt;: Listen to users early using tools like Hotjar to avoid building features nobody needs.&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Meaningful Metrics&lt;/strong&gt;: Track actual user engagement, not vanity stats, with tools like Tableau and ELK Stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In a nutshell, &lt;em&gt;The Lean Startup&lt;/em&gt; gives us some valuable lessons to code not just for function, but for &lt;em&gt;impact&lt;/em&gt;. Embrace these ideas, and you’ll build software that makes a difference—whether it’s one small MVP or a game-changing product. 🎉&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>softwareengineering</category>
      <category>startup</category>
      <category>coding</category>
    </item>
    <item>
      <title>Making the Most of AWS Summits: A Developer's Guide</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Fri, 07 Jul 2023 11:27:23 +0000</pubDate>
      <link>https://forem.com/1solation/making-the-most-of-aws-summits-a-developers-guide-13ik</link>
      <guid>https://forem.com/1solation/making-the-most-of-aws-summits-a-developers-guide-13ik</guid>
      <description>&lt;p&gt;Hello all fellow tech enthusiasts and AWSers (is that a thing?) out there! 👋🏼&lt;/p&gt;

&lt;p&gt;You're probably familiar with the excitement of AWS Summits, those gatherings of geeks like us, clinging to laptops and trying to find the best free t-shirt and caffeinated drink that's on offer. It's a toned-down version of the larger re:Invent convention but still packs a lot of meaty talks. With an impressive 1,100 AWS partners and over 25,000 attendees in the recent AWS Summit London 2023, it's evident these events are more than just flashy keynotes and freebies, but there are always nuggets of knowledge hidden away.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O5VRX-F0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ak337q4nzfnxtvrxg33w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O5VRX-F0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ak337q4nzfnxtvrxg33w.png" alt="Image description" width="800" height="833"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are some tips for navigating your next AWS Summit, based on my own experience:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Welcome networking opportunities
&lt;/h3&gt;

&lt;p&gt;Many attendees miss the real charm of Summits: networking. Instead of sticking with your colleagues or catching up on work, utilise this chance to interact with others. Get into conversations with engineers at the various booths, discuss potential implementations of technologies, and make valuable connections that could help you later. Remember, it's not just about sales; engineers are there for lead generation &amp;amp; to build connections too.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Embrace emerging tech
&lt;/h3&gt;

&lt;p&gt;Sure the like of Datadog, VMWare, and Citrix catch your eye with their huge booths and raffle prizes. But the real breakthrough tech lurks with the booths barely big enough to fit a laptop on! Here you'll find emerging startups displaying their cool tech with the primary engineers usually at the forefront. They are interested in gaining early adopters, not just generating sales. So don't overlook these booths due to lack of flare; this is where the real technological innovations lie.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Study the schedule
&lt;/h3&gt;

&lt;p&gt;With a jam-packed agenda, there are far too many sessions for you to go to. In retrospect, I would have devised a plan of attack to go to the most meaningful/interesting sessions in my opinion and allowed plenty of time to make my way to the theatre holding that session. Lines get very long so it’s key to be there early so you can get a seat! I would also take notes in these sessions to refer back to later for my own learning.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Be open-minded
&lt;/h3&gt;

&lt;p&gt;Represent your efforts professionally, regardless of the company or the context. Being open-minded will allow you to see technical choices and decisions taken by other companies in a different light. There is always a reason why company X has chosen their current tech stack, or why they’ve made use of one AWS service when there are others which could be better suited. Learn from these decisions and ask open-ended questions to facilitate deeper discussions!&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Don't miss out on swag
&lt;/h3&gt;

&lt;p&gt;I’m still a novice at getting the best swag, perhaps next year I’ll imagine I’m in a real-life loot-based RPG game? Most vendors hold late-day raffles, which are fantastic chances to win some cool tech toys. However, don't hold off until the end of the day; start your swag hunt early before the best items disappear. Some notable items I scored are a few sunglasses, very colourful socks, a game emulator, lots of quality notebooks &amp;amp; enough trek bars to start my own store.&lt;/p&gt;

&lt;p&gt;Some talks that stuck with me &amp;amp; are an interesting read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/blogs/database/how-deliveroo-migrated-their-dispatcher-service-to-amazon-dynamodb/"&gt;Deliveroo’s migration of their dispatcher service (which is responsible for offering orders to their riders) to DynamoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cloud Architectures for disaster recovery - &lt;a href="https://aws.amazon.com/blogs/architecture/tag/disaster-recovery-series/"&gt;Related blog post series&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/gunnargrosch/patterns-and-practices-for-building-resilient-applications-37gc"&gt;Patterns and practices for building resilient applications&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/blogs/compute/cost-optimization-and-resilience-eks-with-spot-instances/"&gt;Skyscanner leveraging EC2 Spot Instances and Elastic Kubernetes Service (EKS) to build a resilient infrastructure while achieving a 73% reduction in cloud expenditure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5-L5_VYq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x1ns0wmagv77h3li2ey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5-L5_VYq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x1ns0wmagv77h3li2ey.png" alt="Image description" width="800" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, remember that AWS Summits are not just about the keynotes. They're about connecting with people, discovering new technology, deep diving into AWS services in the advanced talks, learning from the decisions of other like-minded engineers and of course and grabbing some cool swag! So, next time you're at an AWS Summit don't miss out on these opportunities &amp;amp; most of all, enjoy yourselves!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>guide</category>
      <category>developer</category>
    </item>
    <item>
      <title>How to deal with legacy code</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Fri, 24 Mar 2023 13:48:47 +0000</pubDate>
      <link>https://forem.com/1solation/how-to-deal-with-legacy-code-1im8</link>
      <guid>https://forem.com/1solation/how-to-deal-with-legacy-code-1im8</guid>
      <description>&lt;p&gt;As software consultants or software engineers, we spend a lot of time dealing with legacy code and either enhancing it for a new business use case or refactoring the original code to make it fit for a new purpose. Only some things are fantastic green field projects where you can write a whole system from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyse the software landscape
&lt;/h2&gt;

&lt;p&gt;Much like how you would assess the requirements for a new task, this particular analysis needs to focus on the system as a whole. This means the codebase, its tests, deployment of the code and any downstream services that rely on the codebase you're working on. A couple of great starting questions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the code supposed to do? What does it actually do? How well does the code achieve its goals?&lt;/li&gt;
&lt;li&gt;How well is the current codebase documented and tested?&lt;/li&gt;
&lt;li&gt;How often is the codebase updated?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions will guide you to where the most pressing issues are. For example, if the code is updated frequently as it's a monorepo or core service, what's the deployment process like? There are likely easy improvements to make in this area to allow for a faster and higher quality of delivery.&lt;/p&gt;

&lt;p&gt;There are lots of tools to help with code analysis and identify code coverage/code smells in order to get a more solid idea of the code quality and complexity you're dealing with. These tools should be used in tandem with speaking to the engineers working on the codebase as well as stakeholders to see where things are slowing the team down, what the business logic should be and where priorities lie for the business with the particular services you're reviewing.&lt;/p&gt;

&lt;p&gt;Improvements to maintainability and readability of the codebase are great, but not if it comes with a negative effect on the system's performance. So always keep an eye out for the metrics in which the system is measured, e.g. response times, amount of users signing up, time taken to acquire new users, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Devise a plan of action
&lt;/h2&gt;

&lt;p&gt;Once you've analysed the codebase and gotten enough information to start with, it's time to create a plan of action. How will you deal with this codebase? What are the key areas for improvement?&lt;/p&gt;

&lt;p&gt;Depending on the scope and budget of the project, various methods and approaches can be used. Two common approaches are to create a facade layer in front of the legacy code which simplifies interaction with the legacy code and only exposes key functionality. The facade layer will be built from the ground up, so you can follow a simple design pattern to keep things extensible and maintainable going forward.&lt;/p&gt;

&lt;p&gt;Another common approach is to gradually replace parts of the legacy code with new services, keeping the old code living with the new code until fully replaced. The new services will be your opportunity to architect good software and also will be built from the ground up, you can use a design pattern if you choose to do so.&lt;/p&gt;

&lt;h2&gt;
  
  
  Opt for a design pattern
&lt;/h2&gt;

&lt;p&gt;Design patterns are typical solutions to commonly occurring problems in software design. They are like pre-made blueprints that you can customise to solve a recurring design problem in your code.&lt;/p&gt;

&lt;p&gt;If it fits your use case, or you're goal is to simply improve the current legacy code base, pick a software design pattern that works for the requirements you have. A good guideline for choosing a design pattern is one which makes the system easier to test.&lt;/p&gt;

&lt;p&gt;There are tonnes of design patterns out there in the wild, so considering a few factors such as trade-offs, programming language/framework being used and the level of abstraction will help inform your decision.&lt;/p&gt;

&lt;p&gt;See the following link to a list of common design patterns - &lt;a href="https://refactoring.guru/design-patterns/catalog"&gt;https://refactoring.guru/design-patterns/catalog&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Test, validate and review
&lt;/h2&gt;

&lt;p&gt;The last thing you need is to test, validate and then review the changes made. You need to ensure the software you've created is fit for purpose and works the way you think it does. Beyond unit testing, adding a whole heap of integration and regression tests around your services and code base will help ensure that no bugs have been introduced to other parts of the system which you haven't touched, as well as verifying things still work smoothly.&lt;/p&gt;

&lt;p&gt;Documenting your code and its changes are key here in order to provide visibility into your codebase without someone having to read each line of code to understand your system. Once you get to this stage, it's a good point to take a step back and examine the changes you've made and if you need to reiterate in order to improve the system and codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion and takeaways
&lt;/h2&gt;

&lt;p&gt;As you can probably tell, there isn't a "one size fits all" approach to dealing with legacy code. The key takeaways I'd like to provide are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cater to your use case. Mapping through the system to find where your specific pain points are will help not only other engineers but also project managers to buy into the approach you've put forward.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure you have methods to measure system performance and key business metrics of your refactor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keep maintainability at the forefront of your mind. You'll most likely find parts of the system undocumented, in such cases creating a README for that service/component or a runbook will help other engineers when maintaining or making future code changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Something that should always be considered is keeping an eye out for scope creep. It's great making a system easily extensible, but there comes additional time and complexity in doing this if there are no plans in place to actually use your extensible code in the near future.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any thoughts you might have, feel free to comment &amp;amp; dicuss on this post!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>discuss</category>
      <category>legacycode</category>
      <category>engineering</category>
    </item>
    <item>
      <title>Common Types in TypeScript (part 1)</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Thu, 01 Dec 2022 18:32:08 +0000</pubDate>
      <link>https://forem.com/1solation/common-types-in-typescript-part-1-5f9l</link>
      <guid>https://forem.com/1solation/common-types-in-typescript-part-1-5f9l</guid>
      <description>&lt;p&gt;In this instalment of the "Why TypeScript" series, we'll dive into some common types you see within TypeScript, with some code examples along the way. &lt;/p&gt;

&lt;p&gt;This is part 1 of the common types in TypeScript, there will be a part 2 to follow which explain a few more in depth types within TypeScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Primitives
&lt;/h2&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%2Flpuc2o03opxlmbws2xvq.gif" 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%2Flpuc2o03opxlmbws2xvq.gif" alt="Primitive" width="480" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Along with this file, there are code examples in &lt;a href="https://github.com/1solation/typescript-101/blob/main/src/common-types-examples.ts" rel="noopener noreferrer"&gt;common-types-examples.ts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There is a &lt;a href="https://www.typescriptlang.org/play" rel="noopener noreferrer"&gt;TypeScript playground&lt;/a&gt; where you can write, learn and share TypeScript. This is a sandbox environment in which you can experiment with TypeScript syntax in a safe area.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html" rel="noopener noreferrer"&gt;TypeScript handbook&lt;/a&gt; includes really good introductory documentation to the "everyday types" that you will encounter on your TS journey! To add to this, there is the &lt;a href="https://www.typescriptlang.org/docs/handbook/utility-types.html" rel="noopener noreferrer"&gt;utility types&lt;/a&gt; which make common type transformations easier.&lt;/p&gt;

&lt;p&gt;Please note the primitive types below are in lowercase. The following types: &lt;code&gt;Boolean&lt;/code&gt;, &lt;code&gt;Number&lt;/code&gt;, &lt;code&gt;String&lt;/code&gt;, &lt;code&gt;Symbol&lt;/code&gt; and &lt;code&gt;Object&lt;/code&gt; refer to non-primitive boxed objects that are almost never used appropriately in JavaScript code. See TypeScripts &lt;a href="https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#number-string-boolean-symbol-and-object" rel="noopener noreferrer"&gt;do's and don'ts on general types&lt;/a&gt; for more information.&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%2Fge6tfep021nen02fu9ux.gif" 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%2Fge6tfep021nen02fu9ux.gif" alt="strings-numbers-booleans" width="480" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following have code examples in &lt;a href="//../src/common-types-examples.ts"&gt;common-types-examples.ts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Similar to JavaScript, there are 3 commonly used primitives:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;boolean&lt;/code&gt;&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%2F98zal79hcqtuja3e18fc.gif" 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%2F98zal79hcqtuja3e18fc.gif" alt="true-or-false" width="480" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is the same as in JavaScript, simple true/false value
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isFun&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;number&lt;/code&gt;&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%2Fk7nl68woduhu2650zyiy.gif" 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%2Fk7nl68woduhu2650zyiy.gif" alt="calculating" width="480" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is no int or float, everything is number to JavaScript/TS
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pie&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;string&lt;/code&gt;&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%2Fec87oxmtj6txgopdmkue.gif" 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%2Fec87oxmtj6txgopdmkue.gif" alt="string" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Like JavaScript, strings can use single quotes or double quotes&lt;/li&gt;
&lt;li&gt;Template string using backticks and the &lt;code&gt;${}&lt;/code&gt; syntax
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// strings can use single quotes&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;favouriteColour&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// or double quotes&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hasib Ahmed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// template string, using backticks&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Salutations &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As well as these primitives, there are other basic types in TypeScript which you should be aware of:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;symbol&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is a primitive in JavaScript used to create a globally unique reference via the function &lt;code&gt;Symbol()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Symbol represents unique tokens that can be used as keys for object properties
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// symbol&lt;/span&gt;
&lt;span class="c1"&gt;// note that both variables have what seems to be the same value&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Symbol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;secondName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Symbol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// if we check their equality, it will always return false &amp;amp; TS will give us an error&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;secondName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// can not happen as each Symbol is a globally unique reference&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;bigint&lt;/code&gt;&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%2Fz77del8dt0mmohnrham9.gif" 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%2Fz77del8dt0mmohnrham9.gif" alt="big-number" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Introduced in TypeScript 3.2, it provides a way to represent whole numbers that are very large integers. If you're interested, it's numbers larger than &lt;code&gt;9007199254740991&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You can get a bigint in 2 ways:

&lt;ul&gt;
&lt;li&gt;Calling the &lt;code&gt;BigInt()&lt;/code&gt; function&lt;/li&gt;
&lt;li&gt;Writing a BigInt literal by adding &lt;code&gt;n&lt;/code&gt; to the end of any numeric integer&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;NOTE: You can only use the &lt;code&gt;bigint&lt;/code&gt; type if you are targeting version ESNext
&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// creation via the BigInt function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;big1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BigInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// creation via the literal syntax&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;big2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;big3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;100.20&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// error as this value is a decimal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;null&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Like JavaScript, null is used to indicate an absent value
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;absentValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;undefined&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Like JavaScript, undefined is used to indicate an uninitialised value
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uninitialisedValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;undefined&lt;/code&gt; will not be factored into any type checks unless you have the &lt;a href="https://www.typescriptlang.org/tsconfig#strictNullChecks" rel="noopener noreferrer"&gt;strictNullChecks&lt;/a&gt; option enabled (this will be covered in a later posts).&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%2Fpbs.twimg.com%2Fmedia%2FDusCOfyXcAA9_F7%3Fformat%3Djpg" 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%2Fpbs.twimg.com%2Fmedia%2FDusCOfyXcAA9_F7%3Fformat%3Djpg" alt="null-vs-undefined" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;any&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A top type of TypeScript's type system (aka universal supertype)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#any" rel="noopener noreferrer"&gt;TypeScripts Do's and Don'ts&lt;/a&gt; explicitly say &lt;strong&gt;not&lt;/strong&gt; to use any as a type &lt;strong&gt;unless&lt;/strong&gt; you are migrating an existing JavaScript project to TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;any&lt;/code&gt; represents all possible JavaScript values; primitives, objects, arrays, functions, errors, symbols, etc&lt;/li&gt;
&lt;li&gt;TypeScript lets us perform any operation we want on values of type &lt;code&gt;any&lt;/code&gt; without having to perform any kind of checking beforehand&lt;/li&gt;
&lt;li&gt;However, In most cases, this is too permissive and can be problematic at runtime. There is not much protection offered from TypeScript when using the &lt;code&gt;any&lt;/code&gt; type
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// any&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// all the below are type-correct&lt;/span&gt;
&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;does&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;value&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;unknown&lt;/code&gt;&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%2F3jfxb8ve8j7jryd0ux92.gif" 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%2F3jfxb8ve8j7jryd0ux92.gif" alt="unknown" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Another top type of TypeScript's type system&lt;/li&gt;
&lt;li&gt;If a variable is not known at the time of writing (e.g. accepting all values from user input) we can use the &lt;code&gt;unknown&lt;/code&gt; type here&lt;/li&gt;
&lt;li&gt;You can narrow your &lt;code&gt;unknown&lt;/code&gt; type variable to something more specific by doing typeof checks, comparison checks, or more advanced type guards&lt;/li&gt;
&lt;li&gt;This is known as &lt;a href="https://www.typescriptlang.org/docs/handbook/2/narrowing.html" rel="noopener noreferrer"&gt;type narrowing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;This is similar to &lt;code&gt;any&lt;/code&gt;, as the value can be of any type but it is essentially safe by default
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// unknown type with above code in same file&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// the following operations are no longer considered type-correct (value1[0] would not be type-correct with the strictNullChecks option on)&lt;/span&gt;
&lt;span class="nx"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Object is of type 'unknown'&lt;/span&gt;
&lt;span class="nx"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Object is of type 'unknown'&lt;/span&gt;
&lt;span class="nx"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;does&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Object is of type 'unknown'&lt;/span&gt;
&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Object is of type 'unknown'&lt;/span&gt;

&lt;span class="c1"&gt;// unknown type pt2&lt;/span&gt;
&lt;span class="c1"&gt;// set unknown type to default of null for this example&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// variable userInput can be any specific type, so all the below work fine&lt;/span&gt;
&lt;span class="nx"&gt;userInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mumbo jumbo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;userInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;userInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// simple typeof checks for an unknown type&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;boolean&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// TS knows that userInput is a boolean now&lt;/span&gt;
  &lt;span class="c1"&gt;// we can save this in a new const (or let) now we know the type and value&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userInputBool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// within this typeof check block, you cannot assign userInput to another type&lt;/span&gt;
  &lt;span class="c1"&gt;// the following will show a type error&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userInputNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Type 'boolean' is not assignable to type 'number'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;object&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everything that isn’t a primitive type in TypeScript is a subclass of the object type

&lt;ul&gt;
&lt;li&gt;i.e. anything that is not number, string, boolean, bigint, symbol, null, or undefined
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// defining an object explicitly&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myObject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;array&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript allows you to work with an array of values similar to JavaScript&lt;/li&gt;
&lt;li&gt;There are 2 ways to write an &lt;code&gt;array&lt;/code&gt; type

&lt;ul&gt;
&lt;li&gt;Use the type of element followed by square brackets e.g. &lt;code&gt;number[] = []&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use the generic array type (generics will be covered in later posts/updates) e.g. &lt;code&gt;Array&amp;lt;number&amp;gt; = []&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// defining arrays&lt;/span&gt;
&lt;span class="c1"&gt;// method 1&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// method 2, using generics&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arr2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;tuples&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A tuple type allows you to express an array with a fixed number of elements, of which the types are known&lt;/li&gt;
&lt;li&gt;For example, you can represent a string and number type in an array
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tuples&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// initialise in the correct order&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bob&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// attempt to initialise in the incorrect order, gives us type errors&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bob&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// ERROR 1: Type of 'number' is not assignable to type 'string'. ERROR 2: Type of 'string' is not assignable to type 'number'.&lt;/span&gt;

&lt;span class="c1"&gt;// attempt to initialise it as empty, gives us type errors&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Type '[]' is not assignable to type '[string, number]'&lt;/span&gt;

&lt;span class="c1"&gt;// access correct element at index, correct type is retrieved and we can do an operation on the string&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;substring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// attempt to access the same substring element at the incorrect index, and we get a type error&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;substring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Property 'substring' does not exist on type 'number'.&lt;/span&gt;

&lt;span class="c1"&gt;// attempt to access element outside the set of known indicies will error&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// ERROR: Tuple type '[string, number]' of length 2 has no element at index '3'.&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;enums&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unlike most TypeScript features, this is not a type-level addition to JavaScript but something added to the language and runtime s&lt;/li&gt;
&lt;li&gt;As in languages like C#, an enum is a way of giving more friendly names to sets of numeric values&lt;/li&gt;
&lt;li&gt;Read more about enums here &lt;a href="https://www.typescriptlang.org/docs/handbook/enums.html" rel="noopener noreferrer"&gt;https://www.typescriptlang.org/docs/handbook/enums.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// enums&lt;/span&gt;
&lt;span class="c1"&gt;// enums begin numbering their members starting at 0&lt;/span&gt;
&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;Colour&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Green&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// index 0&lt;/span&gt;
  &lt;span class="nx"&gt;Amber&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// index 1&lt;/span&gt;
  &lt;span class="nx"&gt;Red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// index 2&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// call element by index&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Colour&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// Green&lt;/span&gt;

&lt;span class="c1"&gt;// you can manually set the values in the enum&lt;/span&gt;
&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;roomInMetres&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Floor1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Floor2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;321&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Floor3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// call element by it's name&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;roomInMetres&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Floor2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 321&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the next post in this series we will be going over union types, discriminated unions, casting to a different types and classes!&lt;/p&gt;

</description>
      <category>coding</category>
      <category>code</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Why TypeScript?</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Fri, 25 Nov 2022 21:47:44 +0000</pubDate>
      <link>https://forem.com/1solation/why-typescript-11gj</link>
      <guid>https://forem.com/1solation/why-typescript-11gj</guid>
      <description>&lt;p&gt;Here's my attempt to explain briefly, through a medium of text and spicy memes, what typescipt is &amp;amp; why you should use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is TypeScript?
&lt;/h2&gt;

&lt;p&gt;TypeScript is a superset of JavaScript that has optional typing and compiles down to plain JavaScript. TypeScript is technically JavaScript with &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Static_typing" rel="noopener noreferrer"&gt;static typing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To make sure there aren't any bugs in your code, you'd usually write some tests - following test-driven development (TDD). You would also manually verify the code works, by running it, and also have a peer review (pull requests on GitHub or have someone just sit next to you and look at your code).&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%2F00y2vnazzcdy64azgy80.gif" 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%2F00y2vnazzcdy64azgy80.gif" alt="javascript undefined" width="500" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using a type-checked language like TypeScript provides immediate feedback during development &amp;amp; can save you time and effort.&lt;/p&gt;

&lt;p&gt;With these features, TypeScript can help you feel more confident in your code and save a lot of time checking to make sure you haven't broken the project by accident at run time since variable types are known at compile 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%2F0vu0jmymh47k90b14n8n.gif" 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%2F0vu0jmymh47k90b14n8n.gif" alt="Great Success" width="366" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why choose TypeScript over JavaScript?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;TypeScript code is more reliable and easier to refactor. This allows you to avoid errors and rewrite code a lot easier.&lt;/p&gt;

&lt;p&gt;Types negate most of the head-scratching errors that can make their way into JavaScript code &amp;amp; also allows for a quick feedback loop to fix the small mistakes during code writing &amp;amp; refactoring.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript is less ambiguous, it allows you to focus on how each part of your code interacts with one another &amp;amp; makes you pay attention to how your system is actually built.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TypeScript is a superset of JavaScript, you can use all your favourite JavaScript libraries and code that you want in your TypeScript code!&lt;/p&gt;

&lt;p&gt;This means that you can gradually start to use TypeScript in your codebase, first adding types to individual files and modules, then &lt;em&gt;you'll be pushing TypeScript as much as I am&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&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%2F0eugsxokv604n4f98xiq.gif" 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%2F0eugsxokv604n4f98xiq.gif" alt="Roll Safe" width="498" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It isn't all sunshine &amp;amp; rainbows over in TypeScript land, however. With any new bit of tech, be that a framework, library or, like now, a programming language - there are always downsides. Here are my top few cons of TypeScript:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Grandmasters of Java, C++ or C# often argue that TypeScript is not a &lt;em&gt;true&lt;/em&gt; statically typed language. This feature is optional for TS &amp;amp; eventually, it's transpiled into untyped JavaScript, which brings the risk of weird type conversions at runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even though it's relatively easy for JavaScript developers to learn TypeScript due to the similarities, you still need to invest time and effort in learning types and some TypeScript-specific constructs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced code readability is a pro of TypeScript, but this can often result in bloated code due to a lot of type annotations and syntactic sugar. It also means .ts filetypes are often larger than their .js equivalents. Luckily, this is negated by the fact that once TypeScript is transpiled into plain JavaScript, the browser will only execute the JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next post about TypeScript, I'll outline a bunch of common types that are used in TypeScript with some examples to help you with your TypeScript journey!&lt;/p&gt;

</description>
      <category>git</category>
      <category>softwaredevelopment</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A data driven decision on Cross Platform Mobile development (Flutter VS React Native)</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Sun, 23 Oct 2022 14:24:11 +0000</pubDate>
      <link>https://forem.com/1solation/a-data-driven-decision-on-cross-platform-mobile-development-flutter-vs-react-native-56om</link>
      <guid>https://forem.com/1solation/a-data-driven-decision-on-cross-platform-mobile-development-flutter-vs-react-native-56om</guid>
      <description>&lt;p&gt;A little intro of me so you can see my motivations/reasons; &lt;/p&gt;

&lt;p&gt;I want to create some side projects which are mobile apps, but I don't want to have to write native code for 2 platforms! I also would like the easiest &amp;amp; fastest developer experience &amp;amp; I need to make a decision on which framework to use, without procrastination by watching YouTube every time I need to start a project.&lt;/p&gt;

&lt;p&gt;I'm a full stack consultant &amp;amp; developer, my usual day to day consists of JavaScript, TypeScript or Python.  I've created full stack solutions with React on the front end, so my thinking is that React Native shouldn't be too much of a jump, right?&lt;/p&gt;

&lt;p&gt;On the other hand, I've also used Flutter to develop an anonymous crowd sourced voting application for one of my university modules. I found the documentation quite easy to follow, &amp;amp; the Flutter community is even bigger now than it was back when I last made a Flutter application.  I don't like to make a decision without some data insights, so let's pull data from Stack Overflow, GitHub and some job boards like Glassdoor.&lt;/p&gt;

&lt;p&gt;For our first comparison, let's take a look at Google Trends for search results of &lt;a href="https://trends.google.com/trends/explore?date=today%205-y&amp;amp;geo=GB&amp;amp;q=Flutter,React%20Native"&gt;Flutter vs React Native over the last 5 years&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8davxgpz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qga0q3nqzt21or3hn1eb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8davxgpz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qga0q3nqzt21or3hn1eb.png" alt="Interest over time between Flutter (blue) and React Native (red)" width="880" height="214"&gt;&lt;/a&gt;&lt;br&gt;
Interest over time between Flutter (blue) and React Native (red).&lt;/p&gt;

&lt;p&gt;Data from the &lt;a href="https://survey.stackoverflow.co/2022/#overview"&gt;Stack Overflow 2022 survey&lt;/a&gt; also shows Flutter in the lead (but just slightly!) when it came to the question "Which other frameworks and libraries have you done extensive development work in over the past year, and which do you want to work in over the next year?".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CGvrUler--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1hi4b6gddbxgdus1of9i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CGvrUler--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1hi4b6gddbxgdus1of9i.png" alt="Stack Overflow 2022 survey for Which other frameworks and libraries have you done extensive development work in over the past year, and which do you want to work in over the next year?" width="748" height="834"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A snapshot of both Stack Overflow and GitHub data, taken late October 2022:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data&lt;/th&gt;
&lt;th&gt;Flutter&lt;/th&gt;
&lt;th&gt;React Native&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stack Overflow Questions&lt;/td&gt;
&lt;td&gt;143, 512&lt;/td&gt;
&lt;td&gt;123, 937&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Stars&lt;/td&gt;
&lt;td&gt;146K&lt;/td&gt;
&lt;td&gt;105K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Forks&lt;/td&gt;
&lt;td&gt;23.6K&lt;/td&gt;
&lt;td&gt;22.5K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Issues&lt;/td&gt;
&lt;td&gt;11, 081 Open/63, 386 Closed&lt;/td&gt;
&lt;td&gt;1943 Open/21, 406 Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Just using the data regarding number of Stack Overflow questions, you could come to the conclusion more questions means more problems/issues, or that there are more developers using this framework. Similarly you can say the exact same looking at the number of GitHub Issues for both Flutter and React Native.&lt;/p&gt;

&lt;p&gt;A lot of people compare the speeds of both Flutter and React Native. React Native’s architecture requires bridge-based communication that enables interaction between JavaScript and the native user interface components and device-specific elements such as camera, Bluetooth, etc. Because of this, React Native is a bit slower than Flutter. Flutter doesn't rely on bridge-based communication instead it uses Skia, it's core graphic engine to compile the UI to device native code. Nevertheless, the small difference isn’t going to be noticeable in your everyday use case.&lt;/p&gt;

&lt;p&gt;One final point is that Flutter provides a lot of "out the box" functionality, when compared to React Native that gives you a lot more flexibility to pick and chose what you use for UI, build, packaging etc.&lt;/p&gt;

&lt;p&gt;For a new challenge &amp;amp; to be different, I'll go with the new rising star which seems to be Flutter. Whatever you chose, you won't be short of online material or useful third party libraries. One thing to note however, it seems as though there is more job roles that require React Native, most likely being that JavaScript is a much more ubiquitous language compared to Dart. &lt;/p&gt;

</description>
      <category>flutter</category>
      <category>reactnative</category>
      <category>mobile</category>
      <category>data</category>
    </item>
    <item>
      <title>Blockchain layers — What are they?</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Wed, 05 Oct 2022 13:08:01 +0000</pubDate>
      <link>https://forem.com/1solation/blockchain-layers-what-are-they-bkp</link>
      <guid>https://forem.com/1solation/blockchain-layers-what-are-they-bkp</guid>
      <description>&lt;p&gt;After reading a little more about blockchain, I’ve come to the conclusion it’s pretty similar to an onion. Hear me out, it has layers, it’s smelly &amp;amp; makes you cry (probably but don’t quote me on the last two).&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6k0lbkk8mdqpiizg3tq.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6k0lbkk8mdqpiizg3tq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What are the layers and what does each one do?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The multiple layers of blockchain are broken down into;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    Hardware/Infrastructure Layer&lt;/li&gt;
&lt;li&gt;    Data Layer&lt;/li&gt;
&lt;li&gt;    Network Layer&lt;/li&gt;
&lt;li&gt;    Consensus Layer&lt;/li&gt;
&lt;li&gt;    Application and Presentation Layer&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadiy29gdb3i09wdww8as.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadiy29gdb3i09wdww8as.png" alt="The various layers that make up the blockchain."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardware/Infrastructure Layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Somewhere in the world the blockchains content is stored &amp;amp; clients can request content or data from servers via the web and apps — this is called client-server architecture.&lt;/p&gt;

&lt;p&gt;Clients can also connect with peers and share data — this is called a peer to peer (P2P) network, essentially a big group of computers that share data.&lt;/p&gt;

&lt;p&gt;Blockchain is a peer to peer network, and each computer in this network is called a node. This network has a shared ledger which validates &amp;amp; records transactions. Due to the way peer to peer networks work, the data is distributed between nodes which creates a distributed database.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbyeovj9dgy3zs9qt13zs.jpeg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbyeovj9dgy3zs9qt13zs.jpeg" alt="Client-server model vs Peer-to-peer (P2P) model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The data structure of blockchain consists of ordered transactions, which can be expressed as a linked list of blocks. A linked list is a list which chains together items within that list. Each item consists of pointers which reference the previous item in the list and data.&lt;/p&gt;

&lt;p&gt;Blockchain transactions are digitally signed, which helps to protect the security and integrity of the data contained within the blockchain. The digital signature ensures unity, detects information manipulation and along with encryption of the data, any manipulation will render the digital signature invalid. The owner/sender’s identity is protected by a digital signature, therefore, a signature is legally associated to its owner and cannot be ignored.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3zb8e8nsykwsoh947lrp.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3zb8e8nsykwsoh947lrp.png" alt="Linked list connection between blocks in blockchain."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The network layer is also known as the peer to peer layer or the propagation layer. Blockchains operate over a peer-to-peer network. Peers share information about the state of the network. Privacy and security is included in the network layer. It’s responsibilities include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inter-node communications&lt;/li&gt;
&lt;li&gt;    Discovery&lt;/li&gt;
&lt;li&gt;    Transactions&lt;/li&gt;
&lt;li&gt;    Block propagation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This layer makes sure that nodes can find &amp;amp; interact with each other and synchronise in order to keep the blockchain network in the correct state.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzv9899y36c17yxhmjyb2.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzv9899y36c17yxhmjyb2.png" alt="A P2P network graphic."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consensus Layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The consensus layer perhaps the most critical layer &amp;amp; is essential for blockchain platforms to exist. This layer validates the blocks, orders them and ensures everyone agrees.&lt;/p&gt;

&lt;p&gt;Read more about consensus mechanisms here on &lt;a href="https://ethereum.org/en/developers/docs/consensus-mechanisms/" rel="noopener noreferrer"&gt;Ethereum.org&lt;/a&gt;.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvh4f2iw7bzrb48vnbnnu.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvh4f2iw7bzrb48vnbnnu.png" alt="Consensus mechanism graphic."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Application and Presentation Layer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The application layer is made up of decentralised applications (Dapps), Decentralized Autonomous Organizations (DAO), chain code and smart contracts. The protocols in the application layer are subdivided into application and execution layers&lt;/p&gt;

&lt;p&gt;The application layer hosts the programs that end users interact with to communicate on the blockchain network. User interfaces, scripts, frameworks and API’s are all a part of this layer.&lt;/p&gt;

&lt;p&gt;The transactions will then move from the application layer to the execution layer to be validated and executed. The application will hand instructions over to the execution layer, which in turn will execute the transaction and ensures the deterministic behaviour of the blockchain.&lt;/p&gt;




&lt;p&gt;Now hopefully you’ll agree with me in the fact blockchains are like onions, at least the layers part of it, and also have a (slightly) better understanding of what each blockchain layer is doing.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>beginners</category>
      <category>layer</category>
    </item>
    <item>
      <title>Getting into tech? Here’s your one stop shop as a beginner</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Wed, 05 Oct 2022 12:55:13 +0000</pubDate>
      <link>https://forem.com/1solation/getting-into-tech-heres-getting-into-tech-heres-your-one-stop-shop-as-a-beginner-21no</link>
      <guid>https://forem.com/1solation/getting-into-tech-heres-getting-into-tech-heres-your-one-stop-shop-as-a-beginner-21no</guid>
      <description>&lt;p&gt;So, you want to get into tech but don’t know where to start? Well, here’s my attempt at a one-stop-shop for newcomers, returners, career switchers alike! The tech sector is growing and doesn’t show any signs of slowing down, working in tech is fun, rewarding, exciting and fast-paced &amp;amp; the benefits include remote working (even before the pandemic), flexible hours in the majority of the companies &amp;amp; finally not to mention very well paid!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RaFvQnni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vczw74p2c26ptryt932.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RaFvQnni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vczw74p2c26ptryt932.png" alt="Image description" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;One of the hardest decisions is what career path to go down in tech since it's so vast. There are so many jobs out there like Front End, Back End, Mobile, Full Stack Engineer/Developer, Pen Tester, Cyber Security, Data Scientist and the list goes on.&lt;/p&gt;

&lt;p&gt;If you're looking at non-coding jobs within the tech sector you're covered too! With jobs like Business Analyst, Product Manager, User Experience Designer and more. The notion of "you have to be good with computers to work in tech" is so outdated and not true for non-coding specific jobs.&lt;/p&gt;

&lt;p&gt;During my time at university studying Software Engineering I was toeing the line between going for a developer, more coding focussed role or going towards a more business side, less technical role. So don't worry if it takes some time to really know what you're interested in! It takes time &amp;amp; research into all areas of technology, I would highly recommend initially starting on YouTube and searching around regarding tech in general to find out what draws you in more.&lt;/p&gt;




&lt;p&gt;In this blog post, I'll address the coding jobs a little more &amp;amp; give some insight/tips on what I would learn if I had to start again to get a good grounding. You may not enjoy coding, but what I will lay out in this post is all free content that anyone can access and learn whenever it suits you best.&lt;/p&gt;

&lt;p&gt;As I mentioned above, initially I would look to YouTube for general and even random knowledge about tech and the tech industry. This is key for increasing your knowledge and interest but also expanding your thoughts about what tech is, what industries it touches (you'd be surprised) and what you could potentially do with tech. Some personal recommendations on YouTubers I watch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/FKnight"&gt;Forrest Knight&lt;/a&gt;, for general computer science/software engineering knowledge.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/AndySterkowitz"&gt;Andy Sterkowicz&lt;/a&gt;, a self-taught programmer himself who has very helpful videos regarding coding and becoming self-taught.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/JomaOppa"&gt;Joma Tech&lt;/a&gt;, makes funny skits about tech and coding in general.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/amigoscode"&gt;Amigoscode&lt;/a&gt;, useful tips on what life is really like as a software engineer &amp;amp; various free tutorials &amp;amp; courses on programming.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The list is endless, start with these recommendations if you don't know where to begin and let the YouTube algorithm take over and suggest videos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A76NHEuK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/53lhb5jtpob5wkx3f6ij.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A76NHEuK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/53lhb5jtpob5wkx3f6ij.png" alt="Image description" width="800" height="729"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;So, you've looked around on YouTube &amp;amp; you're still interested in a career in tech, maybe even more interested than you were previously. I hear you asking, what's next? That's a great question.&lt;/p&gt;

&lt;p&gt;I think a basic description of the two main types of developers/engineers is important to bring up now, front end developers and back end developers. I will be massively oversimplifying it, but that's all we need to know for this post.&lt;/p&gt;

&lt;p&gt;Front end developers are primarily responsible for everything you see on a web page/app. So the images, buttons, the fancy animations when you click on something, etc, is all the work of a front end developer. The average base salary of a Front End Developer in the United Kingdom is around £51,926 and the average for a Junior Front End Developer is £27,216, according to indeed.com.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XbVwgHtj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3loqzzt2djmclao8bxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XbVwgHtj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3loqzzt2djmclao8bxk.png" alt="Image description" width="800" height="762"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back end developers are primarily responsible for everything you can't see, but without it the app/web page wouldn't work. I like to think of it as the wiring behind the scenes to make the actions you do on a website/app work. One example of this is searching through Amazon for products, a back end developer would handle the work to make sure the right products come back for the term you searched for and you don't get results for "Wine and Cheese" when you search for "Work Party Items". The average base salary of a Back End Developer in the United Kingdom is around £58,218 and the average for a Junior Back End Developer is £30,388, according to indeed.com.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--shtmSk_4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wf3zm742he50b9uvtdr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--shtmSk_4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wf3zm742he50b9uvtdr1.png" alt="Image description" width="800" height="977"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A fullstack developer is essentially both of those developers in one, a jack of all trades or you could call them a whole dev team in one person… Due to pretty much being able to do all and any development work required they're usually paid the highest. Fullstack developers usually dabble in DevOps work too.&lt;/p&gt;




&lt;p&gt;Okay, bad political jokes aside, let's get into what we need to learn to get a good grounding for technical developer roles. If I was to start learning tech from scratch again, I would aim to learn how to become a fullstack developer. Just learning front end development will mean your app/website will look nice but not have much functionality &amp;amp; just learning back end development will mean your app/website will have loads of functionality but look quite bare. I chose this specific path due to the flexibility of being able to adapt to any task needed, also knowing the full lifecycle of developing something from start to finish &amp;amp; having the knowledge to do it all.&lt;/p&gt;

&lt;p&gt;As someone new to tech, I would recommend starting with front end development initially. Specifically, web development and the reason for this is because it will help someone new to tech understand the process of software development and also to see code being turned into something visual. This helps a lot as you can see your code turning into titles, images, fancy transition effects and more as you're typing.&lt;/p&gt;

&lt;p&gt;The resources I'd use for this are as follows, feel free to do any or all the things listed but they are generally in order &amp;amp; I would advise you read through them all before picking them up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Google. Google will literally be your best friend, for anything you're stuck with &amp;amp; can't solve, any errors that might pop up, everything is a Google away. Even the most senior developers use Google on a daily basis so don't be shy!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Codecademy's &lt;a href="https://www.codecademy.com/learn/learn-html"&gt;HTML&lt;/a&gt; &amp;amp; &lt;a href="https://www.codecademy.com/learn/learn-css"&gt;CSS&lt;/a&gt; course. There is nothing to set up here as you will type code into your web browser &amp;amp; don't worry about the certificate which is only available with a subscription, we're here to learn as much as we can for free to start off with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="https://www.theodinproject.com/paths/foundations/courses/foundations"&gt;Odin Project Foundations course&lt;/a&gt; which goes into more detail than the above Codecademy courses with things such as setting your development environment up on your machine, version control basics using Git and even getting into a decent amount of JavaScript (a widely used programming language). This will also go over some intro to the back end on what happens behind the scenes of a web server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At any time, feel free to YouTube tutorials such as "how to make a website" or even "beginner website ideas".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add to your online portfolio! Like designers, photographers or any other creative field - you are also creating things, just with code. You should use GitHub as it's the industry standard as a portfolio and code sharing platform, &lt;a href="https://www.youtube.com/watch?v=iv8rSLsi1xo&amp;amp;ab_channel=AnsonAlexander"&gt;here&lt;/a&gt; is a very short introduction video to watch. Feel free to watch more videos if you want or need more information on this topic! This is a great way to showcase your work, upload your projects, websites and training notes onto so that potential employers to see the work you've done so far on your tech journey when you come to apply for jobs! Follow along with some tutorials and then try to make a couple of your own websites to add to your GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Once you've gone through all this post with the recommended learning &amp;amp; resources, you're well underway on your journey to a career in tech! By this point, you should have more of an idea on what you want to continue learning, what interests you in particular &amp;amp; if not, everything is a google or YouTube search away!&lt;/p&gt;

&lt;p&gt;In future blog posts, I will go into other types of roles in development, including non-technical ones with as much as I can comment on them as well as how to apply to a job in tech.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>University Group Projects — Tools &amp; Tips To Ease The Process</title>
      <dc:creator>Hasib Ahmed</dc:creator>
      <pubDate>Wed, 05 Oct 2022 12:38:32 +0000</pubDate>
      <link>https://forem.com/1solation/university-group-projects-tools-tips-to-ease-the-process-2onf</link>
      <guid>https://forem.com/1solation/university-group-projects-tools-tips-to-ease-the-process-2onf</guid>
      <description>&lt;p&gt;Whether you’re a studying computer science/software engineering or you’re a student currently doing a project as part of a group you will know the frustrations when it comes to working with others. Having just graduated from university where I studied Software Engineering, I have had my share of experiences from working in a group. At times it feels like you’re the only one trying to complete the task at hand (and sometimes this is true!), however, I have some tips and tricks from my experiences working within groups during university and in industry as a software developer intern which should help you with your next group project.&lt;/p&gt;

&lt;p&gt;Project Planning&lt;/p&gt;

&lt;p&gt;Effective planning. Two words which seem simple enough when said but are rarely an occurrence during university group projects. By effective I mean, a clear outline of what needs to be done, an organised approach towards implementing the agreed tasks and some form of tracking tasks through their various phases. This along with documentation whilst on the project go a long way in organising the entire project and will help when it comes to writing the report (which is a common deliverable in university) at the end of the project.&lt;/p&gt;

&lt;p&gt;A tool which helped me in this aspect is Trello, a free Kanban style list making web application where you create headings for lists and then each item is a card under that list. For example, for a group project in my final year here is some of the headers we used to simplify our project planning and to clearly see what tasks needed to be done, what we were stuck with, what was in progress and what has been completed.&lt;br&gt;
Screenshot of Trello, including headers such as blockers, to do, in progress and completed/review&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OCvXYUAc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fivz7n4md5mlziorbw87.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OCvXYUAc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fivz7n4md5mlziorbw87.png" alt="Image description" width="880" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Implementing this in your next group project, whether that be a software project or a report, is as simple as signing up and spending 5 minutes creating headings for your lists. As the project progresses, you can add more and more tasks under each list and assign them to members of your group. Once the project is underway, it is easy to go back and see tasks in each state (to do, in progress or completed) and build a report/documentation without having to remember everything from when you first started the project.&lt;/p&gt;

&lt;p&gt;Communication&lt;/p&gt;

&lt;p&gt;We all know communication is important when it comes to working in a group in any setting, but do we always put this first? A lot of issues which arise as part of working in a group always start small; someone cannot make it to a group meeting because of prior commitments, a member of your group taking longer than expected on a particular task or even a lack of understanding of the overall project.&lt;/p&gt;

&lt;p&gt;Many of these issues can be remedied with clear communication, let me give you an example. I had a group project in university where we had to develop a cross-platform mobile application. A member of my group was taking longer than expected on a software task, baring in mind that the language and framework we decided to use was brand new to us all. Instead of constantly asking if the task was complete, I ensured they had the support to complete the task, or the option to pass the task onto someone else and start on a different one. Not only does this limit confrontation, it also facilitates understanding and more of an ‘all for one’ spirit within the team.&lt;/p&gt;

&lt;p&gt;This was after a year of working as a software developer intern therefore I had a little more experience in working within a group setting. So, had this been prior to my year in industry, I most likely would have just picked up the task on my own and completed it without asking anyone in my group, leading to a lack of communication and the possibility of the task being done twice.&lt;/p&gt;

&lt;p&gt;Tools which helped me on the communication aspect of teamwork is Slack, a messaging platform, or even simpler WhatsApp group messaging. Whatever works best for your team, if you know each other a WhatsApp group may be more convenient or if you don’t know each other well Slack is a great alternative and you don’t need to exchange mobile numbers.&lt;/p&gt;

&lt;p&gt;Some lessons to take away from this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Facilitate understanding over judgement, especially in a new team.
Let your team play to their own strengths, rather than forcing them to pick up tasks they aren’t comfortable with.
Consider your team as a start-up, have a cross-functional team where there is a mix of skills within your group.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you want to learn more about working well in a small group/company, and some more insights I highly recommend the book The Lean Startup by Eric Ries. Get the free audio book with an Audible trial, which you can cancel once you have your book!&lt;/p&gt;

</description>
      <category>project</category>
      <category>planning</category>
      <category>university</category>
      <category>software</category>
    </item>
  </channel>
</rss>
