Author: way0utwest

  • Tabs or Spaces

    Obfuscated Code
    Hopefully your code doesn’t get formatted like this.

    An argument among developers that might rival the NULLs/No NULLs debate, or even the comma appending/prepending items in T-SQL might be tabs versus spaces. I was engaged in a debate recently with a developer on this very topic, with this person insisting that tabs were the proper way to handle indentation in code, and my insisting just as hard that spaces were the way to go.

    Actually, I should clarify, I think that tabs should be inserted into code as spaces, so that a consistent layout can be maintained. Most tools allow for this, and while I have never worked in a place where the tab/space ratio was entirely consistent among all those writing code, I have found that using ASCII 32 is preferable to ASCII 9 when files are shared among different people.

    Am I right? I don’t know that I’m right, but I have found that spaces result in less issues, and easier to read code over time as more and more developers work on a project. Invariably spaces creep into code, and when they mix with tabs, the visual layout of the code can vary wildly, depending on the configuration of the developer. I understand that indents and alignment differ, and using a mix of tabs for indentation and spaces for alignment can work. I just feel that this is an additional level of conformity that will never work well for most team projects.

    There are all sorts of arguments for tabs, for spaces, even for saving the planet. The one thing I know is true: the only programming project with no disagreement whatsoever on code formatting is the one you work on alone (from Coding Horror). I also love the concluding sentence in that post (since I agree with it).

    With that in mind, I do think having a standard makes sense, and while the standard might annoy a portion of your developers, overall they will get used to it and be more productive than having no formatting standard at all.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • Looking to Windows 9

    I haven’t played with Windows 8 yet, and only a little with Windows Phone 7, but I am a little concerned. This set of videos that show an older man, a CPA, a lifelong Windows user messing with Windows 8 and OSX are a bit telling to me.

    The whole start menu/tile thing is a problem to me. It’s no that big a deal in that once you learn it, you understand how it works, but it does seem to be an issue of design. The more I look at the tile/menu design, the more I’m bothered. It’s not a question of ergonomic design. The whole iOS design is something that just works. It was new, different, and it changed the way so many people view computers. For the first time, the majority of stuff you wanted to do just made sense. Not necessarily for us techies/power users, but for most of the world.

    I read through a dozen or so of the design considerations from Microsoft, and I appreciate it’s an impossible task. Or at least a Herculean task. However what it seems like it happening is that they’re still bound by viewing the world the old way. As much as they worry about moving the tile/start menu around to be more intuitive, they’re still stuck with stuff in the corners. If they want to be revolutionary, then think about the fact that our mice are often in the screen, somewhere near the application (a cell in Excel, a portion of a Word doc, or a scrollbar). Make the menu work from that point in time, or without the idea that I’m starting from the lower left.

    I watched this video from cNet with a hands on, and it definitely feels a little cherry-picking on features and ergonomics was shown, but I am looking forward to messing with it at some point. There are things I like about the direction they’re going, though I’m not sure they are going to work in the 1.0 implementation. However I thought I’d look forward to Windows 9 and talk about what I’d like to see.

    For the record. I use a Windows 7 desktop, with 3 monitors, but I travel with a Macbook Air that I love. It’s much better than the last 4 laptops I’ve had, smaller, and OSX Lion is a dream for me. I have an iPhone, which I use constantly. I also have an iPad that I use regularly, but not as much as my kids. I’ve been a Windows user primarily for two decades at work, and I don’t want to see Windows disappear. However I do think there are things Microsoft could do better.

    One Device

    More and more convergence seems to be on the mind of people. When PDAs first came out, I thought we might get there, but a decade of crappy devices that worked in a half-assed way, from the Palm to PocketPCs to Windows 6 smarthphones had me rethinking that. However with my Android G-1 and then my iPhone, I think to a large extent, I can converge. Not to one device, but two.

    I saw this device recently, the ASUS PadPhone, and thought it was pretty cool. It’s a phone, that slides into a tablet, which can attach a keyboard. The idea of getting my phone screen larger at times, would be very handy. Adding a keyboard is a natural step, since the virtual keyboards work OK, but aren’t always great.

    ht_asus_padfone_jp_120227_wblog

    The iPad changed the world and made us think of tablets. I think my iPad is very handy, but it’s not convenient. It doesn’t allow me to do technical work for presentations, which is an issue. It just lacks horsepower. I know for more people that’s potentially not an issue (my Mom loves hers), but it is for some of us. The iPad isn’t what I want.

    For most of us, however, the idea of a phone/tablet makes some sense. We want to use the form factors differently, and much of what I’ve seen in Windows 8 makes sense there, but I’m not sure about the desktop.

    Hot Hardware

    To me, the biggest thing that Windows 9 should have is hot hardware. Not cool, not flashy, but the core hardware ought to change without the OS freaking out.

    Ideally what I’d like is a core OS running on my phone, that I can then plug into another device (docking station, tablet, whatever) and have that docking station add CPUs, Memory, displays, etc. without the OS missing a beat. It might take a minute to sync up, but if I have a dual socket quad core CPUs on my desk, I’d like my OS session to take advantage of them. I want things to speed up. If I have 128GB of RAM on my desk, pick that up and start using it for Powerpivot, editing movies, or anything else.

    Undocking is definitely the harder part. When I lose RAM, what happens? Well, I’d expect that applications using that memory would have to suspect themselves, perhaps even in the other hardware. Or maybe they’d suspend, rebuild their state, and have to reload things from disk (on the phone). Threads on CPUs would be tricky, but there are a few scenarios on how to recover applications, including letting them die, but it could work.

    Potentially we’d start most CPU work as transactional as we do in databases, and only commit the state at known points, so that a drop in hardware would result in a “rollback”. I suppose we could also do something like spawn off threads that are either always on the phone/small device or always on the remote hardware, but there are some smart people in the world that I suspect could come up with a solution.

    I’d expect things might freeze state when I dock/undock, but I’d want them to keep working at some point, even if they went into some background/sleeping state.

    Virtualization

    I’d like to see more virtualization, but at a core application level. Let me essentially sandbox an application into a VM, which thinks it’s on it’s own OS installation, but limit it to very basic interactions, like the clipboard. Can you imagine if Windows did this, and opened up a few VMs from Linux, or even allowed people to get a $29 OSX install running for a few pieces of software? I don’t know the legalities, but it would be a game changer in many ways.

    Think Different

    The best thing Microsoft could do is really think different. Don’t evolve Windows, but really grow it into something that is handy, ergonomic, efficient, and effective. Don’t worry about matching up with older software. iOS showed many people will port their stuff over if you make it popular, so give up on making things backward compatible.

    Break things if you must, but just make it better.

  • Printer Driver Fun

    I bought my new Brother HL-2270DW laser last week and had to set it up. With the need to print something quickly, I plugged my MacBook Air into a USB cable, plugged that into the printer, and wondered what would happen. I had a CD with the printer, but the MBA doesn’t have a CD drive.

    To my pleasant surprise, OSX identified the printer, made a quick search and told me it was downloading a driver inside of 10 sec. A minute later the driver installed itself, added the printer, and when I clicked print from Acrobat, I had a printed document.

    OSX score: 10.

    That’s miles beyond the hassles I’ve had with Windows machines in the past, but I was curious. I grabbed my old Windows 7 laptop, plugged the USB cable into it, and to my surprise it identified the printer, found a driver, and installed it. I was printing a couple minutes later.

    Windows 7 (direct) score: 10

    What about remote access? I had configured the printer for my network and went over to my desktop running Windows 7. I searched for the printer, and it was found on the network immediately. However when I clicked “find driver”, Windows was unable to find a driver. Strange, since the model of printer was identified by the OS.

    I manually added the driver from the CD and the printer worked immediately.

    Windows 7 (remote) score: 6

    What about remote on OSX? I went to the kid iMac and added a printer there. The printer was identified on the network, and once I clicked “add”, the driver was downloaded and installed

    OSX (remote) score: 10

    So far it seems Windows is still iffy with printer drivers, and I’m not sure why. The various hardware configs shouldn’t matter if the OS can identify the printer. It should go find the driver.

    I’m not sure why now, after decades of printing we can’t just have printers work with our operating systems, but I’m hoping at some point this will be rectified.

  • Waiting for SP1

    SQL Server 2012
    Is SQL Server 2012 stable enough for you?

    One of the classic tenets in upgrading Microsoft technology seems to be that it’s safer to wait for Service Pack 1 (SP1) before committing to the next version of any platform. There have been people asking if you will upgrade Windows, wait for Dynamics, and more. Last week I saw a blog from Gethryn Ellis that asked if his readers were waiting for SQL Server 2012 SP1.

    I’ve had times when Service Packs that installed smoothly and essentially had no impact on production systems, and I’ve had times when the installation blue screened my test systems. During the latter times I was extremely glad I’d decided to test the SP and not blindly install it on a production system. That is one of the things that worries me about cloud computing. I need to be sure that patches work on my systems.

    This Friday, however, I wanted to take the temperature of the community regarding the latest version of SQL Server. I am not wondering if you are upgrading, or if you have plans to upgrade to SQL Server 2012. Instead, I wanted to ask you this:

    Do you feel SQL Server 2012 RTM is stable enough to install on your production servers?

    I assume you’ll test it, but assuming it works with your application, assuming that cost is not an issue, is the codebase stable enough for you?

    I don’t have any plans to upgrade SQLServerCentral anytime soon. We upgraded last year and not many of the new features will actually make a difference to our application. Licensing is also an issue as we run Standard Edition, and the cost to move to Enterprise Edition s prohibitive. As much as I’d like to implement AlwaysOn in production, it will have to be limited to test systems for me.

    However if cost weren’t an issue, and resources were available, I’d upgrade. I think SQL Server has been getting more and more solid with every release, and I think SQL Server 2012 is as stable as any of the other recent releases. Let us know today if you feel the same way.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.