background preloader

C Craft - Chapter 1. Introduction

C Craft - Chapter 1. Introduction
C is the desert island language. This is my favourite statement from a talk Rob Pike gave in 2001. Despite its age, despite many flaws, C is still the de facto standard, the lingua franca. Why? As with other older languages, inertia is partly to blame, but this cannot be the only reason. C must possess a near-perfect balance of vital language features. Or as Linus Torvalds puts it, “C is the only sane choice”. One of C’s designers, Dennis Ritchie, gives a modest account of the evolution of C. The canonical reference, Kernighan and Ritchie’s "The C Programming Language" is slim, yet contains much more than the language specification. Not only is C easy for humans to understand, but machines too can pick up the language quickly. I can roughly envision the assembly generated by a C statement, so I can make educated guesses about time and space efficiency. Brevity is the soul of wit. In my Eiffel days, I was encouraged to write "integer", not "int", "character", not "char", and so on.

Some lesser-known truths about programming | Dot Mac My experience as a programmer has taught me a few things about writing software. Here are some things that people might find surprising about writing code: Averaging over the lifetime of the project, a programmer spends about 10-20% of his time writing code, and most programmers write about 10-12 lines of code per day that goes into the final product, regardless of their skill level. Good programmers spend much of the other 90% thinking, researching, and experimenting to find the best design. Bad programmers spend much of that 90% debugging code by randomly making changes and seeing if they work.A good programmer is ten times more productive than an average programmer. A great programmer is 20-100 times more productive than the average.

code {poems} by Ishac Bertran (@ishacbertran) - Poetry with code - Submissions now open! Ishac Bertran sent us details about his latest project - Code and Poetry: Lately I’ve been sketching an experimental project about Code and Poetry. This two terms have been connected for many reasons – I thought it would be interesting to explore the most literal meaning of it, using code to write traditional poetry. Code has many layers of abstraction that normal language doesn’t have, and I hope this can provide a new angle to contemporary poetry. Ishac will be collecting code poems from people interested in contributing. You can find more information about the project on the website: {poems} is a project by Ishac Bertran Six ways to write more comprehensible code I learned to write, clear, maintainable code the hard way. For the last twelve years, I've made my living writing computer games and selling them over the Net using the marketing technique that was once charmingly known as shareware. What this means is that I start with a blank screen, start coding, and, a few tens of thousands of lines of code later, I have something to sell. This means that, if I make a stinky mess, I'm doing it in my own nest. So I have been well rewarded by learning about good, sane programming techniques. But there are many who, like me, stumbled into programming in an unexpected or unusual way and never had anyone drill this stuff into them. The example case For illustration purposes, our example program throughout this article is a hypothetical computer game called Kill Bad Aliens. Figure 1. The game will take place in periods of time called Waves. Killing an alien gives you some points. When a bomb hits you, your ship blows up and another appears. Back to top Oh?

Dijkstra Archive: Home page - StumbleUpon The Manuscripts Like most of us, Dijkstra always believed it a scientist’s duty to maintain a lively correspondence with his scientific colleagues. To a greater extent than most of us, he put that conviction into practice. For over four decades, he mailed copies of his consecutively numbered technical notes, trip reports, insightful observations, and pungent commentaries, known collectively as “EWDs”, to several dozen recipients in academia and industry. Although most of Dijkstra’s publications began life as EWD manuscripts, the great majority of his manuscripts remain unpublished. The original manuscripts, along with diaries, correspondence, photographs, and other papers, are housed at The Center for American History of The University of Texas at Austin. Indexes Each manuscript file is accessible through either of two indexes: 0. 1. EWD-numbered documents (This index gives an approximate correspondence between manuscripts’ EWD numbers and the year in which they appeared.) Summaries Revised

