Rusty Divine

Live, Love, Learn, Teach

Sick or not?

How sick do you have to be before you stay home from work?

I've been on the verge of a coming down with a cold all weekend. As I write this it is Sunday night, I've got a bit of a sore throat, a headache, and the sweats, but I would bet I go in to work tomorrow.

Compared to my own very superficial observations of my coworkers treatment of my dilemma, I would have to say that I am more likely to take a sick day than average. Still, am I sick enough to stay home? Back in my youth, my dear mother would always take my temperature - if it wasn't over 99, and I wasn't vomiting, then I'd have to go to school. Should I use that axiom still?.

On one hand, it makes a sort of sense; its logical and empirical. On the other hand, it doesn't take into account other circumstances, like my coworkers, for one, and my job performance for seconds.

Are you one of those people who stay at work annoying your neighbors with a wet cough or runny nose that you need to blow every few minutes? It's like Chinese water torture waiting for that next sniffle. "For Pete's Sake, Larry, just go home! You're driving us all nuts!"

I admit I've been one of the insufferable sick who plague the office, walking around and touching things with my germy little fingers. All the time believing that I'm not contagious...it's like Russian Roulette (OK, enough with the slandering of other countries already). Is he loaded? Do you feel lucky today? Well, do ya, punk?

So, when I start feeling ill, I fall into an endless loop of evaluating the pros and cons, but at a near subconscious level. With most of my mind concentrating on the new Simpson's episode, I don't have much processing power to spare calculating whether to go to work tomorrow. At the point that it comes back to the forefront of my thoughts, I realize that if my flu-addled mind is in a state that I can't even decide whether or not its a good idea to go to work tomorrow, then I better stay home because heaven knows what kind of terrible decisions I would make if I did go in.

And I'm generally of the opinion that if I stay home for a day during the onset when I believe (and correct me if I'm wrong here) that I am most contagious, I will actually save the company money by not infecting everyone else.

All that being said, I have two deadlines on Thursday. If my coworkers are reading this, stay away from my cube today...or else.

Do I have to go home? Great office space makes for a great place to work.

How would you like to work here?

 

 

No, not for the hotel; at the hotel.

I was reading Peopleware on my lunch break the other day (a book famous for its intellect worker management ideas) and finished the section on office space. After the authors very effectively argued against the ubiquitous open space floor plan of modern office that intellect workers are too often subject to, they offered a hotel layout as one good alternative.

Imagine! Teams of two-to-three workers per room, each with a door that closes and windows that let in natural light; oh, how majestic that would be! No more 6' tall, 6' square, partitioned, ultra uniform, private yet isolating yet noisy cubicles flooded with fluorescent light from above.

*Warbling dreamy music plays in the background as video image blurs gently*

There's wireless internet and everyone has laptops! People can work on their patio/balcony (even smoke while working outside - oh, the depravity!), or take their laptop out to the park bench under the ole' weeping willow.

There is a formal entry and reception area, and professional conference rooms fit for clients to visit. Heck, you can even have a company meeting outside on the veranda!

Bike to work? Well, feel free to shower off in your office and grab a change of clothes out of the dresser. Work out at lunch? No problem! There is an exercise facility on site and a pool, or feel free to take a jog through the park around the corner. And nothing beats the Jacuzzi after making a tough deadline.

Have a toddler? Well, we'll set up one of the suites as a day care if there's enough interest. How about dogs? Ask your office mates; if it's OK with them, then go for it - having a few dogs around reduces stress and lowers blood pressure.

Hungry? Dial 9 for room service; the menu is next to the phone. You can also bring your laundry and have it waiting for you when you go home. Or bring your lunch and store it in the mini fridge in your office and use your microwave to heat it up. Be sure to take advantage of the picnic benches out back!

Speaking of the phones, notice that you can put yours on Do Not Disturb if you need to concentrate. Don't forget to put the Do Not Disturb sign on your door, too!

Need to catch some Z's? We've kept beds in a couple of rooms and you can reserve one using your scheduler, or by dialing the front desk. Just need a break? Try out the pinball and arcade games in the lobby. There's a pool and fousball table there, too.

Feel free to work with your suite mates to personalize your room; there are some supplies in storage if you need extra lamps. If your HVAC unit acts up, just ring the front desk; they'll take care of it.

Need to ask Shelly over in the Monroe suite a question? Try the IM system first; it is a quiet and quick way to converse. You can use it to view each other's desktops too, and use the other collaboration tools. When you really need to get into the same room to work with someone, just reserve on of the spare suites or a conference room if you need more room.

*Warbling dreamy music plays in the background as video image blurs gently*

Whoa...what a great day dream! If I worked at a place like that, I'd be so much more productive than in my isolated cubicle in a noisy open office environment. Well, my lunch is over, time to head back to the cube.

Further reading:
Developers Office Layout

Dynamically Generated SQL Stored Procedures

One of my favorite MSDN articles has been the key to saving countless tedious hours manually creating the select, insert, update, and delete stored procedures in SQL Server 2000 for web applications: Peter W. DeBetta and J. Byer Hill, MSDN April 2003, Automate the Generation of Stored Procedures for Your Database.

Some developers prefer not to use stored procedures for various reasons, but I agree with Douglas Reilly who essentially concludes that if you don't need to worry about switching from SQL Server to another RDBMS, and if some of your procs have complicated processing in them, then generally it is advantageous to use SQL stored procedures over ad hoc SQL.

The SQL script from the MSDN article creates a few functions that query the sys tables for schema information, and stored procedures, one each for generating select/insert/update/delete procs that take a table name as a parameter. For example, executing the proc that selects a record in a table generates and executes the following script (example based on the Northwind Customer table):


EXEC @RC = [Northwind].[dbo].[procMakeSelectRecord] 'Customers'

Yields:


IF EXISTS(SELECT * FROM sysobjects WHERE name = 'procSelectCustomers')
DROP PROC procSelectCustomers

------------------------------------------
-- Select a single record from Customers
------------------------------------------
CREATE PROC procSelectCustomers
@pstrCustomerID nchar(10)
AS

SELECT CustomerID,
CompanyName,
ContactName,
ContactTitle,
Address,
City,
Region,
PostalCode,
Country,
Phone,
Fax
FROM dbo.Customers
WHERE CustomerID = @pstrCustomerID

Notice how the script added the where clause based on the primary key in the Customers table without having to specify that in the execution statement. The script also added a comment, and formatted the new proc in a standard way, including the proc name, "procSelectCustomers". Now, if I wanted to go in and add an Order By clause, it would be easy to alter and customize it. (Note: The formatting applied to this post removed all indentation for the code; it is possible to generate procs that use indentation)

The benefits of using the tool include:

  1. Easy standardization on naming conventions and formatting, which promotes readability - just customize the script to suit your needs. Imagine all of the procs in the database with standard indentation, line breaks, and the required meta data all automatically generated!
  2. Saves time and avoids errors from typing out simple procs, and it is a good first step on complicated procs that need some more processing.
  3. Promotes organization by naming all the procs in the same format, which will make it easy later to find the procs that act on a certain table, and will make it easier for new developers to the project to get up to speed.

If your project is destined for SQL Server, and you agree that stored procedures are the way to go, then try customizing the MSDN script to fit your standards. You can reap the benefits of increased efficiency in authoring, time saved reacquainting with the code at a future date, and getting new team members up to speed quickly.

One final tip: if the installation script is executed on the Model database, then every new database will likewise have the ability to generate procs based on its database tables. Since you will likely want to customize the naming conventions and formatting used, however; I would recommend running the script on a test database first.