tag:blogger.com,1999:blog-59297302859935701372024-03-14T02:40:02.745-06:00Berserker Scientistusing science for goodBerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-5929730285993570137.post-44155653431717581822013-05-27T11:59:00.000-06:002013-05-27T13:50:24.547-06:00Mammograms<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ZggCZAuW_JIvoHTiHiardDkVrqNjfNsPePttPvWFJuyGkz7aDD4aqyN6Yd6K1jNYcjPb_Tas8uyBDSFCu7Y6e4U4XhuIRiuwGw1Q2N4v1xVByk_hFdbNyf1VRM7DUaMwVKMRXKdWFW8/s1600/T-0803_Crush_Hazard_lowres.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ZggCZAuW_JIvoHTiHiardDkVrqNjfNsPePttPvWFJuyGkz7aDD4aqyN6Yd6K1jNYcjPb_Tas8uyBDSFCu7Y6e4U4XhuIRiuwGw1Q2N4v1xVByk_hFdbNyf1VRM7DUaMwVKMRXKdWFW8/s200/T-0803_Crush_Hazard_lowres.jpg" width="200" /></a></div>
Several studies have disputed the efficacy of mammograms. I, being a man, of course ignored these when they hit the news last year. Some friends were discussing it, which got me thinking, "How could getting mammograms <u>not</u> help?"<br />
<br />
Here are two articles which discuss the changing science on mamography:<br />
<br />
<ul>
<li>http://www.hsph.harvard.edu/news/features/vatten-mammography-screening/ (<a href="http://www.hsph.harvard.edu/news/features/vatten-mammography-screening/">link</a>) </li>
<li>http://well.blogs.nytimes.com/2012/11/28/ignoring-the-science-on-mammograms/ (<a href="http://well.blogs.nytimes.com/2012/11/28/ignoring-the-science-on-mammograms/">link</a>)</li>
</ul>
<div>
The first indicates that screening does not correlate with reductions in breast cancer mortality rates. Also, screening tends to find cancers that "would not have harmed them". The second reinforces that "that screening mammography doesn’t save lives" and "the number of cancers diagnosed at the advanced stage was essentially unchanged".</div>
<div>
<br /></div>
<div>
I thought about this for a while. How could screening mammograms, which find early stage cancer, not reduce advanced stage cancers or cancer deaths? I came up with five reasons:</div>
<div>
<ol>
<li>The early cancers detected would not have become malignant, so finding and treating them doesn't affect mortality rates.</li>
<li>The early cancers that may have become malignant would have been caught at a later time. Treatments are now so advanced that the delay doesn't appreciably affect the mortality rate.</li>
<li>Other screening methods are finding cancers so mammogram screening is less effective at finding cancer. Maybe women who do self exams find more cancers compared to women who wait for their yearly mammograms. This would strangely lead to a correlation between mammograms and <u>increased</u> mortality rates.</li>
<li>The treatments may negatively affect mortality. Getting surgery or radiation or chemotherapy on early cancers or benign cancers may damage health enough to outweigh any benefits. I couldn't find a clear answer whether the mortality rates were just due to cancer, or due to anything (I'm guessing the latter).</li>
<li>The advanced cancers appear very quickly and are very deadly. This makes some sense because cancer is uncontrolled growth of previously normal cells. Fast growing cancers would seem to be the most deadly. In this case, the mammography screening rate might have to be monthly to have a hope of finding these advanced cancers in time to make a large difference in mortality.</li>
</ol>
<ol></ol>
<ol></ol>
<ol></ol>
</div>
<div>
I decided to actually read the original New England Journal of Medicine article, so see if I could understand what was going on.</div>
<div>
<ul>
<li><a href="http://www.nejm.org/doi/full/10.1056/NEJMoa1206809">http://www.nejm.org/doi/full/10.1056/NEJMoa1206809</a></li>
</ul>
<div>
It enlightened the situation, and also showed the difference between scientists and science journalists. Here are some quotes for the NEJM study Discussion section:</div>
</div>
<div>
<ul>
<li>"Over the same period, the rate of death from breast cancer decreased considerably. Among women 40 years of age or older, deaths from breast cancer decreased from 71 to 51 deaths per 100,000 women — a 28% decrease. This reduction in mortality is probably due to some combination of the effects of screening mammography and better treatment. Seven separate modeling exercises by the Cancer Intervention and Surveillance Modeling Network investigators provided a wide range of estimates for the relative contribution of each effect: screening mammography might be responsible for as little as 28% or as much as 65% of the observed reduction in mortality (the remainder being the effect of better treatment). Our data show that the true contribution of mammography to decreasing mortality must be at the low end of this range."</li>
<li>"As treatment of clinically detected disease (detected by means other than screening) improves, the benefit of screening diminishes"</li>
<li>"Women now widely recognize the significance of a new breast lump and the need for diagnostic mammography. Ironically, increased awareness confers less opportunity for screening mammography to reduce the incidence of advanced cancer. ... We agree that women should understand that screening raises their risk of becoming a patient with breast cancer and that there is uncertainty about the benefit of screening. The assessment of how to cope with that uncertainty, however, remains a value judgment that we believe should be left to women and their doctors." - Authors response in Letters section</li>
</ul>
</div>
<div>
It should also be noted that the study did not follow women to see what they were doing, but looked at general statistics. It did not look at a woman's family risk of breast cancer, or whether they did self exams. Also, some fairly large adjustments had to be made to account for hormone-replacement therapy's effect on cancer rates.</div>
<div>
<br /></div>
<div>
What I take away from this is screening, in all forms, is useful, but results should be reflected on before health-affecting treatments are begun to make sure they are necessary. But this is a complicated subject, and my heart goes out to anyone who has to deal this these issues.</div>
BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com1tag:blogger.com,1999:blog-5929730285993570137.post-9024921864984262102012-10-17T07:28:00.000-06:002012-10-17T07:28:19.288-06:00Vote For Info<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhkWNRiVntaH_vtIDE1YrBt8H19FQIllY4WU-wIJ9x9rn99BdLydWZKtRVgf8ldNz0Bh0IM1i3nFsleBMZSUdPiT8wjUwVYzxxtXGPgxqx9tL-eVKyxwN2vBwbhEcU59rwPVOwtuPE0o/s1600/vote_for_info.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhkWNRiVntaH_vtIDE1YrBt8H19FQIllY4WU-wIJ9x9rn99BdLydWZKtRVgf8ldNz0Bh0IM1i3nFsleBMZSUdPiT8wjUwVYzxxtXGPgxqx9tL-eVKyxwN2vBwbhEcU59rwPVOwtuPE0o/s1600/vote_for_info.png" /></a></div>
<i>If you don't vote, you can't complain.</i></blockquote>
You've heard that, probably from a coworker or friend. Voting is usually touted as the primary democratic right. And it is. But it is not the primary democratic <b><u>responsibility</u></b>. Your primary responsibility in a free society is to be informed.<br />
<br />
Dictatorships are easy. You don't have to make any decisions. But when things get too bad for you to bear, then action is required. It is like getting out of a rut in a muddy path. Dirty and violent.<br />
<br />
Change in democracies should be easy. They are a paved road; switching lanes should be as easy as turning the wheel. A wheel with 24 million hands.<br />
<blockquote class="tr_bq">
<i>Democracies require continual vigilance and Dictatorships require occasional violence.</i></blockquote>
The problem in democracies comes when people say, "I'm not into politics." That's like saying, "I'm not into oxygen." You're lungs are into it, whether you are or not. Politics affect every part of your life, unfortunately. You don't need to be an expert, but you do need an understanding of facts. Where do your tax dollars go[1]? What is the difference between debt and deficit[2]? How much of the gasoline price is taxes[3]? What industry emits the most greenhouse gases[4]?<br />
<br />
The reason democracies required an informed population is so bullsh!t doesn't rise to the top. If someone says they are going to lower taxes, increase services, and reduce the deficit, you know they are lying. You won't vote for them. You'll vote for the guy who says, "We are spending more than we take in so, unfortunately, we will have to cut back."<br />
<br />
The US recently had presidential debates, which is basically Presidential Idol. Some questionable "facts" were spouted that night (see this <a href="http://globaleconomicanalysis.blogspot.ca/2012/10/debate-fact-check-debate-filled-with.html">Mish </a>article). This type of fact checking should be big news, not page 6.<br />
<br />
People want it both ways. They want the convenience of a dictatorship, with the freedom of democracy.What happens is they get politicians whispering sweet nothings and bribing them with someone else's money. They get the US, where you can vote for a big liberal government or a big conservative government. Where a "liberal" president has prosecuted more whistleblowers than all other presidents combined.<br />
<br />
I had a conversation with an American who thought state-run health-care was some communist plot. I pointed out that health-care in Canada is not only half[5] as expensive, per person, than US health care, but also has better outcomes. I did agreed with some of what he was saying (e.g., we could privatize some of our health care), but facts were clearly getting in the way of his argument.<br />
<br />
I shouldn't get off-topic. I'm fiscally-conservative-socially-liberal[6], but I can be swayed by a good argument, backed by facts. Facts are what matter. Facts shame and correct democratic governments when they spout nonsense.<br />
<blockquote class="tr_bq">
<i>If you don't care about facts, don't complain if you get a used-car salesman for a leader.[7]</i></blockquote>
-----------------<br />
<br />
<span style="font-size: x-small;">[1] Can you believe $9.4B per year goes to "Public Safety"? That is 3% of your taxes!</span><br />
<span style="font-size: x-small;">[2] Debt is what you owe, deficit is the difference between what you earn and spend.</span><br />
<span style="font-size: x-small;">[3] 32%.</span><br />
<span style="font-size: x-small;">[4] Coal-fired electricity generation. Or maybe cows. Or electric cows.</span><br />
<span style="font-size: x-small;">[5] Halfish. Or something. It is less, for sure.</span><br />
<span style="font-size: x-small;">[6] Code for: I'm a type-A first-born of hippie parents.</span><br />
<span style="font-size: x-small;">[7] There is no way that quote deserved to be in italics, but its the best I could come up with. Come on, man. I have work to do. I can't spend all my time coming up with quotes you can put on matchbooks. Damn.</span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-72893194809767830702012-09-08T08:53:00.000-06:002012-09-08T08:53:22.689-06:003D Printer - Part 1 - Setup<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_KpTDlGHbSZJX_T1gck2p3hr0zOGTFL4Wbrr9_7XfigeWxIGzbxQpC65FjjaO-S3F6rfZ8U9vEX0_6UailHdV7qMuftT-LjcFSCLFqeRomNe53pAWbRIoiYC-cSMX1c7IPvFYwy4kXws/s1600/makerbot.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_KpTDlGHbSZJX_T1gck2p3hr0zOGTFL4Wbrr9_7XfigeWxIGzbxQpC65FjjaO-S3F6rfZ8U9vEX0_6UailHdV7qMuftT-LjcFSCLFqeRomNe53pAWbRIoiYC-cSMX1c7IPvFYwy4kXws/s320/makerbot.jpg" width="320" /></a></div>
I was under the sink recently (and for a handyman like me, recently is last year), and I wished I had some sort of stand for the flashlight so I could see what I was doing. If you have ever wished for a small inexpensive part, then maybe you too should spend thousands of dollars on a 3D printer. Wait, that just sounds crazy.<div>
<br /></div>
<div>
3D printers are like 2D printers, except they print in plastic. They are like hot glue guns than deposit layer on top of layer of plastic until a 3D object is created. One of the plastics it can use is ABS, which is what Lego is made of.</div>
<div>
<br /></div>
<div style="text-align: right;">
</div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgffytziuPwNrTm81hCEhOQ1nFryiSB_XJnotwhZ1RSht4CJd643yhAi4EdATtKYBiaf_wt36TWctyS-399BQBjskBDZKyy766zndKeCNpohcvteZ-I0VQ6m3UMRK97ydwpqpUs-NZ74IU/s1600/instructions.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgffytziuPwNrTm81hCEhOQ1nFryiSB_XJnotwhZ1RSht4CJd643yhAi4EdATtKYBiaf_wt36TWctyS-399BQBjskBDZKyy766zndKeCNpohcvteZ-I0VQ6m3UMRK97ydwpqpUs-NZ74IU/s200/instructions.jpg" width="200" /></a>I thought I'd blog about my experience, because 3D printers are not mainstream consumer-friendly devices yet. There is a learning curve. Or learning cliff.</div>
<div>
<br /></div>
<div>
I first bought a Solidoodle 3D printer. The wait time was going to be 8-10 months before they even built it. This is common in startup companies; it takes time for them to ramp up from a custom one-off shop to an efficient assembly line. But after a few days, I decided I didn't want to wait. Also, I was a little nervous they might go broke before they shipped mine. I was order number #3800, and they had just shipped printer #50 out the door.</div>
<div>
<br /></div>
<div style="text-align: left;">
</div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNH_7MKwK2QopihnWYygPqj-6TDoFyk5lBhvDhSA3hgHNhQNodCUAREVWFqU8BFtQJpdDrzYaYhWkuISc4mgoQGDKVJCuF0q9xwiqcRNRkc44WKzsNu01glbzWusZ1ZYJ8rU-rdiOOHrw/s1600/dual+nozzles.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNH_7MKwK2QopihnWYygPqj-6TDoFyk5lBhvDhSA3hgHNhQNodCUAREVWFqU8BFtQJpdDrzYaYhWkuISc4mgoQGDKVJCuF0q9xwiqcRNRkc44WKzsNu01glbzWusZ1ZYJ8rU-rdiOOHrw/s200/dual+nozzles.jpg" width="200" /></a>So I bought the MakerBot Dual Extruder Replicator instead. It is several times more expensive than the Solidoodle, but it is an established company and product. It took 2 days to get to Canada from their shop in Brooklyn. Of course, it took over a week to get out of customs, where I had to pay GST before they'd release it. For some reason, I think I'll blame Canada Post. (Jerks.)</div>
<br />
<div>
Unboxing and setting it up was relatively easy. The instructions are good, and their website helps you get printing right away. I got a dual extruder model, which can print two different colors of plastic, or print two parts at once. The printer comes with black and white, and I also bought red and blue. I should have bought some zombie green, because I'm going to make a whole bunch of those.</div>
<div>
<br /></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXl_S7x3buvAvRqgX_1Uxz0EDvZQK_oXGzAsDYUCt08Gt79AXjzmTdY26kHO4PzUzQg9m7EC7RrkCYzglF_uvRtFLZ9h_-uvYYy4rQvCEoGhp1Slqhp32xRzyhnr3XZypF6LGL9StL2Kw/s1600/first+build+closeup.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXl_S7x3buvAvRqgX_1Uxz0EDvZQK_oXGzAsDYUCt08Gt79AXjzmTdY26kHO4PzUzQg9m7EC7RrkCYzglF_uvRtFLZ9h_-uvYYy4rQvCEoGhp1Slqhp32xRzyhnr3XZypF6LGL9StL2Kw/s200/first+build+closeup.jpg" width="200" /></a>After finishing my first print, with a few hiccups, I wasn't really sure what to do. The Replicator can either print directly from your computer, or from an SD card inserted at the side. My plan was to keep the Replicator in our spare room and just bring the card in to print. The card is preloaded with shapes to print, but there is no list of what each part is. I tried a few until I got this one, a calibration cube. It is very light because the inside is mostly hollow. There is a honeycomb shape inside which keeps it structurally strong but light. 3D printers like this can't print anything parallel to the ground, because the plastic will droop (it comes out of the nozzle at 220 degree C).</div>
<div>
<br /></div>
<div>
I'm going to continue printing and figuring this out. More to come.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: right;">
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
</div>
BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-173021223480257252012-05-30T10:24:00.000-06:002012-05-30T10:24:28.727-06:00Failure is Fun and Profitable<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm9d8LTJuBu0iWik6mr0zwJpODhjLFn6FWgntFv5OoGs2KD_-YpcXtLf0H12MUi5CUDHiAD0lyjSeJfBV6VaVYLKtMLwb7-lhlmeiCZB1F0GKpaNDcWb4LlVMLFGFCQ0hew8PwN4kV28c/s1600/burning_money.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm9d8LTJuBu0iWik6mr0zwJpODhjLFn6FWgntFv5OoGs2KD_-YpcXtLf0H12MUi5CUDHiAD0lyjSeJfBV6VaVYLKtMLwb7-lhlmeiCZB1F0GKpaNDcWb4LlVMLFGFCQ0hew8PwN4kV28c/s1600/burning_money.png" /></a>Capitalism gets a bad rap. Some of it is deserved and some of it isn't. The worst thing is when people don't even know what capitalism is.<br />
<br />
Pop quiz: What is the defining feature of capitalism? I bet most of you said "Greed", and you'd be partially right. I prefer to call it "Self Interest", like Adam Smith did.<br />
<br />
Actually, the defining feature of capitalism is Failure. That's right: Failure.<br />
<br />
Failure is the balance to Greed. While Greed might lead people to take risks with their (and other peoples) money, Failure is what helps rein in the risks.<br />
<br />
Small failures help prevent big ones. Just like small forest fires clear out the deadwood, small failures help eliminate poor businesses from the marketplace.<br />
<br />
This is why if you ever hear things like, "The company is too big to fail," or "We have to stop this company from going bankrupt to save jobs," or any other nonsense that implies failure is bad, you know that is not capitalism. Government bailouts are not capitalism. Government subsidies are not capitalism.<br />
<br />
Frankly, any government jobs are not capitalism because the government cannot go broke. Government jobs are like an actor playing a role. Natalie Portman did a damn good job in Black Swan, but she will never be as good as a real dancer because real dancers have more to lose. If a government agency screws up and goes over budget, who cares? In the real world, the company would go broke. When government jobs are lost, I'm usually happy because the private sector can do it more efficiently, if it needed to be done at all. (Just to be clear, losing a job is tragic. But the idea that creating government jobs helps the economy is crazy.)<br />
<br />
Bailing out failing companies is terrible because it not only rewards bad behavior, but it punishes good behavior. All the competitors to the failing company (yes, I'm looking at you Air Canada), who actually know what they are doing, don't get any reward.<br />
<br />
Capitalism has many flaws, but failure isn't one of them.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com1tag:blogger.com,1999:blog-5929730285993570137.post-32333647261100197762011-09-29T12:25:00.000-06:002011-09-29T12:25:35.720-06:00European Crisis De-euphemismified<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsDh4uBkOgk51PegZVDVZkzm0UzgFY0i1sjGTXlI55pt04WnLogZtG4xYn0ok3zIugUHUDcMxyPoo0anzPAEUweFHcuzZmJhpgFK63zRDaQFrvXqxfwYywRRk3PNRNAx35y3SEf6GZ3ZM/s1600/Understanding_european_crisis.PNG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" kca="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsDh4uBkOgk51PegZVDVZkzm0UzgFY0i1sjGTXlI55pt04WnLogZtG4xYn0ok3zIugUHUDcMxyPoo0anzPAEUweFHcuzZmJhpgFK63zRDaQFrvXqxfwYywRRk3PNRNAx35y3SEf6GZ3ZM/s1600/Understanding_european_crisis.PNG" /></a></div>Politicians use euphemisms so no one can understand the truth. The media use euphemisms because they don't understand the truth.<br />
<br />
Here, for your viewing pleasure, is a breakdown of the some of the terms used in the discussion about the European debt crisis*. I've used Greece and Germany as examples (represented by their flags), but this really applies to any country. For example, Iceland's government defaulted on its debt to the UK.<br />
<br />
The key thing to understand that when people say "Greece is being bailed out", what they are really saying is "Greece is being given European taxpayer money so they can pay foreign banks back".<br />
<br />
And as for all the self congratulating yesterday that the crisis had been averted, mark my words: Greece will default.<br />
<br />
Oh, and if you are wondering why I'm drawing up flowcharts about economics when I'm supposed to be an engineer, it is because I have layers, like a parfait**.<br />
<br />
* This is available in wallet size, so you can carry it around and look like a dork!<br />
** Euphemism for "I took an economics course once and now I think I understand world economies, plus its lunchtime and I'm bored."BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-84436292351312679712011-09-24T17:56:00.000-06:002011-09-24T17:56:28.632-06:00Poker pile-on<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_gOCvCdbYCzyppaqv9wQkXd3ksM-4tW43BrpaZlSLl51kZutYZ4s8XepS51d5gqmtCaVvLlh2OXx8CU5OZI_cSjyv7BZYkqedieJpx2fvYKRuTZ4i3uXsbMBgWOyJWrbmpNp5LN9Z8_k/s1600/King_of_hearts.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_gOCvCdbYCzyppaqv9wQkXd3ksM-4tW43BrpaZlSLl51kZutYZ4s8XepS51d5gqmtCaVvLlh2OXx8CU5OZI_cSjyv7BZYkqedieJpx2fvYKRuTZ4i3uXsbMBgWOyJWrbmpNp5LN9Z8_k/s200/King_of_hearts.png" width="200" /></a></div>Full Tilt Poker, an online poker site, just recently was called a Ponzi scheme. The US governement has upped its attack on poker sites, and in the process, will cost Americans a lot of money.<br />
<br />
Full disclosure: I have $14 in my account at Pokerstars.com. I also used my frequency player points to buy a mug and a cap. I originally deposited $50 back in 2005, took out $100 in 2006, and have vacillated between $10 and $30 in the account since then. Obviously, I have a lot riding on this. If Pokerstars goes under, I'm going to have to have that difficult conversation with the wife: "I know I've made some bad decisions. That massage chair for $800 which I never used. Those fur coats for the dogs. Three big screen TVs in 3 years, each time saying, yes, this one is finally big enough for me*. But now, its going to be Kraft dinner and tuna for the next few weeks. Wait, what?! I just found $14 in the couch ... never mind!"<br />
<br />
Back in 2006, the US government slipped a section into the SAFE Port Act that made sending money to online gambling sites illegal. This was a big blow; some sites pulled out of the US and others declared they would still serve Americans. The next few years, online floated along in a grey area (like Canadians getting US satellite signals or picking up a chocolate bar off the ground and still eating it) and then "Black Friday" (Apr. 15, 2011), where the US government arrested representatives of the big online poker sites and shut down the websites. Their big claim is that poker site "tricked" banks by disguising charges. Now the US has made a further complaint, that Full Tilt is a Ponzi scheme and doesn't have enough money to allow players to get their deposits back.<br />
<br />
This is so annoying. Hey, you know what else is a Ponzi scheme? CPP! The money young people give to the Canadian Pension Plan isn't invested or put in the friendly giant's mattress; it pays for the old retired fogies. But don't worry, when you're an old fogy, there will be a new batch of suckers to pay for your retirement. Or something.<br />
<br />
That was annoying thing #1. Here's number #2**: poker players warned about this. Hey Sherlock, if you make it hard to get money out of a poker site guess what? It becomes hard to get money out of a poker site. The reality is people are going to play online poker because casinos are creepy. I'd rather sit in my underwear and play poker with my wife sitting in her nightie on the couch next to me ... wait. Okay, that's a bad example because 14% of the time you'll see that exact scene in a casino. But you get my point. And with the US government making it much harder to legitimately get money on/offline, you push poker players into having to use shadier methods. Like sending checks to the pokersite with sneaky names like the "Ace of Spades Non-Gambling Charity Foundation".<br />
<br />
Annoying #3 is poker is not gambling! I know, you might think it is because there are cards and a dealer, like blackjack (which <u>is</u> gambling). But its not, because there are players that consistently win. What's that? Your aunt Sally wins at blackjack? No, actually she doesn't. She's stealing from you uncle. But the other reason why it can't be a game of chance is that you don't have to show your cards to win. You can bluff. The last reason is that you get to check your cards first before you voluntarily put money it. In blackjack, craps, and roulette you have to pay before you get your cards, the dice are rolled, or the wheel is spun (raggedy man!) Not gambling mean laws that apply to gambling don't apply to poker.<br />
<br />
So what we have is an activity that adults freely engage in and the US government has declared war on. So what that a bunch of players are going to lose a bunch of money. Collateral damage.<br />
<br />
Now Full Tilt isn't helping by mismanaging its funds. But the scary thing is the exactly same thing would happen if everyone decided they wanted their money in their TD checking account (worse ... see below). The US government is making a big deal about the fact Full Tilt has $400MM in liabilities and $40MM in cash. But what they don't mention is these sites make about $1MM <i>a day</i> in profit. Like all businesses, cashflow is much more important that net assets. But if the US would stop being so anti-online poker, these sites could set up in the US and be regulated. This is win-win, because they would pay taxes and they would be regulated so they would be required to keep some percentage of deposits available.<br />
<br />
Okay, now something that will scare the hell out of you. Full Tilt had 10% of its deposits in reserve. In banking, this is called the "reserve rate". And Canada phased out "reserve rates" back in the 90s. Yes, that means that banks in Canada are free to lend out 100% of the money you deposit. But don't worry. Because the powers that be are dealing with this huge gambling problem.<br />
<br />
* Phrasing!<br />
** This is like saying "number number 2", but it made me laugh, so it stays in.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-42681198037365744812011-09-20T13:35:00.000-06:002011-09-20T13:35:01.923-06:00Unite without unions?<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9k6LWDwnELSCsVLcHdSZTfhkSv3ayfXa6_4OzpoKrgCHI2bQtoZ4lO_ENdRYK-EdbzQ9_H6JfvtiCi62l2slB1UO0hUgPluGxBWPOVDSuEhwRdrPzIABBcIOmKix_kYUyOufsJ6FvKAI/s1600/boss1.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="269" rba="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9k6LWDwnELSCsVLcHdSZTfhkSv3ayfXa6_4OzpoKrgCHI2bQtoZ4lO_ENdRYK-EdbzQ9_H6JfvtiCi62l2slB1UO0hUgPluGxBWPOVDSuEhwRdrPzIABBcIOmKix_kYUyOufsJ6FvKAI/s320/boss1.png" width="320" /></a></div>Air Canada flight attendants, members of CUPE (Canada's largest union), are planning to strike tomorrow. It was only back in June that the government nearly had to legislate the Air Canada call-centre staff back to work. Some questions come to mind when I hear all this. Why aren't there strikes at Westjet? Why does the government have to legislate people back to work? Why are unions necessary?<br />
<br />
When I was in college, the teachers at my high school went on strike. They needed people to help the students, so I volunteered. My dad, at the time, didn't say much, as I was an adult. But I think it was pretty scandalous, me being a scab. Frankly, I needed some money, and I felt bad for the kids, so I decided to help. I didn't have to physically cross any picket line, however.<br />
<br />
In the years that followed, I started to feel bad about doing that. That is about the time I read a lot of Noam Chomsky, and thought "the man" was screwing everyone over. I worked at a lumber mill one summer, and I remember a poster in the shop: "Your boss needs you, you don't need your boss." I've come to realize that capitalism is a heartless economic system, but it better and freer than any other system out there.<br />
<br />
Collective bargaining is entrenched in law in Canada, while in other places it is voluntary. Here is why I think mandatory collective bargaining is not necessary.<br />
<br />
Say I go into Walmart and I want to buy a $10 soccer ball. I say to the manager, "I want 10% off this ball." He says no, and I leave the store. Both of us are free to bargain and then agree to terms.<br />
<br />
Now lets say I go into Walmart and I represent a soccer league (a collective). I say to the manager, "I'm going to buy 100 soccer balls and I want 10% off." There is now incentive for the manager to deal with me. He can sell a lot of balls at once and since he's just dealing with me, there are savings (rather than selling 100 balls to 100 people). He counters with 5%, and we are both free to accept or decline the terms.<br />
<br />
Imagine that I want my 10% but he is unwilling to give me that, so I barricade his doors and shut down his store. This is essentially what Canada's collective bargaining laws are like. There is already incentives for management to deal with a group of people, rather than just each person separately. There is no need to make it law. But when it becomes law, it distorts the normal functioning of the market.<br />
<br />
If employees bargain as a group, they gain some leverage over a company. But there needs to be balance, or else it is just legalized extortion. If a collective's demands outweigh the cost to fire all of them and retrain new employees, then the company <u>must</u> have that option. Of course, smart companies know that this is a last resort and would only be done if the employee collective was being totally unreasonable. But company management understands the broader picture. Public companies have stockholders who must be paid. They know the market climate. Employees are just one piece of the puzzle.<br />
<br />
Because employers are not allowed to fire unionize employees, we end up with a system that constantly needs government interference and legislation. If collective bargaining were voluntary, like all contracts, the market would function much better.<br />
<br />
It is tough to talk about this because I know many people with government pensions. I think talking about pensions (specifically) and unions (in general) usually gets bogged down in the historical function of unions, which was to protect workers from oppressive and unsafe working conditions. I don't really think these are an issue anymore because they are now covered by Canadian law. And I don't think non-unionized companies are unpleasant to work for.<br />
<br />
I think my biggest concern with unions is they foster an "us" vs. "them" attitude between employees and management. This is why, I believe, Westjet doesn't have strikes. The union isn't necessarily concerned about budgets and cashflows. Its mandate is to get the best working conditions and the highest salary. I don't even think they are that concerned about maintaining workers for the future. For example, if there is a 10% cut to a school districts budget, and the teachers union declares they have to let go 10% of the teachers (mostly the new hires), they are being disingenuous. Everyone <em>could</em> take a 10% pay cut and then everyone could keep their job. (Of course, upper union managment couldn't afford $1000 pants anymore*.) These are the types of compromises that other companies make all the time. Smart companies know that everyone taking a pay cut while times are tough will significantly save training money in the future when business picks back up. These are the types of things that unions aren't really concerned with.<br />
<br />
I think unions may have outlived their usefulness. I think people should be free to enter into legal contract with whoever, and however, they want. I think workers and management, pulling together with the same goal (success of the business) is a much more effective strategy. Of course, if I ever get a unionized job with a pension, forget I said any of this.<br />
<br />
*I'm serious. I'll tell you about it someday.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-80617117123489143812011-07-05T09:54:00.002-06:002011-07-05T11:06:48.984-06:00Greek Tragedy<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg51gQTWNy3OO5lEuUYpUHGaRFrEohxcURWnCy1w6i5JSo_0Xv3qI9VqaBTS5wr0be4Re6GOOC4EkHXYgZYp0x6f6YpaJ38mZTj31H_tLzMH5vm6EOSXTWM7_B6b1TauJTNZrehQkgvgbo/s1600/greek_warrior_color.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" i$="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg51gQTWNy3OO5lEuUYpUHGaRFrEohxcURWnCy1w6i5JSo_0Xv3qI9VqaBTS5wr0be4Re6GOOC4EkHXYgZYp0x6f6YpaJ38mZTj31H_tLzMH5vm6EOSXTWM7_B6b1TauJTNZrehQkgvgbo/s320/greek_warrior_color.png" width="233" /></a></div>You may be asking yourself: what is going on in Europe with this so-called debt crisis? Why is everyone freaking out about Greece? What's "contagion", and is their an ointment for it? Is there a financial zombie apocalypse happening? I'm going to try and answer all these questions. This is an interesting topic because people make it more complicated than it is. You can actually relate it to things like your household budget very easily.<br />
<br />
<br />
Let's start simply, with budgets. Countries, like households, have income and expenses. Countries get income through taxes. Taxes tend to be related to a countries gross domestic product (GDP), so the more stuff a country makes, the more its government makes in taxes. If a government spends more than they earn in a given year, it is called a deficit. Do this enough, and that will lead to debt.<br />
<br />
Debt isn't a bad thing, as long as it is a reasonable percentage of income. Most of us are comfortable going into debt to buy a house or a car. In Canada, household debt as a percentage of yearly disposable income has steadily increased from 90% in 1990 to about 140% today. The same idea can be applied to countries. For example, Canada's debt to GDP ratio is about 34%, which is reasonable. However, this is only the debt owed to Canadians, called "internal debt". We also have debt we owe to foreigners, which is about 75% of GDP. This is called "external debt".<br />
<br />
You may be asking, how can countries have debt? Where does the money come from? Let's go back to our household. Say you buy a house and get a loan from the bank. This is "external" debt, because you borrowed from someone else. But say you want to buy a car but the bank won't lend you money. You could raid your kids college fund, or you borrow from your rich aunt. These could be thought of as "internal" debt.<br />
<br />
How do these translate into a countries debt? Well, most countries issue bonds, which are basically I.O.U.s which both citizens and foreigners can buy. You give the government some cash and the government promises to pay you back. The interest rate the government agrees to give you depends on a how risky lending them money is. Stable countries have relatively low interest rates because they don't need to entice people to give them money. Unstable developing countries need to pay more to entice people to give them money because there is a real risk that they could default. The free market determines the interest rate on bonds. For example, the current Greek 2-year bond rate is 28% (i.e., if you lend Greece money for two years, they'll give you 28% a year interest!) Compare this to Canada's 2-year bond rate of about 1.5%.<br />
<br />
What does "Greece has a debt crisis" mean? What it means, basically, is Greece spends more than it earns, and it can't make regular payments on the debt it owes to citizens and foreigners. As of 2010, Greece owes 165% of GDP to foreigners (mainly European banks) and 130% of GDP to citizens (mainly entitlement programs like pensions and benefits). Because they are having trouble paying people, no one will lend them any money, and if they will, it is at insane interest rates. This is like not being to pay down a credit card with 10% interest, so you get a credit card with 20% interest to try and make payments -- clearly not a sustainable situation.<br />
<br />
<span style="color: blue;">(I'm going to take a quick aside here. You may be thinking, "Why do countries have to ask anyone for money? Why don't they just print it?" Some countries do that. The U.S. is doing that right now with their "quantitative easing". The problem is that unless you are a totally self-sustaining country, you have to buy stuff from other countries. If you debase your currency too much, the price for other stuff like oil and grain will just keep getting higher and higher. Eventually, when everyone loses confidence in your currency, hyper-inflation happens. For example, Zimbabwe has a $100 trillion dollar bill.)</span><br />
<br />
Since Greece is a part of the European Union, the fact they are in trouble is affecting everyone. The European Union will help them out, <strong>BUT</strong> Greece has to get things under control. Foreign banks have put pressure on Greece not to restructure the debt they owe to them (restructure is a fancy term for saying: "I'm broke, so do you want <em>some</em> of what I owe you or <em>none</em>?") Internal debt is much easier to muck around with, so that is what Greece is doing.<br />
<br />
Just like we raided our child's college fund to pay for our car, countries can do similar things. Eliminating pensions and benefits are one way. Pensions are a liability, whose cost is born by future generation. To get Greece's spending under control (so Greece can continue to pay back debt to foreigners), the EU is asking them to undertake "austerity measure" (also called "belt tightening" or "belt selling and giving the profits to banks"). If Greece does this, the EU will lend them some more money.<br />
<br />
Let's create a detailed example to show what is going on. You buy a house, and are paying a $1000/month mortgage. You want a car, so you take the money out of your kids college fund, and are repaying that back at $500/month. Then your wife loses her job so your monthly income takes a hit. What do you do? You start getting credit cards, at progressively higher interest rates to continue living the life you are accustom, plus paying down your mortgage and replenishing the college fund. But things reach a breaking point. No one will lend you more money. So you go to your rich aunt and say, help, I need money. She looks at your situation and says, "Okay, I'll lend you the money, but you need to balance you budget. You can't spend more than your earn, so you'll have to cut back. No eating out and no new video games. If you do that, I'll lend you the money." You say, "Auntie, don't you know the bank manager? Perhaps he can reduce my mortgage so I can pay less per month?" The bank manager is not pleased to hear this, which your Aunt conveys to you. "Sorry, I think you're going to just have to stop paying into the college fund until you get back on your feet." Given all the pressure, you relent. You cut back (but wife and kids aren't happy), and the college fund payments stop, but the mortgage payments continue on at the same rate, and you get some much needed spending money to make it to next month.<br />
<br />
Sounds like a reasonable story, right? Wrong. Greece (and Ireland) should do what Iceland did, and that is say "screw you" to the bank. Iceland had huge foreign debt, but rather than destroy their own country for some foreigners, they shared the pain all around. It isn't perfect. But defaulting is a safety valve in the capitalist system, and is required. The reason is there are always two parties to every transaction: a lender and a lendee. Both have to be kept responsible so neither abuses the system. Lenders have to do their due diligence to make sure they are lending money to people who are able to pay it back. Also, lendees have to be responsible and not take on too much debt. But when things get out of control, all parties involved need to share the pain.<br />
<br />
Don't get me wrong, countries like Greece have to stop this insane socialist experiment and balance the books. Democratic governments always have this danger: that they will get caught in a cycle of bribing people with their money. As Thatcher said, "Socialism works until you run out of other people's money to spend."<br />
<br />
The final issue is this stupid word "contagion". I hate it. It sounds like financial crises are colds that other people can catch. This is nonsense. The reality is if one person in a community gets laid off, then chances are others are getting laid off too. If a recession hits a community and a bunch of people's houses got foreclosed, you wouldn't say, "We've got to get this foreclosure contagion under control before it spreads to other people." The PIGS nations (Portugal, Ireland, Greece, and Spain) are in trouble because they spend more than they earn. If other nations (I'm looking at you Italy) start having the same problems, its not because they were infected with anything, but because they too spent more than they earned.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com2tag:blogger.com,1999:blog-5929730285993570137.post-14050632061669943012011-07-02T21:53:00.000-06:002011-07-02T21:53:05.076-06:00How I Learned to Stop Worrying and Love the Mart<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBtu2Ke6qAvcy2kZSV3ISv7b_vhrhK2G9rSpTaNjP1y01gV6gaT8kxaOmjvN5OtqkE9fKhN-GydxF27OnYiXLZ_1ZI5HPSq3Hbjf7hxe8yCqVicxuvlg-FjiwRGvvykdV5EGHYZUlposs/s1600/6th_sign_of_the_apocalypse.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBtu2Ke6qAvcy2kZSV3ISv7b_vhrhK2G9rSpTaNjP1y01gV6gaT8kxaOmjvN5OtqkE9fKhN-GydxF27OnYiXLZ_1ZI5HPSq3Hbjf7hxe8yCqVicxuvlg-FjiwRGvvykdV5EGHYZUlposs/s320/6th_sign_of_the_apocalypse.png" width="320" /></a></div>Revelation Chapters 6:12: "And I beheld when he had opened the <b>sixth seal</b>, and, lo, there was a great earthquake; and the two most unholiest of shoes were joinithed togetherith, forming a monstrosity which shall markith the feet of his dark army." <br />
<br />
This picture was taken at Walmart, which many consider the evilest of stores. In this blog post, I'm going to try and convince you of something: Walmart isn't really that bad.<br />
<br />
I watched a documentary about Walmart (I think it was "The High Cost of Low Price") and it made me not like Walmart. I didn't shop there for years and instead went to Zellers or Superstore. After a few years of pain and suffering, I changed my mind.<br />
<br />
Zellers is that absolute worst store in the world for customer service. I have left my basket (full of stuff) and walked out of Zellers more than any other store I've been to. These people just do not want my money.<br />
<br />
Question: How many idiot cashiers does it take to determine the price of a can of beans? Answer: It is actually a trick question. It takes three of them, milling about, to figure out they need to call a manager to come over and answer it. When the line-up goes back into the housewares section, it is time to get off your cell phone and open another till.<br />
<br />
Many Zellers have self check-outs, which are awesome because 4 tills can be watched by one person, but they never use them. Instead, they have gone to the committee-of-three cashiers model because apparently they only hire people with 1/3rd of a brain. Cashiers are the one place where you want an abundance of staff, because that is where money changes hands.<br />
<br />
The other day at Safeway, I tried to buy a chocolate bar and the scanner wasn't recognizing it. The cashier asked a bagboy to go check the price, and I said forget it. The cashier said to me, "Can I offer you the chocolate bar for 50 cents?" Impressive customer service.<br />
<br />
Which brings me to Walmart. That store is a joy to go to. The aisles are wide, the staff are friendly, and they get you through those tills fast. There are always dozens of cashiers on.<br />
<br />
I'm going to try and read your mind. Right now you are saying:<br />
"But Walmart destroys mom and pop stores."<br />
"Walmart treats its employees bad and bust unions."<br />
"They keep prices too low." What?<br />
<br />
Mom and pop stores suck. There, I said it. My wife worked retail for years. Small business owners are crappy to their employees. Here's an actual conversation:<br />
<ul><li>"So, there will be a staff meeting on Sunday for 1 hour after the store closes."</li>
<li>"You know that you have to pay everyone a minimum of 3 hours, right?"</li>
<li>"What?"</li>
<li>"That's the law."</li>
<li>"I've never heard of that. I'll tell you what, I'll make it 45 minutes, and I'll bring it cookies."</li>
<li>"You can bring in anything you want, but you have to pay us for 3 hours."</li>
</ul>My wife was never invited to a staff meeting again. You think Walmart can pull that sh!t?<br />
<br />
I remember when I worked for Dairy Queen back in GP, the owner used to get some of us guys to go over and mow his lawn and do general yardwork -- during work hours. There is no way that is legal. The mythical mom and pop don't exist -- all business owners are dicks.<br />
<br />
The advantage to mom'n'pop stores is that mom and pop will spend money in the community and not ship it back to corporate headquarters, or to foreign shareholders. This is one of the best arguments against Walmart. Unfortunately, it doesn't carry the weight on we look into it.<br />
<br />
Let's take the Croc-o-pedic shoes in the photo above. Let's say they cost $10 at Walmart, which can be broken down into:<br />
<ul><li>$5 - wholesale cost of shoes, which goes to some Chinese manufacturer</li>
<li>$2 - wages to employees</li>
<li>$2 - overhead like rent and power</li>
<li>$1 - profit to head office and/or shareholders</li>
</ul>The problem with mom'n'pop stores is they buy the same stuff from China, but they don't have the clout to get them to lower their prices. So you get the same foam-a-geddon shoe, but its more expensive, say $15.<br />
<ul><li>$7 - again, wholesale to China</li>
<li>$4 - wages (assuming mom'n'pop are better to their employees)</li>
<li>$4 - overhead (because they have a smaller store that is not in some industrial park, so the relative cost is higher)</li>
</ul>So in this example, buying your mac-goofy-shoes at Walmart causes $6 to leave the community, while buying them at mom'n'pops pulls $7 out of the community. This is just ignoring the fact you spent more of your hard earned money on the shoes. The <b>only </b>time that mom'n'pop stores have an advantage is when they are selling locally made products. In that case, I fully support local businesses. But if you are buying Chinese-made shiny crap, then buying from mom'n'pops is just throwing your money away.<br />
<br />
Note: I have nothing against Chinese products. They are awesome. But America really screwed up. You know the expression, "A capitalist will sell you the rope to hang him"? In the pursuit of short-term profits, they outsourced all their knowledge. So now, there is really nothing China can't make. I for one, will welcome our Chinese overlords.<br />
<br />
On a final note, the reason these fitness shoes alegedly work is they make it more difficult to keep your balance and walk, so you have to work harder and therefore burn calories and tone your muscles. I see elderly people wearing these and I think, What the hell are you doing, this is going to make you more likely to fall. I guess you'll lose a bunch of weight when you are in the hospital with a broken hip.<br />
<br />
Tune in next time when we open the Seventh Seal of the Apocalypse!BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-8958157358809685332011-06-05T17:51:00.000-06:002011-06-05T17:51:20.277-06:00Creating my first Android app, Part 4This is the last post in a four part series. Go here to read <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-1.html">Part 1</a>, <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-2.html">Part 2</a>, and <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-3.html">Part 3</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDW6MCP1DlcUsxgSy0S2bi-FHS_0eBv4llScw4MgpvowPPV9DF32iOGb622oITRhqDFhK_9SL59sZA7gm3q4edFmi1nUpkL-thHlzDVhCVFeQyvb1u39-vk3xvvT72tOdDoCOMoeAT9o4/s1600/appman.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDW6MCP1DlcUsxgSy0S2bi-FHS_0eBv4llScw4MgpvowPPV9DF32iOGb622oITRhqDFhK_9SL59sZA7gm3q4edFmi1nUpkL-thHlzDVhCVFeQyvb1u39-vk3xvvT72tOdDoCOMoeAT9o4/s200/appman.png" width="200" /></a></div><br />
This is the final blog about creating apps. First, I'm going to clean up some functionality from the last blog. Second, I'm going to show you how to email a note.<br />
<br />
If you "packaged" the app and downloaded to your phone, you would notice it worked, <u>but</u> notes would not be saved between instances of the program. Actually, the notes are saved, but the list of notes aren't.<br />
<br />
Here's the solution. We need to store the list of note titles in the database every time we save a note, and then load them every time we try and load a note. It involves modifying two blocks. First, modify the [ButtonNoteSave.Click] block:<br />
<br />
<ol><li>Click [My Blocks], click [DatabaseNotes], click+drag [call DatabaseNotes.StoreValue] just <u>below</u> the [call add items to list] block.</li>
<li>Click [Built-In], click [Text], click+drag [text text] to the "tag" slot. Click on the second "text" on the [text text] block, which allows you to edit it. Rename it "TagNoteTitles". This will be the tag where we will store the list of Note Titles. Confusing enough for you?</li>
<li>Click [My Blocks], click [My Definitions], click+drag [global ListNoteTitles] to the "valueToStore" slot.</li>
</ol><div>Now when you save a note, the current list of note titles will be saved into the database. That way, if we close the app and start it again, that list of titles is stored. As I said before, there is no easy way to extract what exactly is in the database, so we need to keep track of it.</div><div><br />
</div><div>Second, we need to load the list. This can be done in several different places, but for simplicity, lets do it before we load a note. We need to modify the [ListNoteLoad.BeforePicking] block.</div><div><ol><li>Click [My Blocks], click [My Definitions], click+drag [set global ListNoteTitles to] just <u>above</u> the [set ListNoteLoad.Elements to] block.</li>
<li>Click [My Blocks], click [DatabaseNotes], click+drag [call DatabaseNotes.GetValue] to the "to" slot.</li>
<li>Click the block we created above named [text TagNoteTitles]. We want to copy it, so press CTRL+C, and press CTRL+V. This should create a duplicate of this text block which we can drag over to the "tag" slot on the [call DatabaseNotes.GetValue] block.</li>
</ol><div>So before we load a note, the list named "ListNoteTitles" is pulled from the database.</div></div><div><br />
</div><div><b><u>Emailing a note</u></b></div><br />
On to being able to email yourself (or some other person) a note. The biggest problem I had with other note apps was the notes were trapped on the phone. To get them off, you had to cut and paste the note into an email.<br />
<br />
The basic idea is the note title is the email subject, the note message is the email body, and the email address in the TextBoxEmail is where the email is to be sent. The app will call a component called Activity Starter (which we named AppEmail). Activity Starter can be used to start the camera, open the browser, open a map, etc.<br />
<br />
The steps are below:<br />
<ol><li>Click [My Blocks], click [ButtonEmail], click+drag [when ButtonEmail.Click] to the editor.</li>
<li>Click [My Blocks], click [AppEmail], click+drag [set AppEmail.Action] to the notch.</li>
<li>Click [Built-In], click [Text], click+drag [text text] to the "to" slot. Edit the text to say "android.intent.action.VIEW".</li>
</ol><div>I'll be honest; I'm not sure what this does exactly. But I read it on another blog and it works. Did I shatter any ideas you had that I <i>wasn't</i> a hack? Good. Now we have to pass all the interesting information to the Activity Starter. This involves a huge string of text with the email address, subject, and body.</div><ol><li>Click [My Blocks], click [AppEmail], click+drag [set AppEmail.DataUri] to the notch below [AppEmail.Action].</li>
<li>Click [Built-In], click [Text], click+drag [call make text] to the "to" slot.</li>
<li>Click [Built-In], click [Text], click+drag [join] to the "text" slot. The [call make text] block will create a new open slot named "text". Click and drag two more [join] blocks to the [call make text] block so there are three total.</li>
<li>Click [Built-In], click [Text], click+drag [text text] to the [join] blocks. It needs to go to the first slot. Do this three times for all three [join] blocks. Edit them to say "mailto:", "?subject=", and "&body=".</li>
<li>Click [My Blocks], click [TextBoxEmail], click+drag [TextBoxEmail.Text] to the top right [join] block. The other two need to be filled in with [TextBoxTitle.Text] and [TextBoxMessage.Text]. I think you are getting the hang of this by now.</li>
<li>Click [My Blocks], click [AppEmail], click+drag [call AppEmail.StartActivity] to the notch below [set AppEmail.DataUri].</li>
</ol><div>When the [Email Note] button is pressed in the app, your email program will come up ready to send the note. All you have to press is [Send]. (Your phone may ask you to specify which mail program to use, if you have more than one.)</div><div><br />
</div><div>So there you go! You have a useful app for recording, playing, storing, and emailing notes. You can go on to add a bunch of extras, like bitmaps for the buttons, icons for the app, etc. to make your app look really pretty (see the picture above for my finished app -- note the gaudy yellow/red/blue color scheme). If you have any questions, please feel free to post comments on my blog. They are moderated (only because I was getting a bunch of Chinese spam) but I usually respond within a day or so. And by "so", I mean weeks or months later. Or never. These are all acceptable definitions of "so'.</div><div><br />
</div><div>I may, at sometime in the future, decide to bore everyone again, and post some of the games I've made. Or maybe not.</div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjalIGmWbmyML0g7IY15aFPsDvmF4mtF37CW919dJo1Xt8eFu1Akxy5P1Y9BvND65JMG00ldJ0x19xZu-Uz1kKEn9rC0bnMrfg7UZ9tU8joXuHzv5CKYrXlVqk9wLg7Rc-5J23Zrqi3j4o/s1600/App+Inventor+screenshot+6.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjalIGmWbmyML0g7IY15aFPsDvmF4mtF37CW919dJo1Xt8eFu1Akxy5P1Y9BvND65JMG00ldJ0x19xZu-Uz1kKEn9rC0bnMrfg7UZ9tU8joXuHzv5CKYrXlVqk9wLg7Rc-5J23Zrqi3j4o/s1600/App+Inventor+screenshot+6.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div>BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-79551237700481666772011-06-01T09:03:00.000-06:002011-06-01T09:03:07.819-06:00What catchy title for a post uses the word thermodynamics?<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIg8steDROKTh-x7BW6Hg_vD5TxohQGrZdpDATOGxvxaDPwWZXcA0Iq_atJx1YC3x9lEQDOTsQizrFVKAK7gvQkKZJPRCYolmagippOC_CYejaOudSZS3dkaXEU2dF-S7QKUj0W-H4pgU/s1600/perpetual.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIg8steDROKTh-x7BW6Hg_vD5TxohQGrZdpDATOGxvxaDPwWZXcA0Iq_atJx1YC3x9lEQDOTsQizrFVKAK7gvQkKZJPRCYolmagippOC_CYejaOudSZS3dkaXEU2dF-S7QKUj0W-H4pgU/s200/perpetual.png" t8="true" width="200" /></a></div>Understanding thermodynamics can help you in the world (seriously). There are four laws of thermodynamics, but one and two are most interesting. They are paraphrased below:<br />
<br />
Law 1 - Energy cannot be created or destroyed, it can only change form.<br />
Law 2 - When changing form, some energy is always lost as waste heat.<br />
<br />
Put another way: "Not only can you not win, you can't break even."<br />
<br />
<u>Practical application #1</u><br />
I read a story about a plan to put wind turbines near a highway to try and recapture the wind created by the fast passing cars. Sounds like a great idea, right? Use Law 1 above and tell me what is wrong with it.<br />
<br />
Where does the energy come from? When the highway is empty, the wind turbine won't turn, so the cars <u>must</u> be providing the energy. And that is exactly what they found when they tested it. The fuel efficiency of each car was found to be reduced slightly. The energy created by the cars was being changed from mechanical energy (motion of the car) into wind energy (motion of the air molecules) into mechanical energy (motion of the turbine) into electrical energy.<br />
<br />
The worst part is, as Law 2 states, every time you change form, you waste some energy. So you are basically burning gasoline to create electricity, but in the most inefficient way possible. It is sort of a Rube Goldberg contraption of idiocy.<br />
<br />
So you may be asking yourself, "Where exactly is the practical application of thermodynamics you promised?" And here it is. You can yell at the monitor when you read these types of dumb ideas and your partner and/or dog and/or fish and/or D&D action figure can nod their head at how smart you are. Or maybe shake their head at how crazy you are. I'm not sure.<br />
<br />
<u>Practical Application #2</u><br />
If the 1st practical application wasn't enough, here is a second one, which actually involves money and prison!<br />
<br />
I had a co-worker pitch an idea for an invention to me. He said that his brother-in-law had a patent for a machine that could generate energy very cheaply. It was made from an outer hub with seven magnets, which was attached to an inner ring with .... (he paused and looked around, like he was about to blow my mind and didn't want any other minds around us to blow -- no collateral mind blowing) <strong><u>six</u></strong> magnets. "Because the magnets are spaced like that, the hub magnets are always pushing the ring magnets around, like a merry-go-round that never stops."<br />
<br />
I'm sure you've all heard of perpetual motion machines. Now contrary to popular belief, the US Patent office will not reject the <u>filing</u> of a patent just because it is for a perpetual motion machine. However, it does stipulate that a working model must be provided before the patent will be <u>granted</u>. Needless to say, that has never happened.<br />
<br />
Here's the thing. It is possible to build a "perpetual" motion machine with magnets. The reason is magnets do have energy in them, so as the machine moves it will slowly weaken the magnets. This obeys Law 1. However, taking the final step and trying to generate electricity from it can be a tricky step. Law 2 says that every time you try and change the form of energy, you piss some of that energy away. So the very act of hooking up a generator to your spinning 13 magnet science project will cause it to either spin slower or maybe weaken the magnets faster. In any case, you are just using the magnets like batteries and they will eventually die out, requiring you to get more magnets.<br />
<br />
You may have been waiting for the money and prison part. Here it is. My co-worker told me about this incredible invention and asked me if I wanted to invest in it. His brother-in-law was selling stakes in the company, which could be "worth millions". I explained how perpetual motion machines were impossible without an energy source. My co-worker looked at me, and then tried to explain the 6 magnet / 7 magnet configuration again. He even produced a sketch on some graph paper which "proved" it. Did I mention this co-worker had a degree in Engineering? I politely looked at his sketch and explained that you couldn't violate the first or second law of thermodynamics, which this idea clearly did. I warned him that he should not invest, and should explain thermodynamics to his brother-in-law next time they meet. "Well, I won't be seeing him for a while. He's in prison on fraud charges." I got up and slowly backed out of his office, which was a surprisingly awkward way to leave an office.<br />
<br />
Moral of the story: There is no thermodynamic law against being a moron.<br />
<br />
PS. I swear to dog this story is true.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-70584182178297253892011-05-29T09:25:00.001-06:002011-06-05T17:57:19.406-06:00Creating my first Android app, Part 3Go here to read <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-1.html">Part 1</a> and <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-2.html">Part 2</a>. (Note: I have slightly edited the previous posts, changing the name of one textbox to TextBoxMessage instead of TextBoxNote.)<br />
<br />
Blogger is being a jerk, so I had to d/l Google Chrome to compose this. What's that? You don't care? You just came here to eat my brains and gain my app knowledge? Okay, on with the meager meal.<br />
<br />
We will be doing something very complicated today: storing notes in a database which can then be retrieved using the ListPicker component. We will be building the functionality behind the [Save Note] button and the [Load Note] "button". The latter is an air quote "button" because it is actually a listpicker element that looks like a button.<br />
<br />
One of the components we put into our app was a TinyDB (which we named DatabaseNotes). This database works by storing stuff under a tag. For example, you could store your age ("39" in my case) under the tag "age". The nice part about TinyDB is that it stores stuff even after you turn your app off.<br />
<br />
We will store our notes, which consist of a title and a message, to the database using the title as the tag. That way, we can search the database for the title and reload our note.<br />
<br />
Let's start with the [Save Note] button. When we press it, we need to save the note in the database (using the title as the tag). But we need to think further ahead. How are we going to get the note back out? There is no easy way to pull out all the tags from the database, so we need to keep a list of all the tags we put in. The way to do this is with a list.<br />
<br />
A list is an 1-dimensional array. If that description made things more <b>un</b>clear, then a list is a list of things. So a list can be a list of numbers or a list of names or a list of titles. We will create a list of note titles and store it in the database, so we can pull it out, choose a title of a note, and then load the note.<br />
<br />
I think I've talked too much. Let's do some programming. I'm assuming you've opened up your app in App Inventor and opened up the Blocks Editor. First, define our list of note titles:<br />
<br />
<ol><li>Click [Built-In]. This is where all the build-in blocks are.</li>
<li>Click [Definitions].</li>
<li>Click [def variable as] and drag it to the editor.</li>
<li>Click on the "variable" and type "ListNoteTitles".</li>
<li>Click on [Built-In], click on [Lists], click on [call make a list], and drag it to [def ListNoteTitles as] and plug it in. This will define a list called "ListNoteTitles" which we can later store our list of note titles in.</li>
</ol><div>Next, the [Save Note] button.</div><div><ol><li>Click [My Blocks], click [ButtonNoteSave], click [when ButtonNoteSave.Click] and drag it to the editor. This will allow us to define what happens when the [Save Note] button is pressed.</li>
<li>Click [My Blocks], click [DatabaseNotes], click [call DatabaseNotes.StoreValue] and drag it to the editor. There is a notch at the top of it. Fit this into the spike on the [when ButtonNoteSave.Click] block.</li>
<li>Click [My Blocks], click [TextBoxTitle], click [TextBoxTitle.Text], and drag it and plug it into the "tag" slot.</li>
<li>Click [My Blocks], click [TextBoxMessage], click [TextBoxMessage.Text], and drag it and plug it into the "valueToStore" slot.</li>
</ol><div>This will save the note to the database, but we also need to save the note title to the list of titles, and then save that list of titles to the database.</div></div><div><ol><li>Click [Built-In], click [Lists], click [call add items to list], drag it, and put it below the [call DatabaseNotes.StoreValue].</li>
<li>Click [My Blocks], click [My Definitions], click+drag [global ListNoteTitles] to the "list" slot.</li>
<li>Click [My Blocks], click [TextBoxTitle], click+drag [TextBoxTitle.Text]to the "item" slot.</li>
</ol></div><div>Unfortunately, there is really no way to test this to see if it is working. We need to build the [Load Note] button first. There are two parts: before picking from the list and after. Before we pick from the list, we need to define what the list is.</div><div><ol><li>Click [My Blocks], click [ListNoteLoad], click+drag [when ListNoteLoad.BeforePicking] to the editor.</li>
<li>Click [My Blocks], click [ListNoteLoad], click+drag [set ListNoteLoad.Element to] and attach it to the notch in [when ListNoteLoad.BeforePicking].</li>
<li>Click [My Blocks], click [My Definitions], click+drag [global ListNoteTitles] to the "to" slot.</li>
</ol><div>This populates the list with all our note titles. After we choose which note we want to load, we need to copy the note from the database to the text boxes.</div></div><div><ol><li>Click [My Blocks], click [ListNoteLoad], click+drag [when ListNoteLoad.AfterPicking] to the editor.</li>
<li>Click [My Blocks], click [TextBoxTitle], click+drag [set TextBoxTitle.Text to] and attach it to the notch in [when ListNoteLoad.AfterPicking].</li>
<li>Click [My Blocks], click [ListNoteLoad], click+drag [ListNoteLoad.Selection] to the "to" slot.</li>
<li>Click [My Blocks], click [TextBoxMessage], click+drag [set TextBoxMessage.Text to] and attach it below [set TextBoxTitle.Text to].</li>
<li>Click [My Blocks], click [DatabaseNotes], click+drag [call DatabaseNotes.GetValue] to the "to" slot.</li>
<li>I'm going to show you a short cut. Click on the [ListNoteLoad.Selection] block, press CTRL+C, and press CTRL+V. This created a duplicate! Click and drag the duplicate to the "tag" slot below.</li>
</ol><div>Test out the app on your phone. Press the [Record] button on your phone and say "test". Press the [Copy to Title] and [Copy to Message]. The text "test" should show up in both text boxes. Now press the [Save Note] button. Nothing should happen: SUCCESS! Next press the [Load Note] button. The screen should go black and you should see the word "test". Click on it and you should go back to your app and everything will look the same. Again, SUCCESS! Okay, to <b>really</b> test if things are working, repeat all those steps except say "best". Now when you press [Load Note], you'll see "test" and "best". Pressing "best" will load that into both text boxes.</div></div><div><br />
</div><div>My eyes are going blurry looking at all this code. I'll show you how to email a note to someone next time.<br />
<br />
Go here for <a href="http://berserkerscientist.blogspot.com/2011/06/creating-my-first-android-app-part-4.html">Part 4</a>.</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Jpz8qLonHvr8FhFqmLuJd-fD7w2dic1oPj6Th0lQHvQBLCBzsQGYoOeAmDzHido57h7U4OY_vB3S7y7a2yWsCWilYZSaUvZKyJ4F1-IMny_LPBwKHefg4jM5lalLPSZ_YywKnNK0-SE/s1600/App+Inventor+screenshot+5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Jpz8qLonHvr8FhFqmLuJd-fD7w2dic1oPj6Th0lQHvQBLCBzsQGYoOeAmDzHido57h7U4OY_vB3S7y7a2yWsCWilYZSaUvZKyJ4F1-IMny_LPBwKHefg4jM5lalLPSZ_YywKnNK0-SE/s1600/App+Inventor+screenshot+5.png" /></a></div><div><br />
</div><div><br />
</div><div><br />
</div>BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-13070894701597143842011-05-23T06:39:00.003-06:002011-06-05T17:56:40.158-06:00Creating my first Android app, Part 2Go here to read <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-1.html">Part 1</a>.<br />
<br />
Now that all the components have been created in App Inventor, it is time to open the Blocks Editor and make the App actually work. Remember, the first part of App Inventor is like the clock-face, creating the look of the app. The second part is the Blocks Editor which creates the clock-mechanism, or how the app functions.<br />
<br />
Before you do that, you can clean up the look of the apps by using Screen Arrangements to group buttons together. I grouped mine together like this:<br />
[Record] [Play]<br />
[Copy To Title] [Copy To Message]<br />
[New Note] [Save Note] [Load Note]<br />
[Email Note] [Play Note] <br />
<br />
Now, click the [Open the Blocks Editor] button. This will download and run a Java program. You can connect to your phone by clicking the [Connect to Device...] button and selecting your phone. This will allow you to demo your app in real time and make sure it is working.<br />
<br />
The blocks editor is like a sand box where you can create blocks of code which do different things. If you are familiar with coding with programs like Pascal or Visual Basic, this is going to look weird. There is no where to type out the code! Not very powerful but very user friendly.<br />
<br />
Let's start with a simple one. What happens when we push the [Record] button in our app? We want to open up the SpeechRecognizer app, record some text, and then put that text into a text box. Here are the steps:<br />
<ol><li><b>Click on [My Blocks]</b>. This is where all the components you defined in App Inventor are. Now it should be clear why I named everything the way I did: because all your blocks are in alphabetical order. So all the buttons are grouped together, all the text boxes are grouped together, etc.</li>
<li><b>Click on [ButtonRecord]</b>. For component [ButtonRecord] there is a bunch of stuff you can do to interact with it. These different things are called "blocks". They are colored green, purple, dark blue, and grey. Green blocks allow you to do stuff when the component is interacted with (e.g., press a button). Purple blocks call other programs. Dark blue blocks set the properties of components (and have a puzzle piece shape on the right). Grey blocks are variables which represent the current properties of components (and have a puzzle piece on the left).</li>
<li><b>Click on [when ButtonRecord.Click]</b>. This is one of the green blocks. When the [Record] button is pressed in our app, this block tells the app what to do. Click the block and drag it to the editor.</li>
<li><b>Click on [AppSpeechRecognizer]</b>. Click on the purple block named [call AppSpeechRecognizer.GetText] and drag it to the editor. Notice there is a notch at the top of it. That should fit into the spike on the [when ButtonRecord.Click] block. They should click together. Now when the [Record] button is pressed, the Android built in app which translates speech-to-text should run. Try it now on your phone.</li>
</ol>What happened? It should have worked. Except where did the text go? We have to do a few more things before the text goes somewhere. Go back to the block editor:<br />
<ol><li>Click on [My Blocks]. Click on [AppSpeechRecognizer]. Click on [when AppSpeechRecognizer.AfterGettingText] and drag it to the editor. Notice that there is something called "result" on the right which has a value of "result". The text that the voice-to-text created is stored in a variable called "result".</li>
<li>Click on [TextBoxVoice]. Click on [set TextBoxVoice.Text to] and drag it to the editor. Attach it to [when AppSpeechRecognizer.AfterGettingText].</li>
<li>Click on [My Definitions]. The value "result" is here. This is where stuff that isn't specifically associated with any one component is stored, like global variables. Drag [value result] and plug it into [set TextBoxVoice.Text to]. Try the [Record] button on your phone again.</li>
</ol>Now what you say should appear in the Voice Textbox.<br />
<br />
For the end of Part 2, create the functionality of the [Play], [Copy to Title], and [Copy to Message] buttons. Below is what the blocks editor should look like.<br />
<br />
Go here for <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-3.html">Part 3</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuYL6hEg4Ec5NETqXlxAwQxzR6bp3bFlmSFeprZwEWN3LTMwH0fZ9NhV4ELx2Xvr55opwTK7Xj80B7gdtgQtlhV-ypSu6jsZfpEtziLxsj_EssXqhFBA6kPD0tLFSL52ASGsQi5-vOBAc/s1600/App+Inventor+screenshot+4+new.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuYL6hEg4Ec5NETqXlxAwQxzR6bp3bFlmSFeprZwEWN3LTMwH0fZ9NhV4ELx2Xvr55opwTK7Xj80B7gdtgQtlhV-ypSu6jsZfpEtziLxsj_EssXqhFBA6kPD0tLFSL52ASGsQi5-vOBAc/s1600/App+Inventor+screenshot+4+new.png" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div>BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-45855755938491796182011-05-22T21:01:00.002-06:002011-06-05T17:55:46.339-06:00Creating my first Android app, Part 1<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq_nzVE-rYmvrhcx1ggIw3i0imVGUzwZJA3IN_v0mcKZV8EC8vnkfQU6fkgGzEAaXulZh3pdmxllciLUPF3KvNv9HsJI3KSmf7Gf2F_77HOkhwmROl72qZPE0NsO8Zra_tsDb0KBrj9vY/s1600/VoiceBoxLogo_48x48.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq_nzVE-rYmvrhcx1ggIw3i0imVGUzwZJA3IN_v0mcKZV8EC8vnkfQU6fkgGzEAaXulZh3pdmxllciLUPF3KvNv9HsJI3KSmf7Gf2F_77HOkhwmROl72qZPE0NsO8Zra_tsDb0KBrj9vY/s1600/VoiceBoxLogo_48x48.png" /></a></div><br />
I have an android phone (Samsung Galaxy S - model SGH-I896). I love all the app's that can be downloaded, for practically anything purpose you can think of. Google recently came out with an app creator called <a href="http://appinventor.googlelabs.com/">App Inventor</a>. I created an app for my phone which I find really useful. I was thinking about uploading it to the<a href="https://market.android.com/"> Android Market</a>, but that would cost me $25. Instead, I'll write some blog post that will be <u>very very boring</u> to any normal person, but maybe some budding programers will enjoy it.<br />
<br />
First, you must install App Inventor. This requires a google email address. (These first few steps are going to be pretty sketchy, because since I have now installed everything, I can't remember what to do.) App Inventor is a two-part program. First, it is a web-based app creator which allows you up create the look of your app (images, buttons, text boxes, etc.) Second, it calls a Java program which downloads and runs. This program allows you to program the logic behind your app. Think of them as the clock face and the clock mechanics.<br />
<br />
The most difficult part to creating your app is actually downloading and installing all the appropriate drivers for your phone. This took me several <i>days</i> to do. I had to update my phone to the latest android version (2.2). After much google searching, I found all the drivers for my phone (both 32- and 64-bit) and saved them to a directory called c:\drivers\. Everything finally worked.<br />
<br />
So you've installed App Inventor and have all the drivers for you phone. Now it's time to start creating an app. (Don't forget to set your phone to development mode in Settings->Applications->Development.)<br />
<br />
If you've never programmed before, you may want to stop reading right now. Sorry I didn't put this earlier. Wow, you are tenacious. Next step is to do all the <a href="http://appinventor.googlelabs.com/learn/tutorials/index.html">tutorials</a>. These will help you understand how App Inventor works.<br />
<br />
The app I created is called VoiceBox. The reason I created it is I haven't found a notepad app I like. Android has voice-to-text and text-to-voice features which I thought would be great for an app. Imagine creating a grocery list by talking, and then play it back to yourself. What? Why would you want to <u>play</u> back a grocery list when it is just as easy to look down and <u><i>read</i></u> the list? This is a great question. I'll save it as a note in VoiceBox and play it to myself later.<br />
<br />
You will need these components: <br />
<ul><li>Eight (8) Buttons named ButtonRecord, ButtonCopyToTitle, ButtonCopyToMessage, ButtonPlay, ButtonNoteNew, ButtonNoteSave, ButtonEmail, ButtonPlayNote.</li>
<li>One (1) ListPicker named ListNoteLoad.</li>
<li>Four (4) TextBox named TextboxVoice, TextboxTitle, TextboxMessage, TextboxEmail</li>
<li>One (1) TinyDB named DatabaseNotes.</li>
<li>One (1) ActivityStarter named AppEmail.</li>
<li>One (1) SpeechRecognizer named AppSpeechRecognizer.</li>
<li>One (1) TextToSpeech named AppTextToSpeech.</li>
</ul>Drag all these components to the viewer and name them as above. Your app inventor should look like the screen shot below. I've realized these series is going to take several blog posts, so I'm going to leave it here. Stay tuned for more "exciting" slash "incredibly boring" posts in this series!<br />
<br />
Go here for <a href="http://berserkerscientist.blogspot.com/2011/05/creating-my-first-android-app-part-2.html">Part 2</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1OtU81WJNsxXoTJkzyB0arIMFWK8rMXNAVhOskXkU2KZYMlP2nIba2bfj4nHXt3ZcjiaEQLPPYaTLc9jf50Pi5IRlz7JtPUgzcVLVNBWrqpBtDIggYszIjQ7tbtzoNJTgUzx1k2yW3Ec/s1600/App+Inventor+screenshot+3+new.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1OtU81WJNsxXoTJkzyB0arIMFWK8rMXNAVhOskXkU2KZYMlP2nIba2bfj4nHXt3ZcjiaEQLPPYaTLc9jf50Pi5IRlz7JtPUgzcVLVNBWrqpBtDIggYszIjQ7tbtzoNJTgUzx1k2yW3Ec/s1600/App+Inventor+screenshot+3+new.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div>BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-91379389505563713522011-03-27T17:59:00.000-06:002011-03-27T17:59:38.176-06:00College FUN'd<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2XQBtFvyhovnWCNht9dMJ3xHtNJtVmx_VYjX-VJGCNhIit_NMtGtftFBvs1TcBWtDvIBJ2-w4F-jhXHFul9EVu_uYJYHI7EBxcWL9u_PeLg1F4m6-zAvpJl9gpFsuid94I_a1pKv4Who/s1600/PokePension.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2XQBtFvyhovnWCNht9dMJ3xHtNJtVmx_VYjX-VJGCNhIit_NMtGtftFBvs1TcBWtDvIBJ2-w4F-jhXHFul9EVu_uYJYHI7EBxcWL9u_PeLg1F4m6-zAvpJl9gpFsuid94I_a1pKv4Who/s320/PokePension.png" width="320" /></a></div>A recent Macleans article stated 32 per cent of Canadians said their retirement would be partially funded by a lottery win. I, of course, put that Macleans magazine in a vacuum sealed bag, where I will store it for 30 years until it becomes valuable. When I finally do remove it from storage, I'll chuckle at all those dummies waiting for their LottoMax win.<br />
<br />
Here is a list of other items which will pay for my retirement:<br />
- Dungeons & Dragons action figures, including a Shambling Mound(TM),<br />
- a box of comics, including the complete run of Power Pack,<br />
- one silver suit, one purple shiny shirt, and one purple sock tie, worn to a Grade 9 dance.<br />
<br />
Wait. What was that? Okay, my wife has just informed me that the silver suit has been donated to Goodwill. Good job, honey! Some hobo is cruising in the Mediterranean right now!<br />
<br />
To be perfectly frank, I'm still mad at my parents for allowing me to open my toys. I would not have to work right now if I had all my Micronauts in their original cases. Which brings me to the point of this post: my son's college fund. We keep it in a plastic container in the basement marked "Broken Glass and Poison" (to deter and confuse any would-be robbers).<br />
<br />
The college fund contains: Two mint condition Darth Maul figures (with a commtech(TM) chip so Darth Maul can yell at you if you tease him about his tribal tattoos!); One slightly melted bar of Fight Club soap, obtained from a screening of said movie; One sealed Pokeball from a McDonald's happy meal (I hope its you, Charizard!!!); One wind-up elephant from the Disney movie Tarzan, again, from a McDonald's happy meal.<br />
<br />
I know what you are thinking and I totally agree. I'm too heavily invested in McDonald's products. I had a Burger King cardboard crown in the collection, but it was damaged when the Fight Club soap melted. Note to investors: do not put your investments near a heating vent!<br />
<br />
Oh, and I think I put $30 in RRSPs this year too. See you on the beach!BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com2tag:blogger.com,1999:blog-5929730285993570137.post-29000893076928496682011-03-20T20:35:00.000-06:002011-03-20T20:35:11.668-06:00Broken Windows ...<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2HH_SMXUh_x8ftwzWKb8u3sUGpptypKadjhzNGXCjgXluWCmH_n0tVY7hWfyu4cPtj5AJNdnFSp9IqS7q8rqmPNNodmxaT5dkxPyo4BHz5ZgKpahkajAZUuCCN6QnMd3FyX47MUCIWts/s1600/croquet.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2HH_SMXUh_x8ftwzWKb8u3sUGpptypKadjhzNGXCjgXluWCmH_n0tVY7hWfyu4cPtj5AJNdnFSp9IqS7q8rqmPNNodmxaT5dkxPyo4BHz5ZgKpahkajAZUuCCN6QnMd3FyX47MUCIWts/s320/croquet.png" width="213" /></a></div>When I was 11, I was playing croquet at a friends house and I put a ball right through their basement window. I was goofing around and decided to pretend to hit the ball on my backswing. "Haha, look, he can't even hit a croquet ball!" I neglected to look behind me and the ball ended up in the basement. I remember sitting in my room later that night, listening to my dad talk to my friends dad, apparently discussing how much this was going to cost.<br />
<br />
There is no doubt that breaking that window removed wealth from the world, but not all the world. The glazier that my friend's dad later called gained some wealth, exactly the same wealth that my dad lost. However, this is not the only cost. There was an "opportunity cost" that my dad also endured, as he had to forgo something else (perhaps a delicious steak dinner at Mr. Mikes) to pay for my foolishness.<br />
<br />
Some (thankfully very few) commentators have commented that the recent earthquake may be just what Japan needs to "stimulate" its economy. This is a classic example of the <a href="http://en.wikipedia.org/wiki/Parable_of_the_broken_window">Broken Window Fallacy</a>. They could be forgiven for this error because the typical measure of a country's economy is the Gross Domestic Product (GDP). The GDP is a measure of all wealth generation but not of wealth destruction. This leads to the paradox that building a house, burning it to the ground, and building it again creates a higher GDP than just building it once.<br />
<br />
Let's go back to that cursed croquet game. Imagine that instead of breaking the window, the ball duplicated it. Sitting on the ground is the wayward ball and an exact duplicate of the window, frame and all. Since this is the exact opposite of the above situation, it is easy to see what economic results are. We can sell the free window and pocket the money (hello Mr. Mikes!) Unfortunately, the glazier will not be happy when he finds out about our magic window duplication scheme. Wealth is created in the world, but not all the world.<br />
<br />
Which leads to my final thought ... on copyright infringement. Copying a CD, a movie, a book, or a photo will indirectly remove <i>some</i> wealth from the owner of the content, just like it the glazier in the second universe. But this will not remove wealth from the economy. It cannot. Just like a broken window cannot add wealth overall, a duplicate window <u>must</u> add wealth.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-90325909361344721932011-01-21T13:02:00.000-07:002011-01-21T13:02:45.064-07:00Diet and exercise ... and dietJust in case you weren't convinced that <a href="http://weightloss.about.com/od/eatsmart/a/blcalintake_2.htm">About.com</a> is full of idiots, along comes Jennifer R. Scott with this "nugget" of wisdom:<br />
<blockquote><em>Experts agree that it's easier to exercise than to cut the same number of calories that exercise shaves off. In other words, it's just plain easier for us to be a little more active than to do without more food to achieve the same calorie reduction.</em></blockquote>I'm sorry, but W.T.F.A.Y.T.A? Not one sentence above, we get this:<br />
<blockquote><em>For example, a 180-pound person who walks at a brisk 3 mph will burn just over 250 calories in 45 minutes.</em></blockquote>Guess what else is 250 calories? A chocolate bar. How long does it take to eat? A few minutes. So what is more effective for losing weight? Jennifer, put your hand down. Let the adults answer.<br />
<br />
Why is exercise associated with weight loss? The two have very little to do with one another. For example, whenever they show ads for The Biggest Loser, they show an obese person jogging on the beach and then chowing down on a sub. The only thing that jogging will do for an obese person is destroy their knees. The only reason the two are linked, that I can think of, is very active people tend to be skinny. But correlation does not equal causation.<br />
<br />
If common sense wasn't enough, how about some studies. After a brief 24.8 second search on the Internet, I found this <a href="http://www.thefactsaboutfitness.com/articles/aerobicexercise.htm">link</a> which outlines several studies, all of which show that exercise "is not a major factor" in weight loss. I would look further, but I'm losing Rant Energy.<br />
<br />
So next time you see an ad or a news story on weight loss and they show people exercising, do what I do, shake you fist at the TV. And think about how dumb Jennifer is.<br />
<br />
P.S. I don't know Jennifer and the quality of her other post. She may or may not be an idiot*. <br />
<br />
*Note: she is an idiot.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com2tag:blogger.com,1999:blog-5929730285993570137.post-67549740806772052862011-01-11T18:33:00.000-07:002011-01-11T18:33:01.687-07:00Monkey and who, now with more cats!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbj5FWf5DCYfhD_sNW63A-Oqw1N3vTZ8pBl9noW0uMn1ayAUaiRvGApqJJmNhqkFnL7wddkqihyphenhyphenbmVbZB7W291NJzK-IwZSLb3IkR78KrTgEYnAohJaW5A57WATioh0FJBlBRLPykGnv0/s1600/Monkey%2526Me2011.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbj5FWf5DCYfhD_sNW63A-Oqw1N3vTZ8pBl9noW0uMn1ayAUaiRvGApqJJmNhqkFnL7wddkqihyphenhyphenbmVbZB7W291NJzK-IwZSLb3IkR78KrTgEYnAohJaW5A57WATioh0FJBlBRLPykGnv0/s320/Monkey%2526Me2011.png" width="320" /></a></div>Guess who's back for another year of misadventures. That's right, it is the calendar that makes every dumber, "Monkey" & me.<br />
I had a big list of things to blog about, and I even wrote them down. I can't find the list, so I'll have to wing it.<br />
<br />
<b>"You stole my idea!"</b><br />
I watched The Social Network. I thought it was pretty good, but, like Monkey and Me, in contains a line that will infect peoples' brains for years to come.<br />
<br />
"You stole my idea!" has its history in grade school. Being a "copycat" is bad. What the teacher wasn't telling the hundreds of snot-nosed kids coloring pictures of horses and spaceships, doing reports on the solar system and natives, etc. is she's seen it all before. Hundreds of times.<br />
<br />
Nothing is new. I think it was in college that I realized how dumb I really was. Nothing can be done if you are trying to reinvent the wheel, so the only way to do anything productive is to stand on the shoulders of giants. (I promise not to combine two lame cliches in one sentence again.) You must copy. You must steal. Everything is synthesis. In Engineering, we add things called "References" at the back of technical papers. In art, we call it homage or inspiration. But any creative person knows that they never really create anything new.<br />
<br />
I'm interested in screen (and normal) writing. Beginning writers are nervous about discussing story ideas with others. They are worried people will "steal their idea". They soon learn no one cares about ideas. They care about the concrete expression of those ideas. The actual lines of dialog, the descriptions of scenes. That is where the difficulty is. Google and Lycos are both "search engines".<br />
<br />
Copyright law recognizes this, therefore only actual expressions are subject to copyright, not ideas. More than that, if ideas were subject to copyright, it could infringe on free speech. Copyright is a government granted monopoly given to creators to make "copies" of their work. Its purpose to encourage creators to make more work and therefore enrich society. The ultimate measure is society's benefit, not whether a given creator is making a living.<br />
<br />
Copyright is not a property right. If I make a mix tape and give it to a friend, I'm not stealing anything. I am "infringing" on the creators right to make copies. Some people like to stretch definitions and say I'm stealing some of the creators potential revenue, because the friend may have bought the original CD.<br />
<br />
A friend tells you a joke while at coffee. That night, you tell the same joke to a group of acquaintances. Your friend overhears and is upset with you. "That was my joke!" My reaction is to tell him to buzz off. If he didn't want people to hear the joke he should have kept it a secret.<br />
<br />
Culture is a conversation. Copyright law must be a balance between encouraging people to speak in the conversation and allowing people to respond.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-49343573649598677122010-09-15T08:39:00.006-06:002011-01-11T17:52:27.790-07:00Sugar is poison<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFynYwjCvE_gbL1EyYyz2dmUbxZRNog3JTAjqYUEflYwWlmRANtJQJ71N5JAy4bdG5NM_hP993YAgmWLrKwYWwXWwGlRBZlYPCy5Hw1ytXu8kkA5IXkmYzCXmIxmwqrG_XyQxgmatUr5E/s1600/Glucose_Fructose_Sucrose.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5517151158514698290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFynYwjCvE_gbL1EyYyz2dmUbxZRNog3JTAjqYUEflYwWlmRANtJQJ71N5JAy4bdG5NM_hP993YAgmWLrKwYWwXWwGlRBZlYPCy5Hw1ytXu8kkA5IXkmYzCXmIxmwqrG_XyQxgmatUr5E/s400/Glucose_Fructose_Sucrose.jpg" style="cursor: pointer; float: left; height: 354px; margin: 0pt 10px 10px 0pt; width: 400px;" /></a><br />
Those latest adds by the Corn Refiner's Association which are trying to "rebrand" high fructose corn syrup (HFCS) as the same as sugar scare me. Why would they spend so much telling me it is "safe" if it were actually safe? I know, I'm a skeptic.<br />
Last night, I thought I'd try and educate myself about this. Here is what I found out.<br />
Sucrose is normal granulated sugar, the stuff we put in coffee or on cereal. Sucrose is made up of two other sugars in equal proportions -- Glucose and Fructose -- which are bonded together. When you eat table sugar (Sucrose), your body breaks it down into Glucose and Fructose.<br />
Glucose is the energy of life. It is in rice, pasta, grains, etc. It can be metabolized (used) by muscles, but is mostly broken down in the liver and stored until you burn it off (or, if you don't burn it off, it is turned into fat). Fructose, on the other hand, can only be metabolized by the liver. But there are a bunch of other nasty things that Fructose does.<br />
Fructose is found mostly in fruit (but fruit contains fibre which mitigates some of its bad effects). Fructose does not create an insulin response, which is why it is used by diabetics as a sweetener. Fructose creates uric acid which causes gout and hypertension. Fructose is more readily turned into fat than Glucose. A good analogy for Fructose is another carbohydrate, Ethanol, or booze. Ethanol is fine in small quantities but in large quantities, it causes toxic effects on the liver and your body. Fructose acts in exactly the same way, but without the buzz. Fructose, like Ethanol, is a poison! With all poisons, it is dosage that determines toxicity.<br />
Okay, so what is High Fructose Corn Syrup (HFCS) and why is it so bad? Well, HFCS is just Glucose (corn syrup) and Fructose, typically in exactly the same proportion as they are found in Sucrose (table sugar). They just aren't bonded together, which really doesn't mean anything because as soon as Sucrose hits your small intestine, it is broken apart. Look at the image above. The top (Glucose Fructose) is HFCS and the bottom (Sucrose) is table sugar. They are the same. Your body treats them the same. So what is the big deal? Here's the thing: it isn't that HFCS is worse than sugar, it is that sugar is really bad and HFCS is the same as it.<br />
The real problem is HFCS is really cheap so it is put in everything to make it taste better. Here is a good analogy. Image table sugar is rat poison. In the past, it used to sit in a bowl on your table and you'd put it in coffee or on porridge or in baking. But if you didn't put it in stuff you wouldn't eat it. You could control your intake. But now, the rat poison is in everything: bread, juice, pop, cereal, anything processed. So if you don't put rat poison in your coffee, who cares, because you are getting it in everything else you eat. That is what makes HFCS so dangerous, is that there is no escaping it.<br />
Sugar is poison, whatever the form.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com1tag:blogger.com,1999:blog-5929730285993570137.post-42639974923202407112010-06-10T18:07:00.006-06:002010-06-10T19:05:00.079-06:00Trendy Computer Hair Imaging<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL9lEubBNgz2h494xuccBHyX45T0-DA7BmTPGh2GSgeQEH8ihZ-EV4btIZOp0GIIO5c4ahpoBt8SyP0WTJqWbsk87jUvF9Tdb6ADIwBH2X4eVxuhYds_nxIW0aWn5Py74TxWduIsi_shg/s1600/Me.png"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL9lEubBNgz2h494xuccBHyX45T0-DA7BmTPGh2GSgeQEH8ihZ-EV4btIZOp0GIIO5c4ahpoBt8SyP0WTJqWbsk87jUvF9Tdb6ADIwBH2X4eVxuhYds_nxIW0aWn5Py74TxWduIsi_shg/s400/Me.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5481313610971639650" /></a><br />This is the greatest name for a business. My guess is you bring in a photo of your favourite computer so you can find out what he'd look like in an Edward wig. (Needless to say, I prefer Jacob.)<br /><br />Speaking of "computer hair", take a look at me in the corner. Of course, my hair can't be considered "trendy" anymore, as that picture of me was taken at my grad party in 1990. It takes a lot of hair spray to keep that much hair up. I just can't afford it.<br /><br />My 20th high school reunion was last weekend. It is amazing how you can just pick up where you left off with people. The reunion was very well done but I think I drank too much tequila. Thankfully, tequila is made from cactii, so I had no hangover.<br /><br />So back to T.C.H.I. If I had hair, I might check it out to reward them for having such a brave name. Seriously, service is so bad in Calgary that trying a business based on their name is just as likely as anything else to lead to good service.<br /><br />A few weeks ago, I wanted to buy a new car stereo. Our 2006 Kia was made just before ipod jacks were standard, so we need an FM receiver to listen to mp3s. So rather than buy a new car that has an ipod jack standard (hahaha, just kidding ... um ... cough cough) I wanted to just get a new stereo.<br /><br />I go into Future Shop and spend 20 minutes looking at different models. I'm surprised that three salesmen are not humping my leg, so I decide to go look at TVs instead. Right around the corner are 5 -- count them FIVE -- associates standing around bs-ing. I go to Best Buy and a very nice associate helps me almost immediately. He points out the Sony stereo is on sale and includes installation. "Bag it up," I say. (What? "Bag it up" isn't in style any more. Wow!) So the kid looks in the computer and then declares that he doesn't have a dash kit for my model of car. Okay. So what does that mean? "You could look on the internet for one," he says and then just stands there. I guess this means I'm going to be leaving with all the money I came in with.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-89772760778645542782010-05-10T20:03:00.003-06:002010-05-10T20:57:16.299-06:00Poor impulse control<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBf_p-YfI-SN9S03tx4Z6x9z_JC_M7T77NwUPqegddtbJTakYP-QHehW83pJm5r3SsN0AM0fM5q_OEKc9mIpOUdjYIMPG0-KXjS3Ey4QZy-C7a_ZopiiXsQgtZXrtrIE2QIjTPB41yjcY/s1600/I+crush+your+TV.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 262px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBf_p-YfI-SN9S03tx4Z6x9z_JC_M7T77NwUPqegddtbJTakYP-QHehW83pJm5r3SsN0AM0fM5q_OEKc9mIpOUdjYIMPG0-KXjS3Ey4QZy-C7a_ZopiiXsQgtZXrtrIE2QIjTPB41yjcY/s320/I+crush+your+TV.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5469840989234326258" /></a><br />I just recently bought a new high definition TV (HDTV). TV buying can be daunting and complicated, so I thought I'd go through the things I learned in my hunt.<br /><br />Only a year ago, I bought a 46" LCD Toshiba TV for $1600 at Visions. One of the main reasons we got it was it had an "upscaler", which allegedly made standard definition (SD) inputs (like from a DVD player) look high definition (HD). It worked okay, but we started watching more movies on our Blu-ray player and HD cable, so it because less and less useful.<br /><br />It was fine, but the feature that I really coveted was called Smoothing. Sony calls it "Motion Flow" and Samsung calls it "Auto Motion Plus". Before I explain what Smoothing is, I have to explain how TV signals work.<br /><br />Motion pictures are filmed at a rate of 24 frames per second (fps). Every second, 24 unique frames flash before your eyes. Television is broadcast at 60 fps. Since 60 is not divisible by 24, when movies are shown on TV they have to do something called 3:2 pulldown. What it means is the first frame is shown twice, the second frame is shown three-times, the third frame is shown twice, etc. See below for an example:<br /><br />[A] [A] [B] [B] [B] [C] [C] [D] [D] [D] ...<br /><br />3:2 pulldown can result in a flickery and blurry effect which is typically called judder. TV manufacturers have tried to combat this by increasing the frame rate of HDTVs to 120 fps (more commonly called 120 Hz). 120 <span style="font-weight:bold;">is</span> dividable by 24, so each movie frame is shown 5 times.<br /><br />This can only fix the picture so much. Just flashing the same picture 5 times may make it slightly clearer, but it doesn't change the fact that it is the same picture. This is where Smoothing comes in.<br /><br />Smoothing software in the TV tries to predict what the image would look like between two frames. So if a golf ball is on one side of the screen in one frame, and then on the other in the next, the Smoothing software tries to create a new frame with the ball in the middle. Smoothing tends to make film look more like video. It is very visible when the camera pans slowly across a scene. It also makes computer-animated movies look hyper-real.<br /><br />Smoothing tends to only be available on higher end TVs. Sony and Samsung (the top two LCD TV manufacturers) each had TVs with the feature that I was looking at but they were about $2400. If I had better impulse control, I'd wait until September or January, which are the best times to buy TVs. But I walked into a Walmart last week. Right in the middle of a bank of TVs I saw the beautiful glassy image of a TV with Smoothing enabled. They were showing Avatar and even though I don't really like that movie, I stood there for 20 minutes, totally ignoring the three phone calls Karen made to my cell phone. (I swear, honey, I did not hear my phone ringing.) I couldn't believe the incredible smooth image on a 47" TV that was only $1000. I did a little bit of research on the brand (no-name Vizio) to make sure it wasn't a total dog, and then picked it up on the weekend.<br /><br />It was the wife and my 11th anniversary, so it is really a gift to us. Your welcome, Karen.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-59909865425273956692010-03-18T19:40:00.000-06:002010-03-18T20:00:36.237-06:00Monkey & who?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8fWor3TQO0zeavRfarDFjq9wqLdHDChTr_Nxa9WzuJubL-tapMlIDXCvT2-rdfx1K2WjQrlKNbK4mjLqMAd7BlVJYvOgdYrg4Cmroi7H2kJRCyOr7MC3VFwlW2yvDjq2_faKWmtMBXe8/s1600-h/monkey+and+me.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 319px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8fWor3TQO0zeavRfarDFjq9wqLdHDChTr_Nxa9WzuJubL-tapMlIDXCvT2-rdfx1K2WjQrlKNbK4mjLqMAd7BlVJYvOgdYrg4Cmroi7H2kJRCyOr7MC3VFwlW2yvDjq2_faKWmtMBXe8/s320/monkey+and+me.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5450158214439275666" /></a><br />Take a look at the picture to your left. You just got 10% dumber.<br /><br />This calendar, whimsically named "Monkey & Me" has one problem. There is not a damn monkey to be seen. The animals on the cover are CHIMPANZEES. Let's list the differences between monkeys and chimps.<br /><br />Monkeys have tails.<br />Chimps have human-like ears.<br />Monkeys throw feces.<br />Chimps can use tools.<br /><br />It is really difficult to mix them up. Chimps sometimes EAT monkeys! Come on!<br /><br />For the longest time, I thought that bears and gorillas were related. Not first cousins or anything, but when you put them on the animal tree, they were close. People like my wife have teased me about this. I had no idea where I got this stupid idea until I was watching an old episode of The Little Rascals. In it, they capture a "bear" in the woods, and the "bear" is being played by a guy in a gorilla suit. They say "bear", I see gorilla, and I'm 1% mentally handicapped for 20 years. This is serious business. Calendars like the one above can cause real mental harm.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com1tag:blogger.com,1999:blog-5929730285993570137.post-56204026562756993392010-02-15T12:58:00.001-07:002010-02-15T16:50:23.611-07:00Gay Marriage and Abortion<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHVCxyX2lHu7DEO6liRhXkzgEp1cfegFcQ3hjB5XvsqAFUH54GiFg1ClsN7T2C1em75k822ofb76G-T4fFW2gzMrkCcckjAck_kT_46n6nbTckb4OmYkbGQE6eQVotvfgRE3lxjgxR5aA/s1600-h/Statistics+sign.png"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 295px; height: 270px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHVCxyX2lHu7DEO6liRhXkzgEp1cfegFcQ3hjB5XvsqAFUH54GiFg1ClsN7T2C1em75k822ofb76G-T4fFW2gzMrkCcckjAck_kT_46n6nbTckb4OmYkbGQE6eQVotvfgRE3lxjgxR5aA/s320/Statistics+sign.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5438621769879934514" /></a><br /><br />These are very serious and controversial issues. I will not talk about them at all. Instead, I'll talk about some other issues which concern me.<br /><br /><span style="font-weight:bold;">Usury</span><br /><br />In Canada, it is illegal to charge more than 60% yearly in interest. But every day, thousands of Canadians are charged much higher rates at payday loan companies like Money Mart and Cash Money. The maximum amount these companies can charge in interest and "fees" is 0.13% per day. For example, if you borrow $1000 you can only be charged $1.28 per day! These stores get around the law by adding fees to the transaction, in addition to the interest rate, which can drive the <span style="font-style:italic;">actual</span> annual interest rate up into the thousands of percent.<br /><br />Payday loan companies pray on the poor and those who may not understand how punishing compound interest is. They must be regulated nationally.<br /><br /><span style="font-weight:bold;">Statistics and Surveys</span><br /><br />There is a subject I think requires more explanation in school. That is Statistics.<br /><br />Almost every day, we are exposed to some survey in the media. But we should not treat them as all the same. Surveys are only valid if 1) they are random, 2) enough people participate, 3) the questions are good.<br /><br />First, many surveys aren't truly random. Telephone surveys can be slightly biased because they only survey people who own phones, have their number in a phone book, and (more importantly) agree to participate in the survey. Internet surveys are terrible because only people who are truly passionate tend to respond.<br /><br />Second, the more people who participate, the more accurate the survey. But keep in mind the actual population size. 100 people surveyed may be fine to know the opinion of Kia drivers but not to know the opinion of all Canadians.<br /><br />Third, the questions need to be clear, not-loaded, and unbiased. For example, "Should it be illegal to beat your child?" will give different results than "Do you think the government should be able to tell you how to discipline your child?". This is why it is important to look at the <span style="font-style:italic;">source </span>of the survey if the results look wonky.<br /><br />Finally, what do those margin of error statements mean (e.g., plus or minus 5 percentage points, 19 out of 20 times)? The first number is accuracy and the second is repeatability. Accuracy is how close the survey is to the actual opinion of the population being surveyed. Repeatability means if they did the survey again, how likely are they to get that same accuracy. Luckily, the repeatability on most surveys is 95% (19 out of 20 times) so looking at the percentage accuracy is a good judge of the survey.<br /><br />Surveys are just one part of statistics. Many people confuse correlation and causation (e.g., most prisoners are smokers, but that doesn't mean most smokers are criminals) and put far too much weight on anecdotal evidence (e.g., violent crime has steadily decreased since the 70's, but people still yearn for the "good ol' days").<br /><br />Okay, there I'm done. Oh right, I hate ads before movies. Yeah. Okay, now I'm done.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0tag:blogger.com,1999:blog-5929730285993570137.post-58261307265841170992010-01-27T17:20:00.000-07:002010-03-05T08:23:40.727-07:00Goodbye Noughties<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSeaoL8De1lTg3iDxRIP1ORyNg5JBVYFDGSFjqzqvVTd3__AfuYqWZIOYe28UanHD-Qnc6etoIEYOlkK12CXjuejo5PPuMHUPvd3I10TG2sfRsDsFhyvNIsUi_acCaj3fszRvvlvP8zZM/s1600-h/mbt+shoe.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 193px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSeaoL8De1lTg3iDxRIP1ORyNg5JBVYFDGSFjqzqvVTd3__AfuYqWZIOYe28UanHD-Qnc6etoIEYOlkK12CXjuejo5PPuMHUPvd3I10TG2sfRsDsFhyvNIsUi_acCaj3fszRvvlvP8zZM/s320/mbt+shoe.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5431582361793598434" /></a><br />It is 2010, and I thought it would be fun to look back at what blighted the Noughties.<br /><br /><span style="font-weight:bold;">CINEMATOGRAPHY</span><br /><br />The highest grossing movie of all time, Transformers II, is practically unwatchable due to what I like to call, "Visual Tourettes". This decade saw one of the worst gimicks in movies catch on: the shaky cam.<br /><br />Shaky cam has been used sparingly in the past for two reasons:<br />1. To give a amateur documentary feel (e.g., Blair Witch Project, Cloverfield). Note the "amateur". No good documentarian would have that much trouble holding the camera steady. Its not like the camera is balanced on their head. <br />2. To shoot fight scenes in movies where the director was too lazy to actually train his actors. Shaking the camera hides the fact that punches are landing 3 feet from the other guys face. A perfect example is Bourne Identity vs. Bourne Ultimatum and Bourne Supremacy. The former has good fight scenes where you know what is going on. The latter would be better viewed while riding the Tilt-a-Whirl.<br /><br />Two ridiculous things that must be mentioned:<br />A) Shaky cam in CG shots. The robots fighting in Transformers look like a bike and a garbage can rolling down a hill. <br />B) Shaky cam in scenes when nothing is happening. The hero may be faxing a letter and for no apparent reason, the camera is bobbing and weaving like a drunk got ahold of it.<br />C) Shaky cam to simulate POV shots of people running. Next time you go for a run, see if everything looks shaky. People's eyes naturally focus on a point, and will adjust as you run. Things might look shaky if you're running down the street with your hair on fire.<br /><br />I hope this "technique" dies off because many many good movies have been destroyed due to these ADD cameramen.<br /><br /><span style="font-weight:bold;">SHOES</span><br /><br />Three shoe styles have come out this decade which need to be called out.<br /><br />Uggs - Never has a shoe had a more appropriate name. To be fair, these shoes don't look terrible when new. After a while, these things slouch and begin to look like kid's nasty winter boots. And women will wear this things with tucked in sweat pants, rolled up jeans, or with mini-skirts. I know, I know, they are comfortable, but you look like you robbed a hobo.<br /><br />Crocs - Better living through chemistry! Crocs, plastic bags, and water bottles are not biodegradable. They also share something else in common: they shouldn't be worn on your feet.<br /><br />Fitness Shoes (eg., MBT anti-shoe, Sketchers Shape-ups) - These shoes are so mind-bogglingly ugly that I thought I'd make them the symbol of the year. These are like wearing a pair of rocking chairs on your feet. I had some weird shoes growing up (Reebok Pumps that actually pumped up, shoes with springs in them to make you jump higher) but the only fitness you'll get wearing these Frankenstein shoes is running away from people with pitchforks chasing you.<br /><br /><br />Okay, that's it. Those are my two nitpicks for an otherwise good decade. Of course, if you wear or like any of the things I talked about, I wasn't talking about you.BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com1tag:blogger.com,1999:blog-5929730285993570137.post-14915501230077403792009-09-28T12:57:00.000-06:002009-09-28T13:10:15.479-06:00Carbon, not just for pencils!<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWkQSt4z_CMCt2mQDjotMernQq9_Ouo-k4mC8oGZqYokeSHxqf_jYDHRE-gAviIDOhiTOhzBqyW5gSFgaC74fIIcw_f56r1Q3h6Bxf_QkXvA82NOaHKh2iW2PSNalG0mgeviuK62anfpE/s1600-h/CCS.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 319px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWkQSt4z_CMCt2mQDjotMernQq9_Ouo-k4mC8oGZqYokeSHxqf_jYDHRE-gAviIDOhiTOhzBqyW5gSFgaC74fIIcw_f56r1Q3h6Bxf_QkXvA82NOaHKh2iW2PSNalG0mgeviuK62anfpE/s320/CCS.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5386597514244553410" /></a><br />Our company is looking into Carbon Capture and Storage (CCS) technology as an area to get involved it.<br /><br />CCS can be summarized as so:<br />1. Carbon Dioxide (CO2) is produced mainly from coal-fired electricity plants, but also from other processes in the Oil and Gas industry. It is also produced by most animals when they breathe and by vehicles during combustion.<br />2. The CO2 is transported at high pressure to suitable areas to be stored.<br />3. CO2 is injected into the ground, either into oil/gas reservoirs or into deep aquifers.<br /><br />There are some large challenges that CCS must overcome before becoming viable. CO2, when mixed with water, becomes carbonic acid which can destroy steel pipelines in months. Because of this, the CO2 is typically “scrubbed” of any water and transported at a very high pressure so it becomes a liquid.<br /><br />Storage of CO2 is a challenge. If it is just pumped underground into a cavern it can leak out so it is typically injected into a deep underground river (called an aquifer). As discussed above, this will make the water undrinkable, so aquifers of already poor quality are used. However, CO2 can be injected into old oil wells as a way to revive them (called Enhanced Oil Recovery or EOR). This is really great because not only does it allow more oil to be recovered, but it traps the CO2 underground.<br /><br />The future of CCS is a bit fuzzy. After Al Gore’s movie, a lot of people became aware of CO2 and climate change. So there is definitely a political push to do something with the CO2 created. However, I’m not sure that when the bill comes in, people will want to pay. Capturing CO2 from a power plant will raise the price of power; maybe not a lot, but some. Capturing CO2 will require building thousands of kilometers of new pipeline. Storing it will create some environmental risk.<br /><br />The reality is most electricity is created by burning fossil fuels (e.g., coal, oil, gas). Renewables (e.g., solar, biofuel, wind, tidal) will be very difficult to scale up. Even then they will never cover the energy our planet currently uses. The only real scalable alternative is nuclear power, which has an image problem. Nuclear power has no emission, but does create spent fuel rods which are radioactive for thousands of years. To me, it is the same as if you took all the widely dispersed pollution created by a coal-fired power plant and just concentrated it into one rod. One really really dirty rod. That you don't want to touch. Or hide under someone's pillow, even as a joke. (I'm looking at you, Pickles.)<br /><br />Our company is committed, so we will be entering an exciting few years while we enter this relatively new area. (At least for North America; Europe has be doing CCS for a decade or so now.)BerserkerScientisthttp://www.blogger.com/profile/08481045158318361093noreply@blogger.com0