Tuesday, June 10, 2008

Not Dead Yet

The Web Crawler project is not dead. I'm fumbling computer hardware and software right now and making my best attempt at keeping up with school. Oh, and I have a job.

I have started hosting the project on Google's servers so that other programmers may join me in this. I haven't allowed access by anyone yet as I may not want help. The code, however, is available there (I think). Try looking at the rehbergwebindexer project if you wish. I don't think there is even any code in the source file yet; just commenting.

Consolidation

I'm sitting here this evening with a MacBook that has slowed to a crawl. It further delays my inevitable completion of a school project (fine with me), but I really just want to finish what I'm doing (not the school project) and go to bed.

It's not the MacBook. It's the parasite I installed on it.

For the past month, I've been juggling the Vista desktop I use at home for development, the Vista notebook I use for school, the Windows XP tablet that I have for my day job, and this wonderful MacBook that doesn't have many applications I actually use to produce things. It's cool to blog with it, chat, and play with the camera, but it's really just eye-candy. I can't do schoolwork with it (they require Office 2K7 documents), I can't find an FTP program for it, and I really can't figure out how to edit raw text - a very important feature I need to edit HTML and do programming.

To combat my two-computer dining room table, I installed Windows (the aforementioned parasite) on the MacBook using VMWare's VMFusion. It's a wonderful piece of software and it is very similar to Parallels, only cheaper ($40 vs. $80). I installed the trial of VMFusion, and an old copy of Windows XP. It has effectively slowed my MacBook to where it takes a full eight seconds to open a new tab in Firefox. It's working really hard right now on installing SP3, and I'm sure a slew of updates are in store after that is finished. It has Office 2007 and I shouldn't need much more to do everything that I need to do on this beautiful 13-inch MacBook.

The cool thing is that if I ever get really sick of the reduced speed, I can close the Virtual Machine and Windows goes away like a little troll in the closet. I feel powerful.

Okay, I know it's slow because I am only running 1GB RAM on this computer with two operating systems running. A fix (4GB) is on the way. After the updates and the memory upgrade I should have no problem. I might even install Ubuntu on another VM.

Must go now; I have to write a post to tell everyone that the Web Spider project is not dead - I'm just busy.

Thursday, June 05, 2008

School of Ben

I'm attending school online, and while that doesn't seem very prestigious, it did present me with an idea this morning which I probably will not be able to digest very completely here this morning.

I can teach. And I can learn at the same time. I will post questions here for my readers to solve, and when they answer in the comments we can have a discussion, m'kay?

I started this post in the morning, and now it's late at night. I have forgotten the question I was going to ask. At least now you know my intent and you will know what your mission is when I choose to send you on one.

Friday, May 30, 2008

Wednesday, May 28, 2008

Break Time

I've sworn off the web crawler project for the week. I'm in North Georgia until Friday; I intend to ride my motorcycle and relax at the Bed & Breakfast I have enjoyed so far. I didn't bring any books related to the project (the bike was packed already) and I have to get some schoolwork done.

I might be hanging out listening to the rain tonight, but that's fine with me. As long as I can get home Friday, there won't be a problem. I want to ride some in the mountains while I'm here, but a friend is taking me to Athens tonight if the weather permits and it will probably rain Thursday. Friday I'll go home, likely without really hitting the curves up here. It was a nice ride up Monday; really good practice for the trip in September.

Back to "work" now.

Monday, May 26, 2008

Some Books

I got my courage up Saturday and ordered the books from O'Reilly. This press has long been highly regarded by technologists, whether they are programmers, IT professionals, or just geeks. Go ahead - ask a geek if he/she has a camel book, and chances are they'll know what you're talking about (and it will be within reach). Don't tell them what it is if they don't know.

I'm posting this to chronicle my efforts to build a web crawler and eventually a search engine. I expect to make further posts about how this project develops, and perhaps what I've found in these books that helped.

I have ordered three books. I went there for one, but there's always a deal to get three for the price of two, plus free shipping. And I can always find another book to get. So:

Perl & LWP. This one I've borrowed before, and it opened my eyes to the possibilities of automated web surfing using Perl. I built a small script one time that looked up my SMTP server's IP at spamcop, then e-mailed me if my mail server was ever blacklisted. It was fun and quite easy, but since I can't find that script right now I'll have to post it later.

Spidering Hacks. I ordered this one for obvious reasons. This book's excerpts is where I found that little bit on needing my spider registered. I expect to learn a lot and become very frustrated with what I find here.

