TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Monte Carlo Simulations and Fibonacci: Why Developers Still Need The Basics

48 点作者 Baustin超过 11 年前

2 条评论

susi22超过 11 年前
Monte Carlo Simulations (MCS) weren&#x27;t invented to do software testing and I wouldn&#x27;t really recommend to use it as such. There is better ideas. MCS are used daily for processes&#x2F;algorithms that are so difficult that a analytical solution is hard or impossible to find. You just throw in some data in your black box and put a &quot;probe&quot; at your variable that you&#x27;re interested in. Do it many times and you see the pattern (eg. plot a histogram when probing a variable of 1 dimension etc).<p>If you have an algorithm that you understand and is not too complicated, then I&#x27;d argue that MCS are NOT the way to go (maybe in addition but NOT solely). The reason is that due to the law of large numbers it keeps simulating the nice cases instead of the edge cases. Unless you change your input distribution.<p>I really expected the article to conclude with a link or explanation to Quickcheck [1] since this is <i>exactly</i> what the author is trying to get to (Ie automatically check the edge cases and automatically minimize the input which fails it). Many languages have been porting these ideas. The Scala&#x2F;Clojure ones are pretty nice.<p>[1] <a href="http://en.wikipedia.org/wiki/QuickCheck" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;QuickCheck</a><p>Original paper of 2000:<p><a href="http://www.eecs.northwestern.edu/~robby/courses/395-495-2009-fall/quick.pdf" rel="nofollow">http:&#x2F;&#x2F;www.eecs.northwestern.edu&#x2F;~robby&#x2F;courses&#x2F;395-495-2009...</a>
评论 #7233083 未加载
评论 #7232303 未加载
mrcactu5超过 11 年前
as a mathematician, i grimace at the level of resistence I get from programmers as being too &quot;theoretical&quot;.<p>I try arguing, &quot;but all your libraries do at low level is math calculations, don&#x27;t you want any control over that?&quot;<p>The typical response is &quot;no&quot;... people are quite happy with the boundaries they feel their API&#x27;s are setting for them.
评论 #7231888 未加载
评论 #7231716 未加载
评论 #7232242 未加载
评论 #7232602 未加载