background preloader

Programming

Facebook Twitter

Home | kiuwan.com | Cloud-based Code Quality and Security. Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase vs Couchbase vs Hypertable vs ElasticSearch vs Accumulo vs VoltDB vs Scalaris comparison :: Software architect Kristof Kovacs. While SQL databases are insanely useful tools, their monopoly in the last decades is coming to an end. And it's just time: I can't even count the things that were forced into relational databases, but never really fitted them. (That being said, relational databases will always be the best for the stuff that has relations.)

But, the differences between NoSQL databases are much bigger than ever was between one SQL database and another. This means that it is a bigger responsibility on software architects to choose the appropriate one for a project right at the beginning. In this light, here is a comparison of Open Source NOSQL databases: The most popular ones # Redis # Best used: For rapidly changing data with a foreseeable database size (should fit mostly in memory). For example: To store real-time stock prices. Cassandra # Best used: When you need to store data so huge that it doesn't fit on server, but still want a friendly familiar interface to it. MongoDB # ElasticSearch # CouchDB # Accumulo # Beginning Perl (free) - www.perl.org. By Simon Cozens What does this book cover? Installing Perl on Windows and UNIX Making use of online Perl resources like CPAN First principles in programming and the Perl syntax Working with files and databases Writing web pages in Perl Using Perl as an object-oriented language Book overview Perl is a well-established programming language that has been developed through the time and effort of countless free software programmers into an immensely powerful tool that can be used on pratically every operating system in the world.

Perl started out as the "Swiss army knife" of computer languages and was used primarily by system administrators, but over time it's grown into an immensely robust language used by web-developers and programmers worldwide. "There's more than one way to do it" is the motto of Perl, but this book aims to take you through them all.

Who is this book for? This book is for those new to programming who want to learn with Perl. Java for Complete Beginners by John Purcell. Discover Everything through Code. Application Developers Alliance. Kinect for Windows SDK Beta 2 Quickstarts. 8 minutes, 56 seconds 6 minutes, 50 seconds 12 minutes, 16 seconds 15 minutes, 36 seconds 16 minutes, 57 seconds 11 minutes, 48 seconds. 7 Patterns to Refactor Fat ActiveRecord Models. When teams use Code Climate to improve the quality of their Rails applications, they learn to break the habit of allowing models to get fat. “Fat models” cause maintenance issues in large apps. Only incrementally better than cluttering controllers with domain logic, they usually represent a failure to apply the Single Responsibility Principle (SRP).

“Anything related to what a user does” is not a single responsibility. Early on, SRP is easier to apply. ActiveRecord classes handle persistence, associations and not much else. But bit-by-bit, they grow. Objects that are inherently responsible for persistence become the de facto owner of all business logic as well. As you add more intrinsic complexity (read: features!) You may be thinking: “But Rails makes it really hard to do OOP right!” I used to believe that too. Don’t Extract Mixins from Fat Models Let’s get this out of the way. “Any application with an app/concerns directory is concerning.” And I agree. Now on to the refactorings!

1. 2. 3. Single responsibility principle. In object-oriented programming, the single responsibility principle states that every context (class, function, variable, etc.) should define a single responsibility, and that responsibility should be entirely encapsulated by the context. All its services should be narrowly aligned with that responsibility.

Martin defines a responsibility as a reason to change, and concludes that a class or module should have one, and only one, reason to change. As an example, consider a module that compiles and prints a report. Such a module can be changed for two reasons. First, the content of the report can change. The reason it is important to keep a class focused on a single concern is that it makes the class more robust. The responsibility is defined as a charge assigned to a unique actor to signify its accountabilities concerning a unique business task.[4] References[edit] SOLID (object-oriented design) In computer programming, SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) is a mnemonic acronym introduced by Michael Feathers for the "first five principles" named by Robert C.

Martin[1][2] in the early 2000s[3] that stands for five basic principles of object-oriented programming and design. The principles when applied together intend to make it more likely that a programmer will create a system that is easy to maintain and extend over time.[3] The principles of SOLID are guidelines that can be applied while working on software to remove code smells by causing the programmer to refactor the software's source code until it is both legible and extensible.

It is part of an overall strategy of agile and adaptive programming.[3] Practical Fluid Mechanics. (This article originally appeared in two parts in Game Developer Magazine, March and April, 2007) Fluid effects such as rising smoke and turbulent water flow are everywhere in nature, but are seldom implemented convincingly in computer games. The simulation of fluids (which covers both liquids and gasses) is computationally very expensive. It is also mentally very expensive, with even introductory papers on the subject relying on the reader having math skills at least at the undergraduate calculus level.

In this article I will attempt to address both these problems from the perspective of a game programmer not necessarily conversant with vector calculus. I’ll explain how certain fluid effects work without using advanced equations and without too much new terminology. I shall also describe one way of implementing the simulation of fluids in an efficient manner without the expensive iterative diffusion and projection steps found in other implementations.

Web Development

OverAPI.com | Collecting all the cheat sheets. C++ “from 0 to C” - Teaching programming using a more tangible approach / by @codetroubles. Created by Ubi de Feo, “from 0 to C” is a series of workshops that aim to teach programming using a tangible approach. Learning how to program requires pragmatic thinking and “advanced problem solving” and through the use of tangible, hand-made objects, the team behind the project try to establish a clear understanding of how a computer works and what a programming language actually is.

With the increase of interest in coding, trying to sometimes teach programming to designers can indeed be a challenging task. There are many tools available already that CAN readers are very familiar with. Aimed primarily at designers, Design by Numbers, Processing, openFrameworks and most recently Cinder are all frameworks designed to create a bridge between complicated layers of code into easier to understand and apply scenarios. To those learning these tools, it is often that difficulties arise even before the creative process begins.

Project Page / More Info (thanks Régine)