新足迹

 找回密码
 注册

精华好帖回顾

· 喝汤喽 - 老陶的汤系列 (全部更新完毕) (2009-2-28) 老陶 · 参加活动——情浓中秋 今夕何夕 (2011-8-28) amon54
· 自制小吃:Buffalo wings (2005-1-7) 蜻蜓 · 悉尼-团购马自达CX5?团购完美结束,下周提车 (2014-3-27) H妈妈
Advertisement
Advertisement
查看: 1626|回复: 14

巨作:Windows 是怎样开发出来的 [复制链接]

2010年度奖章获得者

发表于 2011-2-28 22:50 |显示全部楼层
此文章由 dalaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dalaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Microsoft worker Richard G Russell has revealed exactly how the company builds Windows and what it’s like to work at the software giant.

Russell penned a blog post on Sunday entitled “Working at Microsoft – Day to Day Coding“. The post details developer life at Microsoft, right down to the fact that developers use quad core 64-bit systems with 8GB RAM, fast hard drives, gaming quality graphics adapter and at least two large monitors. “Many people have three monitors, some have four. We’re moving to SSD’s,” writes Russell.

Russell also details how Windows team members code at Microsoft. “Teams are free to code in their own style. By style here I mean typographic style – where curly braces go, tab indent size, where spaces go, comment format: things that have no semantic impact. There is no draconian common coding style mindlessly forced on everyone,” he reveals.

Perhaps the most interesting part of Russell’s post is the thorough detail of Microsoft’s build process for Windows. Russell says that most Windows workers run a current Windows build. “Daily builds are almost always very stable and useable,” according to Russell. “Builds usually start about 5:00pm though teams can set their own defaults, or change it for a day. This means that a fully installable version of Windows is built from source every single night – though we pause for holidays, and sometimes if there are snow days. Builds are ready for use when we arrive for work the next day. We build four ‘flavors’ of each branch every night; x86-optimized, x64-optimized, x86-debug, x64-debug.”

Russell also details the three levels of Windows builds. “The entire build environment is checked into source depot – not just the source code. This includes the compiler, linker and other build tools. We can re-build any version of any Windows product going back to XP SP1 very easily.” Russell also shares a diagram of how code is compiled and checked into the source depot:




There are many ways to use branching, we mange them as a tree.   The WinMAIN branch is at the top.  “Official” builds of Windows are built from WinMAIN. This includes the RTM, CTP and BETA versions.

Underneath WinMAIN are aggregation branches. These correspond to large team’s of developers.    We call these L1 branches.

L2 branches corresponds to teams – generally 60 to 90 people including developers, testers and program managers.

L3 branches correspond to feature crews.  A crew is usually 3 to 10 people that collectively own a feature, or set of features. My team of six developers, four testers and three PM’s  (in addtion to our three leads, development, PM and test) has its own L3 branch.

WinMAIN, L1, L2 and L3 branches are all managed by a central build team.  There are dedicated build servers for each branch.  Crews can create L4 (or even L5) branches, but they must mange these themselves (its not difficult or time consuming).

Russell is a self described hiring manager at Microsoft, in the Windows organization, having worked at the company for over seven years

评分

参与人数 2积分 +10 收起 理由
o2h2o + 2 谢谢奉献
bulaohu + 8 谢谢奉献

查看全部评分

足迹 Reader is phenomenal. If you never used, you never lived 火速下载
Advertisement
Advertisement

发表于 2011-2-28 22:53 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
顶一下!!

等unix/linux那边的人来拆台

评分

参与人数 1积分 +2 收起 理由
S.E. + 2 谢谢奉献

查看全部评分

发表于 2011-3-1 07:57 |显示全部楼层
此文章由 charmer 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 charmer 所有!转贴必须注明作者、出处和本声明,并保持内容完整

发表于 2011-3-1 08:01 |显示全部楼层
此文章由 Dan.and.Andy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 Dan.and.Andy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
讲了半天原来windows的开发就是build, 也没有几次kernel的重构. 总算明白了, 美国本土那里的coder就是包装工. 怪不得360发现了存在于windows系统23年之久的"长老"漏洞.

发表于 2011-3-1 09:22 |显示全部楼层
此文章由 mylt 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 mylt 所有!转贴必须注明作者、出处和本声明,并保持内容完整
linux 的那个图看得好复杂

发表于 2011-3-2 20:40 |显示全部楼层

回复 5# 的帖子

此文章由 yesngo 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 yesngo 所有!转贴必须注明作者、出处和本声明,并保持内容完整
可见linux不如windows
Advertisement
Advertisement

退役斑竹

发表于 2011-3-2 21:48 |显示全部楼层
此文章由 大饼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 大饼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
linux的device driver是做的非常滥

发表于 2011-3-2 21:50 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
有意思,这篇文章好像已经被删除了。 还好google能找到cache的版本。 不知道发生了什么情况, 大老虎知道吗?

2010年度奖章获得者

发表于 2011-3-2 22:00 |显示全部楼层
此文章由 dalaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dalaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 flyspirit 于 2011-3-2 22:50 发表
有意思,这篇文章好像已经被删除了。 还好google能找到cache的版本。 不知道发生了什么情况, 大老虎知道吗?


