background preloader

The Twelve-Factor App

The Twelve-Factor App

Liskov substitution principle Let be a property provable about objects of type . Then should be provable for objects where is a subtype of In the same paper, Liskov and Wing detailed their notion of behavioral subtyping in an extension of Hoare logic, which bears a certain resemblance with Bertrand Meyer's Design by Contract in that it considers the interaction of subtyping with pre- and postconditions. Principle[edit] Liskov's principle imposes some standard requirements on signatures that have been adopted in newer object-oriented programming languages (usually at the level of classes rather than types; see nominal vs. structural subtyping for the distinction): Origins[edit] A typical violation[edit] A typical example that violates LSP is a Square class that derives from a Rectangle class, assuming getter and setter methods exist for both width and height. See also[edit] References[edit] General references Gary T. Specific references External links[edit] The Liskov Substitution Principle, T.

Evolving Frameworks: A Pattern Language for Developing Object-Oriented Frameworks Evolving Frameworks A Pattern Language for Developing Object-Oriented Frameworks Don Roberts, Ralph Johnson, University of Illinois {droberts,johnson}@cs.uiuc.edu Introduction Frameworks are reusable designs of all or part of a software system described by a set of abstract classes and the way instances of those classes collaborate. Unfortunately, developing a good framework is expensive. Therefore, frameworks should be developed only when many applications are going to be developed within a specific problem domain, allowing the time savings of reuse to recoup the time invested to develop them. The patterns in this paper form a pattern language. Figure 1 shows how the patterns are related to each other in a sort of time-line. Evolving Frameworks describes a common path that frameworks take, but it is not necessary to follow the path to the end to have a viable framework. Three Examples Context You have decided to develop a framework for a particular problem domain. Problem Forces Solution

On API Design Guidelines Posted by F 19/11/2006 at 22h31 Update: Good news! Jaroslav Toulash emailed me that he published a book on Practical API Design !!! Looks like Brian McAllister may be preparing a talk on Designing Elegant APIs. I've been very interested in good API design for a long time. I reviewed "Interface Oriented Programming" a few months back with disappointment. Over time, I collected some links on the subject and shared some with Brian: Best Practices in Javascript Library Design (via John Resig on JavaScript API Design) - A good presentation given by the author of JQuery.API: Design Matters - Article by Michi Henning, ZeroC, for ACM Queue magazine.How to Design a Good API and Why it Matters - Excellent deck from Joshua Bloch. So, let's hope Brian gives his talk at a big conference, signs a contract with a big publisher and fills the void. Use the following link to trackback from your own site:

DiG HOWTO Initial publication: August 31, 2004 Most recent revision: May 11, 2006 How to use dig to query DNS name servers. dig is a command-line tool for querying DNS name servers for information about host addresses, mail exchanges, name servers, and related information. The source code for dig is part of the larger ISC BIND distribution. If you’re looking for information on configuring the BIND name server, you might find my article BIND for the Small LAN more to your taste. Understanding the default output The most typical, simplest query is for a single host. $ dig www.isc.org That’s the command-line invocation of dig I used. ; <<>> DiG 9.2.3 <<>> www.isc.org ;; global options: printcmd The opening section of dig’s output tells us a little about itself (version 9.2.3) and the global options that are set (in this case, printcmd). ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43071 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 dig www.isc.org AAAA +short #! #!

Understanding DIG Overview The command dig is a tool for querying DNS nameservers for information about host addresses, mail exchanges, nameservers, and related information. This tool can be used from any Linux (Unix) or Macintosh OS X operating system. The most typical use of dig is to simply query a single host. Instructions Run the command: dig mt-example.com View the Output: ; <<>> DiG 9.4.1-P1 <<>> mt-example.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25550 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;mt-example.com. Understanding the Results The opening section of dig’s output tells us a little about itself (version 9.4.1) and the global options that are set (in this case, printcmd): ; <<>> DiG 9.4.1-P1 <<>> mt-example.com ;; global options: printcmd Here, dig tells us some technical details about the answer received from the DNS server. In the question section, dig reminds us of our query.

tc/solrsan - GitHub Statistics Tutorial: Sampling Distributions Suppose that we draw all possible samples of size n from a given population. Suppose further that we compute a statistic (e.g., a mean, proportion, standard deviation) for each sample. The probability distribution of this statistic is called a sampling distribution. Variability of a Sampling Distribution The variability of a sampling distribution is measured by its variance or its standard deviation. N: The number of observations in the population. If the population size is much larger than the sample size, then the sampling distribution has roughly the same sampling error, whether we sample with or without replacement. Central Limit Theorem The central limit theorem states that the sampling distribution of any statistic will be normal or nearly normal, if the sample size is large enough. How large is "large enough"? The population distribution is normal. The exact shape of any normal curve is totally determined by its mean and standard deviation. Sampling Distribution of the Mean

Statistics Tutorial: Binomial Distribution To understand binomial distributions and binomial probability, it helps to understand binomial experiments and some associated notation; so we cover those topics first. Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties: The experiment consists of n repeated trials. Consider the following statistical experiment. The experiment consists of repeated trials. Notation The following notation is helpful, when we talk about binomial probability. x: The number of successes that result from the binomial experiment. n: The number of trials in the binomial experiment. Binomial Distribution A binomial random variable is the number of successes x in n repeated trials of a binomial experiment. Suppose we flip a coin two times and count the number of heads (successes). The binomial distribution has the following properties: The mean of the distribution (μx) is equal to n * P . Binomial Formula and Binomial Probability

Related: