Google to the rescue

Filed under: Discoveries, Techie — tylerl [ June 3, 2005 @ 11:11 pm ]

I ran into an interesting problem at work. I found the solution the first place I looked, but was terribly surprised to see it there.

How about an explanation.

The problem is called a “memory leak.” The idea is that a computer program tells the operating system that it requires a chunk of RAM for something; but when its done, it never tells the operating system to take the RAM back. This leads to a situation where, over time, the program continually asks for more and more memory from the OS, and never gives it back. Eventually the resources are exhausted and the system crashes.

It seemed as though one of the programs I had written was exhibiting this very behavior. Over time, the program’s memory usage would slowly climb. And though it would take weeks of uninterrupted use before any definate pattern emerged, the symptoms were clear.

Now, as easy as it is to explain the problem, finding it is a different story. If it were a simple programming error, it could be easily isolated. But in this case, the basic operating logic is slightly different than expected. That is to say, while the program is behaving as expected, the environment in which it runs is different than previously thought; and factors that would otherwise have been harmless are causing the program to behave inapropriately.

So then, how do you isolate this sort of situation? How do you know which one of the thousands of assumptions you made is the one that isn’t holding true? There a technique called “profiling” that give you the data you need to make that determination. It involves keeping track of every time you allocate and deallocate every piece of memory you use. You keep track of which programming instruction asked for it, and when you said you’re done with it. In theory, over time the offending instruction will have asked for a disproportionate amount of the memory currently in use, and you can then see why that particular piece isn’t being given back. It’s a nifty idea, but it sure sounds like a lot of work.

That’s where profiling tools come in. These are tools that are designed to help you keep track of all this information, and more importantly, interpret the results. It’s a pretty tough tool to make, and options are in short supply. This sounds like a job for Google.

While I fully expected a Google search to direct me to a solution, I never thought the solution would be provided by Google itself. You heard that right. Google has a profiling tool. That much doesn’t come as a major surprise–they have plenty of reason to analyze the efficiency of the programs they write. But Google also recently made these tools available for the public. For free.

There’s a website: http://code.google.com, where Google gives away some of the code that they created as a gift to the software community. Most everything there is only of interest to programmers like me, but that’s not the point. The point is that they’re doing things for the right reason. They continue to use their resources to make life a little easier for the rest of us, and they ask nothing in return. They’ve made no attempt to capitalize on most of their creations. What they do get, however, is first prize in the industry’s popularity contest. It’s a bold strategy. So far, the system has served them well.

Contrast that with the business practices of other companies in the computer field. When the Internet was a new and exciting technology, Microsoft’s Bill Gates made the following remark: “I don’t care what the Information Superhighway looks like as long as I have a tollbooth on it.” It’s no secret that the majority of the civilized world distrusts Gates and the company he founded. We know Microsoft just wants our money. And the business practices they’ve used to get it have been found to be illegal in courts across the world. When Google went public, Gates lamented the universally positive press in an interview, saying “You’re not allowed to criticize and say that Google isn’t solving all the world’s problems.” Google is, indeed, one on the most trusted and respected companies in the industry. Even the news media finds difficulty in coming up with something bad to say.

On the one side you have the most wealthy software company in the world and on the other, the most popular. The philosphies of the two couldn’t be any more different. One faces disappearing market share, fines, and legal battles over illegal business practices. The other has seen its stock price more than triple in the past few months.

The Advent of the Blog

Filed under: Discoveries, Techie — tylerl [ April 27, 2005 @ 5:32 pm ]

Every now and then, some new big thing changes the way people look at technology. Often, it’s not so much the technology that changes, but rather the way people use what was already there. The revolution isn’t so much technological as it is methodological. Such is certainly the case this time.

The next big thing in internet communication is the blog. It’s a shortened form of the phrase “web log,” which apparently took too long to say. A “web log,” in the classic sense, is nothing more than a personal log (diary or whatever) that’s made accessible over the web. Now, there’s nothing new about that concept–it’s been around as log as the web itself. I’ve been keeping a sort of running online journal of thoughts for ten years now. After all, what else do you put on your personal website.

However, what’s changing the world isn’t so much the practice per se, but rather the rising popularity of tools that make the practice so much easier. That’s where the blog, in the more contemporary sense, comes into play. See, the term blog today seems to be reserved, not just for online journals, but specifically for journals that are managed by a Content Management System (or CMS) that was designed specifically for managing personal pages. The cool thing about a CMS (and, in fact, its reason for existence) is the fact that it makes data entry a lot easier. Creating and managing web content is so much easier with a CMS that you can spend your time writing instead of moving files around.

Now, the concept of a CMS is also not new. They’ve also been around since the beginning of the Internet, but until recently, few people used them on their own homepages. The time and work involved in setting one up was simply too prohibitive. There’s no money to be made in homepages–especially those telling everyone what’s new with your cat–so the home user wasn’t much of a target audience for people designing these things. Progress was slow.

However, once CMS technology took root in the personal home page arena, the results were astounding. Let me go over the major selling points of the average blog.

  • Adding a story is fast. You can compose content for your blog as fast as you can compose an email.
  • Your audience can participate. Every major blogging package allows readers to supply their own comments in response to your story. Suddenly, the user has a real incentive to write–they know they have an audience, and the audience writes back. It’s like having hundreds of pen-pals.
  • Built-in syndication. A technology that is currently gaining popularity is called RSS (“Really Simple Syndication”). It allows your blog to communicate with client software, like mail readers. People don’t have to visit your website to see your latest story–they can read it with their morning email. RSS aggregators are designed to pull content from any number of sources and make them all available in one spot. Not only are blogs easier to write, their easier to read.

So, what has the net effect of the introduction of the blog been? In a nutshell, it’s a decentralization of media sources. When everyone can make their own voice heard, the public starts focusing on those whose story is the most interesting rather than who has the greatest publishing power. People start getting the news from their peers, rather than from traditional media outlets.

Information now comes unfiltered. Whereas the news sources used to get their information “from the experts,” they now consult the experts’ blogs. And in the mean time, the average joe has come to bypass the news outlet, and read the story directly from the source–whether they realize they’re doing so or not! It is a revolution of sorts. Your voice can be heard. And if you have something the world want’s to listen to, it will be.

« Previous Page

Powered by WordPress