ModernWeb
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # The notion of design emergence:Evolving your software - Tan Yeong Sheng (陈永胜) {%hackmd yEJ_rTxzTWa2K450RqmT8w %} > 本講題將主要闡述『如何演變我們的軟體產品?』 前言 新加坡每五年,以大型計劃從教育推動產業 新加坡將學府的專注力從生物科技轉向軟體產業 [Full PDF Slide Deck](https://drive.google.com/file/d/1L2m_Vtsm0a2Luae-DZoxi5vlEgrqN0Xy/view?usp=sharing) > "The Best Architecture requirements, and **designs emerge** from **self-organizing teams**." ## Emergent design Software Craft and product building is Knowledge Creation + Knowledge Preservation ![](https://i.imgur.com/z4kIIff.png) How many of you would like to see your software product survive beyond your career? Products like Altavista Search had a shelf life span of about 3 to 5 yrs. Google Search has survived for more than a decade. Key difference between them is how the product evolved and remained relevant. ## When do you have best knowledge? What is the most thing tool that helps you to make the timely right choice? - The relevant and right Decision and Choice rely heavily on having as much knowledge as possible, as soon as possible, when you need to make the decision and choice. Knowledge vs Time - Your knowledge of your software product over time - Hypothetically it's a linear increment - Reality: at the begining it's possible to be flat, and as it grows, you would realize there are more things to be integrated and learnt about your business domain or product market fit. - We should strive for: (interact with your product earlier, get it into your users hands sooner) to increase the knowledge as soon as possbile, that comes from early feedback. ### Traditional vs Emergent Traditionally, the waterfall method is like Singapore government's economic plan and how that trickles into the education system reforms and structure: upfront, comprehensive but slow, far off tangent with emerging societal needs with emerging global challenges. There is no absolute right or wrong when a decision or choice is made. It is all about opportunity cost. Any decision made at a certain point of time, has only the benefit of just in time contextual relevancy of information available. The emergent method (like scrum) is iterative, taking small steps every time (Inspect and Adapt). It is cheap and easy to pivot and change your solution, design and technical decisions. Use iterative tiny product development cycles to gather faster feedback sooner to better sense the market, sense the competion, sense the technology evolution. Traditional: - Design (with **all** decisions) $\rightarrow$ Initial development Emergent: Design(decide an initial direction) $\rightarrow$ Design/Code $\rightarrow$ Reflect $\rightarrow$ Design/code $\rightarrow$ ### Make it work $\rightarrow$ Make it right $\rightarrow$ Make it fast * The primitive whole isn't just a bunch of unassembled parts. * It's an "under-developed whole" and something that does work. > Big design up front is dumb, but doing no design up front is even dumber When do we choose, how do we choose? ### Motivation $\rightarrow$ Skills $\rightarrow$ Timing * Motivation: - Is there a market for the platform - Is there a need for the platform * Skills - Can you hire - Is there a big enough community to seek help - Example: [Slang](https://news.efinancialcareers.com/us-en/282097/slang-goldman-sachs), [A+](https://news.efinancialcareers.com/us-en/3001925/morgan-stanley-a-programming-language) ## What upfront decision are hardest to change? I started in the semiconductor industry building equipment controllers and enjoyed controlling robots. With the semiconductor industry downturn in the early 2000 in Singapore, I was moved to pure software industry, building applications to rejuvenate legacy Mainframe finance and manufacturing execution systems. My choice back in 2002 was to equip myself with Java. Java promised the build once, run anywhere idealogy. With that choice, I inherited along with it, the entire ecosystem, techniques and platforms that supported the JVM stack for then-'modern' web applications like Apache Httpd, Apache Struts, XML, Oracle DB with JDBC, SOAP APIs (later replaced with Jersey for RESTful APIs), Apache Tomcat, etc. * Programming Language * Operating System / Processor Architecture * Database Choosing a programming language, operating system or database, very early on in the product development phase, anchors and determines the eco-system you have to work, deploy and debug/support in. It also dovetail you towards the available pool of talent you would hire, and the mindset of those talent pool that comes along, etc. ### Here be dragons... Below are a bunch of strong personal opinions on techincal choices that had shaped my recent thoughts and opinions that I would like to share, which I hope, can help you alleviate the risk and cost of choosing a technology stack ### Defer choice, maintain flexibility ![](https://i.imgur.com/B0F3Sny.jpg) Compare how much complexities you would need to tackle and hire to work with the first stack of options [Erlang](https://www.erlang.org/) developed by Joe Irving, Robert Virding and company in [Ericsson](https://en.wikipedia.org/wiki/Ericsson), to support the high demands of a robust, fault tolerant and hot deploy requirements of the Telecom market/industry. It has been measured with 9 9s ([99.9999999%](https://pragprog.com/articles/erlang)) uptime, with hot deploy capability without any downtime. ### Homogenous $\rightarrow$ Simplicity * Erlang/Elixir gives you the option to implement initial solution exclusively with a homogenous Erlang stack * You can then switch to alternatives, more full blown solution when enough knowledge has been acquired (e.g. through real user feedback or after data characterisation has been conducted, etc). e.g. Introduce [traefik](https://traefik.io) or [caddy](https://caddyserver.com) to replace (cowboy2)[https://ninenines.eu/articles/cowboy-2.0.0/], or replace [Mnesia](https://hackernoon.com/erlang-mnesia-the-art-of-remembering-5f6b975c7094) with [CockroachDB](https://www.cockroachlabs.com), or replace [Erlang Term Storage (ets)](http://erlang.org/doc/man/persistent_term.html) with [Aerospike](https://www.aerospike.com/products/aerospike-database-platform/). * Homogeneous stack, single repo systems are easier to develop, test and maintain. ### Responsive interactivity w/o JS [Phoenix Framework](https://phoenixframework.org/) with [Phoenix LiveView](https://dockyard.com/blog/2019/05/16/phoenix-liveview-leave-regular-web-development-behind), no more complex javascript frameworks needed to build an interactive and responsive web application. ([ElixirConf2019 Phoenix.LiveView Update](https://www.youtube.com/watch?v=XhNv1ikZNLs&feature=youtu.be)) Show me the code: https://github.com/yeongsheng-tan/live_view_todos * [master branch](https://github.com/yeongsheng-tan/live_view_todos.git) (single phoenix server with Phoenix LiveView) * [distributed_phx_pubsub branch](https://github.com/yeongsheng-tan/live_view_todos.git) (distributed phoenix server with redis pubsub as Phoenix Channels) What is needed? - Production code -> * Phoenix 1.4.9 and above * hex package: phoenix.liveview - Look Ma, No Javascript!!! ## D.A.S.H ### Your Weakest Link - Traditional RDBMS - NO SQL - New SQL (e.g. [CockroachDB](https://www.cockroachlabs.com), [YugabyteDB](https://www.yugabyte.com), [TiDB](https://pingcap.com/en/), etc) ### D.A.S.H - beyond [12-Factor-App](https://12factor.net/) - 4 properties of CloudNative Ready DB * D: Disposability * A: API symmetry * S: Shared nothing * H: Horizontal Scaling ### Enables global, scalable, resilient services ## Multi-master Distributed DB - Can it be trusted? ### CockroachDB passes jepsen testing [Jepsen testing](https://www.cockroachlabs.com/blog/cockroachdb-beta-passes-jepsen-testing/) Show me the code: https://github.com/yeongsheng-tan/lunchbox_api * [master branch](https://github.com/yeongsheng-tan/lunchbox_api.git) (single monolithic PostgreSQL) * [cockroachdb_postgrex_cdb_api_jwt_auth_e2e_tests branch](https://github.com/yeongsheng-tan/lunchbox_api.git) (multi-master CockroachDB with Cypress.IO e2e tests) ### What is needed? - Production code -> * hex package: [postgrex_cdb](https://hexdocs.pm/postgrex_cdb/readme.html) - Test code (to support DB sandbox and cleanup across tests) -> * hex package: [ecto_replay_sandbox](https://hexdocs.pm/ecto_replay_sandbox/readme.html) - No prod code change - Test code requires some changes to fit into API of ecto_replay_sandbox From a practical point of view. Changeability (應變) is the only design metric that matters; code that's easy to change is well - Designed. ###### tags: `MW19`

    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