Monday, September 27, 2010

Atheism

Just letting the world know: I am now an atheist. I will expand this post later with reasons why, but I have recanted all my former beliefs I held as a Mormon.

Saturday, June 06, 2009

Wednesday, April 15, 2009

From boortz.com comes some sanity:

To All My Valued Employees,

There have been some rumblings around the office about the future of this company, and more specifically, your job. As you know, the economy has changed for the worse and presents many challenges. However, the good news is this: The economy doesn't pose a threat to your job. What does threaten your job however, is the changing political landscape in this country.

However, let me tell you some little tidbits of fact which might help you decide what is in your best interests.

First, while it is easy to spew rhetoric that casts employers against employees, you have to understand that for every business owner there is a back story. This back story is often neglected and overshadowed by what you see and hear. Sure, you see me park my Mercedes outside. You've seen my big home at last years Christmas party. I'm sure; all these flashy icons of luxury conjure up some idealized thoughts about my life.

However, what you don't see is the back story.

I started this company 28 years ago. At that time, I lived in a 300 square foot studio apartment for 3 years. My entire living apartment was converted into an office so I could put forth 100% effort into building a company, which by the way, would eventually employ you.

My diet consisted of Ramen Pride noodles because every dollar I spent went back into this company. I drove a rusty Toyota Corolla with a defective transmission. I didn't have time to date. Often times, I stayed home on weekends, while my friends went out drinking and partying. In fact, I was married to my business -- hard work, discipline, and sacrifice.

Meanwhile, my friends got jobs. They worked 40 hours a week and made a modest $50K a year and spent every dime they earned. They drove flashy cars and lived in expensive homes and wore fancy designer clothes. Instead of hitting the Nordstrom's for the latest hot fashion item, I was trolling through the Goodwill store extracting any clothing item that didn't look like it was birthed in the 70's. My friends refinanced their mortgages and lived a life of luxury. I, however, did not. I put my time, my money, and my life into a business with a vision that eventually, some day, I too, will be able to afford these luxuries my friends supposedly had.

So, while you physically arrive at the office at 9am, mentally check in at about noon, and then leave at 5pm, I don't. There is no "off" button for me. When you leave the office, you are done and you have a weekend all to yourself. I unfortunately do not have the freedom. I eat, and breathe this company every minute of the day. There is no rest. There is no weekend. There is no happy hour. Every day this business is attached to my hip like a 1 year old special-needs child. You, of course, only see the fruits of that garden -- the nice house, the Mercedes, the vacations... You never realize the back story and the sacrifices I've made.

Now, the economy is falling apart and I, the guy that made all the right decisions and saved his money, have to bail-out all the people who didn't. The people that overspent their paychecks suddenly feel entitled to the same luxuries that I earned and sacrificed a decade of my life for.

Yes, business ownership has is benefits but the price I've paid is steep and not without wounds.

Unfortunately, the cost of running this business, and employing you, is starting to eclipse the threshold of marginal benefit and let me tell you why:

I am being taxed to death and the government thinks I don't pay enough. I have state taxes. Federal taxes. Property taxes. Sales and use taxes. Payroll taxes. Workers compensation taxes. Unemployment taxes. Taxes on taxes. I have to hire a tax man to manage all these taxes and then guess what? I have to pay taxes for employing him. Government mandates and regulations and all the accounting that goes with it, now occupy most of my time. On Oct 15th, I wrote a check to the US Treasury for $288,000 for quarterly taxes. You know what my "stimulus" check was? Zero. Nada. Zilch.

The question I have is this: Who is stimulating the economy? Me, the guy who has provided 14 people good paying jobs and serves over 2,200,000 people per year with a flourishing business? Or, the single mother sitting at home pregnant with her fourth child waiting for her next welfare check? Obviously, government feels the latter is the economic stimulus of this country.

The fact is, if I deducted (Read: Stole) 50% of your paycheck you'd quit and you wouldn't work here. I mean, why should you? That's nuts. Who wants to get rewarded only 50% of their hard work? Well, I agree which is why your job is in jeopardy.

