Author: way0utwest

  • UX Matters

    When I was early in my career, VB v4 was popular, and easy. So many basic apps were built by not only software developers, but people in other departments with an interest in programming. Through VB v6, I found so many apps being built, often with complex and un-intuitive interfaces.

    I was reminded of these apps when I saw a story about a mistake made by Citibank. Apparently an employee was supposed to send interest payments of US$7.8mm to creditors, however, the employee paid $500mm to Revlon, the entire amount of the loan. A mistake, and one for which Citibank is likely liable.

    Apparently there was a UI (user interface) issue. If you read the article, you’ll see a bad user interface, and one that is confusing. If you use this application regularly, it not be a big deal, but staff changes, and having useful UI matters. As I get older, and use more and more software applications, I really see the value in UI being well designed.

    Most of us data professionals tend to work with our tools, some of which are well designed, some not, but often we’re in a code editor, so we might not care as much. Writing code is code, though many of us do appreciate add-ins or extras that make it easy to organize our code.

    I do think for administrators, or anyone that is looking at the status for their systems, good UI helps. Even if you deal with just data and text, having things displayed in an easy to understand format is important. This is also certainly true for most end users of software.

    I’m not a UI/UX (user experience) person, but I know people that I can all for questions or hire for their experience. Over time, I’ve learned that paying attention to the UI/UX can make the difference between customers really enjoying what you’ve done and them feeling that you haven’t really finished your product. I’m sure that Citibank, and many other large orgs, might be re-thinking the emphasis, or lack thereof, they place on this part of software development after hearing about this story.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

  • Daily Coping 25 Feb 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

    Today’s tip is to focus on what’s good, even if today is tough.

    Most days haven’t been too tough lately. Colorado is opening up a bit more, I’m able to get out of the house and off the property a touch more. While I don’t see too many more people, a little freedom is nice. Or at least, the illusion of freedom. About the only thing that’s changed is a few more restaurant visits.

    However, I did tweak my back recently. I was trying to do some work outside, strained a bit, and got some lower back pain. It took me a day to get to the doctor, and I was in some pain during the afternoon and night.

    Easy to get upset or angry or have one of any other negative emotions. I stopped and told myself that I was still mostly healthy, this was my fault, it was a minor inconvenience, and things would be better soon.

    I went inside, lay down, played some guitar and read, finding a way to enjoy the day.

  • 2020 Advent of Code–Day 3

    This series looks at the Advent of Code challenges.

    As one of my goals, I’m working through challenges. This post looks at day 3.

    Part 1

    Day 3 was tough. The explanation isn’t great, at least, I didn’t get it at first. Essentially you have a map, and then you have some slope. The first part has a slope of right 3, down 1. If you move, assuming the upper left is (1,1), the next spot is 2, 4. That’s if you count going down as positive.

    Here’s the map:

    ..##.......
    #...#...#..
    .#....#..#.
    ..#.#...#.#
    .#...##..#.
    ..#.##.....
    .#.#.#....#
    .#........#
    #.##...#...
    #...##....#
    .#..#...#.#

    If I count each space, then there is a period (.) in this (2,4) space. If it’s a tree, then there is a hash (#) there. We are trying to count trees before we hit bottom.

    The trick I missed is that the map we’ve given repeats. It repeats to the right as often as needed to get to the bottom.

    This is really a coordinate problem, counting each down as we move, and repeating the map. The trick often in a short width here is to do the math to wrap around from the right to left if you run out of room.

    In SQL, I used a loop. I didn’t spend a ton of time, but couldn’t see a good way to avoid this as I need this to be readable, and I need this to keep working through the map. Here’s the code:

    WHILE @currentrow <= @rows
      BEGIN
        SELECT @currentcol += @right
        IF @currentcol > @width
          SELECT @currentcol = @currentcol - @width
        SELECT @currentrow += @down;

       SELECT @trees = @trees + CASE
           WHEN SUBSTRING(dataval, @currentcol, 1) = '#' THEN 1
           ELSE 0
        end
         FROM day3
         WHERE rowkey = @currentrow
      END
    SELECT @trees AS TreeCount

    I move, count the value if there’s as tree, and then continue moving through the next rows. The WHERE clause orients the rows.

    It worked. I go the right answer here.

    Part 2

    In part 2, this changes to checking a number of sloops and then multiplying the results together. In terms of my code, this is really a repetitive way of running the code again. I could have used different variables and checked multiple slopes at once, but I was busy.

    In python, I did something similar. I essentially calculated the next X and Y position, and then looped through the file. Each time the Y matched the current row, I checked for the matching #. If it matched, increment.

    Once I matched the correct Y, I incremented X and Y.

  • Daily Coping 24 Feb 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

    Today’s tip is to contribute positively to a good cause for your community.

    Winter is usually not too bad in my area, but we do get storms once in awhile. This used to be more of a hassle when I had kids in school, or I had to go to the airport, but now it’s not too bad. Worst case, I can’t go to the gym that day and need to figure out meals from what’s in the house.

    However, when we get more than a few inches, it can make driving hard. Recently we had a decent storm, which meant that part of the trails to the hay feeders gets hard to traverse. I sometimes run the tractor and blade down those trails.

    This time, when I did, I also took 20-30 minutes to go down my driveway, which helps me, but also down the 1/4 mile road I live on, clearing a space for others. A few people have tractors, but we somewhat randomly take turns doing this.

    I decided to take my turn.