Author: way0utwest

  • Too Much Data – Idiocracy or Star Trek?

    I used to think that too much data was never a bad thing. That having more information out there is good. However I’m starting to wonder if moderation might be in order here.

    I’ve been thinking of getting a spare laptop since Toshiba isn’t too concerned about getting mine fixed. So I’ve been looking at other ones, and I think that I settled on an Acer 1420P tablet. PDC attendees got them for free this fall, though they are supposed to go on sale soon here in the US. It’s a good deal from a developer that doesn’t need it, but I’m getting off track.

    As I was trying to decide if I wanted this one, I ended up searching out some other ones, including a nice ASUS from Amazon that had a good price and long battery life. I went looking for reviews, but outside of those posted on Amazon’s site, what I found was a bunch of blogs.

    And NONE of them had reviews. It appears that someone, or a bunch of someones, copied the specs from Amazon, either with the graphics or without, and then posted it as a blog, generating rankings that made them appear on the first and second page of results. I checked a dozen or so and none of them provided “information”, they just repeated what Amazon had shown.

    I’m sure this is a way to gain some Adwords traffic, and it might make you some money. I guess if you’re a programmer and you get $50 a month from Google on something like this, or even some Amazon Affiliate money, it’s worth doing. After all, how long can it take to copy and paste stuff up there?

    Especially when it’s free on so many blog sites.

    I’ve had a couple similar experiences lately when researching things, and slowly it appears that there are places where the Internet isn’t useful because there is too much of this “speculation”  taking place and hiding information. I’m not willing to search through 12 pages of results to find another nugget of information that ought to be on the first page.

    With so many affiliates and opportunists, it seems some days that we’re moving closer to Idiocracy than Star Trek.

  • Recharging

    I was hoping that 4 days in the mountains would be a nice time to recharge. Unfortunately, with my wife needing to work some of the time, Kyle coming back early for school, and me getting hurt, it seems that I didn’t get a lot of time up there. I barely feel like we got away, as opposed to some of our long weekends last year.

    It’s important to recharge, and get away from work. I’ve balanced things pretty well over the last few years, working from home, but I’ve also not taken a lot of vacation. And I’ve found that taking a day here and there hasn’t helped since I still get caught in the grind of working more the day before and after. A little of that happened this time.

    I think that I might take a note from some of the people I listen to on the radio, like Jim Rome, and shut things down for a week at a time this year. I’ll be picking out some low traffic times and then trying to take a whole week off here and there. We’ll see how that works out.

    One nice thing about the condo we hit in the mountains. It didn’t have free wi-fi available, so I was offline most of the time. It didn’t make sense for me to fire up my netbook and check mail or anything and pay a fee each day, so I left it off until the last night. That was a nice chance to get away from the site for a few days.

  • Identity Values – Two things to know

    I saw someone post a question recently about running out of identity values in an INT column. It happens, it’s happened to me, and I’m not surprised. They couldn’t go to a bigint because of their application, so they asked if they could “renumber” the identity column.

    Of course you can, and it’s simple with DBCC CHECKIDENT and the RESEED parameter. As I  and others explained that, the person seemed to think that this would renumber his data and he’d be fine.

    Uh,  no.

    There are two things you need to know about the identity.

    1. They only work on the next value being inserted.

    2. They have nothing to do with current values in the table.

    A lot of people think that auto number means that the server tracks what’s in the table and then bases the next number on that. Not so. Just as many people have done when they’ve stored the “next” value in another table and used that in their own autonumber scheme, that’s what SQL Server does. They have a better implementation than you get in T-SQL and they handle large sets of rows inserted at once better, but they still just track what the next value to be inserted is. Try this:

    CREATE TABLE MyTable
    ( id INT IDENTITY(1,1)
    )
    GO
    INSERT mytable DEFAULT VALUES
    GO
    SELECT * FROM mytable
    GO
    DBCC CHECKIDENT( mytable, RESEED, 1)
    GO
    INSERT mytable DEFAULT VALUES
    GO
    SELECT * FROM mytable
    GO
    DROP TABLE dbo.MyTable

    What are the results?

    You might expect 2 1s, but you get this:

    ident_a

    If I change the reseed parameter to 0, then I get this:

    ident_b

    So you can see that the “last” value is being stored for the identity column. However note that there’s no checking of what’s in the table? The reseed merely changes that “last” value and so when the database engine goes to insert a new row, it increments this value, regardless of what’s in the table.

    If I wanted to prevent duplicates, I’d need a unique index. Nothing to do with the identity property.

  • Blog Cleanup

    Awhile ago I set up a separate site for my editorials. They are copyrighted by me, and I lost some of them in a migration by Red Gate to new servers a few years ago. From 2005 and earlier, it appears that the editorials I wrote are gone, which really annoys me. It’s my fault for not saving them, and I am still hoping to track them down at some point.

    That experience had me worried about trusting another IT staff with my own writings, so I started keeping a copy at https://voiceofthedba.wordpress.com/. I’ve been posting copies of the editorials there, at the same time they publish on SQLServerCentral, so I have an online backup.

    However when I started, I began using the “categories” of WordPress as the “tags” that I use on SQLServerCentral. That’s not what I intended, and since this was a backup, it wasn’t until I realized that I had a few dozen menu links at the top of the page that I decided to fix it.

    Since it’s a hosted service, I had to go back and manually start cleaning categories and adding tags. At the time, I had 70 editorials up there, so this wasn’t a pleasant process. I kept it in the background, slowly working my way through old posts and fixing them. A lesson to be learned here, mess around with the features quickly, and fail early. Make your changes when you have 10 posts, not 70.

    My plan is to also move this SQL blog over there, using the export/import features, and take advantage of a single place for the “Steve Jones” publishing world. It’s a part of cleaning up my brand publishing, and I will add it to my Modern Resume presentation as an example of how I work on my brand, while not depending on my employer.