{"thread":{"id":"26944","subject":"implement idea firstly in script language?","startedAt":"2011-03-31T12:27:38Z","lastAt":"2011-03-31T18:51:30Z","messageCount":2,"participants":["徐迪","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"164785","messageId":"AANLkTikq7iJt97Fq-TQH63RCrrvOJb348yhYDYW4qJL6@mail.gmail.com","threadId":"26944","inReplyTo":null,"subject":"implement idea firstly in script language?","fromName":"徐迪","fromEmail":"xudifsd@gmail.com","sentAt":"2011-03-31T12:27:38Z","receivedAt":"2011-03-31T12:27:38Z","isPatch":false,"sender":{"key":"xudifsd@gmail.com","avatar":"https://gravatar.com/avatar/260814589d486b8dba6ff105f193d831bf9de466d688a20c53f7a516c7ffe146?d=mp&s=160"},"body":"Hi,\ni'm wondering to implement one idea during SOC, should i take time to\nimplement it firstly in script language(just to see whether it works\nwell)? And then rewrite it in C later?\nCheer\nDi\n"},{"id":"164820","messageId":"20110331185130.GB16981@sigill.intra.peff.net","threadId":"26944","inReplyTo":"AANLkTikq7iJt97Fq-TQH63RCrrvOJb348yhYDYW4qJL6@mail.gmail.com","subject":"Re: implement idea firstly in script language?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-03-31T18:51:30Z","receivedAt":"2011-03-31T18:51:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 31, 2011 at 08:27:38PM +0800, 徐迪 wrote:\n\n> i'm wondering to implement one idea during SOC, should i take time to\n> implement it firstly in script language(just to see whether it works\n> well)? And then rewrite it in C later?\n\nIt depends on what the idea is.\n\nThe reason to implement something in a higher-level language first is to\nverify that the approach is sensible. So you are making a tradeoff: you\nput less time/effort into the prototype (which has a high chance of\nfailure), and pay for it later by having to port a successful result\ninto its final form.\n\nSo knowing whether it's worth it depends on:\n\n  1. How much time is saved by prototyping in a different language?\n\n  2. What is the probability of the approach failing?\n\n  3. What is the cost (in time) of porting the end result?\n\nEstimating any of those is very specific to the problem at hand. It may\neven be for some ideas that the ultimate implementation could stay in\nthe scripting language, which would make point (3) free.\n\n-Peff\n"}]}