Holy Hiatus Batman (Plus the Things I’ve Learned)

The journey from 0 to now.


Wow. Hi there, followers. It’s been a minute. But I swear I’ve been away for good reasons! As in, I was hit by a semi-truck on my bicycle.

I’ve been taking time to recover, see doctors, find lawyers and generally try and be damn happy I’m alive after such an incident. So, that’s what’s been going on in my life. I took a break from learning to code because I really just needed to heal and for the first week and a half, I could hardly open both of my eyes. So!

With that, I really wanna share where I’m at now. Obviously I had a bit of a setback, but I’m pushing forward.

I’ve started taking a free class at Noisebridge, the hackerspace in San Francisco I mentioned earlier. It was pretty lucky that soon after I started all of this, they rebooted their Python course. The focus will be on learning computer science through Python. The resources we’re using primarily are Think Python and Learn Python the Hard Way. The class has only happened twice, but it’ll be every Wednesday from 7 to 9 PM, which works great since Mondays and Tuesdays are the days I’ve set aside time to work through some of these resources.

The class has been slow to start, but I know it’ll be a great resources for meeting people in the industry.

Mostly I’ve learned about types of errors (syntax, semantic and runtime), data types (numbers, strings, booleans) and assigning values to variables and using string formatting to call those values using the variables. I learned about %s, %d, %i and %r and all that fancy stuff and started putting it into my code:

book_price = 24.95
books = 60
discount = .6
shipping_first = 3.00
shipping_rest = .75

discount_amount = book_price * discount * books
shipping = shipping_rest * (books — 1) + shipping_first
total = discount_amount + shipping

print “”“Total price of the books is: %.2f
Total shipping is: %.2f
Total price is: %.2f”“” % (discount_amount, shipping, total)

I also learned that putting a 0 in front of a string of numbers in which all of the numbers are less than 8 will put the string into an octal base and that was confusing at first, but then I figured it out. I learned how to figure out what type a value is (string, integer, float). I learned about Python keywords and how I can’t assign values to them since they’re already in use.

Finally, I learned about the raw_input function and started using it:

#A script that takes a runner’s runtime and distance and returns average time per mile and speed of runner.

distance = raw_input(“YO! How far did you run, dawg? Enter up to the second decimal and in miles, mang!”)
distance =float(distance)
time = raw_input(“How fast didja run that, bro? Enter in minutes.”)
time =int(time)
speed = (distance / time)
time_per_mile = (time / distance)

print “So, your speed was %f miles per minute and your time per mile was %i” % (speed, time_per_mile)

Obviously all of this could be improved, but for my first two weeks, I’m getting started and I’m thankful for that.

So, I’m going to keep working through LPTHW and keep attending that Noisebridge class and now I have Think Python to read through. I’m excited to be getting closer to being able to write code that will help me do things easier and open up more possibilities for my daily use of computers.

Email me when Uriah publishes or recommends stories