Pages

Monday, September 10, 2012

Project Estimating, project estimation




I believe we should consider these points for estimation  process. there may be more, pls feel free to add. 
1.       Risks, Scope  and complexity of the project
2.       Domain/Functional/Technical Knowledge for requirements of team
3.       know strengths and weaknesses of individuals team members for requirement
4.       Know weaknesses of requirement with analysis meetings with functional expertise team members, QA, Architects and business analysts. 
5.       Process time:  process hours of project (including QA push process, development label creation, SCRUM meeting and any developer environment setup (not main environment setup) )
6.       Development time: real development hours
7.       Unit testing time: unit testing hours 
      
       EXCEPTION Handling:
8.       Developer buffer time
a.       waiting period for dependency information
b.      Estimations Can Go Wrong
c.       Unrealistic interpretation of original requirements
d.      Inadequate/unclear requirements
9.       Management buffer time ( Buffer time as per risks of project)
a.       Availability of All the Resource
b.      System outage
c.       Estimations Can Go Wrong

Few points
1.       Historical data for the previous estimation for improvement and accuracy

2.       It’s good to include assigned developers in estimation process after 1st level of estimation (after Architects estimate).
3.       In estimation process, it will be good to give enough time to developer so he can at least go through limitations of current system and resource, learning curves of new technology for project.
4.       It will be good, if we get time for proof of concept depends on project, if project needs proof of concept.   
5.       More meetings with business analyst and QA will help to understand and streamlining the project requirements. 
6.       Estimation will be more accurate and efficient if developer will be included in design phase.

Tuesday, August 28, 2012

Enable CLOB in DataSource in ColdFusion administrator / [Macromedia][SQLServer JDBC Driver][SQLServer]XML parsing: line 1, character 64000, equal expected

ERROR:   Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]XML parsing: line 1, character 64000, equal expected  

CASE:  we get this error when we try to retrieve long text/characters from database in cfquery.   Default configuration for Long Text Buffer (chr) is 64,000. when you expect result more than 64,000 characters in CFQUERY then we need to enable  "Enable long text retrieval (CLOB)". 


see below image for reference








Thursday, August 23, 2012

upgrading jquery to 1.8.0/upgrading jquery to latest version

its very easy to upgrade to latest version of jquery.  we need to take care of very few things.


1. If you are using "checked" property like below then you need to change code like below. the reason its not returning as true/false anymore.

old code:  
    if ($('#testCheckbox').attr('checked')== true && 

your new code need to be like this: 
    $('#testCheckbox').is(':checked')


2. if you have any code like below then change as per new code

old code: 
    var cType = $("select:cType").val();    

New Code
    var cType = $("#cType").val();


3. if you using validation plugin then old version of validation plugin will not be supported any more with new jquery so you have to upgrade your validation plugin also. Upgrade validation plugin to 1.9.0

http://bassistance.de/jquery-plugins/jquery-plugin-validation/

4.  upgrade your old plugins, 
    jquery.form.js -- upgrade to new version of this plugin. 


Thursday, August 16, 2012

social change without society

is it possible to have social change without society? No.

is it possible to ask questions without knowledge? No

is it possible to change someone without changing yourself ? No



Friday, June 29, 2012

stack trace javascript

stack trace in javascript
This was requirement in my current project, where i need to log real JavaScript error. Most of the time i was getting my javascript error was giving line numbers of jquery main javascript files but error was somewhere else so I decided to trace js error.


this is simple code you can try to trace. you can write green block of code wherever you want to trace.
you can also write a plugin or a common function and call where ever you want.

this is simple demo of understanding tracing error. 

I found a gud link for arguments object. this is very simple page which will make u understand arguments object.

http://www.seifi.org/javascript/javascript-arguments.html


<script>
function funcallee ()
{
    var trace ="", currentFunction = "";             
    try{
         currentFunction = arguments.callee.caller;                                       
           while (currentFunction) {
                 var fn = currentFunction.toString();                 
                 var fname = fn.substring(fn.indexOf("function"), fn.indexOf(")") +1 ) || 'n/a';                                       
                trace = trace + ' --> '+ fname;                    
                 currentFunction = currentFunction.caller;
           }
    }catch (e){
        trace= "";
    }     
    alert (trace);       
}             
             
function testcaller_1()
{
    try{
    var h = j;
    alert (h);
    }
    catch(e){
        funcallee();
    }
}          

function testcaller_2()
{
    testcaller_1();   
}
   
testcaller_2();


</script>

Monday, June 18, 2012

access denied javascript error internet explorer / resize access denied error javascript

Access denied JavaScript error in internet explorer
Initially i was thinking this error was coming because of some ajax cross domain access. Usually when you try to access different domain from your site, it gives you error for cross site scripting.

after long time, I found and observed that this access denied error is coming when i am trying to resize my internet explorer browser. It was random not all times.

I read below article and observed access denied error is coming only when i use to click mouse button and hold it for a while (just like dragging mouse ).

the reason is windows stops resizing or moving of any window when your mouse is clicked and hold on (ready for mouse drag event).

few tips to avoid this error on resize.
1. do your resize on page load not on jquery ready function.
    - because ready is faster then page load function. this may avoid user's holding mouse for a while.




see below article. this will be also helpful.

http://support.microsoft.com/kb/904947

Friday, June 15, 2012

reading cookie in asp .net set by coldfusion

1. cookie has special characters
2. unable to read cookie  in asp.net set by coldfusion
3. how to replace special characters in cookie coldfusion asp.net
4. replace special characters in cfcookie

:) this was a good issue for us. we have two application, one in coldfusion and other in asp.net

