better living through python

An adventure in programming and recovery.

The Mechanical MOOC

October 15, 2012

Today starts a new, coordinated, opportunity in online learning called The mechanical MOOC. This is particularly interesting and important, because it’s the first full on collaboration of online learning that includes P2PU (Peer to Peer University), MIT OpenCourseWare and Codecademy. I’m taking part!

The course is ‘A gentle introduction to Python’. As some of the recent emails I’ve received have noted, it will be using a smattering of various online free educational resources in order to provide lesson and lecture materials.

They’ll be using the MIT OCW Intro to Computer Science course, of which I’ve completed about half. They’ll also be using some of Codecademy. To prepare I’m hoping to get some python course work in on Codecademy before the MOOC starts up. Then I’ll have sufficient experience with most of the sites they’ll be using, so the entire experience should go smoothly.

One thing I will have to work on… using forums and my peers to enhance my education. Mostly I just chat with friends online, I’ve never been a frequent participator in online forums or QA sections.

I will also have to work on NOT relying on Robey to answer my questions for me. I will be doing my utmost to simply ask questions and seek answers through my online peers. Definitely difficult, by no means impossible.

Woot, woot, all forward with the Mechanical MOOC!

An Emotional State of Things

October 02, 2012

As I mentioned in one of my recent blog entries, I was recently hired on full time for the company I was moonlighting for. Now I’m simply moonlighting for FlamingLunchbox. Life is busy. Life is good.

Considering I’ve just been hired on as a permanent employee, and it’s my first permanent position since my previous job which inspired me to take this journey, I felt it was nigh on time to reflect on where I am now. It’s also been about a year and a half since I left the company which gave me a sick feeling in my stomach for almost 9 months.

Reflecting on my recovery brought me back an old entry where I explored What it means to be recovered?. After reading about how I felt only 6 months ago I realized just how much has changed in my life. For quick reference, the definitions of ‘recovery’, as used in my February entry.

Definition: to regain strength, composure, balance, or the like… Medical Definition: the person has developed a personal sense of hope and empowerment that wasn’t there before.

First major difference I’ve found is that when I see former coworkers from this place of work I’m happy to see them. I try to wave or smile their way. I feel anger at my former boss, but it’s not the rage it once was. I still wouldn’t mind punching her face in, at least in my imagination. I think that’s only because I want some kind of retribution for what happened to me and how I was made to feel. But, be it age or simply time, now I would rather just keep on keepin’ on. I would rather continue to live the life I love and enjoy.

One of the major differences for me that’s happened, is being hired on as a permanent employee. From that comes being financially stable. Having the ability to pay your bills every month greatly increases your ability to handle any situation, and oh boy have I realized how much that’s made a difference.

I definitely feel a sense of hope and empowerment now that was not there in February. I wake up and I want to be up and doing things. I am building on awesome projects I love, and they’re getting bigger and better. Robey and I are taking a trip to Germany (have I mentioned this yet?), for the ENTIRE MONTH OF DECEMBER. It’s going to be glorious.

I’m also starting to feel confident in my abilities with programming. I’m almost finished with the javascript basics on Codecademy and I’ll be working on learning python again here in October. Feeling excited about learning and feeling good about it, it’s like eating an entire meal you plucked from your garden, gratifying and satisfying. So what are the major differences between February and now? Time, money, pride, confidence, pending trip out of the country, and life is awesome in general.

The Canvas Element

September 28, 2012

We are working on a new game here at FlamingLunchbox, called Enceladus. It was originally developed for the js13K Game Development Competition, however when it came down to it we just weren’t happy enough with our game to submit it. It’s still an ongoing project, so expect posts and other information about it in weeks to come.

I’ve been learning a fair amount about how to use canvas for this project. Canvas, or the Canvas element, is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It basically allows you to create images by giving it coordinates, pixel lengths and widths, color variations, among many other things I’m still learning about.

I’m actually quite surprised how easy it was to pick up after just a bit. I’m still not an artist, but I am starting to figure out how to put these items together using a technology that allows for much smaller sized graphical images. It’s also made me rather interested in looking at creating images for my blog, or adding in other aspects to my text features. It’s not tough and it’s a technology I would appreciate being more versatile in.

But back to our game, Enceladus. It’s the first full-on joint venture attributed to both developers here at FlamingLunchbox. It was awesome to have such a great idea to focus on together. I’ll let everyone know the details when they’ve finished developing.

A Fresh Dawn Comes

September 26, 2012

Back into the breach, Missing in action, no matter which phrase I try to snag to open up this long needed blog post they all seem to be war related. Not that horrid warlike things happened while I was out. Life has simply been rather busy since I was hired for a full time position I was doing as a contractor for a while.

Shipping and Receiving is my current day job. Here I am, this five foot five high girl moving around 600 lb barrels, lugging around 30 to 50 lb boxes, and generally having a good time. Excitement because this means I get to keep up rock climbing strength, until I finally get back to the gym to work on rock climbing.

Up until yesterday however I didn’t even have time to work on programming or the business. It was crazy just how much I missed it. Not getting to work on Codecademy work was particularly saddening as i was moving along so well before.

So yes, a lot has happened in the two weeks since my last blog post. What happened with the 13k js Challenge? Well…miscommunication and honestly a realization that our dreams were bigger than our time frame. We created enough of a game to post, but due to the late hour some miscommunications occurred about the completeness of our game that ended up preventing us from submitting it to the competition. It’s still on our radar, however, and we’ll be putting it out there in the coming months.

I’ve been thinking some about my old place of work lately, more than I have for a while. Hopefully I’ll be getting a blog post up about that soon, but with all that’s going on I can’t promise anything at them moment.

In a couple of weeks I’ll be taking part in the Mechanical MOOC. I’m also helping to manage and organize volunteers for the local Corvallis Great Pumpkin Run. If you’re interested, sign up to volunteer and hang out with me for a Sunday morning in early October. As you can see, life is busy. Life is always challenging, and I’m happy. Always a bit tired, but happy.

Continuing with Codecademy at 68%

September 11, 2012

I’ve been working on the javascript fundamentals track on Codecademy for about, I think, a month? It’s been awesome, my love of achieving gold stars has finally found fulfillment in this educational site. You see…you get badges.

You get badges every time you achieve new things, when you complete lessons, or if you continue programming for days on end. It’s as satisfying as when I was a girl scout, but this time I’m not getting a badge because I’ve been taught how to shampoo my hair correctly. It’s for something that’s actually worthwhile. It also doesn’t make me feel like I’m in some kind of gender specific organization that wants to fit me into some cookie-cutter role.

One of the things I hated about switching over from the educational environment of university life to the working world, was the sudden and harsh lack of feedback. Unlike with school, I wasn’t getting regular feedback as to how I was doing, my abilities, where I stood. It became this ambiguous subject that you weren’t supposed to talk about. At least, not in the places and positions I worked at.

It’s something I struggled with for a long time, which is why Codecademy has found a sweet little place in my heart. I fully support this site and what it’s there for. There are, however, a couple of things I need to note. A couple of things that I feel should be addressed at some point by either the lesson creators or the staff at Codecademy.

Issue 1: When the lesson is checking to see if you’ve done it right, most lessons only verify what the lesson was discussing. Sometimes I know my other code is incorrect, but if certain aspect of it are correct then the lesson says Good Job, gives you the green checkmark, and moves you forward.

For some this may help them to not get too caught up in the details but sometimes for me it makes later aspects of the problem more difficult. Often I have to go back to earlier in the problem to figure out what exactly I didn’t understand there (or did incorrectly), before I can move on. This isn’t an issue with every lesson, but it definitely is with most. Being more thorough about checking for total answer accuracy is definitely needed.

Issue 2: There is no way for the individual user to create their own goals. I’m talking something simple, like being able to say “I want to finish one course a week”, or “I want to complete the javascript fundamentals track by {date}.” It wouldn’t be goals that the user can then get subsequent badges for, but it would allow them a chance plan out how much learning they want to do, and how often. I would like to create a learning plan for myself. I think it’s something that should at least be an option.

Issue 3: This is somewhat related to issue 2, in that there is no way to track your progress. You get a quick overview of your recent activity, but no way to see how much programming you’ve done, when you started, if you had weeks when you went overboard or others when you barely touched any code. Not only would some kind of google analytics progress review be helpful, it could be something interesting for the Codecademy team to push marketing wise.

Make it so the learners basically just share their stats without sharing any personal information, and then Codecademy can post stuff like “Over {so many hours} of programming done!”. In ways, Codecademy could create it’s own set of badges to post. Then, as a user, you would be attributing to the company’s progress, and you could see how your learning has affected Codecademy. I think it would be neat.

Final Issue: I hate hate hate it when I’m working on a problem and I accidentally hit the up arrow key (when I am selected in a particular region I guess) and it takes me to the previous lesson in a course. Half the time I’m working on a problem and haven’t saved in, oh, a minute or so. When I move up to the previous lesson I lose all the work I had prior to my last save. It’s really annoying, and it happens enough that it’s gotten to be a pain.

Suggestion 1: Have sections that are simply going through the process of reviewing the subject matter over and over. Simply review worksheets that people have the option of using to hammer in things like the basics of OOP (Object Oriented Programming). I know for me, that’s something I would use, even if there were basic “{so many worksheets} Complete!” badge.

Suggestion 2: Track how often the learner has to submit an answer before they get the correct one. Allow them the option of viewing that information or not. This would allow individual lesson developers to see where they might be having issues with their lessons, especially from people who don’t bother giving feedback or making comments in the forums. It could also provide the greater learning community some fantastic data about areas in programming that could be more difficult to grasp in general.

Granted I know that part of the appeal of Codecademy is the ease of use. I don’t want the site too overloaded with various data tracking options, but a couple might flesh out a learner’s profile without making it complicated to review. Now it’s time for me to return to my programming education. In the meantime, I’ll be excited to see the continued developments going on at Codecademy.

Update on FlamingLunchbox progress for the js13k Challenge

September 07, 2012

It’s been a long week. Don’t mention the fact that it’s canning season and we have tomatoes being eaten by bugs. Please don’t mention the fact that I haven’t even thought to start our sweet pickles or salsa’s for the year. We’re making a game people! There are more important things at hand!

Everyday when I get home we’ve been doing our best to keep going and work on our game for this js13K challenge. There have definitely been a couple of days where working on the game hasn’t happened as much as I’d liked.

Most days I honestly went home and ready for at least 2 to 3 hours. Subsequently I’ve read about 2 or 3 books from the True Blood series. Yes, I said it, True Blood. What of it? Sometimes a girl needs to succumb to a vice once in awhile (Which I think I’m partially quoting the main character Sookie on this).

Despite our best efforts, Robey and I will be doing our best to program tons over the weekend in an attempt to get as much of the actual gameplay and generated landscape, creatures, and items finalized. That will leave us with the earlier part of the week to finish up any quirks or stylistic issues.

Did I mention that a good friend is having a seafood fest this weekend that we’ll be attending? Or that we’re meeting with some cool people to talk about programming on Sunday. I also have to find time to go to the Annual Renaissance Festival that occurs this weekend. Okay, so I’ll be programming as much as I can get in this weekend. Robey may be more lucky than me in that respect. He won’t get to see knights on horseback joust though…

What is % Mod ?

September 06, 2012

When I first started to learn programming one of my first coding projects was one the old MIT OCW Intro to Computer Science and Programming courses. The course itself has since then been drastically updated, and is much more accessible at this point. Back then the problem was to determine all the prime numbers between 1 and 100 using a simple piece of python code.

Everything up to this point had been cake. Without too much stress or mind-bending I was cruising along the OCW programming course. This problem was difficult. I remember, at one point, almost crying in front of the computer because I was having serious issues knowing how to put together a solution to this problem.

The sad part is, I know what my problem was now, and it was such a simple one. I really didn’t understand what % Mod meant. I understood that it had something to do with division, but the rest I think went in one ear and out the other.

Mod, or %, is a symbol that provides with you a remainder. For example:

4 % 2 = 0 8 % 2 = 0 15 % 5 = 0

All of these equations result in zero, because when you mod 4 or 8 by two, the division is exact and there are no remainders leftover. This is the same for 15 % 5.

5 % 3 = 2 15 % 4 = 3

If you mod 5 by 3, well 3 only goes into 5 once with a remainder of 2. Subsequently if you mod 15 by 4, 4 goes into 15 3 times with a remainder of 3.

Because I didn’t understand this simple aspect, finding the best way to determine a prime number seemed, and I think I’m quoting myself here, ‘so hard.’ Because a prime number is something that isn’t divisible by anything, when moded (is that a word?) it should always produce a remainder. I think you can see where this is going. Basically using mod makes it very easy to identify prime numbers, because you would simply go through each number from 1 to 100, check if each of them produces a remainder when modded by each number of 1 through 100. If it does for each, then, as far as we can tell, it’s a prime number.

Symbol-shock can be killer. Push through it anyways.  

A little more awesomeness in daily life

August 31, 2012

I sometimes think that the best things in life aren’t the ones we’ve known about for years, or the dreams we’ve had since (we were) fanciful children, but the ones that can drop in our laps unexpectedly. That’s what happened to me with programming, and it’s been one of the best things to happen in my life.

This quote was part of a response I wrote to one of my betterlivingthroughpython followers recently (an awesome guy, who wrote me an email, which was awesome (as only an awesome guy could do)).

