• Jenkis text parameter 如何使用 at 2013年10月16日

    学习了

  • 10 号地铁站金台夕照站附近

    具体地址:北京市朝阳区景华南街 5 号远洋光华国际 C 座 10 层

  • Google 最近内斗得厉害 重要部门几乎全被印度阿三接管,zz

    重新洗牌,大批中国科技民工被排挤了。 基本上博士毕业 5 年以上的,正想轻松点,就被甄别遣散了。 麻痹的股沟,还不让发 paper, 博士后 5 年啥也没攒下。 在股沟干了 5 年马工,resume 上也不发光了。 就像天上人间干了 5 年,接客无数,只要没升到鸡婆,就没有任何剩余价值了。好多二逼还以为加州好,好个球。

    上有米犹收税,下有老黑劳模吃福利。 乌洋乌泱的大群三三们,把 IT 业控制了,老中连个面试都捞不到。 麻痹的难西.屁落稀这个米犹的臭婊子,极端反华,加州这么多华人居然就不能把丫扳倒。 真废物。

    麻痹的龟公鬼婆养的娃,学校里面学回来一口印度腔英语,syndrome coding, veli good. 尼玛,还以为都是格蕾丝高下的崽儿呢。

    印度码农日子比中国码农好得多啊 美国上千元美元市值的 it 公司

    中国人善于内斗,不善于团结。码农知识分子也是如此

    什么内斗能牵涉到底层码农?

    基本上做硅工,想往上爬也可能性很小吧

    你可能不懂老印是怎么玩的,mitbbs 能瞎说吗? 老印是只要一个人升到一个部门的头,那么他的手下就是一堆老印,但部门名额有限,白人还好,不容易欺负。老中这种不团结又存有幻想的软柿子就最好捏,把他们裁了,腾出老印的位置,懂否?

    google 裁人?你说不让升迁,不加工资,让你背黑锅。我都信。 你说裁人,我才不信。

    裁员是指成建制的砍人,砍 team。这种裁员一开始,全公司的 IT 民工都不能办绿卡。哪怕真要赶人,HR 也很少这么暴力。 阿三针对华人的行为都是一个一个来的,叫 let go。 中高级经理都是他们的人,大部分同事不是印度人就是对印度人有好感的美国人。你几个中国人考核被黑一下太常见了。针对你刁难你也没有任何难度。

    Google 重要部门几乎全被阿三接管 Nikesh Arora - Senior Vice President and Chief Business Officer Sridhar Ramaswamy - Senior Vice President, Ads & Commerce Amit Singhal – Senior Vice President and software engineer (Principal Scientist, Search) Sundar Pichai – Senior Vice President, Android, Chrome & Apps Vic Gundotra - Senior Vice President, Social (Google plus,Hangouts, etc.) Krishna Bharat – Principal Scientist (User interface and algorithmic support, creator of Google News) Manik Gupta – Group Product Manager, Google Maps Lalitesh Katragadda - creator of Google Map Maker

    白人和华裔是不是更喜欢自己做老板一些?

    阿三非常抱团儿,微软的阿三比例也奇高。

    北美华人创业率不如烙印

  • Jenkis text parameter 如何使用 at 2013年10月14日

    其实让研发每次修改、提交一个文件到 svn 中也不是难事;而且每次都有记录

  • 高帅富啊

  • Accurev 真的那么差么?


  • My company ha been using Accurev since early 2010, coming from StarTeam before that and CVS in the very distant past. I haven't used CVS (having been on a different

    team at the time) so I have no comparisons there, and I never bothered to learn StarTeam too intimately.

    Since then I've also played with both the CLI and Tortoise versions of SVN, Git, and Mercurial (Hg) in my free time. I plan on giving Git a more thorough go at some

    point, but I found Hg to be much more intuitive and easy (at least under Windows). Anyway, like I said management saddled us with Accurev and after spending time to

    get fairly well acquainted with it (GUI and CLI both) as a developer... I absolutely hate it.

    Someone earlier in the thread summed it up as software written by devs that had read about SCM in a book but never used it... I agree whole-heartedly but you also

    get the feeling that they had the same level of experience with GUIs, efficient processing, etc. (In fact, I see that Accurev has a new product called "Kando" based

    on Git...sounds like they've finally realized how bad their model is. But to quote a coworker "I wouldn't trust anything written by the same team at this point"... I

    have to wonder if it is a coincidence that there is a baby-wipe product named "Kandoo"...)

    Ok, obviously I don't care for the product. If you've spent the time to read this thread, then obviously there are quite a few folks with similar views on it. But I

    wanted to share some of my own gripes that I've had with it over the last few years as well -- btw if it helps anyone, I think we were using v4.7 previously and have

    been on v5.3 (?) now for quite some time.

    My biggest beef with Accurev is how horribly slow and inefficient it is. Notice I didn't use the word GUI -- I've tried both GUI and CLI-- the slow parts are on the

    server, so you're screwed either way. It seems like I see one of those damn modal dialog/status bars at every turn... I switch tabs -- bam!: processing, please wait.

    I reparent a stream -- oh wait just another minute. For "Updates" I expect it to be a little slow (although sometimes it gets annoying when it screams "Overlap" [aka

    a conflict] at me when I happen to have a file with IDENTICAL content to what it's pushing down). I change directories browsing to a path... processing, processing,

    "oh you want to go down one more sub-folder"... let me process that some more. You get the idea.

    Is that my only beef? Hell no.

    1) For the merge tool, I've had the "ignore white space" option checked for years, but I can only ever recall it working ONE time (for example, say we're talking

    about about comparing say 2 versions of a JSP where I converted spaces to tabs or trimmed some trailing white space or something). Why is this an issue? Because it

    becomes pure torture for every other developer that looks in the history and wants to see what REALLY changed. If they can't get implement this correctly, don't put

    the F***ING option there. (Note:using WinMerge as an external compare tool, with appropriate settings works fine)

    2) I've had instances where checking a file into one stream and then needing to put an IDENTICAL copy of that same file into another stream (using the same issues #)

    causes it to throw a temper tantrum. If I use the wrong issue #, it goes in with no problem. This is probably an isolated case (and maybe due to other poor process

    decisions my company saddles us with) but I thought I'd mention it for completeness.

    3) The history? All stored on the server. Translation: If you enjoyed waiting for it to switch tabs, create/reparent a workspace, and update then you're in for more

    of the same when you want to view history.

    4) The way it's exclusionary rules are done is not only terrible but also pathetic. Under Windows, you actually have to create an environment variable where you can

    create some exclusions to files that you don't want to show up. IT DOES NOT SUPPORT REGEX. I've seen several other SCMs that offer much better approaches (I'm fond

    of the the ignore files used in Hg. I think there is something similar in Git too) -- not only are both regex and glob patterns supported, but defining this in a

    FILE is more system-friendly and much easier to edit that putting it into an Environment variable. Not only that, but it seems that the ignore filters are iffy at

    best. The way our projects are defined have the build folder under the project folder (which is source controlled) and trying to exclude all folders under the the

    build folder doesnt seem to work -- most of them still show up in my "External" filter even after setting up rules.

    5) It's check-in process (a "Promote") also seems to run with the theme of slow and inefficient. We use an external ticket system (not AccuWork... our ticketing

    system has its flaws but after using AccuRev, I can't image that product to be much better). Anyway, when we say "Promote [this file]", first it pops up with another

    modal dialog (after the required waiting, while it does more stat processing), then it presents a list of ALL tickets it has pulled (there are a lot...too many to

    reliably find anything). Next, we must enter our ticket number from the other system, and wait some more while it takes forever to find a match (I thought it already

    pulled the list...geez). Finally, it will display the matches, then we pick one and tell it to promote using that ticket number. After yet some more waiting, we're

    finally done.

    I could go on but I'll stop there.... this post is getting too long. Instead, let me sum up Accurev in my own way: After having to wait for all these slow annoying

    "Stat processing", etc dialogs during an issue where we were trying to quickly get a fix out, I came up with a new slogan for them: "AccuRev: when seconds count,

    your fix is only minutes away".

    Since management won't get rid of Accurev (I know they won't go for anything without Enterprise support but I've begged for them to consider anything else:

    SmartGit...Kiln...Perforce...), I have been using TortoiseHg to locally version control my files (in addition to Accurev). It is a little more work. But for those

    saddled with Accurev, it makes life so much easier. You get: better diff management -- MUCH MUCH easier to see and review code changes after an "accurev update", the

    ability to view some history without waiting 10 years for the server, ability to share directly between you and another dev (assuming they also install it), ability

    to revert/restore your changes if you accidentally wipe something out while trying to get clear of Accurev's merge hell ("Overlapped" files), and even more if you

    can get the rest of your team using it.

    EDIT: Forgot to mention, during a conversion with our build engineers I was told that while Accurev has a Java API that you can develop for, it apparently requires

    purchasing some sort of additional licensing. I can't confirm this since a) I can't find pricing anywhere on Accurev's website* and b) I doubt like hell they'd tell

    me at work...

    *Kinda weird considering I can find some sort of rough pricing for Perforce, Kiln, StarTeam and SmartGit quite easily. I usually get a sketchy feeling when some

    product won't list any sort of price up front, guess it shouldn't surprise me too much that Accurev falls into that category...


    I've just come across this discussion and thought I would share our experiences with AccuRev.

    We have been using the Dimensions SCM from Serena for around 8 years. Two years ago we had a major problem integrating our India based Development team with our UK

    Dev team. It was clear that we were not going to meet our needs with the current system and hence we set about evaluating a number of options. I discuss all of this

    in this article How We Integrated Our Offshore Dev Team.

    Our experience of using AccuRev has so far been very positive.

    It is easy to setup and administer. Users are able to get going very very quickly (especially important for the India dev team) We've never had a problem with speed (in fact this is one of the main plus points for us) The replication works like a dream I do agree that the UI can be a bit clunky (especially the Unix client). I am hoping that it will be better in the latest version when we update to that next month. All in all I would say that this was one of the best decisions and purchases we have made.


    compared to serena, anything is good... – Tim Jun 29 '10 at 15:39

    I have used Accurev for one year. I don't like it. Here are some problems I encountered:

    1. Its GUI is terrible: it's so slow that each time I switch between tabs (streams and workspaces) or perform some actions I have to wait for several seconds. It

    sometimes gave you a confusing error message that could not help find what's wrong.

    1. It has so many concepts that you have to spend much time learning Accurev itself.

    2. I once encountered such a problem: I have a version controlled file modified by our build process. Later my teammate moved that file to other location in his

    workspace and promoted the change. When I run "accurev update" it simply told me "some file has been moved" and everything looked normal. But actually the command

    stopped at the moved file and no longer updated other files. It's very confusing - your update command did not update the worksapce but you have no idea about it.

    The only outputed message "some file has been moved" looked just like other verbose output. It did not tell me my update failed or aborted or something else.

    Before that I used SVN and ClearCase. SVN is a great tool, simple and easy to use. And I did not have so many complaints about ClearCase. Accurev is really

    frustrating...

    http://stackoverflow.com/questions/19201/accurev-scm


  • After 4 months, my very negative opinion hasn't changed at all. While Accurev has some very nice concepts, the slowness and complexity far outweigh the advantages,

    at least for us. Aside from the usual complaints about the GUI and the obscurity of a number of features, one of the absolutely most annoying faults is how many

    hoops you have to jump through just to update a workspace, made much worse by the inability to update only one directory (or directory tree).

    A typical update consists of waiting a loooong time to be told you have overlaps. Of course, you aren't told what the overlaps are. So, you have to do an overlap

    search, wait another loooong time, resolve the overlaps, do another update, wait a looooong time, and hope it worked this time.

    Some of our remote developers update as infrequently as possible because the update time over VPN is absurd. Granted, we have an enormous number of source files

    across a number of products, and if we reorganized everything we could probably improve performance.

    However, we hired Accurev (at a significant cost) to come in and tell us how to set everything up. Still sucks. Aside from that, we really shouldn't have to

    reorganize the way we work with our sources to suit a source-code-control system. It's a tool, not a business model.

    Lastly, we've been trying out an Accurev plugin for IntelliJ, written by Accurev. It works just as poorly as the rest, and, while Accurev has been very responsive

    about fixing the plugin, we aren't their QA group, nor did we sign up to be an alpha test site (yes, it's that buggy). We finally gave up and wrote our own plugin

    that actually works.


    Some technical details to set your opinions into perspective would be nice. Accurev has its faults, but I really can't see how it's so slow or so buggy or so complex

    as you imply. Are you using accurev over a modem dial-up connection or what? – Martin Ba Dec 14 '10 at 15:44

    We've been using AccuRev in my company for a while, and I've come to the conclusion that it's a very immature SCM. I've personally found a number of bugs in it. Not

    just bugs from "this option doesn't work" or "this isn't user-friendly", but bugs at the level of tracking source code incorrectly, including such a bug today

    involve moving files and still tracking the old location under the same element ID. I would recommend anyone to use a different SCM. – Bob Bell Jan 29 at 23:32


    I've been the SVN and Accurev administrator for a time. Accurev took a long time to grow on me - about six months, but I like it now for a corporate enterprise

    environment. Here's a few things to consider.

    Pros:

    Personal code history The code changes are kept on the server when the users performs a keep. The keep is personal to the user and doesn't distribute to other users until a promote

    command is issued. The code performed by a keep is kept on the server and available even if the user performs a revert operation. In most cases, promoting the code to higher streams for distribution is fairly simple. Administration is fairly simple Installation works well Performance is much improved on version 5.3 which changed the backend to a PostGres database The CLI is rich and extensive Cons:

    A real clunky user interface Resolving overlaps can be complex, just like conflicts in SVN However, like any complex tool, your appreciation will increase the more you understand and know about it.


    The sort answer: Use the latest SVN server and SmartSVN (the community edition is free) as a client. You will not pay anything and you can get everything you need.

    The gory details: BTW the feature of imposing the change management rules during checking is trivial to write as a SVN hook. We did it in a couple of hours, in one

    hundred lines (or thereabout) of code - it works wonderfully and never broke. It integrates SVN with Bugzilla and imposes rules such as:

    In order to commit you have to enter a message In order to commit you must have entered a Bugzilla ID that is in a "Valid" commit state. ... and so on, you can build your own rules to your heart's content Accurev seems to be marketware to me ... lousy GUI client ... very slow (we had to upgrade the HW to make it actually work effectively), and of course ... you have

    to pay for it! Ah yes, if you do use it, I hope that you do not have to replicate your server between some place in the US and some place in India :)

    Perforce is more robust but it is not very easy to administer. In any case, it is a superior product in comparison to Accurev.

    VSS and stuff like that should not even be considered as "version control" systems when it comes to writing professional software (typically, enterprise software) in

    the 21st century. That's like writing your reports on a typewriter ;-)

    If you know what you are doing (with your software) then SVN will be a robust and efficient solution for you. With (at least) two robust and efficient revision

    control systems in existence today (SVN/GIT) there is very little room to justify working with a proprietary solution; some reasons could be "inertia": you have it,

    you don't care paying for it, and you didn't have any major issues -- in other words, it works for you.

    I use SVN everywhere, when it didn't exist I was using CVS, and before that ... no I am not going to tell you how old I am ;-)

    Hope this helped ...

    Ciao.


    Note: I am an AccuRev user and I like it very much. I have already upvoted a few answers here, and would like to add:

    I've just recently stumbled over this "review" of AccuRev in the book Continuous Delivery by Jez Humble and David Farley:

    [Chapter 14, p 385]

    Commercial Version Control Systems

    (...) the only commercial VCSs that we are able to wholeheartedly recommend are:

    (...) AccuRev. Offers ClearCase-like ability to do stream-based development without the crippling administrative overhead and poor performance associated with ClearCase. (...) To which I might add that I never have used ClearCase, but I am the AccuRev admin around here, and it is indeed very little work to administer. (WRT performance,

    this question might give more insight.)


    We use AccuRev for 4 years already. I hate it very much, mostly because of its horrible GUI. Several years ago AccuRev sent a survey for their clients to fill and at

    the end of the survey there was a field with suggestions. I started collecting things which annoy me the most, and below you'll find what I have now. Unfortunately,

    it's full of AccuRev terminology, but I think you'll get the idea anyway.

    Accurev GUI possible improvements Working with history

    When examining history, a developer most often wants to see diff to previous transaction/version. This should be as accessible as a double click. For example

    double-clicking on file in transaction log could open diff to previous version. Double-clicking on a file in Default Group filter could open diff to backed, double-

    clicking on a file in Modified search could open diff to most recent. That would save tons of time.

    Common experience is that developers rarely open files for editing from within AccuRev. Rather they very often diff files, then revert or promote changes. So double

    click should not open files for editing, it should diff them instead. This may be an option in preferences, so different people may decide whether they want double

    click to diff files or open files.

    It should be possible to select two transactions in stream or workspace history and perform a file diff between them.

    Overlaps merging

    Merging overlaps in a stream requires performing "Deep Overlap" search in a workspace that takes much more time than to search overlaps in specific stream. Then it

    is needed to sort overlaps by overlap stream and merge only those from specific stream. There should be more convenient way to perform merging overlaps in stream.

    For example ability to limit deep overlap search by specific stream and do not show overlaps in parent streams. Limiting Deep Overlap search by timelocked stream is

    not very useful if you are several streams under this timelocked stream or there is no timelock on parents at all.

    Now there is a simplified way that involves creating change palettes, but it is still not convenient. Merge menu item should be available at stream level if there is

    a workspace under that stream that may be used for overlaps merge.

    Annotate tool

    Annotate tool is very awkward:

    unable to search for text; using slider at the top to browse different version resets position in the file that is VERY annoying for large files; should be able to open history at the specific transaction directly from annotate tool. Now developer needs to remember transaction# and search for it in stream

    history (also need to search for the stream where transaction was made). Stream Favorites

    Context menu item "Add to stream filter" was removed when new stream favorites were introduced. It should be possible to right click on stream and add it to one of

    the stream favorites (2nd level context menu, or dialog may pop up). Now it is very annoying to edit stream favorites, particularly when you need to have 2 similar

    sets of streams.

    Stream browser

    It should be easy to copy stream name to clipboard. Now you need to open "Change stream" dialog for that. Ctrl+C in stream browser could copy the name of selected

    stream to clipboard. There is no way to copy stream name from stream view. Right click on tab could copy stream name in clipboard, or show context menu with "copy

    stream name to clipboard" item in it.

    Diff and merge tool

    Shows only the first different character in line, not the whole line difference, does not highlight syntax. Luckily, diff tool may be easily switched to external

    tool, so this is minor.

    Other suggestions

    Option in preferences to enable Multiple columns sort mode by default. It would be nice to save not only the latest keep/promote log, but at least 5-10 older ones. File extension column in stream or workspace view with ability to sort on it would be great. Reordering tabs would be nice. Very small font in keep/promote/lock message under Windows, it's unreadable. Increase the font size or allow user to change it. Implement more convenient way to locally ignore files, environment variable is not very useful (user may want to ignore different sets of files in different

    streams/depots). For the last 2 years AccuRev added 2 things from this list (I removed them as they are already implemented):

    Hardcoded (can't be customized) keyboard shortcuts for most actions Made it possible to call diff for several files from transaction at once (before that one should have to right click on every file and call "Diff to previous

    version" from context menu. Besides GUI there are fundamental flaws in AccuRev in the whole:

    Difficult to update backwards

    You can't easily update backwards. There is accurev update -t command, but if you updated to transaction 100, you can't update to transaction 95

    using accurev update -t 95. In order to do that you need to set up time lock on your backed stream (which will introduce transaction in AccuRev) and update your

    workspace.

    Deep Overlaps

    When you update you may happen to have invalid state of sources without any notice. This is because Overlaps feature. Overlap is basically a conflict (when file is

    changed by both you and them). If you have overlap in your workspace, you'll need to merge it before you are allowed to update. But if you have overlap in the

    stream, under which you have your workspace, you won't have any notice about that, but overlapped file won't be updated in your workspace. Consider the following

    stream structure

    [Depot Root] <- [Team stream] <- [Your stream] <- [Your workspace] Let's say you changed foo.cpp and promoted it to [Your stream]. After that someone from your team changed both foo.h and foo.cpp, let's say added method to the class

    Foo, and promoted the files to [Team stream]. After you update your workspace, you'll get new version of foo.h (because you didn't change it), but you won't get

    foo.cpp because it's overlapped in [Your stream]. So, your update will go clean, but linker will complain about unresolved symbol Foo::NewMethod if you try to build

    after that.

  • I have used ant tasks (since 2002) and integrated Accurev with CruiseControl without any problems. Moving stuff is easier with Accurev than with any other SCM I ever

    used (identity is not pathname based). I find the streams the best thing for Agile - continuous code integration is a snap! – Chris Boran Oct 10 '08 at 2:14

    My current client uses Accurev for SCM and after a few projects using a DVCS like Git or Mercurial, I can honestly say that using Accurev is about as enjoyable as

    closing your face in a car door.

    The GUI for Mac and Linux is god awful slow. You can forget using the refactoring support in your IntelliJ or NetBeans IDE, if you use Accurev...that is unless you

    are going to write your own plugin.

    Oh yea...let's not forget about this little chestnut ==> evil twin.

    On a positive note, it could be worse...it could be Clearcase.

    +1 oh yeah, the evil twins. – Justicle Mar 23 '11 at 23:54

    +1 for the humour – Barry Jun 11 '12 at 15:20

    +1 for the evil twins : just wait until someone creates a directory called "foo" while someone else creates one called "FOO", and Accurev complains AFTER it has

    allowed it to happen, and it has subsequently allowed files to be checked in under both, that it's not allowed. Now try unraveling that mess. – Tim Aug 21 '12 at


    We've been using AccuRev for a few years now. It's a serious improvement over our last tool (Razor) and while I'd recommend it for others- it does have a few

    drawbacks.

    Benefits:

    The stream based interface is quite intuitive. I make snapshots every second week and have a number of ongoing development streams branching off the snapshot. Moving changes between stream is really easy, just select the change, send it to the "change palette" and select the destination stream. It guides you through all

    the files that need to be merged. The command-line utilities are great. We've managed to script most of our release generation around it. Integrations for Visual Studio, Bugzilla, etc... Drawbacks:

    As monjardin pointed out, the client GUI can be slow. I use the windows version for all my history/stream searching since it's much faster than the X11 one. Of

    course, the GUI's written in Java so performance obviously wasn't their first concern. It's starting to get slow for really large databases (I'm talking over 300,000 LOC), although they've apparently addressed it in today's release of 4.7. We opted to go with the cheaper license and not get the change packages feature (I can't see them working that well anyways, as the entire idea of promoting

    individual changes flies in the face of continuous integration). So far it hasn't hurt us.

    Overall, for the price you pay it's a nice tool. We evaluated ClearCase, MKS, Spectrum and Subversion during our trial period. Subversion may have been a good

    choice, but it was still pretty green when we were evaluating. I've never heard of Plastic before, but I regret not evaluating Perforce.

    Also, I understand that the engineers over at Trolltech (makers of Qt) have recently switched to git. I'd be interested in checking that out as well.


    One of the best days I've ever had at my current job is they day we ditched Accurev and moved to Subversion. Accurev uses overly complicated concepts. Like one of

    the commenters above, after working with it for years, I still didn't understand the different states that artifacts could be in. It seems that Accurev's greatest

    asset is its whitepapers and stream visualization, both of which are v appealing to management but does nothing for developers. I use Subversion, Mercurial and Git

    for various projects and would recommend these tools over any other.


    Recommending Subversion and Git in the same sentence is ironic :) – Benjol Apr 8 '10 at 8:34

    I've been a long time Accurev user, and have recently moved to a job where I'm using Perforce. I gotta tell you, I wish I had Accurev back. I do agree - the UI is

    slow and has problems.

    However there are some truly AWESOME visualization tools in there. I can't believe that anyone would look at the version history browser and not fall in love! The

    stream browser is a great simple tool to understand what is going on in your development organization.

    Also, dirt simple to administer. Accurev is actually one of my favourite tools.

    Chris Boran


    Another big thumbs down for Accurev. Every simple operation seems to become so horribly complex - cryptic error messages send you scattering to manual, only finding

    theoretical explanations about concepts that shouldn't have existed in the first place.

    UI is so slow and unresponsive it makes you want to gouge your eyes out.

    Stay away.

    Benjol


    Put me in the anti-Accurev camp. We moved to it recently, and it's been horrible. We have a number of quite large projects, and Accurev seems to be almost unusable

    for the quantity of files we have. Over a VPN, forget it. It takes forever to update, the cross-stream management doesn't work in any intuitive way, the UI is

    complex and slow.

    Additionally, support for it in a number of tools we use is either non-existent or poorly implemented.

    Add the various bugs that keep popping up, and I'd say we wasted a great deal of money for something that is done much better by open-source software, such as

    Subversion. We still use CVS for some projects, and even it is so much better for normal operations and workflow that I'd pick it over Accurev.


    Two months later, has your opinion changed at all? – Benjol May 12 '10 at 8:36 1
    You raise a few good points but a statement that CVS (or subversion for that matter) is better than AccuRev is plain ridiculous :-) Btw. "large" is really a crappy

    quantity to criticize anything. Since you wrote your answer in Feb 2010 I am also very curious what "horrible" bugs you encountered - seems to run well enough for

    us. – Martin Ba Dec 14 '10 at 15:01

    Martin, we've encountered problems ranging from usability, to incorrect data being reported, to actually tracking source code changes incorrectly. That includes an

    issue just today that broke our build because a moved file was still being identified at the old location as well as the new. CVS isn't as featureful, but at least

    is isn't buggy. I'm not a huge fan of Subversion, but at least it's better. (BTW, in our company, large is 100's of thousands of files and millions of lines of code)

    – Bob Bell Jan 29 at 23:37

    Accurev has some great concepts; but suffers from: 1) many many inconsistencies in the command-line interface. 2) many bugs and nuisances in the application/interface. E.g. their time-safe property is not actually time-safe at all because of several bugs that affect snapshots

    and pass-through streams. 3) major bugs in critically important features... As above; time-safe bugs; bugs in merging by issues. 3) they are a year behind where they should be, because they

    wasted a whole year on trying to move their backend to a database - this will be version 5 which may never see the light of day. 4) The marketing is excellent; but the product does not live up to the marketing hype 5) every release has had major critical bugs that has required them to release immediate hotfixes. This has been a major disruption for us. And these aren't minor

    bugs. 6) doesn't scale well... takes up a huge amount of disk space and gets slower over time

    Having said all that; it's still a good product; but if I were to do it all again I'd consider git instead.

    Bob


    At a previous employer we reviewed Accurev and Plastic SCM. At the end of the day, I was not impressed with Accurev's interface, or the so-called "streams". We went

    with Plastic, and nobody complained.

    @Jonathan The streams are interesting,but I don't see how any version control can magically avoid collisions when two people touch the same code in the same file.

    Accurev's model was intriguing, but at the end of the day, nice clean branching and merging with a drop dead easy interface made Plastic the choice for us. Plastic's

    timeline view (I forget the actual name), showing the branch/merge/check-in history made it very simple to review the history of the project from a bird's eye view.


    @Steveth

    The Interface is lousy...However the streams model is very innovative.

    Being able to create a stream for a new project off the trunk stream, and having 5 developers working on it, and not having any form of merge collisions when we

    merge that stream back into the main trunk is unheard of, yet it works well in Accurev.


    IMO, the Accurev's streams are nothing conceptually different from conventional branches, except for the really good workflow of using them, which is dictated by the

    documentation, community, and silently assumed by UI. You could actually arrange exactly the same continuous integration workflow in any other branching SCM; nothing

    in Accurev actually forces developers to not deviate from it. – ulidtko May 23 '12 at 16:53 up vote 4 down vote Well, all I can say is that I completely agree. The back-end is great but the UI sucks. The stream functionality is great because it makes merging no brainier as all

    changes from parent streams are automatically propagated to all children. I wrote a post about Accurev UI that explains most of the shortcomings I've come across for

    last 2 years.


    @Pawel, have there been any significant improvements in the almost-two years since you wrote your post? – Benjol Apr 8 '10 at 8:36

    I stopped using AccuRev at the end of 2008. I don't know what the current state of it is. – Pawel Pabich Apr 8 '10 at 11:27 up vote 4 down vote It's anti Agile tool, because:

    Main idea of Accurev is to use different streams for different teams, so, changes made by team1 won't affect team2.

    Sounds good, but in a real world we all know that at the end we'll merge code from both teams and believe me it's nightmare in Accurev. More changes your teams will

    do in their streams - more time everybody will spend on merging at the end.

    It's the same if every team will do their development in separate branch using SVN and trying to merge everything after 1 month of development....Basically Accurev

    creates late merge price and you gonna pay this price for ever if you'll choose Accurev for more than 1 team.

    In order to fix problem created by 1 point peoples decide to refuse from cross functional teams in favor of functional. They even provide another argument to support

    this idea : "knowledge expertise" principle.

    In other words when you don't have cross functional teams (and Agile as well) it's easier to have experts for particular part of the system, so they will do better

    code review and will act as "information/design/implementation experts".

    All of us knows that information expert is antipattern not only in Agile, since it's better to spread expertise in order to avoid knowledge bottlenecks in

    organization.


    I used AccuRev at a previous job and didn't have any problems with it, but I very much prefer Subversion (even without comparing the price difference). I remember

    the client GUI being pretty slow too. Also, I do recall that the GUI just called their command-line utilities to interface with the repository. So, it probably won't

    be that hard to use those interfaces for your DIY tools.


    Accurev is simply the worst tool I have ever used.

    Subversion is very good, esp if you are migrating from cvs.


  • 同关注

  • 弄个大硬盘是王道

  • 更新 svn 自动上传 ftp at 2013年10月09日

    仅供参考

  • 这是 @ 恐龙 的问题, 来补充下后续进展

  • 上海招聘配置管理 at 2013年09月27日

    文海是做什么的?

  • 初创团队招聘启事写作指南

    2013-09-26

    刚开始创业的小团队有什么招聘途径呢?无非是发微博自曝,托朋友介绍,上论坛挖宝,找牛人谈心。当然,有效率低到垂泪。

    我在网易干了五年,去年辞职创业,和拍档凭空组建团队,两个月内请回来 4 个资历相当不错的同伴,分别来自博雅、盛大、携程与网易。快速组建蝉小队主要靠一招:啰啰嗦嗦写一封公开邀请函……俗称招聘启事。在我看来这是最重要,也最容易被轻视的环节。

    打招聘广告,首先得分析顾客心理,有可能加入创业的人们会在意哪些条件呢?

    工资福利? 错。在初创团队阶段,能维持原薪加入已经是撞了大运,谁还指望高薪福利?换个角度看,一来就要求高薪与办公环境的人,也不具备创业心态,不适合与你同行。

    期权奖励? 错。国内创业公司少有成熟的退出机制,在绝大部分情况下,期权如废纸。难道还指望千分之一的上市概率?有这运气不如去买彩票算了——天真烂漫,才会醉心于期权的承诺。

    发挥空间? 错。这话也只能哄哄入行不久的小孩子。由着自己折腾固然是件好事,那也得看是折腾什么,是大展身手与抱负,还是在泥坑里徒劳地弹跳。

    挑战与激情? 错错错。我一直觉得在招聘时大谈创业激情是件挺蠢的事情,人家又没处于发情期,看见你有激情就直往上蹭;也不是考试狂,非得来你这里攻克世界难题。工作是否值得他去挑战,是否值得他与创始人一同付出激情,这才是关键。

    但大多数招聘启事却把关键之处一笔带过,单单把梦想、激情、挑战、空间这些创业代谢物拿出来讲,好像招聘方嗑了药不停甩脑袋,自嗨无比。

    说说我认为招聘启事中应该重点着墨的部分吧。

    首先是项目方向,这是一个什么样的产品项目,针对什么市场,什么用户群,想解决一个怎样的问题。这个问题是否值得为之奋斗,它的难点在哪里,你的解决思路又是什么。整个方案当然不必和盘托出,但也得让别人基本能理解你想做什么。只有当他觉得 “这事儿有点意思”,才有机会进行下一步的接触。

    在你苦苦寻找初创团队成员的时候,这个世界上也有许多人在苦苦寻找自己喜欢的项目。就像大龄男女征婚,互相遇上不容易,你既然贴出来了征婚启事,总得放几张高清近照,告知身高、职业与收入情况吧,总不能仅仅说 “我真的很有诚意结婚”,人家就跑来跟你约会。再说还真没什么好保密的,构想是最不值钱的东西。等你把产品做出来的时候,会发现跟构想差了十几万公里,很可能除了方向一致,早已面目全非。

    话说我还没决定创业时,不少初创团队找过我入伙,大部分讳莫如深,报上一个含含糊糊的产品方向后,单刀直入问 “有没有诚意往深里谈”。可我连你做什么都不了解,哪里来的诚意呢?对方便叹口气,飘然而去,留给我无尽空虚……拜托,初创团队并没有大公司光环,你最大的招聘筹码无非是想做的这件事情本身。谁有耐心陪你猜哑谜?大大方方亮出筹码才能引起对方的关注。

    初创团队招聘的第二支筹码,就是创始人自己。跟对人,很重要。

    在这个一穷二白的阶段招聘,乙方占尽了主动权,甲方当然要客客气气地做一番自我介绍。我,创始人,我有什么值得一说的资历,做过什么引人注目的事情。最好附上能代表自己个性与见解的个人微博,博客,显得诚实可信。

    接下来可以说说创业氛围,与大公司刻板僵化的环境针锋相对。但氛围这种事情是空口无凭的,为了使自己看上去不像个喷子,不妨加入具象化的描述,比如: -无限量免费饮料零食供应 -有神器飞利浦空气炸锅加持,每天都做下午茶 -有一只团队宠物,也欢迎大家带宠物上班 -迟到要洗碗 -卖萌是受欢迎的,吐槽是每天都会发生的

    从这里也可以看出来我对招聘文案的倾向性:少用形容词。因为 “态度” 本身是很虚的东西,它可能是无限浮夸的,也可能仅仅是你高估了自己。务实的文案应该突出事件、行为、方案这些客观存在的东西,少甩着头自嗨,觉得三观无比正——老兄,你怎么证明这一点?还不如贴张图说行政妹子三围无比正,更能吸引人心生向往。

    在招聘启事最后讲的是一些细节,比如团队构成,判断他在团队中所处的位置;融资情况,计算项目风险;产品进度,对接下来的安排大致有个底。直到对方掌握了足够多的信息,足以下一个初步的结论:这个初创团队是否值得我去接触一下。

    实际上,以上都只是大路货,并无神秘之处。几乎每个创始人都知道这些,但他们往往把信息放在 1VS1 的交流中去讲,而不是写在告示里,公诸于众,也就错失了大量潜在的适格者。因为两个人对上眼的概率真是很低很低的,广撒网才能捕到鱼,通过传播招聘启事去扩大信息接触面,才能邂逅更好的同伴。

    这时有人提问道:你啰啰嗦嗦写这么多,谁耐烦看啊?答:如果连看完这份招聘启事的耐心都没有,对有可能改变职业的机会抱着轻慢的态度,说明他并不是我们需要的人,互相都不必浪费时间。

    又有人问道,你这个态度是不是诚恳得过了头,哪里像是在搞招聘——抢答:没错!你在初创团队做招聘和谈融资就应该是同一个态度。我接触第一批同伴的时候,正是拿出完整的融资 PPT 去讲解,只删掉了关于融资金额的最后一页。换句话说,我跟 VC 和应聘者讲的是同一份内容,顺带也当作融资谈判的现场演习。

    如果招聘方能放下矜持之心,转而以求职的心态去做招聘,把 “我提供一个职位,寻找适合的人选”,改成 “我有一个项目机会,希望能得到你的认同”,便会增加招聘这件困难之极的事情的成功率。想想你的求职简历怎么写,招聘启事就应该怎么写,思路上是一脉相承的。

    这些花招,我在大公司待的时候反而使不出来,公司背景限制了行文风格,也没有值得夸耀的自由氛围。更重要的是……我就没觉得那时的项目很有吸引力,只是分管这个部门,总得给自己找点活儿干,也找点干活儿的人。结果我在创业前两个月收到简历的数量和质量,都远远超过了在网易做产品总监那阵子。不要低估人才对 “加入好项目大干一场” 的渴望。

    所以对人才的争夺,实质上是对你的项目进行营销包装。如果项目一开始就能吸引到人才,接下来吸引融资,吸引用户,也都会顺利许多。反之,招聘困难的项目同样会举步维艰。从起手式中便能预见未来。

    创业,从写好一份招聘启事开始。

    最后放出蝉游记最新的招聘启事 (多个职位),既作为写作参考,也算是夹带私货。转载这篇文章的科技网站,别删我的招聘链接,不然我跟你急…… http://firecacada.blog.163.com/blog/static/707437620138252491850/

  • 大家在这方面有没有心得?

  • 历史见证承诺,品牌铸就成长,服务凝聚价值,视野成就未来。 “依托技术进步服务创新 推动彩票事业健康发展”。对于彩票行业,技术平台的支持与保障已成为不可或缺的重要因素,技术进步和专业服务对彩票业务的价值日益凸显。 中体彩科技发展有限公司成立于2002年12月24日,作为由国家体育总局体育彩票管理中心联合全国 31 个省(市、自治区)体育局共同成立的国有股份制企业,致力于成为国际一流彩票业信息技术与运营服务专家,以自主研发的中国电脑体育彩票交易系统为体育彩票事业的长足发展提供强劲动力,全面承担中国体育彩票技术系统的规划、研发、运维及乐透型彩票市场运营服务工作,并被确定为中国体育彩票信息技术总集成商。 公司自成立以来,经过八年的持续改革与创新,人员规模与业务领域不断扩大:由成立初始的二十余人发展为目前的三百多人,形成了一支对体彩事业高度认同、专业素质高的体彩信息技术和运营服务团队;作为体育彩票技术服务总集成商,公司主营业务包括体育彩票技术咨询、方案设计、系统研发、运行维护、乐透彩票市场运营等,由公司建设的电脑体育彩票交易系统,现已覆盖全国 31 个省(市、自治区)11 万多网点,并建成武汉、成都、广州、天津 4 个区域中心。公司目前已成为国内唯一一家国有、内资且拥有彩票行业自主知识产权、全国集中交易系统实践经验的信息技术服务提供商。 公司目前获得的相关资质: 高新技术企业、软件企业、ISO27001 认证、信息安全服务资质(安全工程类一级)、过程改进咨询与软件能力成熟度三级认证(CMMI3);成功申请 1 项专利、15 项软件著作权)。 公司秉承 “诚信、尊重、专业、创新” 的核心价值理念,以诚信为公司的基石,始终坚持内外一致诚信负责的态度与原则,努力为利益相关者创造更大的价值回报;以尊重、平等、开放的态度和共同发展的原则,在成长的道路上公司与员工携手前行;以更加专业、不断创新变革的精神,迎接挑战,保持企业旺盛的生命力与持久的竞争力,更好的引导与促进产业健康发展。 公司努力拓宽优秀人才的发现、甄选渠道,积极引进高素质人才,通过建立以业绩和能力为导向的管理、用人机制,实现了人力资源的合理、优化配置;公司致力于为员工提供更全面、更优厚、有竞争力的薪酬与福利保障体系,让个人的价值得到最大程度的展现;并不断探索、努力构建适合员工职业发展规划的晋升途径与培训体系。 如果您拥有正直诚信的品格、创造性的天赋;如果您想为国家的公益事业贡献一份力量;如果您想加入一个朝阳行业;如果您拥有对自我价值实现的不懈追求与渴望,那么请加入我们,这里将是您实现价值与理想的平台! 体彩因科技更精彩! 中体彩科技发展有限公司诚邀您的加盟!

    公司网址:www.cslc.com.cn 招聘邮箱:[email] hr@cslc.com.cn[/email]

    中体彩科技关键词:国有股份制企业,垄断、朝阳、公益行业,高新企业,软件公司,完善的薪酬、培训、晋升体系,并提供工作日免费三餐,企业年金,全额缴纳五险一金及商业保险等。公司每周都有精彩的篮球、羽毛球、瑜伽等活动——期待您的加入!

    公司网站:http://www.cslc.com.cn

  • 你可以把解决的思路和方法详细说说,如果大家以后遇到也可以参考。

  • 我完全认可的一些经验教训:

    把 SSD[4] 看做是便宜的内存 [5],而不是昂贵的硬盘。当 reddit 把数据库从旋转磁盘转移到 SSD 后,服务器数量从 12 个降低到 1 个,并且还有很多余量。SSD 虽贵了 4 倍,但是你会得到 16 倍的性能,这个花销值得。 给用户一点权力,看他们用来做什么,然后把好的东西转换成功能。对我最大的启示之一是 reddit 从它的用户学到了很多,网站能顺利运作,很大程度上依靠了用户。用户会告诉你很多你不知道事情。例如,reddit gold 在社区里以笑话开始,后来他们把它做成产品,并得到用户的喜爱。 没有必要从一开始就建立一个可扩展的架构。一开始时你不知道什么会是你的功能集,所以你也不知道你有会有哪些扩展问题。随着你的网站增长,你可以了解哪里将是扩展问题。 把未登录用户当作二等公民。未登录的用户访问的缓存内容,Akamai[6] 抗住了着 reddit 的流量冲击。巨大的性能提升。 还有很多,这里是我谈话的注释,我们从早期扩展 reddit 的错误中学到许多经验教训:

    数据统计

    流量大约每 15 个月增加 1 倍。 上个月(8 月份),reddit 有来自 177 个不同国家的 73,293,644 名独立访客,查看了 4,885,611,148 个页面。在大约 10 亿次浏览量时结束了这次谈话。不清楚现在的架构有何不同。 28 名雇员。 每名雇员应对大约 240 万独立访客。(链接) 成千上万的志愿者版主 截至 2012 年,他们有 240 台服务器,支持每月 20 亿页面浏览量和 Postgres[7] 里的 2TB 数据。所有高流量的数据被移出 EBS[8],并上传至本地临时磁盘。

    起源故事

    Reddit 始于 2005 年。他们带着通过文字来点餐的想法去了 Y Combinator[9],结果被拒绝了。回来跟保罗 - 格雷厄姆商讨,想建设互联网网页,这就是 reddit。那时他们并不知道 Digg[10]。 开始在数据中心,然后把功能部分转移到 EC2[11]。 最初在 2006 年开始使用 S3[12] 存储和供应标识。 2007 年为缩略图使用 S3。 2008 年使用 EC2 经由 VPN[13] 通道到数据中心进行批处理。 2009 年 EC2 用于整个网站。传输数据到 EC2 能让网站瘫痪一整天。稍后会谈到著名的数据重力例子。

    EC2

    迁移到 EC2 上的动机 堆叠机架不好玩。不想租用更多的机柜和购买更多的服务器。 增长过快的数据中心,在初期增长是不可预知的。 4 人一组的使用情况下成本是有效的。EC2 比在旧金山的数据中心便宜 29%。 EC2 不是灵丹妙药。你要经受更高的网络延迟和嘈杂的邻居,所以计划好应对方案。好处是你可以按照你所需要的增长。 在 EC2 上跟踪资源限制 所有资源都有账户限制。 亚马逊甚至不知道他们的一些限制是什么。 跟踪限制,并在需要它们之前提出警示。 捕获异常去发现已达到异常。

    架构

    Reddit 的架构很简单。用户连接到跟应用层对话的网络层。应用层跟 memcache[14],Cassandra[15],以及 Postgres 对话。Postgres 使用主从配置。批处理系统使用 Cassandra 和 Postgres。 相比之下,Netflix 使用面向服务的架构,组件间使用 REST[16] 应用程序接口相互交谈。 优点:更容易自动调节,因为只是服务有问题需要调节;更容易计划规模;更容易识别问题,因为它们在 REST 调用背后都是孤立的;缩小变动的影响;更有效的本地缓存。 缺点:需要多个开发团队或工作在多个服务上的开发者,因此你需要更多的人;需要一个共同的平台以防重复工作;对刚起步的小团队来说太多的间接支出。 PostgreSQL 是一个出色数据库。它建立了一个美好的,真地很快的键值存储。 电子邮件是一个很难的问题。很难正确送达。从使用自己的电子邮件服务器开始,但是今天可能会去选择电子邮件服务提供商。 队列是个救世主。组件之间传递工作时,把它放到一个队列。你会得到一个不错的小缓冲区。(Reddit 使用 RabbitMQ[17] 作为消息队列。) 混合 HAProxy[18] 和 Nginx[19]。一些流量被引导到它们中的一个。在尝试 Niginx(遇到故障)后,负载均衡会选择 HAProxy。它进行 L7[20] 负载均衡。Nginx 仍被用来终止 SSL[21],并提供静态内容。

    代码

    框架。从开始使用一个基于 Python 架构的 Pylons[22](Django[23] 太慢了)。Pylons 很容易上手,不过最终因为跟用例不匹配,失败了。对 Pylon 做了很大改动,结果最后使得它难以升级到新版本(现在修复了)。会将再次使用金字塔的(Pylons 的新名字)。 基于线程的事件?基于线程可以提前以排列大小,但大小可能是错误的。基于事件可以处理更多连接。但是当你碰壁时就只能碰壁。你想花更多时间来规划你得线程池大小,还是就突然碰壁? 开源很不错。Reddit 建立在开源基础上。不用为软件付钱很不错,特别是在起步阶段。

    数据

    数据是公司最重要的资产。Facebook,Google 和 Flickr[24] 等公司建立在数据之上。 数据重力。你把数据放在将需要的地方,接近你的应用。思路是把所有你想要的应用围绕在数据周围。数据创建一个重力井,其他东西需要在它附近,因为数据是最难移动的。数据集越大就越难移动。目前移出 EC2 的成本太大了。这就是为什么 EC2 允许你免费导入数据,当你导出时向你收费。他们希望你把你所有的数据放在云中。 关系与非关系。Reddit 里的大部分数据是以键值方式存储在 Postgres。为了处理和更容易分析,一切涉及金钱交易的数据被保存在关系数据库。 Postgres 很稳定。它坚如磐石,他们从未有过自身问题。如果他们有问题,那也是它周围事物的问题,例如用 Python 编写的应用系统。(所以)很难找到 Postgres 专家。 Postgres 被选为键值存储,因为当时还木有 Cassandra。另外,Postgres 的速度非常快,而且现在原生地支持键值(KV)。 分区。写入被分割的四个主数据库:链接,帐户,subreddits[25],评论,投票,以及杂项。 每个都有从属。表决数据库有一个主数据库,一个从属数据库。注释数据库有一个主数据库和 12 个从属数据库。 如果可能的话避免从主数据库读取,而是直接从从属数据库读取,以保持主数据库专门进行写操作。 客户端库将在从属数据库之间进行负载平衡,如果一个从属数据库处于忙状态,则尝试新的一个。 写数据库访问层叫做 “事情”。 这种方法工作了很长一段时间。分片相结合的数据库,读取从属,跟踪阅读从属的负载均衡性能。 Cassandra。 快速写入,快速反查询,简单的增量可扩展性,无单点故障。 在 Netflix 数据被分布在三个不同的区域。所有数据的副本在所有三个区域。即使一个区域丢失了,它们仍然可以运行。 在 Cassandra,切换投票数据是 reddit 的一个巨大成功。Cassandra 的布隆过滤器(Bloom Filters[26])真正激活快速反查询。它能很快识别哪个评论你没有投票,所以否定的回答很快回来。(更多关于这个话题)

    社交

    2008 年 reddit 是开源的 用户可以读取代码,得知他们没有篡改投票。 用户可以添加他们总是想添加的功能,reddit 会接受它。这个行不通,因为人们并不真的想写代码。 招聘。其他人知道这代码,所以更容易雇人。 蠕虫事件。有人想出了如何通过注入额外的 JavaScript 页面编写一个蠕虫病毒。它确实无意,但是失控了。在创始人之一结婚的当天,整个团队乘一架飞机从婚礼回来。但一个用户已经回应了一个补丁,将中止蠕虫蔓延。代码开源,让社区在危机时刻帮了忙。

    Reddit 如何挣钱?

    侧栏广告,自助式广告,商品,reddit gold,市场。 需要注意的是 reddit 是尚未盈利(链接)。这带来了一个问题,像 reddit 这样的网站,什么时候能在云端盈利? 还要注意的是,reddit 已不属于 Condé Nast[27] 了,所以它是独立的。(链接)

    错误

    没有考虑到迁移到 EC2 后增加的延迟。在数据中心,他们有亚毫秒级的机器之间访问,所以进行 1000 次调用来 memache 一个页面负载时可行的。在 EC2 上并非如此。 Memcache 访问时间增加了 10 倍到毫秒级,使他们的老办法也不用上了。修复方法就是批量调用以 Memcache 一个请求内如此大量的服务。 只是承诺。亚马逊并不总是兑现承诺,并围绕承诺工作。绕过故障,而不是试图解决这些问题的设计。(这里没有提到,也许 EBS?) 在生产中使用尖端产品。Cassandra 仍在其开发早期就被使用。现在真的是出色,但那时它是有问题的。 本应该更早卸载很多工作给客户端。服务器做了很多的页面渲染,本应该交给客户端去做。 Facebook 是这方面的大师。你得到一个有很多分区的矩形,API 被调用来填充所有分区。这就是他们起初所希望的 reddit。它本可以扩展得更好。它还有助于调试,因为很容易确定哪个 API 调用出了问题。 不具备足够的监控性,使用的监控系统的虚拟化不够友好。一开始用的是 Ganglia[28],倒是有很好的图形界面,但很难使用,而且变化太快。 数据没有过期期限。 你可以在 reddit 挖坟看早期的评论回复。他们已经开始限制,所以你不能给旧评论投票,或给旧帖添加评论。否则会导致数据随着时间的推移不断增长,使得在数据库保存热点数据的难度越来越大。 没有使用一致的哈希。当哈希到一个缓存,问题是如果你需要添加更多的缓存,你会被卡住,因为所有的数据是在一个或者许多你正在哈希的缓存。当增加缓存时你无法在此平衡。一致的哈希是一种解决这个问题的方法。迁移到 Cassandra 解决了它。

    经验教训

    扩展的关键是在你的用户之前找到瓶颈。 使用代理是扩展的巨大福音。用户可以根据他们击中的 URL 被路由。 Reddit 有一个系统,监控每个 URL 用多久得到服务。人们被放进不同的线路。慢流量去一个地方,快的去另一个。基于平均响应速度的流量分割是一个巨大的促进。 所有的事情自动化。如果你对待你的基础设施如同对待你的代码,你的生活会容易得多。一切都应该自动开启,并自动进行配置。 没有必要从一开始就建立一个可扩展的架构。一开始时你不知道什么会是你的功能集,所以你也不知道你有会有哪些扩展问题。随着你的网站增长,你可以了解哪里将是扩展问题。 刚起步时不要使用面向服务的架构。记住,当发展到中等规模时你可以去实现它;否则只会有太多的开销。 不要跟随潮流。有时候跟潮流是对的,例如 node.js。 给所有东西加个限制。给反复发生的事情设置一个上限,并根据需要提高或降低限制。如果超过限制,阻止用户以保护正常服务。例如为 subreddits 上传文件标识。用户想到了他们可以上传真正的大文件,这会损害系统。也不要接受巨大的文本。会有人 hi 想给你发送 5GB 的文本。 长远计划。在设计时总是假设将有一大堆你在做的。应用服务器,数据库,缓存。总是假定你打算从一开始有一个以上的。这将在未来更容易横向扩展。 用 C 重写 Python 函数。在 reddit 扩展中为获取速度,他们找出 Python 代码里最重复的函数,并用 C 重写。特别是过滤器,markdown 渲染,memcache 调用。Python 的好处是容易和高效地调用 C。 尽可能保持无结构模式。这样的话,可以很容易地增加新的功能。你所要做的就是添加新的属性,而无需改变表格。 数据过期。锁定旧帖和创建一个完全渲染的页面并缓存它。这是如何应对有可能要淹没你的数据库的所有旧数据。同时,不要允许在旧的评论上投票,或给旧帖添加评论。用户很少会注意到。 把 SSD 当作便宜的内存,而不是昂贵的磁盘。 当 reddit 的数据库从旋转磁盘转到 SSD 时,服务器的数量从 12 个减少到 1 个,还有很大的余量。SSD 是贵了 4 倍,但你会得到 16 倍的性能,物有所值。在 Netflix 和 Reddit 上一些最大的 Cassandra 节点都是在 SSD 上,这作出了巨大的改善。 每个工具都有不同的使用情况。Memcache 没有保证持久性,但是非常快,所以投票数据存储在那里,以使渲染页面尽可能的快。Cassandra 持久,快速,并能提供快速的反查询,因为其布隆过滤器,所以它适合存储不在 memchche 里的持久投票数据副本。 Postgres 是坚如磐石而且是关系型的,所以这是一个很好的地方作为备份 Cassandra 投票(如果需要,Cassandra 中的所有数据可以从 Postgres 生成),也做批量处理,有时这需要关系的能力。 将未登录用户当作二等公民。未登录用户登占据约 80%的流量,现在是接近 50%。总是给未登录用户缓存内容,Akamai 承受了 Reddit 流量的消耗。有了巨大的性能改进。附带的好处是如果 reddit 宕机,你不登录的话,你可能永远不会知道。 把一切都放入一个队列。投票,评论,创建缩略图,预计算查询,邮件处理和更正。队列通过监控队列长度允许你知道什么时候有一个问题。附带的好处是队列隐藏用户的问题,因为诸如投票请求的事情都在排队,如果它们不被立即应用无人注意。 在多个可用区保存数据。 避免在单一实例上保存状态。 得频繁快照 EBS 磁盘。 不要在实例上保存密钥。亚马逊现在服务向你提供实例键。 基于安全组分解功能。 提供 API。程序员将会在你的平台上做东西。例如,reddit 的 iPhone 应用程序,就是其他人用公开的 API 制作的。 在自己的社区活跃。Reddit 的用户喜欢 reddit 的管理员在自己网站上活跃,并与他们互动。 让用户为你工作。有用户输入的网站的问题总是有作弊、垃圾邮件和欺诈。Reddit 大部分管理的工作是由成千上万的志愿者来完成的,比如他们处理大多数的垃圾邮件问题。这种方式工作得非常好,是 reddit 的可以保持小团队的原因之一。 给用户一点权利,看他们用它做什么,并好东西变成功能。例如,当添加了给 subreddits 增加 CSS 得能力时,他们看到人们在做什么,增加了许多通用的东西作为大家的功能。这也使得用户能在 Reddit 上做东西而兴奋,因为他们喜欢那种操控感。有很多其他的例子。 倾听你的用户。用户会告诉你很多你不知道但是你可能想知道的东西。例如,reddit gold 在社区里以一个笑话开始。后来他们把它做成了产品,用户也很喜欢。

    译注:

    1. Reddit 是一家美国社交新闻网站 Reddit.com。
    2. RAMP 是一个所有创业者在扩大经营规模前想要参加的讨论会。
    3. Netflix 是一家美国公司,提供互联网随选流媒体播放、在线出租业务。
    4. SSD 即 Solid State Disk 固态硬盘。
    5. RAM 即 Random Access Memory 随机访问存储器。
    6. Akamai 是一家美国内容分发网络(CDN)服务商。
    7. Postgres 即 PostgreSQL, 是一个自由的对象 - 关系数据库服务器 (数据库管理系统)。
    8. EBS 即 exclusion basis system,动态密钥管理方法。
    9. Y Combinator 是一家以投资种子阶段初创公司为业务的创投公司。
    10. Digg 即 “掘客”,或者 “顶格”,美国公司,2012 年被纽约科技开发公司 Betaworks 收购。
    11. EC2 即亚马逊弹性计算云(Elastic Compute Cloud),是一个让使用者可以租用云端电脑运行所需应用的系统。
    12. S3 即亚马逊简易存储服务(Simple Storage Service),由亚马逊网络服务系统提供的在线存储服务。
    13. VPN 即虚拟专用网络(Virtual Private Network),是在公用网络上建立专用网络的技术。
    14. Memcache 是一个高性能的分布式的内存对象缓存系统。
    15. Cassandra 是一套开源分布式 NoSQL 数据库系统。
    16. REST 即表征状态转移(Representational State Transfer)是 Roy Fielding 博士在 2000 年博士论文中提出来的一种软件架构风格。
    17. RabbitMQ 是流行的开源消息队列系统。
    18. HAProxy 提供高可用性、负载均衡以及基于 TCP 和 HTTP 应用的代理。
    19. Nginx 即 engine x,是一个高性能的 HTTP 和反向代理服务器。
    20. L7 即 Layer7,是网络层协议的脚本文件。
    21. SSL 即 Secure Sockets Layer 安全套接层,是为网络通信提供安全及数据完整性的一种安全协议。
    22. Pylons 是一个开放源代码的 Web 应用框架,使用 python 语言编写。
    23. Django 是一个开放源代码的 Web 应用框架,使用 python 语言编写。
    24. Flickr 是雅虎旗下图片分享网站。
    25. Subreddit 是 reddit 上一个定制的子论坛。
    26. Bloom Filter 即布隆过滤器,是一个很长的二进制向量和一系列随机映射函数。
    27. Condé Nast 即康泰纳仕,是一个总部位于美国纽约市的国际期刊出版集团。 Ganglia 是 UC Berkeley 发起的一个开源集群监视项目。
  • 埃洛普被指是微软间谍:死守 WP 将诺基亚逼上绝路

    据国外媒体报道,微软将以 71.7 亿美元收购诺基亚设备与服务部门,加速发展 Windows 生态系统。此项交易预计 2014 年第一季度完成。微软 CEO 史蒂夫·鲍尔默和诺基亚总裁兼 CEO 斯蒂芬·艾洛普还发布公开信,声称诺基亚和微软都将全力投入这新的篇章。

    业界感觉震惊的同时,也感到在意料之中。在为微软感到高兴同时,也为诺基亚这个曾经的手机厂商巨头如此落寞感到悲哀,对艾洛普质疑之声再次响起,此前埃洛普已多次被指责为微软间谍。

    埃洛普加入诺基亚之前,曾是微软企业部门总裁、主管信息工作者、微软企业解决方案和统一通信组。负责开发 Microsoft Office 系统(程序、服务器和基于软件的服务)、Microsoft Dynamics(供中小型企业、大型组织以及跨国企业使用的企业管理软件),微软统一通讯(为企业提供的完全基于软件的通信工具)。 埃洛普上任诺基亚 CEO 后的第二个月便宣布诺基亚全球裁员 5000 人并精简 Symbian 部门的人数,这成诺基亚 10 年来最大的一次裁员。随后,埃洛普宣布对诺基亚实行内部改革,对诺基亚发展进行全新的定位。埃洛普的这一举动直接加速了 Symbian 系统的衰亡,导致 Android 更快崛起。

    在精简 Symbian 部门的同时,埃洛普做的另一件事情则是将前任诺基亚 CEO 康培凯所规划的诺基亚 Android 手机腰斩,并拒绝谷歌发出的 Android 合作。2011 年 2 月,埃洛普取消与 intel 合作开发 MeeGo,并宣布诺基亚与微软公司达成战略合作伙伴,采用 Windows Phone 7 操作系统。

    埃洛普新官上任三把火,将诺基亚推到了更万劫不复的地步,尤其是在微软宣布 Windows Phone 8 不兼容运行 Windows Phone 7.x 的手机后,诺基亚处境非常艰难,销售大受影响。孤注一掷的诺基亚只能再次期望刚刚发布没多久的 Windows Phone 8。

    诺基亚与微软合作充满屈辱和尴尬。在此前微软 Windows Phone 8 发布会邀请函中,海报里的手机打着 HTC 的 Logo,所有人都看到了这位深度战略合作伙伴诺基亚在微软眼中越来越不重要的事实。

    对于当初未采用 Android 平台,埃洛普坚称不后悔:选择 Windows Phone 有助于增加与运营商的谈判筹码:“我们不是苹果,也不是三星所用的 Android,我们是第三种选择。一旦运营商想对手机制造商施加压力,有更多选择的时候,他们会需要第三种选择。所以,从战略上讲,我们仍有机会。”

    现实却是,诺基亚债务评级早已经降为垃圾级,关于其可能被微软收购的传言也是甚嚣尘上。翻阅日历,诺基亚与微软的合作超过 18 个月。而 2012 年第三季度财报中,诺基亚的净亏损依然高达 9.69 亿欧元,净营收较上年同期下滑了 19%。业界对埃洛普的质疑声是一浪高过一浪,要求最多的是便是下课。

    诺基亚前高管 TomiAhonen 甚至直接公开质疑诺基亚的改革策略,激烈指责现任 CEO 埃洛普,称埃洛普的改革毁了诺基亚。前诺基亚管理人员、移动行业分析师 Tomi Ahonen 在其发表的一篇博客文章将诺基亚的进一步没落归结到 “埃洛普效应” 上,他称 “埃洛普是所有行业里最差劲的 CEO”。

    甚至在此前的全球移动大会上,有人毫不留情地质问埃洛普是不是微软植入诺基亚的木马(Trojanhorse),虽然埃洛普的答案所有人都能猜到,不过这个问题也显示了很多人对于诺基亚与微软合作的不满和不解。埃洛普则表示,觉得很尴尬,但自己不是微软卧底。

    让人意外的是,埃洛普在微软内部享有很高的声誉,甚至有观点认为,埃洛普重回微软后,可能成为鲍尔默退休后的微软 CEO 有利竞争者

  • NuGet at 2013年09月03日

    Next, add package files to the Web application’s Packages folder to publish them and deploy the Web site. For more details on how to set this up, refer to the NuGet documentation site, bit.ly/jirmLO.

    For those who want to deploy a full gallery experience like nuget.org, the NuGet gallery code is also available as an open source project via the nugetgallery.codeplex.com project.

    Hosting a private NuGet server or gallery implementation is an easy way to share proprietary code within a company without having to publish it to the public.

    Creating a Package NuGet wouldn’t be useful without any packages to install in the first place. The more useful packages available in NuGet, the more valuable NuGet becomes to every developer. That’s why the NuGet team has gone to great lengths to make creating packages as simple and painless as possible. While it’s easy to create a package, the NuGet team continues to invest in features to make it even simpler. They’ve built several tools for creating NuGet packages. For example, Package Explorer is a ClickOnce application written by a developer on the NuGet team that provides a visual way to build or examine a package. It’s available at npe.codeplex.com.

    NuGet.exe Because most package authors want to integrate package creation into their build processes, let’s look at another approach that uses the NuGet command-line utility. You’ll need to download the utility just once from bit.ly/gmw54b. After you download NuGet.exe, make sure to put it in a folder that’s added to your PATH environment variable. I have a folder named “utils” for utilities like this.

    The reason I say you only need to download NuGet.exe once (well, once per machine) is because it’s a self-updating executable. Just run the following command to have NuGet check online and update itself to the latest version if a newer one is available:

    nuget update –self

    The command-line tool can query the online feed like the Package Manager Console. For example, to search for all packages with “MVC,” use the following command:

    nuget list Mvc

    NuGet.exe can even download a package and dependencies and unpack them, but it can’t modify a project to reference the downloaded package assemblies or run any Windows PowerShell scripts included in a package.

    Creating a Package from a Project Packages contain a single assembly 90 percent of the time (a statistic I made up). This section covers a simple workflow to create such packages using NuGet.exe against a project file (such as a .csproj or .vbproj file).

    For details on creating more complex packages, such as a single package that targets different .NET Framework versions, refer to the NuGet documentation Web site at docs.nuget.org.

    The basic steps for creating a package are:

    Create a class library project. Generate a NuSpec manifest from the project. Update the project’s assembly metadata. Use NuGet.exe to create the package. Create a Class Library Project To share an assembly, start with a class library project. NuGet can pack multiple project types, but the most common case when sharing code is to use a class library. After you create the package, make sure to open the AssemblyInfo.cs file to update the assembly’s metadata.

    Create a NuSpec Manifest The NuSpec file is a package manifest with important metadata about the package, such as the author, description and the package dependencies. The NuSpec format is simple to create by hand, but it’s more convenient to let the spec command generate the file for you. Make sure to run the command in the same directory as the project file:

    nuget spec

    In this particular case, because the spec command generated the NuSpec from a project file, it contains placeholders for some metadata, as shown in Figure 7.

    Figure 7 The Generated NuSpec File

    <?xml version="1.0"?> $id$ $version$ $title$ $author$ $author$ http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE http://ICON_URL_HERE_OR_DELETE_THIS_LINE false $description$ Copyright 2011 Tag1 Tag2 Don’t edit the fields with the placeholders, but do fill in the correct values for the other fields such as licenseUrl, projectUrl, iconUrl and tags.

    Update the Project’s Assembly Metadata Every assembly has metadata related to the assembly. NuGet can read this assembly metadata and merge it into the NuSpec manifest when it creates a package, which ensures this information is never out of sync between your package and your assembly.

    As mentioned earlier, this information is usually located in a file named AssemblyInfo.cs. The table in Figure 8 shows the mappings between the assembly metadata and the NuSpec placeholder values.

    Figure 8 Assembly Metadata Mapped to NuSpec

    Token Source $id$ The assembly name. $title$ The assembly title as specified in the AssemblyTitleAttribute. $version$ The assembly version as specified in the assembly’s AssemblyVersionAttribute. $author$ The company as specified in the AssemblyCompanyAttribute. $description$ The description as specified in the AssemblyDescriptionAttribute. Unlike the other fields, the $id$ field is not extracted from an assembly attribute, but is set to the assembly name.

    Create the Package In the same directory as the project file and NuSpec file, run the following command to create a package:

    nuget pack ProjectName.csproj

    If you have one project file in the same directory, you can omit the project file name when you run the command.

    If you haven’t compiled the project yet, you can use the Build flag to compile the project first, before packing it. This will compile the project first before running the pack command:

    nuget pack ProjectName.csproj -Build

    This command results in a file named ProjectName.{version}.nupkg, where {version} is the same value specified in the AssemblyVersionAttribute. For example, if the version is 1.0.0, your package will be named ProjectName.1.0.0.nupkg. You can use the Package Explorer to examine the package after the fact to ensure it’s been created correctly.

    As a courtesy to developers who will install your package, consider using the Symbols flag to create a package with debugger symbols:

    nuget pack ProjectName.csproj -Build -Symbols

    This command creates a symbols package in addition to the main package. This allows others who install your package to step into the package code when they debug their application.

    Publishing a Package After you create a package, you’ll probably want to share it with the world. NuGet.exe has a publish command for just this purpose. Before you publish, you’ll need to create an account on nuget.org.

    When you’ve registered for an account, click on the link to your account to see your access key. This key is important as it identifies the nuget.exe command to the gallery and is a revocable password.

    Once you have your key, store it in a secure location using the following command:

    nuget setApiKey b688a925-0956-40a0-8327-ff2251cf5f9a

    With this in place, use the push command to publish your package to the gallery:

    nuget push ProjectName.1.0.0.nupkg

    The command validates your API key with the gallery before it uploads the package. If you created a symbols package as we discussed earlier, you should specify the Symbols flag when you push your package:

    nuget push ProjectName.1.0.0.nupkg -Symbols

    Be sure to specify the main package name and not the symbols package name. The command finds the appropriate symbols package by convention. The command pushes the main package to the NuGet gallery and the symbols package to the partner symbolsource.org repository.

    What’s Next In this article, I demonstrated how NuGet pulls in useful libraries from the NuGet gallery to jump-start new project development. Within enterprises, NuGet is useful for sharing code among various developers in an organization.

    But there’s one persistent misperception about NuGet I need to address—that NuGet is only for Web developers. This misperception is probably due to its inclusion with the ASP.NET MVC 3 release, but it’s simply not true. NuGet is not just for Web developers—it’s for all developers. NuGet supports Windows Phone, Silverlight and Windows Presentation Foundation, among other project types, and will support new project types in the future.

    NuGet is a community-driven open source project licensed under the Apache 2 license. The project belongs to the Outercurve Foundation but is incorporated into Microsoft products and counts several Microsoft developers as core contributors.

    To help in NuGet’s development, visit nuget.codeplex.com to learn about how to get involved and maybe even contribute to NuGet.

    This article only scratches the surface of what’s possible with NuGet. To learn more, visit the NuGet documentation Web site at docs.nuget.org (the team works hard to maintain this and accepts contributions to its documentation). The team is active in the CodePlex discussions forum for the NuGet project and welcomes your questions.

    Phil Haack works for Microsoft as a senior program manager on the ASP.NET team aiming to build great products for developers. While he delves into many areas of ASP.NET, his primary projects are ASP.NET MVC and NuGet Package Manager, both released under an OSS license. In his spare time, he writes about software on his blog, haacked.com, and works on the Subtext open source blog engine.

    Thanks to the following technical expert for reviewing this article: David Fowler

  • NuGet at 2013年09月03日

    Manage Project Libraries with NuGet Phil Haack

    Try as it might, Microsoft can’t supply every possible library developers need. Though Microsoft employs close to 90,000 people worldwide, the world has millions of developers. It doesn’t make sense for Microsoft to attempt to fill every niche, nor does it scale. Developers, therefore, frequently take it upon themselves to “scratch their own itch,” and they’ve written thousands upon thousands of useful libraries that are distributed all over the Web.

    The problem with so many libraries out there is sharing them. Sharing and reusing code is a big challenge. Don’t believe me? Walk into any midsize to large shop and ask them how many logging libraries they have. Visit enough companies and you’ll find a high percentage of in-house logging libraries when good ones—Log4Net, NLog and Error Logging Modules and Handlers, or ELMAH—already exist.

    When a developer starts a new project, he faces the empty canvas problem. How can he find these useful libraries? How does he incorporate a library into his current project and manage its dependencies and updates?

    ELMAH is a great example of a useful library that developers took upon themselves to write. ELMAH logs all unhandled exceptions within a Web application along with all the request information, such as headers, server variables and so on, when the exception is thrown. Suppose you’ve just heard about ELMAH and want to use it in your next project.

    These are the steps you might take:

    Find ELMAH. Due to its unique name, a Bing search locates the ELMAH Google code page as the first result. Download the correct zip package. The download page for the site has multiple zip packages. You have to think about it and pick the correct one. Sometimes the correct choice isn’t intuitive. “Unblock” the package. Once you’ve downloaded the package from the Web, you need to right-click the file, bring up the Properties dialog and click the Unblock button to remove the “mark of the Web” from the file. Verify its hash against the one provided by the hosting environment. The Google code site displays a QR code representing the zip file. How many developers do you know who take the time to verify the file against the QR code? Unzip the package contents into a specific location in the solution. Most developers avoid unpacking assemblies into the bin directory, because the directory is meant for output from the build, not for input, and isn’t tracked by version control. Instead, it’s important to add the dependency to a folder that’s committed to version control and reference the assembly from that location. Add an assembly reference to the project.The assembly isn’t usable until you add a reference to it from within the Visual Studio project. Update web.config with the correct settings.This may mean more searching around using Bing or Google while you try to find the correct settings needed for your config file. What a pain! Now suppose you have to do this for 10 to 15 dependencies. When it comes time to release the next version of your application, you spend significant time searching for updates to your application’s dependencies.

    That often-maligned notion, “not invented here” (NIH), begins to sound like a good idea.

    NuGet to the Rescue NuGet is a Visual Studio extension that makes it easy to add, update and remove libraries (deployed as packages) in a Visual Studio project. A NuGet package is a set of files packaged up into a single file with the .nupkg extension using the Open Packaging Conventions (OPC) format.

    OPC is just a fancy acronym for a zip file with some metadata. In fact, you’re probably already familiar with OPC, as it’s the format used by Word and Excel documents. If you’ve ever taken a .docx file and changed the file extension to .zip, you know you can open it up and poke around its internals. The same goes for .nupkg files.

    The NuGet product also comes with utilities to easily create and publish packages. For now, I’ll focus on using NuGet to discover and install packages. Later I’ll cover how to create and publish packages.

    Installing NuGet To install NuGet, launch the Visual Studio Extension Manager via the Tools | Extension Manager menu option. Click the Online Gallery tab to view available Visual Studio extensions, as shown in Figure 1. As you can see, NuGet is the highest-ranked package, which puts it on the first screen. If that ever changes, you can use the search box on the top right to find it. Click the Download button to install NuGet.

    Visual Studio Extension Manager Figure 1 Visual Studio Extension Manager

    If you’ve installed ASP.NET MVC 3, you already have NuGet installed. ASP.NET MVC 3 includes NuGet, and Microsoft plans to include NuGet in the next version of Visual Studio.

    Installing a Package Let’s start with NuGet’s user-friendly dialog to install packages. NuGet also comes with a Windows PowerShell-based console geared toward power users that I’ll cover later.

    To launch NuGet, right-click on the project’s references node and select the Manage NuGet Packages option (this option had a different label prior to NuGet 1.4). This launches the Manage NuGet Packages dialog shown in Figure 2.

    NuGet Package Manager Dialog Figure 2 NuGet Package Manager Dialog

    Make sure the Online tab is selected and type in a search term in the top right (for example, search for MiniProfiler, a useful library from the StackOverflow.com folks).

    Once you locate a package, click the Install button to install the package. NuGet then downloads the package and its dependencies and applies any necessary changes to your project specified by the packages.

    NuGet performs the following steps to install a package:

    Downloads the package file and all its dependencies. Some packages require explicit license acceptance and prompt the user to accept the license terms for the package. 
