Friday, September 25, 2009

Annoyed by Fisker electric cars

Was so annoyed by Fisker electric cars getting a $528.7 million loan from the US Department of Energy, had to write this comment: How to Kill Entrepreneurship, Arnold Kling | EconLog | Library of Economics and Liberty: "

Leave aside the farce of a 'plug-in' vehicle. These Fisker cars will create a lot of jobs for the coal industry in the USA. I don't much mind mercury in the lake fish I eat - at my body weight it would take a lot to bring me down - but I am less excited to further poison myself so these alleged virtuous souls can pretend to be environmentalists.

South KoreaImage via Wikipedia

Leaving aside this particular farce... One question I have for libertarians is: why is the example of South Korea supposed to to be noxious? They have a heavy government hand in all industry. Seems reasonable, seems to produce good results.

Answering my own question, as best I see: The best argument against such a heavy government hand here in the USA would come from Mancur Olson _The Rise and Decline of Nations_. After the devastation of the Korean War, South Korea was starting from scratch. They don't have the burden of steadily accumulating rent-seeker and entitlement government lobbyists, as the USA has accumulated.

The most interesting reply I received was:
david writes: I wonder whether it's possible for a country to have an arrangement of interest-groups such that virtually all power is concentrated in the hands of a few groups with an interest in longer-term growth. Caplan might consider Singapore, whose government has been noted to absorb or demolish other civil institutions. It is also a small open economy. So presumably it can be modeled as one rational actor restricted by international competition rather than by local politics.

South KoreaImage via Wikipedia

South Korea is presumably similar, but with its massive industrial conglomerates instead. Since most of their markets are overseas, beyond the control of their own government, there are perhaps fewer attempts at domestic regulatory rent-seeking. They have to be competitive or die anyway. Posted September 25, 2009 3:59 PM
I still think government intervention into technological innovation is irrationally too low.
Reblog this post [with Zemanta]

Thursday, September 24, 2009

The Duct Tape Programmer vs. The Test Infected Programmer

Installation disk of Netscape 2.Image via Wikipedia

Joel likes JWZ. They both don't care for unit tests. Joel points to JWZ as a guy who ships. You could argue that JWZ was a guy who shipped, and became a burn-out poster child. The Netscape stuff just wasn't good enough to withstand the Microsoft onslaught. If you take JWZ + (Some) Unit Test + (Some) Test Infected Attitude, you really got something. I am happy to compete against coders who religiously avoid writing unit tests, so I am glad there is considerable variation in opinion. So, keep it up, Joel! The Duct Tape Programmer:
"Zawinski didn’t do many unit tests. They “sound great in principle. Given a leisurely development pace, that’s certainly the way to go. But when you’re looking at, ‘We’ve got to go from zero to done in six weeks,’ well, I can’t do that unless I cut something out. And what I’m going to cut out is the stuff that’s not absolutely critical. And unit tests are not critical. If there’s no unit test the customer isn’t going to complain about that.”

Netscape NavigatorImage via Wikipedia

Remember, before you freak out, that Zawinski was at Netscape when they were changing the world. They thought that they only had a few months before someone else came along and ate their lunch. A lot of important code is like that.