真的啊。。。那人的博客已经被封杀了。 一定是老大怒了。
足迹 Reader is phenomenal. If you never used, you never lived 火速下载

2010年度奖章获得者

发表于 2011-3-2 22:01 |显示全部楼层
此文章由 dalaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dalaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
他有几篇微软内部开发的文章全都没了。。。

发表于 2011-3-2 22:32 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
是啊, 本来是一个系列的, 你有保留马?其他几篇貌似找不到。

Richard G Russell暴太多内幕了。会不会因此而被fire呢?
Advertisement
Advertisement

2010年度奖章获得者

发表于 2011-3-2 22:35 |显示全部楼层
此文章由 dalaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dalaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 flyspirit 于 2011-3-2 23:32 发表
是啊, 本来是一个系列的, 你有保留马?其他几篇貌似找不到。

Richard G Russell暴太多内幕了。会不会因此而被fire呢?


我也没有啊。。。后悔啊。。。被和谐的东西都是好东西啊。。。
足迹 Reader is phenomenal. If you never used, you never lived 火速下载

发表于 2011-3-2 22:36 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
找到另一篇了:Working At Microsoft–20% Time and Prototypes, 也是cache的版本。

2010年度奖章获得者

发表于 2011-3-2 22:38 |显示全部楼层
此文章由 dalaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dalaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 flyspirit 于 2011-3-2 23:36 发表
找到另一篇了:Working At Microsoft–20% Time and Prototypes, 也是cache的版本。


对, 我前2天也读到了。 MS可能要划20%时间全民开发WP7 APP

你能贴一下吗?
足迹 Reader is phenomenal. If you never used, you never lived 火速下载

发表于 2011-3-2 22:42 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Jibe!
Working At Microsoft–20% Time and Prototypes
with 4 comments

I quite often see assumptions on the inter-tubes that writing software at Microsoft is a mind-numbingly boring, tedious, manual, excruciating, soul-crushing bureaucratic exercise. This couldn’t be further from the truth – especially in Windows.  Google is famous for their 20% time policy.  Microsoft doesn’t have a similar policy, but how we do things may be even better.

You can find the full series list here.


--------------------------------------------------------------------------------

Much has been made about Google’s 20% time for developers.  If I understanding things correctly, people get about 1 day per week to work on things they feel are important. This is pretty cool.

Of course, Microsoft does not have the same policy.  Much has been made about this as well.

What I don’t think has been well explained is that Microsoft’s approach – while maybe not as sexy, and certainly not highly publicized – may actually be better.

Most product teams in Microsoft (especially the Windows, Windows Live, Office and Developer Division) work to schedules.  Meeting delivery dates is very important. This means that when we are in an active product development cycle we focus on getting our work done – hitting our dates. As you can imagine, cutting out 20% of every developers time in a product cycle would be pretty detrimental to the schedule – it would push things out considerably.

But, when we are not focused on finishing a coding, integration or stabilization milestone, we very often have time to work on 20% kind of things – often way more than 20%. We call this prototyping.

It is quite common for prototype code to productized and used in products. in fact, we usually use our production coding systems for prototype work.   My team writes all our prototype code pretty close to production quality.  We don’t hack it.   Ad-hoc hacking just isn’t any faster than writing code well.

Prototypes are often rolled out to all the systems in Windows for testing. We’ll instrument these prototypes and collect data on them. Our regular systems catch problems like crashes and hangs

I’ve done quite a bit of prototyping. So have many others I know. This is true for minor things and some big things. For example Superfetch was heavily prototyped. So where some key cold boot optimizations, and a lot of our work on the xperf family of performance tools (and this).   We’ve also prototyped internal things like telemetry processing tools, lab automation systems, and general helpful developer tools.

This is also time where we work with Microsoft Research to productize their work.   We have quite an active program to do this – MSR and product teams work very well together.   My team has an MSR project already queued up.

We could not have included many features in Windows without considerable prototyping time. Prototypes are most often the idea of a single person, or a small group of people. Program mangers often come up with great prototyping ideas. Prototyping ideas almost never come from management saying “Hey guys, go prototype this thing” (but that does happen sometimes).

In addition to prototyping features, there is a rich culture across Microsoft of building helpful software and making it available to other people in Microsoft.  We have quite a nice in-house system for sharing tools and code.   Our external CodePlex.com site is based on the internal system.   This all started out as ad-hoc stuff.

If people don’t want to spend time prototyping or writing tools, they can simply use that time to teach themselves new things.  For example, my WPF posts were done based on such time. I also taught myself MVVM.  This was really handy because all our current projects use WPF and MVVM extensively.  This time helped me prepare for our current projects well.  Note, this wasn’t time I spent at home.  This was all done at work.

In summary, there are times in our product cycles when people have quite a bit of discretionary time.   Way more than 20%, often close to 100% for weeks. This is deliberate.  We use this time for prototyping, thinking, experimenting and learning. Many excellent product features come directly out of this fruitful time and efforts.  Most of this work is done at the grass roots level and determined by individual contributors or small teams of people with like interests and passions.   This is not a new thing.   The Windows organization has worked like this for a long time.

评分

参与人数 1积分 +3 收起 理由
dalaohu + 3 cool thx

查看全部评分

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部