revjim.net

September, 2004:

Technology and Life: Part II

Amidst my ramblings on “Technology and Life”:http://revjim.net/item/10132/, I only hinted at the conclusion I was attempting to make.

Technology will continue to adapt. Just like pink is the new black, technology, is the new evolution. The only way to survive is to adapt.

In the old days, you’d crochet. It was your art, your passion, your living. There was one craftsman for every two consumers. In the new world, crochet isn’t a viable career. You’ve got to move up the chain. Now, there is a crochet machine engineer, and thousands of workers who build those machines. There is an artists who designs the crochet patterns and thousands of workers who run the machines that perform that work. And for each artist, there are millions of consumers. For that artist, that engineer, and all of those consumers, technology has drastically improved their way of life. But, at the same time, the millions of would-be crocheters are now out of work and can only resort to crochet as a hobby.

So, if you enjoy crochet, and you want it to be your way of life, picking up a needly and some wool doesn’t cut it any more. What pleases you more, the mechanics of crochet, or the art of it. If you like the art, then, to adapt, you need to learn how to program a crocheting machine. And if you like the mechanics of it, you need to learn how to build one.

Technology increases the gap between consumers and producers. Technology makes it more difficult to be successful in a field. But technology also makes new fields possible, and allows more consumers to reap the benefits of goods and services. It gives unskilled workers something to do, and gives skilled workers a chance to really succeed. It improves the quality of life for many people, forces others to adapt or change entirely, and decreases the quality of life for those that cant. It’s survival of the fittest, with new rules and regulations that change almost quicker than you can change with them. Enjoy it.

Technology and Life

In a “recent discussion”:http://www.livejournal.com/users/stick_figure/316768.html with “Laura”:http://livejounal.com/users/stick_figure/ regarding the possibility of living in a commune or “intentional community”, the concept of technology and it’s role in life has risen.

I agree with Laura whole heartedly. A “self-sufficient community is not only difficult, it’s, technically speaking, stupid”:http://www.livejournal.com/users/stick_figure/316768.html?thread=406880#t406880. You would have to be an incredibly large community (say, a nation) in order to have enough people and resources to afford yourself all of the finer points of living. Technology is, simultaneously, the joy and sorrow of life as I know it.

She brought up knitting as an example, and I’ll confirm that. Jess crochets. She does a great job. But it isn’t possible for her to keep up with mass production. Case in point: she’s currently crocheting a very large blanket as a commissioned work for some friends. I can’t even begin to count the number of rolls of yarn she’s used, stitches she’s made, or hours she’s spent working on it. In the end, she makes a few bucks. But, in truth, it doesn’t even amount to minimum wage for the work she’s put in. And, the blanket that will be received won’t keep the owners of it any warmer than a blanket bought off the shelf. Additionally, her blanket will have small defects and imperfections made by human hands that wouldn’t be present in a blanket produced by a machine. Arguably, the blanket produced by the machine is superior in quality to hers, at a fraction of the time and cost, when mass produced. Of course, she enjoys doing it, so making money isn’t the point. However, were she to try to earn a living this way, it would be quite difficult to compete with modern machines. I would even venture to say it would be impossible to do so.

The same situation applies to almost anything. Take web design for example. A customer can pay me $150/hr to design their content and website. Or, they can buy a copy of Microsoft FrontPage, use a built in template, enter the data themselves, and in nor more than a day or so, have a website at a fraction of the cost. I’m fortunate, at this point anyway, that computers are not entirely capable of taking over my job. And, when they are, I intend to be one of the people making the computers doing the take over. But it’s getting to that point. Eventually, no one will bother creating websites by hand, unless they do it for enjoyment alone, because technology will do it quicker, better, and at a fraction of the cost.

Even in her craft, technology rears it’s ugly head. There are millions of people who see doctors every month across this country. They are prescribed medicine. They obtain those prescriptions. They take their medicine and feel better. Insurance pays for it. Everyone wins. Except, sometimes, those very people relying on this technology. Imagine an individual with recurring headaches. He sees his doctor, gets medicine, and feels better when he takes it, at the expense of a little cash and various undetermined and uncontrollable side-effects. On the other hand, a few visits to your practice might actually *cure* the situation instead of covering it up with medication. Yet, technology and convenience provides the means for people to obtain their solution the “wrong” way.

In all of these cases, technology, in different ways, has all but taken over the need for skill, labor, and craftsmanship. Sure, there are still people that want hand-stitched blankets. And there are people who know the value of a custom designed website. And there are patients who know that finding the root of their problems and curing that is a better solution than covering it up with medication. But technology, convenience, and mass production makes it almost impossible for the common man to even consider any other angle of approach.

Yet, on the same token, without “technology” Jess’ hobby, my trade, and your practice would all be non-existent. Without technology, we’d still be smashing rocks against unknown fruit found on the forest floor in hopes that it held something good to eat, and not something that was going to make us sick. We wouldn’t have computers to make websites on, crochet needles and rolls of yarn, or acupuncture needles and years and years of botanical research.

It’s a double edged sword. The Wal-Marts of the world are slowly making mass production the only option. Photography used to be a *very* manual practice. Every exposure was calculated using mathematics and knowledge. Every negative was developed by hand. Every print was manually exposed and corrected. It was a true art. Today’s camera’s are fully automatic. Film is available for less than $2 a roll. Wal-Mart will develop your negatives and hand you prints for $6 in less than an hour. And the world of digital cameras is even taking some of that away. I used to develop and print all of my own film. Digital photography was not even a consideration. My estimates found that, not counting the cost of film and it’s development, each good 8″x10″ print cost me about $7 and 2 hours of time. And, when I wanted another copy of that same print, the costs in time and money didn’t go down much. Slowly but surely, I got into digital photography. Now, the first 8″x10″ print I make costs me $2 and about 30 minutes of time. Each additional print costs another $2 and no time at all. And, again, this isn’t accounting for the cost or time involved with preparing the film before it can be printed.

I’m proud that I can practice photography in the old-fashioned way. I’m glad that I know what is involved with every step of the process. I’d even consider doing it again, just for fun, and nostalgia, and control. But on a regular basis, I’m very grateful for technology.

Technology is the new “God”. Technology giveth, and technology taketh away. All we have to do is keep up.

Bloglines Services

This morning while in the shower, I began to think about how nice it would be to have an application on my phone to read RSS. That way, regardless of where I was or what I was doing, I could keep up with the news, information, and life events that are regularly fed to me. However, I also began to realize that I’ve come to rely on “BlogLines”:http://bloglines.com/ a lot in regard to knowing what I’ve read, what I haven’t read, what I like reading, and what I intend to comment on. So then I began to think that it would be even nicer if BlogLines had some sort of API to allow me to gather the information they normally present on their website for my own uses in my own applications. So then I get to work, fire up bloglines and, low and behold, there’s a new item to read regarding “BlogLines services”:http://www.bloglines.com/services/.

So they’ve done it. The Sync API is the most interesting, as it’s what allows you to read the information BlogLines gathers for you. It’s fairly complete. The only feature I would have wished for would have been the ability to mark a single item as read (as opposed to an entire folder or, an entire folder from a certain date on). Or, at least, like the web interface has, the ability to mark a single item as unread. Regardless of that complaint, as it is now, it seems fairly usable. Now, if only Python for the Series 60 was available for use.

Emily’s party; grillin’ and chillin’; my parents

Last night was Emily’s birthday party. I was in charge of the grill, and I didn’t do as well as I had hoped. Some of the burgers turned out just as I had intended, but, many of them were more cooked than I had expected. I don’t grill that often, so, while I know all the “rules”, there’s something to be said for experience. I’m hoping that as soon as we get a few more things settled around here, we’ll get a concrete slab poured in the back, or build a wooden deck so that we can get a grill too.

Emily’s friend, Jenny, was at the party as well. I think my conversation may have been a little too sexual for her. I may have offended her a few times, not due to comments directed at her, but due to things I said, in general. At least it seemed that way. Then again, maybe I was a bit more candid than usual, as even Emily seemed surprised at a few of the things I said. Either I toned it down some, or everyone got used to me, because she seemed to be rolling with it towards the end. Though I’ve only hung out with her a few times, she’s a lot of fun. Hopefully, Emily will bring her around more often.

We’re heading out to my Dad’s house today for dinner. Yesterday, Jess said, “does it make me uncool that I actually enjoy hanging out with my in-laws?” That made me laugh. I’ve always liked my parents and, despite the defined child-parent relationship that we have, I’ve also always considered them friends first and parents second (until I need something, hah). And, of course, when I say “always” I mean “in adulthood”. I’m very happy that Jess likes them and enjoys spending time with them.

Mr. Procrastination and Technology

I have a propensity to procrastinate. Knowing this, and not wanting our house to turn into a shit hole, I’ve put technology to work.

