TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Design Docs at Google

459 pointsby thesephistalmost 5 years ago

37 comments

cameronbrownalmost 5 years ago
Design docs are one of my favourite things about software engineering. If code is the bricks and mortar, then these docs are the blueprints.<p>I know this is fairly controversial, but our jobs isn&#x27;t just to write code. Navigating organisations and achieving consensus between a lot of teams&#x2F;technologies is a huge part of it.<p>Design docs are a way to get all of that out of the way _before_ writing thousands of lines of code. The review process nets significantly different feedback to code reviews too.
评论 #23916466 未加载
评论 #23917227 未加载
评论 #23916218 未加载
评论 #23919095 未加载
评论 #23918257 未加载
评论 #23919368 未加载
评论 #23922282 未加载
评论 #23917690 未加载
评论 #23918749 未加载
评论 #23924630 未加载
评论 #23918663 未加载
staplungalmost 5 years ago
I worked at Google for 4 years. One thing that has always surprised me about documentation at Google is that they use Google Docs (just like everyone else) but have never seemed interested in making it less of a terrible tool for the task. It&#x27;s relentlessly print oriented, which makes almost no sense these days (when was the last time you printed out a Google doc?), has no affordances for dealing with pre-formatted text (e.g. code), has basically no support for mathematical formulas, etc. In fact its actually evolved to be less suited to the task of technical documentation since it began given that earlier versions at least allowed you to define your own paragraph styles. I was hoping that Google Colab might evolve into a better&#x2F;more general tool for writing tech specs but it doesn&#x27;t seem to be moving in that direction really.
评论 #23922696 未加载
评论 #23921161 未加载
评论 #23921199 未加载
评论 #23922833 未加载
评论 #23923016 未加载
评论 #23922864 未加载
评论 #23923107 未加载
评论 #23921387 未加载
评论 #23927386 未加载
评论 #23924592 未加载
评论 #23922662 未加载
ChrisMarshallNYalmost 5 years ago
I&#x27;m of a mind to reduce documentation as much as possible, or keep it as vague as possible.<p>That&#x27;s because I came from an environment that insisted on incredibly detailed, formal, approved-by-everyone-including-the-mens-room-attendant, documents.<p>These became &quot;concrete galoshes&quot;[0] that turned what should have been an agile, iterative project into a waterfall behemoth that cost a mint, took forever to make, and delivered a result that no one wanted.<p>I suspect that my current process[1] would not be acceptable for many organizations, as it basically requires that everyone involved be extremely experienced, and kept together as a team for years.<p>I&#x27;ve actually come to realize that &quot;tribal knowledge&quot; is not the boogeyman that its made out to be; but is a way to get very high-quality, rapid, adaptive, development done. The main issue is that it does require good, empathetic management, long-term retention of experienced, capable people, and an &quot;apprenticeship&quot; model. These are not popular concepts in today&#x27;s corporate world (at least, in the US).<p>[0] <a href="https:&#x2F;&#x2F;medium.com&#x2F;chrismarshallny&#x2F;concrete-galoshes-a5798a55af2a" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;chrismarshallny&#x2F;concrete-galoshes-a5798a5...</a><p>[1] <a href="https:&#x2F;&#x2F;medium.com&#x2F;chrismarshallny&#x2F;forensic-design-documentation-54541925d30e" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;chrismarshallny&#x2F;forensic-design-documenta...</a>
评论 #23916867 未加载
评论 #23917267 未加载
评论 #23920029 未加载
评论 #23920980 未加载
评论 #23919918 未加载
jeffbeealmost 5 years ago
A fun activity if you’re a Googler is to go read ancient design docs, like the original pitch for bigtable. They are pretty short for the most part, and they were written by the legends. These are the Federalist Papers of your company, they give real context to how the company arrived here. In particular I always enjoyed reading the jarring parts were they describe something that definitely did not make it into the implementation, or got removed later. It’s interesting to think about why they considered those things important enough to write down at the time.<p>Now that I wrote the above, it&#x27;s a bit sad that there aren&#x27;t many design docs for open source software, even ones that originated from companies with good design doc culture. Where&#x27;s a doc that discusses alternatives considered and rejected for kubernetes or grpc?
评论 #23920963 未加载
评论 #23935906 未加载
评论 #23918463 未加载
dgb23almost 5 years ago
Related: <a href="https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2000&#x2F;10&#x2F;02&#x2F;painless-functional-specifications-part-1-why-bother&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2000&#x2F;10&#x2F;02&#x2F;painless-functiona...</a><p>My opinion:<p>If you don&#x27;t specify things in a separate document in the form of text and pictures, then you end up doing it anyway but ad-hoc.<p>Your &quot;non-spec&quot; now leaks into multiple tools and channels that likely don&#x27;t talk to one another: emails, instant messages, file storage, notes, phone calls &amp; discussions (AKA in your head&#x2F;memory), Trello&#x2F;Asana&#x2F;Jira etc. and in peoples imaginations and expectations.<p>A specification is just the things you do <i>anyway</i> but instead written down in a single maintained place. You can source control it and iteratively change it. All the parties can pull it and look at it before&#x2F;during&#x2F;after iterations and discussions.<p>A spec doesn&#x27;t need to be set in stone at all. It can grow&#x2F;shrink&#x2F;change iteratively with the thing you build. It can also define things that you specifically shouldn&#x27;t do or worry about.<p>A &quot;design doc&quot; seems to be something like that with a different name?<p>Also a specification can help to communicate much more clearly, since you end up defining a <i>vocabulary</i> for processes, UI elements, technical components and so on.<p>Tools I find useful to do this:<p>- markdown + css + some tool to convert it to html&#x2F;pdf<p>- graphviz, especially for state-machines and decision trees, I prefer output as SVG rather than PNG.<p>- UML diagrams or similar if applicable
评论 #23921346 未加载
评论 #23918233 未加载
bruckiealmost 5 years ago
I find design docs really useful, even if no one else reads them, because they force me to clarify my thinking before I start the (more expensive) process of implementation.<p>However, I&#x27;ve also noticed a couple of very common problems with design docs:<p>- Many design docs don&#x27;t clearly state the problem that the design is intended to solve. Often the best response to a design is &quot;that problem isn&#x27;t important to solve&quot;, or &quot;there&#x27;s another system that already solves this problem&quot;, or &quot;there&#x27;s a totally different approach that you should consider&quot;, but without a clear statement of the problem and why it&#x27;s important to solve, it&#x27;s hard to determine those kinds of things.<p>- People often focus too much on the details of a design, vs. the important decisions that need(ed) to be made, the alternatives and rationale for those decisions, and the assumptions that they were based on. In a year, you probably won&#x27;t care that much about the details of the parameters of some API, but you probably will care a lot about why you chose that API over some other one, and it&#x27;s useful to have a record of that decision.<p>It&#x27;s useful to view a design doc as a distillation of the thought process behind a system, vs. a high-level description of how to build something.
commandlinefanalmost 5 years ago
I like the idea of design documentation, but in 30 years of software development experience, I&#x27;ve never seen one done well. TFA does a reasonably good job of outlining what you&#x27;d want from an ideal design document but doesn&#x27;t offer any advice on creating one that actually meets these criteria.
评论 #23917199 未加载
评论 #23917213 未加载
评论 #23916898 未加载
评论 #23921971 未加载
评论 #23918461 未加载
评论 #23916993 未加载
kcudrevelcalmost 5 years ago
I&#x27;ve worked at Google for a while, and a few years ago I wanted to release an open-source project. Since the code was going on Git, it made sense to throw the design there too, so I just added a DESIGN.md to the top-level of the project. This has had a remarkably nice effect: sometimes, when people make large changes to the project, they update the design to reflect the changes!<p>See this lovely commit as an example: <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;stenographer&#x2F;commit&#x2F;d678531a3e5a87b321e9247ba60d0019768681de#diff-6a735bf86dcc8fb712e11c207df01ae4" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;stenographer&#x2F;commit&#x2F;d678531a3e5a87...</a>
time0utalmost 5 years ago
Great article. I spend a lot of my time writing design docs these days. We derive a ton of value from it.<p>The projects I work on are typically collaborations with several developers. It is important to all have the same vision for what we are building. A good design doc is a vehicle for a team to sync their mental models of the thing they are building.<p>We also often have many other teams (security, infrastructure, operations, other business units, etc) who all have a stake in what we are doing. A good design doc helps build consensus with them. The review process gives them a voice in calling out concerns. It is much easier to solve a foundational problem before any code is written.<p>One addition that isn&#x27;t explicitly called out by the article, but I have found very valuable, is the inclusion of references. In my experience, good design docs typically include some references. Links to the docs for a piece of software we want to use, links to an AWS blog post explaining part of the architecture we want to use, links to academic papers explaining the algorithms we want to implement, etc. Good references support the design doc and help readers fill in knowledge gaps they may have.
评论 #23918468 未加载
the_arunalmost 5 years ago
Do we have any templates for design docs created by Google, Facebook, Twitter etc.,?<p>Not to be negative - My problem is there is no spec&#x2F;standard template for design docs (like someone compared it with Blueprints). If we have a template approved by industry leaders - it will be convenient. Otherwise everyone creates them in their own way - convenient for their use cases. But this will miss the consistency and all necessary ingredients. This ends up these docs fading out with time.<p>Also, when design changes - these docs need to be updated. People don&#x27;t do this. After a while, design docs become obsolete &amp; overhead.
评论 #23918633 未加载
评论 #23920584 未加载
评论 #23918532 未加载
PascLeRascalmost 5 years ago
Does anyone know where to find real examples of design docs, possibly following this guide? I don&#x27;t mean toy examples but something that&#x27;s actually used by real people&#x2F;orgs. My workplace has design docs but they&#x27;re full of made-up words, so I&#x27;m pretty burned out by this kind of thing.
评论 #23918099 未加载
评论 #23916851 未加载
评论 #23919070 未加载
评论 #23918779 未加载
评论 #23922021 未加载
评论 #23961656 未加载
cramforcealmost 5 years ago
Author here. Let me know if you have questions or feedback.
评论 #23916116 未加载
评论 #23919072 未加载
评论 #23916486 未加载
评论 #23916246 未加载
评论 #23916278 未加载
评论 #23917197 未加载
star-trek-fleetalmost 5 years ago
Hah, design docs at Google...<p>I read probably hundreds of deigns docs during my 6 years at Google.<p>I think among them, only a handful of design docs, like &lt; 10, are considered clear, clean, and succinct. And all of them are more or less retrospective ones summarizing a system after it&#x27;s already being implemented and running for a while.<p>The newer design docs, which are served as actual working documents for an active projects, are no doubt primarily a <i>process mechanism</i> to solicit design inputs, and garner supports from stakeholders.<p>It is a formality to show that the project owner is willing to <i>waste</i> his time and to convince so-called &quot;reviewers&quot; about the validity of the project. The reviewers usually do not read the design doc in earnest. Only the stakeholders, like the TL of the team, potential customers, partners, would spend serious time on them. It&#x27;s more or less a debate ground for stakeholders to pointing fingers at the design process. That&#x27;s also why the design doc is written in Google Doc in the first place.<p>Once a design is &quot;approved&quot;, it usually means from most major share holders are satisfied, to everyone is wearied down enough and the project has enough importance to actually push forward, they are OKed for implementation.<p>After that the design doc is largely useless, the designs laid out in the doc is usually 1) too simple that there is no need to consult design doc anyway, one can explain it in a few minutes chat; 2) too complicated that the design diverges from the actual code that the design doc offers little guidance. And very few design docs sit in between.<p>All in all, anything produced during a software engineering project seems all is about being a tool for organizing the human interaction process, the artifact, aside from a very high-level motivational piece, and the end result code + docs, whatever in between seems largely bears little value after the work is done.
Ozzie_osmanalmost 5 years ago
Honestly I sometimes write a design doc even if no one else will read it. It can be as short as a few sentences, if needed.<p>The main benefit is it forces you to:<p>1. Think strategically, not tactically, about what you&#x27;re about to build. Beyond just &quot;I need to get this working now&quot;.<p>2. It makes sure you can describe what you&#x27;re about to do in plain English (or plain English plus some diagrams). If you&#x27;re struggling to do that it&#x27;s probably a sign you need to rethink your approach.<p>Obviously, the organizational benefits described in the link are really important, too, but if all you&#x27;ve done is just 1 and 2 above that&#x27;s already worth your effort.
wsetchellalmost 5 years ago
The article does not point out how the system can go astray.<p>Design docs are great when they can in 1-2 pages describe a how an important&#x2F;large&#x2F;complex system will work and the tradeoffs made when designing it.<p>Some groups in Google confuse design docs conflated with the promotion process, and thus engineers start create long&#x2F;time consuming docs for every little thing as part of building a case for promotion.
Slumpalmost 5 years ago
Great article, generating consistent design docs that are both useful and not too time-consuming to create is something I am constantly working on. One thing I struggle with is finding examples of what others are doing in the industry. Does anyone have any resources they&#x27;ve found that provide examples of real-world design documents? Obviously each project is different but I&#x27;d be curious if others out there are publishing their templates&#x2F;outlines of what they typically start with similar to this article.<p>I feel like blog posts seem to serve this niche for a lot of open source projects but it would be interesting to see if anyone has found more structured examples.
whoevercaresalmost 5 years ago
Frankly I think Amazon has a even heavier design culture. The designs for a new project (e.g to be launched at reinvent) could go as long as more than half year.
评论 #23918272 未加载
gregdoesitalmost 5 years ago
“Unstructured text, like in the form of a design doc, may be the better tool for solving problems early in a project lifecycle, as it may be more concise and easier to comprehend, and communicates the problems and solutions at a higher level than code.“<p>I could not agree more. I came across the concept of design docs consistently used for all projects at Uber. They were called RFCs here and they were introduced very early on. I wrote in more detail about my experience using these and how I am pretty sure they helped scale the engineering culture [1]. The most surprising thing I’ve observed is how sending these design docs out to all of engineering worked really well, until the org was over a thousand engineers.<p>[1] <a href="https:&#x2F;&#x2F;blog.pragmaticengineer.com&#x2F;scaling-engineering-teams-via-writing-things-down-rfcs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.pragmaticengineer.com&#x2F;scaling-engineering-teams...</a>
choppafacealmost 5 years ago
It would be great to see some actual design docs in a blog post versus a summary article with zero primary references. (A postmortem of some design docs would be incredible!).<p>One of the hardest things about introducing a design doc process to a team of engineers is providing concrete examples as seeds and ensuring feedback to make the process actually work. It can be really jarring to introduce the design doc philosophy to a larger team if all they&#x27;ve been doing is Scrum every week. Moreover, typically design docs happen at a quarterly rhythm and feedback periods can take weeks-- this slow cycle is a major impediment to consensus and learning.<p>All this calls for material that speaks to differentiated learning. Extolling &quot;we do this at Google&quot; is a leaf in the wind.
评论 #23922187 未加载
britbullalmost 5 years ago
&gt; Are you unsure about the right software design, and would it make sense to spend upfront time to gain certainty?<p>This is a great question to ask. It&#x27;s human nature to lack foresight, especially when you are under pressure from deadlines, but in the long run it saves so much time.
Areibmanalmost 5 years ago
&gt;Finally, the overhead of creating and reviewing a design doc may not be compatible with prototyping and rapid iteration. However, most software projects do have a set of actually known problems. Subscribing to agile methodologies is not an excuse for not taking the time to get solutions to actually known problems right.<p>Here lies the biggest problem with the article. Most software projects _do not_ have a set of actually known problems. Agile exists precisely because it&#x27;s hard to pin down what problems are, and you learn much more about your product with gradual experiments than with some grand, centralized design.<p>Unless you are totally certain about your solution, design documents don&#x27;t have a place for most projects.
评论 #23918631 未加载
评论 #23917736 未加载
blululualmost 5 years ago
This is a very optimistic presentation of design docs. The flip side is that these documents can become a touchstone for bike shedding or and excuse to make slideware in lieu of software. A lot of administrative bloat can creep in through design docs.
winridalmost 5 years ago
At a medium sized company&#x2F;startup that follows this pattern. It works really well.<p>Much better than the core platform team just going and changing a bunch of stuff every release with no documentation, which I&#x27;ve experienced consistently at my last job.
vngzsalmost 5 years ago
IMO the ideal format for conveying this information is to show, not tell. Give me an example document and annotate it with sidenotes that describe the purpose and importance of each section.<p>Then we get to see how well it works, not leave it up to imagination.
jhallenworldalmost 5 years ago
Design docs should be written in Markdown and stored in git. The advantage here is that the git hash can be used as a legal reference, for example in the case where a contractor is expected to implement the design.
评论 #23917420 未加载
评论 #23918176 未加载
jkapturalmost 5 years ago
It&#x27;s important draw a distinction between a &quot;design doc&quot; and &quot;documentation&quot;. tl;dr: &quot;ought&quot; vs &quot;is&quot;.<p>A &quot;design doc&quot;, as described in the article, is a tool to help <i>make a decision</i>. It&#x27;s a proposal. It is &quot;ought&quot;. It describes the state of the world at a point in time, the desired change, and how to make it. Once the decision is made and the work is begun, it&#x27;s rarely updated.<p>&quot;Documentation&quot; is just <i>the state of the world</i> (generally &quot;now&quot; or &quot;at release x.y&quot;). It describes the design and use of the system, but has very little digression into ways it could be different. If it links to a design doc, it should be for<p>Once you draw this distinction, it&#x27;s clear that design docs should be in something like Google Docs, while documentation should be in something like a wiki or git. It&#x27;s clear why it&#x27;s fine for a design doc to be out of date, but it&#x27;s a big problem if documentation is. etc.
eximiusalmost 5 years ago
Half the time these are written after the fact (or updated after major changes), so they&#x27;re often used as shitty documentation. I don&#x27;t disagree with them, in principle, but I&#x27;ve yet to really see the benefit of them. The adage &quot;In preparing for battle I have always found that plans are useless, but planning is indispensable&quot; seems to apply.
cborensteinalmost 5 years ago
Design docs are great because writing them is aligned with the author&#x27;s best interest, not just a future reader. (This is different from docs that are written after the project is complete).<p>Design docs help you understand the project, identify dependencies, and avoid repeating work. Then they leave a trail for future engineers of the thought process that went into the code.
maps7almost 5 years ago
This is awesome! Thanks for posting - I think I can use this where I work. I am wondering though.. how do you allocate time to work on the design doc? I&#x27;m sure sometimes it takes a day but other times it can take longer and if there&#x27;s a review needed then it would take even longer. I work in a agile&#x2F;scrum team - how would this work fit in there?
jp42almost 5 years ago
After reading this article I can relate it event trace (Chrome tracing) design doc form google, very succinct to the point: <a href="https:&#x2F;&#x2F;docs.google.com&#x2F;document&#x2F;d&#x2F;1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU&#x2F;preview#" rel="nofollow">https:&#x2F;&#x2F;docs.google.com&#x2F;document&#x2F;d&#x2F;1CvAClvFfyA5R-PhYUmn5OOQt...</a>!
评论 #23919604 未加载
nkingsyalmost 5 years ago
The emphasis on trade offs is the most important part for me, because it formalizes the search for alternative approaches. In the majority of my design docs, I end up swapping an “alternative” into the doc itself as I find myself more convinced by the alternative solution.
mediocreguyalmost 5 years ago
Any good examplars of docs that use this format?
petejamesalmost 5 years ago
Writing helps you think. In the process of creating a design doc you get clarity of thought and refinements happen.
rckoepkealmost 5 years ago
I&#x27;d love some examples of real-world design docs.
评论 #23921999 未加载
juanbyrgealmost 5 years ago
It&#x27;s a little ironic that the author of that post created AMP...
lowiqengineeralmost 5 years ago
I wonder why the &quot;at Google&quot; is necessary for the title. I&#x27;d be very surprised to see an organization not use some sort of design doc before building things - the only thing that would be different is the scale and scope of them.<p>Of course, you won&#x27;t see a &quot;Design Docs at Amazon&quot; on the front page of HN for...some reason. Gee, I wonder why?
评论 #23918037 未加载
WeNeedDemocracyalmost 5 years ago
At my place of work we probably wouldn’t follow this simply because we don’t love the design of Google’s products