one single programmer

I've started doing some independent work on the side. This has opened my eyes to somethings and I plan to write about it as time permits.

Sunday, November 26, 2006

pedestrians

            I know that title has nothing to do with programming or working but it’s the major thing that occupies my thoughts at this moment so I need to get it out.  In my city there have been about 4 or 5 deaths caused by pedestrian car collisions, I’ll leave it up to you to decide who died in these scenarios.  That’s a ratio of about 1 in every 60000 people had a chance to get hit.  A funny way of putting it because of what I witnessed this past Friday night.  My wife and I were driving to a dinner party and on a four lane road this woman starts walking across the road.  It was 6:30 pm and already dark and she was wearing black.  I saw her in time but it scared the crap out of me.  It wasn’t a crosswalk, it wasn’t at an intersection (although there was one 20 meters away) and it just blew me away.  I can never imagine a time where I was so busy or in a hurry that I would risk crossing an arterial road during the night.  The issues I have with this is to some degree that if I hit that person they would likely be dead and that is always sad but to a larger degree here in Canada the basic rule of thumb is that the driver must prove they were not at fault in a pedestrian/car collision.  Do the people that cross streets in such a manner think about that?  Do they think ‘They won’t hit me because it’s their fault.’  My thinking would be ‘Holy !*%$ if they hit me I’m toast!”  I don’t understand it at all. 

Monday, November 20, 2006

Even better dataset join!

Earlier I showed one way to combine two datasets.  Well while I was playing around on another part I saw the dataset.merge method and well call me a monkey’s uncle if it don’t work nice as pie.

 

ds2 = m_DAL.LoadDataSet(m_DAL, strSQL)

ds.Merge(ds2)

 

That’s IT!

 

Later…

Combining datasets

One of the pages that I’m developing required a rather large query.  Since I’m using MS Access as my database I’m limited to the number of characters in the query ( I believe it’s 256.).  So I broke the query apart by the UNIONs that I did with the thought I could combine the datasets after each one.  Well I learned something new.  I tried:

 

For each dr in ds2.tables(0).rows

            Ds.tables(0).rows(0).add(dr)

Next

 

But this threw an error that the row already existed.  I’m not sure of the mechanics of the datasets but to me this made sense.  I did learn that the following works

 

For each dr in dt.rows

            Ds.tables(0).importrow(dr)

Next

 

By assigning the ds2.tables(0) to dt this now worked.  So the disassociation of the datatable from the two dataset seems to allow the add to work.

 

If you know the why’s of above let me know but if you just needed it to work then happy coding!

Sunday, November 19, 2006

ASP.NET 2.0 - GridView

   One thing I’m working on right now is a page that displays all the pending changes of employees and their benefits.  I’ve never used the gridview paging tools before but since the set returned could be large I ended up setting this.  However I didn’t know that if you late bind the datasource the paging events must be handled manually.  After some research I ended up doing this:

 

Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging

 

        GridView1.PageIndex = e.NewPageIndex

        GridView1.DataSource = dsChange

        GridView1.DataBind()

 

    End Sub

 

Not rocket science but it may help someone out there.

 

 

Later.

 

Saturday, November 18, 2006

review time

            I find the review process interesting.  It really shows the character of both sides of the process.  For all the years I’ve been giving and receiving reviews I’ve noticed basically 3 types of people.  Simply put they are the negative, neutral and positive.  So the negative is the type that no matter how well the year went, no matter how well you did that year you will never be seen as a success.  There are always things to work on and until you do that you won’t succeed.  The neutral remains on the fence neither being positive nor negative but giving a good mixture of both.  The positive won’t say poop if she had a mouth full of it.  They can’t be confrontational and will avoid saying something negative in fear of ever upsetting someone.  Of course the receiver’s mood plays a big role on what part of the scale the giver falls on.  I know in some jobs I’m so negative myself that even the positive person would come off as negative. 

 

Back to work… 

Saturday, November 11, 2006

Ever have those weeks

Ever have one of those weeks?

 

I’m sure it’s a culmination of several years but this week seems to have been very hard.  It was capped off by my lead grilling me on a decision that was made 2 years ago.  Basically the situation was why with a development of a project why we left out certain functionality.  I remembered the overall reason but he wanted specifics and I couldn’t remember it.  I finally said ‘I can’t remember but if you want me to research it I can.’  He wouldn’t say yes or no and I left it at that.  It’s frustrating because I’m finding I often get a job to do but only get ¾ of the information and then when I complete my work I get asked why I didn’t do this or that and it’s usually because I didn’t know that this or that was a requirement or even an option.  I’ve come up with a plan but am uncertain if it will cause more friction.  I plan to recap each discussion with an email (if it is required) so that the lead can say yes or no to what I’m thinking I should be doing.  Hopefully this will eliminate the “I thought I told you to do….” 

 

Have a good week.

Tuesday, November 07, 2006

Windows One Live:

I actually researched this. I checked out what was being said on the web and I didn't find anything that wasn't beyond the usual blabbering about hated M$ software. I installed it on a new laptop that housed my VS 2005 environment. Man I was excited. The back up utilities, the automatic clean up and so on. I started by scanning my laptop for viruses. All was good. I then proceeded to set up the back up utility. Hmmm, no ability to use a mapped drive that I have connected to my main machine in my home network. Windows offers a wizard to create home networks yet their software doesn't permit the use of them... OK I overlooked this as an oversight and moved on. I continued for several months until I noticed that my machine was SLOW. It was brand new and this software was supposed to keep it clean. I started looking at the processes and noticed one that seem to always jump up and grab many of my cpu cycles. Guess what, it was the windows one live antivirus software. I quickly open up the console and search for the options to exclude folders from realtime scans, there isn't one. This is the point when I knew I was unistalling the software and going to my old standby NORTON. Too bad that they followed their typical build and rebuild process on this, they now have lost me as I will likely not want to reset all the scheduling and such.

Anyways that my .02