Thursday, January 28, 2010

SQL in my every day life? really?

In my goals post, I mentioned my love for data. This doesn't mean that I am amazing or extraordinary at gathering and reporting on said data. Just that I like it. I wanted to tell the tale of an instance of data use in my personal life.

Before we get to the SQL, I need to deviate to Churchy stuff for a moment.

In my church, the members of the congregation are allowed to participate in the inner functions of the local church. We get the opportunity of accepting a 'calling', and performing some tasks. This opportunity lets you interact with other members of the congregation, volunteer your time and talents, and assist in the church. Depending on the 'calling' you may have, you may spend a little time or more time. In the past, I have worked with the Cub Scouts, have taught Sunday School lessons, have been on the party planning committee, and so on. My current calling is different from all these, and has me more closely working with the week to week duties of keeping the church working. We meet each Sunday for worship services. At one of the meetings, there is an opening prayer and a closing prayer. I am in charge of seeking out the members of the congregation and getting them to pray in these two prayers each Sunday. Not a huge task. But over time, you find some interesting things. People remember the last time they prayed, and if they have any qualms about doing it again (nervous, shy, etc) they will typically recall the last time they prayed as having been more recent than reality, regardless of when this prayer actually occurred. Other people will never volunteer to say a prayer, and I need to remember to not ask them. Other people will always say yes, and would end up praying each and every week asked. I need to refrain from asking them too often.

So, now you understand a little about what I am doing. To keep track of who has prayed, and try to not repeat too frequently, as well as avoid asking some that can't/won't, I started keeping a simple list. We'll call this DB 1.0. It was on my palm pilot, and each week I would write down the name of the person that performed each prayer, next to the date. I kept doing this for sometime, and as time marched on, I created quite a list. I could refer to this list fairly easily in the first few months, and see who had prayed recently or not. I was even able to tell some folks that recalled praying recently, that in fact it was a bit longer than they had remembered, and could show them the actual date on my list. My little list grew in fame with some folks.
This all started in July of 2007. Fast forward to today. I have a record of every prayer (both opening and closing) since that time. All in a note on my phone now (having retired the palmpilot from daily use).

A couple weeks ago, I finally imported this data into a database. I have a table of prayers. I also have a table of members. After some scrubbing, I was able to link the names in my note to the IDs in the members table. I added another table to indicate if they could pray or not. Also added a field to the members table indicating if they are enabled or not. Since people have moved in and out of the congregation, I need to keep them as a member, but make them disabled if no longer present. From here, I was able to create some simple views, and procs. I got tired of looking up the ID to assign a prayer, so made a proc to AddPrayer. This will look for the name in the members table, and use the ID it finds. If it cannot find it, it'll add it to the members table. Now, I can quickly add new prayers each week. (keep in mind that I still keep the list on my phone, and add to it.)

Some fascinating data was able to be pulled form this database. I could generate a list of the people that had prayed most recently. By getting the max date, and sorting by that, along with the count of prayers they had performed, I could have a list of those I had picked on most recently. I could reverse this list, and show those folks that have not prayed recently, or at all. This allows me to more easily spread out the load to those folks I do not normally contact. Since so much of the church and membership is a social animal, I find myself in a certain few circles, spinning around, and not including the entire membership. This way, the DB can suggest some names of folks I would not normally think of.

Stepping away from SQL for a momment... So, those of you that are religious may be asking yourself if applying stored procedures and data mining to choosing a prayer is the proper way. To get religious on you, I do rely on being guided by the Holy Ghost as to whom I select, hoping that my selection will fit into some great plan that I am not privy too. This has happened on more than one occasion, and the individual I selected was 'supposed' to pray that day, for some reason, and I was merely the instrument in that action here on Earth. This has been an incredible experience, when it happens. But it doesn't happen each week. But at the same time, how can I say that by my making a database to keep track of all this, and using the tools it provides is not also some aid in the 'Grand Plan'? Besides, its fun to have found a chunk of workable data, with an end goal in mind, and be able to assist my weekly task with this data. Its been great fun in thinking of different ways to view the data, and make a story out of it. It turns out that my wife is not the most asked person to pray. I tend to lean on her if someone else was unable to pray, doesn't show up, and so on. I would have thought she would have had the most prayers. But no, she doesn't. Who does? Well, I know, and can prove it with data.

