Finding And Promoting Abstractions In Your Code

Throughout my posts and in many many other articles, books, booklets and almost all (good) IT materials, you keep hearing the same over and over again, repeated almost like a mantra – “Find the abstraction and use it” – it’s good and all, but how you should go about it is almost always lacking in… Continue reading…

0 comments

Modules and the Method Lookup Path

In the previous post “Organizing Your Code With The Help Of Modules” we created our very first outline of a module (though very basic) and mix it in a class via the include method (in this case we can refer to modules as mix-ins). If you haven’t noticed by now, the act of mixing in… Continue reading…

0 comments

Organizing Your Code With The Help Of Modules

We know about classes and how they are an Object defined to “huddle up” like minded or similarly goal oriented objects (namely methods) and we know about class hierarchies, the perils that it imposes on our code through the thing called classical inheritance and how namespacing matters because the names we choose for our objects… Continue reading…

1 comment

Incremental Software Development Or Why Big Achievements Are Done Through Small Steps

If you’re a hardcore software developer, a journeyman set on the noble path of software design and implementation, or you’ve just started out on this great journey, chances are you’ve hit a snag in the road while getting accustomed to continuous code implementation. And if you work as part of a team, where more people… Continue reading…

2 comments

Classical Inheritance In Object Oriented Programming

If you’ve been eying the opportunity to become a computer programmer for some time now, or even if you’ve just started venturing out onto this great and noble journey, chances are that you’ve hit yourself with this term quite a few times whether in books, booklets or even documentation sites, Classical inheritance has always been… Continue reading…

1 comment

The Interface Segregation Principle or Why I Keep My Wife Public And My Mistress Private

The Interface Segregation Principle states that no client should depend on methods that it does not use. In layman terms, what this principle iterates is that you only have to make public that which is essential to the core of your application. You can think of it like this: You’ve been hard at work all… Continue reading…

1 comment

How Liskov Substitution Principle Can Save Your Classes

Liskov Substitution Principle is the L in the SOLID programming principles. It was announced to the world by Barbara Liskov in a 1987 conference keynote address titled Data abstraction and hierarchy. In that academic setting, using academic linguo, Liskov stated that in a computer program, if S is a subtype of T, then objects of… Continue reading…

0 comments

Setting Up Good Interface Design

At first glance your application is made up by methods, many in number and diverse in functionality. It is that diversity that has us make them “huddle up” in teams that share the same purpose, that satisfy the same end goal, or more simply put, that work together to get the “same job done”. Thus… Continue reading…

1 comment

Namespace And Namespacing Objects

“In many programming languages, namespacing is a technique employed to avoid collisions with other objects or variables in the global namespace. They’re also extremely useful for helping organize blocks of functionality in your application into easily manageable groups that can be uniquely identified.” – Addy Osmani “A Global Namespace is a heterogeneous, enterprise-wide abstraction of… Continue reading…

0 comments

Good Code Abides By The Open-Closed Principle

Def: “In object-oriented programming, the open/closed principle states “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification“; that is, such an entity can allow its behaviour to be extended without modifying its source code.” – wikipedia In layman terms, what the principle states is that the objects you create… Continue reading…

0 comments