Here is what many of you don't understand ... to stimulate the economy you need to stimulate what runs the economy. Had suddenly government mandated to me that I didn't need to pay taxes, guess what? Instead of depositing that $288,000 into the Washington black-hole, I would have spent it, hired more employees, and generated substantial economic growth. My employees would have enjoyed the wealth of that tax cut in the form of promotions and better salaries. But you can forget it now.

When you have a comatose man on the verge of death, you don't defibrillate and shock his thumb thinking that will bring him back to life, do you? Or, do you defibrillate his heart? Business is at the heart of America and always has been. To restart it, you must stimulate it, not kill it. Suddenly, the power brokers in Washington believe the poor of America are the essential drivers of the American economic engine. Nothing could be further from the truth and this is the type of change you can keep.

So where am I going with all this?

It's quite simple.

If any new taxes are levied on me, or my company, my reaction will be swift and simple. I fire you. I fire your co-workers. You can then plead with the government to pay for your mortgage, your SUV, and your child's future. Frankly, it isn't my problem any more.

Then, I will close this company down, move to another country, and retire. You see, I'm done. I'm done with a country that penalizes the productive and gives to the unproductive. My motivation to work and to provide jobs will be destroyed, and with it, will be my citizenship.

If you lose your job, it won't be at the hands of the economy; it will be at the hands of a political hurricane that swept through this country, steamrolled the constitution, and will have changed its landscape forever. If that happens, you can find me sitting on a beach, retired, and with no employees to worry about....

Signed,

Your boss

Wednesday, March 04, 2009

CSV Pirate

I needed a way to handily create CSVs anytime I want to because I have clients that ask for reports of data all the time. So I wrote a plugin and then turned it into a gem!

The source is written in Piratey Ruby.

So check my source =)

http://github.com/pboling/csv_pirate

Wednesday, November 05, 2008

Sanitize Email: Never worry about sending email in development again

SanitizeEmail
=============

This plugin fills a gaping hole I have found in every one of the Rails projects I've worked on.

SanitizeEmail allows you to play with your application's email abilities without worrying that emails will get sent to actual live addresses.

This is the problem I have with site after site:

1) I have a production site with live data.
2) I dump the live data and securely transfer it to another machine (rync -e ssh), and import it using scripts that I will soon open source
3) On this separate machine (staging, or development) I run tests, and test various features.
4) I usually want the emails to get sent from these non-production evnironments so I can verify what they look like when sent,
but I don't ever want to risk them getting sent to addresses that are not mine.

So I wrote this plugin! :P

It is an "install it and forget it" type plugin that requires very little setup. It includes some very innocuous monkey patching of ActiveRecord::Base to work its magic.


Install
=======
./script/plugin install git://github.com/pboling/sanitize_email.git



Setup
=====

It only requires a few lines of configuration:

Rails 1.x:
Add to bottom of environment.rb

Rails 2.x:
Use an initializer, stick it in any initializer file, or create a new one for sanitize_email

Add this bit and customize for your app:

    #Settings for sanitize_email plugin:
#Overrides the recipients of all outgoing mail in local environments
ActionMailer::Base.sanitized_recipients = "developer@example.com"

#Overrides the BCC of all outgoing mail in local environments,
# but only if a BCC is specified on the message
ActionMailer::Base.sanitized_bcc = "developer@example.com"
#Or you can override bcc's with a nil value thereby ignoring the bcc in mail sent from the local_enviroments
#ActionMailer::Base.sanitized_bcc = "developer@example.com"

#Overrides the CC of all outgoing mail in local environments,
# but only if a CC is specified on the message
ActionMailer::Base.sanitized_cc = "developer@example.com"
#Or you can override cc's with a nil value thereby ignoring the cc in mail sent from the local_enviroments
#ActionMailer::Base.sanitized_cc = nil

#These are the environments whose outgoing email BCC, CC and
# recipients fields will be overridden! All environments not listed will be treated as normal.
ActionMailer::Base.local_environments = %w( development test )


But wait there's more:

Let's say you have a method in your model that you can call to test the signup email.
You want to be able to test sending it to any user at any time... but you don't want
the user to ACTUALLY get the email. A dilemna, yes? Not anymore!

All your mailers get a force_sanitize clas method which takes precedence over the environment override.

When force_sanitize is nil it will not be used by sanitize_email to detrmine if it should override the recipients, bcc, and cc


Example
=======