Most packages are fine with implicit license acceptance and do not prompt. If the package already exists in the solution or in the local machine cache, NuGet skips downloading the package. Extracts the package’s contents. NuGet extracts the contents into the packages folder, creating the folder if necessary. The packages folder is located next to your solution (.sln) file. If the same package is installed into multiple projects within a solution, the package is only extracted once and is shared by each project. References assemblies in the package. By convention, NuGet updates the project to reference the appropriate assembly (or assemblies) within the packages lib folder. For example, when installing a package into a project targeting the Microsoft .NET Framework 4, NuGet will add references to assemblies within the lib/net40 folder. Copies content into the project. By convention, NuGet copies the package’s content folder’s contents into the project. This is useful for packages containing JavaScript files or images. Applies package transformations. If any package contains transform files, such as app.config.transform or web.config.transform for config, NuGet applies those transformations before it copies the content. Some packages may contain source code that can be transformed to include the current project’s namespace in the source file. NuGet transforms those files as well. Runs associated Windows PowerShell scripts in the package. Some packages may contain Windows PowerShell scripts that automate Visual Studio using the Design Time Environment (DTE) to handle tasks NuGet isn’t designed for. After NuGet performs all these steps, the library is ready for use. Many packages wire themselves up using the WebActivator package to minimize any configuration necessary after installation.

    A package can be uninstalled, which returns your project to the state it was in before installing the package.

    Updating Packages In his book, “Facts and Fallacies of Software Engineering” (Addison-Wesley Professional, 2002), Robert L. Glass states: “Maintenance typically consumes about 40 to 80 percent (60percent average) of software costs. Therefore, it is probably the most important lifecycle phase.”

    Installing a package is only the beginning of the story. Over time, as these libraries are maintained, it becomes important to keep your application up-to-date with the latest bug fixes for the libraries. This requires you to answer the question, “Which dependencies in this project have new updates available?”

    As mentioned before, answering this question has always been a time-consuming endeavor. With NuGet, however, you simply launch the 
