background preloader

Design Patterns

Design Patterns
It has been highly influential to the field of software engineering and is regarded as an important source for object-oriented design theory and practice. More than 500,000 copies have been sold in English and in 13 other languages. The authors are often referred to as the Gang of Four (GoF).[1] History[edit] Introduction, Chapter 1[edit] Chapter 1 is a discussion of object-oriented design techniques, based on the authors' experience, which they believe would lead to good object-oriented software design, including: clients remain unaware of the specific types of objects they use, as long as the object adheres to the interfaceclients remain unaware of the classes that implement these objects; clients only know about the abstract class(es) defining the interface Use of an interface also leads to dynamic binding and polymorphism, which are central features of object-oriented programming. The authors admit that delegation and parameterization are very powerful but add a warning: Formatting[edit]

The Mythical Man-Month The Mythical Man-Month: Essays on Software Engineering is a book on software engineering and project management by Fred Brooks, whose central theme is that "adding manpower to a late software project makes it later". This idea is known as Brooks' law, and is presented along with the second-system effect and advocacy of prototyping. Brooks' observations are based on his experiences at IBM while managing the development of OS/360. The work was first published in 1975 (ISBN 0-201-00650-2), reprinted with corrections in 1982, and republished in an anniversary edition with four extra chapters in 1995 (ISBN 0-201-83595-9), including a reprint of the essay "No Silver Bullet" with commentary by the author. Ideas presented[edit] The mythical man-month[edit] Brooks discusses several causes of scheduling failures. Therefore, assigning more programmers to a project running behind schedule will make it even later. No silver bullet[edit] The second-system effect[edit] Progress tracking[edit] See also[edit]

How to build your own Linux distro Since Manchester University's Owen Le Blanc released MCC Interim Linux (generally agreed to have been the first Linux distribution), way back in 1992, there have been hundreds of ways to get the world's favourite free software operating system on to a computer. The diversity of alternatives reflects the diversity in the development community, with distros split along technical, functional, linguistic and even ideological lines. There have been large distros, tiny ones, bleeding edge and rock-solid stable distros. Easy for the newbie to install, or downright impenetrable to the uninitiated. Created exclusively with free software as a badge of pride, or so proprietary in attitude that not even the toolchain was fully GNU (hello Red Flag Server 4.1, built with the Intel compiler in 2004). So with all the variety that's already out there, why would anyone want to create their own distro? What this amounts to is that it doesn't take much to warrant a new distro. Which base? The simple choices

OOP03-CPP. Prefer not to overload virtual functions - C++ Secure Coding Practices Overloading of virtual functions tends to defeat polymorphism and introduce unnecessary complexity into a class hierarchy. Non-Compliant Code Examples Consider a simple hierarchy with an update capability. This design has a legal but unfortunate mismatch between overloading and overriding. The derived class MyThing declares an update function that overrides one of the inherited update functions, but hides both of them. In this piece of code, it is likely that its author assumed the call mt->update( 12.3 ) would bind to Thing::update (as it would in Java) rather than MyThing::update. The approach of requiring a derived class to override all of a set of overloaded virtual functions solves the problem at a technical level. However, this approach is impractical because any change to the base class requires that all derived classes be maintained as well, and it is often the case that the maintainer of a base class has no access to, or knowledge of, code for the derived classes. Exceptions

Compilers: Principles, Techniques, and Tools Compilers: Principles, Techniques, and Tools[1] is a computer science textbook by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman about compiler construction. Although more than two decades have passed since the publication of the first edition, it is widely regarded as the classic definitive compiler technology text.[2] It is affectionately known as the Dragon Book to a generation of computer scientists [3][4] as its cover depicts a knight and a dragon in battle, a metaphor for conquering complexity. First edition[edit] The first edition is informally called the 'red dragon book' to distinguish it from the second edition[5] and from Aho & Ullman’s 1977 Principles of Compiler Design sometimes known as the 'green dragon book' [5] Topics covered in the first edition include: Second edition[edit] Following in the tradition of its two predecessors, the second edition features a dragon and a knight on its cover, and is informally known as the purple dragon. See also[edit]

