Brian Kernighan
Brian Wilson Kernighan (, the 'g' is silent; born January 1942 in Toronto) is a Canadian computer scientist who worked at Bell Labs alongside Unix creators Ken Thompson and Dennis Ritchie and contributed greatly to Unix and its school of thought. He is also coauthor of the AWK and AMPL programming languages. The 'K' of K&R; C and the 'K' in AWK both stand for 'Kernighan'. Brian Kernighan is currently a Professor at the Computer Science Department of Princeton University, where he is also the Undergraduate Department Representative.
http://wn.com/Brian_Kernighan
Steve McConnell
Steven C. McConnell is an author of many software engineering textbooks including Code Complete, Rapid Development, and Software Estimation. In 1998, McConnell was named as one of the three most influential people in the software industry by Software Development Magazine, along with Bill Gates and Linus Torvalds.
http://wn.com/Steve_McConnell
live.pirillo.com - Programming is NOT as scary of a task as you might imagine. I know some people who shudder at the thought of learning any programming language. However, take a read through these tips, and find out for yourself how to get started.
This is that infamous tv commercial that Sally Struthers did for the ICS "train at home" schools. Choose from high school, tv/vcr repair, electrician. . .even get your degree!!
www.softwarecareerlaunch.com Some people wonder if computer programming is still a good career to pursue. Here are five reasons why this is still a good profession and five reasons why you might want to consider something else.
Lec 3 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 3: Common code patterns: iterative programs Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lecture 4: Simple C Program - Richard Buckland UNSW
strings, elements and layout of ac program. using gcc, comments, ints, printf, scanf, main, #include, printing newlines. Discussion of clarity. also: about transistors, compiling, machine code
Lec 7 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 7: Lists and mutability, dictionaries, pseudocode, introduction to efficiency Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 2 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 2: Operators and operands; statements; branching, conditionals, and iteration Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 4 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 4: Decomposition and abstraction through functions; introduction to recursion Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 6 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 6: Bisection methods, Newton/Raphson, introduction to lists Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lecture 9: Binary search, bubble and selection sorts Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 12 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 12: More about debugging, knapsack problem, introduction to dynamic programming Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lecture 14: Analysis of knapsack problem, introduction to object-oriented programming Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 24 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 24: Course overview; what do computer scientists do? Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
This is a programming guide promised from my last video on the Wouxun KG-UVD1P. Hopefully this helps everyone who is having a hard time programming this radio. If you have any more questions, feel free to leave me a comment or message. This *also* is the same method for the KG-UV2D and KG-UV3D UV2D UV3D.
A professionally-developed instructional video for educators to show to their students as an introduction to pair programming. The video describes what pair programming is, the do's and don'ts of effective pairing, and the pros and cons of pair programming. Version 2. agile.csc.ncsu.edu Copyright 2008 North Carolina State University
Lec 5 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 5: Floating point numbers, successive refinement, finding roots Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 15 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 15: Abstract data types, classes and methods Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
Lec 19 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lecture 19: Biased random walks, distributions Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
live.pirillo.com - Programming is NOT as scary of a task as you might imagine. I know some people who shudder at the thought of learning any programming language. However, take a read through these tips, and find out for yourself how to get...
What is Computer Programming?
What is Computer Programming?
3:21
What is Computer Programming? Learn about programming at PTI with instructor Jim Madine....
Three Strange Definitions of Computer Programming from Edsger Dijkstra - Ron Burk
Three Strange Definitions of Computer Programming from Edsger Dijkstra - Ron Burk
5:19
Three Strange Definitions of Computer Programming Legendary computer scientist Edsger Dijkstra once said - Ron Burk...
EA Programming Career Paths
EA Programming Career Paths
16:46
This is a basic overview of software engineering / programming career paths at EA....
Sally Struthers ICS school tv commercial
Sally Struthers ICS school tv commercial
1:01
This is that infamous tv commercial that Sally Struthers did for the ICS "train at home" schools. Choose from high school, tv/vcr repair, electrician. . .even get your degree!!...
Is Software Programming a Good Career?
Is Software Programming a Good Career?
8:52
www.softwarecareerlaunch.com Some people wonder if computer programming is still a good career to pursue. Here are five reasons why this is still a good profession and five reasons why you might want to consider something else....
Lec 3 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 3 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
51:00
Lecture 3: Common code patterns: iterative programs Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu...
Lecture 4: Simple C Program - Richard Buckland UNSW
Lecture 4: Simple C Program - Richard Buckland UNSW
47:06
strings, elements and layout of ac program. using gcc, comments, ints, printf, scanf, main, #include, printing newlines. Discussion of clarity. also: about transistors, compiling, machine code...
Lec 7 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 7 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
46:22
Lecture 7: Lists and mutability, dictionaries, pseudocode, introduction to efficiency Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit...
Lec 2 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 2 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
50:49
Lecture 2: Operators and operands; statements; branching, conditionals, and iteration Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit...
Lec 4 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 4 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
51:27
Lecture 4: Decomposition and abstraction through functions; introduction to recursion Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit...
Lec 6 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 6 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
50:11
Lecture 6: Bisection methods, Newton/Raphson, introduction to lists Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses ...
ESC Programming using the Program Card
ESC Programming using the Program Card
4:14
www.myrcguides.com - Basic Programming instructions for some Hobbywing, Turnigy and Exceed RC ESC's....
Lec 9 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 9 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
47:30
Lecture 9: Binary search, bubble and selection sorts Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu...
Lec 12 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 12 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
49:47
Lecture 12: More about debugging, knapsack problem, introduction to dynamic programming Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.m...
Programming & patching: How to patch a program
Programming & patching: How to patch a program
9:58
In this video, we'll crack a program (crackme) by a patch which we will program ourselves in the C language. It will be fun!...
Lec 14 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 14 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
50:34
Lecture 14: Analysis of knapsack problem, introduction to object-oriented programming Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit...
Lec 24 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 24 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
42:48
Lecture 24: Course overview; what do computer scientists do? Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw....
This is a programming guide promised from my last video on the Wouxun KG-UVD1P. Hopefully this helps everyone who is having a hard time programming this radio. If you have any more questions, feel free to leave me a comment or message. This...
Introduction to Pair Programming, version 2
Introduction to Pair Programming, version 2
10:03
A professionally-developed instructional video for educators to show to their students as an introduction to pair programming. The video describes what pair programming is, the do's and don'ts of effective pairing, and the pros and ...
Lec 5 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 5 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
44:13
Lecture 5: Floating point numbers, successive refinement, finding roots Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More cour...
Lec 15 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 15 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
50:25
Lecture 15: Abstract data types, classes and methods Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu...
Lec 19 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
Lec 19 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
49:53
Lecture 19: Biased random walks, distributions Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu...
photo: Creative Commons / Magnus Manske
Alan Kay holding the prototype of Dynabook
photo: Creative Commons / WhisperToMe
Murray practiced out of the Armstrong Clinic in Houston. The clinic was raided during an investigation of Murray in July 2009.
Yahoo Daily NewsSAN FRANCISCO (AP) — Steve Jobs started Apple Computer with a high school friend in a Silicon Valley garage in 1976, was forced out a decade later, then returned to rescue the company. During his second stint, Apple grew into the most valuable technology company in the world. Jobs invented and...
Yahoo Daily NewsA very smart friend of mine once said that the whole difference between and , and thus between and PCs and , was simply that Bill Gates thought everyone wanted to be a programmer, at least a little bit, and Steve Jobs said, oh, no, they don't. Gates and Jobs both came out of the world of hobbyists...
Yahoo Daily NewsHe created a gadget revolution, but his other accomplishments may surprise you Yesterday, co-founder and tech icon Steve Jobs of the most successful tech company in the world. His accomplishments are many, and as the boss of Apple he oversaw the launch of hugely successful product lines like the...
Herald TribuneDaniel D. McCracken, the first best-selling author of books that taught people how to use computers, died on July 30 in New York. He was 81. The cause was cancer, his wife, Helen Blumenthal, said. Mr. McCracken wrote his first book, “Digital Computer Programming,” in 1957. At the time,...
Yahoo Daily NewsEarlier this evening, stunned us all with the news that he is , Inc. Jobs took a in January -- his second since 2009. He will remain as Chairman and will be succeeded as CEO by Tim Cook. Steve Jobs' stellar career is already the stuff of legend. He co-founded Apple Computer with Steve Wozniak in...
Yahoo Daily NewsSAN FRANCISCO (AP) — Steve Jobs' resignation as Apple Inc.'s CEO on Thursday was freighted with sentimental significance, the curtain call on a dramatic 14-year performance in which he rescued one of the world's most beloved brands from the brink of technological irrelevance. As second chances go,...
LA Daily NewsBy C.J. Lin, Staff WriterPosted: 08/25/2011 05:09:57 PM PDTUpdated: 08/25/2011 05:41:24 PM PDT Sunny Brae Elementary School Principal Susan Lasken stands in a third-grade classroom on Thursday, Aug. 25, 2011, where two iMac computers were stolen. Laken is reaching out to the public in the...
Yahoo Daily NewsSAN FRANCISCO (AP) — Hewlett-Packard plans to spin off its personal computer division into a separate business, according to news reports. The decision, according to unnamed sources cited in reports by The Wall StreetJournal and Bloomberg, would isolate a division that is HP's biggest generator of...
Yahoo Daily NewsTo: HEALTH AND NATIONAL EDITORS Contact: Alia Dastagir, +1-202-540-6524, adastagir@pewtrusts.org WASHINGTON, Aug. 24, 2011 /PRNewswire-USNewswire/ -- States making investments in voluntary home visiting programs too rarely use evidence of effectiveness to inform their policy decisions, according to...
Comments have a wide range of potential uses: from augmenting program code with basic descriptions, to generating external documentation. Comments are also used for integration with source code management systems and other kinds of external programming tools.
The flexibility provided by comments often allows for a wide degree of variability and potentially non-useful information inside source code. To address this, many technical commentators and software analysts subscribe to any of several "philosophies" and guidelines regarding the proper use of comments.
Overview
Comments are generally formatted as block comments (also called prologue comments or stream comments) or line comments (also called inline comments).
Block comments delimit a region of source code in which the region is allowed to span multiple lines. This region is specified with a start delimiter and an end delimiter. Some programming languages (such as MATLAB) allow block comments to be recursively nested inside one another, but others (such as Java) do not.
Line comments either start with a comment delimiter and continue until the end of the line, or in some cases, start at a specific column (character line offset) in the source code, and continue until the end of the line.
There are many different ways of writing comments and many commentators who offer sometimes conflicting advice.
:"Good comments don't repeat the code or explain it. They clarify its intent. Comments should explain, at a higher level of abstraction than the code, what you're trying to do."
Comments may also be used to explain why a block of code does not seem to fit conventions or best practices. This is especially true of projects involving very little development time, or in bug fixing. For example:
Algorithmic description
Sometimes source code contains a novel or noteworthy solution to a specific problem. In such cases, comments may contain an explanation of the methodology. Such explanations may include diagrams and formal mathematical proofs. This may constitute explanation of the code, rather than a clarification of its intent; but others tasked with maintaining the code base may find such explanation crucial. This might especially be true in the case of highly-specialized problem domains; or rarely-used optimizations, constructs or function-calls.
For example, a programmer may add a comment to explain why an insertion sort was chosen instead of a quicksort, as the former is, in theory, slower than the latter. This could be written as follows:
=== Resource inclusion ===
Logos, diagrams, and flowcharts consisting of ASCII art constructions can be inserted into source code formatted as a comment. Further, copyright notices can be embedded within source code as comments. Binary data may also be encoded in comments through a process known as binary-to-text encoding, although such practice is uncommon and typically relegated to external resource files.
The following code fragment is a simple ASCII diagram depicting the process flow for a system administration script contained in a Windows Script File running under Windows Script Host. Although a section marking the code appears as a comment, the diagram itself actually appears in an XMLCDATA section, which is technically considered distinct from comments, but can serve similar purposes.
Although this identical diagram could easily have been included as a comment, the example illustrates one instance where a programmer may opt not to use comments as a way of including resources in source code. These may include insert positions for automatic header file inclusion, commands to set the file's syntax highlighting mode, or the file's revision number. These functional control comments are also commonly referred to as annotations. Keeping documentation within source code comments is considered as one way to simplify the documentation process, as well as increase the chances that the documentation will be kept up to date with changes in the code.
C# and Visual Basic implement a similar feature called "XML Comments" which are read by IntelliSense from the compiled .NET assembly.
Normative views
There are various normative views and long-standing opinions regarding the proper use of comments in source code. Some of these are informal and based on personal preference, while others are published or promulgated as formal guidelines.
Need for comments
Technical commentators have documented varying viewpoints on whether and when comments are appropriate in source code. Some commentators assert that source code should be written with few comments, on the basis that the source code should be self-explanatory.
In between these views is the assertion that comments are neither beneficial nor harmful by themselves, and what matters is that they are correct and kept in sync with the source code, and omitted if they are superfluous, excessive, difficult to maintain or otherwise unhelpful.
Level of detail
Depending on the intended audience of the code and other considerations, the level of detail and description may vary considerably.
For example, the following Java comment would be suitable in an introductory text designed to teach beginning programming:
This level of detail, however, would not be appropriate in the context of production code, or other situations involving experienced developers. Such rudimentary descriptions are inconsistent with the guideline: "Good comments ... clarify intent." The occurrence of this phenomenon can be easily seen from online resources that track profanity in source code.
Comments in web templates
Web development presents a special security challenge related to comments, because it is not uncommon for HTML comments to be viewable in plain text by any user of the application. Sections of code that are "commented out" in HTML templates may therefore present a security vulnerability.
Styles
There are many stylistic alternatives available when considering how comments should appear in source code. For larger projects involving a team of developers, comment styles are either agreed upon before a project starts, or evolve as a matter of convention or need as a project grows. Usually programmers prefer styles that are consistent, non-obstructive, easy to modify, and difficult to break.
The following code fragments in C demonstrate just a tiny example of how comments can vary stylistically, while still conveying the same basic information:
Factors such as personal preference, flexibility of programming tools, and other considerations tend to influence the stylistic variants used in source code. For example, Variation Two might be disfavored among programmers who do not have source code editors that can automate the alignment and visual appearance of text in comments.
Software consultant and technology commentator Allen Holub is one expert who advocates aligning the left edges of comments:
End-of-line
In this form, all the text from the ASCII characters // to the end of the line is ignored.
Different styles can be chosen for different areas of code, from individual lines to paragraphs, routines, files, and programs. If the syntax supports both line comments and block comments, one method is to use line comments only for minor comments (declarations, blocks and edits) and to use block comments to describe higher-level abstractions (functions, classes, files and modules).
Sometimes projects try to enforce rules like "one comment every ten lines". These kinds of rules can be counterproductive when too rigorous, but may provide a useful standard of measurement and consistency if the project participants deem it necessary.
Tags
Certain tags are used in comments to assist in indexing common issues. Such tags are commonly syntax-highlighted within text editors and can be searched with common programming tools, such as the Unixgrep utility. Examples of tag conventions include:
FIXME to mark potential problematic code that requires special attention and/or review.
NOTE to document inner workings of code and indicate potential pitfalls.
TODO to indicate planned enhancements.
XXX to warn other programmers of problematic or misguiding code.
There is a risk that tags accumulate over time; it is advisable to include the date and the tag owner in the tag comment to ease tracking.
Examples
Comparison
Typographic conventions to specify comments vary widely. Further, individual programming languages sometimes provide unique variants. For a detailed review, please consult the programming language comparison article.
In context
BASIC classic
This BASIC code fragment is a completely functioning program in which the comments describe what the program does for the benefit of novice programmers.
When run, this program repeatedly prints the word "WIKIPEDIA" (without quotes) in an infinite loop.
C
This C code fragment demonstrates the use of a prologue comment or "block comment" to describe the purpose of a conditional statement. The comment explains key terms and concepts, and includes a short signature by the programmer who authored the code.
This excerpt is from the fork.c file from the Linux kernel source.
ColdFusion
ColdFusion uses comments similar to HTML/XML, but instead of two dashes, it uses three. These comments are caught by the ColdFusion engine and not printed to the browser.
Fortran IV
This Fortran IV code fragment demonstrates how comments are used in that language, with the comments themselves describing the basic formatting rules.
Fortran 90
This Fortran code fragment demonstrates how comments are used in that language, with the comments themselves describing the basic formatting rules.
Java
This Java code fragment shows a block comment used to describe the setToolTipText method. The formatting is consistent with Sun MicrosystemsJavadoc standards. The comment is designed to be read by the Javadoc processor.
Objective Caml
OCaml uses nestable comments, which is useful when commenting a code block.
Perl
Line comments in Perl, and many other scripting languages, begin with a hash (#) symbol. A comment at the beginning, called the shebang, tells the system what interpreter to use.
PHP
Comments in PHP can be either in C++ style (both inline and block), or in Perl style. PHPDoc is a style adapted from Javadoc and is a common standard for documenting PHP code.
Python
Comments in Python use the hash character. Python programs start with #! to tell the operating system which interpreter to use.
Python also supports docstrings a special sort of comment usually enclosed in triple-quotes (''').
Single line commenting: (line starts with hash "#")
#this is commented
This is not a comment
Multi-line commenting: (comments goes between keywords "begin" and "end")
=begin
whatever goes in here
will be ignored :)
=end
This is not a comment
SQL
Comments in SQL are in single-line-only form, when using two dashes:
The syntax for Transact-SQL also supports alternative formats for specifying comments. One format supported by this syntax is identical to the "block comment" style used in the syntax for C++ and Java.
Haskell
Single line comments in Haskell start with '--' (two dashes), and multiple line comments start with '{-' and end with '-}'.