Make No Mistake: Taxes Are An Evil, However Necessary

20 Apr

I am not about to weigh in on who I think should win the federal election or even whether I’d like to see a majority or a minority.   To be honest, I would love to pick and choose among the policies among all the parties – of course, real politics don’t work that way.

But I would like to weigh in on something that really does need to be said, because I think it can work as a bridge between right and left-leaning policies:  the role of taxation, and why, in fact, the market is preferable in most cases.

Take this all-too-familiar supply-demand curve:

In this case we have a before-tax supply curve (green), an after-tax supply curve (red) and a demand curve (blue).

Tax incidence, deadweight, tax burden

Description of deadweight as it pertains to a tax.

As you may (or may not) have learned in a basic economics class, the ‘invisible hand’ will guide the market towards the price and quantity that matches where the demand and supply curves meet (where green meets blue).  Let’s say that this location is $10 and 10 gajibazillions units sold for a total of $100 gajibazillion dollars.

Now we add the tax.    In this graph, it’s a straight-forward per unit tax, like gas, say at $1 per unit (if we did a percentage tax, like the GST, the space between the two supply curves would get bigger as you moved to the right, but per unit is easier to deal with, so let’s go with that).

When consumers find out that the costs is, in fact, $1 more than the stated cost, they will realize that they are not getting the same amount of product for the higher price (because $1 is going to the government).   “Oh no!” many will say, “the product is not worth all that much money. ”   They will drop out of the market.   Suppliers, responding to the change in demand, will drop their prices slightly so to maximize their profits.   Let’s say the new price is $10.75, and the new lower quantity is 9 gajibazillion units.   This change in behavior of consumers and suppliers in response to the tax is called a market distortion.

Okay – so now some math.   We’ve already discovered that the market volume with no tax is 100 gajibazillion dollars.   The market volume after the tax is $9.75 (remember, $1 goes to the government to pay the taxes) times 9 units or $87.75 gajibazillion dollars, for a difference of 12.25 gajibazillion dollars.

Ah – but of course, the government will be absolutely efficient and non-bureaucratic and responsible with our tax dollars, so we are going to get the value  of those taxes one way or another right?   Sure.   Except, they are collecting $1 for each of the 9 gajibazillion units for a grand total of 9 gajibazillion dollars, well short of the $12.25 gajibazillion dollars that was lost in the economy.  A grand total of 3.25 gajibazillion is lost – a completely unrecoverable loss in the economy simply by applying the tax - and that’s before we consider anything about the costs of administering the tax, whether that tax gets used effectively or efficiently by the government and so on.

This is why taxes are evil.   The flip side, of course, is that there are a number of other things that are more evil than tax burdens.   Things like large government deficits, lack of support for the poor, lack of equality, lack of established order and so on.

This should mean that we ought to consider a few things:

  • anyone who tells you that they are building the economy by using your tax dollars is lying.   Deficits are merely deferred taxes.   You can temporarily stall an economic downturn, or you can build certain sectors of the economy, but when push comes to shove, any tax *takes away* from the economy, and never recovers what was taken away.
  • given a proportional tax rate (eg. income tax, where the tax rate increases as income increases), the market distortions at the higher pay scales will result in even higher market distortions.   This is a pretty solid argument in favor of reducing taxes for those with higher wages, especially if you want to build your economy on a highly skilled labour force.   Another solution is to offer a flat tax rate, which has the added benefit of reducing the administrative costs of calculating your taxes every year.
  • Unfortunately, this implies an inequitable distribution of funds in the economy.   By doing the best possible things for the largest group of people, those at the bottom of the totem pole appear to benefit the least.  BUT, the bottom line is that bottom of the totem pole still benefits – just not as much as those at the top.
  • Anytime you see a promise about a new government program, it is always at least a little bit wise to wonder if those benefits couldn’t otherwise be provided by, well, um YOU.  You earning more money by bringing more value to the consumer contributes to reducing the deficit.   While some would argue with me, this applies to public servants as well (assuming that the service cannot otherwise be provided by the market).
  • Re: corporate taxes – if you pay taxes when you cash in your mutual funds, do you really think you should be paying taxes *again* when your investment turns a profit?   Remember, those corporate taxes are also a tax on your pension.
  • We should be getting away from deficits as soon as possible.  2-3 years is more than enough to stall the economic downturn.  Now it’s up to the private sector to start turning the wheels.
  • Don’t trust party reputations when considering this.  Conservative does not always mean conservative.  Nor does liberal necessarily mean liberal.
  • Yeah, this is all just theory.  If you do not believe that people act rationally (they don’t), nor have perfect information (they don’t), you have reason to question all of this.

Library Research That Matters

15 Apr

Academic Librarians — please help!

For my presentation at the APLA conference, I will be speaking to the idea of professionalism, what it means, how it matters and etc.   At the end of my talk, I would like to point out some things that give me hope for the future.   One of the things that would give me hope is research/writing that actually matters outside the librarian profession (aka Research that is ultimately not self-serving).

One example I got from Kathryn Greenhill was Peter Morville‘s Ambient Findability, but I would like more.   Any ideas?   What I am looking for is the opposite of “For Librarians” texts – influential books and articles by librarians that are intended to be read by people who are not librarians.

Goal Setting for the New Year

1 Jan

Well, Happy New Year everyone and to all a good night.   :)

This year seems to me a great one for looking at new things to try.   Last year I found myself catching up on old things.   With the recession, keeping positive would have been the main goal, and I had a lot to be positive about in 2010.   For one, I got the Fusion Halifax Metropolitan Award.   A blog post I wrote about professionalism in librarianship made it to the Library Journal website, and had an amazing reflection/editorial by Francine Fialkoff .   Podcamp Halifax was very successful last year and McLean Greaves even scooped the iPad announcement three days before it was announced by Apple!  (By the way, as of now there are only 26 out of a total 350 tickets left for 2011 (to be held on January 23rd).

This year, however, I feel like I need some new goals.   Here are a few:

  • It’s time to start blogging regularly again, at least once per week.
  • I’d like to go visiting someone who is not family a little more regularly.   Time to reach out!
  • Mr. 7 insists that I help him finish his rogue-like game called “Rasghiosse.”
  • I want to do a better job recording the things that I’ve done and will do.    Too many projects exist where i am the only one who really knows how they work.

That’s good for now, there’ll be more I’m sure as the year progresses.   What are your big goals for this year?

Tags: , ,

Wikileaks: Where the Hole is Big Enough to Drive a Truck Through

30 Nov

When I first heard about Wikileaks, I felt that possibly they were providing a much needed ‘heads up’ to the public on important International concerns such as the wars in Iraq and Afghanistan.   When I heard about the recent cable releases, I thought they caught the United States in some particularly heinous territory with their International Policy — something that represented a serious shift from the norms of behavior that the country’s citizens would expect from the people who represent them abroad.

Instead, it’s just a leak of cables.   Stories of Omar Khadaffi oogling voluptuous Ukranian blonds.   CSIS members complaining about lawyers.   Frank opinions about Russian dignitaries.    All great stuff to sell newspapers and boost the ego of the ‘leakers’ but nothing representing an international emergency.    Given this lack of urgency, it is my opinion that Wikileaks did the wrong thing when they leaked this information.     There is no ethical standard that I can apply that justifies their actions here.    Let’s go over some of the tests.

Let’s start with Emmanuel Kant’s ‘categorial imperative,’ act only according to that maxim whereby you can at the same time will that it should become a universal law.   I do not accept left-wing minds ought to be allowed to leak private documents to undermine aggressive international policy because I know that right-wing minds would more than enjoy the opportunity to leak medical documents and doctor reports to undermine expensive public health care.

Now, I do not accept Kant wholeheartedly.   I do believe we should make room for exceptions in cases where the action provides a benefit, or prevents a negative that greatly outweighs the negatives that come from the action.     A deontological (Kantian) mind must have a utilitarian conscience.   So, taking the Trolley problem example, I do think there is some justification for pulling the switch that kills one person when it means saving the lives of thousands.    With some clear (and very important) caveats:

  • there is clear evidence of public benefit
  • there is no apparent self-interest in pulling the switch
  • the one person is not known to be vulnerable within the society (see Rawls)

Clearly, I do not see a clear public benefit to the leaks.    I do, however, see plenty of self-interest as media outlet after media outlet uses the juiciest elements of the cables to sell their papers.    The damage that this leak causes, however, will never be quantified.    Government Services will be regulated and secured to the point that they are no longer services in any sense of the word.   Foreign Affairs agents will always be thinking about their (needed) frank opinions in the context of these leaks.   In the best case scenario, this means embarrassment for public officials.   In the worst case scenario, this means a disconnect between diplomacy and policy – which is a euphemistic way of saying “stupid Wars caused by miscommunication.”

The final test is one of my favorites, put out by John Rawls — the ‘original position’ test.   This test would offer that people should act as if they came into society with no understanding of its norms or structure.    The person in this position would want the society that protected its most vulnerable members (because, given no prior understanding of status, someone would want to ensure that they had a decent lifestyle no matter their status).      The so-called transparent society that so many internet lovers desire is not to the advantage of the most disadvantaged.    For one, the most disadvantaged likely have no clue whatsoever that this whole Wikileaks thing ever happened.    All they’ll know is that some authority figure in their country will put two and two together (correctly or incorrectly) and accuse them (correctly or incorrectly) of treason based on pieces of evidence found in these documents.

In short, there is no real ethical justification in my mind for leaking these documents to the public, only a half-baked and obnoxious internet ideology.    It was a wrong-minded action and it should be punished in my view.   Fortunately for the people involved — people who are by no means the vulnerable people John Rawls wanted us to consider — they will be punished in a country that believes in ethical treatment of their citizens and fair trials.

For shame.

Haskell Tutorial IV : If This is A Case of Functional Programming, Then I am Switching to Lazy Evaluation

21 Oct

Part III: How Haskell Monads are Like a Muppet       Part: V   (coming soon) >

Finally, with the forth part of the tutorial, I get to describe something that will make my PHP-coding reader want to use Haskell:  lazy evaluation.

But first, let’s go back to two different ways I’ve approached the problem of evaluating a keyboard input from a user in our rogue-like RPG game.    In tutorial #2, I created a function called move that used guards to discern what action to take based on a given input.    Here is move:

move :: Char -> String
move a
    |  a == 'w'       = "UP!"
    |  a == 's'       = "DOWN!"
    |  a == 'a'       = "LEFT!"
    |  a == 'd'       = "RIGHT!"
    |  otherwise      = "HANG AROUND AND DO NOTHING!"

In tutorial #3 I switched to a series of if / else if / else statements.

forever (do
    char <- getChar
    if char == 'q' then putStrLn "Thanks for Playing!"
         else if char == 'w' then up y >> output x >> output y
         else if char == 's' then down y >> output x >> output y
         else if char == 'a' then down x >> output x >> output y
         else if char == 'd' then up x >> output x >> output y
         else putStrLn "you did not type a correct entry")

This version had the additional side effect of requiring a manual escape of the compiler program in order to quit (something that is easily fixable, but still).    Now I have a new function ‘dashboard’ that uses lazy evaluation to compute values based on a given input.   Without beating around the bush, here it is:

dashboard :: Char -> MVar Int -> MVar Int -> IO ()
dashboard 'q' _ _ = exit "Thanks for Playing!"    // stop the program
dashboard 'w' x y = up y >> putStr " Coordinate: ( x = " >> output x >> putStr " , y = " >> output y >> putStr ")."
dashboard 's' x y = down y >> putStr " Coordinate: ( x = " >> output x >> putStr ", y = " >> output y >> putStr ")."
dashboard 'a' x y = down x >> putStr " Coordinate: ( x = " >> output x >> putStr ", y = " >> output y >> putStr ")."
dashboard 'd' x y = up x >> putStr " Coordinate:  ( x = " >> output x >> putStr ", y = " >> output y >> putStr ")."
dashboard w x y = putStr " Coordinate: ( x = " >> output x >> putStr ", y = " >> output y >> putStr ")."   // keep the Coordinate values the same

So, let’s think about our problem for a second.    So far, we have been focussed on getting our character to move around a map.    But what if we want to do something completely different, like say show an inventory list if the user hits ‘i’?    Or maybe cast a spell?     We could have a bunch of if – then statements or a whole bunch of guards, but it all could end up being a mess and impossible to read.

Fortunately, Haskell let’s you specify particular actions based on the constructors (entry values) for your function.    In the case above, dashboard accepts 3 values — one CHAR and two MVar Ints (ie. a mutable variable that has to be an integer — see the previous tutorial).   If the dashboard receives a ‘q’ for a value, it will say ‘thanks for playing’ and quit the program (the two ‘_’s mean it doesn’t matter what the values are that follow it).   The next entries do what we’ve come to expect -> change the value of the MVar based on the movement and then output the current coordinate’s status.    The last statement is a catch-all, asking Haskell to output the current spot.

Why might this way of doing things be better than using (say) guards?    Well, the first reason is that it gets to the point.    if the user hits ‘q’, Haskell will not attempt to evaluate any of the other function calls.   Admittedly, this function isn’t really helped performance-wise by lazy evaluation -> but what if moving in a certain direction (in the spot where a monster was) involved a long series of recursive computations.    We would not want Haskell to be using up its resources trying to figure out what it’s supposed to do when all the user wants to do is quit.

However, there’s still alot that could be added here.   What if we want to do something when the user hits ‘s’ and y is equal to zero.    Then we could do something like this:

dashboard 's' 0 y putStrLn "You are blocked and can go no further."  >> putStr " Coordinate:  ( x = " >> output x >> putStr ", y = " >> output y >> putStr ")."

Again, this can have really great performance benefits for your program.    If dashboard gets an ‘s’ and a ’0′, it will look no further and do the easy job of outputting the coordinate as is, rather than attempting to go through all kinds of irrelevant processes.   UPDATE:  Well, actually, this is all wrong.    Because ’0′ is not an MVAR.    Mind you, there is a way to get the function to accept two Ints instead and convert the MVAR to an Int for our purposes.    That’ll be another tutorial though.

The last benefit is that it gives a nice human-readable understanding of what happens when the function receives what, without a whole range of complex nested elements.

The downside, of course, is that because Haskell is type-safe, you must give this function a CHAR (not a Maybe Char, or a String) and two MVAR Ints (not an MVAR String or ordinary Int) or you will get a type error.       Things could also get more confusing if you decide that you want to return an IO (String) or other value instead of just outputting something to the screen.    But handling that problem might be for another tutorial.

I should, again, remind you that my up-to-date work on the rogue-like game called rasghiosse is available in a patch-tag repository.   Please feel free to add to it as you wish.

Tags: , ,

Part III: How Haskell Monads are Like a Muppet

19 Oct

< Part II: How not to Start Your Haskell Program Part: IV:  If This is a Case of Functional Programming, Then I Am Switching to Lazy Evaluation >

In previous tutorials, I talked about some assumptions about Haskell programming, and how to overcome them.    I suggested that someone coming from an imperative background (more than likely) is going to go about functional programming all wrong.     I fretted that no one creating documentation for Haskell seemed to notice this and that this was a problem for the future of Haskell and functional programming in general.

Non-academic coders want to make their programs *do* something as soon as they can.      Academic programmers are more fascinated by making their code solve complex problems.     Making Haskell do something is possible, but you’d never know it by reading through the documentation and most tutorials.    Here I will make our Haskell program actually do something, all the while giving an inkling about how state monads / MVars / IORefs work (without ever bothering to explain the math-ese behind them).    Again, I am assuming you’ve read and have been confused by at least one or two tutorials on the subject.

Because imperative programs rely on mutable variables (of which functional programming has none), programmers usually start by creating controls mechanisms (eg. an array in php) to prevent mean side effects from creeping in to their software.    Functional programming does not have side effects.    That’s good.   However, it also does not have the ability to store values inside a variable.    That’s bad.   That’s why I suggested starting with input and output and filling in the gaps.   Then I gave a sample:


main :: IO() main = do
                        x <- getChar
                        if x == 'q'  then putStrLn "Thanks for Playing"
                            else pmove x >> main  

move :: Char -> String
move a
    |  a == 'w'       = "UP!"
    |  a == 's'       = "DOWN!"
    |  a == 'a'       = "LEFT!"
    |  a == 'd'       = "RIGHT!"
    |  otherwise      = "HANG AROUND AND DO NOTHING!"  

pmove = print . move

So far, this program doesn’t do much more than a basic “Hello World!” program.     It accepts an input that get stored in x and based on that input it prints out a word.   Pretty disappointing.   What we want is the ability to change things.    What would be really nice is graph coordinates indicating a plot on a map, for instance.    Then we could establish our character’s position that could be displayed graphically and used to analyze the characters position against (say) a wall, or a monster.   Then the real fighting can begin.

Except you can’t really do that.    If you create a variable ‘place’ that contains a tuple (5, 5), it will always be (5, 5).   Your character is stuck in the quicksand!

You *can* create a function ‘up’ that will increase the ‘y’ value when your user presses ‘w’.    Maybe it’s something like this:

up :: (Int, Int) -> (Int, Int)

up x = (fst x, (snd x) + 1)

However, you are still stuck because you have no declaration of a starting point unless you declare a variable.    If you declare a variable, then your starting point is unchangeable, so you can only move one spot and no more!      This is where you start questioning if Haskell is just some practical joke that some prof wanted to play on his or her students.   In academic terms, this is the ‘problem of state’ and is one of the main reasons why functional programming has not had much influence in its first 30 years of being in existence.

To avoid a surprise ending, the solution is actually to create an MVar, which means ‘mutable variable’ and can be found in the Control.Concurrent.MVar module.    But I am getting ahead of myself.   An MVar isn’t exactly a mutable variable, although it does a really good job at pretending it is one.   Let me use some of my mad working-with-kids librarian skillz to show you how it works.

Grover is a Monad

Since you are somewhat familiar with the Haskell tutorials, you know what a monad is.    You are also a little bit confused at how it works.   I am not going to explain it.   It’s too mathy.    Much better to talk in Muppets.     I like to read a book called Grover’s own alphabet to my kids.     In it, Grover moves his arms and legs around to shape himself into all of the letters of the alphabet.     Believe it or not, this is your solution to the mutable variable problem.

As discussed, I cannot create a function that will store a value in a variable that can be changed later.    However, I can ask a function to return a type.    I can call this type “Grover.”     So, if I’m looking for a letter of the alphabet, I can ask Grover to move his arms and legs so that he is in the shape of a letter, let’s say “G.”    He will stay in “G” until I ask what shape he’s in.     Once he says “I am in shape G”, then he will stand up straight (no shape) until I ask him to take another shape.   This is basically how Monads (more specifically, state monads) work.

(Incidentally, the idea of using Monsters as an example of the Monad type is not new.)

Now is the hard part – going through the documentation.     I am going to save you alot of time.   For our Rogue-like game, we need MVars.    Before figuring this out, I had to go through a whole lot of confusing reading and mess.     If you want some pain and suffering, look up the State Monad, State Transformers, IORef, Arrow notation and the like.    Now look at what you really need.   MVars.    Go ahead and read the documentation on that.   You’ll find out that MVars are used for supporting concurrent processes.    Then you’ll go back to IORefs because this isn’t a concurrent program.    That’s a pointless exercise – IORefs are unnecessary.    And, hey – maybe our Rogue-like game will need to be an MMORPG down the line, who knows?

Here is the code.      I will go through it in more detail in the next tutorial later, but basically this program will start with x = 0 & y = 0, and output a location or a message depending on what you hit on the keyboard.     Note, however, at this stage that you’ll need to hit ctrl-z to make the program stop.



import Control.Concurrent.MVar
import Control.Monad

main = do
           x <- newEmptyMVar
           y <- newEmptyMVar
           putMVar y 0
           putMVar x 0
           forever (do
                    char <- getChar
                    if char == 'q' then putStrLn "Thanks for Playing!"
                        else if char == 'w' then up y >> output x >> output y
                        else if char == 's' then down y >> output x >> output y
                        else if char == 'a' then down x >> output x >> output y
                        else if char == 'd' then up x >> output x >> output y
                        else putStrLn "you did not type a correct entry")

up, down, output :: MVar Int -> IO()
up y =  do
             v <- takeMVar y
             putMVar y (v + 1)

down y = do
             v <- takeMVar y
             putMVar y (v - 1)

output y = do
             g <- takeMVar y
             putMVar y g
             putStrLn (show g)


It’s not the prettiest code in the world, but that’s how you have to do it with Haskell.   Start out ugly, and make it pretty as you go along.

Tags: , ,

Follow

Get every new post delivered to your Inbox.

Join 61 other followers