Using DateTime in C#
Below is very simple usage of DateTime – class DateTimePr { static void Main(string args) { var datetime = new DateTime(); var now = DateTime.Now; var today = DateTime.Today; Console.WriteLine(now); Console.WriteLine(today); Console.WriteLine(now.Hour); Console.WriteLine(now.ToLongDateString()); Console.WriteLine(now.ToString()); } }...
Reading a file in C#
Below is a simple program in C# that reads a file and outputs the longest word in it. Enjoy! using System; using System.IO; using System.Collections.Generic; namespace <yourNS> { class FilesNDirs...
Finding Lowest number from a List in C#
Below is a simple program to find the lowest number from a list of numbers – using System; using System.Collections.Generic; namespace GroundCSApp { class GetSmallest { public static void Main(string argvs) { var numlist = new List<int> { 1, 2, 3, 4, 5, 6 };...
Simple C# Programs
Here is some basic, simple, handy C# programs for you to enjoy and refresh your memory – using GroundCSApp; using System; using System.Collections.Generic; using System.Linq; namespace GroundCSApp { public enum ShippingMethod {...
Code Reuse via Composition in C#
Composition is a common object oriented concept that enables us to implement loose coupling as well as code-reuse. Lot of times we recommend our developers...
Constructor Inheritance in C#
Like any other Object Oriented Programming language, C# does not allow parent constructor to be automatically inherited. It need to explicitly defined in the derived...
Dynamic Typing in C#
Well, C# provides this option to prove that it is flexible. If you are too fond of dynamic typing, use scripting languages such as PHP!...
C# Generics
C# Generics are really useful when we want to reuse a class for different types and with constraints on what those types would be without...
C# Indexers
C# Indexers is a simple implementation of key/value pairs using Dictionary type. Below is a sample implementation of a telephone directory –TelephoneDirectory class using System.Collections.Generic; namespace Indexers...
C# Inheritance
We generally apply the concept of inheritance to implement a IS-A relationship. For example to implement a relationship that says an Apple is a Fruit...
C# Interfaces and how to implement loose coupling by Dependency (specific implementation of interface) injected via constructor overloading
Interface is a similar language construct such as class, but fundamentally different from a class. Some people claim that Interface is a way to implement...
C# Abstract Classes Vs Interfaces
We use abstract classes when the base class can’t have concrete implementation and that we need the derived class to fully implement it. If at...
Simple Stop Watch implementation in C#
Below is a simple stop watch implemented in C#, enjoy!StopWatch using System; namespace StopWatchApp { public class StopWatch { public DateTime StarTime { get; set; } public DateTime StopTime { get; set; } public string ClockState { get; set; } public void StartClock() { if(this.ClockState == "started") throw new InvalidOperationException("Invalid Operation"); this.StarTime = DateTime.Now; this.ClockState = "started"; }...
Simple Workflow Engine Implementation in C#
Below is a simple implementation of work flow engine using interfaces and the concept of injecting overloaded class implementations via the dependent class method. The...
Data Types, Variables, Primitive Type, Non-Primitive Type, Reference Type and Value Type
Every programming language allows to define and classify data so we can use it appropriately in various parts of the program in the correct form...
Building your Employee
Your Employee is your company’s pillar who keeps your company going and succeed. Their happiness, joy and right mental state is the core to your...
Using Code First first
Traditional ways of software development focus on DB-first implementation methodology. But we are in the realm of latest developments and ORM models has taken us...
Using Extension Methods in C#
Extension methods are a way to add methods to a class without changing its source code or adding it into a derived class. Creating extension methods example...
C# Events and Delegates
We use events and delegates to extend applications and to implement loose coupling. Rather than adding various method calls within an implementation and then recompiling the class,...
Using C# Delegates
Delegates is a way to support addition of multiple features (eg: methods) to a framework without the need to recompile the core class that...
Preferred Multithreading in C# ASP.NET
Parallel execution has been one of the core techniques of programming languages that enables and stabilizes the heavy orchestrated flow of information across information management...
Software Project Size
Software Project Size is of great importance since it determines the level of management controls and the types of tools and technologies required for a...
Effort Devoted To Building Software
Studies show that more effort is devoted to software maintenance (including software enhancement, adaption to new technologies and bug fixing) than for software development activities...
Software Engineering then and now
Software Engineering is and will be the backbone and driving force behind the technological advancements that we enjoy and that will lead us to greater...
Importance Of Design Patterns
Design patterns in general helps you to implement standardized and efficient solutions to software design and programming problems. Design patterns are not pure inventions like...
C# Lambda expressions
Lambda expressions are anonymous methods that does not have access modifiers, name or a return. They are used for convenience (less code) and makes code...
A Typical IT Backup Policy and Backup procedure
Lets see how back up policy was important for a typical IT company and how did it implement the same. Background: As we progress in...
Sample Linux server (web centric) back up script in PERL
Below is a sample, detailed, PERL script for backing up your web centric Linux server. It includes ways to creating tgz of required areas, pushing...
Paper – Server Synchronization Technology for a Distributed server architecture (DSA)
Requirement: Company xyz has now decided to extend the current system as distributed server architecture, expanding over 46 locations. There will be a central server...
Sample (cheap) Web application architecture
A sample customized web application architecture is as shown below – As shown above, all the three tiers of the web server architecture, namely database...
Sample PL/SQL script for cleaning a detail table referring a master table
Have you ever had a need to write a PL/SQL snippet to clean a table. If you are in need, here is one below –...
Sample Perl program for cleaning database on a routine basis
Here is a samlpe Perl Program that gives you an outline on how to deal with cleaning DB on a routine basis (ofcourse scheudled via...
Comparing roles of a System Analyst and other IT professionals
A system analyst is a person of multifaceted role who has to deal with each and every function of a system. He is involved in...
Attributes of a Good System Analyst
A system analyst is a person who conducts a methodical study and evaluation of various aspects related to business to identify the desired objectives and...
Decision Table
A decision table represents the comlex decision logic associated with a data-processing job. A decision table summarized the action to be taken depending on the...
System Life Cycle – Classical definition
A system is a set of interacting elements that responds to inputs producing outputs. The events which together make up the development, operation and maintenance of...
Best Wire-framing / Prototyping tools
One of the most sought tools for a web designer / UI expert / anyone who wants to mock up a user interface based IT...
Which REST framework should I use
There are multiple Java based REST frameworks that is use today. Some of the top players are as below – 1. Reslet – http://www.restlet.org/...
HTTP Methods – Which HTTP method should I use and what methods are used in REST
HTTP methods are convenient methods that an outside process can use over simple http transport layer. For example REST (Representational transfer technology) uses http methods...
SOA – Service Oriented Architecture explained in layman’s terms
The core concept behind Service oriented Architecture (SOA) is that it is focused on enabling design and implementation of business process as individual service components...
Treating product requirements – The ideal way
Product requirements need to be treated with suspicion as if they really needed for the essential capability for a product release. Always prioritize product requirements...
Product Vision – Rule of Thumb – Simplicity
One would think that the a product’s success is directly proportional to the amount of complexity that it offers. In other words, majority of people...
Agile / Scrum methodology – Explained simple
Agile software development methodology is suitable for time-boxed iterative system development scenarios. The software product is released as various versions or releases, typically in time-boxes...
Events and States
Events and States are differentiated below – Events States Anything that happen in time Shows the attributes values of object at a particular point in...
Actors and Data Stores
Actors: Actors are objects represented in the functional model that produce or consume data. An actor may store some data for further processing steps. Data...
State Diagram – Car
The state diagram may be drawn by considering the concurrency property of the aggregate objects that make up the car object ie. each aggregate object...
Object Diagrams with Multiple Inheritance
Below is an example of implementation of multiple inheritance – The Class ‘Universal’ inherits from two classes A/ and D/C, thus exhibiting multiple inheritance. Mutiple...
Main features of Object Oriented Languages – Classes, Objects, Encapsulation, Polymorphism, Inheritance
1. Classes and Objects In an object oriented programming language, we code the program as a corporate collection of objects which are instantiated from various...
Abstraction
Abstraction may be defined as all those essential characteristics features of an object class which makes it different from other object classes. Abstraction as applied...
Multiplicity
Multiplicity refers to the number of object class instances of one class may be associated to the other class. An n+ symbol indicates that there...
Inheritance
Inheritance is the most basic feature of any Object Oriented programming language. It refers to the derivation of sub classes from a base/super class. The...
Qualification
Qualification is an association which involves an association and a qualifier which uniquely identifies certain features of one of the associated classes. Below example explains...
Object Modeling Technique (OMT)
Object Modeling Technique used in object oriented modeling and design which use the usual principles of system development like analysis, design an implementation but applying...
Instance Diagram
A sample instance diagram is as shown below. The diagram represents a expression evaluator –...
Aggregation
Aggregation refers to combining the assembled parts of a single part. In terms of Object Management Technology, aggregation may be defined as representing the object...