Oreilly School of Technology

Screenshot-05252015-12:58:47PM

So this is my development environment!  Long live Vi!  Anyway, I’ve been taking the Python courses for the certificate in Python from Oreilly School of Technology.  It’s a good course, and I’m learning a lot.  I’m in the third of four courses, and we’re getting into some of the lesser talked about niches of Python.  In this lesson we’re using Properties and Decorators.  The assignment was to write an Address class that took ‘name’, ‘street_address’, ‘city’, ‘state’, and ‘zip_code’ as string arguments, which must then be set as attributes.  It was up to me to translate them into properties as needed to fulfill the assignment.  But after being set in __init__ the ‘name’ attribute must be read only.  Modifying must trigger an AttributeError.  Zip code must be a 5-digit string, and I had to create a ZipCodeError exception class that gets raised if the zip is not exactly 5 digits.  Likewise, the State had to be exactly 2 capital letters, and had to trigger a StateError exception, which are custom exceptions.  State and Zip validation had to be done by regular expressions, using the re module.  (That’s like my favorite module!)  And then they provided the unittest.TestCase that my module had to pass.  We’re big on test driven development (TDD) around here.  Write the test before you write the code!

I can see that Properties and Decorators can be pretty useful.  If I had been writing classes for years and years, and then found Properties and Decorators, that would be a BIG find!  But, I’ve been taking these classes since November, so I’m sure I’m not appreciating them as much as the guy had been looking for a way to encapsulate his class attributes dynamically for years and then invented Properties and Decorators!

My goal is to get good enough with Python to get a job using it.  And also to contribute to the Linux community somehow.  There are so many directions I could go, it’s hard for me to pick one at this point.  But I’m sure there are lots of projects I could help out with.

Meanwhile, I’ve been trying out some IDEs over on the Windows side, and I guess they’re okay.  But, I guess I just prefer the terminal window.  I usually have a bunch of them open.  They’re kind of like cashews; you can’t have just one.  Consequently, IDEs seem like a pretty thing I don’t know what to do with yet.  So it’s still Vim for me.

Advertisements

Kettle Bells

So this was the last exercise of my workout today, and I tried to rock it.  The camera was rolling, so I thought I had better.  Age is a funny thing; there are times I feel like I don’t want to get out of the chair, but there are other times when I feel unstoppable, just like when I was 20.  Here, I was feeling pretty good.  The juices were flowing.

I don’t have a big opinion on American vs. Russian kettle bell technique.  I just wanted to make sure I was getting a strong hip hinge and that my technique was good, and I gauged that by how high up the weight was coming up.  I assumed that was telling me I was getting a good drive off the bottom of the movement.  Then I just didn’t resist the weight’s upward movement.  I just let it go as far up as it wanted to go.

This is the way to start the day!