Thursday, January 31, 2013

How to make a space in a HTML list

this is how I did it

.space{ margin-bottom :50px;}


<li><i>a</i></li>
<li class ="space"><i>b</i></li>
<li><i> </i></li>

Wednesday, January 30, 2013

Compiler questions

let's say you had in a class overloaded procedures thus


   protected void click(object o)
        {

        }

        protected void click(string  o)
        {

        }
 and code thus

       protected void Button8_Click(object sender, EventArgs e)
        {
            string s = "fdgdfg";
            click(s);
            click(sender);
        }

would it compile and why?

Monday, January 28, 2013

Asp.net radio buttons

if you have a page thus


      <p>
          <asp:RadioButton GroupName ="tt" ID="RadioButton1" runat="server"  Checked="true" />
            <asp:RadioButton  GroupName ="tt" ID="RadioButton2" runat="server" />
              <asp:RadioButton  GroupName ="tt" ID="RadioButton3" runat="server" />
      </p>
      <asp:Button ID="Button7" runat="server" Text="radio"
          onclick="Button7_Click" />

and code thus:
   protected void Button7_Click(object sender, EventArgs e)
        {
           // this.RadioButton2.Checked = false;
            this.RadioButton1.Checked = true;
        }

and you you select the 2nd radio button and click button7 - what will happen?


since the values are set on load - the button code will do nothing because you can't have to radio buttons selected.



Friday, January 25, 2013

easy way to open docs from asp.net website

create a asp.net page and have on the pageload


            FileInfo fi = new FileInfo(Session["DocName"].ToString());
            if (!fi.Exists)
                return;

            Response.ClearContent();
            Response.ClearHeaders();
            Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
            Response.ContentType = "application/download";
            Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name);
            Response.AddHeader("Content-Length", fi.Length.ToString());
            Response.WriteFile(Session["DocName"].ToString());
            Response.End();



on your asp page have code thus

         Session["DocName"] = @"c:\blah\blah.xlsx";
            string iframeID = "iframe_contentview";
            string iframe = string.Format("<iframe id=\"{0}\" src=\"{1}\" style=\"display:none\"></iframe>", iframeID, "doc.aspx");
            ClientScript.RegisterStartupScript(GetType(), iframeID, iframe); 


and that's it 


presto! 

Sunday, January 20, 2013

Changing selected index with javascript

wont cause a postback

use __doPostBack("<%=blah.ClientID %>", '');

Friday, January 18, 2013

Dynamic Tab Control

if you don't set the tabindex - the control will not be visible.

Component not in designer

Can't find a component in the designer? some genius may have declared it in the regular .cs page.

Wednesday, January 16, 2013

Daily Scrum

good article

roi vs risk in scrum

foundations believe its either / or . She doesn't.

SCRUM and Self Organization


It is a primal behavior in nature
–Swarms
–Flocks
–Herds

Scrum foundations slide 109

I feel the comparison is idiotic. By some animals it may be even genetic. This is not the intelligent way humans  
self-organize

The Retrospective Prime Directive


Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand.
-Norm Kerth, Project Retrospectives: A Handbook for Team Reviews

If you do not go with such a mindset - then the retrospective will be painful and a waste of time.
Again , unfortunately if you have sub-par members on the team - they will have done their best and that still is not good enough.

Should the Product Owner Attend Retrospectives?



scrum foundations say yes. He says "maybe not always".

Scrum and Scope

some good points.

The Development Team


•May have partially allocated members
–Often considered an impediment
–Ex: Database Administrators, User Interface Design experts, Technical Writers

from the scrum foundation (85)

if they are too busy then the planning should reflect that - then they wont be an impediment
or you need to hire another DBA. I don't get this one.

Can A Product Owner Write a User Story?

why not? I'll disregard the scrum foundations on this (slide 84)

Size vs Size on Disk



the information on the clipboard can't be inserted into paint

Weird bug



This may help. Bizarrely , you can paste screen to outlook emails and word.

Tuesday, January 15, 2013

Correct place to register user controls

