Friday, September 25, 2009

Leave vs Sick Leave

With all my bad experiences over the years, I was thought of writing this post since 2-3 years. But unfortunately couldn't do it. Finally the time has come for this.

In general, I was tried to apply LEAVE in the organization/client place (where ever I was present) very much well in advance. Applying (in advance) leave is becoming an advantage to the project managers and not even thinking of why the resource has applied leave in advance. They simply ignore the leaves and once it is approaching in a day/two/week, they will say "NOT POSSIBLE" because of the unimaginable reasons.
  • Oh, we have got an important work.
  • Oh, no; there is no backup.
  • Oh, sorry, there is a demo to the management.
  • Oh, bad, not possible this time, release is there.
  • Oh, seems to be risky to approve your leave in this crucial time
All the above reasons (Cock-n-Bull stories) seem to be funny to anybody as why the hell managers are there, just to check the mails and play the games with the career of the resources.

Why did the resource apply LEAVE in advance? Just to give manager the opportunity to plan the activities better. To fulfill all the above reasons as the manager can't plan any if he applies just on the day or day before. But What happens to the resource, he gets "NO" answer, which will make him to think of how to get the LEAVE?

Funny part here is, the resource especially receives mails (kind of appreciations like you are an important resource, playing a key role, blah... blah...) in this period of time as to make the resource COOL and Happy.

Funny part is, these managers always maintain their own lobby to know the information (like informer job). Of course these lobby people also gets opportunities if they never raise the voice for any reason.

After lots of instances like above, you will get headache or some or other health issue. You suddenly take a leave and the business (project development, delivery, ...) will never stop as everybody knows. Then the so called manager thinks of all the alternatives and make the work done.

By this time, you would have felt bored, frustrated, irritated, stressed out of your manager activities because of all these CHILDISH behaviors.

You would also try the same instance again but this time wantedly take the sick leave with no reason, no personal work... kind of testing the scenario... what happens at project level. As usual, things will go smoothly. Just a feeling..... :)

Funny result is, if you ever want to have a time off, try consider that day as sick day and inform colleague/manager the same. Nobody has dare to stop/reject this (But there are a half-wit managers where they will bargain the resources to postpone the medical checkups or any doctor appointments..... ..... should be careful with these .... ) . And you could enjoy the day as you like and attend the office next day/two.

Now feeling so better than olden days to get the leave. You got the point where the key lies and use the KEY whenever you feel like.

Just think of, if the manager would have approved the leave by considering the point "Applying the leave in ADVANCE", Do you ever think of SICK LEAVE rather applying for leave?. I'm sure You would never do that. But we everybody knows that these half-wit managers would never apply their brain for these kind of things but apply very much to play the politics.

Of course all the above is an experience with our Indian Project Managers as they have to impress next level, next next level management.

Hope you gotta know how easy to get the leave in this KALIYUGA?


Happy Time...!!

~ Gangadhar Kotu

Thursday, September 24, 2009

Indian Managers Vs Others

With all my experiences, I would like to compare the behaviours/skills of Indian managers and Other Managers (Western countries).



Indian ManagerOther Managers


Happy Time...!!

~ Gangadhar Kotu

Wednesday, September 23, 2009

CAML Queries - Cannot complete action

The Collaborative Application Markup Language (better known as CAML) is an XML-based query language that helps you querying, building and customizing Web sites based on Windows SharePoint Services. The XML elements define various aspects of a WSS site.

The Ground Rule should be either or join operators can only validate two expressions. Once it has more than two expressions in a single or join operator, it cannot be evaluated and throws a strange exception to the users. So, split them in to multiple expressions as below.

General (small example) would throw 'Cannot complete this action' exception:
< "Where" >
< "Or" >
< "Eq" >< name="'Country'/">< type="'LookUp'">India< /Value >< /Eq >
< "Eq" >< name="'Country'/">< type="'LookUp'">China< /Value >< /Eq >
< "Eq" >< name="'Country'/">< type="'LookUp'">Germany< /Value >< /Eq>
< "Eq" >< name="'Country'/">< type="'LookUp'">USA< /Value >< /Eq >
< /Or >
< /Where >

Optimized and to be working:
< "Where" >
< "Or" >
< "Or" >
< "Or" >
< "Eq" >< name="'Country'/">< type="'LookUp'">India< /Value >< /Eq >
< "Eq" >< name="'Country'/">< type="'LookUp'">China< /Value >< /Eq >
< /Or >
< "Eq" >< name="'Country'/">< type="'LookUp'">Germany< /Value >< /Eq>
< /Or >
< "Eq" >< name="'Country'/">< type="'LookUp'">USA< /Value >< /Eq >
< /Or >
< /Where >

In the above working example, you could observe that the join operator has only two expressions at any point of time.

** "Where" should be replaced with Where and "Or" should be replaced with Or. And also spaces shouldn't be there after and before the less than and greater than symbols. As blogger has a limitation, had to place like that.

So, should be very careful while writing CAML query with more values.

Microsoft has to keep an eye on throwing the right error message to the users.

You could also find the above info here

Other Sources:

Happy Coding...!!

~ Gangadhar Kotu

Saturday, September 19, 2009

Client Interview Questions

One fine day, my manager asked me to attend one client interview for a small project. But client wants an Technical Architect for that project. I was wondered why an Architect? Ofcourse, others also wondered. Here are the questions.

  • What are the new features in ASP.Net 3.5 compared to ASP.Net 2.0?
    • Script Manager, Update Panel, Update progress
    • List view, Data Pager
    • LINQ
  • What is LINQ?
    • Language Integrated Query – Used to query the data in the business layer itself to have better performance.
  • What is ListView?
    • ListView is the new control given in the 3.5 framework and can have all the functionalities as like Grid View, DataRepeater with more graphical styles
  • What is the viewstate? What is the lifespan of the same?
    • Viewstate is a built-in page attribute and is used to store the state of the controls.
    • The data is stored in this is encrypted and can be accessed through programmatically.
    • Extra data also can be stored in the viewstate programmatically.
    • The lifespan is the limited to page life time – If the page is alive in the browser the view state also alive along with the page...
  • What is the difference between HTML control and ASP.Net control?
    • HTML control is created at client side and no interactions required with the server.
    • This also can be made interacted with the server by adding runat=”server” attribute.
    • ASP.Net control is created and rendered from server side.
  • What is the difference between web user control and web custom control?
    • Web user control is a control where the user can have visualizations and need to inherit from UserControl class.
    • This can be used in any page to use the functionality.
    • Web custom control -> Not answered.
  • What is the difference between the System Exceptions and Application exceptions?
    • System Exceptions are generic in nature and are intended to thrown by the .net framework.
    • Application Exceptions are the custom exceptions derived from ApplicationException base class and exceptions cover in the developed application.
  • How do you do error handling in ASP.net?
    • Error handling can be done either through web.config of Global.asax files.
    • They can also be page level or application level.
    • They can also be used try … catch… finally….. for the purpose.
    • Errors can also be logged in Event log, text file or database…
  • What is the difference between Response.Redirect, Server.Transfer, Server.Execute and CrossPagePosting?
    • Response.Redirect -> redirect the page to the specified page.
    • Server.Transfer -> Redirect the page to the specified page but the address bar still shows the old URL only.
    • Server.Execute -> Executes the specified URL content.
    • CrosspagePosting -> Not answered.
  • What is a webservice? Advantages of the same?
    • Webservice is a service where it contains the programmable logic and can be accessible via protocols (SOAP).
    • It is very simple and easy to understand.
  • What is SOA?
    • SOA is Service Oriented Architecture. It provides principles of concepts on how the application has to be architecture by having service layers (Application Service layer, Domain Service Layers, Database Service layers ..).
    • Explained the architectural concepts here.
  • How to handle the scenario (given) for Performance?
  • How do you maintain logging in the application?
    • Logs can be maintained in the application with various levels and is used to understand how the application is working.
    • Also will be used to identify the errors.
    • Administering the application is easy if logs are available
  • What are the best practices do you follow?
    • Best practices given here..
  • How do you implement workflow?
    • Workflow can be either sequential or state-machine.
    • Before WWF, used to have roles in Database to execute workflow based applications.
    • Scenario explained here.
Happy interviewing... !!!

~ Gangadhar Kotu

Friday, September 18, 2009

.Net Framework Features

I have been searching in the net where I can get all the features of the .Net framework product. Here is what Microsoft has delivered as a release wise.

.Net 3.5 SP1 Overview

.Net 3.5 Overview

.Net 3.0 Overview