Perl Cookbook. This was the third choice because I needed three. Also because it's $50 and I could use the discount. There apparently is a series of "cookbooks" that have really cool stuff (recipes) in them. There is also the PHP Cookbook, the C# 3.0 Cookbook, and more. I expect to find shortcuts and things I'd never thought of in this book.

Sunday, May 25, 2008

Light Reading

I'm taking a class right now on software requirements engineering (does one actually engineer the requirements, or did they just want to make this class sound hard?) and I came across something I might use with the web crawler project.

In the chapter about "The Software Process" which talks about the processes necessary for an individual or team to succeed at building a quality piece of software or system, I came across the Personal Software Process, or PSP. The book simply states that every developer has a process, whether anyone can see it or not. Either way, there is a proper way to go about producing software at a personal level, and here is the gist (Pressman, 2005, p.37):
Planning. This activity isolates requirements and, based on these, develops both size and resource estimates. In addition, a defect estimate (the number of defects projected for the work) is made. All metrics are recorded on worksheets or templates. Finally, development tasks are identified and a project schedule is created.
High-level design. External specifications for each component to be constructed are developed and a component design is created. Prototypes are build when uncertainty exists. All issures are recorded and tracked.
High-level design review. Formal verification methods... are applied to uncover errors in the design. Metrics are maintained for all important tasks and work results.
Development. The component level design is refined and reviewed. Code is generated, reviewed, compiled, and tested. Metrics are maintained for all important tasks and work results.
Postmortem. Using the measures and metrics collected (a substantial amount of data that shoul be analyzed statistically), the effectiveness of the process is determined. Measures and metrics should provide guidance for modifying the process to improve its effectiveness.
I'm not sure if what I'm doing will fit into this personal model of development, but it's thought provoking. Even if I don't collect data about what my problems might be and then analyze the data about what actually went wrong, I can still hold myself to some kind of process. Even though I don't have a deadline or an antsy customer to deliver this to, I can possibly eliminate shortfalls if I just think it out before delving into code.

But then what fun would that be?


Reference (in our favorite APA format):

Pressman, R.S. (2005). Software engineering: A practitioner's approach. New York: McGraw-Hill.

Friday, May 23, 2008

Executive Decision

After toying with C# today, I've decided that it is way to process-intensive to write the application on a runtime environment like .NET or Java. What I need is a simple language that can download a page, rip through text like a bandit, write the necessary fields to the database, and move on. I can organize the data when the search engine extracts that data.

I can't commit to anything yet, but my spidey-sense is telling me that the crawler will be written in Perl with LWP. I suppose I could look at Ruby, too, but I already have my Camel book and have worked with LWP before. I haven't tied Perl to a RDBMS, but I have done it with PHP and it must be similar. Perl can also do some limited recursion from what I understand, and if it can't I may can use a database back-end to save the stacks of URLs.

I was ready to buy books at O'Reilly today (I chickened out of spending the money) and found a book on writing spiders. From the preview I surmised my crawler/spider must be registered. That means I have to go mainstream, doesn't it?

And now after some more reading, I have discovered that this crawler can be used to build an index for special purposes. I can build my own search engine for this site, for example, and get much better results than I can searching the Google index for benrehberg.com. I have searched for things I know I wrote about, but never found them with Google. Building my own search engine and maintaining my own index of the site can prove useful if I keep writing about programming.

Update: I have created a new label "Web Crawler" for all posts related to this project.

How to Write a Search Engine

It seems a bit strange using the world's best search engine to find out how to build your own. Google is my first resource in this project, though Google itself provides nothing but the idea. There is a paper at Stanford by Larry and Sergey, and that basically is the starting point. That is Google's only contribution so far aside from the many searches I will perform.

There are three main parts to the search engine: the crawler, which tirelessly captures data from the web, the database to hold everything, and the actual search engine - the queries that put the data together in a meaningful format for you.

