Goals: Learning Python and Regular Expressions

'Learning Python', by Mark Lutz

'Mastering Regular Expressions', by Jeffrey Friedl

I don’t want to go all 7 Habits of Highly Effective People on you, but I’ll say this: I think it’s good to have goals and to work towards your goals.

I like this quote, which I’ve seen attributed to Zig Ziglar:

“Most people fail to reach their goals not because their plans are too simple or too complicated. Most people don’t reach their goals because they’re not committed and willing to follow their plans.”

I think that’s very true. There are so many things I haven’t done because I didn’t follow through on a plan.

What this means for you, loyal reader, is that one of the reasons I’m not accomplishing the goal of writing more for the web site (including a write-up of my trip to Boston for the FSF meeting) is that I’m working towards other goals of learning Python and more about regular expressions.

These two books are great:

(Not trying to hide anything: These are Amazon Affiliate links. If you buy through them, I’ll make a few pennies!) :-)

I’ve had Mastering Regular Expressions since 2006, and although I started on it with interest then, I eventually set it down and found that a year and a half went by before I began thinking about it again. I received Learning Python in December 2007 as payment for a Free Software Magazine article and started working on it over Christmas vacation, but then it fell by the wayside for a few weeks.

This often happens with technical books. I rarely work all the way through them. Something else comes up and they become relegated to the reference shelf. I also learn a lot by doing and using the Internet to figure things out as I go, but I like following a more structured approach if I can find a good book. It can help with getting a solid introduction and learning some good habits.

I didn’t want to let Python slip away. It was fun. I wanted to keep learning.

A Simple Plan

So I decided on a simple plan. My goal is to get through two pages a day in these two books. I have a calendar printed out that has the months arranged by rows (see: “1 Page Color Landscape”), and I’m marking down my current page numbers at the end of each day.

Two pages a day? That doesn’t sound like much, you might be thinking. I agree, but it’s a plan I may be able to follow. The Python book is 645 pages, and the regex book is 484. I can finish them both in less than a year. If I had followed that plan for MRE in 2006, I would have long ago finished it. (And I can skip some parts, like the .NET chapter in MRE.)

I find that the calendar helps with my motivation. I want to fill in the little squares each day. The other night I had cracked the regex book but not Learning Python, and even though I was tired, I opened it up and read a couple of pages. (It helped that they were descriptive pages and didn’t have examples to be experimented upon.)

And of course, once you get the ball rolling with a plan like this, you end up doing more than two pages a day. Since starting to mark my calendar a week ago, I’ve worked through 50 pages in each book. The key is to make progress every day. (Or very nearly every day.) Keep your head in the material.

It feels good to be accomplishing something. But alas, this kind of focus crowds out other things, like writing here.

The two books tend to complement each other, since I use Python for experimenting with regular expressions. The Python book barely mentions regex, so it’s a good opportunity to poke around in the Python documentation and learn my way around the help system there. I was going to end with a Python function I created today for regex testing, but seeing how long this grew, it’ll wait for another day and its own entry.

Related

If you enjoyed this article, please subscribe for free!
Via the atom or rss feed, or enter your email address to get updates when new entries are posted:
(Your email will not be shared nor used for anything other than sending new posts. See the policies page for more about subscriptions and privacy.)

You can skip to the end and leave a response. Pinging is currently not allowed.

Comments

  1. Very true. I have started learning Python myself, and what I have discovered is that not working on it for even one day, for whatever reason, is enough to break the flow :)

  2. Yep, and if you let days and weeks go by…

    It’s better if you’re actively using the language while learning it, but I don’t have a lot of opportunities with Python at the moment, so I just keep plugging along in the book. And as I learn more, I see more opportunities for it, of course. :-)

  3. >>It’s better if you’re actively using the language while learning it
    Exactly.

    I was trying out the exercises here
    http://www.knowing.net/PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx

You can follow any responses to this entry through the
comments feed.

Say Your Say

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

By submitting your comment here, you agree to license it under the same Creative Commons Attribution-ShareAlike 3.0 License as the movingtofreedom.org web site. Please see policies for more information about comments and privacy.