![]() | ||||||
![]()
May 11, 2008 Mothers Day Weekend Half busy, the other half not. Saturday borrowed Rando's truck and picked up a load of compost from Leaflan. This will go in the raised bed planter boxes being built behind the garage. I'm not ready for the dirt yet but will be before next weekend so I wanted to get the dirt now instead of wait. What we have to plant back there needs to get in the dirt soon, part of which is a transplant of some berry bushes that are already well into springs development. Currently beside the house, behind the garage will be a better spot and we picked up two additional plants which will join them in one of three eight foot sections across a twenty four foot span. Mothers day got together with all the children and grandchildren, now up to four of the latter. Had a good time for a few hours and didn't do much else. Otherwise I didn't do a damn thing with computers or websites with little else to mention. Hope your weekend went as well. • • • • • May 10, 2008 Going for the green A combination of events leads to this post. A Daily Snooze article: Conference sends message to businesses: 'Go green' and the wife having shown me a pair of Bamboo Rayon socks she just purchased, asked what I thought. Looking at the packaging and then the fabric, surmised the more green aspect of the product was likely the color of the box it came in. Don't get me wrong, up to a point I can evangelize about the wonders of bamboo and have looked into the prospects of growing it in this climate. There are a few species hardy enough for this zone but really you need to be more southernly situated. Not that far as it turns out, southern Indiana and below but be careful, bamboo as a plant species is invasive as all hell. As a process, the manufacture of bamboo rayon is primarily chemical and using bamboo as a feedstock for such methods is not sustainable. In the final analysis you will find the product to be on approximate equal footing with cotton, the former of benefit to a foreign economy with the latter being domestic. While bamboo can be made into nice fabric, the process required is anything but green. The Snooze article labored over the same recycling/conservation ground as has been found fashionable from time to time. I'm certainly not against any of it within the confines of economic feasibility, but would likewise remind that we cannot conserve our way to prosperity anymore than we can afford to throw away valuable resources. By the article, waste heat being one of those. Therein was also found a representative example of an electric car which begs the question of environmental friendliness. The primary issue revolves around secondary power sources of which there are two; batteries or fuel cells. I think you will be hard pressed to categorize the life cycle of manufacture, utilization and disposal of batteries as 'green', especially when scaled in mass quantity. Additionally we need energy sources from which to charge the batteries. Present choices are Nuclear, Natural Gas and Coal. We haven't built a nuke plant in decades and current supplies of natural gas satisfy our needs as a primary home heating fuel. Coal? Can be utilized by much cleaner methods than in the past but still, green? Conversely, the primary fuel cell feedstock is hydrocarbon due to conversion efficiency and current technology in mass producible catalyst which themselves use copious quantities of rare earth metals which require extensive processing. Again, we must look at the entire life cycle of fuel cells when utilized at scale just as we do with batteries. Some of this technology will be pressed into service because of overriding need and not on the basis of eco-friendliness, most of which wishful thinking like bamboo rayon socks and marketed in profitable turn as the latest fashionable must have for the curious and concerned. If you really want to go green, reduce your carbon footprint and give this earth a break, spend all your money planting trees, then kill yourself. We have to many people on this planet by a factor of three. • • • • • May 8, 2008 Arrrrg! I seem to be fighting the demons of CSS and various Document Object Models in part, but mainly Internet Explorer in comparison to the Mozilla's such as Firefox and Safari. This has been going on for the better part of a week, having become an obsession of significant proportion. At issue is a relatively simple web page, a new Daynotes as it were, that is not overly complicated yet seems bedeviled by various quirks which spoils the render. I'm on my fifth revision, have torn down to the basement on three occasions and each time something new rears its ugly head. At least twice felt I had something near publishable only to have such thoughts collapse in a heap. On an up note I'm learning more about layout quirks and cross browser compatibility issues than I have ever wanted but making enough progress that maybe, just maybe tomorrow or the next day we might possibly perhaps have this thing under control. If so it will have been a week of my life that I'll never get back for the sake of a hundred lines of code that nobody but me gives a rats ass about. So much for the up note. If I'm ever on a jury where some schmo took a twelve gauge pump to his monitor over something like this, I'm voting to acquit on the insanity defense, assuming the fool has enough left in the tank to apply it. In the process of doing, I've been switching back and forth between browsers testing this change and that tweak in attempt of a pixel perfect layout -- if you knew what I was fussing over you'd suggest psychological help, and soon -- I find Apple's Safari browser (on this Windows computer) does really strange things with graphics such as photographs. In comparison to the other browsers and indeed other display programs, the render is just wrong. Contrast, brightness and perhaps even color space is simply off and I've neither time nor inclination to look into the matter. Apple using their own algorithms? • • • • • May 7, 2008 The fat lady is warming up I'll give Clinton points for toughness, this has been a marathon of grueling disappointment. For much of the race she was the Democratic front runner but coming to the wire gets to watch Obama pull ahead while she gasps for air, now left to her own millions in purchase of enough oxygen bottles to keep the campaign competitive. I mean, when the money flows in support of the other guy and you have to break out the inhaler, well... A reasonable person could deduce the writing on the wall but this is where politics can get weird and often does. Hillary says she'll drag this to the bitter end. We are reminded that bitterness and endings can be close at hand. It is no longer a matter of winning outright for Hillary, she can't. She will have to woo a far greater number of super delegates than have already committed to her and considering the numbers aboard with Obama this does not seem likely. For the Clinton campaign, the momentum has been lost and it is getting late. Although she's a fighter, the problem for Hillary is she can't fight Obama because he is protected. Whenever a turd falls out of the mouth of a Militant Michelle or the Reverend Jeremiah Wrighteous, Obama simply butters over and carries on. It's ok really, we understand. It's not as though these people are spiritual advisors, chosen sleeping companions or life partners within the inner most circle of confidants; the essence of the man as it were. With free passes handed out like that she was foolish to try. That said, if Hillary couldn't define herself any better than John McCain with tits, perhaps it just as well her candidacy suffers a hull rupture and sinks. • • • • • May 5, 2008 A quick look at Biodiesel According to Wikipedia if all arable land in the US was converted to soybean production, the oil extracted and converted to biodiesel, we would have just enough transportation fuel and home heating oil to cover current levels of domestic consumption. Obviously oilseed biodiesel alone will not get us very far but I do like the option as an alternative fuel within the confines of practicality. We might not be able to fuel every vehicle or heat every home but if we could ensure the viability of trains, fleet trucks, ships, boats and buses, then I would think adequate production of biodiesel would be in the greater interest of all. Are soybeans the better oilseed for conversion? From a practical standpoint it would seem so, especially at scale. Rapeseed (canola oil) has somewhat higher yields although the better oil producing soybeans near match them and produce the greater overall value when considering protein and fiber byproducts. The upper limit of yield for either oilseed as currently defined is about 98 gallons/acre give or take and it takes about 9 gallons/acre to produce it. On occasion we hear about the potential of algae as a biodiesel feedstock with the USDA proclaiming 30X greater yields per acre. Theirs as it turns out is the most conservative estimate, others claim much higher yields than that, all without utilizing arable land. Much research remains to be done on algae however, some strains are better than others concerning lipid production (the oily part) so there is that aspect of the discovery process that needs sorting out. Research that has been hampered by lack of ongoing programs due the rise and fall of political tides. Then there are issues with DNA modifications to scale once identified and processes to develop in harvesting at megaton volumes. There is significant promise that might be realized, but the study of algae involves development cycles that take months per test so it is important that we get to the task and stay with it until all is proven one way or another. It all boils down to energy which in many cases are not economically desirable or even tractable. Really, the only energy source that meets most of the criteria is nuclear and that might put me at odds with a great many but such is the brutal truth. We are woefully behind the necessary build out. Of course it is not all that needs doing. We are reminded of this due all the talk about rising prices at the grocery store since we have opted to burn food for fuel and I am amazed that this seems to have caught people by surprise. With farmers increasing corn production as an ethanol feedstock, soybean prices have escalated with their lesser availability and construction of the Evansville (WI) biodiesel plant has been halted due declines of economic viability in result. Meanwhile a guy in Clinton Iowa is making biodiesel 100 gallons/day in his garage at a cost of a dollar per gallon. All it takes is some methanol (or ethanol) and lye plus waste cooking oil, water and a residential hot water heater. Nothing more than plumbing and a recipe. Of course he's not paying any mandated motor fuel taxes either which segues into the great RV bust at Daytona International Speedway during the run up to last years Daytona 500. Seems a good many RV's are clandestinely fueled and inspectors were checking tanks at the gate. I don't know what the test was but I suppose if an RV drove past smelling like french fries the jig was pretty much up. I guess I live a sheltered life not being aware of that previously. I hear such inspections are increasingly common but also wonder why the DOE/DOT guys would even bother with it. On the other hand it was just recently I looked up at a price sign and noticed that diesel was significantly more money than gasoline and wondered why that was. Isn't diesel cheaper to manufacture given reduced processing requirements? Apparently the difference is in the tax and therein lies the reason why we don't manufacture diesel automobiles domestically or given instances when we do are not for domestic consumption. You would think it the better choice since the modern diesel is a low polluter (even less with bio-diesel) with significantly enhanced fuel mileage, but such is the tax, pushing up operational costs which drives such options from the marketplace. Even though biodiesel might only be part of the solution perhaps we need to rethink our regulatory stance on such alternative fuel options given the humble diesel is much more fuel flexible than spark ignition gasoline engines. We need to keep moving, preferably forward. • • • • • May 2, 2008 ImageMagick w PHP Here is a chunk of known working test code for checking the PHP interface (imagick) to ImageMagick. From: PHP Tutorials - Create Horizontal Gradient With PHP Imagick. <?php In my case it didn't work out of the box and trying to run this code pitched a "Class 'Imagick' not found" error. A quick Google on the error provided the solution; apparently I didn't have enough stuff. apt-get install make php5-dev php-pear If I had followed the instructions provided a bit closer it would have saved some headache but I assumed (incorrectly) that I already had 'make' and 'pear' installed. I didn't and do note the original issue was an older thus incompatible version of the 'imagick' PHP interface as installed from the Debian repositories. Happens. Here is the updated installation sequence: apt-get install imagemagick Is "php5-imagick" needed? Probably not, but it did update "php.ini" with the proper entry and what else I'm not sure. I didn't remove it and has caused no problems I'm aware of -- in all likelihood it got replaced. I'm also not sure that "php.ini" gets updated as necessary (some have reminded to do this) when going the pecl "compile from source" route, so I left the install sequence as how eye got to Tipperary. Otherwise the "php.ini" entry was simply: extension=imagick.so Now I can go play. • • • • • May 1, 2008 What I forgot to say ![]() Sometimes the problem writing these posts is turning the corner and not finding your way back which is what happened yesterday. Nothing wrong with writing about the link script but the original intention was to comment on 'preparing to get started' with programmed image manipulation. A matter of choices between the GD2 library or ImageMagick, neither included with the base web server installs here and no experience with either. Ultimately I decided on ImageMagick having looked at the command structures of both and finding that one less cryptic. In line with the general scheme, I want to bring more automation to the image aspect as well. I have had an image download/uploaded script that auto-creates the image tags for some time but sizing images to fit or creating thumbnails remained a manual operation. Something that need not be under typical circumstances if one is willing to learn how. Having changed the directory structure with the last update here, the original code - such as it was - would need adapting to suit. It seemed like a good time to investigate alternative possibilities. First we had to install ImageMagick and the PHP interface with a web server restart at the end. I'm running a late model Debian OS with Apache2 and PHP5, all of which is all fairly up to date. The installation went without a hitch. apt-get install imagemagick Next I wanted to see if the thing worked and went looking for some test code. In the process of doing that, found that we can run things directly from the command line. Cool, PHP can wait. The first thing I wanted to try was converting some test images between GIF, PNG and JPG formats since those are essentially the staples, particularly with web sites. Hey, it works! After that I moved on to resizing. That worked too and if you just enter one dimensional value the program will auto calculate the other. Sweet. Photographs are almost always in JPG format so the next thing tested was compression adjustability. No problem. Unsharp mask? Yup, pick your poison. convert eryn.jpg -resize 538 -quality 80 -unsharp .50x.25 -bordercolor black -border 1x1 eryn_small.jpg So far I'd tested on relatively small files in the range of 1024x768 or there abouts (apprx 1-2 second processing times) and wondered how it would fare on the bigger stuff. A 12 megapixel camera might put out 4000x3000 JPG's around 5 MB each. On a Pentium III 800 with 256MB memory the same sequence of operations - read, resize, apply an unsharp mask, add border, recompress and write - took ten seconds on such an image. A 2000x1500 pixel image processed in about 3 seconds, roughly 1 second per megapixel. I can live with the time having found it difficult to bitch, after all, what was the expectation. How long would it take to do those operations by hand? Besides, there are other fish to fry and one of those is the default PHP file size upload limit of 2 Megabytes. A couple possible solutions; increase the limit or use an uploader written in Perl for example. At any rate it is working from the command line which means the next step is fashioning code to perform the functions programmatically. • • • • • | ||||||