Leonardo Grade
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## Why Software Architecture Should Matter _“Have you ever been in a situation where you’ve felt nervous about adding new code to an existing codebase in the fear that you’ll break something else in a completely different part of the code somewhere?”_ Khalil Stemmler - https://solidbook.io/ --- ### Why do we rewrite pieces of our software? - Inexperience <!-- You don't want to spend the time to understand someone else's code. Maybe not familiar with a concept. --> - Fun <!-- We software developers enjoy rewriting things --> - Better solution available <!-- New library or technology that solves the problem in a better way --> - Technical Debt --- ### Technical Debt Code that negatively and repeatedly impacts the speed and quality of delivery <!-- People think of it differently Code I didn't write? Code I wrote before I knew what I was doing? Old libraries? Unused features? --> --- ![Technical Debt 1](https://i.imgur.com/Wg7rYsc.png) <!-- As time passes, our ability to add new features decreases --> --- ![Technical Debt 2](https://i.imgur.com/d8pMNfj.png) <!-- Takes a long time to extend/mantain the system. Developers might argue that the company won't be able to retain them and demand a refactor. --> --- ![Technical Debt 3](https://i.imgur.com/xGSDrp8.png) <!-- Everything is beautiful. Delivering features faster again and then the speed of delivery is reduced again. --> --- #### Recurring technical debt or Technical debt on a subscription model --- #### Second System Effect The tendency of replacing successful systems with bloated and over-engineered systems due to inflated expectations and overconfidence. --- ### Is that our Destiny? Are we in an infinite loop of rewriting code? ![Infinite Loop](https://i.imgur.com/V5kb0rJ.png) --- ### Status Quo - devs **not** being taught essential software design and architecture skills - most companies practice **agile** - agile = often **changing** and refactoring code - to refactor code we need **tests** - to write tests we need **testable code** - devs can't write testable code --- ### Common Developer Path 👨‍💻 - Understanding technology and what it can do <!-- University, Bootcamp or Self-Educated --> - Learning and using tech to build things <!-- Able to produce something meaningful and make things work even if it requires some brute force --> <!-- Many developers can end here and stop their carreer progression. Just because you can write code, it doesn't mean you can write mantainable and high quality code --> - Learning how to solve business challenges consistently while mantaining productivity <!-- This is specially important when working in growing teams. When working in smaller teams, even if things get a little messy, you're still able to understand most of the code and move fast. Communication is also easier and you'll have less code/features. --> --- `The real cost 💰 of software is not the initial development, but maintainance over time 🔧` --- Maybe the question shouldn't be why we rewrite software, but rather: **How can we make our systems more resilient to changes that are inevitable?** ## **Good architecture!** 🤪Wow, you're a genius! 🙄 <!-- Architecture has become a dirty word Sounds elite No clear definition Feels detached from daily problems --> --- #### What is Software Architecture? _"Software architecture is the structure of a system, the **elements** it contains, and the **relationship** between those elements"_ --- _"the shared understanding that the expert developers have of the system design"_ <!-- Email exchange between Martin Fowler and Ralph Johnson https://martinfowler.com/architecture/ --> --- _"the decisions you wish you could get right early in a project"_ --- _"Architecture is about the important stuff. Whatever that is"_ <!-- It means that the heart of thinking architecturally about software is to decide what is important, (i.e. what is architectural), and then expend energy on keeping those architectural elements in good condition. --> --- ### Why does archictecture matter? - ### Basis for Communication It's a plan of the system that facilitates communication between stakeholders (dev, design, customer, management) ###### **User**: is it reliable and available? ###### **Manager**: can it be implemented on schedule and on budget? ###### **CTO**: can teams work independently? <!-- Quality Attributes or Non-Funcional Requirements -- Availability, Security, Configurability, Usability, Reliability --> #### Quality Attributes ###### Define the success of the architecture and quality of the system ![Usability](https://miro.medium.com/max/1400/1*KsgJ5E7iSJtMT_jFH2Fb6g.png) <!-- Usability: - control how many actions to perform action - average time to perform actions --> ![Maintainability](https://miro.medium.com/max/1400/1*dYKARf5sU8UN1K1zRcZ-Uw.png) <!-- Maintainability - how well does the system support changes? - might have excessive dependencies between areas of your app - Layered/Hexagonal/microservices to control the dependencies - Important to split teams --> ![Modifiability](https://miro.medium.com/max/1400/1*WhUlcWKXu7H7f2UVVWxoRw.png) <!-- --> ![Testability](https://miro.medium.com/max/1400/1*mm9cuhGzseXmcJx9Vbikfg.png) --- - ### Architecture enables constraints It dictates the actions we are allowed to take when developing our system **Constraints = Safety and Speed** <!-- Helps us move faster! Same way as Functional programming constrains us with immutability and avoids race conditions --> --- - ### Poor Architecture contributes to the growth of cruft cruft = elements of the software that impede the ability of developers to understand the software <!-- Software that contains a lof of cruft is much harder to modify. More bugs and features are slower to develop --> ![cruft](https://i.imgur.com/t1NidLz.png) ###### https://martinfowler.com/architecture/ --- Have you ever heard the following? _"We need to put less effort on quality so we can build more features for our next release"_ Not really. ###### High internal quality leads to faster delivery of new features, because there is less cruft to get in the way. <!-- Quality can be subjective to the project. It relates to the Quality Attributes. -- E.g. Modular design, few defects, extensible, pleasant user interface, etc. --> ![is quality worth the cost?](https://martinfowler.com/articles/is-quality-worth-cost/both.png) ###### https://martinfowler.com/architecture/ <!-- While it is true that we can sacrifice quality for faster delivery in the short term, before the build up of cruft has an impact, people underestimate how quickly the cruft leads to an overall slower delivery. --> <!-- Competitive advantage --> --- ### Architectural Styles How to organize our code to meet the quality attributes <!-- How components, modules, layers, etc interact with each other --> Architectural styles can be implemented in various ways using different languages, frameworks and technologies --- #### Monolithic app ###### Such as our editor or participant view --- #### Layered ###### A layered architecture also constraints the dependencies between the layers. A layer can only depend on the layer immediately below it. ``` Presentation Layer ⬇️ Business Logic Layer ⬇️ Persistence Layer ``` --- #### Microservices ###### Instead of developing one large application, you structure the application as a set of services ###### [Developing Microservices](https://www.youtube.com/watch?v=kyNL7yCvQQc&t) --- **You can use several architectural styles** ###### For example, you could have microservices where each service is implemented following the hexagonal architecture style. This is possible because architectural styles might belong in different dimensions. --- To be continued... --- ### Summary ###### -> Mantaining a software is much more expensive than building it from scratch ###### -> Architecture is a way of defining constraints that allow us to gain speed and safety ###### -> Architecture helps with communication and vision ###### -> A good architecture enables faster delivery

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully