Monday, April 21, 2014

OMG

Get ready to be inundated with all the details for my project for the Gnome Outreach Project for Women.

Ok. now off to re-read Scott Hansleman's blog on Being a Phony. I'll have more to write tonight.

Tuesday, April 8, 2014

Do Not Despair

As written on the back of a cardboard bailing machine in the stockroom of [name withheld] Pharmacy:

Oh, ye of little hope,
Do not despair.
For there's greatness in you
Beyond compare.
With hard work and some luck
You will get there.

Friday, April 4, 2014

There's Something To This After All

In a tiny blog post waaay back in January, Mind Your P's & Q's, or Rather, Your I's & You's, I mentioned the beginnings of an idea for a crude method for predicting the popularity of a blog, based solely on the ratio of references to the writer (writing "I" or "me", etc) to references to the reader ("you").  I wrote a little word counter in Ruby and then quickly lost heart in my little idea and got caught up in something More Important.

Early this week, I came across a post called "Our Best Feature is Our Worst Feature" by @Thinkup co-founder, Anil Dash.  In his post, he says that one way his company demonstrates to its users the value and importance of their social media presence is to track (and report) the number of times they talk about themselves on social media. It's called the "All About You" insight and a lot of it boils down to the percentage of their total posts, tweets, etc. that refer back to themselves. (The meat of the article discusses the difficulty in making an uncomfortable observation - ie, "Wow, you sure talk about yourself a lot!" - into an engaging, helpful story that Thinkup users will pay for. It's a great post, you should read it. I'll wait.)

The beginning of the post is what caught me, though. I had pretty much abandoned my idea because, well, it was just my idea. I thought it was one of those ideas that look great in the stage lights of your head and then ridiculous in the sunlight. But clearly it wasn't. Brilliant, accomplished people had similar ideas and ran with them. I didn't get there (read: anywhere) nearly as quickly as Thinkup did (they clearly thought about this long before I did and built it into their business), but I'm also not completely off the track either.

Today's moral: if you have an idea, do something about it. Better to find out it's a bad idea than to kick yourself for not doing something with it. I wouldn't have beaten Thinkup to the market or anything like that. But perhaps my next idea can actually go somewhere. The first step is to actually put my key in the ignition and see where I can drive it.

Tuesday, April 1, 2014

April Fool's Day

I'm thoroughly enjoying some of the posts for today. My favorite so far is from Code For America:




I'm thinking of applying. With my luck, though, I'd get Nightvale. Bummer.

Monday, March 31, 2014

Shamed by a Tweet

So I was la-la-la-ing along, working through The(Terrific)OdinProject curriculum online and saw this on Twitter just as I was shutting down for the night:


And I started counting how many of my posts were all about how I'm going to blog every single day!

Yeah, about that. So.

I'm not going to blog every single day. But I'm blogging right now. :)

I finally have a Linux machine. (I've got a new-to-me laptop with hardware ...including DVD player/burner!... that will allow for a partition and dual-boot option.) It's wonderful and I wish I had been able to do this sooner. :) Once I had hardware that could handle it, it was a total breeze!!

I'm using The Odin Project as a curriculum and attending (through Hell or high water) the next Railsbridge event this month. I've applied for the Gnome Outreach Project for Women (results are announced on April 21st) and I'm working on getting a team going for Rails Girls Summer of Code. My first website after Railsbridge will be my FixMyList idea. (FML, you see what I did there?) :D

That's enough for now. :)

Tuesday, February 11, 2014

Overcoming Obstacles

Or, the day I felt like Thomas Edison.
"I have not failed. I've just found 10,000 ways that will not work."

Repeat visitors may recall the pledge I made to apply to the next round of the Gnome Outreach Program for Women. You may also recall a major stumbling block was the fact that my (rather old) laptop runs on Windows and lacks the hardware necessary to partition the drive and run Linux alongside it. For many reasons, including the apparent electrical death of the family's main PC over the weekend (I'll come back to that in a minute), I can't just kill Windows on this machine.

Since Friday, I've spent the all of my spar(s)e time attempting to set up a virtual machine. I started with a very helpful article on MediaWiki.org called How to Become a MediaWiki Hacker that I found through OpenHatch.org. I really thought I was getting somewhere!
So I started downloading. The list was short (Vagrant and VirtualBox) but the files were rather large. And I was still trying to make Cygwin work so I could get through the rest of the OpenHatch training missions (pro tip: Patch is not installed by default and you really have to dig to find it.) And Vagrant wants to cut all of your network connections during its install, so it had to wait a bit.

Several interruptions later, I finally finished the downloads and installs and opened up VirtualBox. I spun up an Ubuntu VM and then it demanded the Ubuntu OS which was not included in the install. Of course. So I got Ubuntu, saved it to my little jump drive and ...

VirtualBox apparently will only allow the OS to boot from a DVD. Several more interruptions later (including the whole family hunting down an odd plasticy-burning smell which turned out the be the machine I had downloaded all of this on), I restarted all the downloading and installing on my little laptop.

That's when Windows helpfully warned me that I have only 399 MB left on my hard drive. So I spent a few hours last night deleting and un-installing every bit of cruft that I could find. I successfully freed up about 14 GB. And this morning, I started again. Installing, loading, popped in a DVD to burn a disc image of Ubuntu and ...

I kept getting weird drive errors. The system kept complaining that Error code: 0x80004005 occurred.  A quick Google search led me to a Windows repair tool. So I ran the tool and it couldn't fix the problem. I tried again with a different DVD. Nada. Finally I tried a blank CD. Success! I could feel a little smile starting in the corners of my mouth when I tried again with the DVD. That didn't work. Finally I tried to simply play a DVD. That wouldn't work either. That's when I started to get suspicious.

After some digging around, I found the detailed properties for my drive. (Is that a spoiler?) It's imaginatively named "DVD/CD-RW Drive" but when I looked at the manufacturer's name, it said "CD-ROM Drive." The cute little DVD icon is on the front of it, but it is clearly only a CD drive.



So, here I am. It's now time for me to go to my "day" job. I haven't pushed anything to GitHub. I haven't gotten email working on the Splash page. I haven't even finished that tutorial I was working on (I killed Cygwin, optimistic that I was going to get Ubuntu working in the VM.) But, I have found 10,000 ways that this won't work.

Tomorrow, I may find the 10,001st. I hope not, though.

Edited to add:  And then I found this!!  In short: RTFM! I'll have a sequel to this post shortly. (Ok, long-ly. I'll be honest.)

Wednesday, January 29, 2014

OMG It Worked!

So what did I do wrong? :)  I'm half-way between the two points on this comic:



Here is part one of the second iteration of my word count script/mini program:

word_count = {}
File.open('test_input.txt', 'r') do |f1|
  while line = f1.gets
    words = line.split(" ")

    words.each do |word|
      word = word.downcase
      if !word_count.has_key?(word) #word not in hash?
        word_count[word] = 1        #add it and count it
      else
        word_count[word] += 1       #only increment count
      end                           #if it's there
    end
  end
end


Next up, I need to figure out how to feed it html pages. I could just feed it straight up html files, but I ultimately want to word count blogs and such. On to the next!

Sometime later, we rejoin our hero:

So I added a line to allow me to alternatively feed the wc any file I like via the command line:
File.open( ARGV[0]? ARGV[0] : 'default.txt', 'r' ) do
I'm using ARGV[0] ? to check to see if there are any arguments sent along with the request to run the script. If there are, we use them. If not, we use my creatively-named 'default.txt' so that we don't blow a gasket and throw an error for not having anything to work with. I snagged some HTML from a random website and fed it to the wc program.

Next up: parsing out the tags so that all we're left with is the actual content of the site. After that, I need to figure out how to get the generated HTML in the first place. I've heard of screen scrapers (and usually not in a positive way) but I think that's what I need to build here. Ultimately, I would like to give this little program the urls for two different websites and have it compare the two. I'm a long way from there, but it's nice to have a goal. :)