August 6th, 2007 — .NET, Code, PHP, Ruby, Work
Today we had a meeting going over a few future projects and it was brought up we could integrate the new project into an existing project that had 80% the same functionality. However, there comes a lot more complication with this short of merge.
For example, what happens if two people are working in the same project on two different pieces. The first person is finished with their piece and checks it in happy as can be, while the second person finishes later and his change needs to go in ASAP, while the first person’s change can’t go in till the end of the month. Now what?
Now in a perfect world, one would state that the first person shouldn’t check in their code till it can go in, or person two would get the previous version of the first person’s code.
At work we decided to keep the projects separate and not consolidate them even though it would share 80% of the functionality for the UI. But in the end, it allows us to not step on each others toes.
So my question is, how do you handle this?
July 30th, 2007 — .NET, Code, JavaScript, PHP, Ruby
File and project naming has been a massive debate at work lately as we teach newer employees the greatness of OOP. On my way home, I had an epiphany, and so I just had to write it out. So here is the best file naming reason/description you will ever read:
Your file names should describe your work without the developer having to open it to figure out what it does. In OOP, you should define your parts/pieces first, and then your object in individual classes. For example, you may find a class for Driver, Vehicle, Liabilities, and then one for Quote that incorporate the previous three. The names are meaningful and you do not need to even see the code to understand what is in them.
Now that file naming is covered, how about project naming? In all honesty, I am less concerned with project names than file names. But, they are important none-the-less. Your projects should describe your collection of classes in as few words as you can muster together. For example, the above files might be under the project name “QuoteEngine”. Why? Cause they are the pieces that allow a quote to process and are likely to include the methods for actually submitting a quote as well.
Should your projects include acronyms such as DABL (Data Access/Business Layer)? I personally do not think so. If you have to physically describe it is the (Data Access/Business Layer) then your tiers are not neatly organized enough and you need to separate them better, or better define your classes to help resemble which layer you are in.
Well that is my two cents for the evening.
July 20th, 2007 — Personal
Had an interesting week, as when you thought you knew what you would be doing the entire week, it is amazing what will come along and totally screw up your plans.
This week, I thought for sure I would be working diligently on the major rewrite project I am doing and have been doing for the past month or two. However, that wasn’t the case, at least not for a few of the days. This week, I had to handle requests I thought I would never be asked to do, plus a request that whose last contact I had was nearly three months ago.
The first request I got yesterday, was to restore a quote done by an agency in April. Now let me explain what makes this so difficult. First off we purge our quotes every 65 days, and April is definitely over 65 days. Second, I am not in Tech Systems, so I do not have knowledge on how long our backups are kept on site, when they are off site, and how far back we keep our SQL tables backup tapes. Finally, I didn’t really want to be the one to ask those questions to Tech Systems and cause them to scramble and cringe at my request, but I did.
The answers were great to learn. The tape was on site and we keep backups for an entire year, so I could go back to July of ‘06 and be just fine.
Lucky for the agent, the restoration completed late this afternoon. I had tech restore the database on our development server as overwriting production with April data seemed like a bad idea. Spending about 5 minutes, I was able to find the two quotes the agent asked about and will be restoring those to production on Monday morning.
Who would have imagined that I would have to do this, this week. Who would have guessed it would have been this easy? And of course, I got to learn our backup procedure which is free knowledge, and that is always something to celebrate!
Beyond that, I also had to deal with a three month old issue. An issue I subsequently closed three months ago, because the user never contacted me back. At first this was frustrating, as if the problem was still happening, why did it take them three months to contact me? Should I take three months in responding back? Is this something that I should be accustomed to from this user? Were they on vacation for three months? Seriously, three months?
The issue is quite annoying and they are the only ones to receive such a problem. The problem is an infinite loop of an alert box in JavaScript. Quite annoying indeed, so why would it take three months to re-report this bug to me so I can attempt to make further progress on correcting it? The only way this user knew how to get rid of the infinite loop, was to restart their PC. So we are talking about a fairly non-computer-geek user here. They know how to do their daily tasks, which involves using our website repeatedly throughout the day, so why three months?
The issue is related to the onkeydown event, which if you ask me is buggy as I’ll get out in every browser and should never be used by any application! I personally hate that event, but I didn’t write the initial JavaScript causing the error, and everyone who uses it, likes the functionality the JavaScript provides. In short, it validates the user input on three text boxes to ensure only numbers are entered for a phone number. On top of that, it also auto tabs to the next field once three digits are entered, then another three, then the final four.
So why are two computers in one agency having a problem with this JavaScript? I haven’t a clue. They are using an odd browser or browser version, they are using Internet Explorer 6 for goodness sake. Any hints on where to look for answers or ideas on how to recreate such an issue would be greatly appreciated.
Finally, I want to tip everyone off to an excellent email. This is truly a work of art, and I am can fully understand the frustration of a broken build.