As a software engineer, I spend a lot of time reading and writing design documents. After having gone through hundreds of these docs, Ive seen first hand a strong correlation between good design docs and the ultimate success of the project.This article is my attempt at describing what makes a design document great.
The article is split into 4 sections:Why write a design documentWhat to include in a design documentHow to write itThe process around itWhy write a design document?A design doc also known as a technical spec is a description of how you plan to solve a problem.There are lots of writings already on why its important to write a design doc before diving into coding.
So all Ill say here is:A design doc is the most useful tool for making sure the right work gets done. The main goal of a design doc is to make you more effective by forcing you to think through the design and gather feedback from others. People often think the point of a design doc is to to teach others about some system or serve as documentation later on.
While those can be beneficial side effects, they are not the goal in and of themselves. As a general rule of thumb, if you are working on a project that might take 1 engineer-month or more, you should write a design doc. But dont stop there a lot of smaller projects could benefit from a mini design doc too.
Great! If you are still reading, you believe in the importance of design docs. However, different engineering teams, and even engineers within the same team, often write design docs very differently.
So lets talk about the content, style, and process of a good design doc.What to include in a design doc?A design doc describes the solution to a problem.
Since the nature of each problem is different, naturally youd want to structure your design doc differently.To start, the following is a list of sections that you should at least consider including in your next design doc:Title and PeopleThe title of your design doc, the author(s) (should be the same as the list of people planning to work on this project), the reviewer(s) of the doc (well talk more about that in the Process section below), and the date this document was last updated.OverviewA high level summary that every engineer at the company should understand and use to decide if its useful for them to read the rest of the doc.
It should be 3 paragraphs max. ContextA description of the problem at hand, why this project is necessary, what people need to know to assess this project, and how it fits into the technical strategy, product strategy, or the teams quarterly goals.Goals and Non-GoalsThe Goals section should:describe the user-driven impact of your project where your user might be another engineering team or even another technical systemspecify how to measure success using metrics bonus points if you can link to a dashboard that tracks those metricsNon-Goals are equally important to describe which problems you wont be fixing so everyone is on the same page.
MilestonesA list of measurable checkpoints, so your PM and your managers manager can skim it and know roughly when different parts of the project will be done. I encourage you to break the project down into major user-facing milestones if the project is more than 1 month long.Use calendar dates so you take into account unrelated delays, vacations, meetings, and so on.
It should look something like this:Start Date: June 7, 2018Milestone 1 New system MVP running in dark-mode: June 28, 2018Milestone 2 - Retire old system: July 4th, 2018End Date: Add feature X, Y, Z to new system: July 14th, 2018Add an [Update] subsection here if the ETA of some of these milestone changes, so the stakeholders can easily see the most up-to-date estimates. Existing SolutionIn addition to describing the current implementation, you should also walk through a high level example flow to illustrate how users interact with this system and/or how data flow through it.A user story is a great way to frame this.
Keep in mind that your system might have different types of users with different use cases. Proposed SolutionSome people call this the Technical Architecture section. Again, try to walk through a user story to concretize this.
Feel free to include many sub-sections and diagrams. Provide a big picture first, then fill in lots of details. Aim for a world where you can write this, then take a vacation on some deserted island, and another engineer on the team can just read it and implement the solution as you described.
Alternative SolutionsWhat else did you consider when coming up with the solution above? What are the pros and cons of the alternatives? Have you considered buying a 3rd-party solution or using an open source one that solves this problem as opposed to building your own?
Testability, Monitoring and AlertingI like including this section, because people often treat this as an afterthought or skip it all together, and it almost always comes back to bite them later when things break and they have no idea how or why. Cross-Team ImpactHow will this increase on call and dev-ops burden? How much money will it cost?
Does it cause any latency regression to the system? Does it expose any security vulnerabilities? What are some negative consequences and side effects?
How might the support team communicate this to the customers?Open QuestionsAny open issues that you arent sure about, contentious decisions that youd like readers to weigh in on, suggested future work, and so on. A tongue-in-cheek name for this section is the known unknowns.
Detailed Scoping and TimelineThis section is mostly going to be read only by the engineers working on this project, their tech leads, and their managers. Hence this section is at the end of the doc.Essentially, this is the breakdown of how and when you plan on executing each part of the project.
Theres a lot that goes into scoping accurately, so you can read this post to learn more about scoping. I tend to also treat this section of the design doc as an ongoing project task tracker, so I update this whenever my scoping estimate changes. But thats more of a personal preference.
How to write itNow that weve talked about what goes into a good design doc, lets talk about the style of writing. I promise this is different than your high school English class.Write as simply as possibleDont try to write like the academic papers youve read.
They are written to impress journal reviewers. Your doc is written to describe your solution and get feedback from your teammates. You can achieve clarity by using:Simple wordsShort sentencesBulleted lists and/or numbered listsConcrete examples, like User Alice connects her bank account, then Add lots of charts and diagramsCharts can often be useful to compare several potential options, and diagrams are generally easier to parse than text.
Ive had good luck with Google Drawing for creating diagrams. Pro Tip: remember to add a link to the editable version of the diagram under the screenshot, so you can easily update it later when things inevitably change.Include numbersThe scale of the problem often determines the solution.
To help reviewers get a sense of the state of the world, include real numbers like # of DB rows, # of user errors, latency and how these scale with usage. Remember your Big-O notations?Try to be funnyA spec is not an academic paper.
Also, people like reading funny things, so this is a good way to keep the reader engaged. Dont overdo this to the point of taking away from the core idea though. If you, like me, have trouble being funny, Joel Spolsky (obviously known for his comedic talents) has this tip:One of the easiest ways to be funny is to be specific when its not called for [ Example:] Instead of saying special interests, say left-handed avacado farmers.
Do the Skeptic TestBefore sending your design doc to others to review, take a pass at it pretending to be the reviewer. What questions and doubts might you have about this design? Then address them preemptively.
Do the Vacation TestIf you go on a long vacation now with no internet access, can someone on your team read the doc and implement it as you intended?The main goal of a design doc is not knowledge sharing, but this is a good way to evaluate for clarity so that others can actually give you useful feedback.ProcessAh yes, the dreaded P-word.
Design docs help you get feedback before you waste a bunch of time implementing the wrong solution or the solution to the wrong problem. Theres a lot of art to getting good feedback, but thats for a later article. For now, lets just talk specifically about how to write the design doc and get feedback for it.
First of all, everyone working on the project should be a part of the design process. Its okay if the tech lead ends up driving a lot of the decisions, but everyone should be involved in the discussion and buy into the design. So the you throughout this article is a really plural you that includes all the people on the project.
Secondly, the design process doesnt mean you staring at the whiteboard theorizing ideas. Feel free to get your hands dirty and prototype potential solutions. This is not the same as starting to write production code for the project before writing a design doc.
Dont do that. But you absolutely should feel free to write some hacky throwaway code to validate an idea. To ensure that you only write exploratory code, make it a rule that none of this prototype code gets merged to master.
After that, as you start to have some idea of how to go about your project, do the following:Ask an experienced engineer or tech lead on your team to be your reviewer. Ideally this would be someone whos well respected and/or familiar with the edge cases of the problem. Bribe them with boba if necessary.
Go into a conference room with a whiteboard. Describe the problem that you are tackling to this engineer (this is a very important step, dont skip it!).
Then explain the implementation you have in mind, and convince them this is the right thing to build.Doing all of this before you even start writing your design doc lets you get feedback as soon as possible, before you invest more time and get attached to any specific solution. Often, even if the implementation stays the same, your reviewer is able to point out corner cases you need to cover, indicate any potential areas of confusion, and anticipate difficulties you might encounter later on.
Then, after youve written a rough draft of your design doc, get the same reviewer to read through it again, and rubber stamp it by adding their name as the reviewer in the Title and People section of the design doc. This creates additional incentive and accountability for the reviewer. On that note, consider adding specialized reviewers (such as SREs and security engineers) for specific aspects of the design.
Once you and the reviewer(s) sign off, feel free to send the design doc to your team for additional feedback and knowledge sharing. I suggest time-bounding this feedback gathering process to about 1 week to avoid extended delays. Commit to addressing all questions and comments people leave within that week.
Leaving comments hanging = bad karma.Lastly, if theres a lot of contention between you, your reviewer, and other engineers reading the doc, I strongly recommend consolidating all the points of contention in the Discussion section of your doc. Then, set up a meeting with the different parties to talk about these disagreements in person.
Whenever a discussion thread is more than 5 comments long, moving to an in-person discussion tends to be far more efficient. Keep in mind that you are still responsible for making the final call, even if everyone cant come to a consensus.In talking to Shrey Banga recently about this, I learned that Quip has a similar process, except in addition to having an experienced engineer or tech lead on your team as a reviewer, they also suggest having an engineer on a different team review the doc.
I havent tried this, but I can certainly see this helping get feedback from people with different perspectives and improve the general readability of the doc.Once youve done all the above, time to get going on the implementation! For extra brownie points, treat this design doc as a living document as you implement the design.
Update the doc every time you learn something that leads to you making changes to the original solution or update your scoping. Youll thank me later when you dont have to explain things over and over again to all your stakeholders.Finally, lets get really meta for a second: How do we evaluate the success of a design doc?
My coworker Kent Rakip has a good answer to this: A design doc is successful if the right ROI of work is done. That means a successful design doc might actually lead to an outcome like this:You spend 5 days writing the design doc, this forces you to think through different parts of the technical architectureYou get feedback from reviewers that X is the riskiest part of the proposed architectureYou decide to implement X first to de-risk the project3 days later, you figure out that X is either not possible, or far more difficult than you originally intendedYou decide to stop working on this project and prioritize other work insteadAt the beginning of this article, we said the goal of a design doc is to make sure the right work gets done. In the example above, thanks to this design doc, instead of wasting potentially months only to abort this project later, youve only spent 8 days.
Seems like a pretty successful outcome to me.So you got added as a reviewer of a spec, what should you do?My good friend and role model Joy has the follow excellent tips:By the time you sign off on a spec, you should understand the answers to the following.
ProjectWhat problem is this project solving? How will we know when its successful?MetaWhat are the biggest decisions this project is making?
What are the implications?What is the most complex or risky piece of the project? How is that handled?
Technical designWhat is the simplest alternative implementation you can think of in 5 minutes? What are the pros/cons of the proposed approach relative to this? What improvements is the extra implementation time in the proposed approach buying?
Is it worth it? Note: this does not mean to imply youre going to come up with a better approach in 5 minutes. Its just to give you something more concrete to compare the proposed implementation against.
What are the key technical decisions in this project? What are the tradeoffs being made as a result of these decisions?What external systems does this project interact with?
How much scale is it adding? Does it follow current best practices and patterns? Does it fit into the long-term direction?
Does it imply future commitments or tech debt?What is information that youre aware of which the writer may not have known? Have you seen a similar solution used before?
(successful or not) Are there non-obvious edge cases in systems theyre working with? Is there a piece of straightforward implementation that you think will actually take a while?Monitoring/alertingWhat is the most likely failure mode during the project (e.
g. mid-rollout)What is the most likely failure mode after the project?How will the above be monitored and detected?
Please leave a comment below if you have any questions or feedback! Id also love to hear about how you do design docs differently in your team.Giving credit where credit is due, I learned a lot of the above by working alongside some incredible engineers at Plaid (we are hiring!
Come design and build some sweet technical systems with us) and Quora.If you like this post, follow me on Twitter for more posts on engineering, processes, and backend systems.
Copyright © 2020 Concises YuGa Sports | Sitemap
{"site":{"site_id":1359,"site_type":1,"site_domain":"soy-charger.com","domain_mode":1,"original_domain":"soy-charger.com","language_code":"id","is_init_domain":0,"is_shop":false,"is_ssl":1,"lang_prefix":"/"},"page":{"page_id":21715,"page_type":"ai_article_detail","page_code":423,"page_url":"/ai-article/how-to-write-a-good-software-design-doc.html","page_source":"","allowAnimat":0,"content_id":190,"content_type":5,"detail_thumb":"https://img.yfisher.com/1600825774086.png","detail_title":"How to write a good software design doc","moq":1},"translateList":{"A new item has been added to your Shopping Cart":"Item baru telah ditambahkan ke keranjang belanja Anda","account":"Akun","Account Name":"Nama akun","Account Number":"Nomor akun","Account is not exists":"Akun tidak ada","account security":"Keamanan Akun","Active Commission":"Komisi Aktif","Add a review on the product":"Tambahkan ulasan tentang produk","Add to":"Tambahkan","Add to Cart":"Masukkan ke keranjang","address book":"buku alamat","affiliate links":"tautan afiliasi","all":"semua","All Orders":"Semua perintah","Already commented":"Sudah berkomentar","Are you sure to cancel this withdrawal?":"Apakah Anda pasti akan membatalkan penarikan ini?","Are you sure to delete the selected items?":"Apakah Anda yakin untuk menghapus item yang dipilih?","Are you sure you want to delete it?":"Apakah Anda yakin ingin menghapusnya?","Awaiting Payment":"Menunggu Pembayaran","Awaiting Shipment":"menunggu pengiriman","Back":"Kembali","Bank Transfer":"Transfer Bank","bank address":"Alamat bank","basic information":"informasi dasar","Buy":"Membeli","Buy Now":"beli sekarang","bank name":"nama Bank","city":"kota","Copy successful":"Salin berhasil","Copy failed":"Salinan gagal","Can Extract":"Dapat mengekstrak","Currency Type":"Jenis mata uang","Cancel":"membatalkan","Cancel the success":"Batalkan kesuksesan","Cancelled":"Dibatalkan","Choose a country":"Pilih satu negara","Choose Coupon":"Pilih kupon","Choose items":"Pilih item","Clear":"Jernih","Clear Search":"Bersihkan pencarian","Comment Successful!":"Komentar Sukses!","Comment Failed!":"Komentar Gagal!","Commission Details":"Detail Komisi","Commission":"Komisi","Commission Status":"Status Komisi","commodity payment":"Pembayaran komoditas","completed":"completed","Completed":"lengkap","Condition not met":"Kondisi tidak bertemu","Confirm":"Mengonfirmasi","Confirm password is inconsistent with new password":"Konfirmasikan kata sandi tidak konsisten dengan kata sandi baru","Congratulations":"Selamat","Congratulations! You are got a coupon.":"Selamat! Anda punya kupon.","Congratulations! You are got all coupons.":"Selamat! Anda punya semua kupon.","Continue":"terus","Continue Shopping":"lanjutkan Belanja","Copy the code and use it directly in the shopping cart.":"Salin kode dan gunakan langsung di keranjang belanja.","Country":"negara","Coupon code":"Kode Kupon","Coupon List":"Daftar kupon","Date":"Tanggal","days after receiving":"hari setelah menerima","Design customization":"Kustomisasi desain","Do not use any discount":"Jangan gunakan diskon apa pun","Earliest":"Paling awal","Export successful":"Ekspor berhasil","Export failed":"Ekspor gagal","email":"surel","email format does not match":"Format email tidak cocok","Estimated Delivery Time":"Perkiraan Waktu Pengiriman","Effective Order Count":"Hitungan pesanan yang efektif","Effective Sale Amount":"Jumlah penjualan yang efektif","Expense":"Biaya","expired":"kedaluwarsa","export a report?":"Ekspor laporan?","Failed to upload files.":"Failed to upload files.","FAQ":"FAQ","Find Parts":"Temukan bagian","for order over":"Untuk pemesanan","Free":"Gratis","Free Quote & Information Request":"Permintaan Penawaran & Informasi Gratis","Free Shipping":"Bebas biaya kirim","Get":"Mendapatkan","Get coupons":"Dapatkan kupon","Get discount":"Dapatkan diskon","Get it":"Mengerti","Get it after logging in and use it in the shopping cart.":"Dapatkan setelah masuk dan gunakan di keranjang belanja.","Go to Page":"Buka halaman","Highest Price":"Harga tertinggi","home":"rumah","Hot Sale":"Diskon besar-besaran","Income":"Penghasilan","Incorrect form format":"Format formulir yang salah","inquiry":"pertanyaan","join guide":"Bergabunglah dengan panduan","Last 30 days":"30 hari terakhir","Last 7 days":"7 hari terakhir","Links report":"Laporan Tautan","Loading":"Memuat","Lowest Price":"Harga terendah","Match Product":"Match Product.","Merchant Free Shipping":"Pedagang gratis pengiriman","message":"pesan","Most Popular":"Paling populer","my account":"akun saya","my coupons":"kupon saya","my inquiry":"Pertanyaan saya","my orders":"pesananku","my reviews":"Ulasan saya","my wishlist":"Keinginanku","name":"nama","New Arrival":"Baru datang","Newest":"Terbaru","No Quotation":"Tidak ada kutipan","No time limit":"Tidak ada batas waktu","Not deleted":"Tidak dihapus","not valid yet":"belum berlaku","Off":"Mati","Offers and Discounts":"Penawaran dan diskon","ok":"baik","Only DOC,DOCX,PDF,PNG,JPEG and JPG files can be uploaded":"Hanya file Doc, Docx, PDF, PNG, JPEG dan JPG yang dapat diunggah","optional":"pilihan","order notes":"memesan catatan","Order over":"Pesan Atas","order id":"Id pemesanan","order status":"status pemesanan","order amount":"jumlah pesanan","Orders Report":"Laporan Pesanan","Other":"Lainnya","Password contains at least numbers and letters length should be 6-20":"Kata sandi mengandung setidaknya angka dan panjang huruf harus 6-20","Password is invalid":"Kata sandi tidak valid.","Password length should be 6-20":"Panjang kata sandi harus 6-20","Paypal":"Paypal","paypal payment":"Pembayaran PayPal.","Pending":"Tertunda","Pending Commission":"Komisi yang tertunda","personal info":"informasi pribadi","Please click ’click to continue’ to retry.":"Silakan klik \"Klik untuk melanjutkan\" untuk mencoba lagi.","Please contact customer service for cash withdrawal":"Silakan hubungi Layanan Pelanggan untuk penarikan tunai","Please enter a valid email address":"silakan isi alamat email","Please enter the verification code":"Silakan masukkan kode verifikasi","Please login in first":"Silakan masuk terlebih dahulu","Please select attribute":"Silakan pilih Atribut","Please select country/region":"Silakan pilih negara / wilayah","Please select superior":"Silakan pilih Superior","Please select the number of ratings.":"Silakan pilih jumlah peringkat.","Please select your country":"Pilih negara Anda","Please upload the invoice file":"Harap unggah file faktur","Processing":"Pengolahan","Product Name":"Nama Produk","Please fill in the delivery address before selecting the payment method":"Harap isi alamat pengiriman sebelum memilih metode pembayaran","promotion center":"Pusat Promosi","Promotion Link Click Amount":"Jumlah klik tautan promosi","Promoted link clicks":"Klik tautan yang dipromosikan","Promotion Order Count":"Hitungan pesanan promosi","Promotion Reports":"Laporan Promosi","read more":"Baca selengkapnya","Received commission":"Menerima komisi","Refund":"Pengembalian dana","Refuse":"Menolak","Region":"Wilayah","Register Success":"Daftar kesuksesan","Remittance":"Pengiriman uang","Reviews":"Ulasan","reports":"Laporan","Sale ends in":"Penjualan berakhir di","Save in wishlist":"Simpan di Wishlist.","Search":"Mencari","swift code":"tukar Kode","Select how to share":"Pilih Cara Berbagi","Select premium items to increase your chances of making money":"Pilih item premium untuk meningkatkan peluang Anda menghasilkan uang","Share items to your channels.when other purchase a from your link, you can get commission.":"Bagikan item ke saluran Anda. Ketika pembelian lain dari tautan Anda, Anda bisa mendapatkan komisi.","Share Product":"Bagikan Produk","shipment successful":"Pengiriman berhasil","Shipping":"pengiriman","Shipping Address":"Alamat Pengiriman","Size guide":"Panduan Ukuran","Small Text":"Teks Kecil","Small Title":"Judul kecil.","Sort By":"Sortir dengan","Sales Amount":"Jumlah penjualan","State/Province/Territory":"Negara Bagian / Propinsi / Wilayah","Successfully delete":"Berhasil dihapus","Successfully save":"Berhasil menyimpan","Thank you for trying":"Terima kasih telah mencoba","The account has been deactivated, please contact customer service to activate":"Akun telah dinonaktifkan, silakan hubungi Layanan Pelanggan untuk mengaktifkan","the content can not be blank":"Konten tidak bisa kosong","The coupon code has been copied and used in the shopping cart.":"Kode kupon telah disalin dan digunakan dalam keranjang belanja.","The file name cannot exceed 100 characters":"Nama file tidak dapat melebihi 100 karakter","The file size cannot exceed 2MB":"Ukuran file tidak bisa melebihi 2MB","The number of withdrawals on the day has been capped":"Jumlah penarikan pada hari itu telah dibatasi","The subscription is successful, thank you for your participation":"Langganan berhasil, terima kasih atas partisipasi Anda","The user center is out of service. Please contact customer service":"Pusat pengguna tidak berfungsi. Silakan hubungi Layanan Pelanggan","There is no amount to withdraw":"Tidak ada jumlah untuk ditarik","There is no data to export":"Tidak ada data untuk diekspor","This is Text":"Ini adalah teks","This is title":"Ini adalah judul","This transaction has failed.":"Transaksi ini gagal.","Time to shop":"Waktu untuk berbelanja","Tips":"Tips","To be commented":"Untuk dikomentari","Total":"Total","Tutorial":"Tutorial","This Supplier/Shipping Company does not deliver to your selected Country/Region.":"Pemasok/perusahaan pelayaran ini tidak mengirimkan ke negara/wilayah yang Anda pilih.","Update password success":"Perbarui Suks Kata Sandi","Upload Image":"Unggah Gambar","Upload up to 6 pictures":"Unggah hingga 6 gambar","uploading":"mengunggah","used":"digunakan","user center":"PUSAT PENGGUNA.","Upload Invoice":"Unggah faktur","valid now":"Berlaku sekarang","Validity period":"Masa berlaku","View Cart & Checkout":"Lihat Keranjang","views":"Tampilan","Valid for":"Berlaku untuk","Welcome to the website":"Selamat datang di situs web","Western Union":"Western Union.","When your buyers received and confirmed orders, you can get commission right now!":"Ketika pembeli Anda menerima dan mengonfirmasi pesanan, Anda bisa mendapatkan komisi sekarang!","Withdrawal":"Penarikan","Withdrawal success":"Keberhasilan penarikan","Withdrawal Method":"Metode penarikan","Write a Review":"Menulis review","Withdrawal Amount":"Jumlah penarikan","Yes":"Ya","Yesterday":"Kemarin","You are clicking too fast":"Anda mengklik terlalu cepat","You are got a coupon.":"Anda punya kupon.","You can select a maximum of 90 days":"Anda dapat memilih maksimal 90 hari","You can withdraw the commission to your Paypal account.":"Anda dapat menarik komisi ke akun PayPal Anda.","You haven’t chosen an address yet":"Anda belum memilih alamat","You haven’t selected a product yet":"Anda belum memilih produk","Your rating":"Penilaianmu","Your review":"Ulasan Anda","Your shipping address error":"Kesalahan Alamat Pengiriman Anda"}}