Duct tape programmers have to have a lot of talent to pull off this shtick. They have to be good enough programmers to ship code, and we’ll forgive them if they never write a unit test, or if they xor the “next” and “prev” pointers of their linked list into a single DWORD to save 32 bits, because they’re pretty enough, and smart enough, to pull it off."
32 bits saved on a linked list? I'm convinced! Duct tape ahoy! OK, what is the alternative? [Edited 10/23/09] Found a very cute comment thread on jwz's own website:
It seems to me more like you use foresight and pessimism to avoid getting into situations where you need to demonstrate exceptional programming ability. Absolutely no offense, even by faint praise, intended. ... "Use foresight and pessimism" This needs to become some sort of meme metric. ... The formulation owes something to a pilot's maxim: "a superior pilot uses his superior judgment to avoid having to exercise his superior skill."
This sums up Spolsky's mistake - confounding hard-won pessimism about fruity techniques with making a conscious decision to accrue short term technical debt. [exhaustive definition of technical debt here by Brad Appleton ] If practically 100% of the value of a piece of code comes from the speed of publishing, and you are skilled enough to take on some technical debt, confident you can pay it back later, by all means, go ahead. Publish the code, and forget the unit-tests and forget test-driven-development. But only if you earned that confidence. Here is an excellent diagram about who can and who cannot make this judgement, by Martin Fowler: [Edited 10/26/09 ] I found this comment from Reddit by terror406:
Architecture Astronauts and Duct Tape programmers are fictional characters. There are only competent and incompetent programmers. And competent programmers love and understand elegant architecture, but also know when to go into 'duct tape mode' on order to get the job done and ship the damn product. Edit: There is an easy way to tell the two apart. Ask them about their Technical Debt. A competent programmer will start talking about all the stuff that could have been done better, the incompetent programmer will just give you a blank stare.
Again, the issue is having the skill and judgment to take on short-term technical debt.
Reblog this post [with Zemanta]

I hate answering my cell phone.

Antimacassar on a rail carriage seatImage via Wikipedia

I wish my cell phone could warp time, so that between the first and second rings, I could experience a temporal warp, where I have 3 hours to prepare myself mentally for the impending conversation, as the outside world stays perfectly still.

Windows CE brand logoImage via Wikipedia

In a fit of rage, I threw my (real life) cell phone to the ground and stomped on it. Didn't kill it, and I wanted it to die. Don't buy a Windows CE Smart Phone from Samsung. They are bad. Well constructed, however.

Reblog this post [with Zemanta]

Subway bakes their own Italian Herb and Cheese bread

German Subway Sandwich Restaurant 33265, Colog...Image via Wikipedia

Italian Herb and Cheese bread. The Feast (roast beef, salami, pepperoni, turkey and black forest ham). Not toasted. Cheese. No mayo, no mustard. Southwest Chipotle Sauce. No pickles. Lettuce, tomato, onions, olives, green peppers. Add avocado. No oil, no vinegar. Salt, pepper. Miss Vickie's Jalapeno flavored potato chips. Coke, iced tea, pink lemonade - mixed fountain soda drink. Perfectly adequate.

Reblog this post [with Zemanta]

Erf, looking back in anger...

I have been pretty down on all adults and social influences during my childhood. It took me 38 years to find out where human society was keeping the "good shit" when it comes to how to live your life. I have no idea what occupied the time of all the adults in my life, when I was a child. Modern western culture is all about maintaining a slightly enlightened form of hedonism and narcissism, and being a very good consumer and a good enough producer.

Charlie BrownImage via Wikipedia

I am even down on the Charlie Brown cartoons I used to read. You had my undivided attention, Charles M. Schultz, why didn't you teach me how I could live meaningfully and effectively? OK, I am driving my point over a cliff. Backing off of this extreme position... it would have taken a miracle to reach me at a fundamental level - I was so self-absorbed and so full of energy to defend my fragile ego. Quoting from Patton Oswalt's fantastic high school graduation speech:
“Advice is everywhere in this world. Your friends, family, teachers and strangers are all happy to give it. “A lesson is yours and yours alone. Some of them take years to recognize and utilize.

Comedian Patton Oswalt after a routine.Image via Wikipedia

“My lesson was this – experience, and reward and glory are meaningless unless you’re open and present with the people you share them with in the moment.”
It is a great speech. Read the whole thing. My closed nature made it difficult for any teacher to reach me. So I am not 100% sure what the take-away is. Bah, just live your life the best you can, and when a creepy kid asks you a question, answer honestly. That is the best you can do.

Philip K Dick Android in the Nextfest Exhibiti...Image via Wikipedia

Also, assume that the teachings that are easily available are only there to make you easier to be controlled - the readily available teachings and thought only put a bit in your mouth and a bridle harness on your head. Look for the stuff that is wildly unpopular, but has stuck around for millennium. If it is wildly unpopular, but has stayed in print since the Hellenistic Age, there must be something to it. Something like Philip K. Dick's quote "Reality is that which, when you stop believing in it, doesn't go away." Surviving thousands of years of unpopularity is quite an achievement for a life philosophy, and might suggest some truth to it.

Epictetus, (Artist's Impression), 1st/2nd cent...Image via Wikipedia

But those kind of thoughts are only available under the surface, because they won't have any social approval. So you have to be open to people to let them show you those type of things. I am back to where I started. My favorite teacher was Mister Bugbee, who was the principal and the eighth grade teacher at my Evangelical Lutheran private grade school. He was a kind man. Everything he did showed he had a kind heart. That was enough.

Reblog this post [with Zemanta]

Wednesday, September 23, 2009

Worst ways of getting attention - caffeine induced irritability

Artists rendition of the Mask of Infamy. Note ...Image via Wikipedia

Uh, the only attention I know about is negative attention and infamy. Start a fight. Escalate a situation to the exploding point. Cut down a person just as they enter a room. Passive-aggressive behavior, and just plain-old aggressive-aggressive behavior, on top. Mitigation: People feel pretty comfortable shoving my bad attitude back into my face. And my loved ones are always laughing at me. On the whole, it is all a little too raucous, so I could stand to tone it down.

Chemical structure of Caffeine.Image via Wikipedia

I have cut my caffeine intake.

Reblog this post [with Zemanta]

Tuesday, September 22, 2009

God bless those who silently, unostentatiously "Keep on Rocking in the Free World"

Dirty JobsImage via Wikipedia

Silent Rockers

God bless those who silently, unostentatiously "Keep on Rocking in the Free World". That is not me - I am a obnoxious grouchy dude, all up in his own head, with too great an opinion of my lazy self. But those who do what needs to be done, and do it without a need for glory - these are the salt of the earth. My award would to grind their enemies and oppressors into hamburger meat, or 15,000 dollars, whichever they prefer - I'm easy. Mike Rowe from "Dirty Jobs" can host the award ceremony.

Cigarette Stompers

Cigarettes and TobaccoImage by dkodigital via Flickr

Too many of my friends and other people I like smoke cigarettes. So they will die, and Big Tobacco gets rich of them too. That sucks. For everyone cool who quits smoking cigarettes, I would award them the option of a fine cigar or some fine loose tobacco for a pipe, so they can have one relaxing smoke at the end of the day. Or they can smoke a bowl. Because cool people deserve the best things in life, but they don't deserve to die and have their monies go to Big Tobacco.

Reblog this post [with Zemanta]

Wednesday, September 16, 2009

Richard Jones' Log: Python: Simple, elegant HTML generation

Richard Jones' Log: Python: Simple, elegant HTML generation: "

OK, I looked. I searched. I didn't find. So here you go...

from cgi import escape
class HTML(object):
   '''Easily generate HTML.

       >>> h = HTML()
       >>> p = h.p('hello, world!')
       >>> p.text('more text')
       >>> with h.table(border='1', newlines=True):
       ...     for i in range(2):
       ...         with
       ...   'helo', a='"foo"')
       ...   'there')
       >>> print h
       <p>hello, world!more text</p>
       <table border="1">
       <tr><td a=""foo"">he&lt;l&gt;lo</td><td>there</td></tr>
       <tr><td a=""foo"">he&lt;l&gt;lo</td><td>there</td></tr>

   def __init__(self, name=None, stack=None): = name
       self.content = []
       self.attrs = {}
       # insert newlines between content?
       self.newlines = False
       if stack is None:
           stack = [self]
       self.stack = stack
   def __getattr__(self, name):
       # adding a new tag or newline
       if name == 'newline':
           e = '\n'
           e = HTML(name, self.stack)
       return e
   def text(self, text):
       # adding text
   def __call__(self, *content, **kw):
       # customising a tag with content or attributes
       if content:
           self.content = map(escape, content)
       if 'newlines' in kw:
           # special-case to allow control over newlines
           self.newlines = kw.pop('newlines')
       for k in kw:
           self.attrs[k] = escape(kw[k]).replace('"', '"')
       return self
   def __enter__(self):
       # we're now adding tags to me!
       return self
   def __exit__(self, exc_type, exc_value, exc_tb):
       # we're done adding tags to me!
   def __str__(self):
       # turn me and my content into text
       join = '\n' if self.newlines else ''
       if is None:
           return join.join(map(str, self.content))
       a = ['%s="%s"'%i for i in self.attrs.items()]
       l = [] + a
       s = '<%s>%s'%(' '.join(l), join)
       if self.content:
           s += join.join(map(str, self.content))
           s += join + '</%s>'
       return s

Note that due to something playing up the &quot; in the docstring is being decoded to ' so looks incorrect. The code is correct, the display on this page is not. Hrm.

Also, look, ma! A ternary expression! My first in Python!

Did you like 'join.join'? Heh. I know...


Dylan's Candy Bar in my town would be nice

Dylan's Candy Bar exterior, New York CityImage by caspermoller via Flickr

Check out these "Candy Sweet Treat Parties" held at Dylan's Candy Bar and Yummy Gummys Sweet & Sour

Har, read this - Food Network Dinner Impossible "Candy Catastrophe" at world's largest candy store, Dylan's Candy Bar in New York City The next time I find myself in New York City, I am heading here. The gift baskets look lame. How can I get my sour gummy **ON** with these girly-girl gift baskets?

Dylan's Candy Bar, New York CityImage by caspermoller via Flickr

If you have a candy party there "Candy Girls with Trays - Reminiscent of the good ole cigarette girls, our Candy Girls will add an element of fun and pizzazz to your party as they walk around with trays of our sumptuous candies and chocolates." Sounds like an opportunity to embarrass myself - leering at Candy Girls, and going into diabetic shock.

Reblog this post [with Zemanta]

Tuesday, September 15, 2009

Cute Scheduling Trick from "Good Math, Bad Math"

A sample image generated by Lawrence Ball's ha...Image via Wikipedia

The Blog and... the Book! : Good Math, Bad Math:
"The exact publication date isn't set yet, but my schedule plans for a complete draft of the book by summer. (And I used the scheduling rules proposed by one of my favorite managers. He said that when a programmer gives you an estimate of how long something should take, multiply it by two and increase the unit. So if they say it'll take a day, assume two weeks. If they say a week, assume two months. In my experience, it's actually a really good predictor.)"
I wanted to mark down this cute scheduling trick, because I was going crazy trying to hunt it down.

Someone's Lost Schedule BookImage by ASurroca via Flickr

I think this is a very fine rule for all creative work, not just programming. It could very well be a fundamental rule of scheduling.
Reblog this post [with Zemanta]

Tuesday, September 8, 2009

Chrysler 82 Lebaron Town and Country station wagon, 8 track player

A loaf of white bread. Photo by sannse, 18 Jul...Image via Wikipedia

Chrysler 82 Lebaron Town and Country station wagon, 8 track player. Came with some dreadful late seventies white-bread pop music collection 8 track with Kenny Rogers, Liberace Chopsticks and such. "Pop Goes the Classics" with that clap-track. Mom, sister and I - we loved it.

ChryslerImage via Wikipedia

Listened to 8 track in station wagon while driven by Mom to Xian Private School, to learn about superhero Jesus and the Disciples. Driven by Mom to Korean TaeKwon-Do school, to keep from getting beat up at Xian Private School. Daddy works 18 hour days, drinks and screams. Mommy suffers from migraine headaches, vomiting. Totally ripped off by Chrysler dealer when buying station wagon with 8 track - we were at the car dealer for 7 miserable hours. Listening to FM white-bread pop.

1958 Two Door Mercury Hardtop Station WagonImage via Wikipedia

I have no idea if the family that prays together stays together. But, today, my little family eats together and laughs together, every day. Mostly my wife and daughter laughing at me - oh well... My daughter listens to music on her iPod Touch - I am going to buy her Weird Al Parody music videos this week. I hope my daughter will have the benefit of parents that have a firmer grasp of their relation to the universe, so she will not have to figure it all out herself in her early twenties. Who the heck knows how it will all turn out?
Reblog this post [with Zemanta]