.Net 2.0 Overview
  • 64-bit support
  • Access Control List (ACL) support
  • ADO.Net MSDN
    • Managed Providers
      • Server Enumeration
      • Asynchronous Processing
      • Multiple Active Result Sets (MARS) - Usage
      • Bulk Copy Operations here
      • SQL Server Max data types - varchar(max), nvarchar(max), varbinary(max) - work with large value types
      • SQL Server User-defined types
      • SQL Server notifications
      • Transactions with SQL Server snapshot Isolation usage
      • Database mirroring in SQL Server 2005 here
      • Provider Statistics usage
      • Change password in SQL Server 2005 here
      • Batch Processing
      • Tracing
      • Partial trust
      • Connection Pooling control usage
      • XML Datatype support
      • Integration with System.Transactions and Promotable transactions optimizations for SQL Server 2005
    • Disconnected Classes
      • DataTableReader object usage
      • Binary serialization for DataSet
      • DataTable as a standalone object
      • Create DataTable from DataView object
      • Schema Inference Engine enhancements
      • Namespace qualified Tables
      • Load method for DataTable and DataSet
      • RowState control (new methods SetAdded and Set Modified for DataTable and DataRow)
      • Enhanced support for custom defined types
      • IndexOf method on DataTable.Rows collections.
      • SetOrdinal method to change the position of the column in DataTable.
      • DataView performance improvements
    • Provider-Independent APIs
      • .Net Data provider Enumeration
      • Provider Independent API
      • Schema Discovery
  • ASP.Net here
  • Authenticated streams
  • COM Interop service enhancements
  • Console class additions
  • Data Protection API
  • Debugger display attributes
  • Debugger Edit and continue support
  • Detecting change in Network connectivity (NetworkChange class)
  • Distributed computing
  • Eventlog Enhancements
  • Expanded Certificate Management
  • FTP Support
  • Generics and Generic collections
  • Globalization
  • I/O Enhancements
  • Manifest-based Activation
  • .Net Framework Remoting
  • Obtaining local Network information - System.Net.NetworkInformation class
  • Ping class
  • HttpListener class
  • Programmatic control of caching - System.Net.Cache class
  • C# 2.0 here
  • Visual Basic 2.0 here
  • Security Exception class System.Security.SecurityException
  • I/O device support - SerialPort class
  • Version-tolerant serialization here
  • SMTP support
  • Strongly typed resource support Resource File generator (ResGen.exe)
  • Threading Improvements
  • Trace data filtering
  • Transactions System.Transactions class
  • Web services - asynchronous calls to web methods
  • Windows Forms features
    • ClickOnce deployment here
    • Application Settings here
    • New Data-binding model
    • New controls
      • DataGridView control here
      • ToolStrip control here
      • MaskedTextBox control here
      • SoundPlayer class here
      • SplitContainer control here
      • ListView control enhancements - tile view, grouping and drag-and-drop item repositioning
      • WebBrowser control here
      • FlowLayoutPanel control here
      • TableLayoutPanel control here
      • BackgroundWorker control here
      • Asynchronous Pattern for Components here
  • XML-Related features
    • XmlReader
    • XmlWriter
    • XPathNavigator

.Net 1.1 Overview
  • ASP.Net Mobile controls
  • ADO.Net
    • Data provider for ODBC, namespace System.Data.Odbc
    • DataReader object has "HasRows" property.
    • Connection object has "EnlistDistributedTransaction" method to perform transactions.
  • Side-by-Side execution (MSDN)
  • Security
    • AllowPartiallyTrustedCallersAttribute added to the assemblies System.Web.dll, System.Web.Mobile.dll and System.Web.RegularExpressions.dll (MSDN).
    • <> tag support in web.config for ASP.Net
  • IPv6 Support for Protocols

Happy coding... !!!

~ Gangadhar Kotu

ASP.Net features

I have been searching in the net where I can get all the features of the ASP.Net product. Here is what Microsoft has delivered as a release wise.

ASP.Net 3.5 SP1

ASP.Net 3.5

ASP.Net 3.0

ASP.Net 2.0

ASP.Net 1.1



Happy coding... !!!

~ Gangadhar Kotu

Asset Picker field type

In one of my project, I had to create a field type in MOSS with Asset picker functionality. Custom field types are very useful when you are creating custom functionality in MOSS 2007. The following example shows how to provide a functionality to select the document/list item/ from the site. The would be helpful to the user selecting the URL rather typing everything (there is a possibility of typos :) ). We are going to use 'AssetUrlSelector' class from Microsoft.SharePoint.Publishing.WebControls namespace for the purpose.

Create a custom field class by inheriting from SPFieldText class.

public class RelationshipField : SPFieldText {
// Methods

public RelationshipField(SPFieldCollection fields, string fieldName) : base(fields, fieldName) {}

public RelationshipField(SPFieldCollection fields, string typeName, string displayName) : base(fields, typeName, displayName)

{}

// Properties

public override BaseFieldControl FieldRenderingControl

{

get

{

BaseFieldControl control = new RelationshipFieldControl();

control.FieldName = base.InternalName;

return control;

}

}

}

Create a control class by inherting from BaseFieldControl class. and also need to include the following namespaces.

using Microsoft.SharePoint;

using Microsoft.SharePoint.Publishing.WebControls;

using Microsoft.SharePoint.WebControls;

Here is how the control creation goes:

public class RelationshipFieldControl : BaseFieldControl

{

protected AssetUrlSelector urlSelector;
protected override void OnLoad(EventArgs e)

{

base.OnLoad(e);
// Set the value if this is a postback.

if (this.Page.IsPostBack && base.ControlMode == SPControlMode.Edit)

{

this.ListItemFieldValue = urlSelector.AssetUrl;

}

}
protected override void CreateChildControls()

{

base.CreateChildControls();
// Add the asset picker when in edit mode.

if (base.ControlMode == SPControlMode.Edit)

{

urlSelector = new AssetUrlSelector();

this.Controls.Add(urlSelector);

}

}
protected override void Render(HtmlTextWriter output)

{
// If this is edit mode and has a value, set the picker.

if (base.ControlMode.Equals(SPControlMode.Edit)

&& this.ListItemFieldValue != null)

{

this.urlSelector.AssetUrl = this.ListItemFieldValue.ToString();

}

base.Render(output);

}

}



To register the custom field created above, you need to create a field type definition file as show below. And this xml file needs to be copied to 12\TEMPLATE\XML directory to recognize by MOSS.



asdf

asd

fa

sdf

afwasre

asraqer







Happy Coding... !!




~ Gangadhar Kotu