Entity Framework - VS 2010 Achieve Flexible Data Modeling With The Entity Framework Elisa Flasko The ADO.NET Entity Framework is almost here! There were numerous articles following the initial release of Visual Studio 2008 focusing on LINQ to SQL, as well as articles addressing which technology to use (see msdn.microsoft.com/data). The Microsoft® Entity Data Model (EDM), based on Dr. Why Another Data Model? So why was another model needed? Custom solutions that separated the structure of data from the application being built were common. The EDM (see the sample illustrated in Figure 1) allows the definition of a domain model that is consistent with the way an organization thinks about and uses its data, rather than the way that data is stored. Figure 1 Sample Entity Data Model for a Blogging Database (Click the image for a larger view) With one core data model, application maintenance is simplified. So in short, why did we create a new data modeling technology in the first place? Why Describe the EDM with XML?

[23] Inheritance -- what your mother never told you  Updated!  [23.6] Okay, but is there a way to simulate that behavior as if dynamic binding worked on the this object within my base class's constructor? Yes: the Dynamic Binding During Initialization idiom (AKA Calling Virtuals During Initialization). To clarify, we're talking about this situation: This FAQ shows some ways to simulate dynamic binding as if the calls made in Base's constructor dynamically bound to the this object's derived class. The first approach is a two-phase initialization. The only remaining issues are determining where to call Phase I and where to call Phase II. The first variation is simplest initially, though the code that actually wants to create objects requires a tiny bit of programmer self-discipline, which in practice means you're doomed. In this variation, the code that is creating the object explicitly executes both phases. Note: Phase I often, but not always, allocates the object from the heap. Derived::Derived() : Base(Helper2()) // ←the magic happens here { ... }

Introduction to Algorithms, Third Edition Table of Contents I Foundations Introduction 3 1 The Role of Algorithms in Computing 5 1.1 Algorithms 5 1.2 Algorithms as a technology 11 2 Getting Started 16 2.1 Insertion sort 16 2.2 Analyzing algorithms 23 2.3 Designing algorithms 29 3 Growth of Functions 43 3.1 Asymptotic notation 43 3.2 Standard notations and common functions 53 4 Divide-and-Conquer 65 4.1 The maximum-subarray problem 68 4.2 Strassen's algorithm for matrix multiplication 75 4.3 The substitution method for solving recurrences 83 4.4 The recursion-tree method for solving recurrences 88 4.5 The master method for solving recurrences 93 4.6 Proof of the master theorem 97 5 Probabilistic Analysis and Randomized Algorithms 114 5.1 The hiring problem 114 5.2 Indicator random variables 118 5.3 Randomized algorithms 122 5.4 Probabilistic analysis and further uses of indicator random variables 130 II Sorting and Order Statistics Introduction 147 6 Heapsort 151 6.1 Heaps 151 6.2 Maintaining the heap property 154 6.3 Building a heap 156 7 Quicksort 170 Index

C# Tweaks All articles and source code are under the Visual C# Kicks license agreement Hide Articles Aspect Ratio Form 3.91/5 Create C# Windows Form that keeps its aspect ratio as it is being resized without any flickering. Vista-Style Task Dialog 3.86/5 Integrate the visually-appealing TaskDialog Vista control into your C# applications, which works even on old versions of Windows. Splash Screens 3.83/5 Add a splash screen to C# applications based on any kind of image, shadows and transparency fully supported. Angle and Altitude User Controls 3.82/5 Two clean user controls written in C# to mimic the Photoshop angle and altitude selectors. WinForm Resize Animation 3.79/5 Applying concepts of WinForm animation to create a smooth resizing animation effect. Numbers-Only Textbox 3.71/5 Different ways to allow users to only write numbers in a Windows Form Textbox. Aero Shake Form 3.68/5 Implement the new Window 7 Aero Shake feature in C# Windows Forms with simple .NET code. Click-and-Drag Form 3.64/5 Box Blur 3.53/5

Related: