Skip to main content

Posts

Showing posts with the label Programming-Basics.

With new experiences comes great responsibility

Hello Everyone, I am an ordinary person with some highly looked after skills, not boasting about myself. But after coding in this IT industry for almost 5 years for the first time I am thinking:- Is delivering the code my only responsibility or is there anything else I need to look into as well? From last few month's I was highly involved in some entirely new domain which is financial, and when you play with the number you need to be highly focused, so unable to update my blog as well. When I was working on the urgent deadlines and tight estimates and being from a healthy UI background like css3, html5, responsive design, knockout js, less etc. I was put on the SQL server and asp.net with grid views and some freaked out Telerik controls. I know it's a learning for me and I can see why UX matters to every person in this entire world but not UI and you can write it on stamp paper. User Experience, with logical and functionally correct code, is the need of the hour to...

Extending Object Oriented Programming concepts further with abstraction and interfaces

Few days back I wrote for Solid and Grasp principles for oops http://www.developerscloud.org/2014/08/oops-beyond-four-pillars-solid-and-grasp.html . Now I am again extending it to make it more matured way to write code. Let start with coupling and cohesion. Loose/Low Coupling low dependency between classes; low impact in a class of changes in other classes high reuse potential High Cohesion measure of how strongly-related or focused the responsibilities of a single module are If methods of a class tend to be similar in many aspects, then the class have high cohesion In highly-cohesive system, code readability and the likelihood of reuse is increased, while complexity is kept manageable. Also check Encapsulate what varies Favor Composition over Inheritance Program to interface not implementation Strive for loosely coupled design between objects that interact For Interfaces Like an abstract base class: any non-abstract type inhe...

OOPs beyond the Four Pillars - SOLID and GRASP

As we know  Object oriented programming is a type of programming paradigm based around programming  classes  and instances of classes called  objects . These can be objects that appear on the screen (e.g., pictures, textboxes, etc.) or are part of the programming (e.g. actors, connections, particles, etc as mentioned in my post  http://www.developerscloud.org/2013/02/what-is-oop-basic-concepts.html   written ages ago. Here we are going to extend the oops beyond its four pillars i.e. Abstraction Encapsulation Polymorphism  and Interfaces i.e.  Inheritance So first we will go through  SOLID and then GRASP SOLID Principles are principles of class design. • S RP: Single Responsibility Principle – An object should have only a single responsibility & all the responsibility should be entirely encapsulated by the class. – There should never be more than one reason for a class to change • O CP: Open/Closed Principle ...

Simple Pyramid in Csharp .Net

    *   ***  ***** ******* Updated  As you can see below the code for simple pyramid has two for loop nested in each other. So for each row it enter, it increment the counter and draw the star against forming a pyramid like figure. You can use  different special counter, play with the loop and enjoy the coding. Simple Pyramid in Csharp    class Program     {          static void Main( string [] args)         {             int row, col = 0, n = 5;                                 for (row = 0; row <= n; row++)             {           ...

What is OOP ? Basic Concepts.

What is OOP? Object oriented programming is a type of programming paradigm based around programming classes and instances of classes called objects. These can be objects that appear on the screen (e.g., pictures, textboxes, etc.) or are part of the programming (e.g. actors, connections, particles, etc.) What is an Object? An object is merely a collection of related information and functionality. An object can be something that has a corresponding real-world manifestation (such as an employee object), something that has some virtual meaning (such as a window on the screen), or just some convenient abstraction within a program (a list of work to be done, for example). An object is composed of the data that describes the object and the operations that can be performed on the object. Information stored in an employee object, for example, might be various identification information (name, address), work information (job title, salary), and so on. The operations performed might include...