Zend Studio for Eclipse Drupal formatter

For years I've been a paying customer of Zend, using their Zend Studio Professional. They discontinued production of their custom Java version and opted to switch to making plugins for Eclipse.

I'm just now switching from the old Zend to the new one and discovered a formatter to handle all the code spacing automatically. Naturally, since I do most of my work with Drupal, I made a custom formatter file to follow coding standards for 4.7.x to 6.x. There have been some standards changes to take effect for D7, and I'm not coding for that yet, so this should be a good file for a general audience.

In your Zend for Eclipse or PDT install, go to the preferences, PHP section, Formatter and Import... the attached XML file.

Don't forget to also run your code through the coder module, which will not only check your coding style, but look for upgrades, database injections, and some other cool things.


Bah humbug Yahoo!

I signed up for a free website with Geocities in 1997 and shortly thereafter discovered and became part of the Community Leader program. We made websites and "patrolled" our local "communities" for good and bad content. Award programs, forums, and lots of friends were made. Geocities even thanked us Community Leaders by giving us a distribution of stock when they went public, expanding the available disk space in our homepages, and sent us t-shirts.

In 1999, Yahoo! bought Geocities, dismantled the group of volunteer Community Leaders, and buried the whole concept of communities of neighborhoods and blocks that made Geocities so unique.

I moved off to college and left most of what I knew about the old Geocities behind, but I did occasionally reference the webpages I created over the years, even still today. When I asked out the girl who is now my wife, I created a HTML file about it on my Geocities site, which is now gone. I even had someone at my new job find my Geocities site through Google about 2 weeks ago when they were searching for some information I had published there.

Tonight, I decided to finally upgrade to the premium service for Geocities to get FTP access to my files. I've been reluctant to do it for years, but gave it a whirl anyway. As soon as I submitted the upgrade order, all my Geocities site was deleted. I didn't even get to use the FTP "feature" to download the files into a backup. If I had known that would happen, I would have saved the money and used the DownloadThemAll! Firefox addon to just download the view links in the free File Manager in an automated way.

When I read the policy to discontinue the premium service, I don't even get a refund on the unpaid days I won't use. I won't use them because I yanked my decade-old account in my disgust. I had previously included Yahoo! in my list of webhosts as the cheap option when people ask me where to host, but I do not recommend places I have bad experiences with. Currently, my list of recommendations is reduced to Pair, Cubesoft, and Joyent. People ask why each of those are so expensive; I don't think they're expensive at all. You get what you pay for. In the case of Geocities, I have paid and have nothing.

As I reflect on what I've done with regards to this, I can't help but be comforted with my decision since Yahoo! is all mangled up with talks of getting sold or merging with other big monster companies. I'm especially not fond of the prospect of Microsoft getting even larger.

Publicly traded websites like Yahoo! are, if they haven't already, losing their way in the wake of finding ways to grow. I wonder why not more owners don't just find a comfortable size and sell or spin off the rest.

So for anyone who knows what my old Yahoo!/Geocities account was, I have finally shed it, all the spam it's mail account received, and the last remnant of the nickname from my online life.


Confidential GPL?

I just dumped all over a someone who wanted me to do some work on their Drupal site and probably in the process walked away from doing work with them because the wanted me to sign a confidentiality agreement.

I have only ever signed a confidentiality agreement once, and it was when I did some work for Google. I only did it then because I thought it would be cool to say I worked for Google. I think then the agreement was 13 pages, so when this prospect sent me a 5 page agreement, I didn't think it'd be an issue until I read things like systems, inventions, computer software programs, consultants, employees qualifying as confidential information. They also had a clause where I would have to return all copies of anything to them when we cease business dealings.

So, I simply declined to sign, mentioned something about using reasonable judgment, and tried to explain why open source and Drupal continue to succeed. By tying my hands on what I would be able to discuss when debugging or what improvements to contrib modules I could give back, I'd be participating in hampering the optimal future success of the client and not doing my part to "pay" for the free software I so easily download.

I've said before, and it falls on deaf ears, if you make your living from an open source project, it's only right to give back to ensure its survival. That's why I've committed to financial donations every week alongside my code contributions.

Release your code, it's worthless anyways takes a slightly over dramatic view of it, but your code and attempts to keep it confidential are and old-fashioned effort that is no longer optimal. It is what you do with that code that is the new way of becoming an internet success. Use the open source environment as a resource for receiving other free contributions, bug reports and fixes and you'll outperform those who have the expensive in-house budgets to keep it all secret.


Government deficits

Last night I read a point of view by Walter J. Wessels on the fiscal policy, government spending and taxation. He talked about the Laffer curve and how it is a part of the guideline for our progressive tax system. The progressive tax system where rich pay more is a kind of built-in stabilizer for the economy since if someone were to become unemployed or take a lesser paying job in an economic downturn, their relative change in their impact on GDP wouldn't be as bad as far as taxes are concerned.

What I was more concerned about was the impact of government deficits. The formula for it is quite simple:

Government spending = Tax revenues + Deficit

The US government (read: the US citizens) have several trillion dollars of debt now, over 9 trillion according to the Treasury. With economic growth, people earning more a week than their grandparents, does that debt matter?

The theory goes that eventually that debt, sold as government bonds, will have to be paid back. From what I can tell, there will always be some amount of government bonds sold on the market, which is not mentioned as part of this theory. Considering that the debt will all have to be paid back, the citizens would have to be collectively saving the amount that is accumulating as public debt.

Just taking some rough numbers, I see the public has been saving roughly $200 billion a year according to the St. Louis Federal Reserve Bank. On the other hand, the US National Debt Clock estimates the national debt increasing at $1.65 billion per day. 1.65*365 = $602 billion of debt accumulation per year (a gap of $400 billion between what people are saving to have in reserve to have for paying off the national debt versus what is being accumulated.

Still, perhaps that doesn't matter. Economists have come to the conclusion that a deficit that stimulates the economy out of a recession into full employment will be a benefit, not a burden. So then we should examine were employment has been.

The Bureau of Labor Statistics unemployment chart shows over the last 10 years or so that we've been accumulating debt, we have already been hovering around full employment rates since 5 percent is considered to be about full employment level since some people will always be quitting a job to look for a better one or inefficient companies get self-weeded out of the economy.

So what happens then when the government is stimulating the economy with tax cuts, more active open market operations from the Fed, and so on? According to my reading, deficits incurred when the economy is near full employment can be harmful. If people were to stop buying government bonds to renew the outstanding pubic debt and fund the new projected debts in social programs like medicare, the only possible outcomes are for the government to reduce spending, increase taxes to pay for spending as it happens, attract international investment, or print more money. Printing more money is the one thing that will absolutely lead to inflation.

We have attracted lots of international investment over the years. You might recall just recently the US dollar fell pretty sharply against the Euro. People were dumping their investments here from international sources. A falling dollar makes it harder for US citizens to buy all the products that have moved overseas to be produced because we have to spend more dollars across the exchange rate.


Automate unchecking checkboxes

I'm doing some testing of an upgrade for a site from Drupal 4.7.x to 5.x. As part of the major version upgrades in Drupal, you're supposed to disable all the modules you have installed. Since I got tired of unchecking boxes, I used the Greasemonkey addon for Firefox 2 to do it for me.

Once the addon is installed, right click on the monkey face in your status bar and make a new user script.

name: Uncheck Boxes
namespace: uncheck_boxes
description: Unchecks all checkboxes that are enabled by default
include: http://yourtestlocation/admin/modules

When you hit ok, your default text editor will ask you for script content.

// ==UserScript==
// @name           Uncheck Boxes
// @namespace      uncheck_boxes
// @description    Unchecks all checkboxes enabled by default
// @include        http://davidnorman.local/test25/admin/modules
// ==/UserScript==

var chkboxes=document.getElementsByTagName('input')
for (var i=0; i < chkboxes.length; i++) {
  if (chkboxes[i].type=="checkbox") {
    chkboxes[i].checked=false
  }
}

That's it! Reload your modules page and all the checkboxes should be unchecked by default. When you're done disabling, you can right click the monkey face and uncheck your Uncheck Boxes script, disable Greasemonkey, or leave it available for other sites you want to uncheck by default.


123456789next ›last »
Syndicate content