dialog and click on the Updates tab to see a list of packages with available updates, as shown in Figure 3. Click the Update button to update the package to the latest version.

    Updates Available for the Current Project Figure 3 Updates Available for the Current Project

    The update command uninstalls the old package and then installs the new one, ensuring all dependencies are updated appropriately if needed.

    NuGet provides commands in the Package Manager Console to better control updates—such as to update all packages in the solution or to perform a “safe” update, for example.

    NuGet for Power Users While I’m a big fan of nice GUI dialogs, I know many developers who disdain mouse-dragging people like me. Those folks prefer a command-line 
shell as the UI for its ability to compose sets of commands together.

    NuGet fills this need with a Windows PowerShell-based console window called the Package Manager Console, as well as a set of Windows PowerShell commands for interacting with NuGet. Windows PowerShell, a .NET-based scripting language and command-line shell, is well-suited for composing command sets and working with objects.

    To launch the Package Manager Console, navigate to the Tools | Library Package Manager | Package Manager Console menu option.

    Listing and Installing Packages To list and search for packages, use the Get-Package command. By default, the command lists installed packages in the current project. You can search for packages online by specifying the ListAvailable flag combined with the Filter flag. The following command searches for all packages mentioning “MVC”:

    Get-Package -ListAvailable -Filter Mvc

    Once you find a package to install, use the Install-Package command. For example, to install ELMAH into the current project:

    Install-Package Elmah

    Because Windows PowerShell is a dynamic language, it can provide tab expansions to help you correctly enter command arguments. Tab expansions are equivalent to IntelliSense for C# but, unlike IntelliSense, which is based on compile-time information, tab expansions can be populated at run time.

    For example, if you type in Install-Package Mvc{tab}, you’ll see a list of possible package names from the package source, as shown in Figure 4.

    A Tab-Expanded List of Packages Figure 4 A Tab-Expanded List of Packages

    Updating Packages The Package Manager Console also includes a command that provides more control over updates than the dialog. For example, call this command with no arguments to update every package in every project of the solution:

    Update-Package

    This command attempts to update each package to the latest version. Thus, if you have version 1.0 of a package and versions 1.1 and 2.0 are available in the package source, this command will update the package to version 2.0, because it’s the latest.

    This can be a drastic action if any package contains breaking changes. In many cases, you’ll just want to update every package to the latest bug fix release. This is called a “safe” update and assumes that packages with a larger build or revision number (but with the same major and minor numbers) are backward-compatible. Just add the Safe flag to perform a safe update, like so:

    Update-Package -Safe

    In this case, if you have version 1.0.0 of a package installed, and both 1.0.1 and 1.1 are available in the package source, the package is safely upgraded to 1.0.1 and not 1.1.

    The Update-Package command also provides more granularity, such as updating a package to a specific version of the package rather than the latest version.

    Extending Visual Studio with New Commands While the ability to use Windows PowerShell to install packages is nice, it’s not the most compelling reason to choose Windows PowerShell. One of the most compelling reasons is that packages can add new commands to the Package Manager Console. These commands can interact with the Visual Studio DTE in order to perform various tasks.

    For example, install the MvcScaffolding package and it adds a new Scaffold Controller command to the console. Given an Entity Framework (EF) Code First object, this command generates a controller, controller actions and views corresponding to the basic Create, Read, Update and Delete (CRUD) operations for the EF object, as seen in Figure 5.

    MvcScaffolding Custom Scaffold Command in Action Figure 5 MvcScaffolding Custom Scaffold Command in Action

    NuGet in Your Organization With all this focus on how NuGet makes it easy to share libraries with the public developer community, NuGet’s usefulness within the enterprise is easy to miss.

    After all, there’s nothing special about businesses that make them immune to the same challenges the software community as a whole faces when sharing code. As a company grows over time, entropy sets in. Different groups within the same company use their own private versions of company “standard” libraries. Some groups may go so far as to completely ignore these libraries and write their own from scratch.

    Often, the problem is not the libraries themselves but the hassle in sharing these libraries with other teams and keeping them notified of changes. Sound familiar?

    Package Sources So far, I’ve covered how to install packages, but haven’t answered the obvious question: Where are those packages located? They’re located in the official NuGet package gallery at nuget.org. This gallery exposes an OData feed: packages.nuget.org/v1/FeedService.svc.

    The OData format allows the NuGet client to generate ad hoc queries to search the package source on the client, but have them executed on the server.

    To add more package sources to NuGet, navigate to the Tools | Library Package Manager | Package Manager Settings menu option and click on the Package Sources node, as seen in Figure 6.

    Package Manager Settings Figure 6 Package Manager Settings

    The default package source is an OData endpoint on the Web, but the example screenshot also shows a local folder as a package source. NuGet treats folders (whether local or on a network share) as a package source and lists each package within the folder in the Online pane. This makes sharing code with others as easy as putting it in a folder, and is also helpful when you test packages you create yourself.

    Hosting Your Own NuGet Server In addition to hosting packages on a network share, you can also set up a Web site as a package source and use it to share packages with others across your organization.

    As with many tasks, there’s a package that helps here. First, create an empty ASP.NET Web Application in Visual Studio (targeting ASP.NET 4). Use NuGet to install the package NuGet.Server. This package adds a simple OData endpoint to the empty Web application.

  • 360 密码:奇虎 360 到底是如何管理和运营的

    刚刚跨入市值 100 亿美元俱乐部的奇虎 36 , 作为一家互联网安全与服务公司,到底是如何管理和运营的

      这一次,中国互联网业的话题人物周鸿祎的风头,可能真被抢了。

      8 月 27 日,他任董事长兼首席执行官的奇虎 360 公司,市值首次突破 100 亿美元。股价飙升的动力来自此前数日发布的 2013 年 Q2 财报:360 公司营收达 1.52 亿美元,同比增长 108%,净利润 3321 万美元,同比增长 372%,均超过华尔街预期。

      对于今年 6 月刚结束 IPO 冰封期的中概股而言,这份财报无疑可进一步提振士气。随着高盛、摩根士丹利、美林纷纷调高对奇虎的评级,人们突然发现,这家备受争议的本土互联网服务公司已步入行业最活跃的巨头之列,和腾讯、百度 、阿里巴巴比肩—一直以来,奇虎都像鲇鱼一样入侵后者的核心竞争领域。

      奇虎与腾讯之间的 3Q 大战历经数轮,与百度的搜索之争激战正酣。尽管中国互联网业素来烟熏火燎,但像奇虎这样攻城略地的公司却不常见。习以为常后,公众认为这不奇怪,奇虎创始人周鸿祎不正是一个不按常理出牌的规则破坏者吗?对此,43 岁的周鸿祎从不遮掩:“我们做别人没做过的事情,然后做别人做过、但我们能超越的事情。”

      但直到这次财报出炉,人们才意识到,周鸿祎的个人特色过多吸附了公众眼光,极少有人关注,作为一家成立于 2005 年、并于 2011 年登陆纽交所的互联网公司,奇虎 360 到底是如何管理、运营的。

      别忘了,360 身处冷酷的资本市场。2011 至 2012 年,中概股曾集体遭遇做空机构的质疑,股价暴跌、破发、停牌甚至退市,IPO 冰封 8 个月。其间,奇虎 360 与美国做空机构 “香橼 (Citron Research)” 交手 5 个回合,股价却逆势上涨。

      这曾被解释为奇虎应对及时、得当,但事实上,在注重公司实际收益的美国资本市场,仅凭有效应对,难以抵挡做空机构的炮轰。

      纽交所的投资者经验丰富,颇为挑剔,对于科技业上市公司,他们不仅要求利润保证,还十分看重一家公司拓展新业务、寻求新的市场增长点的能力。随着新一期超出华尔街预期的财报出炉,是时候关注奇虎 360 业务的实际增长了。

      据奇虎公司高管分析,Q2 财报的亮点主要得益于在线广告业务同比增长 78%,及互联网增值业务同比增长 181%。而这背后的引擎,则是奇虎新拓展的搜索业务和 360 手机助手延伸出的手游发布平台。

      作为中国最大的手游发布平台,360 手机助手受益于 2013 年手游市场的爆发性增长,流量大增,直接变现为短期财务数据。在财报会议上,奇虎高管强调不做游戏研发,但会介入联运。这意味着,奇虎对手游市场进行过斟酌、判断—事实上,奇虎的关注点不仅在手游行业,还包括软硬件结合等最新趋势。

      8 月 1 日,360 官网上正式销售的 360 随身 WiFi,是一款只有指甲盖大小的 U 盘,插在笔记本电脑上,经过简单配置,就可发送无线信号,将可覆盖到的移动终端连接到互联网。这是 360 公司开发的第一款硬件产品。

      事实上,跟踪最新动态,不断寻求新的增长点,这种财报背后的竞争力,源于奇虎 360 内部 “微创新” 的土壤。尽管互联网公司都崇尚高效、创新,但奇虎 360 自诞生之日起,几乎是在强迫自己保持对新事物的高度敏感。

      这不仅因为行业瞬息万变的特征,更因为,奇虎成立的 2005 年,中国互联网行业已是巨头林立。“那个时候再去创业,你想你靠什么在这个市场上生存,赢得用户,就必须要依靠创新。” 奇虎 360 总裁齐向东在接受《时间线》专访时说,“这 (创新) 是 360 的一个基因。”

      为创新而创新

      在公众眼中,周鸿祎与其他互联网创业明星不同,在电视节目上公布自己的手机号,频频力挺巨头阴影下的 “中小创业者”,总之,一副典型的 “草根” 模样。

      这并非完全是性格使然。

      “对行业竞争对手高姿态,对公司员工低姿态” 是公司内部对 360 管理层的统一评价。

      在 360 内部,周鸿祎和齐向东会时不时出现在某一层的团队办公区去观察项目进展情况,如有偏差,马上找来相关副总和团队开一个圆桌会议,时间可能持续 2-3 小时不等。

      “我从早上上班到晚上 11 点得一直说话。” 齐向东说。跨层级的直接沟通在 360 备受推崇。假如公司的软件产品在凌晨遇到亟需解决的问题,值班员工可拨打齐向东的手机汇报情况,而为了能时刻保持在线,齐备了 3 部手机。

      事实上,从一开始,为避免公司科层化、官僚化抑制创新,奇虎 360 刻意颠覆了传统的公司管理结构和工作流程,而是采取了 Facebook(41.29, 0.01, 0.03%) 倡导的 “小团队、扁平化管理” 模式。

      如何定义小团队?齐向东很推崇 Facebook “开会时只能定一张比萨饼” 的标准,同时,曾在新华社有十余年工作经历的齐向东对官本位思想有着本能的警惕:“公司不能有绝对的管理者。否则就会出现划地盘的事情。” 齐向东如是说。

      为了能扁平化管理他将 360 内部的所有部门分解成大小团队共 400 个,他和周鸿祎每时也每刻都在不停地选择带其中的几个团队,把握方向,随时过问,在团队方向和思路正确的情况下放手再另寻新问题团队。在他们看来,研发创新项目在不同的阶段,产生不同的问题,必须随时沟通才能更好地予以疏导。

      “我和老周 (周鸿祎) 随时是产品经理。” 齐向东开玩笑地说。

      此外,小团队管理模式还具备 “将产品做深” 和 “让员工找到归属感” 的功能—这正是一些执行高标准流程的大公司软肋。

      360 对每个团队的要求是专注于自己的一项产品开发,但要随时调整思路,这样久而久之就会在深耕某个领域。此外,360 的内部也有着不一样的竞争机制—自己团队的产品能否上线均由产品团队自己决定。“老周 (周鸿祎) 每次开会都问我你有什么新的作品啊?” 360 手机助手产品经理王铁军对《时间线》说:“如果他觉得好,马上就可以去执行了,不用再层层报告。”

      在这种局面下,360 每个月更新 1000 多个产品的版本,日均更新量超过 30 个。对 360 目前规模而言,这个产出比例颇为高效。“我们看起来乱,但在产品的路线上是明确的。” 齐向东对本刊说。

      现在,360 的产品被认为是市场上 BUG 解决和软件更新速度最快的产品之一,这不但增加了公司的运转效率,还赢得了用户的口碑。

      第一款硬件

      在纷乱的舆论氛围之下,360 如同一家被加密的公司。

      上文描述的多项目、小团队管理模式,在实际运行中,若不做任何限制,也容易造成混乱。

      目前,360 根据产品划分了五大主要业务:安全产品包括安全卫士和杀毒,安全浏览器产品,包含搜索、导航的 WEB 产品,以及手机上的安全卫士、手机助手等产品。每项产品则同时由数十个不同的团队负责,但每条线的研发工作都是围绕核心产品去尝试提供更有价值的服务。简言之,研发团队都要回归到用户的角度,以便挖掘新的服务点。

      同时,360 在内部管理中秉持以下基本原则:一,鼓励创新,允许犯错;二,坚持为用户提供有价值的服务;三,违反第二点的,或欺骗用户的格杀勿论。在周鸿祎和齐向东看来 ,充分的容错机制是创新必不可少的土壤。“你必须允许他犯错误,如果每个人都像在冰面上小心翼翼地行事,怕错,就不敢创新了。” 齐向东说。

      从理念上,360 不认为创新是多么高深的思想,该公司更倾向于以 “实用主义” 的态度看待创新:“创新就是看到用户体验不佳背后的东西。”

      例如,对于 360 的核心竞争领域 “安全”,360 会深入考虑 “什么是安全背后的东西?” 齐向东认为用户追求的并不是安全本身:“效率,用户使用安全产品的背后是想提高在互联网上畅游 (27.92, -0.82, -2.85%) 的效率。”

      外界对 360 的印象大多保留在一家做杀毒软件的公司,很难将其自身业务与 “效率” 联系起来。但事实是,在众多杀毒软件还在与用户讨价还价包年价格的时候,360 率先推出了杀木马、杀流氓软件的功能,并在一年时间内赢得了近 2.4 亿用户。这些举措对用户来说是一种安全服务,但在齐向东看来,却正是对用户效率需求的把握。

      在 360 看来,安全只是手段,用户最终需要的是便捷、畅通的上网。“如果上网不伤心情,也不丢东西,随意在互联网上驰骋,这多爽。” 齐向东对《时间线》表示,360 推出一款产品的标准是能否解决用户上网不够爽的问题。

      在创新方面掘地三尺的做法,使 360 的产品研发有种追根溯源的特征。创业之初,360 想做好杀毒,但发现网络病毒无法靠单纯杀伐来杜绝,要从产业链上对源头下手:“电脑病毒的源头是用户下载、搜索后得来的。与其让用户中毒后杀毒,不如让用户不中毒”。

      基于这样的思考,360 在后续的扩张中,以用户行为习惯为主导,前期大胆预测其上网中会遇到的难题,之后通过产品预防性解决问题—这不仅仅是 360 制作产品的思路,同时还体现了产业链不断进化的方式。

      从用户角度讲,目前 360 的五大产品线可以让其每次接通互联网时就会触发 360 的安全服务。而从 360 的角度来看,这些产品可为用户提供更闭环的服务,不光提升了用户上网体验感,同时还能通过自己制造的开放平台加入更多互联网企业,获取收入,是一个双赢的模式。

      有趣的是,360 的创新思路并不局限于具备传统优势的软件上,还首次涉猎硬件制造。8 月 1 日在官网销售的 360 随身 Wi-Fi 仅为 U 盘大小,可拴在手机上随身携带—这款产品既没有突破性的无线技术,也不具备有噱头的造型。但 8 月 20 日,曾两度在京东预售的该产品,当天放出的 40 万订单在 5 分钟内即被抢购一空。因短时间内流量过大,冲击购买页面,击垮了京东引以为傲的服务器。

      截至 8 月 27 日,360 随身 Wi-Fi 的预售量已达 300 万台。这款名不见经传的产品如此火爆,即便在 360 内部,也超出了预期。

      就在 3 个月前,360 随身 Wi-Fi 还只是一款 “仓库” 创业的小玩意,知名度仅限 360 手机助手的 6 个人,在接受《时间线》专访时,王铁军强调说,这款 “小” 制作绝非公司战略,更像是一种 “内部创业”。

      最开始,手机助手团队的王铁军和同事们的注意力集中在一个常见问题上:当用户在设置路由器时会遭遇一些专业数据,这令许多用户疲于应对,同时,因为路由器设置问题,用户选择在可用无线网的情况下不得不在手机上使用运营商提供的流量上网,耗费高额流量费。

      这个需求最后催生出功能极简的 360 随身 WiFi—插入带有无线网卡的笔记本,再通过 6 步设置就实现发送无线信号的功能,加之 19.9 元的定价,引发消费者追捧。而王铁军认为,这一项目的成功一方面得益于自己在 360 手机助手上每天翻看用户反馈,对信息敏感度强,另一方面,则是公司内部特别鼓励员工不惜一切代价地为为客户提供价值—在后期的功能改进上,他进一步舍弃了 360 随身 Wi-Fi 原本要绑定 360 安全卫士的操作,允许该产品作为单独安装硬件,以适应所有电脑 (除 Mac 以外) 的配置。

      在齐向东看来,360 随身 WiFi 这款产品精准把握了客户的痛点。“创新不是抛弃过去所有的东西,而往往是用新方法解决旧问题。” 齐向东说,“我们公司有两句话是 '向用户学习,向同行学习' 。其中向用户学习就是不断地为用户创造价值,这条线是永远不变的。”

      成为小白

      在互联网行业,向用户学习的关键很大程度上在于从根本上意识到并理解用户的需求。但一个难题是,这也是一个对技术要求很深的行业,为产品把脉的产品经理们,如何在研发过程中,将自己的专业知识清零,使思路回到 “放空状态”?

      所谓放空,就是目前互联网行业产品经理们最为推崇的口号 “成为小白”。

      奇虎 360 则给出了自己一套培养员工成为 “小白” 的逻辑。

      360 内部的员工从普通程序员到副总,多数自诩为草根。但这种形容并非对自己的自嘲,而是说要随时保持低姿态,站在 360 用户的角度思考。“360 并不是有一堆产品牛人,设计个产品就推给用户去用,而是用户需要什么我们就做什么。” 齐向东多次强调说:“那种没事牙疼的事情就完全别做。”

      360 随身 Wi-Fi 的诞生,也曾经历一个 “小白” 的过程。

      2013 年 3 月,盯着 360 手机助手改进功能的王铁军发现,要想解决上网设置难题,最直接的方法是在 PC 与手机之间增加一条线,以便实现自动设置。但在请教了硬件的朋友之后,他发现 “智能线” 的想法需要改变线的 “细” 造型,增加了线的重量,这样一来,消费者在使用时反而会增加携带成本—U 盘的创意突然浮现在脑海。

      由于 U 盘可即插即拔,且不占用很大的携带空间,成为王铁军首选的硬件解决方案之一。同时,为了显得更 “酷”,王铁军在 U 盘上附加了 “手指飞图”、“遥控赛车” 等一系列极客功能,供消费者娱乐。

      在 5 月的 360 内部例会上,王铁军当众向周鸿祎展示了产品的原型机,并描绘了产品会做成 U 盘大小,附加一系列功能的想法。“开始老周很感兴趣。” 王铁军回忆说周鸿祎看到原型机后很兴奋,并且提出了能不能做成电池等形状的硬件。“他不断地给我们出点子。”

      从未做过硬件产品的王铁军,开始逐步接触从工业设计到制造的完整流程。“我们从公司内部招来了一位学过工业设计的同事。” 王铁军说,在 360,只要项目有趣,主要负责人就可在不影响正常工作的情况下,调动资源。“这里加班是习惯。” 他笑着说。

      产品上市前两个月,他几乎每两周往返深圳,和代工商不断协调制造细节。尽管辛苦,但周围同事、领导的支持,也让他倍感欣慰。

      熟料,产品最终立项的结果出乎了王铁军的预料—其引以为豪的 10 多个想法,6 个可行功能均被周鸿祎一并砍掉,仅保留了最原始的功能。

      这个临时小团队当然不服这个 “手起刀落” 的做法,他们想争辩、解释,但被周鸿祎的一句提问止住了:“你可以用一句话向客户介绍你的产品吗?如果不能,客户是不会听你说第二句的。” 王铁军一时语塞,的确,如此多功能 “U 盘” 一句话是无法说清楚的。之后周鸿祎的问题更加苛刻:你设计的功能解决了用户真正的需求吗?

      由于设计了很多酷炫的功能,“U 盘” 成为了一款极客产品。这种锦上添花的思路周鸿祎并不赞成。“一款产品就解决用户 1-2 个痛点就成功了。” 周鸿祎对王铁军说。“功能那么多有什么用呢?”

      事实上,周鸿祎对产品的理解是能为 “最小白” 的电脑用户提供服务的产品设计,同时在营销上也尽可能要求销售人员在介绍产品的时候简洁、明了。项目初期的开放,进行中的灵活,以及最后商品化环节的收缩,对 360 的创新来说,都是必不可少的环节。

      最终,360 随身 WiFi 的宣传语折叠为 “即插即用的手机免费上网神器”。360 随身 Wi-Fi 在市场上的成功也使这个临时的研发团队,有了更长期的目标,据悉,360 随身 Wi-Fi 正在筹备更新版本,除了增加新功能,还会在颜色、造型上推陈出新,以满足年轻消费者的个性化审美需求。

      对 360 来说,从研发到营销,紧紧围绕用户需求是非常重要的,是创新的原点,也是终点。这类工作将不局限于软件或硬件。除了 360 随身 WiFi,360 近期上线的 360 安全搜索红番茄评价系统加入了点评模式,旨在让更多用户理解自己所浏览网站的涉猎业务和评价,对于用户来说,是一个不错的反馈机制。

      在 360,这类带有自发性质的小项目层出不穷,内部创业的土壤较为肥沃。只要真正触及到用户需求,任何一个员工都可推动立项。360 今年推出的网购先行赔付服务,就是一名工程师坚持游说一个月的结果。相比之下,在层级分明、管理构架完整的互联网公司,要在一个产品上增加一个功能,邮件要 CC 给各级领导,等待层层批复。

      不可否认,360 在探索互联网公司全新的管理方式。初创时期,这种探索是能保证高效并损失不大的。然而,随着 360 行业地位的提升,它需要更核心的产品与竞争力,公司规模逐步扩大,由容错机制所导致的损失也会随之提升。齐向东坦言,360 重视创新氛围,就必须承担相对较高的失败率:“损失的项目是多少,最后实现出来的,只是三分之一。”

      如今,360 已步入巨头行列,这种布满草根气息的小团队、扁平化模式还是否适应,有待考验 。

  • 单身男女青年尤其是刚毕业的学生容易被忽悠什么奉献,什么感恩的比较适合那种文化

    一帮老油条去了融入不进去,反而成为刺头,干不了多久就得走

  • SVN 管家的安装与配置 at 2013年08月29日

    我帮你整理整理吧