Feb 9, 2010

Challenge your world: Day Two

Bruce Schneier, The security guru – The Economist , delivered a speech under topic Re conceptualizing Security. In that one hour session, he convince us that he is a real security guru. And he discussed what security models passed down with our generations and how it think in that way to apply security concepts in IT. Though it is not technical session but quite interesting one which change the way thinking of security.


Its took my attention what he explained about Feelings, Model and Reality in terms of security.

In the next session, Prasanna Amirthalingam has presented Tips & Tricks with WCF 4.0. Some of the interesting things are,
  • Missing address discovery using UDPDiscoveryService
  • Service request routing
  • Validating inputs (Parameter Inspectors) in WCF pipeline which will enable to plug or unplug without modifying the current WCF service.
  • Caching
  • Implementing REST principle
Pinal Dave showed us the other side of SQL Server index which we already know but use it wrong way. It is also interesting session that attracted everyone’s’ attention. He proved us worst cases when using index without knowing it. The conclusion of this session is,
  1. Drop unused indexes
  2. Always have clustered index
  3. Use filtered index( new to Ms-SQL 2008)
  4. Use User Defined Functions(UDF) wisely.

I have learnt lot of things today and as a totally I’m happy for the day with tech ed.

Feb 8, 2010

Challenge your world: Day One


Microsoft Tec Ed 2010 Sri Lanka is now happening in Colombo. This time its theme becames
Challenge your world.
 It is quit thrilling experience to Sri Lankan IT professionals. It will be last 3 days, today is the day first. I am one of attendee on behalf of my company(Brandix Lanka).

Here is the summary of sessions which I attended to,

Sliverlight 4.0 (Beta) (Speaker : Risman Adnan) ,Some of the new cool features were introduced, among them ,
  • Drag’N Drop- you can drag files from your local hard drive into the Silverlight application.
  • Printing Capabilities.
  • Right Click facility which enables to add context menu to the application.
  • Integrating web cam with Silverlight applications.
  • Feature that I’ve thrilled is Out of Browser enhancement.
Darren Sim has explained to us about VS2010 and its new features and ASP.net 4 .0 and AJAX CDN(Content Delivery Network).
ASP.net 4.0 comes with,
  • Lots of Charts including financial and statistics. Now creating a chart as easy as binding data to a Gird control.
  • AJAX Toolkit – now totally supported by Microsoft.
  • MVC 2.0
  • URL rewriting
  • SEO optimization
  • And we can create packages to deploy ASP.net applications with VS2010.
In addition to that there were following sessions too,
  1. What's new in Exchange 2010 by Madhusudan Kohli & Aviraj Ajgekar
  2. Optimize your Windows 7 Deployments with System Center by Charlie Tan
  3. New Features in SQL Server 2008 R2 by Rushab Metha
  4. Managing Exchange Server with System Center by Charlie Tan
  5. Data Protection Manager 2010 by David Foo
  6. The history of the Log: Change Data Capture (CDC) by Pinal Dave
  7. Active Directory Federation Services v2 by Brian Puhl
  8. SharePoint Server 2010 by Joy Rathnayake
  9. Introducing the Microsoft Web Platform by EdQuek

Dec 4, 2009

Session Timeout Notification


Sometimes you may need to get notification if session of an Asp.net application get expired. For the basics of session management you can find my post here.

In all of the above cases, the session supposed to be timeout. It will handle by the asp.net runtime, which we can set in the web.config <sessionState timeout="1" />. Default timeout is 20 mins. Which means after 20 min session will become abandon and if you are not correctly handle it will leads to system crash. What general recommendation is, always check null of the session item that you’re going to refer. But in most user oriented application, we should notify the user that ,"Hello your current session has expired, what do you want to do?"
 
How to achieve this?
 

Oct 26, 2009

Future IT Practitioner : Ethics

Ethics in a profession will describe professional behavior among professionals. Further it will describes an individual’s behavior towards to his or her profession. Because misbehaving of few professional will disrupt the profession as whole. Hence professional bodies like BCS, IEEE defines “Code of Ethics” for their members.

In both “Code of Ethics” we can see common areas they tried to address.
  1. Public Safety
    We have responsibilities to protect the public in many ways. Special due care should be paid for designing, developing and maintaining critical systems.
    Therac -25  and London ambulance service failure  are two incidents that come into play.
  2. Avoid Discriminations
    This is a wide area to talk about but, basically we should not less favorable because of race, skin colour, religion etc.
  3. Professional Obligations
    Here it addresses, our competency level, integrity with other professionals ,avoiding conflict of interest etc.
  4. Legal Obligations
    This has wide scope that will differ from country to country. But we should know legal legislations for the country that we are going work with. Examples for common legislations of misusing computers, regarding confidential information, discriminations , consumer protection etc.

Code of ethics of
+ BCS http://www.bcs.org/server.php?show=nav.6030
+ IEEE http://www.ieee.org/portal/pages/iportals/aboutus/ethics/code.html

Copyrights © Kelum Ganegoda 2009
Related Posts: Future IT Practitioner

