Monday, December 21, 2015

Oracle Goodness

I've spent years in SQL Land, and I consider myself fairly well informed about data. But after working with some of the people I have, I realize that there is so much that I don't know. I do know enough to do what I need to do without causing smoke and fire and other general mayhem, but just about everything I know now I've had to discover and learn myself. I've had a few good mentors that pointed out ways to tell if I'm writing slow, inefficient queries (and I've done plenty of that), and my views have shifted towards DB performance in my queries. I've also come to realize why software developers and DBAs often seem to be at odds with each other. Some of the worst queries I ever wrote were when I was writing in-code queries and didn't understand their impact. One of my previous databases had several related tables with 10s of millions of rows each. That's not BIG data in the modern sense, but that's A LOT of data. More than enough to let me easily see the difference between my code-based reporting query that ran in 2 hours and the DBA-optimized SQL that ran in 2 seconds. The SQL looked weird, but it was MUCH faster. Big lesson learned there. A database isn't just a place to store and retrieve data. You can get lots more from it by knowing how to ask nicely rather than trying to brute force the data you want. It's about getting SETS of data rather than simply trying to filter data. And it's about letting the database do the job it was made to do.

I like T-SQL, and I learned quite a bit about it in my reporting. And now that I'm back in Developer Land and making the move to an Oracle system, I'm seeing a few things I don't like about PL-SQL, but that's likely because I'm just not used to it. Only time will tell.

However, there are a few things I do like quite a bit. For instance, when making a new stored procedure (my current task), I used to have to do something like this:

IF OBJECT_ID('xxxxx') IS NULL EXEC('CREATE PROCEDURE xxxxx ...') GO 
ALTER PROCEDURE xxxxx ...

Or do several lines of logic with checking sproc existence in a system view. It wasn't hard, but it was long and involved.

MySQL was a bit better, but that wasn't my primary environment:

DROP PROCEDURE IF EXISTS xxxxx ;
CREATE PROCEDURE xxxxx ...

Though dropping and recreating db objects is never nice to existing permissions. :-/

With Oracle, I get to do:

CREATE OR REPLACE xxxxx ...

It's nice to have that kind of functionality already built in without having to worry about killing permissions. SO much easier.

Now, on to build some sprocs....

Friday, December 18, 2015

Procrastination

I'm a professional procrastinator. Plus, I like shiny things. That's not always good for actually doing the things I tell myself I want to get done. Like writing here.

When I was at CF Summit in November I had lunch with Gavin Pickin, and we talked about the need to encourage people to be more involved within the community. Before the conference was even over, Gavin wrote a blog post about his ideas. I was inspired. I had grand plans. I wrote several pages on my plane ride home with the full intent of cranking up this blog and making my first post. But my old excuses crept back in, and I continued to procrastinate. It's been a month.

I did submit a presentation topic to dev.Objective() about the excuses devs make to themselves for why they haven't participated more in the community. Apparently that's a topic I excel in. I'm not only a procrastinator but a hypocrite, too.

So I guess it's about time to actually do something about that. I wanted to do a lot of things in 2015, but I never actually did them. The only goal I set for myself that I actually achieved was attending CF Summit, and that was a promise I made to a friend who passed away earlier this year. I'm glad I went.

So for 2016, I want to give something back to my dev community, even if it's the trite knowledge I've packed into my skull over the years. To accomplish that, I want to:

  1. Write here. At least once a week. Preferably more.
  2. Make this space prettier.
  3. Make some serious progress on The Davis Initiative (more to come).
  4. Organize my reading. I like to read. I do it all the time. But the things I like to read are a bit scattered, especially blogs, and I often end up playing catch-up on those.
  5. Contribute to some of the open source initiatives in CF, like CFDocs.
  6. Find the CFUG here, and if it no longer exists, get it running again. 
  7. Attend at least two or three developer conferences. My short list is:
  8. Present at least once to a UG, a conference, or my mirror. I have several ideas that have been rattling around in my noggin for way too long. I've already submitted two General topics to a conference. I can do this.
  9. Learn:
    •  more about the CF functionality that I don't use regularly.
    • more about jQuery, that I do now use regularly.
    • more about the RaspberryPi that I finally picked up this year. This thing is like Legos for geeks! Next Christmas, I better have my Pi-powered Christmas Lights running. 
    • more about TestBox and all the other Boxes. 
  10. Actually read some of the coding books on my bookshelf. As a self-taught coder, this can only be beneficial for me. 
  11. Pi-powered Christmas Lights - see above.

So now that I have publicly expressed my goals, I hope it will give me the kick in the backside to actually DO some of these this year.

After I see the new Star Wars, of course. :-)