Monthly Archives: May 2008

Creating a FAQ

A question from Askville:

How do you and a FAQ list to a website?

I would like the have the questions show-but not the answers until the user clicks on a link. I see them everywhere, but don’t know how to write the code or better yet find downloadable solution.

You could try some simple JavaScript:

FAQ (click on a question to show/hide the answer)

Question 1

Question 2

Question 3

Question 4

Question 5

Here a link to a file with relevant HTML and JavaScript.

Or you could create a full-blown database-driven FAQ engine… Or have an AJAX-powered FAQ (when the user clicks on a question, the answer is requested via AJAX)…

A Portugese bet on American wind

From Institutional Investor:

Riding on the Wind

António Mexia, CEO of Energias de Portugal, has no delusions of grandeur. By European standards, the Portuguese utility is, he acknowledges, “an average company.” With a $23.8 billion market capitalization, EDP is a mite compared with Europe’s biggest utility, Electricité de France, valued at $216.5 billion, according to the annual ranking published in January by Washington-based consulting firm PFC Energy. Three power companies in neighboring Spain alone sport market caps exceeding that of EDP.

But, Mexia points out, “the market structure is totally different in the U.S.,” where Lisbon-based EDP would rank in the top ten, ahead of such prominent names as American Electric Power, Constellation Energy Group and PPL Corp. And it is in the U.S. that EDP is preparing to throw its weight around. Mexia’s approach isn’t conventional, however. He wants to help propel the country into the future of alternative energy, combating global warming while rewarding shareholders.

Last July, EDP acquired Houston-based wind power developer Horizon Wind Energy for about $3 billion. That first U.S. foray — EDP operates in five European countries and Brazil — contributed to a 132 percent increase in EDP’s installed wind-turbine capacity during 2007, to 3.6 gigawatts. That ranks it fourth in the wind sector, behind Iberdrola and Acciona Energía, both of Spain, and Florida Power & Light Co.’s FPL Energy alternatives affiliate. In short order, Mexia began contemplating the next step in raising EDP’s alternative-energy profile: an IPO consisting primarily of Horizon and European wind assets, called EDP Renováveis, or EDP Renewables. The plan, spelled out in January, calls for the spin-off of a 20 to 25 percent interest, with shares to be listed on Euronext Lisbon.

“We will make a go or no-go decision in May, depending on market conditions,” says Mexia. Though the IPO climate is uncertain, Mexia believes that Renováveis will stand out as the only pure-play wind stock. Renováveis’s earnings before interest, taxes, depreciation and amortization increased 46 percent last year, to €214 million ($334 million). EDP’s ebitda rose 14 percent, to €2.63 billion, while revenues were up 6 percent, to €11.01 billion. Trading recently at just above €4, EDP’s shares had gained 3 percent year-over-year, lagging Spain’s Endesa, at 6.3 percent, and ahead of Iberdrola, at 2.5 percent.

Mexia, 50, previously CEO of Galp Energia, Gas de Portugal and Transgás, has been EDP’s chief since March 2005, after serving nine months as Portugal’s minister of Public Works, Transportation and Communications.

Class action finally meets 401(k)

From Institutional Investor:

401(k) Sponsor Hit for Pushing Own Funds

13 May 2008
Jinny St. Goar

A recent court ruling encourages sellers to beware.

Seller beware: That’s the message a recent court ruling sends to the sponsors of 401(k) retirement plans that offer their employees mutual funds created and managed by the same firms administering the plans.

In mid-March, Judge Bruce Kauffman of the U.S. District Court for the Eastern District of Pennsylvania approved a settlement between New York Life Insurance Co. and the employees of a big corporate plan sponsor. In a twist, the sponsor was New York Life itself, and the plaintiffs were its own workers and sales agents participating in the company 401(k) plan. New York Life had offered employees its own mutual funds, and the plaintiffs argued that they could have done better elsewhere.

New York Life settled the suit as the plan’s sponsor, agreeing to pay $14 million — $4.62 million to the plaintiffs’ lawyers, $6.57 million to the defined-contribution-plan participants and $2.81 million to the defined benefit plan and its participants — as well as to hire an outside consultant to advise on the investment offerings in its plan, in compliance with a provision in the settlement stating that the insurer should have had an independent fiduciary examining its investment options for 401(k) participants.

The fallout? Any plan sponsor offering the proprietary mutual funds of its plan’s administrator — and the ranks are only increasing — is vulnerable to class-action litigation. “Someone has to hold the plan sponsors’ feet to the fire,” says Brent Glading, founder and managing director of Montclair, New Jersey–based Glading Group, which advises plan sponsors. It’s up to sponsors to ensure that 401(k) participants get the best possible choice of funds, he points out.

Plan sponsors must also be aware of the funds into which employees’ money is flowing automatically. New Department of Labor rules encourage plan sponsors to automatically enroll employees in 401(k)s and invest their contributions in age-appropriate investment funds, says Geoffrey Bobroff of Rhode Island-based Bobroff Consulting, which advises mutual fund firms.

* * * * *

An encouraging development, I think…

Environmental impact of biofuels

From University of Washington News:

Some biofuels might do more harm than good to the environment, study finds

