background preloader

Extreme programming

Extreme programming
Planning and feedback loops in extreme programming. Extreme programming (XP) is a software development methodology which is intended to improve software quality and responsiveness to changing customer requirements. As a type of agile software development,[1][2][3] it advocates frequent "releases" in short development cycles, which is intended to improve productivity and introduce checkpoints at which new customer requirements can be adopted. Critics have noted several potential drawbacks,[5] including problems with unstable requirements, no documented compromises of user conflicts, and a lack of an overall design specification or document. History[edit] Although extreme programming itself is relatively new, many of its practices have been around for some time; the methodology, after all, takes "best practices" to extreme levels. Origins[edit] The first time I was asked to lead a team, I asked them to do a little bit of the things I thought were sensible, like testing and reviews. Related:  Software & programming

Pair programming Pair programming Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the driver, writes code while the other, the observer, pointer or navigator,[1] reviews each line of code as it is typed in. The two programmers switch roles frequently. While reviewing, the observer also considers the "strategic" direction of the work, coming up with ideas for improvements and likely future problems to address. Benefits[edit] Economics: Pairs spend about 15% more time on programs than individuals. Pair programming has proven to be such a successful learning technique that the St. Studies[edit] There are both empirical studies and meta-analyses of pair programming. Empirical studies[edit] Williams: error reduction with increased effort[edit] The Economist noted, Lui: comparing pairs to working alone[edit] A study (Lui 2006) compared novice pairs to novices working alone, and expert pairs to experts working alone. John T. Jerzy R. [edit]

Code smell In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem. Code smells are usually not bugs—they are not technically incorrect and do not currently prevent the program from functioning. Instead, they indicate weaknesses in design that may be slowing down development or increasing the risk of bugs or failures in the future. The term appears to have been coined by Kent Beck on WardsWiki in the late 1990s. Common code smells[edit] See also[edit] References[edit] External links[edit] International Obfuscated C Code Contest Prior to 2004, entries were submitted by email.[4] In 2004, for the 17th IOCCC, the competition switched to using a web-based submission process.[5] Entries are evaluated anonymously by a panel of judges. The judging process is documented in the competition guidelines[6] and consists of elimination rounds. By tradition, no information is given about the total number of entries for each competition. Winning entries are awarded with a category, such as "Worst Abuse of the C preprocessor" or "Most Erratic Behavior", and then announced on the official IOCCC website. Entries that do not make it are deleted and forgotten; the contest states that being announced on the IOCCC website is the award for winning. History[edit] The IOCCC was started by Landon Curt Noll and Larry Bassel in 1984 while employed at National Semiconductor's Genix porting group. Rules[edit] Each year, the rules of the contest are published on the IOCCC website. "Hacking the contest rules is a tradition". Examples[edit]

Spaghetti Code Code in which control flow is tangled up like Spaghetti. ...and one of those things that "everybody else does." For a more "scientific", pattern-based approach to pasta, see the "BigBallOfMud" development model in PatternLanguagesOfProgramDesign v4.0. The same article is available online at See also: The opposite of RavioliCode. Not quite as bad as ChineseNoodleCode? or RamenCode?. The term SpaghettiCode came into vogue with the invention of block structured programming languages - languages with if and while statements that executed blocks of code delimited with begin and end statements (or punctuation). Does anyone else get the feeling that HyperText and URLs in web-based IT applications tend to become the Web designers' version of SpaghettiCode? Also known as Cpaghe++i code. Q. Sometimes this term refers to the use of GoTos. Overuse of callback listeners... ...can create SpaghettiCode.

Grammars and Parsers (Back to Molly Pages) [Author: Hursh Jain] This page contains a small subset of my own parsing-related notes that I find handy (and otherwise tend to forget often). However, the section (below) on LL(1) recursive descent parsing is rather comprehensive and complete. For the best (by far) overall reference on this topic, see: Parsing Techniques - A Practical Guide by Dick Grune and Ceriel J.H. Note 1: Keep in mind that a lot of theory-of-computation literature takes a pseudo-mathematical approach with "sets", which is the last refuge of the untalented and uninspired. Note 2: The best approach, as always, is to both write and examine as much real code and real programs as possible. Grammars Grammars describe hierarchical structures. These structures can be self-similar or nested at various levels. One such way is Lindenmayer-systems (L-systems). Here's a simple Grammar: X -> a X b The structure X is composed of a X b ...which contains X itself ! -> a (X -> a X b) b -> a a X b b and so on: Note:

LGP - 30 PROGRAMMING MANUAL Go to On Line Documents, Go to Go to Antique Computer home page Electronic Computer Royal McBee Corporation Port Chester, New York April 1957 Printed in the U.S.A What IS PROGRAMMING? What type of computer is the LGP-30? Functional components of the LGP-30 Why a stored program computer? Memory drum Track Sector Locations and addresses Recirculating registers Bit Number words Instruction words Summary Instruction execution * Bring from memory * M Multiply * Add * Hold and Store * Stop Looping * Unconditional transfer Working storage The counter * Subtract * Test Initializing * Clear and store Subroutines * Return address Final program * Store address * Extract * N Multiply * Divide ** Print and Input Summary Binary numbers Binary arithmetic Number conversion and scaling M multiplication Addition Overflow Truncation Division Negative number representation Scaling example Shifting N multiplication Hexadecimal digits Scaling for range Binary representation of orders Print Input Bootstrap Turning power on Control switches Instruction representation Add

