
Yet another one we can file under “Funny because it’s true.”
Yet another one we can file under “Funny because it’s true.”
It’s the first week of a new month, and the final month of the first quarter! Here’s your list of tech, entrepreneur, and nerd events for Tampa Bay and surrounding areas for the week of Monday, March 1 through Sunday, March 7, 2020.
This is a weekly service from Tampa Bay’s tech blog, Global Nerdy! For the past four years, I’ve been compiling a list of tech, entrepreneur, and nerd events happening in Tampa Bat and surrounding areas. There’s a lot going on in our scene here in “The Other Bay Area, on the Other West Coast”!
By “Tampa Bay and surrounding areas”, this list covers events that originate or are aimed at the area within 100 miles of the Port of Tampa. At the very least, that includes the cities of Tampa, St. Petersburg, and Clearwater, but as far north as Ocala, as far south as Fort Myers, and includes Orlando and its surrounding cities.
For the time being, I’m restricting this list to online events. We’re still deep in a pandemic, and the way out is to stop the spread, however we can. In the age of broadband internet, smartphones, and social media, it’s not that hard. Stay home, stay safe, stay connected, and #MakeItTampaBay!
Let me know at joey@joeydevilla.com!
If you’d like to get this list in your email inbox every week, enter your email address below. You’ll only be emailed once a week, and the email will contain this list, plus links to any interesting news, upcoming events, and tech articles.
Join the Tampa Bay Tech Events list and always be informed of what’s coming up in Tampa Bay!
The first Programmers of Portables meetup took place last night, and we made our first steps towards making our first videogame. We met over Zoom, where I shared my screen and led the group in a “code along with me” exercise as we started writing a simple videogame from scratch.
This article covers what we did last night, complete with the code that we wrote. If you were there, you can use this for review. If you weren’t, you should still be able to look at what we did and follow along.
This article is primarily a collection of the code we wrote and the recording of the session. In later articles, I’ll go over Pygame programming in more detail. In the meantime, if you’ve like to learn more about Pygame, here are a couple of resources:
The first part of the session was devoted to downloading and installing the prerequisites for writing videogames with Python.
A code editor (such as Visual Studio Code)
Any application that calls itself a code editor will do.
I tend to use Visual Studio Code these days, because I’ve already done my time using earlier versions of vim (in the late ’80s, I used a variant called ivi, short for “improved vi”) and Emacs (back when the joke name was “Eight megs and constant swapping”). VS Code is pretty much the same across all the platforms I use — macOS, Windows, Linux, and Raspberry Pi OS — and it feels like a present-day app, and not leftovers from the 1970s.
You can download Visual Studio Code here.
We’re programming in Python (preferably Python 3.7 or later), so any reasonably recent Python distribution will do.
I like the Anaconda Python distribution because iy includes a lot of useful libraries and other tools that you’ll need when using Python for things such as data science, and the experience is pretty much the same across macOS, Windows, and Linux.
You can download Anaconda Python here.
The final prerequisite is Pygame, a cross-platform set of packages that supports game development in Python. It’s been around for 20 years (its was first release in the fall of 2000), and it’s a fun, fantastic 2D game programming platform.
To install it, you’ll need to go to the command line:
pip install pygame
pip install pygame
With the prerequisites gathered and installed on our computers, it was time to start working on the game. We worked on it in steps, each time producing an improved version of the game.
The first version of the game wasn’t terribly impressive, as it ended up being a blank black window that did nothing. Still, it was a working program, and the code we wrote would function as a framework on which we’d eventually build the rest of the game:
Here’s its code:
# The first version of the game: # An 800-by-600 black window # (Don’t worry; it gets better) import pygame # Constants # ========= # Screen dimensions and refresh rate SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 FRAMES_PER_SECOND = 60 # Colors BLACK = (0, 0, 0) GREEN = (0, 255, 0) # Initialization # ============== pygame.init() screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption("My Game") clock = pygame.time.Clock() # Game loop # ========= running = True while running: # This method should be called once per frame. # It calculates the number of milliseconds since the last # call to clock.tick() in order to limit the game’s framerate # to a maximum of FRAMES_PER_SECOND. clock.tick(FRAMES_PER_SECOND) # Handle events for event in pygame.event.get(): # Check to see if the user has closed the window # or hit control-c on the command line # (i.e. Has the user quit the program?) if event.type == pygame.QUIT: running = False # Draw game objects to the screen surface screen.fill(BLACK) # Update the screen with the contents of the screen surface pygame.display.flip() # Exit the game pygame.quit()
The second version of the game built upon the code from the first, and was slightly more impressive. It featured an actual image on the screen, complete with animation: a green square, travelling from left to right across the screen, and “wrapping around” back to the left side after it disappears from the right side of the screen.
Here’s its code:
# The second version of the game: # An 800-by-600 black window, # now with a rightward-moving green square! import pygame # Constants # ========= # Screen dimensions and refresh rate SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 FRAMES_PER_SECOND = 60 # Colors BLACK = (0, 0, 0) GREEN = (0, 255, 0) # Sprites # ======= class Player(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface((50, 50)) self.image.fill(GREEN) self.rect = self.image.get_rect() self.rect.center = (SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2) def update(self): self.rect.x = self.rect.x + 5 if self.rect.left > SCREEN_WIDTH: self.rect.right = 0 # Initialization # ============== # Initialize screen and framerate pygame.init() screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption("My Game") clock = pygame.time.Clock() # Create sprites and sprite groups all_sprites = pygame.sprite.Group() player = Player() all_sprites.add(player) # Game loop # ========= running = True while running: # This method should be called once per frame. # It calculates the number of milliseconds since the last # call to clock.tick() in order to limit the game’s framerate # to a maximum of FRAMES_PER_SECOND. clock.tick(FRAMES_PER_SECOND) # Handle events for event in pygame.event.get(): # Check to see if the user has closed the window # or hit control-c on the command line # (i.e. Has the user quit the program?) if event.type == pygame.QUIT: running = False # Update the game state all_sprites.update() # Draw game objects to the screen surface screen.fill(BLACK) all_sprites.draw(screen) # Update the screen with the contents of the screen surface pygame.display.flip() # Exit the game pygame.quit()
The final version of the game was one where we made the green square interactive. Instead of continuously travelling from left to right on the screen, the square stays put until the user presses one of the arrow keys. When that happens, the square moves in the appropriate direction. The square is constrained so that it can’t go offscreen.
Here’s its code:
# The third version of the game: # The green square, now under user control! import pygame # Constants # ========= # Screen dimensions and refresh rate SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 FRAMES_PER_SECOND = 60 # Colors BLACK = (0, 0, 0) GREEN = (0, 255, 0) # Sprites # ======= class Player(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface((50, 50)) self.image.fill(GREEN) self.rect = self.image.get_rect() self.rect.center = (SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2) def update(self): # Get the state of all the keys keys = pygame.key.get_pressed() # Check the retrieved state to see if any # arrow keys have been pressed # ======================================= # Is the user pressing the left-arrow key, # and is the sprite’s left edge NOT flush # with the screen’s left edge? if keys[pygame.K_LEFT] and self.rect.x > 0: self.rect.x = self.rect.x - 5 # Is the user pressing the right-arrow key, # and is the sprite’s right edge NOT FLUSH # with the screen’s right edge? if keys[pygame.K_RIGHT] and self.rect.x < SCREEN_WIDTH - self.rect.width: self.rect.x = self.rect.x + 5 # Is the user pressing the up-arrow key, # and is the sprite’s top edge NOT FLUSH # with the screen’s top edge? if keys[pygame.K_UP] and self.rect.y > 0: self.rect.y = self.rect.y - 5 # Is the user pressing the down-arrow key, # and is the sprite’s bottom edge NOT FLUSH # with the screen’s bottom edge? if keys[pygame.K_DOWN] and self.rect.y < SCREEN_HEIGHT - self.rect.height: self.rect.y = self.rect.y + 5 # Initialization # ============== # Initialize screen and framerate pygame.init() screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption("My Game") clock = pygame.time.Clock() # Create sprites and sprite groups all_sprites = pygame.sprite.Group() player = Player() all_sprites.add(player) # Game loop # ========= running = True while running: # This method should be called once per frame. # It calculates the number of milliseconds since the last # call to clock.tick() in order to limit the game’s framerate # to a maximum of FRAMES_PER_SECOND. clock.tick(FRAMES_PER_SECOND) # Handle events for event in pygame.event.get(): # Check to see if the user has closed the window # or hit control-c on the command line # (i.e. Has the user quit the program?) if event.type == pygame.QUIT: running = False # Update the game state all_sprites.update() # Draw game objects to the screen surface screen.fill(BLACK) all_sprites.draw(screen) # Update the screen with the contents of the screen surface pygame.display.flip() # Exit the game pygame.quit()
Here’s the recording of the session:
Believe it or not, the end of this week is also the end of the month. Here’s your list of tech, entrepreneur, and nerd events for Tampa Bay and surrounding areas for the week of Monday, February 22 through Sunday, February 28, 2020.
This is a weekly service from Tampa Bay’s tech blog, Global Nerdy! For the past four years, I’ve been compiling a list of tech, entrepreneur, and nerd events happening in Tampa Bat and surrounding areas. There’s a lot going on in our scene here in “The Other Bay Area, on the Other West Coast”!
By “Tampa Bay and surrounding areas”, this list covers events that originate or are aimed at the area within 100 miles of the Port of Tampa. At the very least, that includes the cities of Tampa, St. Petersburg, and Clearwater, but as far north as Ocala, as far south as Fort Myers, and includes Orlando and its surrounding cities.
For the time being, I’m restricting this list to online events. We’re still deep in a pandemic, and the way out is to stop the spread, however we can. In the age of broadband internet, smartphones, and social media, it’s not that hard. Stay home, stay safe, stay connected, and #MakeItTampaBay!
Let me know at joey@joeydevilla.com!
If you’d like to get this list in your email inbox every week, enter your email address below. You’ll only be emailed once a week, and the email will contain this list, plus links to any interesting news, upcoming events, and tech articles.
Join the Tampa Bay Tech Events list and always be informed of what’s coming up in Tampa Bay!
My latest article on the Auth0 blog, How to Read and Remove Metadata from Your Photos With Python, shows you how to use Python and the exif module to examine, alter, and even remove the metadata that your phone adds to pictures you take.
In addition to picture data, photos taken with smartphones and modern digital cameras contain metadata, which is additional information about the photo. This metadata is stored in a format called EXIF, which is short for EXchangeable Image File format, which is a continually evolving standard for information added to digital image and sound recordings.
In photos, EXIF can include information such as:
My article will show you how to use Python’s exif module to access this information, as well as how to alter it (I show you how to tag your photos so it seems as if they were taken at Area 51) or erase it.
EXIF data was recently in the spotlight as a result of the January 6th riots in Washington, DC. Many of the rioters posted photos to Parler, which did not strip EXIF data from photos uploaded to it.
When Parler started to shut down as a result of Amazon and other providers kicking them off their services, it opened some security holes that a hacktivist who goes by the handle @donk_enby was able to exploit. They were able to scrape the posts and uploaded photos and videos and upload them to the Internet Archive. Soon after, it was discovered that Parler never removed the EXIF data from the photos and videos, which made it possible to easily identify participants in the riot, see who broke into the Capitol, and for authorities to make arrests. The New York Times used this data to make a timeline of events, which they published in their article, How a Presidential Rally Turned Into a Capitol Rampage.
While Parler’s sloppy security was by and large good news, there’s still good reason to follow good security practices, and part of that is managing EXIF data in photographs. That’s what my article covers, and in a fun way as well!
Read the article on the Auth0 blog: How to Read and Remove Metadata from Your Photos With Python.
Each week, I publish a listing of tech, entrepreneur, and nerd online events by and for people in Tampa Bay and surrounding areas. But what if I tried expanding the scope and listing online events beyond Tampa Bay?
That’s the subject of this week’s experiment. Each weekday this week, I’m going to provide a list of:
Let’s face it — with COVID-19 still raging away, new variants of the disease popping up, and vaccines being slow in coming, we need to step up our online connection game. The way to do that is to look at tech events from beyond our backyard, see what other people are talking about, learn from them, and take those lessons back here to “The Other Bay Area!”
I’ve listed the events below. Check them out, and let me know if this sort of list is interesting or useful to you.
Here’s the list of Tuesday’s online events for the Tampa Bay area, taken straight from my larger list of this week’s Tampa Bay tech, entrepreneur, and nerd events.
…and here’s a selection of online tech events taking place across the country and around the world. I have no idea if any are limiting attendance to locals, but I suggest you drop in and find out!
If you can’t find the kind of event you’re looking for in my weekly list, perhaps you’ll find something in this list of events taking place tonight!