Oct 17, 2009

Future IT Practitioner

It is crystal clear that our current society became information society. Throughout the world organizations and individuals are now starving for information. This happens purely because of following factors,
  • Expansion of IT
    IT is no longer an isolated unit in an organization. It is link into other units with helping out for their work.
  • Evaluation of technologies
    Inevitably Internet, ERPs, SOA, SAAS (Software as a service) etc.
By considering all the facts, IT became truly global profession. All IT practitioners across the world have contributed and contributing to this global profession.

Even though, IT is global profession it has no limitations as a profession like other prominent professions, Medical practicing, Lawyers, Accountants etc. What I’m trying to say is, for an example, no control of entry for IT, like, doctors or engineers. Although this type of control of entry is necessary but it’s too late to implement at the moment. We know, UK and USA had put enormous efforts for this, unfortunately those were not work out.

On the other side, if we put such control of entry, sometime it wouldn’t get as much expansion as the present.

Since you and me contributing to this global profession, as professionals, we have sort of responsibilities. May be, those responsibilities will become practices throughout the professionalism. Mainly we can categorize them into 2.
  1. Ethical practices
  2. Competency
Generally ethical practices are enforced by a professional body, like BCS, IEEE etc, to its members. For this global profession, I think, all practitioners should adhere to general ethical practices. Professional ethics, sometimes, will help to sharpen up our competency level.

Copyrights © Kelum Ganeogda 2009

Oct 3, 2009

Update Progress with AJAX UpdatePanel

In this post I will demonstrate how to create update progress with UpdatePanel, a similar one that we can see in our gmail, like following,


Following key things to be addressed.
  1. It should be on top-center of the page
  2. It should be on top all other HTML controls
  3. When scrolling it should be placed on relative position of the current scroll position.
To achieve this we can use many alternatives but I would use a simple approach.
In addition to the UpdatePanel, I will use </div>, CSS style and javaScript.

Here we go.
  1. Add a div tag within body element.
    <div class="divProg" id="divProg"></div>
    Note that id and class attributes are necessary.

  2. Add following css class to the web page or style sheet file. Keep in mind, without position: absolute; z-index: 10; css properties this won’t work as we expected.
    .divProg
    {
     position: absolute;
     left: 0px;
     top: 0px;
     width: 100px;
     height: 0px;
     z-index: 10;
     border: 1px none #000000;
     visibility: hidden;
     background-color: #FFF1A8;
     font-weight: bold;
     padding: 5px 10px 5px 10px;
    }

  3. Now we want to display div on top-center of the screen as well as move its top position relative to the current scroll position. To address this we will creates following 3 javascript functions.
    To get current Y position of scroll,
    function getScroll_Y() 
    {
            return document.documentElement.scrollTop;  
    }
    To set current top position of div,
    function setDivTop() 
    {
    
            if (document.getElementById("divProg") != null) {
                theDiv= document.getElementById("divProg");
            }
            else {
                return;
            }
            theDiv.style.top = getScroll_Y() + "px";
    }
    Write a function to toggle display for the div.
    function displayDiv(display) 
    {
        if (document.getElementById("divProg") != null) {
            theDiv = document.getElementById("divProg");
        }
        else {
            return;
        }
    
        if (display) {
            var width = document.body.offsetWidth;
            var height = document.body.offsetHeight;
            if (!width) {
                width = window.innerWidth;
                height = window.innerHeight;
    
                if (!width) {
                    width = screen.width;
                    height = screen.height;
                }
            }
            // To center the div, we need to deduct its half of
            // width from half of screen width. So we set div width =100
            // in css, so that deduct by 50
            theDiv.style.left = width / 2 - 50;
            theDiv.style.top = getScroll_Y();
            theDiv.style.height = 25;
            theDiv.innerText = 'Working...';
            theDiv.style.visibility = 'visible';
    
        }
        else {
            theDiv.style.visibility = 'hidden';
        }
    }


  4. Now we want to handle request start and request end events. we will be able to use following code with assist of ajax extension library.

    // Requests Events
    // ============================================
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    
    prm.add_initializeRequest(InitializeRequest);
    prm.add_endRequest(EndRequest);
    
    function InitializeRequest(sender, args) {
        if (prm.get_isInAsyncPostBack()) {
            args.set_cancel(true);
        }
        displayDiv(true);
      
    
    }
    function EndRequest(sender, args) {
        if (args.get_error()) {
            alert(args.get_error().message);
            args.set_errorHandled(true);
    
        }
        displayDiv(false);
    }
    
    //===============================================

  5. Set page's scroll event,
    <body onscroll="setDivTop()">




Download Sample
File Size: 18K

Jul 29, 2009

Be Aware Gmail SMS

You may received an email saying Send & Receive SMS From Your Email !!!

Don't trust that, it's completely fake, but 100% same as GMail logging screen. This will stole your password.

MEC: How to Set Message Counter for EDI Message

When you sending/creating EDI messages it is necessary to include unique message interchange number. This is to ensure each message that we ...