So here's how you can use force_sanitize to override the override.

Even if you set:
ActionMailer::Base.local_environments = %w( development )

And are in the development environment, you can override the override anywhere in your code.

class User < ActiveRecord::Base
def test_signup_email_me_only
UserMailer.force_sanitize = true
UserMailer.deliver_signup_notification(self)
UserMailer.force_sanitize = nil
end

def test_signup_email_user_only
UserMailer.force_sanitize = false
UserMailer.deliver_signup_notification(self)
UserMailer.force_sanitize = nil
end

#this third method would conditionally use the overridden recipients based on current Rails environment
def test_signup_email_environment
UserMailer.deliver_signup_notification(self)
end

end


Load the console with ruby script/console and regardless of what environment you are in:

User.find(4).test_signup_email_me_only


and the email will have it's recipients, bcc, and cc overridden to be whatever you set the sanitized values to be.
Then if you want to send it to the actual user, instead of yourself

User.find(4).test_signup_email_user_only


That's it! Enjoy!

Copyright (c) 2008 Peter H. Boling of 9thBit LLC
Released under the MIT license

Thursday, October 30, 2008

BrowserWar (or how to fight IE*)

A BrowserWar is coming soon to an interweb near you!

The source is available on Github, or there's my fork of it.

Matt Long, of Sagebit, and I wrote it over the past few days. It will kick crappy browsers right in the face!!!

Fork and tweak to your heart’s content! Please send pull requests if you find any bugs or new features.

It is the first open source project Sagebit has released on our new website.


Soon we'll release a Ruby on Rails plugin that gives you a neat helper method to set up a browser war in your view templates to fight IE, or whatever other browser you have a vendetta against.

Example usage (edit bottom of browserWar.js, or can be called within a
tag in HTML files):

browserwar.setup();
browserwar.klass('', 'browser_warning', true);
browserwar.message('You are using ' + browserwar.browser_display_name + " " + BrowserDetect.version + '. To get the best experience from this site we suggest you upgrade your browser.');
browserwar.position('90px','0px','200');
browserwar.linkcolors('blue','red','purple')
browserwar.style('200px','20px','8px ridge #CE8DAD','#fff','#000');
browserwar.fight('Explorer', 6);
browserwar.fight('iCab');
browserwar.run();



Sweet! IE will lose the war!

Tuesday, October 21, 2008

Barack Obama is wrong on taxes

I believe that Obama's ideas, even if plainly stated, are much worse than McCain's.

What you've heard about Obama only raising taxes on the rich is out of line with reality, and that's because you probably heard it 'from' Obama, or one of his supporters.

The wealthiest 10% of America pay 70% of the tax burden.
The bottom 50% pay only 3% of the tax burden, and the majority of those end up having a net gain from the government (meaning they benefit more than they pay - medicare / social security, etc)

Obama intends to raise many taxes, including ones that will hurt the 'everyman', like the capital gains tax. Know anyone on a pension? They'll get hurt. Know anyone with any kind of retirement plan? (401K, IRA, etc) They'll get hurt. By hurt I mean they'll pay higher taxes.

Oh and for all of Obama's talk about McCain wanting to lower the taxes that Oil companies pay, (which would help make more US based reserves, like oil shale in the rocky mountains, economically feasible for production)... what no one is saying is that they are giant benefactors of our government. Let's take just one of them:

ExxonMobil:
http://www.prodromus.com/2008/08/01/exxonmobil-pays-world-record-32-billion-in-taxes-during-q2

They are on track this year to break the record 100 BILLION dollars in taxes they paid last year. HOLY WOW!

Here's a pertinent quote:
"Newsmakers were quick to point out that the amount of taxes that ExxonMobil paid works out to $4,114 in taxes per second. And, every American would have had to pay an extra $100 last quarter if ExxonMobil did not pay their fair share of taxes.

Due to the high level of taxation, capital and exploration project spending only increased to $7 billion in the second quarter. Given the heavy tax burden, the company stock price slumped another 2.7%, causing losses in millions of 401K owners portfolios. Over $10 Billion in value was wiped out of stock investor’s holdings after this announcement. Individual investors are calling for tighter regulations on Big Government, demanding new WindFall Tax protection."

