From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11803 invoked from network); 4 Aug 2023 01:28:46 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 4 Aug 2023 01:28:46 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id E98EF4227C; Fri, 4 Aug 2023 11:28:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuhs.org; s=dkim; t=1691112523; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=7p019lZ9H18yjiJESdburJn8LNfgjOVkpcsirLK7EUA=; b=V7HaRZxp9tcbVr9nLfy0awcumV2qaUyHbtWGt4bDF7OhHKczp6JcE+zOHXzagOBokrxW7H lcCiYLbQQhKUfyFJ6vlVi1L6yY4OniABLE2IvGF+ANKfXzCsmQ5tY1kJD9rayhupB3B592 ABVMLNEjbRDLgtGs2ND1VvJTWQJxO4s= Received: from mail-4325.protonmail.ch (mail-4325.protonmail.ch [185.70.43.25]) by minnie.tuhs.org (Postfix) with ESMTPS id 4FD844227A for ; Fri, 4 Aug 2023 11:28:37 +1000 (AEST) Date: Fri, 04 Aug 2023 01:28:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1691112515; x=1691371715; bh=7p019lZ9H18yjiJESdburJn8LNfgjOVkpcsirLK7EUA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=j6sUTt5IkMhcgL20KU+z5kH1YQW77evv/SFEivHFWi+AANRmaat7Q/z4EFjvvw7By gAPsIYm4NBYuaXXVmZMzSuiZDjS5WNnKKVK3ObTWwhVkABv6LOQzidmkVU5alNbVDT vnqbXENU7WPj7LZPh2biVzkYpuZBqNaOv85TCIBIewXuMRwutKNx0POz0Dfx0iIoRg sjFSqH20byphY9ciqqO4CQMcXnU4IcNFaVkwFfakd/KKKa5tQ0pcjiP7fup3GZwuyt d1cyOSR44C4QmTaCBosltQaiPil9n/Sh63vgScp4CkD3uehG2qAuB2sZGuVGNnYf9G SMZ6N2mGoERfQ== To: Larry McVoy Message-ID: In-Reply-To: <20230804010142.GH11023@mcvoy.com> References: <29602.1690887524@cesium.clock.org> <20230803005106.GA12652@mcvoy.com> <20230804010142.GH11023@mcvoy.com> Feedback-ID: 35591162:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5LBTWB2ENCQI3AQJCCD2VVWSJTT3LXZV X-Message-ID-Hash: 5LBTWB2ENCQI3AQJCCD2VVWSJTT3LXZV X-MailFrom: segaloco@protonmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: tuhs@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: python List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: segaloco via TUHS Reply-To: segaloco > That said, as a person who thinks of himself as a professional, when I go > in to someone else's code, I adopt their style. It's really rude to not > do so. I've written code in GNU C style. >=20 > Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat I've adopted a variation on this in that I try and write additions to exist= ing code stylistically similar to what is there, anything presenting glue l= ogic to some sort of external vendor library in a way resembling their styl= e, and then anything else is mine. That middle one I've found particularly helpful even for myself over the ye= ars as there are plenty of places in the dayjob codebases I can drop in and= tell almost immediately "Oh this is a wrapper over so and so based on the = variable names" or "Yeah this is an interface to library based on the= way the operations are named." Generally the only thing I have a hard time sticking to is casing, I'm a fe= rvent snake caser in my assembly and C code, but then fervent pascal caser = in my JavaScript and C#. Then again, that may also tie into my middle prac= tice in that those are the common cases seen in model examples of those lan= guages. One of the weirder side effects of that stylistic practice is the = rare occasion where I blindly copy something between languages with relativ= ely similar syntax (C to C# or JavaScript for instance) I can tell going ba= ck later because there's a hunk of code with snake case smack in the middle= of a bunch of pascal case. I usually go and clean that up though because = otherwise the codebase starts to look like a copypaste job from StackOverfl= ow after a while, that stuff drives me up the wall. - Matt G. P.S. For TUHS subject appropriateness, I have TUHS to thank for my C style = practices. I learned from KnR 2nd Edition back when I was a kid, but diver= ged a bit from the typical KnR way of things for a while, when I caught win= d of TUHS and started pouring over all the code, unbeknownst to my own cons= ciousness I started absorbing stylistic patterns from UNIX sources. I'm th= ankful to Warren and all the others who have facilitated this community, I = think TUHS should be in any programmer's bookmark list :)