<system.web>
    <pages>
     <controls>
          <add tagPrefix="blah" src="~/Controls/blah.ascx" tagName="header"/>

The page '/blah' cannot use the user control '/blah.ascx', because it is registered in web.config and lives in the same directory as the page.

just put the user controls in a folder

The relative virtual path 'blah' is not allowed here.

You need to make sure it is using the Web application root operator

404 - File or directory not found.


The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

this happened when someone re-installed a server - all the http handlers were gone!

had to run aspnet_regiis –i

Monday, January 14, 2013

Variation in Velocity

My opinion is that even a large variation is OK once in a while (due to outside forces, a few people sick etc.) but constant variation is not -

also- do not tamper

how xml path concatenation trick works


select * from
(select  temp.data + ''  from
 (
select  'aa' joindata , null data
union select 'ba' joindata , 'a' data
union select 'bb' joindata , 'a' data
union select 'bb' joindata , 'b' data
union select 'bc' joindata , 'b' data
 ) temp
where temp.data is not null
FOR XML PATH('')
) as results(result)

returns aabb

why?since in the sql the column is thus temp.data + ''  designated - sql server does not know how to tag the data and therefore leaves it empty


The Scary Future After Scrum...

I hope it never gets here...

Outer apply /xml path solution for rows to column problem


problem : I need to get the max of a table grouped by a value - but - when there is existing joined data in another table I want to join on those values too, even when the relationship is 1 to many;if there are 2 values joined - group on those 2 as if they were pivoted to a column value

this is the problem :


select MAX(main.id),main.data,side.data   from
(
select 1 as id ,'a'  data ,'aa' joindata
union select 2 as id ,'a'  data ,'ab' joindata
union select 1 as id ,'b'  data ,'ba' joindata
union select 2 as id ,'b'  data ,'bb' joindata
union select 3 as id ,'b'  data ,'bc' joindata
) main

left join

(
select  'aa' joindata , null data
union select 'ba' joindata , 'a' data
union select 'bb' joindata , 'a' data
union select 'bb' joindata , 'b' data
union select 'bc' joindata , 'b' data
) side
on side.joindata = main.joindata
group by main.data,side.data


these are the results




1-b-ba is erroneously missing because bb is being grouped on both a and b

This is the same exact query with outer apply

select MAX(main.id),main.data,side.data   from
(
select 1 as id ,'a'  data ,'aa' joindata
union select 2 as id ,'a'  data ,'ab' joindata
union select 1 as id ,'b'  data ,'ba' joindata
union select 2 as id ,'b'  data ,'bb' joindata
union select 3 as id ,'b'  data ,'bc' joindata
) main

outer apply

(
select  * from
 (
select  'aa' joindata , null data
union select 'ba' joindata , 'a' data
union select 'bb' joindata , 'a' data
union select 'bb' joindata , 'b' data
union select 'bc' joindata , 'b' data
 ) temp
 where temp.joindata = main.joindata


) side

group by main.data,side.data


the solution

select MAX(main.id) as maxid,main.data,side.data   from
(
select 1 as id ,'a'  data ,'aa' joindata
union select 2 as id ,'a'  data ,'ab' joindata
union select 1 as id ,'b'  data ,'ba' joindata
union select 2 as id ,'b'  data ,'bb' joindata
union select 3 as id ,'b'  data ,'bc' joindata
) main

outer apply

(
select temp.data + ''  from
 (
select  'aa' joindata , null data
union select 'ba' joindata , 'a' data
union select 'bb' joindata , 'a' data
union select 'bb' joindata , 'b' data
union select 'bc' joindata , 'b' data
 ) temp        
where temp.joindata = main.joindata
and temp.data is not null
FOR XML PATH('')

) as side(data)





Burn Down Chart - public domain?

Wikipedia , that peerless source says that this is public. Scrum foundations slides say otherwise
here is a decent general article.

DOD & Bugs

DOD (definition of done)  shouldn't include "no known bugs". Every piece of software has bugs. I believe that the main criteria is as long the bug doesn't break basic functionality , its done

