Posted by & filed under Developer Blog.

It appears that the BB Moderation Hold plugin hasn’t updated for newer versions of BB Press. The moderation links are not appearing in the admin navigation and when you click “moderate” from within the post itself as a moderator it redirects to the homepage rather than taking you to the moderation pages.

The fix for both issues is rather simple, but requires editing the php code in the plugin itself. Simply open up moderation.php and make the following tweaks:

Change:

 bb_admin_add_submenu(__('Topics for Moderation'), 'moderate', 'bb_moderation_hold_topic_admin_page', 'content.php' );

To:

 bb_admin_add_submenu(__('Topics for Moderation'), 'moderate', 'bb_moderation_hold_topic_admin_page', 'topics.php' );

Change:

 bb_admin_add_submenu(__('Topics for Moderation'), 'moderate', 'bb_moderation_hold_topic_admin_page', 'content.php' );

To:

 bb_admin_add_submenu(__('Topics for Moderation'), 'moderate', 'bb_moderation_hold_topic_admin_page', 'posts.php' );

You are basically changing both instances of ‘content.php’ to ‘topics.php’ and ‘posts.php’ respectively.

Now when you replace moderation.php on your server you should see extra links under the posts and topics sections and you should be taken to the appropriate pages when moderating.

Posted by & filed under Developer Blog.

(It turns out I’m a fan of using puns for titles)

A great man once gave me some very personal and sound advice. Among other very important things, he admonished me to “Learn about history. Learn from the lessons of the past.” I was only 19 at the time, and took what he said as a suggestion to take a history class in college. Since that time, however, I have thought a lot about what he really meant. What learning history would really do to benefit my life or perhaps even the lives of others.

I think I’m starting to understand it now and would like to share this revelation with you. I think what’s really important for all of us, no matter what our calling in life may be, is to understand our place in history so that we can more purposfully contribute to tomorrow’s history.

As an Art major at the University of Utah, we were required to take a certain number of Art History classes. It bothered me at first that even though I had a painting and drawing emphasis, I was being forced to study the difference between the Northern European and the Italian renaissance. How would that help me paint better?

It wasn’t until later in my college career that I realized the importance of it, and that realization directly relates to the point I’m trying to make in this post. What I realized—or more correctly, what I was taught—is that in order to contribute something to the art world as a whole, you must first understand where that world has been and try to determine where it is going. Your relevance is determined by all that has come before you. You can’t even rebel against something until you fully understand what that something is, what it represents, what it means to everyone else. As far as I’m concerned it’s the main difference between an artist and someone who makes art. It’s the difference between Pablo Picasso and Thomas Kinkade.

So what does this have to do with me? What does this have to do with you? I have come to realize that no matter what your calling, whether it be a homemaker or a business owner, you will never fully reach your potential until you realize your place in history. Who came before you to get you where you are? What are you doing to benefit those who will come after you?

As a web developer I know that I am standing on the shoulders of giants such as Google, Amazon, and the like. I also recognize that many of the solutions to my problems have been provided to me by other developers facing similar problems who have posted their solutions for all to read. The reason I run my developer blog is to try and give something back. To try and help those just starting out or struggling with a particular problem. In so doing I am leaving my own mark on history. Strange as it may seem to a non-developer, my posting a solution to a javascript problem is literally my story. Internet millionaire turned essay writer and author, Paul Graham, once wrote something to the effect that programmers of today are the equivalent to the Renaissance Men of the 15th century. Just as society for the past 600 some-odd years has been greatly influenced by those men, so shall computer programmers dictate our society for centuries to come. Not only do I agree with his point of view, it gives me a thrill to realize that I’m right in the thick of that “movement.”

What’s your history? What’s the historical value of what you do every day? How are you lending yourself to shaping the future?

Posted by & filed under Developer Blog.

The slideUp() method in JQuery is intended to hide the element rather than reveal it. It is basically the opposite of slideDown() which “unhides” your element by sliding it down.

As you can see on this blog, I have an “About Jason Gill” tab in my heading. When clicked, this tab reveals information about who I am by sliding upward. In figuring out how to do this, I of course consulted the Google gods and came up with a lot of people asking how, but few people providing answers. So, I’ve decided to post the solution I finally came up with hoping it will benefit others.

Basically, I am using two different effects to create what looks like one effect. What you are seeing is essentially a slideDown() in conjunction with an animate() effect. The animate() is literally moving the info box upward at the same speed it is sliding down (in my case, “slow”).  I just had to measure the height of the #about_me box and animate it upward exactly that many pixels (in my case it was 171 pixels). To close the box, I simply animate downward at the same rate I slideUp. Technically, I’m using animate in conjunction with slideToggle(), but you get the idea.

You can take a look at my source, but I’ll post the javascript here for your convenience:

$(document).ready(function(){
	var opened = false;
	$("#about_tab").click(function(){
		if(opened){
			$("#about_me").animate({"top": "+=171px"}, "slow");
		}else{
			$("#about_me").animate({"top": "-=171px"}, "slow");
		}
		$("#about_content").slideToggle("slow");
		$("#about_tab .close").toggle();
		opened = opened ? false : true;
	});
});

Posted by & filed under Personal Blog.

Why I support the Public Option.

Healthcare reform is more directly related to my life, my liberty, and my pursuit of happiness than any other issue on the political landscape. I support the public option, here’s why.

Intentions

Before I start allow me to state my intentions. It is not my intention to start a political flame war. It is not my intention to be facetious or satirical (which, frankly, is un-usual for me, I know). I don’t think my intention is to persuade others and it is certainly not my intention to force my beliefs on anyone else. I am well aware that very few of us are going to change our opinion based on something we read on Facebook or Twitter, let alone some web dude’s personal blog. On the contrary, I merely wish to express my understanding, my reasoning, and ultimately my decision when it comes to the healthcare reform debate. It is as much for my own good to sort of get these ideas out of my head and into writing. If it helps you to understand where I stand, so be it. If it doesn’t help you, so be it. But please understand that at this point I doubt what you say will change my mind either. All comments will be moderated.

Where I Stand

I am not affiliated with any Political Party. I consider myself to be a moderate and an independent. I choose this path because it forces me to look at each and every issue and every candidate at face value, rather than simply rooting for the “home team.” I’m surprised sometimes at how this can often make you more of an outcast than if you are a party member (“pick a side, you wuss!”). Simply put, I believe the sooner both parties start to treat this Nation as an advanced civilization and less like a football game, the better off we are going to be.

That being said, I had a long, fought out, internal struggle when it came to healthcare reform. I could see and understand the arguments on both sides of the issue and I wasn’t willing to believe a lot of the rhetoric until I could get my hands on some facts and study it out in my own mind for a few months. I attempted to be open to both sides of the argument and spent a lot of time listening to both conservative and liberal radio/TV to hear what each side was saying. But more importantly I spent a lot of time studying and thinking.

Free Market vs. Government Run

At it’s very core the ultimate goal of politics is to provide us solutions to problems. Like so many problems we face in America, the healthcare debate comes down to a question of whether the solution should be left to the free market—otherwise known as capitalism—or to the government—otherwise known as socialism. As for me, I generally favor free market approaches and consider myself to be a Capitalist at heart. I believe that entrepreneurship and competition fuel innovation and are generally healthy for our economy and for the consumer. However, I do not believe either solution to be the answer to all of our problems.

(For a while there, I was confused as to the difference between communism and socialism and it wasn’t until I did some extensive personal research that I began to understand the differences and connections between the two. I fear that too many Americans have not done their homework and still believe the two to be one and the same. They are not.)

The Problem

The problem I see with our current healthcare situation is that it greatly lacks the components of a free market solution that make it desirable. Let me explain:

Competition

Capitalism takes full advantage of competition. Competition is favorable because it makes use of the democratic nature of consumerism. If a consumer is unhappy with one competitor, he/she can simply choose to do business with the other. This forces the competing entities to become more efficient, more cost effective and at the end of the day, more desirable.

So, I took a look at how the healthcare system works in my own life. My employer chooses an insurance company, who in turn chooses which healthcare providers I can and cannot do business with. I am left with two choices: 1) go with what my employer has decided for me and therefore what the insurance company has chosen for me, or 2) buy insurance on my own. The latter choice will result in my cost being doubled, and in a consumer driven, free market sense is not really an option at all. If I—the consumer—am unsatisfied with my healthcare provider, I do have some options and can choose to do business elsewhere provided they are “in-network” and fall under the options that the insurance company has chosen for me. OK, good. Capitolism at it’s best. Right? Well, sort of. What happens when I am unhappy with my insurance company?

The fact of the matter is, I am not the consumer when it comes to the insurance companies. My employer is. The insurance companies are competing to keep my employer happy. What makes my employer happy? The same thing that makes the insurance companies happy: spending less on healthcare. The more my insurance company denies claims, the less my employer has to pay out of his pocket as well. While my employer does have some interest as to my own personal well being, they have a far greater interest in cutting costs and increasing revenue. There’s nothing wrong with that, it’s how my employer is able to compete and in the end make our consumers happy. But at the end of the day, insurance companies have a greater incentive to provide me less in order to provide their real customers more.

The public option does not cut out competition, it increases it. And more importantly, it brings the competition back to the appropriate focus, which is on me not my employer. My employer will in turn be cutting costs by losing the burden of those employees who choose to use the public option. It’s a win for both consumers and will force insurance companies to do more to compete on both levels.

Entrepreneurship

One of the components that makes Capitalism great is entrepreneurship (and yes, I did consult my spell checker to get that one right). The reason I bring it up now is because I believe that our current healthcare system squashes entrepreneurship! The number one reason that I am afraid to quit my job and start my own company is that my family and I will lose the healthcare benefits provided by working for someone else. Starting a company is risky enough as it is. I would have a much greater incentive if I weren’t passing more of that risk on to my family.

The public option would allow me to work for an employer, work for myself, and then go work for an employer again, without any change in benefits, without any change in cost and without added risk.

History Lessons

Without the consumer voice I mentioned earlier, we are allowing insurance companies to take unfair advantage of those of us who do not have the power to protect ourselves. I don’t see healthcare reform much different than anti-trust laws or child-labor laws set up to prohibit capitalists from taking an unfair and harmful advantage. History has shown us that giving the free market too much power is just as dangerous as giving the government too much power.

According to Thomas Payne in his famous pamphlet Common Sense, the very purpose of government is to provide us protection. His words are far better than my own (bolding added for emphasis):

Society in every state is a blessing, but government even in its best state is but a necessary evil in its worst state an intolerable one; for when we suffer, or are exposed to the same miseries by a government, which we might expect in a country without government, our calamity is heightened by reflecting that we furnish the means by which we suffer! Government, like dress, is the badge of lost innocence; the palaces of kings are built on the ruins of the bowers of paradise. For were the impulses of conscience clear, uniform, and irresistibly obeyed, man would need no other lawgiver; but that not being the case, he finds it necessary to surrender up a part of his property to furnish means for the protection of the rest; and this he is induced to do by the same prudence which in every other case advises him out of two evils to choose the least. Wherefore, security being the true design and end of government, it unanswerably follows that whatever form thereof appears most likely to ensure it to us, with the least expense and greatest benefit, is preferable to all others.

I wholeheartedly agree with Payne’s argument. And I personally believe that in the case of healthcare reform, it is the lesser of two evils to allow our government to provide us with added security.

My Decision

In summary, in spite of the fact that the Public Option is a government run solution, it will do more to further capitalism than to hinder it.  It will redirect the focus of competition onto the public consumer where it belongs and in so doing will promote a more favorable free-market environment. It will lessen our risks and increase our securities. I choose to support the Public Option.

Posted by & filed under Developer Blog.

I have multiple versions of the Rails gem installed on my development server. We’ve been using Rails long enough now that we have many apps created for many versions. As I make changes to each app I need to test them in their specific version (the version listed in the environment.rb file) so having multiple Rails versions installed is a necessity.

But if I try to spin up a new application using

$rails new_app

I get a rails app created specifically for the latest version of Rails installed.

But what if you need to create a new app for an older version of rails that is also installed? The following easy command does the trick:

$rails _1.2.3_ new_app

Where 1.2.3 is the desired version of Rails I want new_app to run. Note the underscores before and after the version.