Back to SQL. This has been an interesting journey to gather this data, 2 records at a time each week. The story it tells will not fascinate most people, but those in my church are interested. Not all, mind you, but some think its a great thing to have captured all this, and be able to report on it.

I challenge you to think of a place in your life where gathering data and storing it would tell an interesting tale to you and yours. Maybe not right away, but as some point in the future, you can look back, apply some of your SQL knowledge to your personal life, and enjoy the results.

Monday, January 18, 2010

What three events brought you here?

Another one of the DBA bloggers games of tag is occurring. I’ve been tagged by Grant Fritchey, who was tagged by Tom LaRock who was tagged by Paul Randal to answer the question; What three events brought you here.

And to copy Grant kinda, I could actually show you the building and floor where it all happened. My parents were driving me around the town that would be my college town, showing me the sights, and this is one that I wished they would have kept to themselves. I know live within 20 minutes of the room in which i was, uh, created. I know its creepy, and now you get to share with that knowledge with me as well.

Sometime in High School, I took a computer class, and was hooked. I never did the typical geek thing, buying machines and writing code. I just liked computers, and only was exposed to them during High School. From that moment on, i knew I wanted to work with them in some fashion. I never waffled from that decision. I went to BYU for a year, took 2 years to go on a mission (where I actually saw a computer in the last month in Argentina and thought that was so cool that they were down there too, finally). Once back at BYU, I continued my education, and actually purchased a computer. $3800 later, and many promises to pay my parents back, I had my first computer, purple text monitor and all. We all had a blast with it, and it came in real handy as we studied various computer classes. I look back at the price paid and shudder at the cost of computing.

While I was in BYU, one of the classes I took was a database class, and I do recall it seemed to click with me moreso than other classes, but for what reason I didn't know.

Later, in my first job, I recall there was 1 guy that had been given access to TableDLL.dll. Yup, that was its name. Love the 8 char names. This was the API that let 1 special magical person into the database. My thought was , why him? Why cant I get into this magical world that seems offlimits? Why not me? I never did gain access to that magical realm, but remained forever intrigued.

At my next job, I got to be exposed to Paradox, Flashfiler, SQL Anywhere, Sybase, and SQL Server 6.5 and 7.0. I was a programmer, a developer, a report writer, and a database guy. Generalist on all, exposed to most, and enjoyed working with the elusive database, finally. I got to create procs. I got to mess with users and logins. I got to do things that were amazing to me at the time, and still have some of the original code I wrote from this era, and it still works.

From then on, even though I hired as a programmer/developer, I was eventually known as the Data Guy. Never truly had the DBA title, but when push came to shove, I was the go-to guy to do database stuff. I was not truly a DBA, until I jumped ship to a DBA job, having already earned the respect of my peers and hiring manager as a Data Guy from experience. Once in the true titled job of DBA, I just kept going as if I had been here all my life.

At some point, I started attending User Groups, found my way to #SQLPASS, started volunteering, presenting, blogging, writing, and viola! here we all are.

So to summarize, High School - liked computers. College - liked computers and databases. 1st job - intrigued by database. 2nd job - started morphing into the Data Guy. Couple jobs later - became full fledged Data Guy.
I see Data. All over. In my personal life, in my church responsibilities, in my home. I created a database of food and recipes to organize our shopping habits and cut down food cost. I organized the people I ask to say prayers each Sunday at Church since July 2007. I can query who hasn't prayed in the last 3 months, or the last 3+ years. I have data for emergency preparedness information on my home computer, keeping track of who has a truck, a generator, medical experience, and so on.

Data is all around us. It can be captured, and helped to tell a tale, make a decision, assist in purchases, and so on. And thats just in your personal life. Not at work. Data all around. Why not capture it, store it, and use it? It helps that I get to make a living doing this, and I am not telling this tale like I am some demigod with data. Its just there, and I like it, and I enjoy playing with it. It started as small lists on paper when I was young, and now, its a little bit more than that.

Tagging:

Pat Wright (blog|twitter)

Joe Webb (blog|twitter)

Chris Shaw (blog|twitter)

Lori Edwards (blog|twitter)


Monday, January 11, 2010

Whose Blog Is It Anyway?

You must read this post from Tim Ford to understand the next series of random words you will read. I will attempt to accept this challenge in each of my blogs, my work blog, my personal blog, as well as my hobby blog. It will be an interesting challenge, and I hope you enjoy reading it.


It is a Monday, not unlike any other Monday I have suffered thus far. However, the issues that will arise today will make this Monday top the charts for oddities.

The day started out like most days with a team meeting. Since there were no issues from the weekend, we simply discussed what was coming this week. As these discussions were occurring, we all noticed that we had received an emergency ticket from Customer Service. One of our applications were returning an error none of the CS representatives had seen before. The details I will not explain here, but the oddity in the message baffled us all. The error message stated something to the effect that a value could not be retrieved from a table, but the table name it referred to was 'Live Nude Cats'. Obviously this needed to be researched a bit more, as something very odd is occurring in our code. I recall a similar event a year ago; an offending error message occurred not with a cat, but with the reference to a pony. This representative became very upset as the result of scanning a particularly troublesome error message, but as soon as he looks down he’s going to be very sad about the pony pictured at the bottom of the error message. Why would one of the developers put in a picture like that, on an error message. What the heck was occurring in the development group? We have all stuck bogus code, names, even pictures into our applications on a lark. But these things should have been pulled out way before the end product made it to the client. For shame.

I march down to the bullpen, where the developers hang out, and find them split down the middle, yelling at each other. This is also not atypical of this group. Today's topic was Star Wars, and I have no idea what the subject was, but as soon as I heard one of them scream out 'Just ask George “Let’s Have Padme Die Of A Broken Heart Instead Of Anakin Crushing Her To Death” Lucas', I lost it. I screamed at the top of my lungs to get all their attention. Nothing seemed to phase them. They continued on their tirade of injustices perceived by fictional characters in a story that seems to have struck a chord with so many to cause them to vehemently argue one side or another. I like the movies, I enjoyed being entertained, I enjoyed showing them to my children, but that is not the point here. Having encountered this fanaticism before from this group, I realized that the only way I could gain any attention whatsoever was by simply using some magical tool, library, or bong. I was fresh out of library, but happened to have a bong that was also some magical tool.

I used the magical device to cause a trance to overcome the developers, lulling them into a sense of purpose beyond the realm of Star Wars, and back to a more humble reality. Back the the faulty error message that someone had slipped into our application. After explaining what had occurred, getting some help from the developers as to where we could possibly look to solve the issue (although none of them fessed up to inserting the bogus code and picture into the product), I realized that this was now my task. I would be spending the rest of the day on this issue, creating tickets, discovering what needed to be fixed and so on. Oh well, its just a Monday. I’ve started, so I’ll finish!

Tuesday, January 05, 2010

My Goals and Theme Word for 2010

I was tagged by Lori Edwards (Blog Twitter). I am now to produce a set of goals and a theme word.

Before moving forward, I feel I need to take this time to look back at last year’s goal list here. I can tell that a new goal needs to look back at the goal list more often. I do not recall the last time that I referenced this post. It may be the way that I deal with goals. I commit them to paper and memory, then just attempt to direct my life in that direction. Sometimes, they fall into place without my help, as I am already oriented that way. Others fall on the wayside, as they were not in the right direction or maybe not the right definition of task. Still others, I simply forgot to do, meaning I had not fully committed them to paper or memory. If I can orient my direction in the same direction as my goals, and define my goals in such a way that they are accomplishable in that direction, then viola, they tend to accomplish themselves without reference to their original documentation. However, I believe that it’s necessary to revisit them from time to time, to ensure the definition is up to snuff, the direction is proper, and both are meshing well. I will add this to my list this year.


Last Years Goals

Lets start off with a summary of what I documented last year as my goals or resolutions.

1. I want to do more with my local user group.
2. Produce presentations. 4-6 presentations for the year
3. Speak at SSWUG.
4. Perform Regional Mentor Duties.
5. Blog
6. Articles
7. MVP
8. Read
9. Topics
10. #InboxZero

Now, let’s dissect them a bit, explaining where I feel I fell in their accomplishment, or not.

1. I want to do more with my local user group.

I struggled with this this past year, as I was unable to produce interesting content myself, and unable to tap into many others for presentations themselves. We had a couple meetings that were a success. Others were not. Changes are afoot for this goal that will truly help out the local user group.

2. Produce presentations. 4-6 presentations for the year

I actually produced 8 presentations for SSWUG this last year. 2 of which were preexisting presentations. So, inadvertently, I accomplished this goal without actually thinking about it. I was headed in the right direction, and this simply took care of itself as I went there.

3. Speak at SSWUG.

I had the honor and privilege of speaking at both SSWUG conferences this last year. It was a blast, and I learned a lot myself. I hope to continue to be able to do so in the future.

4. Perform Regional Mentor Duties.

I actually stepped up a bit more on these duties this year, and really tried to spend more of my free time performing tasks to assist in this task. It felt good to give, felt good to produce. I will continue to feed from this trough.

5. Blog

I wrote a bit on my career blog, wrote more on my hobby blog, and started apersonal blog for things that didn't fit into either of the other two categories. For my career blog, I had 1 month with a single blog post. 1 month with 2 blog posts, and the rest with 3 or more, and some months as many as 7 posts. Not tons, but I felt good about them. For Christmas, I wrote an incredible amount on the personal blog, ending with this summary. I have had great comments on my ability to write, enough that keeps me going. At first, I thought that blogging meant writing about SQL topics. But I have learned this year that writing is just that, writing. I need to practice more, and get better. I feel that something is looming just out of reach of my awareness that will require this skill in my future. I will continue to strive to perfect this talent and hopefully be ready for the challenge, when and if it comes. In the mean time, I head down the dusty road that many have traversed previously, and simply write.

6. Articles

I did not write as many articles as I had hoped for. With preparations for SSWUG presentations taking up quite a bit of time, and rest time afterwards for other hobbies, I didn't write a ton. I have dedicated myself to writing, and found that I needed to write about many other things, other than SQL. I wrote a couple short stories, produced quite a bit of blogs, and have a couple articles sitting in unfinished states. So writing has occurred, I have just not delivered in the fashion I had anticipated, it’s evolved a bit.

7. MVP

I was nominated again this last year. Again, it was an honor to be nominated. Other than continuing on my course of actions, I cannot actually do anything towards this goal. I maintain my course thru life, and with the other goals I do accomplish, maybe this one will be picked up along the way. Maybe not.

8. Read

I have done this task, not as planned, but differently. I had added a lot of blogs from others, and tried to keep up. I would get distracted and frustrated at my ability to keep up. Sometime ago, I cleared out all my unread blogs, starting at #InboxZero. This was very hard to do, and took me a couple weeks to actually pull the trigger. Once done, a bit of time has passed, and I now am looking down the barrel at over 300 unread blogs already. This teaches me that I may never be able to keep up, so this task needs to be modified in its perceived accomplishment.

9. Topics

I am much more proficient with GoldenGate replication than last year. This is a technology that is specific to my company, and I have practiced with it quite a bit and become much more skilled at it. It was not what I meant when I wrote this particular goal, but along the road of life last year, this one was picked up and accomplished.

10. #InboxZero

All year long, as I imagine the future will most likely continue, I struggled with this task. This was not an accomplishable task in one or even many sittings. This is an ongoing task. Once burned into my brain, its become a hobby I attempt to accomplish on a small scale for a small period of time. The thing I have noticed is that others are doing the same thing and blog or tweet about it. If I was an influence on them, great. They are an influence on me, as we all attempt to perform this repetitive task, and incorporate it into our daily toolboxes of skills.


My goals for the coming year? Similar to last years, with some modifications.

1. Do more with Local User Group.

I have been a leader of this group for quite some time, and have been approached by another member to let him take it over. It may be a good time to step aside, let others perform tasks, and simply help out, instead of run the show. This is the direction I am leaning towards now. Give it some new blood.

2. Produce presentations.

Last year, I came up with a random number. This time, I want to leave it open, and simply keep it in the back of my head to produce as many pieces of presentation content as I can. I hope that its many.

3. Speak.

I am dropping off the goal to speak at SSWUG, and simply making it Speak. I want to simply find good venues where I can share my skills and knowledge with others, and become better at presenting. SSWUG is definitely in there, as well as local user groups. I may have the chance to speak outside of those two locations, and hope that I can.

4. Perform Regional Mentor Duties.

During the SQLPASS summit, I was inspired by our fearless community liaison Blythe Morrow (twitter) to do more. In fact, it was kind of a threat that I took seriously that she was going to pile on more work for this volunteer effort. I welcomed it, and began working. I intend to do more here as time permits.

5. Blog (write)

I am modifying this one to include writing. That’s the goal of my blogging, to practice writing, and hone that skill. Someday, maybe I could write a book? In the meantime, I will write as much as I can about as much as I can. I have been inspired by a lot of SQL folks, as well as others. I have always been an avid reader, more so in my youth. I grew up reading Piers Anthony, Stephen King, Dean Koontz, C. S. Lewis, Robert Ludlum, John Saul, David Eddings, Margaret Weiss, Tracy Hickman, Orson Scott Card, to mention a few. I love to read lyrical prose, in all its forms. Paint me a picture with your words, and I can almost enter your extended reality and see it as you see it. I want to get better at this skill. The SQL folks that have inspired me are Steve Jones (blog|blog|blog|twitter), Grant Fritchey (blog|twitter), Paul Randal (blog|twitter), Brad McGehee (blog|twitter), to name a few.

6. Articles

This goal will be dropped, and added into the above goal of simply writing. Writing an article should be as important a task as writing a blog post, documenting a process for my employer, penning a witty tweet. It’s all words, and my goal is to have the same result with them all. Paint a picture of a reality that I see, so that you can exist in that realm for a period of time of your choosing.

7. MVP

I'm dropping this task from the actual list this year. My direction is such that if this occurs, great. If not, I am not to be detoured from continuing on this path.

8. Read

This one will receive a modification. I will continue to read, as life permits, but not feel like I have to read it all. I will continue to seek out those posts that have relevance to my skills and interests. I will seek out those posts from folks that simply inspire me to be better. I will try out other posts that are suggested and can be added to my toolbox. But I will not feel the crushing guilt of not reading everything that everyone writes as soon as its revealed. I simply cannot read that much.

9. Topics

As the year progresses, I hope to add to this with actual topics. Let’s say 2-3 new items need to be picked up, learned, and somehow incorporated into my life. More on this as time marches along this year.

10. #InboxZero

As this is an ongoing task, and has become part of my habits, I will not continue to have this as a separate task. I believe then that it has been accomplished in a sense, as it has become part of me, and no longer needs to be listed out separately.

The last statement I made is indicative of how I perceive goals or resolutions. They should be added to your list such that they become part of your life, and no longer need to exist in a list that you can check off. They become part of who you are. This frees up your task list to accept new and exciting items yet in your life to be accomplished, while continuing to accomplish the newly incorporated habits from last year’s list.


Themeword

So, thats all fine and dandy with the goals and explanations and wild wordage to explain my quirks, but what about a themeword? That one is a bit harder. As I write this, I have had quite a few words floating around my grey matter (which is a great short story by Stephen King, you should read it someday). Let me list them out here.

  • NoDrama
  • Relax
  • Prioritize
  • ReadMore
  • Play
  • WorkEfficiently
Somehow, I don't think that I can apply a single themeword to my next year. Along with the goals i have listed, along with the general direction I want to head, there are many themewords that I will be working on during the year. I take life as the opportunity to better ourselves, learn as much as we can, serve our fellow man, and ultimately perfect myself as much as I can. Others will help along the way, but I gotta do the brunt of the work, as I have been doing since this realization hit me at some time in my younger years. Unfortunately there will never be a time that I can retire from these tasks. So, its business as usual, working on perfecting myself, and enjoying life along the way with all its quirks.


Tagging

I wish to tag the following folks.
Pat Wright (blog|twitter)
Joe Webb (blog|twitter)