Advanced Programming Languages Introduction Research Syntax Semantics Static Semantics ( Type Theory ) Dynamic Semantics Semantic Related Developments Abstract Interpretation Program Transformation Decompilation Partial Evaluation Pragmatics ( Software Patterns , Generic Programming , Visual Programming , Persistence , Reflectiveness , Hyperprogramming) Semiotics Implementation Techniques: Garbage collection , Abstract Machines Some Conferences (not updated) People and Groups Teaching Introduction to Programming Languages Selecting First Programming Language Courses about Programming Languages Courses about Foundations of Programming Languages Courses about Language Processors Paradigms Comparing Programming Languages Functional Programming ( Haskell, ML) Logic Programming (Prolog) Object Oriented Programming (Java, C++, Smalltalk, ...) Cross Paradigms : Logic-Functional , Object Oriented-Functional , Object Oriented-Logic My List of Programming Languages Selected Bibliography Selected Papers Selected Books Acknowledgments Backus Naur Form (BNF) C.

s Introduction to Complex Systems - StumbleUpon by David Kirshbaum I. Introduction: Complex Systems Theory : Basic Definition II. Four Important Characteristics of Complexity: III. I. A Complex System is any system which involves a number of elements, arranged in structure(s) which can exist on many scales. Previously, when studying a subject, researchers tended to use a reductionist approach which attempted to summarize the dynamics, processes, and change that occurred in terms of lowest common denominators and the simplest, yet most widely provable and applicable elegant explanations. But since the advent of powerful computers which can handle huge amounts of data, researchers can now study the complexity of factors involved in a subject and see what insights that complexity yields without simplification or reduction. Scientists are finding that complexity itself is often characterized by a number of important characteristics: (II.1) Self-Organization(II.2) Non-Linearity(II.3) Order/Chaos Dynamic(II.4) Emergent Properties. Examples

Beginning Game Development: Part I – Introduction | Coding4Fun Articles Part I – Introduction Welcome to the first article of an introductory series on game programming using the Microsoft .NET Framework and managed DirectX 9.0. This series as aimed at beginning programmers who are interested in developing a game for their own use with the .NET Framework and DirectX. In this series, we are going to build a simple game to illustrate the various components of a commercial game. Tools: Before we start writing our first game we need to talk about the tools we will use. The most important tool for any developer is the Integrated Development Environment (IDE). Visual Studio 2005 (also known by the codename “Whidbey") is the third version of the standard Microsoft IDE for .NET Framework-based applications. The second important tool we need to create a great looking game is a graphics Application Programming Interface (API). At some point in your game development experience you are going to have to create or modify graphics. What makes a successful game? Our Game idea:

code school If you code HTML, Zen Coding will change your life If you write HTML for a living, and you don't know Zen Coding yet, you are missing out big time. This is basically the coolest thing I've seen all week. I have been using it for a few days now; at first it seemed kind of gimmicky and I wasn't sure I could grasp the syntax, but today I really got to explore it, and woah is it awesome. Okay, I'll stop tripping over myself with excitement over here and try to tell you what this thing does, in a nutshell: It expands abbreviations into complete HTML structures (divs, tables, cells, links, lists), and does it in the most freaking intelligent way I have seen in a long time. I'm serious! For instance, that arcane-looking string of text in the screenshot expands with a single keystroke into this: This thing leaves any other tag-completion method I have ever seen for HTML in the dust. There are existing implementations for multiple editors, such as Komodo Edit (which is the one I'm using). There are easy ways to wrap existing lines with tags.

Lesson: Object-Oriented Programming Concepts (The Java™ Tutorials > Learning the Java Language) If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language. What Is an Object? An object is a software bundle of related state and behavior. What Is a Class? A class is a blueprint or prototype from which objects are created. What Is Inheritance? Inheritance provides a powerful and natural mechanism for organizing and structuring your software. What Is an Interface? An interface is a contract between a class and the outside world. What Is a Package? A package is a namespace for organizing classes and interfaces in a logical manner. Questions and Exercises: Object-Oriented Programming Concepts

Bill the Lizard: Books Programmers Don't Really Read Mark Twain once said that a classic novel is one that many people want to have read, but few want to take the time to actually read. The same could be said of "classic" programming books. Periodically over on Stack Overflow (and in many other programming forums) the question comes up about what books are good for programmers to read. The question has been asked and answered several times, in several different ways. Books Most Programmers Have Actually Read I've read all of these books myself, so I have no difficulty believing that many moderately competent programmers have read them as well. Among the most commonly recommended programming books there is another group that deserves special consideration. Books Programmers Claim to Have Read Introduction to Algorithms (CLRS)This book may have the most misleading title of any programming book ever published.

Ruby Programming Language

Related: