Author: way0utwest

  • Work to Live

    Me and my son skiing
    Balancing work and life as best I can

    I’m halfway through my career, having spent about 20 years since college working in technology with another twenty to go. The rest of the community is probably spread out around me, some older, some younger. It doesn’t matter what part of your life you are in, there are a few things about work that I think always apply. The first is that we work to live, and don’t live to work. The second is I like to hope for the best, but plan for the worst.

    It’s all too common for people in this business to overwork themselves, work very long hours, and neglect the rest of their life. I have rarely seen someone that is retired or late in life complain that they didn’t work enough over their lifetime, and I’d caution you to keep that in mind as you go through life. There will always be more work, more things to do, and more requests from clients and customers. Keep a balance in your life, and remember to enjoy it along the way.

    The second part of my advice can apply in many parts of our career, but it ought to apply to our finances and our retirement. Unfortunately, I’ve seen a few articles like this one that notes many people have not funded their retirements well. We all have expenses, and it’s easy to delay the investments in our life until later, but that is a bad idea. Whether it’s your IRA/401K or your health, you’d be better off sacrificing a little today for a little more security later.

    In the US, many employers match contributions and you ought to take advantage of that. There are all sorts of options for retirement, like ROTH IRAs, that it seems many people aren’t aware of. I also meet many people that don’t realize they can borrow against their 401K as well, taking a loan whose interest goes back to your own account. There are few excuses to not plan for the future. Enjoy today, but plan to live a long time and to enjoy your retirement.

    How much money you might need depends on your lifestyle, and that’s something you should spend time thinking about and talking with your family about. Many of us may not be able to retire at 65, or count on social security, but I’d hate to have to work longer than I want to because I cannot afford to retire.

    Steve Jones


    The Voice of the DBA Podcasts

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

  • Promoting Engineers

    CS career paths
    Do we have enough of a career path for technical people? I’m not sure we do in many companies.

    Never, ever promote your best salesperson.

    That’s the advice that Scott Horowitz got from his father. He talks a little about how this relates to technical people who find themselves looking at management to further their careers, or are sometimes even get promoted just because they’re the strongest technical employee in a group. Mr. Horowitz sees the transition as one that rarely works well, though he has some good advice on how you can increase the likelihood of success.

    In my career I’ve moved to management a few times and back again to a technical role, though never at the same company. I am sure it would be a strange move to be in charge and then move back to a contributing employee, but I do know some other people that have done it successfully in their careers. I have enjoyed both roles, and at different times in my career, the different role has fit me better.

    Many companies struggle with their technical people as they advance in their careers. Few companies think ahead and build dual career tracks in both the technical and managerial areas for their staff. As a result, many technical people find their career stalled in a company and may look to leave for another position. Setting aside a technical track that allows an employee to advance as a strong technical worker, and continue to grow their challenges and salary seems like a no-brainer, but it’s something rarely implemented outside of technology-oriented companies.

    Perhaps senior technical people can’t continue to add the same value as a manager or director in an organization. There are definitely lots of technical people that have a lot of seniority in a company, but do not necessarily bring a lot of additional value for all their experience. However some do, and those are often the people that a company should not let go. If they continue to grow their knowledge, and add more value, there ought to be a career advancement track for them in the technical area.

    Steve Jones


    The Voice of the DBA Podcasts

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

  • Creating a Sequence in SQL Server 2012

    Sequences are a new object in SQL Server 2012 that generate just what the name implies: a sequence of numbers.

    To create a sequence, you use standard DDL with the CREATE SEQUENCE command. This command takes a type, a starting value, a min, max, and a few other parameters. You can read about the meanings of the parameters in Books Online, and learn how to use the parameters.

    When I first head about sequences, I thought this was neat, but not terribly useful. The idea of a custom sequence seems more like an edge case. However the more I’ve looked at them, the more it starts to make some sense.

    Let’s look at a real world example where we use a sequence since we often use these as a basis for some computer algorithm. Suppose I have a group of kids and I need to assign them to groups. In the real world, we line up the kids and we have them count off to some number. It’s often “1”, “2”, “1”, “2”, but it could be something else. In a youth group a few years ago, we counted off into 5 groups to divide the kids up.

    In this case, suppose I have kids and I want to get them into these groups:

    sequence1

    In order to get that in T-SQL, it can be cumbersome, especially if there isn’t a data point that cycles things, but rather a set counter. Here I can create a simple sequence:

    create sequence RoundRobin
     Start with 1
     increment by 1
      minvalue 1
      maxvalue 3
     cycle
    ;
    

    I have 10 rows in my table, being the list of kids:

    create table Kids
    ( Kid varchar(10)
    )
    go
    insert Kids
     values
      ('Emma')
    , ('Tabitha')
    , ('Kendall')
    , ('Delaney')
    , ('Kyle')
    , ('Jessica')
    , ('Josh')
    , ('Kirsten')
    , ('Amanda')
    , ('Jimmy')
    ;
    go
    

    To integrate the sequence, I do this:

    select
      'Group' = next value for dbo.RoundRobin
    , Kid
     from Kids
    ;
    

    That returns the results above.

    It’s not necessarily a common solution, but there might be places where you want custom counters, perhaps counting by a certain value. Suppose you want to alternate counters among two different people in a table. An identity doesn’t allow this, but you could set up two sequences, say one for even numbers, and one for odd numbers, and let each person use the appropriate sequence for inserts.

    Sequences are simple, but they can be useful in some cases. I’ll write a bit more about a few gotchas I’ve run into with sequences soon.

  • Less Energy through Better Design

    When I attended SQL Saturday #131 at the Chandler Gilbert Community College, I was struck by a few design elements that I thought were great examples of how a little thought can improve the experience of a space, and use less energy.

    The event was outside Phoenix, which is hot. I mean really hot. It was 93F or so on the April day that I was in attendance, and it was expected to go over 100 the next weekend. A few local people told me that they really need to have fans in their houses to assist with the AC, otherwise they tend to dramatically shorten the life span of their units with the desert heat.

    As I walked up, I noticed a few things. Lots of wide overhands and buildings placed in each other to shade courtyards. Many rooms opened from an outside wall, so less hallways to cool inside buildings. I’m not sure if this is good or bad, since cooling those rooms whose doors might open frequently might be worse than trying to cool hallways. I also didn’t’ see many airlock structures, which is something we see more in cold climates.

    Photo Apr 28, 10 43 37 AM

    The building above has a skin like structure outside of the main building, essentially shading the building itself. It reflects a lot of light, and at the same time, looks interesting. Not sure how the material costs compare with the energy costs, but I’ve seen this on a few buildings in the Middle East, so I’m guessing it’s a good trade-off.

    The main student center, shown below, was like a glass garage. Each 10 or 12 foot wide section could roll up. I stood just outside one open door, and you can see another across on the left side of the picture. This was a pleasant building all day, even when it was over 90F. In the upper right, you can see a large ceiling fan. The blades on this had to be at least 10ft long, possibly longer. There were two in the space, but only one ran all day, even when there were close to 200 people eating lunch.

    Photo Apr 28, 9 19 15 AM

    Here’s one of the courtyard structures.

    Photo Apr 28, 10 32 15 AM

    Shaded, not completely so. Nice in the shade, definitely hot in the sun.

    There also was an elevated walkway with a spiral art structure that would provide some, but not a lot of shade. I’m sure it makes things better, and it looks really nice. It was made of metal, with designs cut into it. Many of the railings and structures around the campus were metal, which holds up better in the sun. Most with artistic designs in them.

    Photo Apr 28, 9 28 01 AM

    I’m sure many of you have seen hot air hand dryers in bathrooms before. This college had the newer Dyson dryers, which are supposed to be more efficient and cleaner for the air. However they had a few other things:

    Photo Apr 28, 2 30 53 PM

    A few simple change (probably) to the toilets, but with this plaque, you have the choice to use less water for liquid waste. I hadn’t seen this before, but I’d hope that more buildings would implement something like this. It would be great for homes as well.

    Photo Apr 28, 11 40 02 AM

    Many of the urinals in the Men’s bathroom were waterless. I’ve seen these before at various ski resorts. They get used a lot, but they don’t stink, and they’re a great idea everywhere, but especially in places like CO and AZ where the water supply is limited.

    Photo Apr 28, 9 51 48 AM

    There were plaques describing structures all over. I think this is a great idea, because it helps people to understand there’s more to the design than architecture. These items were built to add useful space to the campus without adding to the energy bill.

    There were all multi-language inspirational plaques and posts all over. This was one of the ones I passed, and I wish I’d walked around looking for more. I remember sayings like this on the grounds at Virginia, and they were always inspirational to me as I thought about all the people over time that had walked the path I was walking.

    Photo Apr 28, 10 54 14 AM

    I’m a fan of alternative energy and sustainable practices. I don’t think we need to end our dependence of fossil fuels, but I do think we ought to try to better use our resources, especially when we can use design to do so.

    I was impressed with what is being done at this college, and it shows some effort is being made to build a structure for the long term. Is it worth it? Are things working? I’d like to know both from an ROI standpoint and an energy standpoint what differences there are from other designs. I sent a note to the school, and we’ll see if they respond.