Using a combination of “PHPiCalendar”:http://phpicalendar.net/ and “Mozilla Calendar”:http://mozilla.org/projects/calendar/ I’ve made a list of “chores for Jess”:http://revjim.net/phpicalendar/week.php?cal=Chores-Jess and a list of “chores for myself”:http://revjim.net/phpicalendar/week.php?cal=Chores-Daniel. Using PHPiCalendar’s “RSS Feeds”:http://revjim.net/phpicalendar/rss/index.php, I get notification on a daily, weekly, and monthly basis of the chores that I’m supposed to do.

So far, I’ve been pretty good at getting them done. Mowing the lawn is one of the biggest pains. I found that, when the grass is wet, it’s harder to mow. So I turned off the sprinklers on Saturday mornings and, instead, I start them manually after I finish mowing.

Aside from mowing the lawn, my chores this weekend include watering the plants, feeding the fish, cleaning the cat box, mopping all the floors, and washing my truck. This is a slow weekend compared to others.

Since I knew ahead of time that I would be nearly unwilling to do anything on a week day, I didn’t schedule any chores for those days, aside from those things that need to be done on a daily basis (water the plants, feed the fish, clean the cat box). I think that might have been a mistake as, after not doing chores throughout the week, I really hate doing them on the weekends. I may move some stuff around to give me a little more to do during the week and a little less to do on the weekends. However, I don’t want to spend more than an hour on a weekday doing chores. So it’s hard to decide exactly what things I should do as most of them are either really short, or really time consuming.

I’ll work it out, eventually.

Emissions Test: PASSED

I brought my truck in for inspection today. I was prepared for the worst. I was pretty sure I wasn’t going to pass the Emissions Test. My truck stinks. I can smell it in the cab. I can see the soot left on my dash board from the exhaust. I can see the smoke billow out from behind it when I step onto the gas. Somehow, despite all of that, I passed Emissions.

Of course, I failed the safety inspection. I had one brake light burnt out. A few people had told me I had a tail light out. I looked for it. I couldn’t find it. I didn’t realize they meant *brake* light all this time. The inspection place would have fixed it for me… for $31.90. Um. No. So, I’m going to put a new bulb in it and get it reinspected on Monday.

Yes, congratulations are in order. Feel free to do so in anyway you deem appropriate. If you’re looking for a suggestion… how about a photograph of your breasts pressed up against your car window?

PHP/SQLite users: a word of warning

“Aaron Wormus”:http://www.wormus.com/aaron/ brings up an “interesting point”:http://www.wormus.com/aaron/stories/2004/09/22/dangers-of-sqlite-ignorance.html that may be obvious to the more seasoned web programmers, yet may not even cross the mind of those beginning PHP programmers, especially those just starting with the powerful PHP5/SQLite combination.

bq. I’ve been going through the Zend Contest Entries and have been very surprised to see that only one of the five software packages that I have reviewed so far which used SQLite, does anything at all to protect their database. Due to the fact that many of these packages use SQLite because of the “no-installation-necessary” factor, it is very unlikely that the end user will bother securing the database themselves.

Allow me to explain.

When an SQLite database is stored on the file system of your server, if it’s stored in a location that is “web accessible” (whether this URL is announced or not) it is possible that this could be found, downloaded, and exploited. If you don’t keep sensitive information in an SQLite database, and don’t mind that others see the stucture of your backend databases, this might not be an issue for you. However, in most cases, it is.

When you select a location for storing your SQLite databases, it is best to choose a location outside of your web server’s document root. If this isn’t possible for you, for whatever reason, you can use “.htaccess” files (or your webservers equivalent) to forbid access to these files universally.

Gallery vulnerability

I don’t have every version of gallery at my disposal, so I haven’t tested this against every version. However, as far back as I can remember, this has been the case, so I’m pretty sure it applies to all versions, and certainly all recent versions.

Public access to certain data files within your albums directory will provide visitors with information regarding the names and locations of all images in all albums within your gallery installation. By default, access to these files is allowed. With this information, a visitor has the ability to retrieve any image within your gallery, even those marked as hidden, or those placed under gallery’s security.

To see if you are vulnerable, attempt the following. Take the URL to your “albums” directory (the directory that contains all the images on the server), which could be named differently depending on your installation. Append “/albumdb.dat” to the end of this URL and enter that address into your web browser. If you get some jibberish starting with “{“, then you are vulnerable.

There is a simple, temporary fix that will not affect the usability of your gallery. If you happen to be running Apache with “.htaccess” file access, you might find a file named “.htaccess” in your albums directory. Either edit it, or create it and add the following lines to the very bottom of this file:


Order Deny,Allow
Deny From All

I hope this helps some of you. If you insist on doing so, you may repay me by providing me with legitimate access to those albums you’re trying to protect. :)

