From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id A3344BC0B for ; Wed, 13 Dec 2006 14:57:53 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBDDvp66028621 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 13 Dec 2006 14:57:53 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1GuUbr-0000xW-00; Wed, 13 Dec 2006 13:57:23 +0000 Date: Wed, 13 Dec 2006 13:57:23 +0000 To: Pietro Abate Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to refactor a large Ocaml program Message-ID: <20061213135722.GA1258@furbychan.cocan.org> References: <457FF423.7000703@abc.se> <20061213130922.GA17914@pulp.rsise.anu.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061213130922.GA17914@pulp.rsise.anu.edu.au> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at discorde with ID 458006DF.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; refactor:01 ocaml:01 mldonkey:01 ocaml:01 blog:98 blog:98 wrote:01 caml-list:01 match:02 types:03 types:03 unit:03 loc:03 logical:04 thu:05 On Thu, Dec 14, 2006 at 12:09:22AM +1100, Pietro Abate wrote: > not an answer, but a general comment, maybe also a bit OT ... >[...] > For me 10K loc for a logical unit is the maximum I can hold in my > head at once. More then that drive me crazy and often induces me to > re-think my entire architecture. > > Does this match your experience ? I just analysed all the code written by Merjis, all 77,070 lines of it. (This is split across dozens of programs and libraries.) Longest files: 1905 ./freeware/weblogs/weblogs_charset.ml 1149 ./freeware/pgocaml/pGOCaml.ml The first wasn't written by me, but snarfed from mldonkey. The second is mostly a series of translations between PostgreSQL types and OCaml types, so it doesn't really count as complicated. 573 files, so average lines/file = 134 lines. Median is 77 lines. Refactoring is something we've certainly not worried about. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Internet Marketing and AdWords courses - http://merjis.com/courses - NEW! Merjis blog - http://blog.merjis.com - NEW!