Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: How is this "pattern" called? Date: Fri, 18 May 2012 10:35:47 -0700 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 18 May 2012 17:35:49 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="tCs9q+zYIgWty87qnomMxw"; logging-data="5852"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zCul0+v4HEl7nFgu5Xd1TSgKA25L44VY=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Cancel-Lock: sha1:q7VedVawDYbq+AOznyzP21Jg38c= Xref: csiph.com comp.lang.java.programmer:14624 On 5/18/2012 9:59 AM, Stefan Ram wrote: > I do not see a real problem with this style, assuming that > the assignment at hand was just to write such a simple dot > paint program. Right, though the style doesn't particularly teach best practice either. I think I'd call this the "monolithic example" pattern. It's similar to a lot of example code I see in books and the Java tutorial. It's monolithic because it crams everything into a single class, or at least into the minimum page space. And it's an example because that's what it is. A short program that isn't written by more than one person, and will not be maintained. It's fine for what it is, but it's not an example of good production style coding either.