Meta tags:
Headings (most frequently used words):
the, elements, of, programming, style, contents, lessons, reception, references, external, links,
Text of the page (most frequently used words):
the (49), and (23), style (18), programming (17), make (16), #elements (15), use (13), from (11), don (11), this (10), you (10), that (9), code (8), edit (8), input (8), wikipedia (7), book (7), for (7), languages (6), with (6), kernighan (6), plauger (6), page (5), write (5), programs (5), are (5), program (5), sure (5), before (5), faster (5), contents (4), search (4), was (4), references (4), mcgraw (4), hill (4), books (4), brian (4), links (4), edition (4), your (4), avoid (4), article (4), hide (4), move (4), sidebar (4), view (3), may (3), non (3), articles (3), reliable (3), short (3), 1974 (3), 1978 (3), isbn (3), read (3), its (3), examples (3), comment (3), data (3), help (3), understand (3), mean (3), bad (3), efficiency (3), changes (3), simple (3), special (3), let (3), not (3), test (3), one (3), easy (3), file (3), functions (3), work (3), too (3), lessons (3), such (3), published (3), pages (3), sources (3), tools (3), main (3), toggle (2), table (2), statement (2), contact (2), about (2), privacy (2), policy (2), terms (2), agree (2), categories (2), all (2), lacking (2), february (2), 2015 (2), description (2), different (2), wikidata (2), fiction (2), computer (2), retrieved (2), title (2), talk (2), external (2), new (2), york (2), kilobaud (2), microcomputing (2), other (2), then (2), should (2), reception (2), find (2), popular (2), today (2), been (2), when (2), written (2), many (2), generally (2), something (2), variable (2), names (2), rewrite (2), echo (2), comments (2), count (2), keep (2), compiler (2), sacrifice (2), clarity (2), small (2), right (2), equality (2), zero (2), some (2), variables (2), self (2), output (2), end (2), procedures (2), first (2), language (2), choose (2), machine (2), dirty (2), clearly (2), what (2), practical (2), second (2), has (2), personal (2), learn (2), appearance (2), upload (2), history (2), log (2), create (2), account (2), donate (2), menu (2), add, topic, mobile, cookie, statistics, developers, conduct, legal, safety, contacts, disclaimers, text, available, under, additional, apply, using, site, registered, trademark, profit, organization, wikimedia, foundation, inc, creative, commons, attribution, sharealike, license, rendered, parsoid, last, edited, august, 2026, utc, hidden, collaborative, https, org, index, php, the_elements_of_programming_style, oldid, 1368423386, youtube, 2009, princeton, selected, quotes, 034207, 2nd, 034199, reeves, jack, january, 1980, 2014, june, stated, intend, used, people, expect, become, professional, programmer, mandatory, reading, modern, readers, shortcoming, older, quite, those, few, had, invented, however, points, concern, stylistic, structural, issues, transcend, details, particular, fortran, procedural, over, document, layouts, format, reader, labels, just, every, instrument, measure, making, diddle, better, algorithm, cases, truly, strain, reorganize, instead, optimizations, gains, clear, fail, safe, compare, floating, point, numbers, solely, while, times, hardly, ever, check, answers, hand, their, boundary, values, does, nothing, gracefully, careful, loop, exits, same, place, middle, bottom, take, care, branch, way, watch, out, off, errors, debugging, compilers, stop, bug, initialized, identifying, allow, defaults, both, proofread, uniform, formats, prepare, explanatory, identify, recover, possible, terminate, marker, doesn, violate, limits, plausibility, validity, recursive, recursively, defined, structures, big, pieces, patch, gotos, completely, can, readable, modularize, pseudo, translate, into, whatever, have, representation, makes, logical, expression, hard, try, transforming, unnecessary, branches, won, confused, parenthesize, ambiguity, replace, repetitive, expressions, calls, common, temporary, library, whenever, feasible, say, simply, directly, clever, summarized, each, section, pithy, maxims, built, actual, textbooks, results, treatment, rather, than, abstract, academic, discussion, diplomatic, sympathetic, criticism, unabashedly, honest, well, which, finds, fault, authors, own, example, pays, explicit, homage, tone, considered, template, promoting, discussions, influential, spawned, series, similar, texts, tailored, individual, etc, matlab, java, structured, edsger, dijkstra, white, strunk, study, advocating, notion, only, satisfy, but, also, readability, humans, specifically, engineers, originally, technical, writers, programmers, software, maintenance, 978, 0070342071, 168, publication, date, author, cover, potentially, preventing, being, how, remove, message, please, replacing, more, appropriate, independent, citations, improve, neutral, verifiable, rely, excessively, closely, associated, subject, free, encyclopedia, item, projects, printable, version, download, pdf, print, export, switch, legacy, parser, get, shortened, url, cite, information, permanent, link, related, here, general, actions, english, 日本語, العربية, top, recent, community, portal, contribute, random, current, events, navigation, jump, content,
Text of the page (random words):
the elements of programming style wikipedia jump to content main menu main menu move to sidebar hide navigation main page contents current events random article about wikipedia contact us contribute help learn to edit community portal recent changes upload file special pages search search appearance donate create account log in personal tools donate create account log in contents move to sidebar hide top 1 lessons 2 reception 3 references 4 external links toggle the table of contents the elements of programming style 2 languages العربية 日本語 edit links article talk english read edit view history tools tools move to sidebar hide actions read edit view history general what links here related changes upload file permanent link page information cite this page get shortened url switch to legacy parser print export download as pdf printable version in other projects wikidata item appearance move to sidebar hide from wikipedia the free encyclopedia 1978 book by brian w kernighan and p j plauger this article may rely excessively on sources too closely associated with the subject potentially preventing it from being verifiable and neutral please help improve this article by replacing such sources with more appropriate citations to reliable independent sources february 2015 learn how and when to remove this message the elements of programming style cover of the second edition author brian w kernighan and p j plauger published mcgraw hill publication date 1978 pages 168 pages isbn 978 0070342071 the elements of programming style by brian w kernighan and p j plauger is a study of programming style advocating the notion that computer programs should be written not only to satisfy the compiler or personal programming style but also for readability by humans specifically software maintenance engineers programmers and technical writers it was originally published in 1974 the book pays explicit homage in title and tone to the elements of style by strunk white and is considered a practical template promoting edsger dijkstra s structured programming discussions it has been influential and has spawned a series of similar texts tailored to individual languages such as the elements of c programming style the elements of c style the elements of java tm style the elements of matlab style etc the book is built on short examples from actual published programs in programming textbooks this results in a practical treatment rather than an abstract or academic discussion the style is diplomatic and generally sympathetic in its criticism and unabashedly honest as well some of the examples with which it finds fault are from the authors own work one example in the second edition is from the first edition lessons edit its lessons are summarized at the end of each section in pithy maxims such as let the machine do the dirty work write clearly don t be too clever say what you mean simply and directly use library functions whenever feasible avoid too many temporary variables write clearly don t sacrifice clarity for efficiency let the machine do the dirty work replace repetitive expressions by calls to common functions parenthesize to avoid ambiguity choose variable names that won t be confused avoid unnecessary branches if a logical expression is hard to understand try transforming it choose a data representation that makes the program simple write first in easy to understand pseudo language then translate into whatever language you have to use modularize use procedures and functions avoid gotos completely if you can keep the program readable don t patch bad code rewrite it write and test a big program in small pieces use recursive procedures for recursively defined data structures test input for plausibility and validity make sure input doesn t violate the limits of the program terminate input by end of file marker not by count identify bad input recover if possible make input easy to prepare and output self explanatory use uniform input formats make input easy to proofread use self identifying input allow defaults echo both on output make sure all variables are initialized before use don t stop at one bug use debugging compilers watch out for off by one errors take care to branch the right way on equality be careful if a loop exits to the same place from the middle and the bottom make sure your code does nothing gracefully test programs at their boundary values check some answers by hand 10 0 times 0 1 is hardly ever 1 0 7 8 is zero while 7 0 8 0 is not zero don t compare floating point numbers solely for equality make it right before you make it faster make it fail safe before you make it faster make it clear before you make it faster don t sacrifice clarity for small gains in efficiency let your compiler do the simple optimizations don t strain to re use code reorganize instead make sure special cases are truly special keep it simple to make it faster don t diddle code to make it faster find a better algorithm instrument your programs measure before making efficiency changes make sure comments and code agree don t just echo the code with comments make every comment count don t comment bad code rewrite it use variable names that mean something use statement labels that mean something format a program to help the reader understand it document your data layouts don t over comment modern readers may find it a shortcoming that its examples use older procedural programming languages fortran and pl i that are quite different from those popular today few of today s popular languages had been invented when this book was written however many of the book s points that generally concern stylistic and structural issues transcend the details of particular languages reception edit kilobaud microcomputing stated that if you intend to write programs to be used by other people then you should read this book if you expect to become a professional programmer this book is mandatory reading 1 references edit reeves jack w january 1980 the elements of programming style kilobaud microcomputing p 9 retrieved 23 june 2014 b w kernighan and p j plauger the elements of programming style mcgraw hill new york 1974 isbn 0 07 034199 0 b w kernighan and p j plauger the elements of programming style 2nd edition mcgraw hill new york 1978 isbn 0 07 034207 5 external links edit j plauger selected quotes from the elements of programming style elements of programming style 2009 brian kernighan talk at princeton on youtube retrieved from https en wikipedia org w index php title the_elements_of_programming_style oldid 1368423386 categories 1974 non fiction books computer programming books collaborative non fiction books mcgraw hill books hidden categories articles with short description short description is different from wikidata articles lacking reliable references from february 2015 all articles lacking reliable references this page was last edited on 8 august 2026 at 23 51 utc page was rendered with parsoid text is available under the creative commons attribution sharealike 4 0 license additional terms may apply by using this site you agree to the terms of use and privacy policy wikipedia is a registered trademark of the wikimedia foundation inc a non profit organization privacy policy about wikipedia disclaimers contact wikipedia legal safety contacts code of conduct developers statistics cookie statement mobile view search search toggle the table of contents the elements of programming style 2 languages add topic
|