Tag: goals

  • 2020 Advent of Code – Day 4

    This series looks at the Advent of Code challenges.

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

    Part 1

    This is an interesting data set. It’s ugly, inconsistent, and spans across lines. In fact, to determine what any particular “row” is, you need to read line by line and process the data until you find a blank line. An SSIS or ADF exercise indeed.

    However, I decided to try this with Python first. I thought the loading and splitting of items on consecutive lines would be easier. I opened the file and then scanned it for values like this:

    for row in passports:
    if row not in ['\n','\r\n']:
            currpassport += row.replace('\n',' ')

    This let me look for a blank row. If I didn’t find one, I added the row to my current passport value. If I did have a blank value, I split the row into a dictionary:

    currdict = dict(x.split(":") for x in currpassport.split(" ") if x)

    From here, I could check the length being either 8 entries, or 7 entries if the cid was not present. I counted all these up to get to the answer.

    Part II

    This was annoying.  Validating each one of the entries based on years or a set of values. I knew I could build a number of validation functions, which is the better way. I ended up just using a series of IF statements to check values and set a validation variable. A sample of them is here:

    if currdict["hgt"][-2:]=="cm" and ( int(currdict["hgt"][:-2]) < 150 or int(currdict["hgt"][:-2]) > 193):
                    valid = 0
    if currdict["hgt"][-2:]=="in" and ( int(currdict["hgt"][:-2]) < 59 or int(currdict["hgt"][:-2]) > 76):
                    valid = 0
    if currdict["ecl"] not in ["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]:
                    valid = 0
    if currdict["hcl"][0] != "#" or len(currdict["hcl"]) != 7:

                    valid = 0

    This let me tally up the valid passports.

    I still need to work on these in PoSh and SQL, but life has gotten in the way of things outside of work.

  • Goal Progress–Mar 2021

    I set goals at the beginning of the year, and I’m tracking my progress in these updates during 2021.

    As I look at goal progress for 2021, I’m going to follow a similar pattern as last year. I’ll give myself a current grade and report on overall progress in of the areas where I set goals.

    Current Grade: B-

    I think I’m making some progress, and getting some items moving forward. I haven’t spent as much time on my technical skills, but I have been pushing project stuff forward a bit.

    Reading

    The goal was 4 books (3 non-fiction, 1 tech). Here’s the current progress:

    Technical Skills

    I’m solving the Advent of Code three times.  I’m also studying for certification.

    • Certification –  AZ-900 – 5%
    • Certification – DP-200 – 0%
    • Skills – T-SQL – 2020 Advent of Code – 4/25
    • Skills – Python – 2020 Advent of Code – 4/25
    • Skills – PowerShell – 2020 Advent of Code – 4/25
    • Skills – TBD

    Projects

    I had a few projects for myself. Most of January was supporting SQL Memorial as well as doing some SQL Saturday/Data Saturday stuff. So far things appear to be working fine.

    • SQL Saturday Foundation – 60%
    • Support events: approved a PR or 2 this month, helped with feedback on the Data Saturday logo project, and started conversations about events this year with a few people
    • Speak at the 3 local user groups, at least one live presentation – 0%
    • Help organize a Denver/Colorado event, live or virtual – 10% (conversations)
    • Complete my Power BI Volleyball report – I know lots of kids will use this, so I need to get it done – 20%
    • SQL Memorial – 80%

    I added the SQL Saturday Foundation as a project, since this will occupy some time. I don’t plan on hiring anyone, but with me and some volunteers, I’m hoping we build a website. I spent some time writing a little PoSh this month to rip through the XML from the old site and rebuild an archive. I used the Data Saturday-ish site as a template and got something up with a few pages.

    However, I need to make this more maintainable until I get some help from others. So I’m looking at more themes and trying to get Jekyll to make this easier to update. The site is mostly working, though I can’t get a domain redirect until I get a privacy policy approved.

  • Goal Progress–Feb 2021

    I set goals at the beginning of the year, and I’m tracking my progress in these updates during 2021.

    As I look at goal progress for 2021, I’m going to follow a similar pattern as last year. I’ll give myself a current grade and report on overall progress in of the areas where I set goals.

    Current Grade: C

    I think I’m making some progress, but perhaps not as much as I’d like.

    Reading

    The goal was 4 books (3 non-fiction, 1 tech). Here’s the current progress:

    Technical Skills

    I’m solving the Advent of Code three times.  I’m also studying for certification.

    • Certification –  AZ-900 – 5%
    • Certification – DP-200 – 0%
    • Skills – T-SQL – 2020 Advent of Code – 4/25
    • Skills – Python – 2020 Advent of Code – 4/25
    • Skills – PowerShell – 2020 Advent of Code – 3/25
    • Skills – TBD

    Projects

    I had a few projects for myself. Most of January was supporting SQL Memorial as well as doing some SQL Saturday/Data Saturday stuff. So far things appear to be working fine.

    • Support events: submitted and approved some PRs.
    • Speak at the 3 local user groups, at least one live presentation
    • Help organize a Denver/Colorado event, live or virtual
    • Complete my Power BI Volleyball report – I know lots of kids will use this, so I need to get it done – 20%
    • SQL Memorial – 80%
  • Goal Progress–Jan 2021

    I set goals at the beginning of the year, and I’m tracking my progress in these updates during 2021.

    As I look at goal progress for 2021, I’m going to follow a similar pattern as last year. I’ll give myself a current grade and report on overall progress in of the areas where I set goals.

    Current Grade: C

    I think I’m making some progress, but perhaps not as much as I’d like. I started this post last week, but with Redgate buying the PASS assets, this week has been almost a loss for anything work or career related.

    Reading

    The goal was 4 books (3 non-fiction, 1 tech). Here’s the current progress:

    Technical Skills

    I’m solving the Advent of Code three times.  I’m also studying for certification.

    • Certification –  AZ-900 – 0%
    • Certification – DP-200 – 0%
    • Skills – T-SQL – 2020 Advent of Code – 4/25
    • Skills – Python – 2020 Advent of Code – 1/25
    • Skills – PowerShell – 2020 Advent of Code – 0/25
    • Skills – TBD

    Projects

    I had a few projects for myself. Most of January was supporting SQL Memorial as well as doing some SQL Saturday/Data Saturday stuff. So far things appear to be working fine.

    • Support events: submitted and approved some PRs.
    • Speak at the 3 local user groups, at least one live presentation
    • Help organize a Denver/Colorado event, live or virtual
    • Complete my Power BI Volleyball report – I know lots of kids will use this, so I need to get it done – 20%
    • SQL Memorial – 80% – This is mostly done, but working on some networking changes. I also need to move the repo out of my personal account, but this also entails pipeline changes, possibly security issues with hosting, etc.