I’m so proud to introduce mazemonster.com. What started as my son’s maze obsession turned into a fun side project for me that became something everyone can enjoy. Let me tell you the story.
I’m so proud to introduce mazemonster.com. What started as my son’s maze obsession turned into a fun side project for me that became something everyone can enjoy. Let me tell you the story.
Welcome to tech! It’s not always an easy field to be in, but there are always fun challenges and I’ve enjoyed doing the work involved at nearly every step in my career. Since you’re new here and I’ve been around for over 20 years, I want to share some of the skills and habits I wish I knew when I started.
There has been much talk about voter and election fraud as the president seeks to delegitimize elections. He talks a lot about manual methods like stealing ballots or impersonating other voters. The truth is that election fraud like this is incredibly rare. The point of his words seems to have two purposes, both common conservative arguments:
The purpose of this post is to explore how election fraud by stealing ballots could be perpetuated, thus showing why it’s so rare. I will also talk about more effective methods of election fraud, many of which are already happening.
This post combines three things I love: teaching dogs cool tricks, helping people grow, and figuring out how to do it best. I want to show you how easily I work with both dogs and humans, where the skills overlap and how they differ, so you too can teach fun tricks and help your fellow humans get better.
Assessing understanding is the key to improvement. If you know what you don’t know you can hone in on fixing that gap. Here’s the tricky part, though: understanding is fluid; without practice, our skills and knowledge atrophy. Thus, assessing understanding is a continuous process.
2020 has brought many life-changing events and here we sit with another one. George Floyd dying at the hands of police has sent us into a civil rights moment that I’ve never seen in my lifetime. I have hope that attitudes are changing among white people that may lead to the dismantling of structural racism. #BlackLivesMatter is mainstream and white people are speaking out in numbers I haven’t seen, but there’s still work to be done.
The intent of my post is to talk about the role I’ve found for myself and give ideas for other white people to continue the work we must do to eliminate systematic racism.
In the my last post, I reposted an article from 2018 about modifying a simple script to make it more testable. It’s been two years since I wrote that, and the way I evaluate testing needs for code has changed. Let’s look at that script again.
The script I wrote emptied AWS S3 buckets of any objects to get them ready to be deleted. AWS won’t delete an S3 bucket if it has any objects (files or subdirectories) in it. Here were the requirements of my script:
logs-${region}
. We need to delete objects in these buckets. So, to test it, I’m not sure I need to test it to death. I need to make sure that it:
I want to make sure both the script and test(s) aren’t brittle. AWS updates its regions often enough that I don’t want to bury the region list too deeply. I also don’t want to hardcode the bucket we’re trying to empty.
On the testing side, this will also help me write tests that won’t break unless the requirements for the script change. So here are my changes:
#!/usr/bin/env python3
import subprocess
def empty_buckets():
regions = [
'us-east-1',
'us-east-2',
'us-west-1',
'us-west-2',
'ca-central-1',
'eu-west-1',
'eu-west-2',
'eu-central-1',
'ap-south-1',
'ap-southeast-1',
'ap-southeast-2',
'ap-northeast-1',
'ap-northeast-2',
'sa-east-1'
]
bucket_template = 'fugue-e2e-s3-%s-logging'
for r in regions:
bucket_name = bucket_template % (r)
print('Verifying logging bucket in %s exists and contains objects.' % (r))
call = "aws --region {} s3api head-bucket --bucket {}".format(r, bucket_name)
try:
subprocess.check_output([call, ""], shell=True)
print('Bucket exists. Emptying.')
output = subprocess.check_output(["aws --region {} s3 rm s3://{} --recursive".format(r, bucket_name), ""], shell=True)
print(output.decode('utf-8'))
except Exception as e:
print('Error: logging bucket in %s %s' % (r, e))
If you’ve been looking around for information on unit testing and want to know a bit more, or possibly see an example of how to put it into practice, you’re in the right place.
By the end of this blog post, you should be able to:
We’ll also cover rudimentary mocking, which is the practice of writing pretend calls to test your code against predictable values.
As I write this, I’m entering my sixth week home with my family: a 2 and 4 year old, my husband, and my grandmother. My husband and I both are working and my grandmother lives for my children, so we’re in a good place. We all like each other and are making the best of this.
It’s been up and down, joy and stress, caring and frustration. Mostly it’s been stable and steady. This got me thinking about how I’m feeling fine enough when others in similar situations are struggling.*
I don’t care who or what you’re working with, if they’re sentient, they all want to:
When they don’t know what to do or get it wrong, they want to:
So:
At the Women in Tech Summit Southeast in Raleigh, I talked about my approach of developing effective, reliable, efficient tests. Basically, test smarter not harder.
Update your browser to view this website correctly. Update my browser now