*Update*: Despite my “bug report”:https://sourceforge.net/tracker/index.php?func=detail&aid=1033106&group_id=7130&atid=107130 and, apparently, several other bug reports on the same issue, the Gallery team has choosen *NOT* to correct this issue. According to them, this would require a “major major rewrite”. In actuality, it would require a small change in a few files, and one new file for handling the images correctly. I feel that, at the very least, the fix I mention above could be included by default, and a warning message could be issued during installation/upgrade.

Sourdough review

With PHP5 being officially released over a month ago, I think it’s about time to get some PHP5 software reviews online. Today, we’ll look at “Sourdough”:http://sourdough.phpee.com/, a PHP5 application framework.

Sourdough uses “coWiki”:http://www.develnet.org/ to power its site. With an increasingly large number of sites using coWiki, I’m pretty sure I’ll be reviewing it next.

Sourdough has created its own database abstraction layer. Today, database abstraction layers are a dime a dozen in the PHP world. However, since the PHP5 field for these is still a bit slim, I wont complain about that too much.

Sourdough is based on the Flyweight Pattern, which I found quite interesting.

bq. The Flyweight Pattern uses sharing to support large numbers of fine-grained objects efficiently. A flyweight is a shared object that can be used in multiple contexts simultaneously. The flyweight acts as an independent object in each context — it’s indistinguishable from an instance of the object that’s not shared. Flyweights cannot make assumptions about the context in which they operate.

This is a design pattern not yet seen in the world of PHP application frameworks. That’s quite refreshing. Unfortunately, the implementation of this pattern is not quite right. One look at the “API Docs for the Sourdough class”:http://sourdough.phpee.com/api/sourdough/Sourdough.html should show you why.

While this Flyweight Pattern is certainly implemented, it’s done in a static fashion. That is, each object type that that Flyweight is capable of obtaining is statically defined in a method within the Sourdough class. This means that altering what it can serve requires editing or extending the Sourdough class. This would have been better served in a dynamic fashion using PHP5′s __call() overloading mechanism or through the implementation of a single method to retrieve objects along side a configuration file, or well designed directory structure.

Because of this static implementation, the quirks of each different class being handled are all worked out within the call to the method that instantiates the desired object. With a dynamic implementation, a Flyweight interface could be created to allow any class that implements that interface to be served by the Flyweight Factory.

Despite that, a look at what the Flyweight provides gave me enough information to conclude the review. There is a method to retrieve configuration information, as well as methods to obtain various objects. These objects are nothing new, and in some cases, a step in the wrong direction: Auth, BBcode, Db, DirScan, FileConvert, FormMail, Forms, Html, Image, LineCount, PatForms, PatTemplate, Session, Settings, SqlHelper, Template, User, Xslt, and Yabd. There is nothing special or unique in this list: no application server, no object persistence, no object to URN mapping, no advanced logging capabilities, no error trapping/handling.

Therefore, in conclusion, Sourdough is really a mish-mash of already available components and libraries, all served up by a single, statically implemented, Flyweight Factory. A decent idea, but poorly implemented with nothing new to earn it any credit.

Conversational Habits OR Who Likes Me More

Thanks to “GAIM”:http://gaim.sf.net/ (available for Windows and Linux, BTW), I can sort my buddy list by log size. Since I log every conversation I’ve ever had, ever, this provides a rather interesting indication of who I talk to most, or at least, who I talk to the most verbosely (my cybersex partners, of course, won’t have very large log files, since I only send short messages like “more”, “yes!”, “almost there”, and “ajsdfh434823$”). Of course, this only accounts for those conversations held on my office computer, my home logs would be sized differently. With that in mind, here’s my list (with the names toward the bottom left off since I so rarely speak to those people):

# Matt
# Justin
# Jess
# Morgan
# Brad
# Melissa
# Joel
# Charm
# Rob
# Bonnie
# Jaclyn

I wish I could have it sort by time spent conversing and by conversation time over a certain time period (last week, last month, last year, etc) but it’s still interesting.

It’s also interesting to consider those at the top of the list. I don’t talk to Matt that often. But when we do talk, it’s quite verbose and goes on for quite some time. My conversations with Justin are a mix between frequent, short, terse conversations and less frequent, long, verbose conversations. None of our verbose conversations get to the length of the ones I have with Matt, though. Jess and Morgan are next on the list. In both of these cases, conversation is *very* frequent, however, quite short and generally terse.

Very interesting.

*Update:* Out of curiosity, I checked my logs at home as well. Here’s that list, for the interested.

# Justin
# Morgan
# Bonnie
# Brad
# Melissa
# Joel