Principles behind the Agile Manifesto & SCRUM

Business people and developers must work
together daily throughout the project.


Officially this will not happen daily unless there is grooming every day 

Build projects around motivated individuals.
Give them the environment and support they need,
and trust them to get the job done.


as mentioned before, if your team is not motivated SCRUM wont help

  Continuous attention to technical excellence 
and good design enhances agility.

this was thrown in to retain some sanity with Agile. unfortunately , there is nothing is Agile and especially SCRUM that pushes this, and frankly controverts it.

Another example, when SCRUM needs standard management

one premise of SCRUM is a functional team. What happens if you have a team member who is not up to par. Bringing this up in the retrospective wont do anything. You need standard management to come in and either do training or to remove the member.

Summer Fun


Saratoga National Park


Canadian Rockies


Science Fiction Films

As anyone who has recently read a science-fiction anthology knows - the genre is now a huge tent encompassing many themes that are not easily recognizable as SF. Therefore, I would like to add for consideration to the lists of SF movies:

 1)It's a Wonderful Life - greatest alternative history - chilling in execution
2)Three Colors: Red - must beguiling time travel story

Friday, January 11, 2013

Are stories and PBI's synonymous?

Microsoft seems to think so.

Story Points vs Hours

Good Post

also this

A scrum master who thinks he is a manager

is an issue and negates self-organization

Scrum master role

the scrum master is responsible to have impediments removed.

is this inherently part of the job? theoretically someone else could do this. But then that would impact the performance of the team. I guess if the job is to make sure scrum can work smoothly then removing impediments is part of the job.

scrum vs waterfall

If SCRUM's narrative is right - that the alternative is waterfall where by the time you get the software no one wants or needs it - how did any software projects ever get done in the past?

Official scrum graphs


I believe both risk and ability to change are wrong and should be identical to business value.

order in sprint

Does the review have to be before the retrospective? Yes.
But why? Will the review uncover some information that wouldn't otherwise be available for retrospective?
I guess it makes sense but not etched in stone sense


SCRUM and Business organization

this is another conundrum. SCRUM understands that it will be a layer over the business - even though middle management has no role in SCRUM

Or does it?




check this out

How does scrum deal with Bugs

1)if you have on average the same amount of bugs every sprint then this should change the average velocity and be reflected for the future. The problem is the occasional bug that is really a PBI (some functionality not developed) this can skewer things

2)which bugs are PBI's? A good suggestion - any bug on past sprint should be entered as a PBI

3) who determines whats a bug? this is a thorny issue. I am guessing that the team should resolve this.

SCRUM Artifacts

Scrum artifacts include increments. For the life of me I dont see how this is an artifact. the increment is my work - not scrum's artifact. Some include burndowncharts. That makes more sense to me.

Another problem with scrum

I was thinking that SCRUM's aversion to documentation is based on a assumption that it's better to just try something and fail then research and document. But without that documentation , you wont have written down why an approach failed/will fail  and I am guessing there will be continuous second guessing later on on why they didn't try the other approaches.
     I am sure SCRUM will counter - we have nothing against documenting... ahem, yes you do.

 

Tuesday, January 8, 2013

More Excel and Dates (CSV version)

2 cases for CSV how excel picks up and formats text
top - windows culture
left - text
right- excel

excel picks up that 12/02/2012 is a date and chops of YY from the year
2012-02-14 is recognized as a date  and chops of YY from the year
15-Feb-2012-chops of YY from the year
2012/02/16 converted to default
22-12-2012 converted to default




here is more:





I have no idea why these things happen

Excel and Dates

when you enter in excel dates - if the date is in the format of the current culture then when you update the culture , the format will change.

For example if the culture is such:


and you have a s/sh such:


and then you change short format to dd-MMM-yy this will happen:

2 things happened 1) the 3rd cell changed formats 2)the 4th cell changed delimeters

even when you move the original s/sh to a different computer this is what happens




this happens with CSV also


fascinating stuff



Wednesday, January 2, 2013