Here are the resources I’ve found most helpful as a beginner

Image for post
Image for post
Photo by Eli Francis on Unsplash

It’s been almost two months since I started studying Python. It took time to find a rhythm with it since there are so many resources to choose from. For example, I tried Linux Academy (which I have access to through work), CodeAcademy, and a few other free options. But none of them resonated with me.

After a lot of trial and error, trying to figure out what works best for me, I’ve been bouncing between the following resources:

Is faith after doubt possible?

Image for post
Image for post
Photo by Aaron Burden on Unsplash

This February 2021 marks four years since I stopped attending church. Prior to that, I used to write a lot about my spiritual journey. Since then, though, I haven’t really known what to say about it. In one sense it felt like my journey had come to an end. Like I could live without God, Christianity, or the Bible, and not much would be different. Life goes on.

At other times I held out hope that I’d once again find myself going to church regularly, without skipping a beat. …

Creating duplicate lists with different reference ids

Image for post
Image for post
Photo by Markus Spiske on Unsplash

The copy() function lets you make a duplicate copy of a list, while giving it a different reference id.

To help illustrate this, let’s first create a list of 1s and 0s and set it equal to a variable called binary:

>>> binary = [1, 1, 0, 1, 1, 0, 1, 0, 0, 1]

This information takes up a specific place in the computer’s memory. This is its id, which is sort of like its address. The id of binary is:

>>> id(binary)

If I made a duplicate of this list by setting a variable called binary_copy equal to binary, they’d have the same reference id. In other words, they’d take up the same place in the computer’s memory by referencing the same id. …

How to pack and unpack tuples

Image for post
Image for post
Photo by Markus Spiske on Unsplash

What is a tuple?

A tuple is a set of values separated by commas. For example:

'hello', 'goodbye', 'see ya later', 'good morning', 'good night'

How does a tuple differ from a list?

A tuple differs from a list in that a list is mutable (i.e. — it can be changed, added to, taken away from, etc.), whereas a tuple is immutable. For example, a list would look like this, surrounded by brackets:

['hello', 'hi', 'nice to see you', 'how are you?', 'good morning']

Let’s set this equal to a variable named greetings:

>>> greetings = ['hello', 'hi', 'nice to see you', 'how are you?', 'good morning']

A value could be removed or added from this list as follows. Let’s remove the last value using…

Mini-learns with Python

Image for post
Image for post
Photo by Janko Ferlič on Unsplash

The other day I ran into a problem asking me to provide one kind of output if an argument was given, and another if no argument was given.

For example — given a book, return the message:

My favorite book is X.

Where X is the given book.

However, if the book is missing, return the string:

I don't like to read.

The exercise came with the following function to manipulate:

def fav_book(book):

I wrongly assumed I could only change text in the function suite (where pass was), instead of the argument itself. …

Mini-learns with Python 3

Image for post
Image for post
Photo by Chandan Siddaramaiah on Unsplash

While learning to code it’s easy to push through from exercise to exercise, chasing the feeling of accomplishment. I find that everything sinks in more, though, if I take a moment to flesh out my thought process from time to time.

I came across a problem on Hackerrank the other day that required me to find all possible sums of four out of five integers in a list. I’m making a note of what I did here, for future reference.

I used the combinations attribute from the itertools module.

To import this into our Python REPL or code

from itertools import combinations

The function

def find_combos(arr):
combos = list(combinations(arr, 4))

Breaking this down

Mini-learns with Python

Image for post
Image for post
Photo by Marc Schulte on Unsplash

In my effort to start writing again about my coding journey again, I figured I’d start jotting down small learns, or things I’d like to reinforce in my own words.

Specifically, I recently needed to iterate through both keys and values in a dictionary.

For example, here is my (fake) meal plan for the week:

meal_plan = {
"Monday": "tuna sandwiches",
"Tuesday": "crackers and cheese",
"Wednesday": "caesar salad",
"Thursday": "spaghetti and meatballs",
"Friday": "pizza"

Now if I had a simple list, like this:

meals = ["tuna sandwiches", "crackers and cheese", "caesar salad", "spaghetti and meatballs", "pizza"]

I’d be able to do this with a for…

Getting back into studying coding after a long hiatus

Image for post
Image for post
Photo by George Pagan III on Unsplash

Two-and-a-half years ago I went through a coding bootcamp where we mostly studied JavaScript, Ruby on Rails and HTML. While going through the course, I wrote a lot about what I was learning. I was lucky after the course to get a job as a customer service rep at a Linux based web hosting company. It’s been really good, and learning Linux has been really valuable in a lot of ways. I’ve since wanted to get back into coding, though rather than focus on JS like I was, I decided to dive into Python.

The main reason for this is that it’s a really robust scripting language, and I’ve been finding that a lot of the things I’d like to do at work to make my job easier, or to contribute in meaningful ways, require me to understand more about scripting. …

Reflections on Rob Bell’s latest book “Everything Is Spiritual”

Image for post
Image for post
Sunrise — Ocean City, NJ

I first heard Rob Bell speak at Wheaton college when I was a student there. The way he spoke was electrifying to me. It opened up worlds of possibility.

He said things I hadn’t given voice to. It was refreshing to hear my thoughts spoken aloud. To realize, I’m not alone.

I’m finding the same thing to be true while reading his latest book, Everything Is Spiritual: Who We Are and What We’re Doing Here. There are so many things he says that resonate with me at a deep level.

Reflecting on his time as a pastor, several years after starting his own church, he…

Dispelling depression through curiosity

Image for post
Image for post
Photo by Andrew Neel on Unsplash

Curiosity is an antidote to despair.
Despair is the spiritual disease of believing that tomorrow will simply be a repeat of today. Nothing new. The future simply an unbroken string of todays, one after another. But curiosity, curiosity disrupts despair, insisting that tomorrow will not be a repeat of today. Curiosity whispers to you,
You’re just getting started…

I didn’t want to live my life wondering,
What if…?
I had seen people do that.
They had something nudging them in a particular direction, but they didn’t follow it. They didn’t take the risk. They didn’t listen to their heart. And years later they felt stuck, wondering where it all went wrong.
I didn’t want to live like that. …


Joe Cardillo

Coding, creativity, music, and books. Pianist & composer — @vontmer

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