How to write a good software design doc

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.

How to write a good software design doc 1

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.

GET IN TOUCH WITH US
추천 기사
How Do I Stop a Widget From Displaying on Mobile Site?
The most obvious answers is to use WordPress plugin. You can check this plugin of mine : Widget Options for WordPress which is available for free on the repository : and easily hide widgets on mobile and other devices. You can check the screenshot below on how it's integrated.Alternatively, you can use custom CSS. Just make sure you know the Widget ID and add something like this on your style.cssOn my main site I have used the search widget in the sidebar.However, the mobile theme I am using (minileven) already has a search box built into its menu bar. This results in a second search box in the sidebar (which appears after the post content) due to the widget.How do I stop the search widget appearing on the mobile site?This is the code for sidebar.php from the mobile theme: Alternatively, would it be better not to use the search sidebar widget and have the search box hardcoded into the main site theme? Is it usual for WordPress themes to do that? (I am planning on publicly releasing the WordPress theme I have made).·OTHER ANSWER:On my main site I have used the search widget in the sidebar.However, the mobile theme I am using (minileven) already has a search box built into its menu bar. This results in a second search box in the sidebar (which appears after the post content) due to the widget.How do I stop the search widget appearing on the mobile site?This is the code for sidebar.php from the mobile theme: Alternatively, would it be better not to use the search sidebar widget and have the search box hardcoded into the main site theme? Is it usual for WordPress themes to do that? (I am planning on publicly releasing the WordPress theme I have made).
Use of Classes for Lua Extensions
The system that Supreme Commander uses is that you can subclass classes, then you define the class-specific functions and data like so:The way the code is set up, is all of the classes that have to be in C code are exposed to the lua environment for subclassing. The above method is much like your first, and i would recommend that you take it. It makes it quite usable for both programmers and modders (of which i'm both). I started out programming to this model, and while i didn't completely understand things, it worked perfectly well and made sense to meI'm asking about a very small domain. One-off extension scripts. IE, defining a new weapon for scorched earth.When providing and API for small extension I've seen two approaches.The API exposes classes that the extender then subclasses, overriding the needed methods.--# weapons/flame_missile.lua--#extender pulls in a predefined weapon base classrequire "weapon.missile"--# luabind syntax for classesclass "flame_missile" (missile)function flame_missile:__init() self.hotness 10 self:set_cost(42)endfunction flame_missile:on_hit( who ) who:take_damage(self.hotness) who:ignite()endIn the other approach the api just exposes accessors and sandboxes the script, re-executing the file with each new missile and using the globals as the instance's state.--# weapons/flame_missile.luahotness 10cost 42--# extender just knows that an on_hit function will be called--# when the missile hits something.function on_hit( who ) who:take_damage(hotness) who:ignite()endNOTE: in my example who's api is OO. I'm not interested in whether OO should be used in the extension API. I'm more interested if OO should be used to incorporate user extensions into the game.The first one feels more C-y. So I'm a little more comfortable with from a software engineering standpoint. However, one-off scripts don't need to fit together into a larger architecture. Further, they could be written by less proficient coders, so all the fancy OO might be lost on them.I really like how concise the sandbox approach is. But it's a little limiting (only one missile per file, inheriting behavior from another weapon is no longer possible. I'd really like to define my extension api like this but I'm a little wary as it's a radical departure from classic C programming style.Which method do you prefer?Have you had any bad experiences with one or the other?Is there an even better way to elegantly incorporate extensions into the game?·OTHER ANSWER:I'm asking about a very small domain. One-off extension scripts. IE, defining a new weapon for scorched earth.When providing and API for small extension I've seen two approaches.The API exposes classes that the extender then subclasses, overriding the needed methods.--# weapons/flame_missile.lua--#extender pulls in a predefined weapon base classrequire "weapon.missile"--# luabind syntax for classesclass "flame_missile" (missile)function flame_missile:__init() self.hotness 10 self:set_cost(42)endfunction flame_missile:on_hit( who ) who:take_damage(self.hotness) who:ignite()endIn the other approach the api just exposes accessors and sandboxes the script, re-executing the file with each new missile and using the globals as the instance's state.--# weapons/flame_missile.luahotness 10cost 42--# extender just knows that an on_hit function will be called--# when the missile hits something.function on_hit( who ) who:take_damage(hotness) who:ignite()endNOTE: in my example who's api is OO. I'm not interested in whether OO should be used in the extension API. I'm more interested if OO should be used to incorporate user extensions into the game.The first one feels more C-y. So I'm a little more comfortable with from a software engineering standpoint. However, one-off scripts don't need to fit together into a larger architecture. Further, they could be written by less proficient coders, so all the fancy OO might be lost on them.I really like how concise the sandbox approach is. But it's a little limiting (only one missile per file, inheriting behavior from another weapon is no longer possible. I'd really like to define my extension api like this but I'm a little wary as it's a radical departure from classic C programming style.Which method do you prefer?Have you had any bad experiences with one or the other?Is there an even better way to elegantly incorporate extensions into the game?
Definition by Recursion: Why Is the Existence Part Not (almost) Obvious?
In fact your proof is a circular argument. To prove something by induction you first have to have the something. To define something "inductively" (loose terminology) is definition by recursion.You can define a recursive function $f$ for a finite range of $ninmathbb N$, say $n le N$ by saying $f(1) e, f(2) k(e), ...... f(n) k^n-1(e)$ but why would this function exist for all values of $ninmathbb N$ ? - you can't write an infinite specification for the function. So, you have actually relied on the Theorem of Recursion (i.e. in one form, the statement you are trying to prove) when you assume the existence of $f$ for all $ninmathbb N$ (and you are then using induction to prove $f$ has the property you have assumed it to have).The longer proofs that you may have seen might in outline go as follows:(1) if $f$ exists it would be represnted as a subset of N x H, i.e. a set of ordered pairs where each $ninmathbb N$ is represented in exactly one ordered pair.(2) whatever values $f$ might take N x H contains them(3) the powerset of N x H, $mathscr P(N mathrm x H)$ contains all possible subsets of N x H(3) using specification, one can obtain a subset $mathscr D$ of $mathscr P(N mathrm x H)$ with the property that all the elements of $mathscr D$ (which are subsets of N x H) include $(1, e)$ , and if $(n, h)$ is in such an element of $mathscr D$ then so is $(n 1, k(h))$(4) The intersetion of all elements of $mathscr D$ is formed and shown to be a function and (by definition) to be recursive.(5) the function $f$ is then shown to be uniqueI saw the following statement.Let $H$ be a set, let $ein H$ and let $k:Hrightarrow H$ be a function. Then there is a unique function $f:mathbbNrightarrow H$ such that $f(1)e$, and that $fcirc skcirc f$.(where $s:mathbbNrightarrowmathbbN$ is the successor function)On the 'existence' part alone, my problem is that I can't see what the flaw is in my argument.We know $f(1)$, and if ,for some $ninmathbbN$, we are given $f(n)$ then we define $f(s(n)):k(f(n))$; so we know $ f(s(n))$ .By induction $f$ is defined on $mathbbN$.Maybe the "proof" is too informal. Some examples to illustrate may be helpful.Thanks
Summation with Multiple Indices
If your question was specifically about simplifying this particular sum, see Elaqqad's answer for a combinatorial argument on what it is equal to. If your question is more about how to manually compute the sum and how to interpret the notation, then continue reading mine.Capital Sigma Notation can have several different ways of writing what the set of values you sum over are.In this case, for the summation: $sumlimits_r,s,tgeq 0texts.t.rstn$, I interpret it as summing the expression over all possible $r,s,tinmathbbZ$ such that the following conditions hold:$$begincases rgeq 0 sgeq 0 tgeq 0 rstnendcases$$In particular, there will be $binomn2n$ summands (seen from stars&bars). It doesn't matter in what way you choose to add the terms together (since there are a finite number of terms and addition is commutative), though if you wanted to do it by hand I would recommend Lexicographic order (a.k.a. Dictionary Order).You would do it as: $(0,0,n), (0,1,n-1), (0,2,n-2), dots, (0,n,0), (1,0,n-1), (1,1,n-2),dots, (n-1,0,1), (n-1,1,0), (n,0,0)$where you order the entries according to the the size of the earliest difference.For an explicit example, with $n2$ you would have$$binomm_10binomm_20binomm_32 binomm_10binomm_21binomm_31 binomm_10binomm_22binomm_30 binomm_11binomm_20binomm_31 binomm_11binomm_21binomm_30 binomm_12binomm_20binomm_30$$How would the following summation work?$sum_r,s,t ge 0_rstn binomm_1r binomm_2s binomm_3t$How would you choose the value for the next integer in the series?For example, for n2. Either r,s, or t 2. Or r 1 and s 1 (or any combination thereof)I think the inclusion-exclusion principle would be used but I'm don't know how it would be applied.Sorry if this is a duplicate question. I wasn't sure how to word it.·OTHER ANSWER:How would the following summation work?$sum_r,s,t ge 0_rstn binomm_1r binomm_2s binomm_3t$How would you choose the value for the next integer in the series?For example, for n2. Either r,s, or t 2. Or r 1 and s 1 (or any combination thereof)I think the inclusion-exclusion principle would be used but I'm don't know how it would be applied.Sorry if this is a duplicate question. I wasn't sure how to word it.
Title of Novel About Amateur Scientist Who Discovers Earth's Magnetic Field Changes Orientation
This is The HAB Theory, by Allan Eckert. Protagonist is Herbert Allan Boardman (HAB), an electrical engineer who discovers at age 94 that the Earth undergoes these magnetic reversals, and does stage a faux assassination attempt on the President to get attention for his theories.It was originally published in 1976, and while out of print for many years it has recently been re-released so should be available. Magnetic pole reversal is a known phenomenon, and while we are "overdue" for one, current theories think that it would not be a catastrophic event: NASA page on reversal.I'm looking for the title/author of a sci-fi book I read in the mid 90's but was probably at least 5-10 years older than that.The basic premise was of a older guy who as an amateur scientist had discovered that the Earth's magnetic field changed orientation every few thousand years, and was currently long overdue. One of the main things I can remember is that early on in the book he used an attempted assassination of the US President (using wax bullets instead of the real thing), in an attempt to get the attention of the authorities.There was a lot of other stuff about how this would explain the myths of Atlantis and the Egyptians & Mayans having such advanced technologies. In the end people bought into his theory, but we only just getting prepared when the lights went out...Any ideas?Thanks.·OTHER ANSWER:I'm looking for the title/author of a sci-fi book I read in the mid 90's but was probably at least 5-10 years older than that.The basic premise was of a older guy who as an amateur scientist had discovered that the Earth's magnetic field changed orientation every few thousand years, and was currently long overdue. One of the main things I can remember is that early on in the book he used an attempted assassination of the US President (using wax bullets instead of the real thing), in an attempt to get the attention of the authorities.There was a lot of other stuff about how this would explain the myths of Atlantis and the Egyptians & Mayans having such advanced technologies. In the end people bought into his theory, but we only just getting prepared when the lights went out...Any ideas?Thanks.
Apache Always Serving First Virtual Host
As for my experience this can happen in the following situation:firstsite.com has dns 1.2.3.4 and ip in vhost 1.2.3.4 or *secondsite.com has dns 1.2.3.4 and ip in vhost is 1.2.3.5.Both 1.2.3.4 and 1.2.3.5 are ips of the problematic server and apache is listening on both ips.BUT as for the few logs and details you provided it is hard to find if this is actually the case.I have seen this asked about few times, but surprisingly no solutions worked for me:Yes, I have used "sudo a2ensite com.secondwebsite.conf"Yes, I have used "sudo /etc/init.d/apache2 reload"Yes, I have used "sudo /etc/init.d/apache2 restart"Yes, I have tried putting both virtual hosts into one file (/etc/apache2/sites-available/default), adding "NameVirtualHost *:80" on top of it and removing it from "/etc/apache2/ports.conf"Yes, I have used "sudo chmod 777 /var/www/secondwebsite"Whatever I do, secondwebsite.com keeps showing firstwebsite.com. Does anyone have any idea what might be causing this?Here is my "/etc/apache2/sites-available/default" ServerAdmin admin@gmail.com ServerName firstwebsite.com ServerAlias www.firstwebsite.com DocumentRoot /var/www Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options ExecCGI -MultiViews SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog $APACHE_LOG_DIR/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog $APACHE_LOG_DIR/access.log combined Alias /static /home/user/firstwebsite/firstwebsite/static Order allow,deny Allow from all Alias /media /home/user/firstwebsite/firstwebsite/site_media/media Order allow,deny Allow from all Order allow,deny Allow from all WSGIDaemonProcess firstwebsite WSGIProcessGroup firstwebsite WSGIScriptAlias / /home/user/firstwebsite/firstwebsite/wsgi.py My "/etc/apache2/sites-available/com.secondwebsite.conf" ServerAdmin admin@gmail.com ServerName secondwebsite.com ServerAlias www.secondwebsite.com DocumentRoot /var/www/secondwebsite/public_html ErrorLog $APACHE_LOG_DIR/secondwebsite_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog $APACHE_LOG_DIR/access.log combined My "/etc/apache2/ports.conf" # If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default # This is also true if you have upgraded from before 2.2.9-3 (i.e. from # Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and # README.Debian.gz NameVirtualHost *:80 Listen 80 # If you add NameVirtualHost *:443 here, you will also have to change # the VirtualHost statement in /etc/apache2/sites-available/default-ssl # to # Server Name Indication for SSL named virtual hosts is currently not # supported by MSIE on Windows XP. Listen 443 Listen 443 Result of sudo /usr/sbin/apache2ctl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:80 is a NameVirtualHost default server firstwebsite.com (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost firstwebsite.com (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost secondwebsite.com (/etc/apache2/sites-enabled/com.secondwebsite.conf:1) Syntax OK·OTHER ANSWER:I have seen this asked about few times, but surprisingly no solutions worked for me:Yes, I have used "sudo a2ensite com.secondwebsite.conf"Yes, I have used "sudo /etc/init.d/apache2 reload"Yes, I have used "sudo /etc/init.d/apache2 restart"Yes, I have tried putting both virtual hosts into one file (/etc/apache2/sites-available/default), adding "NameVirtualHost *:80" on top of it and removing it from "/etc/apache2/ports.conf"Yes, I have used "sudo chmod 777 /var/www/secondwebsite"Whatever I do, secondwebsite.com keeps showing firstwebsite.com. Does anyone have any idea what might be causing this?Here is my "/etc/apache2/sites-available/default" ServerAdmin admin@gmail.com ServerName firstwebsite.com ServerAlias www.firstwebsite.com DocumentRoot /var/www Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options ExecCGI -MultiViews SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog $APACHE_LOG_DIR/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog $APACHE_LOG_DIR/access.log combined Alias /static /home/user/firstwebsite/firstwebsite/static Order allow,deny Allow from all Alias /media /home/user/firstwebsite/firstwebsite/site_media/media Order allow,deny Allow from all Order allow,deny Allow from all WSGIDaemonProcess firstwebsite WSGIProcessGroup firstwebsite WSGIScriptAlias / /home/user/firstwebsite/firstwebsite/wsgi.py My "/etc/apache2/sites-available/com.secondwebsite.conf" ServerAdmin admin@gmail.com ServerName secondwebsite.com ServerAlias www.secondwebsite.com DocumentRoot /var/www/secondwebsite/public_html ErrorLog $APACHE_LOG_DIR/secondwebsite_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog $APACHE_LOG_DIR/access.log combined My "/etc/apache2/ports.conf" # If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default # This is also true if you have upgraded from before 2.2.9-3 (i.e. from # Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and # README.Debian.gz NameVirtualHost *:80 Listen 80 # If you add NameVirtualHost *:443 here, you will also have to change # the VirtualHost statement in /etc/apache2/sites-available/default-ssl # to # Server Name Indication for SSL named virtual hosts is currently not # supported by MSIE on Windows XP. Listen 443 Listen 443 Result of sudo /usr/sbin/apache2ctl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:80 is a NameVirtualHost default server firstwebsite.com (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost firstwebsite.com (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost secondwebsite.com (/etc/apache2/sites-enabled/com.secondwebsite.conf:1) Syntax OK
Viscosity of Ideal Gas From Dimensional Analysis
Your intuition is wrong on this. Consider one-dimensional steady flow, say in the $x$-direction, with a velocity gradient in the $y$-direction. Thus the particles at a given level have average velocity $$barmathbf u(u(y), 0, 0)^T,$$ and fluctuating velocities $$mathbf u'(u', v', w')^T.$$ Let's consider particles that at time $t_0$ are located at $(x,y_0)^T$, which have velocities $mathbf u(u_0u', v', w')^T.$ These particles will, on average, travel a distance of the mean free path length $l$ at that velocity, before hitting other particles. The particles will thus have migrated to a different $y$ position, where the average particle velocity will be $$barmathbf u(y)(u(y_0)(y-y_0)fracpartial upartial y, 0, 0)^T.$$ Notice that the average difference in the $x$-component of the velocity of such particles will therefore be proportional to the mean free path $l$ times an integral $I$ over the distribution of $v'$ and $w'$ velocities which does not matter here: We have $y-y_0I,l$. The mean velocity difference for such particles is therefore just $barDelta uI,l,(partial u/partial y)$.Since the mean velocity is assumed to stay constant, such particles will have their velocity adjusted to the one at their new $y$-position. Viscous forces correspond to the work required to achieve this. These forces must therefore be proportional to the velocity gradient times the mean free path length.P.S.: Also see the derivation in the Wikipedia article on viscositySummaryFrom dimensional analysis I find that the dynamic viscosity of an ideal gas must depend on its pressure $p$, density $rho$ and mean molecular free path $l$ in this way:$$mu C sqrtrho p l.quad$$Here, $Cgeq0$ is a non-dimensional constant.However, I find it counter intuitive that the dynamic viscosity, the 'internal friction', of the fluid increases with an increasing mean free path. My intuition tells me that the internal friction is low if the molecules are widely separated.Have I missed some quantity that should enter the expression?Has my derivation failed in some other way?Is my intuitive picture wrong?The derivationIn an ideal gas, molecules are interacting only through ellastic collisions. The equation of state is:$$p rho R T. quad (1)$$The variables and their units are:$p$: Pressure [kg/(m s$^2$)]$rho$: Density [kg/(m$^3$)]$R$: Specific gas constant [m$^2$/(s$^2$ K)]$T$: Temperature [K]In general, these are field variables, so $p p(mathbfx,t)$, $rho rho(mathbfx,t)$ and $T T(mathbfx,t)$. In fluid dynamics, a common assumption is that each infinitesimally small volume is in thermodynamic equilibrium, so that (1) holds at every point in the fluid. I make this assumption. I also assume that the fluid is 'Newtonian', so that the viscous stress tensor is proportional to the rate of strain. The constant of proportionality is the dynamic viscosity, $mu$, whose unit is [kg/(m s)].The dynamic viscosity is a 'material property'; it is independent of the motion of the fluid. In general, it is varying over space, so that $mu mu(mathbfx,t)$. It's value is a property of the material and depends on its thermodynamic state.It seems impossible to find how $mu$ depends on the thermodynamic state from (1). Pressure has 'almost' the correct units, but I need to multiply the pressure by some time scale $tau$ [s]. This time scale must depend on the microscopic properties of the material, and the only way I find it possible to construct it is by using the $l$ [m] the mean free path of the molecules in the fluid. The time scale contructed is:$$tau sqrtfracrhop l.quad (2)$$Using (2) I find that the dynamic viscosity must depend on $p$, $rho$ and $l$ in this way:$$mu C sqrtrho p l,quad (3)$$where $Cgeq0$ is a non-dimensional constant.·OTHER ANSWER:SummaryFrom dimensional analysis I find that the dynamic viscosity of an ideal gas must depend on its pressure $p$, density $rho$ and mean molecular free path $l$ in this way:$$mu C sqrtrho p l.quad$$Here, $Cgeq0$ is a non-dimensional constant.However, I find it counter intuitive that the dynamic viscosity, the 'internal friction', of the fluid increases with an increasing mean free path. My intuition tells me that the internal friction is low if the molecules are widely separated.Have I missed some quantity that should enter the expression?Has my derivation failed in some other way?Is my intuitive picture wrong?The derivationIn an ideal gas, molecules are interacting only through ellastic collisions. The equation of state is:$$p rho R T. quad (1)$$The variables and their units are:$p$: Pressure [kg/(m s$^2$)]$rho$: Density [kg/(m$^3$)]$R$: Specific gas constant [m$^2$/(s$^2$ K)]$T$: Temperature [K]In general, these are field variables, so $p p(mathbfx,t)$, $rho rho(mathbfx,t)$ and $T T(mathbfx,t)$. In fluid dynamics, a common assumption is that each infinitesimally small volume is in thermodynamic equilibrium, so that (1) holds at every point in the fluid. I make this assumption. I also assume that the fluid is 'Newtonian', so that the viscous stress tensor is proportional to the rate of strain. The constant of proportionality is the dynamic viscosity, $mu$, whose unit is [kg/(m s)].The dynamic viscosity is a 'material property'; it is independent of the motion of the fluid. In general, it is varying over space, so that $mu mu(mathbfx,t)$. It's value is a property of the material and depends on its thermodynamic state.It seems impossible to find how $mu$ depends on the thermodynamic state from (1). Pressure has 'almost' the correct units, but I need to multiply the pressure by some time scale $tau$ [s]. This time scale must depend on the microscopic properties of the material, and the only way I find it possible to construct it is by using the $l$ [m] the mean free path of the molecules in the fluid. The time scale contructed is:$$tau sqrtfracrhop l.quad (2)$$Using (2) I find that the dynamic viscosity must depend on $p$, $rho$ and $l$ in this way:$$mu C sqrtrho p l,quad (3)$$where $Cgeq0$ is a non-dimensional constant.
70's/80's Sci-fi TV Movie with People Exploring an Island and Being Attacked by an Extremely Large M
I think the movie is the 1977 USA/Japanese co-production The Last Dinosaur. Rankin and Bass (of Rudolph, The Red Nosed Reindeer fame) financed it. Your description of the ship matches well the Polar-Borer that takes the explorers through the Earth's crust to a prehistoric land in the Artic. Did the ship look like the one in the pictures below? The dinosaur does attack their ship at the beach and carries it away in its mouth, stranding them on the island.The Last Dinosaur is a color movie. The effects are very much in the Toho style. The T-Rex is a very unconvincing man-in-a-suit. That is why you may associate the dinosaur with Godzilla. The movie never played in movie theaters in the states. I remember watching it repeatedly on network and local television in the late '70's and early '80's. It has a largely American cast, so the lead actors speak their own lines without dubbing.Richard Boone stars as an oil tycoon (and big game hunter) who finances a scientific expedition to explore a recently discovered prehistoric land at the North Pole. A very active volcano has kept the area a tropical paradise for millennia and it is inhabited by prehistoric creatures and cave people. Both attack the expedition. Boone becomes increasingly more savage and threatens the other team members. All he wants to do is hunt and kill the last T-Rex on Earth, while the others want to recover their ship and escape. Joan Van Arc (from television's Knots Landing) plays the lead scientist.The original, un-edited cut of the movie has been released on DVD. I found two good reviews of those DVDs here and hereThe movie has a group of people who either were exploring an island or another mysterious continent. At a point in the movie, I think their ship was damaged or was thrown around by either an extremely large monster/dinosaur (or maybe even Godzilla?) I think this scene happened on land or right by water. I remember that the ship was not that fancy. I don't think that it had the look of a submarine. It almost just looked like a silver tube. Almost like a cylinder. Maybe with a cone at one end. The ship may have just have sides dented. I don't think it was destroyed and the people may have still been able to escape in the ship.I would say that the movie was made between 1950 through the 1960's. I saw it on TV in the 70's or 80's. I remember it being in color but it could have been a black and white movie with a certain hue to it to make me think it was color.
데이터 없음

Copyright © 2020 Concises YuGa Sports | Sitemap