Anyways…for me, for many years, I had always been hesitant to look into sudden interests I had. I was always concerned that looking into a field or hobby more intensely wasn’t always the best use of my time. I needed to focus on what I was already good at, not segue into another area altogether.

Often this prevented me from taking paths that might have led to other fantastic lives I might have lived. I don’t regret not taking any of them; I would never have arrived at this point without making the choices I did. But now I get to use all of my experiences from when I studied abroad, when I studied German and Medieval Studies and life in general, to influence and increase the depth and versatility of my burgeoning programming skills.

Okay, perhaps I’m getting ahead of myself. I’m still a novice, I’m still learning, but more than ever I see how changing my life has only added to my happiness. I wake up and I’m excited to program. I’m interested in the things I’m going to create. I may not have artistic talent, but I have found a medium where I can express myself.

Don’t be afraid of hard work, sometimes the scarier things are the ones worth doing. Ask yourself, what would I be doing otherwise? If the answers seem boring and uninteresting, and ‘safe’, is it really worth it? Is safety worth all the experiences you’ll keep yourself from having?

I think not.

An oddness about programming languages

August 29, 2012

One thing that I find, quite honestly a little infuriating, is that most programming languages have different vocabularies for the grammatical structures within their language. Of course they have different terms for the different grammatical structures, it’s that many of these grammatical structures continue from language to language, yet are named differently.

Within spoken language, linguists have created a basic terminology one can use to reference similarly acting ideas that exist within all languages. Within programming languages, the differences are small and yet the builders of these languages feel it necessary to continue to reference things differently, which only adds to the confusion of the learning programmer.

There is, what those in computer science will call data structures, which provides a basic terminology similar to the noun, verb, adverbiness of linguistics. For example, objects in javascript are very similar to dictionaries or lists in python are called hash tables within the basic terminology of data structures.

I guess, as a part-time translator, I’m looking for something that will allow me to use a generic term that I know (noun, adverb), and be able to more easily understand what’s going on in the language I’m learning. However it seems that most online learning resources teach you in the terms of the programming language, not the general terminologies of data structures.

I would suspect that this difference has more to do with the age of most programming languages versus spoken languages. Dictionaries for spoken languages became in vogue back in the mid 1800’s. Considering the lifespan of spoken languages, I guess it’s okay for programming languages to be not quite there yet. This is, as well, all dependent upon your defining programming languages and spoken languages to be similar enough to warrant the same kind of organization of terminology.

Which begs the question, why are programming languages defined using the term ‘language’? What are the differences between a spoken and programming language? This brings me to an interesting blog entry I found when looking up that very idea, called A Brief Study: Spoken and Programming Languages

If/else blocks, the switch statement and ternary operators

August 24, 2012

Earlier this week I was coding on Codecademy, and I learned about a couple of alternatives to the normal if/else conditional statements. The first is the switch statement.

The switch statement allows you to collect all of your conditionals into one large grouping. The syntax is similar to a function.

*var variable = "something";
var result;

switch (variable) {

  case "option1":
    result = "result1";
    break;
    
  case "option2":
    result = "option2";  
    break;
    
  case "option3":
    result = "option3";
    break;

  default:
    result = "Nothing matched my available options";
}*

You start by setting up your initial variable, and then you create an empty variable termed result. The switch statement is coded like a function in that you have the name switch two parenthesis and then open curly brackets. Each condition section I like to think of in this manner. In the case of option1 the result is result1…and so forth. In many ways it’s also like an array.

I found the switch statement to be an interesting alternative, but I’m not sure how useful it is. You can do pretty much do the same thing by using an array in javascript, with the array being even more powerful in usefulness. In Robey’s mind, the switch statement is really only a relic from before people used functions as a way to split things up. Just thinking about what that must have been like is making my head hurt…

The second alternative presented was the Ternary Operator. The ternary operator basically gives you a more simplistic way of coding an if/else condition within your code in one line. A normal piece of code might look something like this:

//Typical if/else block
var variable1 = something;
var variable2 = somethingelse; 

if (variable1 === variable2) {
  result = "good job";
}
else {
  result = "bad job";
}

//Here is the ternary operator
result = (variable1 === variable2) ? "good job" : "bad job";

As you can see, it basically shortens things up significantly. It does, however, look incredibly different from most code. It’s so very different, that unless you’re very comfortable with them they might be very easy to miss when reading through code. If your code becomes complex and large, it could cause more problems than they’re worth.

Sorry for the extra long post today, but don’t fret! Pictures of vacation to come on Monday :)

Links