In other words they already pay too much, and Obama wants them to pay more. They are currently paying more than 50% of their net income before taxes in taxes. More than 50%. Wait read it again. More than 50%. One more time. More than 50%.

So yeah I'd be glad to loosen their collar a bit. This country needs energy sector innovation... not to be drilled into the ground by taxes.

So I'm voting Nobama in two weeks... i.e. McCain.

Barack Obama sells snake oil?

Obama is a wolf in sheep's clothing. He is selling snake oil to the poor: social services, and government handouts. He's paying for it by taxing the rich, killing innovation and sending more Jobs overseas to countries that have lower business tax rates. McCain's talk about the US having the second highest biz tax rate in the world, isn't fluff, it's an important factor of deciding where to build factories and employ people!

It isn't class warfare, it's CLASS WARFARE. Since I want to live the American Dream and become rich and employ others, I am appalled by everything Obama stands for. And what he would do to the supreme court would be an atrocity. "Legislation from the bench" from liberal judges is probably one of the biggest, and most underreported issue of our time. Obama would not put people on the Supreme court who care about the constitution.

Obama himself said that he thinks Health Care is a right. It is not a right. It is a priviledge. It is not something that all people are entitled to. It DOES cost money, and someone has to pay for it. Only in a communist / socialist society do all sorts of privileges become rights. The constitution has well defined rights. And NOWHERE does it mention health care.

It sounds good to the poor, and makes Obama look like a "good samaritan" to say health care is a right. But that doesn't change the fact that he is lying.

No, health care is not a right. Imagine there is no health insurance company. Imagine you live in the Amazon rain forest. Imagine you get sick and need modern treatment. Should you get flown to a hospital somewhere to be taken care of? Are the airlines going to offer free tickets to sick people now? They would have to if it were a "right". Well it sure would be nice, and there are a few cases where this does happen internationally, BUT it is not a right. It depends on the kindness of others, and to be sure there is no way on earth that all who need hospitalized care can possibly get it. Hosptials are businesses, and cost money to run. If hospitals can't pay for medicine, and doctors, then hospitals close. If we shipped all the MILLIONS of AIDS victims in Africa, who are not being treated, to the US for care then the hospitals would close down. They would not be able to handle the influx of patients, or make money. You have to take your ideas to their logical conclusion, don't stop halfway in a "wouldn't it be nice 'fantasy'".

Yes, some benevolent doctors go to Africa and help over there, but they can only treat a minor portion of the need. And they are following Christ's footsteps when they do. And those who receive the care are privileged. It is not their right. I would agree that it is everyone's right to be treated with decency, and kindness, and therefore the best care available should be given. BUT that's the point, actually. All you can offer is the best available. Not every heart surgery patient can be operated on by the best heart surgeon in the world. The point is that having a free market health care system has made ours the best in the world. Canada's health care is atrocious. Do your homework. People have to wait in line for months to get surgeries completed... or if they are rich they fly to the US and are operated on immediately... AND PAY FOR IT.

In fact every country with socialized health care has major health care problems. Not the least of which is retaining talent. Great Britain is another great example. Government officials of countries with socialized health care do not get care in their own country... makes you think... (I hope)

That's as nice as I can be considering the fact that we are poised to have Obama destroy our country. I'm probably being too nice. People have died for our freedoms, and all I am doing is waging ideological war trying to keep them from disappearing.

The only good thing about an Obama win would be in four years (the next election) it would be a landslide back to conservative principles, and away from socialism/communism.

If you're wondering about how amazing socialized health care is:
regarding waiting lines for surgery in Canada:
http://www.angelfire.com/pa/sergeman/issues/healthcare/wait.html
or here's more:
http://seattletimes.nwsource.com/html/opinion/2001977834_cihak13.html

Here's an actual scientific study done on wait times for surgery in Canada between 1991 - 2000. This one will chill your bones:
http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=1079832

Pertinent quote:
"Of 8,756 patients who left the [wait] lists within 52 weeks: 7,991 underwent surgery; 90 died while waiting;"

"died while waiting"... I think I'll stick to the US' capitalist system health care, thank you.

Please do not believe socialist propaganda... :)
This blog began on Monday, September 27, 2004.
Hits since 2/20/2007:
free hit counters
free hit counters