Daily Coping 30 Apr 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 meet a friend outside for a chat, and hopefully a walk.

A couple weeks ago I actually met someone in my local area that I hadn’t seen in over a year. We had been on a few video calls, but nothing in person. We met outside and went for a walk for an hour, chatting about life and the local area.

It was a great way to spend part of my afternoon.

Today, I’ll do more of that, but with my wife and potentially a few others. I’m in Omaha today, coaching kids this afternoon in a tournament. However, before that I’m hoping to take a short walk, with some kids and parents. There’s a nice bridge by the convention center, the Bob Kerrey bridge where you can stand on the Nebraska/Iowa line.

At the very least, I’ll get the chance to walk around quite a bit from the hotel to the convention center and be outside with others.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 30 Apr 2021

Ransomware May Get Worse

I’ve never had to deal with ransomware, but across the last couple years I’ve been surprised how many friends and customers have dealt with this. For those that are prepared, it’s a time sink and a hassle. For those that aren’t, there is the addition of finger pointing, anger, fear, and often lost data as well.

I hope things don’t get worse, but I think this might be a sign they are. There is some speculation that criminal groups are working together, in a sort of computer hacker cartel. Apparently four criminal groups announced they would be working together. If that isn’t a sign of the craziness of the world, I don’t know what else would be. Criminal groups announcing they are collaborating? Apparently they must think they are businesses like the targets they attack.

There has been some investigation, and there haven’t been signs this is a cartel, with no revenue sharing or coordination, but the fact that they are cross posting data and sharing techniques is bad enough. Helping each other out may help them find more targets and develop better techniques to get around security.

The one concern I’d have with all of this is that these different groups may attack the same companies. Can you imagine getting through an attack, either paying a ransom or not, only to be attacked again? I do think that organizations ought to be worried about their security against ransomware, have good, air-gapped backups, and ensure if they are attacked, they plug any holes in their systems.

Surviving one attack might be hard for an organization, but if there are two or more, I suspect someone’s career will be in trouble.

Steve Jones

Posted in Editorial | Tagged | Comments Off on Ransomware May Get Worse

Daily Coping 29 Apr 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 check up on a friend and see if you can help them cope.

One of the things I did early in the pandemic was to check up on friends. I’ve fallen away a bit, but I am still trying to remember to touch base. Recently I reached out to someone whose named I saw on Twitter, but I hadn’t seen them very active. Not many posts, not many blogs, just a bit quiet.

I will usually send a short message like this one:

Hi. I hope you’re doing well and coping with life. I hadn’t chatted with you in awhile, so I wanted to check in and make sure you are doing OK.

I usually change this a bit, depending on who it is, or how I’m reaching out. Texts are usually shorter, emails maybe longer, but often just trying to make a connection with someone I haven’t seen in quite some time.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 29 Apr 2021

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. I’m going to do this one in Python here, though I did solve it in other languages in my repo.

Part 1

We have another string parsing operation. We get a series of lines that represent a passport. Passports are separated by blank lines. Therefore, we can get 1-x number of lines representing a passport.

Ugh.

Python seems like a good place to start here. I loaded the file and then started to concatenate rows of data until I found a blank one.

file_handle = open('2020\day4\day4_data.txt', 'r')
passports = file_handle.readlines()
part1 = 0
currpassport = ""
for row in passports:
if row not in ['\n','\r\n']:
        currpassport += row.replace('\n',' ')
#print(currpassport.split(" "))

else:

At this point, I have a passport I can look at, with all the various sections. I used another split, this time into a dictionary to get each item separate.

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

Now, I can count these. If there are 8, or if there are 7 and CID is one of them, I have a valid passport. Adding these up gets me the answer.

Part 2

This is very similar, but each part now needs validation. So, I take the same structure, but once I have passports, I assume they are valid and start to check each section. It’s really a series of IF statements for me.

            valid = 1
if ((int(currdict["iyr"]) < 2010) or (int(currdict["iyr"]) > 2020)):
                valid = 0
if int(currdict["byr"]) < 1920 or int(currdict["byr"]) > 2002 :
                valid = 0
if int(currdict["eyr"]) < 2020 or int(currdict["iyr"]) > 2030:
                valid = 0

These each could be functions, and I’d refactor that way, but I couldn’t come up with an easier way to do this. After checking if I have enough valid items, I tally another passport (or not).

Overall, this felt like busy work, not hard, but just a grind through each set of validation.

Posted in Blog | Tagged , , | Comments Off on 2020 Advent of Code–Day 4