My philosophy of exceptions: they’re always ambiguous

Exceptions are the norm, not the exception

# How many exceptions can this code raise?
url = input("Please enter a URL: ") # wait for user input
with urllib.request.urlopen(url) as response: # request the url
bytes =
text = bytes.decode("utf-8")
print(text) # print the HTML

Do we even need a definition?

What’s better?




Journalist, ex software engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

8SIAN Discord Language Roles update

Application Containers for Absolute Beginners

[LeetCode]#1662. Check If Two String Arrays are Equivalent

IT Camp 2018 in Cluj-Napoca, Romania

Android Navigation Components — Part 3

APIs for RingCentral Team Messaging Tasks: A Brief Intro

Sequence read archive and other tools

Learning Git and GitHub: Part 2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Hooper

Adam Hooper

Journalist, ex software engineer

More from Medium

Haskell on Hacker rank

Python isn’t bad. Programmers are.

What is the Big O all about?

How I mock AWS connections using moto in Python lambda for unit testing