Vince Stricherz (vinces@u.washington.edu)

Biofuels based on ethanol, vegetable oil and other renewable sources are increasingly popular with government and environmentalists as a way to reduce fossil fuel dependence and limit greenhouse gas emissions.

But new research led by a biologist at the University of Washington, Bothell, shows that some of the most popular current biofuel stocks might have exactly the opposite impacts than intended. The authors of a paper published in the June issue of the journal Conservation Biology offer a dozen policy recommendations to promote sustainability and biodiversity in biofuel production.

The study looked at factors such as the energy needed to produce a renewable fuel source compared with how much energy is produced, the impact on soil fertility and effects on food supply when fuels based on crops such as corn and soybeans are mixed with fossil fuels. Based on those factors, the authors determined that corn-based ethanol is the worst alternative overall.

“It’s foolish to say we should be developing a particular biofuel when that could mean that we’re just replacing one problem with another,” said lead author Martha Groom of the UW Bothell. Co-authors are Elizabeth Gray of The Nature Conservancy and Patricia Townsend of the UW Seattle.

The authors argue that precise calculations are needed to determine the ecological footprints of large-scale cultivation of various crops used for biofuels. They note, for example, that because such large amounts of energy are required to grow corn and convert it to ethanol, the net energy gain of the resulting fuel is modest. Using a crop such as switchgrass, common forage for cattle, would require much less energy to produce the fuel, and using algae would require even less. Changing direction to biofuels based on switchgrass or algae would require significant policy changes, since the technologies to produce such fuels are not fully developed.

The paper’s policy suggestions are “not definitive at all,” Groom said, “but rather each category calls out a question and is a starting point in trying to find the proper answers.”

These concerns are becoming more acute with the rapid rise of both food and fuel prices, she said. The issue is especially touchy for farmers who might for the first time be realizing significant profits on their crops, but it also is a serious concern for motorists.

“I’ve heard about people getting their gas tanks siphoned, and I hadn’t heard of that since the ’70s,” she said.

A difficulty, Groom said, is that while escalating prices add pressure to find less costly fuel sources, acting too hastily could create a host of other problems. For example, farmers who plant only corn because it is suddenly profitable, and don’t rotate with crops such as soybeans, are likely to greatly deplete their soil, which could limit crop growth and promote soil erosion.

Also, some plants are better than others for absorbing carbon dioxide from the atmosphere, while others perhaps need more cultivation, which requires more fossil fuel for farm equipment. In addition, fertilization, watering and harvesting all require energy.

The study took about a year to conduct and is a synthesis of peer-reviewed research published in a various journals. The scientists examined the literature looking for indicators of biofuels that are more sustainable and carry a smaller ecological footprint, then used that information to derive the policy recommendations.

The primary audiences for the work are policy makers, students and other biologists, Groom said. The primary goals are to establish a logical basis to evaluate options for biofuel development and to spur new research to find the most ecologically promising alternatives.

“We don’t want to make new mistakes. If we don’t ask the right questions to start with, we’re going to replace old problems with new ones,” she said.

Policy Recommendations

  • Calculate a biofuel’s ecological footprint
  • Promote only biofuels that can be produced sustainably
  • Select highly efficient species for biofuels
  • Work to minimize land needed for biofuels
  • Encourage reclamation of degraded areas
  • Prohibit clearing areas for more cultivation
  • Promote use of energy crops that require less fertilizer, pesticide and energy
  • Promote native and perennial species
  • Prohibit use of invasive species
  • Promote crop rotation on cultivated lands
  • Encourage soil conservation
  • Promote only biofuels that are at least net carbon neutral

###

For more information, contact Groom at (425) 352-5410 or groom@u.washington.edu

* * * * *

On PHP, Python, blogging, and learning

A question from comp.lang.php:

So, here’s my delimna: I want to start a blog. Yeah, who doesn’t. Yet, I want learn the guts of it instead of just booting up some wordwank or whatever.

Here’s a simple computation to consider… WordPress’ codebase is approximately a megabyte of PHP code and megabyte of JavaScript code. Assuming that the average line of that code is 50 characters long, you are looking at 20,000 lines of code in PHP and as many in JavaScript. Based on the notion that the average developer out there writes 100 lines a day, either you’re in for a two-year project or your product is going to have seriously reduced functionality compared to something that’s been freely available for years. What’s your choice?

Then I run across that blog, Coding Horror, and start reading articles like this:

http://www.codinghorror.com/…

You should read what some computer scientists write about SQL… 🙂

Now what?

Nothing. Everyone is entitled to their opinion. You are free to form your own.

I’ve taken basic basic and basic C, but am barely literate in html.

Maybe that (and some JavaScript) is something to work on first before delving into server-side programming?

Well, that’s my actual question, then. Is php really so bad I’m just wasting my time? Or is it really the quickest way to blog functionality?

The quickest way to blog functionality is an account on a blogging service… 🙂

Would I be better served in the long run learning python, which claims to be easy as pie to learn/program (still looks hard to me). I admit I’m no code geek. But, I’m not completely brain dead, either, and I need something to keep my geezer brain sparking. What say ye?

If the purpose is to keep the brain sparking, it doesn’t matter what you learn as long as you’re enjoying the process. You might as well take up Japanese while you’re at it…

* * * * *

Another poster interjects:

If the OP wants to learn the guts of the blog or to implement the blog from scratch, Python/Django would be a better choice than PHP. The reason is that he can reuse and customize existing high quality components for all these auth/auth, admin, comments, etc, etc, etc.

You are comparing apples to oranges… There are application frameworks for PHP as well (CakePHP and Symfony come to mind). CakePHP, if memory serves, actually has development of a blog described in its tutorial…

Another reason is that Python and Django encourage very clean design while PHP is too often ends up in “spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML”.

It’s absolutely the same thing with PHP frameworks…

2 man/year in PHP == 2 man/week in Python/Django.

This, I daresay, is an exaggeration… Let’s take your own example:

And there are Python/Django blog applications that already do almost everything (and maybe more) that WordPress does. http://byteflow.su/ is one of them (IMHO the most promising).

A quick look at the revision log reveals that the initial commit of 60 or so files has been done on 08/14/07 (10 months ago), a second developer came on board on 12/01/07 (seven+ months ago), a third one, on 01/04/08 (six+ months ago), a fourth one, on 01/16/08 (also six+ months ago). There are at least nine discernible contributors overall. Say what you will, but it still looks an awful lot like like two man-years, Django or no Django…

The gold bug bites again

A question from Yahoo! Answers:

I have been doing a lot of research on the gold standard. Since hearing Ron Paul talk about it, I have been a supporter of it. Even though this is the case, I still have questions about it.

Let’s say we went to a gold standard, where would we get the gold to back the dollar and how would we pay for it?

Would the dollar be indexed to population growth? I am asking this because over the last century our population has grown substantially. Are we supposed to keep the amount of gold notes in circulation the same as our population grows? Wouldn’t this put a strain on the working class? Take for example there are 10 people that are in a market with $100. They each work to compete to get a hand at the $100. Let’s add two more people. This makes the access to wealth more difficult. Let’s add 30 more people with a $100 market. That would be 42 people in the market of only $100. As the population grows the ability to access the $100 lessens. Am I right?

You’ve got to be kidding… The gold standard is the fastest way to the next world war.

Under the gold standard, a nation can expand its money supply only as far as its gold stock allows. To expand its gold stock, a nation must have a trade surplus. So expanding the money supply under the gold standard is only possible if a nation has a trade surplus.

Now recall that expanding money supply is the quickest way of ending recessions and thus keeping the population gainfully employed and reasonably happy. But under the gold standard, it is only possible if a nation has a trade surplus, so governments, much like they did between 1880 and 1913, would start working on ensuring that their nations always have a trade surplus.

In practice, just like 100 years ago, it would take the form of pressuring other countries into opening their markets for your exports while keeping imports off your domestic market. The pressure tactics would gradually escalate from diplomacy to the threat or war, until everyone is threatening everyone else.

* * * * *

Another poster interjects:

I have some issues with the idea that a de-monetised currency such as the USD with an open money supply leads to a stable economy. It leads to debasement and government theft of national wealth from it’s people.

The fact that you “have some issues with the idea that a de-monetised currency such as the USD with an open money supply leads to a stable economy” attests only to your unwillingness to look at history. Stupid games with a rare metal doubling up as a currency led to two great depressions (the one of 1929 and the one of 1873, which was even worse) and two world wars, which is exactly why J.M. Keynes called the gold standard “a barbarous relic”.

You say, “it leads to debasement”. But of course it does! A mild debasement is absolutely necessary to give the private sector some inducement to invest rather than hoard money. You really should read up on deflation…

As to “government theft of national wealth from it’s people”, it’s no worse than taxation and way better than having to fight world wars…

As a concluding thought, you might consider the idea that the gold standard is an arrangement that benefits the leisure class (by ensuring that the value of their precious metal holdings goes up) at the expense of the working population (deflation discourages investment and thus drives up unemployment).

My take on Wicked

A question from Askville:

Has anyone else read the book Wicked, by Gregory Maguire? What did you think of it?

Did you find it an easy, smooth read? Or difficult to get through? Did you like the main character, Elphaba? or feel any connection to her?

In general what type of “feeling” did this book give you – happy, depressed, excited – couldn’t wait to pick it up again, or couldn’t wait for it to end?

I thought first two thirds were superb and sophisticated fantasy (the politics around Animals was a great twist, even though the concept of an Animal, including spelling, was clearly borrowed from C.S. Lewis), although I couldn’t shake off a strange feeling that Elphaba is somehow an otherworldly female version of Aureliano Buendia (One Hundred Years of Solitude by Gabriel Garcia Marquez), developing along the same lines — from a lonely child to a sexually frustrated young adult to a revolutionary to a misunderstood (but reputably evil) recluse. Reading the last third or so of the book, I felt like the author lost interest in completing it, but finished it anyway (possibly, under pressure from the publisher or friends who read the early parts and demanded the ending) as soon as he could, so in the end it was disappointing.

I had a great time reading it (the first two thirds anyway), but I will probably not read it again.