This blog no longer exists.
You will be redirected to something cool.

Sunday, September 25, 2011

Plugging Along; Hashes Next

Well, I finally completed the homework for the chapter on subroutines. I got help from a programmer friend who was able to decode Perl for me based on his knowledge of other programming languages. The context thing was sort of strange to him, but he understood what was going on enough to be able to be a big help to me.

I was able to complete the homework. Aside from the Internet constantly going out, it wasn't as bad as I thought it would be. I made some mistakes in syntax, but the idea I had was in the right direction, so that wasn't so bad. The quiz questions at the end of the chapter were easy as pie, which, to me, means I probably got them totally wrong (that's how things work for me.)

The next chapter is on hashes which will be interesting. Hopefully that's fairly straightforward. We'll see, we'll see.

Wednesday, September 21, 2011

No, I Don't (Context in Subroutines)

Okay, so I was introduced with subroutines which seemed all fine and dandy. I was actually excited to finally be exposed to subroutines. However, it seriously baffles my mind. The subroutines... cake. Context with subroutines? I want to pull my hair out.

I read the chapter last night and it's the first time in the course where I didn't understand anything that was happening. I read on to see if I could piece it together, but alas I am at a wall. A brick one. Hopefully I'll get it after I muck through it again.

In other news, I went through my articles on HubPages and I either need to actually try to rank for the keywords which I've written articles around OR write more articles. I really don't feel like going around and grabbing up backlinks. That said, none of the articles on my list are anything I really feel like writing about. I'll have to find a way to raise the bar on my motivation when it comes to writing.

Monday, September 19, 2011

I Think I Got It (Context)

Well, I hit the books, so to speak, and completed that scary homework assignment on context in Perl. At first I made a bit of a mistake, but I mucked through it and I think I've got it. My program works according to what the assignment wanted, hopefully I wrote it in a way that works in the way the assignment intended.

I have a few short essays in the chapter to complete, but then I get to move on to creating my first subroutines in Perl. Finally!

Things will be winding down with Perl after the next few chapters and then the course with be over. I'll (probably) have the Python course next. I'll take that road when I get to it (or however that idiom goes.)

Saturday, September 17, 2011

Wrapping My Head Around Scalar & List Context

I've been working on learning the various nuances of scalar and list context in Perl. It seems straightforward, but I am worried I'm not getting things 100%. There is a lot of scary talk basically saying if I don't learn it, bad things will happen. This sort of leads me to believe that this might either be difficult stuff or easy to overlook.

In fact, one example which was an array in scalar context output something I didn't expect. I expected the script to spit out the array in a string, but rather it gave me 6, which is the number of elements in the array. I'm pretty sure I know why, but I'll just have to do the homework to see if I'm really grasping this concept.

Wednesday, September 7, 2011

Yarrrr! Drop Yer Perls

I don't know what the title of this is supposed to mean. Perhaps it's strange because it's 10 'til my bedtime!

Anyway, I have thusly decided to move on with the cert in which I am enrolled, thus I will be learning Python next and not continuing with Perl. There are a few reasons for this.

I would like to learn Python and the other languages in the cert I'm in.

Okay so that's one reason.

Friday, September 2, 2011

Looping in Perl

I just got done with a chapter (and homework) on writing loops in Perl. Surprisingly, it was significantly easier than any other chapter I'd done yet. Perhaps this is due to the amount of time (a ton) learning loops when I first started learning programming (Ruby.)

I also learned about postincrements and preincrements which were (and still kind of are) a difficult concept for me. Eh, I may suck at it now, but I'll get better as I shove along. I also learned about some flow control concepts like last, redo, and next. I only really covered 'last' in my coursework but as I move ahead I'll better understand flow control.

So here is some sample code (in Ruby) that is strikingly similar to some code a friend wrote for me in order to pound the concept of loops into my head years ago. So on to the code:

i = 0

while i < 12
  puts i.to_s
  i = i + 1

And here's how I learned to write this in Perl:
use strict;
use warnings;

my $i = 0;

while ( $i <= 12 )
  print $i, "\n";
  $i = $i + 1;