Posts

Dependency injection

In this post, we will look at Dependency Injection. Dependency Injection (DI) is a software design pattern that deals with how code gets hold of its dependencies. There are only three ways an object or a function can get a hold of its dependencies: The dependency can be created, typically using the new operator. The dependency can be looked up by referring to a global variable. The dependency can be passed in to where it is needed. Dependency injection is basically providing the objects that an object needs  instead of having it construct them itself. Do this: public SomeClass (MyClass myObject) { this.myObject = myObject; }     Instead of this: public SomeClass() { myObject = Factory.getObject(); } Dependencies can be injected into objects by many means. One can even use specialized dependency injection frameworks to do that, but they certainly aren't obligatory. You don't need those frameworks to have dependency injection. Insta...

Expectations From Project Managers

People will expect a lot! To be fair, the majority of the expectations are truly what you are supposed to do as a PM.  Some of the expectations are “a plus” and very nice to have on your repertoire of best practices. A few are completely unrealistic – but still expectations that you need to take into consideration for the sake of the project! Here are a few expectations that a PM encounters: You have to take ownership of the project by the minute after you were assigned as the project manager. People will expect you to refer to historical information from similar projects to avoid making the same mistakes from the past. People will expect you to be the scope specialist of the project.  You should go over and over again through the requirements with the client and project team until you feel comfortable that scope is crystal clear. People will expect you to have the project schedule almost memorized in your mind, including the sequence of activities, duration and...

Literal content (' ') is not allowed within a System.Web.UI.HTMLControls.HtmlTableCellCollection

Image
Today, i was involved in an issue which was faced by one of my colleague. Issue was: We investigated the issue for couple of hours and found that double quotation " was missed in HTML code, shown below: After resolving the issue, i have learnt that, this type of issues occur due to very simple errors in our code and we spend a lot of time to resolve them. So whenever we code, we should care about what we are typing and make sure that we write a correct code by checking or compiling the code before jumping to another line or function of the code.

Continuous Integration, Delivery and Deployment

In today's post we will look at 3 continuous processes. They are:   Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. By integrating regularly, you can detect errors quickly, and locate them more easily. Because you’re integrating so frequently, there is significantly less back-tracking to discover where things went wrong, so you can spend more time building features. Continuous Integration brings multiple benefits to the organization but this could be possible only if: Developers check in their code frequently They don’t check in broken code They check in only tested code They build the code on their local machines (work spaces) before check in. After check in, CI server builds the system successfully and after successful build developer go home. Continuous Deployment is a proces...

What is Inversion of Control?

What is Inversion of Control? Inversion of Control (IoC) and Dependency Injection (DI) are two related practices in software development which are known to lead to higher testability and maintainability of software products. these patterns are said to be based on a principle, which states: "don't call us, we'll call you". If you follow these simple two steps, you have done inversion of control: Separate what -to-do part from when -to-do part. Ensure that when part knows as little as possible about what part; and vice versa. There are several techniques possible for each of these steps based on the technology/language you are using for your implementation.The inversion part of the Inversion of Control (IoC) is the confusing thing; because inversion is the relative term. The best way to understand IoC is to forget about that word! Inversion of control is a practical way to reduce code duplication, and if you find yourself copying an entire...

Undefined in JavaScript.

Image
I was stuck for 2 hours on this. I kept getting ’The value of the property 'GetData' is null or undefined, not a Function object’. Finally, I caught the error and resolved it in my js file and the error went away. The lesson is that undefined means you haven’t defined it yet. Make sure js file is error free and that you didn’t forget to include the js file. If there is a "semi colon" error, you could face such type of errors.

Visual Studio 2012 New Features of the IDE

In this post, we will look at some of the new features of Visual Studio 2012’s IDE. Dark Color Theme for Code Editor and IDE window: Visual Studio 2012 provides out of the box option to have a White on Black color scheme, Dark AKA  White on Black  color schemes have become choice of many developers as many have realized that they are easy on the eyes. Quick Launch - Search the VS commands / menu options: Seems Visual Studio has more than  4000 commands , apart from the frequently used commands, it wouldn't be practical to remember most of the commands, hence Visual Studio 2012 has a cool feature called  Quick Launch - Ctrl+Q  located in the top right corner in the Visual Studio 2012 IDE.  You can start typing few letters of the command you are looking for and Quick Launch will provide auto-suggest with commands that starts with the letters you have typed.  It shows the shortcut keys for each command which is pretty neat. P...