background preloader

Top 10 Ways to be Screwed by "C"

Top 10 Ways to be Screwed by "C"
To get on this list, a bug has to be able to cause at least half a day of futile head scratching, and has to be aggravated by the poor design of the "C" language. In the interests of equal time, and to see how the world has progressed in the 20-odd years since "C" escaped from its spawning ground, see my Top 10 Ways to be Screwed by the Java programming language, and for more general ways to waste a lot of time due to bad software, try my Adventures in Hell page. A better language would allow fallible programmers to be more productive. Infallible programmers, of the type unix' and "C" designers anticipated, need read no further. Non-terminated comment, "accidentally" terminated by some subsequent comment, with the code in between swallowed. a=b; /* this is a bug c=d; /* c=d will never happen */ Accidental assignment/Accidental Booleans if(a=b) c; /* a always equals b, but c will be executed if b! Closely related to this lack of rigor in booleans, consider this construction: Or consider this:

Computer Hope's free computer help Download This download is ideal for situations where a custom build will not be required. This archive contains the full Dojo, Dijit, and DojoX projects, compressed and optimized for immediate deployment. All non-essential files have been removed from this distribution including tests and demonstrations. Dojo Base: dojo.js: compressed (41KB, gzipped) uncompressed (comments inline) A single-file download providing only the base Dojo APIs. A full, uncompressed source release of the Dojo Toolkit -- ideal for development.

The GNU C Library Node: Top Next: Introduction Prev: (dir) Up: (dir) This is Edition 0.06 DRAFT, last updated 24 October 1994, of The GNU C Library Reference Manual , for Version 1.09 Beta of the GNU C Library. Introduction Purpose of the GNU C Library. Error Reporting How the GNU Library functions report error conditions. Memory Allocation Your program can allocate memory dynamically and manipulate it via pointers. Character Handling Character testing and conversion functions. String and Array Utilities Utilities for copying and comparing strings and arrays. Extended Characters Support for extended character sets. Locales The country and language can affect the behavior of library functions. Searching and Sorting General searching and sorting functions. Pattern Matching Matching wildcards and regular expressions, and shell-style ``word expansion''. I/O Overview Introduction to the I/O facilities. Streams High-level, portable I/O facilities. Low-Level I/O Low-level, less portable I/O. File System Interface Pipes and FIFOs Sockets Names

Scriptol.com. Tutorials and tools for creating a Web 2.0 site. How to Think Like a Computer Scientist — How to Think Like a Computer Scientist: Learning with Python 3 Version date: October 2012 by Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers (based on 2nd edition by Jeffrey Elkner, Allen B. Downey, and Chris Meyers) Corresponding author: p.wentworth@ru.ac.za Source repository is at For offline use, download a zip file of the html or a pdf version (the pdf is updated less often) from Search PageCopyright NoticeForewordPrefacePreface-3 This Rhodes Local Edition (RLE) of the bookContributor ListChapter 1 The way of the programChapter 2 Variables, expressions, and statementsChapter 3 Hello, little turtles!

Optimizing C and C++ Code Embedded software often runs on processors with limited computation power, thus optimizing the code becomes a necessity. In this article we will explore the following optimization techniques for C and C++ code developed for Real-time and Embedded Systems. Many techniques discussed here have roots in the material we covered in the articles dealing with C to Assembly translation. A good understanding of the following articles will help: Premature optimization is the root of all evil Donald Knuth wrote, "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. In general, correctness and readability considerations trump code performance issues for most of your code. Adjust structure sizes to power of two Place case labels in narrow range Place frequent case labels first Splitting a switch statement

Scratch Projects :: Programming Tutorials From Scratch To Finish 6 Books Every Programmer Should Own I’ve seen many lists about the best programming books and I am sure there are a lot of books that are specific to a programming knowledge or technology – that I have not included in my list. The books I have chosen are those that are meant to inspire, increase productivity and improve your programming design skills. Note: This list has no particular order. Code Complete 2 Steve McConnell The main focus of this book to help you improve your programming design skills. The Pragmatic Programmer: From Journeyman to Master Andrew Hunt and David Thomas This book focuses on the best practices of programming (i.e. what you should and should not do). Pragmatic Thinking and Learning: Refactor Your Wetware Andy Hunt From the author of The Pragmatic Programmer, this book takes one-step back from programming and focuses on your everyday thinking and problem solving skills. The Productive Programmer Neal Ford and David Bock Algorithms in a Nutshell George T Heineman, Gary Pollice and Stanley Selkow Thomas H.

perftools - Google Code These tools are for use by developers so that they can create more robust applications. Especially of use to those developing multi-threaded applications in C++ with templates. Includes TCMalloc, heap-checker, heap-profiler and cpu-profiler. Recent news: 19 Apr 2014 gperftools 2.2rc is out! Here are notable changes since 2.1: a number of fixes for a number compilers and platforms. The following people helped with ideas or patches (based on git log, some contributions purely in bugtracker might be missing): Andrew C. 30 July 2013 gperftools 2.1 is out! Just few fixes where merged after rc. Some fixes for debug allocation on POWER/Linux 20 July 2013 gperftools 2.1rc is out! As a result of more than a year of contributions we're ready for 2.1 release. But before making that step I'd like to create RC and make sure people have chance to test it. Here are notable changes since 2.0: fixes for building on newer platforms. 06 February 2012 Hello from your new maintainer. -Dave 03 February 2012 26 August 2011

Free Programming and Computer Science Books Free Programming Resources

Related: