Is your code running in development mode?

I've had to determine the answer to this question in a number of different applications that I've worked on.  Most recently it was Visual Studio .Net 2003.

What I ended up doing was creating a simple function called RunningInDevMode and gave it this one line of code:

Return System.Diagnostics.Debugger.IsAttached()

It has been working wonderfully and is better than the VB6 hack I used:

On Error GoTo EH:
    Debug.Print 1/0
    RunningInDevMode = False
    Exit Function
EH:
    RunningInDevMode = True

Published at

ComponentOne FlexGrid .Net

I was working in depth with this product today for the first time and found some interesting anomolies.  There is a Selection Mode setting for the control that is called ListBox.  The documntation states that this mode will allow the user to make selections of multiple non-contiguous rows or blocks of rows.  Once I got the control setup and populating with data in this mode, I wanted to be able to loop over all the selections that had been made.  Although there is a Selections property, it does not contain a listing of all the rows that have been selected in the control.  The only way to do this is to loop over every row and validate the Grid.Rows.Item(x).Selected property.  It's not a horrible work around, but I'm a little worried about the performance when I get 10,000 rows in the grid.  I suppose it's time to start stress testing the app.

Sports Team Names

This is a great follow up article illustrating the wide variety of unorthodox names pinned to teams around the world.

<a href="http://www.smh.com.au/articles/2005/02/18/1108709429228.html">SMH Team Names</a>

I'll add one of my own here.  The Adanacs is being used by a variety of teams from junior high to hockey and lacrosse.

Published at

SQL Tools

Since this is supposed to be tech blog, I should start including a little more tech and a little less crap.  Here are a couple of links for some software that will script database differences.

<a href="http://www.dbghost.com">www.dbghost.com</a>

<a href="http://www.sqldelta.com">www.sqldelta.com</a>

The DBGhost product is especially interesting because it offers a complete solution for the management of database changes.  It fully integrates with VSS and you can bundle it into your installation package and perform a database structure and data comparison and upgrades during the installation process.

Published at

Valentines

A very Happy Valentine to all you out there.  If you're in the same boat as me (paddling with one oar), drop by your favourite spirit shop and get yourself a little self-love present.  Perhaps a couple of fine bottles of wine or a nice case of imported beer.  Indulge, indulge, indulge.  So you will be hugging the one you love, while sitting on a cold linoleum floor, and wishing you'd put your hair up.

Published at

Patience

In the past I worked in an environment that had a very fast development pace which created high stress and, ultimately, some developer turnover.  My current job is not like that at all and this is both good (for me) and bad (for deadlines).

We have only a small team (2 .NET developers, 2 green screen developers and 1 technical writer), but so did my last job.  At that place I managed a complete rewrite and documentation of the inventory module's UI, and the creation of a fully featured windows control that graphically represented the inventory environment, in under 2 months.

I rolled into this new team with the work ethic and urgency that I was accustomed to from the past and, in the first month, created a database driven reporting environment from scratch.  This was quite involved as it has all information about the selection criteria, data gathering (queries) and report configurations, stored in the database.  In that time I even created functionality that allowed for database defined, event driven filtering of selection criteria, plus the ability for hyperlinks in reports to open secondary reports with linked data.  The whole module was a challenge considering I had to do an internal business analysis of the software's needs, train management on the ways of modern reporting tools, learn DataDynamic's Active Reports for .NET (I've been a Crystal developer in the past) and I had to create reports for a convention at the end of that one month period.  Still, I did this without any overtime.  Since the rollout for the convention, I've finished up the reports that were required and I've created a rather nice admin tool for configuring the reporting system.

This week was rather slow and I noticed that slow is the pace set by the other .NET developer.  Sure I don't know what other forces are at work during that individual's work day, but you should be able to make some progress on the main project.  In the past 2 to 3 weeks all that that developer has done for the project is create the data shema for the Inventory module.  At this pace, if all they did was create schemas, we'd have the data structure for the system drawn up sometime around the end of May.  Remember, that would include no UI or datalayer programming, and the targeted release time is October or November of this year!

All in all, I'm not stressed about work anymore, but I sure don't get anything done there.

Published at

Women

<span style=";font-family:Arial;font-size:100%;"  ><span style=";font-family:Arial;" >It has now been proven in practice, as well as theory, that no matter where I work, women will gossip. It may be pointless or tactless or vengeful. Regardless they will gossip.</span></span>

Published at

Architecture

Today interesting quip was spewed forth during a security system architecture meeting. Don't get me wrong here. I'm all for security in software, and I've written a couple of security modules for financial apps. Because of this, I once again made the mistake of approaching the conversation with some knowledge, ideas and intellect.

We were discussing when the security system should check the database for the user's security level for, say, a given form and it's child controls. It went something like this:

<span style="font-weight: bold;">FD (Fellow Developer):</span> If we're allowing the client company to configure individual permission levels while the system is running we will need to check the security as late as possible.
<span style="font-weight: bold;">Me:</span> Sure, if the end users want to see the changes reflected as promptly as possible. We can just check the database when we open the forms.
<span style="font-weight: bold;">FD:</span> What if a user has that window open and a new security setting is given to them which restricts the windows functionality? How are we going to handle that?
<span style="font-weight: bold;">Me:</span> Is there a way we can handle that? Maybe we can use a timer and reload the security and reset the form when it fires? That'd be some ugly code.
<span style="font-weight: bold;">FD:</span> Yah, that'd suck. There's gotta be a way to make the client software smart enough to react to any change made in the database.
<span style="font-weight: bold;">Me:</span> Don't know, don't know.


So if anyone has a spectactular way of make a client application fire an event when a different instance, most likely on a different piece of hardware, edits or adds to a database, I'm all ears. Until I get enlightened, I'm just going to shrug, smile and plead ignorance.


Published at

Against 3rd Party

Today I was "schooled" on the problems with using 3rd party controls in a software project.  The arguments were valid, if you hadn't ever gone through the process of using a 3rd party control.  Below I list the points made, and my counter points.  One thing to always remember when the discussion turns to the UI is that nobody on this project, myself excluded, has any experience creating a UI.

1.  Once using a 3rd party control you are beholden to the whims of that company's release schedule.
1a. Once using a 3rd party control, and it is functioning as required without error, you no longer should worry or care about that company's releases.

2.  Controls developed by 3rd parties don't include all the functionalities required for the project.
2a.  Have you even researched a 3rd party control for this functionality?  For any functionality?

3.  When looking at a 3rd party control, I was worried about the amount of code that it added to the #Region (.NET environment)  section of the application / form.
3a.  Why does 100 lines of code, that you don't have to write or maintain, scare you?  Is it because it's object oriented?  Then it must be because it's better than what you can write.

4.  The deployment cost of 3rd party controls in our business / software model is prohibitive.
4a.  For some perhaps, but we're talking about a combobox here, not something from ESRI.

5.  Successful deployment of 3rd party controls is an extremely difficult prospect.
5a.  If it were Crystal Reports, then yes, but we are talking about a combobox here.  Say have any of you actually created and managed an installation package using a tool like Installshield or WISE or Package and Deployment Wizard?  No?  Didn't think so.

I did get permission to look for a combobox after 30 minutes of discussion like I've noted above.  We'll see what happens next.

Published at

The Big Day

Yesterday was my transition for two-nine to three-oh.  It wasn't all that exciting.  I did have a good bottle of wine last night.

I'm starting to think that I should start another blog that is dedicated to wine and food.  Let me think some more on that.

Published at

To Print or Not To Print?

Today the (backup) copies of the DVDs were completed with the scanning and printing of their respective covers. Of course all on the company’s time and colour printer.

Published at

To burn or not to burn? Is that really what is at question here?

The way my desk is situated right now, I look over the shoulder of the network admin.  This might be a good thing if you consider that I have more experience at that job than he does.  For him it must be a bad thing.  Today I spent the afternoon watching him burn (backup) copies of DVD movies.  This was an all consuming task for him.  Ok, not all consuming, he did manage to multitask and baby sit a Windows XP install at the same time.

Is it bad form to make (backup) copies of DVD's?  Is it bad to make said (backup) copies at work?  Should this be covered in the Acceptable Computer Usage Agreement that I, and I assume he, had to sign?

Which of these questions has the worse answer?

Published at

The Four Horsemen are coming

I continue to see signs of the apocalypse when I'm a work. Today it was the implementation of a "dirty" flag (indicates when a form has been edited and should trigger a save). Most people would create a module/class level variable that would store this value. Not this developer. Why do something so clean when you can add a textbox to the control, make it invisible and push a zero or one into it?

Better yet was the function that I found today which had an ID value being passed in as a parameter. Instead of making the parameter of an Integer data type it was a String. Inside the function the string was cast to an integer and passed into the stored procedure. The reason I found this was because the function's parameter was getting passed in as a blank value in some instances. You cant cast a blank to an integer.

Published at

Why?

Why do 3rd party software developers continue to insult us with their ease of use statements?   Have they not used their own creations?  Have they no idea that there usually is competition in their marketplace and, god forbid, that competition may have some good ideas that need to be built on?  Don't they know that we pay so they get paid?  Do platform standards mysteriously disappear during their development cycle?

Do we really have to put up with it?  Ultimately no.  But realistically, yes......In some cases.  We could all build our own controls and add-ons, but who can invest the resources to build a product that can offer the same, and hopefully better, functionality of Crystal Reports or a grid control?  If developers would create their own simple controls, we'd eliminate a big pile of crap straight off.  Maybe then some good 3rd party developers would be put out of work, look for new jobs, end up working for companies who build these monstrosities and we'd have better products to use.

It's the Circle of Life.....

Published at