Sparse coding Mammalian brains consist of billions of neurons, each capable of independent electrical activity. Information in the brain is represented by the pattern of activation of this large neural population, forming a neural code. The neural code defines what pattern of neural activity corresponds to each represented information item. In the sensory system, such items may indicate the presence of a stimulus object or the value of some stimulus parameter, assuming that each time this item is represented the neural activity pattern will be the same or at least similar. One important and relatively simple property of this code is the fraction of neurons that are strongly active at any one time. For a set of N binary neurons (which can either be active or inactive), the average (i.e., expected value) of this fraction across all information items is the density of the code. Figure 1: Sparsely encoding basis functions learned from natural images Local codes Dense distributed codes Sparse codes Kurtosis

30 free programming eBooks « Since this post got quite popular I decided to incorporate some of the excellent suggestions posted in the comments, so this list now has more than 50 books in it. BTW: I’m not very strict on the definition of “ebook”, some of them are really just HTML versions of books. [UPDATED: 2012-01-18] Learning a new programming language always is fun and there are many great books legally available for free online. Here’s a selection of 30 of them: Lisp/Scheme:Common Lisp: A Gentle Introduction to Symbolic ComputationHow to Design ProgramsInterpreting Lisp (PDF, suggested by Gary Knott)Let Over LambdaOn LispPractical Common LispProgramming in Emacs LispProgramming Languages. Ruby:The Bastards Book of Ruby (suggested by Dan Nguyen)Clever Algorithms (suggested by Tales Arvelos)Data Structures and Algorithms with Object-Oriented Design Patterns in RubyLearn Ruby the Hard WayLearn to ProgramMacRuby: The Definitive GuideMr. Erlang:Concurrent Programming in ErlangLearn You Some Erlang for Great Good

Penrose Tiling in Obfuscated Python Who says you can’t write obfuscated Python? Here’s a Python script which renders some Penrose tiling. Yes, this is valid Python code: _ =\ """if! When this program runs, it outputs a 1000x1000 image file to penrose.png, consisting of about 2212 Penrose tiles rendered with a 3D relief effect. The script requires Pycairo. Penrose tilings are cool because they cover the entire plane in an aperiodic way – a shifted copy of the image never matches the original. Python never got much credit as an obfuscated programming language, compared to C or Perl. I believe this is the first example of obfuscated Python which outputs a high-resolution image.

Obfuscation (software) In software development, obfuscation is the deliberate act of creating obfuscated code, i.e. source or machine code that is difficult for humans to understand. Programmers may deliberately obfuscate code to conceal its purpose (security through obscurity) or its logic, in order to prevent tampering, deter reverse engineering, or as a puzzle or recreational challenge for someone reading the source code. Programs known as obfuscators transform readable code into obfuscated code using various techniques. Writing and reading obfuscated source code can be a brain teaser for programmers. Types of obfuscations include simple keyword substitution, use or non-use of whitespace to create artistic effects, and self-generating or heavily compressed programs. Short obfuscated Perl programs may be used in signatures of Perl programmers. This is a winning entry from the International Obfuscated C Code Contest[8] written by Ian Phillipps in 1988[9] and subsequently reverse engineered by Thomas Ball.[10]

Penrose Tiling Explained Last week, I posted some obfuscated Python which generates Penrose tiling. Today, I’ll explain the basic algorithm behind that Python script, and share the non-obfuscated version. The algorithm manipulates a list of red and blue isosceles triangles. Each red triangle has a 36° angle at its apex, while each blue triangle has a 108° angle. In Python, we can represent such triangles as tuples of the form (color, A, B, C). For the first element, color, a value of 0 indicates a red triangle, while 1 indicates blue. As you can see, we draw an outline along the sides of the triangle, but not along the base. Now here’s the fun part. The above subdivision introduces a new vertex P, located at a point along the edge AB which satisfies the golden ratio, \frac{1 + \sqrt{5}}{2} . Similarly, each blue triangle is subdivided into three smaller triangles: This subdivision introduces two new vertices: Q along the edge BA, and R along the edge BC, at points which also satisfy the golden ratio.

The Art of Agile Development: Pair Programming in 99 words It's more fun than it sounds: two programmers at one computer. One drives; the other navigates. Switching roles fluidly, they constantly communicate. as haiku Summer bakes the earth Heads together, we ponder Aha! Behind the Scenes Iterative Writing Poster Full Text The following text is excerpted from The Art of Agile Development by James Shore and Shane Warden, published by O'Reilly. We help each other succeed. Audience Programmers Whole Team Do you want somebody to watch over your shoulder all day? Of course not. Pair programming is one of the first things people notice about XP. Why Pair? This chapter is called Thinking, yet I included pair programming as the first practice. When you pair, one person codes—the driver. 1One study found that pairing takes about 15% more effort than one individual working alone, but produces results more quickly and with 15% fewer defects [Cockburn & Williams]. Pairing also reinforces good programming habits. How to Pair Ally Test-Driven Development

Bitwise operation In digital computer programming, a bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast, primitive action directly supported by the processor, and is used to manipulate values for comparisons and calculations. On simple low-cost processors, typically, bitwise operations are substantially faster than division, several times faster than multiplication, and sometimes significantly faster than addition. While modern processors usually perform addition and multiplication just as fast as bitwise operations due to their longer instruction pipelines and other architectural design choices, bitwise operations do commonly use less power because of the reduced use of resources. Bitwise operators[edit] In the explanations below, any indication of a bit's position is counted from the right (least significant) side, advancing left. NOT[edit] NOT 0111 (decimal 7) = 1000 (decimal 8) NOT x = −x − 1. AND[edit] OR[edit] XOR[edit] Where for all