{"thread":{"id":"5058","subject":"gitweb: how to name main \"action\" subroutines?","startedAt":"2006-07-31T14:03:08Z","lastAt":"2006-07-31T20:41:02Z","messageCount":6,"participants":["Jakub Narebski","Luben Tuikov","Josef Weidendorfer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"24437","messageId":"eal2ic$14o$1@sea.gmane.org","threadId":"5058","inReplyTo":null,"subject":"gitweb: how to name main \"action\" subroutines?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-07-31T14:03:08Z","receivedAt":"2006-07-31T14:03:08Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"I'm going to rename some gitweb subroutines to better correspond to what\ngiven subroutine does. I have problem: how to name main \"action\"\nsubroutines? Currently they use git_ prefix, e.g. git_logo.\ngit_project_list, git_rss, git_summary, git_heads,...\n\nI have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow\nnone is best.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"24444","messageId":"20060731172625.48437.qmail@web31811.mail.mud.yahoo.com","threadId":"5058","inReplyTo":"eal2ic$14o$1@sea.gmane.org","subject":"Re: gitweb: how to name main \"action\" subroutines?","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-07-31T17:26:25Z","receivedAt":"2006-07-31T17:26:25Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Jakub Narebski <jnareb@gmail.com> wrote:\n> I'm going to rename some gitweb subroutines to better correspond to what\n> given subroutine does. I have problem: how to name main \"action\"\n> subroutines? Currently they use git_ prefix, e.g. git_logo.\n> git_project_list, git_rss, git_summary, git_heads,...\n> \n> I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow\n> none is best.\n\n\"git_<noun>_<verb>\" ?  So then you'd have, for example \"git_logo_show\".\n\n   Luben\n"},{"id":"24445","messageId":"ealfsa$hho$1@sea.gmane.org","threadId":"5058","inReplyTo":"20060731172625.48437.qmail@web31811.mail.mud.yahoo.com","subject":"Re: gitweb: how to name main \"action\" subroutines?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-07-31T17:50:19Z","receivedAt":"2006-07-31T17:50:19Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"<opublikowany i wysłany>\n\nLuben Tuikov wrote:\n\n> --- Jakub Narebski <jnareb@gmail.com> wrote:\n>> I'm going to rename some gitweb subroutines to better correspond to what\n>> given subroutine does. I have problem: how to name main \"action\"\n>> subroutines? Currently they use git_ prefix, e.g. git_logo.\n>> git_project_list, git_rss, git_summary, git_heads,...\n>> \n>> I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow\n>> none is best.\n> \n> \"git_<noun>_<verb>\" ?  So then you'd have, for example \"git_logo_show\".\n\nI'd rather reserve git_ prefix for subroutines which deal with git repository, \neither by calling git commands (e.g. git_get_type), or accessing git repository\ndirectly (e.g. git_read_hash, git_read_description).\n\nI'm partial to either out_foo or gitweb_foo...\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"24448","messageId":"200607312038.44337.Josef.Weidendorfer@gmx.de","threadId":"5058","inReplyTo":"eal2ic$14o$1@sea.gmane.org","subject":"Re: gitweb: how to name main \"action\" subroutines?","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2006-07-31T18:38:44Z","receivedAt":"2006-07-31T18:38:44Z","isPatch":false,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Monday 31 July 2006 16:03, you wrote:\n> I'm going to rename some gitweb subroutines to better correspond to what\n> given subroutine does. I have problem: how to name main \"action\"\n> subroutines? Currently they use git_ prefix, e.g. git_logo.\n> git_project_list, git_rss, git_summary, git_heads,...\n\nprint_* or write_* ?\nAt least, the functions print/write the HTML code to stdout of the script.\n\nJosef\n\n> \n> I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow\n> none is best.\n"},{"id":"24449","messageId":"ealj3h$to2$1@sea.gmane.org","threadId":"5058","inReplyTo":"200607312038.44337.Josef.Weidendorfer@gmx.de","subject":"Re: gitweb: how to name main \"action\" subroutines?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-07-31T18:45:22Z","receivedAt":"2006-07-31T18:45:22Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Josef Weidendorfer wrote:\n\n> On Monday 31 July 2006 16:03, you wrote:\n>> I'm going to rename some gitweb subroutines to better correspond to what\n>> given subroutine does. I have problem: how to name main \"action\"\n>> subroutines? Currently they use git_ prefix, e.g. git_logo.\n>> git_project_list, git_rss, git_summary, git_heads,...\n> \n> print_* or write_* ?\n> At least, the functions print/write the HTML code to stdout of the script.\n\nThe problem is that there are subroutines which print _fragments_ of HTML\ncode (like git_header_html or git_print_page_path) which would use probably\nprint_ prefix. Action subroutines output always whole page.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"24457","messageId":"200607312241.02711.Josef.Weidendorfer@gmx.de","threadId":"5058","inReplyTo":"ealj3h$to2$1@sea.gmane.org","subject":"Re: gitweb: how to name main \"action\" subroutines?","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2006-07-31T20:41:02Z","receivedAt":"2006-07-31T20:41:02Z","isPatch":false,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Monday 31 July 2006 20:45, Jakub Narebski wrote:\n> Josef Weidendorfer wrote:\n> \n> > On Monday 31 July 2006 16:03, you wrote:\n> >> I'm going to rename some gitweb subroutines to better correspond to what\n> >> given subroutine does. I have problem: how to name main \"action\"\n> >> subroutines? Currently they use git_ prefix, e.g. git_logo.\n> >> git_project_list, git_rss, git_summary, git_heads,...\n> > \n> > print_* or write_* ?\n> > At least, the functions print/write the HTML code to stdout of the script.\n> \n> The problem is that there are subroutines which print _fragments_ of HTML\n> code (like git_header_html or git_print_page_path) which would use probably\n> print_ prefix. Action subroutines output always whole page.\n\nWhy not \"print_*_page\", if they print out a whole page?\nI would \"git_header_html\" rename to \"print_header\"; it's clear that\nit prints out HTML ;-)\nAnd \"git_print_page_path\" only needs stripping of \"git_\" prefix.\n\nJosef\n"}]}