Guess who does pay those taxes?

I hate articles like this: Apple, Google, Amazon Pay Corporate Income Tax Well Below Official Rate – US Business News – CNBC.

Of course they do. The default tax rate is something like 40%. However expenses are deductible, reducing that rate to what may seem like a pittance.  Maybe it would make more sense to look at it like this:

Suppose I go out and start a C-Corp as a second business and (as a simple number), I make $10,000 this year in profit. I manage to whittle my effective tax rate down to 10% by tracking my expenses really well. So I end up with $9,000 in after-tax business profit. Assume that I distribute this all out to myself at the end of the year. Now I have to pay personal income tax on $9,000 of income. Let’s pretend I have to pay 15% on those gains through some tax trickery where I pay a low rate. By the time I’m done, I’m left with: $7650

1 – (7650/10000) = 1 – .765 = .235 = 23.5%

There’s a reason why the LLC and S-Corp organizational structures are the preferred structure of small businesses – these structures avoid the double taxation problem and both entities essentially serve as a pass-through.

The problem with growth stocks is that they do not pay out dividends, making this example a bit more difficult to see. However growth stocks typically re-invest profits to grow the share value. Assuming the stock price increases between the time you purchase it and when you sell it, you are paying taxes at the corporate level and then at the personal level when you cash in.

Even if the price of the stock loses value and you sell at a loss, the taxes have already been paid. Even then, your ability to claim a loss in a diversified portfolio is minimized. You have to take all of your capital gains, subtract the loss and then claim the loss on your tax form. The max loss you can take is $3,000 (you can can carry excess losses forward). However, because the stock is a growth stock, you essentially re-invested your share of the profits in the business. You paid taxes on a portion of the corporate income, but when it comes time to claim your capital loss, you can’t claim those taxes, paid at the corporate level, as a part of your capital loss. This effectively reduces the value of the loss you can claim/carry.

For non-dividend-paying stocks, the only time you are not double-taxed is when the business pays a 0% tax rate and you have a capital loss that exceeds your capital gains. Over a diversified portfolio, the likelihood of such an event is minimal. You will have to pay some taxes at the corporate level, as a shareholder, somewhere in the portfolio mix.

And for those who seem to think double-taxing of dividends is a myth or a “privilege” of being a shareholder in a corporation, the IRS specifically states it is a double-tax.

Is that an Ubuntu Desktop in your pocket?

This is a nice idea I’ve mulled over in the past. As phones become more and more powerful, you can dock your phone and you have your computer tied to a monitor, keyboard and mouse (and other peripherals)- always on, everywhere you go, all the time.  And it is kinda cool seeing Ubuntu taking some risks here.

The question is, where does it fit in? There’s a couple of references to business-use cases in the specs. But there’s also a lot that businesses might not be too pleased with – namely access to apps that would otherwise be restricted on the desktop. I’d venture a guess that phones are more commonly lost than are laptops, leading to questions (at least in my head) about how much security can be applied to the Ubuntu side of the phone.

According to this article at PCWorld, Mark Shuttleworth doesn’t seem to concerned on the security angle -and admittedly, Linux does have more than a few security options out there that can be applied.

When Art Becomes A Product

I was thumbing through a copy of Time magazine (that I don’t subscribe to, yet still shows up at my door weekly), a rare event as most just hit the trash when I found a pull quote from George Lucas (speaking about the Star Wars franchise):

Why would I make any more when everybody yells at you all the time and says what a terrible person you are.

Lucas’ position is an interesting place at the intersection of creativity and product delivery. I tend to believe Lucas hasn’t quite found the balance between art and product – something, I would assume, creative types often struggle with.

There’s no doubt that Lucas has been successful (monetarily and popularity-wise) with the Star Wars franchise. Yet, all of the creativity that went into the first three movies (IV, V, and begrudgingly VI) occurred at a juncture where the the films were primarily driven by creativity and art. With Star Wars IV being such a surprise hit, the gravitational mass of the Star Wars enterprise has long eclipsed the creative cycle and become more marketable-product. And when consumers expect a product, they don’t necessarily like divergence from what they originally bought into.

 

Ignorance on the Left Vs. Hypocrisy on the right.

Coyote has a decent piece up (snippet here or full article on Forbes) primarily dealing with progressive ignorance. In short – it summarizes the (oftentimes willful) ignorance of the left when it comes to public policy prescriptions for “fixing” capitalism.

However we should not forget the need to look at the flip side of the coin. The right has often been long on the talk of capitalism and free markets – but let the left slide and even doing their own part.

Romneycare anyone? What’s a more free market – a market free of government coercion or government coercion as the core means of product delivery?

Earmarks? Nothing beats padding the wallets of the connected and Republicans haven’t done much to conceal their hypocrisy here.

Or how about the tenure of Republican Ray LaHood in his fiefdom of regulation and taxpayer-funded handouts?