I could write a search engine that actually crawls the web looking for my search criteria, but that is very VERY inefficient. Google (and many others) have solved this inefficiency by effectively downloading the Web (that's right - as much of it as they can) to their computers so it can search it much faster and have it available in one place. They've done a whole lot more to increase efficiency and effectiveness of searches, but downloading the web was the first thing they did. It turns out they needed a lot of computers.

I'm going to start with two. I have three desktops that no one wants to buy, and I am really tired of looking at them. I will probably need more if I get this index working soon, but there will be software considerations to make too. You can't fit the web on one computer, no matter how big. I will learn a lot.

I have always had an interest in distributed systems and cluster computing, so this will be fun. I have a lot to learn about distributed databases and algorithm analysis. But all that is later - I haven't even really finished thinking out the preliminaries yet. So one development/crawling machine, and one database machine. After I figure out how to crawl the web, I will begin work on performing searches. If this project holds my interest long enough, I might publish statistics at 49times.com, so keep looking. I will be posting here if I come up with anything worth publishing. I'm going to try to journal my progress and decisions without publishing code, but I realize that I very well could lose interest in this. If I get started, I will likely enjoy it and keep going, but no one can say. If you have some confidence that I will continue, you can subscribe to this blog and get the updates. Beware, though, that you'll get everything else I write too.

Wednesday, May 14, 2008

As a Student of Software Engineering,

from the stories I hear about glitches and compatibility and poor project management, this is friggin' scary.

Friday, May 09, 2008

Good Times


I realize we probably looked like a couple of homos walking down the beach, but my reunion with Scott was great. We drank, but not enough, and we didn't get tattoos either.

Just more reasons to do RAGBRAI together in 2010.

Thursday, May 01, 2008

Uh-Oh.

49times.com is down since yesterday. You know it's on that powerful box, and I think it took the grid down for a few seconds yesterday when traffic was high. I can't tell yet, but I think there might have been as many as 2 simultaneous users, overloading the system.

Actually, the power blinked and I'm not home to restart it. Friday night is the soonest; I know you guys can't wait, but we all need to suffer a little bit for the cause.

Thursday, April 17, 2008

And I'm Spent...



It is working. After a long battle all day yesterday (and giving up on Apache), Ruby on Rails is running. The rest of my configuration is yet to be done (no database yet), but all in good time. Take nothing for granted: this is a very powerful server. Here are the specs (and yes, it is 2008):

Fedora Core 8
450MHz Pentium II
512MB RAM
10GB HDD

Should serve very well for the amount of traffic I expect at 49times.com.

Monday, April 14, 2008

Should Have Been Mine

An article in the Washington Post today caught my eye. It's about a web-based startup called WEBook that lets authors collaborate on a novel and they all make money when it's published. Some of the books will be sold through Amazon's on-demand publishing and some sold directly at Barnes & Noble stores.

For some reason, this sounds really familiar. I don't know why, but it may be similar to an idea I had several months ago. They probably had the idea at that time, but they were smart and got a company going, with investors and everything.

Which leads me to believe that I in fact do have good ideas from time to time. No one batted an eye when I mentioned a community-written book, and now a few folks are living it up in Mountain View with their good idea. The model can last so long as there are serious players writing there. My brother could benefit from something like that.

Now, what to do with my next big product of random thought before someone makes a corporation out of it...

Tuesday, April 01, 2008

Never be Late Again

With Gmail's Custom Time, just make up an event in the past and say it happened. It's that easy!

You may even figure out a way to win last week's lottery using the Custom Time API! I'm going to create an app for Android so you can even keep a little slice of your own time in your pocket (coming the second half of 2008). But when that happens, I'll have had it since 2005.

You guys are way behind!

Monday, March 17, 2008

Gimme a Minute...

I used to get a locally roasted and flavored coffee called Highlander Grog downtown in Colorado Springs. It was always a special time when I was able to get it. I took a thermos of it to Literature class on Friday nights, sat up in the morning and drank it, and winter was the best season to have some Highlander Grog. Even more special were the times the coffee shop was actually brewing it, and my daily coffee turned into an aromatic treat.

And then I moved to South Georgia. You've heard enough about my regrets of this decision so I won't bore you with that. But down here, there are quite a few people who haven't even heard of the television show Highlander, or even muttered the word before. They think they know coffee when they get some bag at the grocery store that says "Gourmet" on it. They have no idea.

My parents took a road trip up the East Coast in late 2005 and discovered Intercourse Canning Company in Intercourse, Pennsylvania. Guess what flavored coffee they have!

So every once in awhile my mom orders coffee from there. This morning is the first time in over a year I have smelled that familiar aroma that takes me back in time. I stood at the coffee pot a few minutes ago with my eyes closed, and I could almost see my Literature instructor talking about Othello. I could feel campus around me. I was back to a happy time, long ago.

So to combat this, I'm sitting at my kitchen table in Adel, Georgia, with a cup of Highlander Grog under my nose, waiting for my daughter to wake up. I can enjoy my good memories from time to time, but that never means I have to stop making them.

Monday, March 10, 2008

Good Point.

Barack Obama doesn't like the VP idea. From CNN:

"'I don't understand,' he said. 'If I'm not ready, how is it that you think I should be such a great vice president?'"

Friday, March 07, 2008

I Think She Knows



This isn't me, by the way. It's John Mayer. If it won't play here, it might over there.

Tuesday, March 04, 2008

Bono:

"The less you know, the more you believe."

That got me going this morning. I love it!

Monday, March 03, 2008