Coldfusion application was setting a cookie and that cookie was supposed to read by asp.net application. 
cookie set by coldfusion was url encoded and it was having %2b characters for "+" sign so when asp.net was reading cookie as %2b signs so we were not able to validate users based on cookie read by asp.net application.

so at last we figured out this and found browser is storing cookie in url encoded format and asp.net application needs to decode cookie.

we used below code in asp.net to decode cookie set by coldfusion.



cookieValue= HttpUtility.UrlDecode(myCookie.Value);


 Few tips:
1. always use F12 developer tool to see all set cookie in internet explorer. 


finally we solved problem :)
 

Thursday, June 14, 2012

cfflush not working in coldfusion

tiny observation for cfflush

cfflush will not work in body of many tags, custom tags, cfqueries, may be in CFC.
I was in need of flushing all data before I wants coldfusion to sleep for 2 minutes so i can copy all data to compare but  cfflush was giving me error then i realized cfflush is not suppose to give data from above mentioned scenarios.

Be careful with cfflush tag, there are few more restrictions it will not allow to save client variables immediate after cfflush tag.


Friday, June 1, 2012

components for any application / framework for any application


We have always discussion with my mates on components for any application. What components are needed for any application or what should be a good framework for any application in terms of its basic working.  I believe it really depends on project, requirement, priorities, team members, team head and company policies. 

every project has its own need. Some one wants to make project more technical and more dynamic so a big list will be good but it comes on cost of lots of plugin and sharing resource and page load. 
I really don't agree that we need all below components in any application because it all depends on your requirement.  I will suggest some of them because its definitely required for any robust/scalable application.

I prefer these mainly these components. 
Application property, Caching, logging, Error handling, application debugger, message handler, processing manager, session manger.     

List of all components for an application: 

1. Application init / load
        This can be used for initializing your application or loading your application.

2. Application property  
       This can be used for initializing your application or loading your application.

3. Application caching (application data)
       This can be used for caching for data 

4. Application logging (Audit)
       This can be used for logging for an application.  

5. Application analytics (user behaviour)
      This can be used for analytics data for users and their behaviour.

6. Error handling  (error report / error notification / error  handling)
      This can be used for error handling.

7. Security login system
      This can be used for login system

8. Security role system
      This can be used for role system for an application 

9. Application debugger
      This can be used for debugging application even in production level. this will help in debugging data,    
       user remote information/request/response/timings/performance/caching/session information.

10. Application maintenance    
        This can can be used for maintenance of application, outage, temporarily unavailable kind of things.

11. Email system of application  (postOffice)
          This can be used for email requirements of a application

12. Message handler
         This can be used for messaging in application. Displaying success / failure messages for users actions.

13. Processing/loader handler
       This can be used for displaying loader/processing screen/section for any application    

14. Object manager (Coldspring/spring)
    This can be used for managing objects

15. Validator Rules engine
     This can be used for validation part of data

16. Transient object manager
      -- not really an application component but i am including just if you want to include so.

17. Helper manager
     This can be used for tooltips, icon tips or any kind of tips you want to show for any page

18. Remote manager 
     This can be used for remote services.

19. UDFs
      This can be used for a place where you can have lots of user defines functions.

20. Session manager
     This can be used for session of a application.

21. analytic data for web pages 


Wednesday, May 30, 2012

not able to install IIS / problem in installing IIS/ problem in reinstall iis/ error in reinstall IIS

I got this problem few months ago when I was trying to reinstall IIS and it was giving me same error "not able to install".  I tried few times to reintall it and at last I got succes when i forcefully deleted "C:\Inetpub" folder.

few steps if you are getting problem in uninstalling IIS. 
1. restart system  and try to uninstall it.
2. forcefully delete folder if uninstall is failing. 
3. again try to unistall if it shows you IIS in system
4. restart your system and reinstall IIS. 

[Just one note]
if you have Fiddler in your system and if you are trying to open your websites which you already opened through fiddler. then try to close all browsers and open fiddler and then browsers. 

sometime Internet explorer declines page request somehow with fiddler. 
if you open fiddler first and open your browsers then it starts working again. 
this was the reason i was installing IIS because i thought my IIS is corrupt but in real fiddler was not open and IE was declining page  requests. 





find real ip address coldfusion

find real ip address coldfusion

finding real IP address for client machines, that's not very technical but it was five years ago for me when I was trying to get real ip address for project in company NCR. 
I was always getting ip address of download proxy server or some other proxy server. 

I found this simple code to by pass any proxy server (download/proxy server/ or any one). 

<cfif CGI.HTTP_X_Forwarded_For NEQ ""><!--- Checking proxy address --->
       <cfset real_ipaddress = CGI.HTTP_X_Forwarded_For>
<cfelse>
       <cfset real_ipaddress = CGI.REMOTE_ADDR>
</cfif>
 
 

Tuesday, May 22, 2012

mach-ii dashboard is slow

I came across this in my office today.  one of my teammate suggested me to do this.
It never happened to me but i am posting this for my future reference and for Mach-II users.

when your  mach-ii dashboard is very slow, just delete files in below folder.
C:\ColdFusion8\wwwroot\WEB-INF\cfclasses