So  I’m often torn when I see posts like Coyote’s. The (arguably flawed) choice we’re left with is, which is better: those who deliver all of the wrong solutions because they often don’t know better or those who deliver all of the wrong solutions when the already know better.

The Blog I Hate To Love

I don’t usually do posts like this but I find that my blog consumption falls into three categories:

  1. Blogs I generally tend to identify with and read voraciously.
  2. Blogs I tend to vehemently disagree with that I will chance upon on occasion.
  3. One blog in particular that I hate to love

Blogs of type 1 or 2 generally require little thought, provide adequate room for snark, and, on occasion provide some great info or insights.

The Blog, of type 3, generally requires more in-depth attention, a good reading three-times over, and a lot of searching for supplementary material mentioned in the posts. Just about the time I think I disagree, I have to re-read what is written only to realize that it make sense and I’m in agreement. Then I go back and read my own writing and cringe. It also makes me feel… incoherent…

Anyway, check out :

LIBÉRALE ET LIBERTAIRE

Apocalypse Now Tomorrow

Kyle Smith’s column, Profits of doom – NYPOST.com, is a bit refreshing.  I thought New Yorkers long ago abandoned common sense.

Smith gets it right and points out one of the more frustrating things that happens when we mix science with fantasy – lofty doomspeak of very little substance.

This doomspeak always reminds me of a friend who thinks in analogous terms: We’re on the brink of “something” huge and we’re all going to be wiped off the face the the earth. She can’t ever manage to put her finger on what the catalyst is, but it seems to run the gamut of whatever doomsday scenario is popular.

In our discussions, we have been through the environmental aspects which always begets some new-agey spiritualism (mother nature is pissed), to how horrible humanity is. I’m often needling her to provide details or examples which are often scant and short of any historical perspective.

But when the topic inevitably turns to oil running out, deforestation, or any other resources on the verge of extinction, I like to point out the argument of prices. Funny little things that often get in the way. People like to avoid paying them if at all and if the prices rise, they often will find other ways to go about a specific task.

I’ve pointed my friend to Russ Robert’s book, “The Invisible Heart: An Economic Romance” in which his main protagonist, Sam, offers a salient point to his economics class:

Years before the last drop of oil is found and extracted, we’ll walk away from oil as an energy source. It will be too hard to find new reserves. Or too expensive to extract the reserves we know about. Long before we run out of oil, we’ll switch to cheaper alternatives.

Got Hacked. But I’m Back

It looks like a couple of my sites got hacked. This one appears to have been fine but I didn’t want to waste the time trying to weed through all of the files to figure out what was done. So I axed bunch of databases, a bunch of sites and stripped everything else down. It should have been done a while ago but I’ve been tied up with a new job and life.

So it goes.

If you are looking for particular content, I’m hoping to parse through what I had and import it over time.

Lithium Framework: Blog Tutorial Extended (MongoDB)

I’ve recently been toying with the Lithium framework, a fork of some code produced by some of the CakePHP devs that was spawned into its own being. I have few grievances with CakePHP and used it for a couple of smaller projects a couple years ago. Yet, as PHP has matured, so has the language and there are a ton of features in PHP5 that make it difficult to fully appreciate a framework dedicated to backward compatibility as in the case of CakePHP.

This isn’t a slight on CakePHP at all. It is just a difference between where I want to be programming and where CakePHP is as a framework. If anything, CakePHP is right where it needs to be – catering towards the strength of a giant PHP4 and PHP5 installed-base with a strong and stable code base.

Lithium is bleeding edge, a little rough and presents PHP5 in near-full-glory. Being familiar with CakePHP, it makes it nice to find some familiar concepts in Lithium while I have the opportunity flex some of PHP5′s new features. But enough about me and Lithium, let’s get on with extending the tutorial.

Note: I’m still feeling around Lithium and many of the concepts so there may be some inefficiencies or redundancies in the code. Also, this is an extension of the demo, as such, there is virtually nothing in the way of security implemented. Remember, always wear protection!

The current (as of this writing) blog tutorial ends right where the fun begins. The original tutorial shows you how to set up the index and add methods in the PostsController. In each part, you have the opportunity to do some basic interfacing with MongoDb by doing a basic find and insert query respectively.

But we want to do more. How about we create the ability to see the post all by its lonesome and add a view ( as in view-a-single-post, not view as in MVC) method to the PostsController.php.

public function view($id=null) {
   // we are going to view a page.
   if(!is_null($id)) {
       $post = Post::find('first', array('_id'=>$id));
       return compact('post');
   }
 }

Basically, when an id is passed on the URL, we pass the id into the database query and look for the matching post in the database. In this case, we want to pass the MongoDB object ID ‘_id’ in the URL. (Note: this can be changed to some other field or combination but you’ll need to devise a method to parse the query parameter to find the right post). We end the method by returning the results as an array to make them available in the View.

Next, we’re going to create a new file in /views/posts/ folder called view.html.php

 

 

<article>
        <h1><?=$this->html->link($post->title,'/posts/view/'.$post->_id); ?></h1>
        <p><?=$post->body; ?></p>
    </article>

 

 

 

This is just a simple view that shows us the title and body of the post. Alright! Now we have a method and a view associated with the new method. Did we forget something?… How about: how are we going to get to the individual post if we don’t really know what the unique ID is?

Easy peasy. Now open up /views/posts/index.html.php and change

<h1><?=$post->title ?></h1>

To:

<h1><?=$this->html->link($post->title,'/posts/view/'.$post->_id); ?></h1>

When you loaded the index page, you ran a foreach to display each post. Although present, you didn’t use all of the available variables passed to your template. All we are doing is creating a link to our new method, view, passing the unique MongoId on the end of the URL.

Go ahead and save your changes. We should be in business! Go to your post controller at http://mysite.com/posts/ to view the index page. You should see that each title you see is a link. If you mouse-over the link you’ll see a URL like

http://mysite.com/posts/view/4d01a6cc5096344818020000

The long string on the end will be different of course. But each blog post will show a unique id. Click on the link and it will take you to view your post.

Now we’re going to get a little crazy. We want to add some comments to our blog posts. Notice that when we has the add method that there weren’t any comment fields in the document we sent to the database. That’s fine. we’re ok – MongoDb is essentially schema-less and we need to think of a blog post as a document, not as some octopus-like series of relationships. Remember, KISS – “keep it simple, stupid”.

Let’s go back to our whiz-bang PostsController.php file. Plug the following code into your class:

public function comment($id=null) {
        // check to make sure the request is set
        if(!is_null($this->request->data)) {
            $data = &$this->request->data;
            //we'll set up our query
            $query = array(
                 '$push'=> array('comment'=>array(
                     'title'=>$data['title'],
                     'contact'=>$data['contact'],
                     'body'=>$data['body']
                    )
                 )
            );
		//set up the conditions
            $conditions = array('_id'=>$id);
		// execute the qeury
            $result = Post::update($query, $conditions, array('atomic' => false));
        } 

        // you'll want to add checks, but for simplicity, we'll just send them back to the individual post
            $this->redirect("/posts/view/$id/");
        } 

    }

Now this is a little bit more complicated. In the code above, we define the query as an array of keys and values. Be very careful here. ‘$push’ is a native MongoDb command. Make sure you are using single quotes (a literal string) around it so PHP doesn’t look for a variable named $push. The MongoDb command $push essentially helps us do two things: if ‘comment’ is a defined field in our database, it updates the field by appending the new information to the old information. If the field is not defined, it defines the field and adds the data. If we don’t use the ‘$push’ command and just pass the query, shortened to the data being added, it will just overwrite what is already there after each comment.

As we move down through the code, you see that we set up the conditions to look for a matching MongoId. We then invoke the update. Notice that the query comes first, the conditions second, and we have a third item there that is extremely important. We set ‘atomic’ to false. If we do not do this, Mongo will treat our query as a raw update; that $push command will become a key added to the document rather than the command telling Mongo how to deal with the rest of the array. And we’re finally finished in the controller. But we don’t need to show a view specific to this method. We can just send them back to view the post they commented on.

Go ahead and go back to /views/posts/view.html.php in your editor. We’re going to do a couple quick edits. We are going to add a loop to view the comments after the blog post. The second thing we’ll do is add the form to post a new comment. After the closing article tag, paste in the following.

        <div class="comments">
            <h2>Comments</h2>
           <?php if(isset($post->comment)): ?>
               <?php foreach($post->comment as $comment): ?>
                <div class="comment">
                   <h3><?= $comment->title; ?></h3>
                   <p><?= $comment->contact; ?></p>
                   <p><?= $comment->body; ?></p>
                </div>
               <?php endforeach; ?>
           <?php endif; ?>
        </div>
        <div class="commentform">
            <h2>Add a Comment</h2>
            <?=$this->form->create(null, array('action'=>'comment/'.$post->_id)); ?>
                <?=$this->form->field('title');?>
                <?=$this->form->field('contact');?>
                <?=$this->form->field('body', array('type' => 'textarea'));?>
                <?=$this->form->submit('Add Comment'); ?>
            <?=$this->form->end(); ?>
        </div>

This form and display is pretty straight forward. Because our view model already grabs a document by the MongoId, we have the full document and all of the comments. We use the HTML helper to help us create a quick and dirty form. On the back side, we grab all of the form fields from $this->request->data.

At this point, you should be able to go to your site and see your posts. You can click on the title of a post and view the post. The post page should show you the post, comments and a form field to add comments. When you add a comment, you should be returned back to view the post and see your new comment added.

Not bad for quick and dirty. Sure, it needs some work, but it should get you along a little further in your study of Lithium.