tag:blogger.com,1999:blog-70281814085827954862024-03-22T17:31:29.626+13:00Coding with the enemyMostly delphi and database programming with the occasional rantSeanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.comBlogger50125tag:blogger.com,1999:blog-7028181408582795486.post-47497030549256607852018-05-07T20:08:00.003+12:002018-05-07T20:08:51.608+12:00Speech links: How to be rich <div>
Mr chairman, fellow toastmasters and guests.</div>
<div>
<div>
<br /></div>
<div>
Recently I was enjoying my jet-setting hobby of visiting international airports. I was sitting in the departure lounge at Singapore airport when a man walked up to me and said "Hi Sean, how are you". It was Thomas; we had inadvertently booked onto the same flights back to Hawkes Bay.</div>
<div>
<br /></div>
<div>
WE got into a conversation about money, and Thomas asked a questions that I thought was both insightful and pertinent. He said "Sean, "", and this is almost a direct quote, he said "Sean, how can I be as rich and good looking as you?". So I told him. As you can see he is already much better looking. Afterwards I thought "That's good advice, I should take it" and also "I have to do a speech next week, I should tell everyone". So here I am.</div>
<div>
<br /></div>
<div>
I would like to introduce you to Harold Pollack. Harold is a blogger and podcaster. A few years ago he was interviewing someone about the personal finance industry, the financial equivalent of used car sales. He said “Isn’t the industry’s fundamental problem that the best advice for most people would fit on an index card, and it’s available for free at the library?”. They laughed and moved on.</div>
<div>
<br /></div>
<div>
Once the interview was published, people started asking. They said "Harry, where is the index card" and "Pollock, you pillock, show me the card."</div>
<div>
<br /></div>
<div>
So Harold took an index card, wrote down his 9 rules and posted a photo online. The rest is viral history.</div>
</div>
<span></span><br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Rules:</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">1</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">strive to save 10 to 20 percent of your income.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">2</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">pay your credit card balance in full every month.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">3</span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Put 3% into Kiwisaver or similar (NZ version) <span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-decoration: line-through; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">max out your 401(k) and other tax-advantaged savings accounts.</span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">4</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">never buy or sell individual stocks.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">5</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">buy inexpensive, well-diversified index mutual funds and exchange-traded funds.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-decoration: line-through; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">6</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-decoration: line-through; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-decoration: line-through; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-decoration: line-through; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">make your financial advisor commit to the fiduciary standard.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">7</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">buy a home when you are financially ready.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">8</span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">insurance. Make sure you’re protected.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 11pt; letter-spacing: normal; margin: 0cm 0cm 0.0001pt 54pt; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">9</span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: "Times New Roman"; font-size: 7pt; font-stretch: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Calibri, sans-serif; font-size: 11pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">do what you can to support the social safety net.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="orphans: 2; text-indent: 0px; widows: 2;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12.8px;">I promised to tell you how to be as rich as me. But I'm not rich. I have a wife and 2 teenage children who are expensive to keep.</span></span></span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="orphans: 2; text-indent: 0px; widows: 2;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12.8px;"><br /></span></span></span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="orphans: 2; text-indent: 0px; widows: 2;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12.8px;">I am not trying to be rich, I am aiming for something else: Financial independence; having enough investments that I don't need to work.</span></span></span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="orphans: 2; text-indent: 0px; widows: 2;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12.8px;"><br /></span></span></span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="orphans: 2; text-indent: 0px; widows: 2;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="font-size: 12.8px;">To be financially independent, you need to meet 2 criteria:</span></span></span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
</div>
<ol>
<li>Have 25 x annual expenses in savings and investments</li>
<li>Spend less than 4% of your saving/investments each year</li>
</ol>
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">If you can meet these criteria, then your investments should last at least 50 years.</span><br />
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br /></span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Closing thoughts</span><span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Money is like sex. </span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">We like it, but we don’t really talk about. it </span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">We all think we know what we are doing, but most of us don’t. </span></div>
<div style="background-color: white; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; widows: 2;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">We all think that everyone else has more than we do.</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">And like sex, the more you learn about it, the easier and better it gets</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="color: #222222; font-family: arial, sans-serif;">Links</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="color: #222222; font-family: arial, sans-serif;"><br /></span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; font-size: 12.8px;"><a href="http://freakonomics.com/podcast/everything-always-wanted-know-money-afraid-ask-rebroadcast/" shape="rect" style="font-family: arial, sans-serif; font-size: 12.8px;">http://freakonomics.com/podcast/everything-always-wanted-know-money-afraid-ask-rebroadcast/</a></span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div>
<a href="https://www.forbes.com/sites/zackfriedman/2017/03/09/9-money-rules-index-card/2/#22f5f62a7864" shape="rect" style="font-family: arial, sans-serif; font-size: 12.8px;">https://www.forbes.com/sites/zackfriedman/2017/03/09/9-money-rules-index-card/2/#22f5f62a7864</a><span style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"> </span></div>
</div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="https://www.amazon.com/Index-Card-Personal-Finance-Complicated-ebook/dp/B00W2ZKIOO/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr" shape="rect" style="-webkit-text-stroke-width: 0px; background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">https://www.amazon.com/Index-Card-Personal-Finance-Complicated-ebook/dp/B00W2ZKIOO/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr</a><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">=</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-stroke-width: 0px; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=670404" shape="rect" style="-webkit-text-stroke-width: 0px; background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">https://papers.ssrn.com/sol3/papers.cfm?abstract_id=670404</a><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">(Monkey’s and dartboards)</span></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div>
<a href="https://earlyretirementdude.com/4-rule-come-anyway-hint-wasnt-trinity-study/" shape="rect" style="font-family: arial, sans-serif; font-size: 12.8px;">https://earlyretirementdude.com/4-rule-come-anyway-hint-wasnt-trinity-study/</a></div>
</div>
<div style="-webkit-text-stroke-width: 0px; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br clear="none" /></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="https://www.asb.co.nz/asb-securities/how-exchange-traded-funds-work-guide.html" shape="rect" style="-webkit-text-stroke-width: 0px; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">https://www.asb.co.nz/asb-securities/how-exchange-traded-funds-work-guide.html</a></div>
<div style="-webkit-text-stroke-width: 0px; background-color: white; font-size: 12.8px; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="https://www.asb.co.nz/documents/asb-securities/find-an-etf-to-buy.html" shape="rect" style="-webkit-text-stroke-width: 0px; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">https://www.asb.co.nz/documents/asb-securities/find-an-etf-to-buy.html</a></div>
<div>
<a href="http://smartshares.co.nz/" shape="rect" style="-webkit-text-stroke-width: 0px; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">http://smartshares.co.nz</a></div>
<br />Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com1tag:blogger.com,1999:blog-7028181408582795486.post-15898692304193981522018-05-05T10:14:00.000+12:002018-05-09T10:11:58.655+12:00Using the Aorus GTX 1080 Gaming Box with an XPS 15 9560 TLDR: Everything is twice as fast<br />
<br />
I recently purchased an Aorus GTX 1080 Gaming Box (see <a href="https://www.notebookcheck.net/Aorus-GTX-1080-Gaming-Box-Review.301562.0.html">review</a>) for my 9560 (i7, 1 TB SSD, 32 GB ram). I have been playing with and testing it for a few days and am pretty happy with my purchase.<br />
<br />
<h3>
Initial impressions</h3>
Initial impressions are mostly good.<br />
Setup was annoying<br />
Recognition of the card when hot plugging is OK, but not outstanding. Typically takes 20 seconds for the card to recognised and my external monitor to be activated.<br />
The internal clearance is a bit tight. When it arrived, the gpu fan was hitting the casing. I had to remove the case (6 screws) and do some precision adjustment with pliers to resolve this.<br />
<br />
<h3>
Set up</h3>
Initial setup is a pain in the arse, although it would probably have been easier if I had found the CD and read the instructions.<br />
<br />
To set it up properly you should do the following:<br />
<br />
1. Install the 16.2 thunderbolt drivers from <a href="https://downloadcenter.intel.com/en/download/27344/%7BLINK_TO_FILE%7D">Intel</a><br />
2. Plug in the box and let windows recognise it<br />
3. Reinstall the graphics drivers<br />
4. Install the latest firmware from <a href="https://www.gigabyte.com/Graphics-Card/GV-N1080IXEB-8GD#support-dl">gigabyte</a>. This requires the 16.2 thunderbolt drivers<br />
5. Install the latest thunderbolt drivers from <a href="https://downloadcenter.intel.com/download/26052/Thunderbolt-Bus-Driver-for-Windows-10-8-1-and-7-for-Intel-NUC-Kit-NUC6i7KYK">Intel</a>.<br />
6. Profit<br />
<br />
<h3>
Performance</h3>
Gaming performance on an external monitor is much improved as you would expect. For every config that i have tried, I get 2 to 2.5 times the fps compared to the internal 1050 card.<br />
<br />
Gaming on the internal monitor was also improved, but not as dramatically. I got an extra 25% fps compared to the internal card. However the minimum fps was much better.<br />
<br />
I did quick and dirty benchmarking with the Far Cry 5 benchmarking tool.<br />
<br />
<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/AVvXsEjmY69Z9HAPtovaRuVar7Zot7HZC5kD9ZhfwwTkePPnMJOdQUFGzrycKeSMvpd9oC8-pdeH8Fzg0aMRTXx-9U4qV8dUVxSVQe0ACo-G6qewb4gH_xREuISIYnl0tyJIbBeUz1FAOV4n7R0/s1600/Farcry5_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="866" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmY69Z9HAPtovaRuVar7Zot7HZC5kD9ZhfwwTkePPnMJOdQUFGzrycKeSMvpd9oC8-pdeH8Fzg0aMRTXx-9U4qV8dUVxSVQe0ACo-G6qewb4gH_xREuISIYnl0tyJIbBeUz1FAOV4n7R0/s1600/Farcry5_2.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I also tried testing with Farcry 4. Unfortunately I couldn't turn off vsync, so with the gaming box I got a solid 60fps @ 1440p with everything on ultra. Using the internal card I averaged 28fps.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In Final Fantasy 15, I am getting 50 fps on highest settings.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Overall I am pretty happy with this. Every game that I have tried has been able to run at 1440p on highest/ultra settings at a playable framerate.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com2tag:blogger.com,1999:blog-7028181408582795486.post-39449414195421612902016-09-02T19:16:00.001+12:002016-09-02T19:20:40.847+12:00Welcome to the revolution(s)<br />
The following is a rough transcript of my toastmasters speech 7: "Do your research"<br />
<h3>
Downloads</h3>
<a href="http://www.sourceitsoftware.com/download/toastmasters/WelcomeToTheRevolution.pptx">Powerpoint</a><br />
<a href="http://www.sourceitsoftware.com/download/toastmasters/WelcomeToTheRevolution.pdf">Pdf</a><br />
<h3>
Speech</h3>
<br />
The Luddites were a protest group that primarily operated between 1811 and 1816. They were primarily workers in the garment industry. They started riots and destroyed machinery. These days, the name Luddite is applied to anyone who struggles with or opposes new technology. However, the original Luddites however weren't so much opposed to technology as to it's effects. In particular they feared the loss of work from automation and the replacements of skilled labour with unskilled. <br />
<br />
The Luddites were correct in their fears. The industrial revolution eventually resulted in better working conditions, better wages and an improved standard of living standard. However it took a long time to get there. On the way, it resulted in widespread pain and unemployment.<br />
<br />
Mr chairman, fellow toastmasters and guests, welcome to the revolutions.<br />
<br />
I am not actually going to talk about the first industrial revolution, the one we learned about in school.<br />
Nor am I going to talk about the second one, exemplified by Henry Ford’s introduction of the assembly line<br />
The third revolution was the digital revolution. Most of us have lived through it. But I am not going to talk about it<br />
<br />
I am going to talk about the one happening right now, the fourth industrial revolution.<br />
<br />
<br />
<ul>
<li>What is it?</li>
<li>What is the impact?</li>
<li>What can be done?</li>
</ul>
<br />
<h4>
What is it? </h4>
There area number of technologies making up IR4 such as<br />
<br />
<ul>
<li>AI</li>
<li>Robotics</li>
<li>Automation</li>
<li>genetic engineering/biotechnology</li>
<li>Nano technology</li>
</ul>
<br />
<br />
Most of these are autonomous, things that happen without human intervention.<br />
<br />
Individually any of these would have a large impact. together, it is a perfect storm of change.<br />
<br />
Let me give you a few examples:<br />
Every major car manufacturer is working on self-driving cars. Tesla has one out now. Uber is trialling self driving cars in Pittsburgh this month.<br />
<br />
Major truck manufacturers such as Mercedes Benz and Volvo are working on self driving trucks. The intention is that a local driver will drive the truck to a motorway, the truck will drive cross country to near it’s destination and then a second driver will handle driving the last few kilometres to the final destination. Long haul truckers will become short haul truckers<br />
<br />
IBM have been working on an AI called Watson. A few years ago it won the American game show Jeopardy, beating out previous champions.<br />
Now it is being used in medicine, as a laywer and in other fields such as teaching<br />
<br />
Amazon is my poster child for IR4. They started out as a website bypassing physical stores to reduce prices. They have giant warehouses heavily using robots and autonomous delivery cart. Now they are working on using drones to deliver directly to purchasers.<br />
<h4>
What is the impact?</h4>
There is going to be a big impact. Many job categories will disappear or become much smaller.<br />
<br />
<br />
<ul>
<li>Oxford: %47-81% of jobs under threat in 20 years</li>
<li>McKinsey Quarterly: Almost half of current job activities can be automated.</li>
<li>World Economic Forum: Predicts loss of 5m jobs in the next 5 years</li>
<li>The International Labour Organisation 137 Million SE Asian Workers Could Lose Their Jobs in the Next 20 Years</li>
</ul>
<br />
<br />
Most of the 137m SE Asians work in the garment industry, the industry that gave us the original luddites.<br />
<i><br /></i>
<i>“Foxconn replaces 60,000 factory workers with robots”</i><br />
Foxconn is the company that makes iPhones. They employ 480,000 people. Well they used to, now they employ about 420,000. These are people that make $5 per day, and it is still cheaper to use robots.<br />
<br />
If you think China is too far away to care about, Watties is right next door. They have been replacing workers with robots for the past 20 years<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZkm_45OsFMhGkZPKgflBpXuAQvJs0ImClmQh0jm7MzlqLVJ5Echx6egv68xZsNxJb2Q89F4bBeHjm65yvciFEMVdomazUvwq5fNn1UdtmCpJM4gVPv_CZuCIKL0vWsjmiUY9sif2erqk/s1600/Graph.png" imageanchor="1"><img border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZkm_45OsFMhGkZPKgflBpXuAQvJs0ImClmQh0jm7MzlqLVJ5Echx6egv68xZsNxJb2Q89F4bBeHjm65yvciFEMVdomazUvwq5fNn1UdtmCpJM4gVPv_CZuCIKL0vWsjmiUY9sif2erqk/s320/Graph.png" width="320" /></a><br />
<br />
This graph shows the change in income across the world from 88-2008. The poor are on the left, the rich on the right.<br />
The area around 50-60% is mostly China and India. New Zealand and other rich countries are mostly from 75% - 100%.<br />
<br />
This graph is both good news and bad news.<br />
Good news. If you are rich, well you got even richer.<br />
If you are poor, then it’s also good news. Offshoring and globalisation have made many of the poorer countries much better off.<br />
But for those of us in the room, we mostly fall in the 80-95% range. And we haven’t seen much growth in our incomes.<br />
<br />
IR4 may (and we don’t really know) make the dip even wider, as the rich keep getting richer but the drop in employment reducing incomes for the rest.<br />
<br />
<h4>
What can be done? </h4>
<ul>
<li>Shorter working hours</li>
</ul>
Before the 1st IR, the average working week was about 70 hours. Now it’s more like 40. If half of the jobs disappear then perhaps we will only need a 20 hour week. The French have already started moving in this direction.<br />
<ul>
<li>Universal Basic Income</li>
</ul>
The UBI is a payment made to every adult in a jurisdiction with very few eligibility criteria. It provides enough money for people to live without working and replaces most government benefits. It’s much like National Superannuation if it had a starting date age of 18.<br />
This is been trialled in many areas around the world. <br />
<ul>
<li>Education </li>
</ul>
Education will be key, but it will be lifelong education as employment requirements change.<br />
<ul>
<li>Adapt </li>
</ul>
In the long term, the 1st industrial revolution was a good thing. It reduced working hours, lowered the cost, and raised the standard, of living . However there was a lot of pain along the way. We can expect this again, the trick will be to navigate the 20-50 years till we get there.<br />
<div>
<br /></div>
<br />
<h3>
Links:</h3>
<div>
<a href="https://en.wikipedia.org/wiki/Luddite">https://en.wikipedia.org/wiki/Luddite</a></div>
<div>
<a href="https://en.wikipedia.org/wiki/Industrial_Revolution">https://en.wikipedia.org/wiki/Industrial_Revolution</a></div>
<div>
<a href="http://www.historyfuturenow.com/wp/where-are-all-the-jobs-going-lessons-from-the-first-industrial-revolution-and-150-years-of-pain/">http://www.historyfuturenow.com/wp/where-are-all-the-jobs-going-lessons-from-the-first-industrial-revolution-and-150-years-of-pain/</a></div>
<div>
<a href="http://firstindustrialrevolution.weebly.com/working-and-living-conditions.html">http://firstindustrialrevolution.weebly.com/working-and-living-conditions.html</a></div>
<div>
<br /></div>
<div>
<a href="https://en.wikipedia.org/wiki/Information_revolution">https://en.wikipedia.org/wiki/Information_revolution</a></div>
<div>
<br /></div>
<div>
<a href="https://www.wired.com/2016/08/pittsburgh-birthed-age-self-driving-car/" rev="en_rl_small" style="font-family: gotham, helvetica, arial, sans-serif; font-size: 14px;">https://www.wired.com/2016/08/pittsburgh-birthed-age-self-driving-car/</a></div>
<div>
<a href="http://www.bbc.com/autos/story/20140926-mercedes-self-driving-truck" rev="en_rl_small">http://www.bbc.com/autos/story/20140926-mercedes-self-driving-truck</a></div>
<div>
<a href="http://www.curbed.com/2016/8/31/12691516/self-driving-bus-vehicles-finland-helsinki-transportation" rev="en_rl_small">http://www.curbed.com/2016/8/31/12691516/self-driving-bus-vehicles-finland-helsinki-transportation</a></div>
<div>
<br /></div>
<div>
<a href="http://futurism.com/artificially-intelligent-lawyer-ross-hired-first-official-law-firm/" rev="en_rl_small">http://futurism.com/artificially-intelligent-lawyer-ross-hired-first-official-law-firm/</a></div>
<div>
<a href="http://futurism.com/137-million-southeast-asian-workers-could-lose-their-jobs-to-automation-in-the-next-20-years/" rev="en_rl_small">http://futurism.com/137-million-southeast-asian-workers-could-lose-their-jobs-to-automation-in-the-next-20-years/</a></div>
<div>
<br /></div>
<div>
<a href="http://www.intergen.co.nz/blog/Steve-Scarbrough/dates/2016/8/Whats-this-thing-about-50-percent-of-jobs-disappearing/?utm_source=Intergen&utm_medium=Bambu" rev="en_rl_small">http://www.intergen.co.nz/blog/Steve-Scarbrough/dates/2016/8/Whats-this-thing-about-50-percent-of-jobs-disappearing/?utm_source=Intergen&utm_medium=Bambu</a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<a href="https://www.engadget.com/2016/08/19/basic-income-ai/">https://www.engadget.com/2016/08/19/basic-income-ai/</a></div>
<div>
<br /></div>
<div>
47% of US job risk obsolesence <a href="http://www.oxfordmartin.ox.ac.uk/downloads/academic/The_Future_of_Employment.pdf">http://www.oxfordmartin.ox.ac.uk/downloads/academic/The_Future_of_Employment.pdf</a></div>
<div>
<a href="http://www3.weforum.org/docs/WEF_Future_of_Jobs.pdf">http://www3.weforum.org/docs/WEF_Future_of_Jobs.pdf</a></div>
<div>
<a href="https://www.td.org/Publications/Blogs/Learning-Executive-Blog/2016/03/2025-How-Will-We-Work-How-Will-Your-Job-Change">https://www.td.org/Publications/Blogs/Learning-Executive-Blog/2016/03/2025-How-Will-We-Work-How-Will-Your-Job-Change</a></div>
<div>
<br /></div>
<div>
Watties</div>
<div>
<a href="http://www.crossmanrichards.co.nz/case-studies/heinz-watties-robotic-palletising/">http://www.crossmanrichards.co.nz/case-studies/heinz-watties-robotic-palletising/</a></div>
<div>
<a href="http://www.summerfruitnz.co.nz/Grower/Articles/Automation%20and%20robotics">http://www.summerfruitnz.co.nz/Grower/Articles/Automation%20and%20robotics</a></div>
<div>
<br /></div>
<br />
<div>
<a href="http://www3.weforum.org/docs/Media/KSC_4IR.pdf" rev="en_rl_small">http://www3.weforum.org/docs/Media/KSC_4IR.pdf</a></div>
Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com0tag:blogger.com,1999:blog-7028181408582795486.post-66601766893283838542015-09-11T08:18:00.001+12:002015-09-11T08:18:45.821+12:00Using the Visual Studio Android emulator inside VMWareI do my development in Virtual machines. It makes it much easier to to back up and transfer my dev environments. However not everything works inside a virtual machine :(. Emulator that themselves rely on a virtual machine are problematic.<br />
<br />
When Visual Studio 2015 was released, I built a new VM and installed everything. VS2015 worked fine but the new shiny Android emulator wasn't so happy.<br />
<br />
The first error was around Hyper-V.<br />
<br />
<blockquote class="tr_bq">
<i><b>Visual Studio Emulator for Android</b><br />The emulator is unable to verify that the virtual machine is running:<br />Something happened while starting a virtual machine: 'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.bob' failed to start. (Virtual machine ID 889F3EA2-7B0E-4873-9180-C765E4293D4E)<br />The Virtual Machine Management Service failed to start the virtual machine 'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.bob' because one of the Hyper-V components is not running (Virtual machine ID 889F3EA2-7B0E-4873-9180-C765E4293D4E).</i></blockquote>
<i><br /></i>
This a fairly common error and once that is easy to fix.<br />
<br />
<ol>
<li>Open the .vmx file in notepad and ad the following lines:<br />hypervisor.cpuid.v0 = "FALSE"<br />mce.enable = "TRUE"<br />vhu.enable = "TRUE"</li>
<li>Run the VM. Go to "Programs and Features" and ensure that Hyper-V is installed</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5ou5P9ak-GTKObP_762xFdWFCD62Kyqwa6BGfg2aDE7QHyULmYG0Jip2qh5fY7Ws345P8L1An8tRls9Q6Elm5P9xdPNqymoQlnKK6j2vjL8DVx5wJ0EpTkcaRvjAMnBLVhHEq7MHquBM/s1600/hyperv.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5ou5P9ak-GTKObP_762xFdWFCD62Kyqwa6BGfg2aDE7QHyULmYG0Jip2qh5fY7Ws345P8L1An8tRls9Q6Elm5P9xdPNqymoQlnKK6j2vjL8DVx5wJ0EpTkcaRvjAMnBLVhHEq7MHquBM/s400/hyperv.png" width="400" /></a></div>
<br />
<br />
Running the emulator now gives a completely different error. Yay, progress.<br />
<blockquote class="tr_bq">
<i><b>Visual Studio Emulator for Android</b><br />An OpenGL error has occurred:<br />Failed to create Context 0x3005<br />The emulator will now shut down.</i></blockquote>
<br />
There are multiple ways to fix this:<br />
<br />
<ul>
<li>Turn off "Accelerate 3D Graphics" in the VM settings</li>
<li><a href="http://creativewebspecialist.co.uk/2015/07/22/how-to-use-visual-studio-android-emulator-on-vmware-fusion/">In the VM, edit the c:\program files (x86)\Microsoft XDE\10.0.10240.0\skus\android\xdesku.xml file and remove the following line from the file: GuestDisplayProvider=”VsEmulator.OpenGLGuestDisplay”</a></li>
</ul>
<br />
Either way works:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVUGq1ISfToxrd7782OHsWuwz08gtin2lORr3cxCOLaSO4wjHIGuBjw6wqQKEbfJ6THf5SiVOK0LKxH7ybJiZMJxPtRtW-oqU3tqHqNMZsR169Ma78i6uMaAnsWiuOIPdGFjpFjApWhLY/s1600/AndroidEmulator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVUGq1ISfToxrd7782OHsWuwz08gtin2lORr3cxCOLaSO4wjHIGuBjw6wqQKEbfJ6THf5SiVOK0LKxH7ybJiZMJxPtRtW-oqU3tqHqNMZsR169Ma78i6uMaAnsWiuOIPdGFjpFjApWhLY/s400/AndroidEmulator.png" width="223" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com6tag:blogger.com,1999:blog-7028181408582795486.post-14685992116334874902013-09-20T13:25:00.001+12:002013-09-20T17:33:34.408+12:00Slides - Cross platform programming with .net, xamarin and MvvmCrossThe slides from yesterdays presentation "Hot tuna - Cross platform development with .net, Xamarin and MvvmCross" are available from <a href="http://www.sourceitsoftware.com/download/HotTuna.pptx">here</a>.<br />
<br />
Useful links from the presentation<br />
<br />
<b>MvvmCross</b> <br />
Stuart Lodge - MvvmCross Author<br />
<br />
Twitter <br />
<a href="https://twitter.com/slodge">@slodge</a><br />
<br />
Blog <br />
<a href="http://slodge.blogspot.co.uk/">http://slodge.blogspot.co.uk/</a><br />
<br />
Videos <br />
<a href="http://www.youtube.com/user/MrHollywoof?feature=watch">http://www.youtube.com/user/MrHollywoof?feature=watch</a><br />
Video index <br />
<a href="http://mvvmcross.wordpress.com/">http://mvvmcross.wordpress.com/</a> <br />
<br />
Repository <br />
<a href="https://github.com/slodge/MvvmCross">https://github.com/slodge/MvvmCross</a><br />
<br />
<b>Xamarin</b><br />
Website <br />
<a href="http://www.xamarin.com/">http://www.xamarin.com/ </a><br />
Samples <br />
<a href="https://github.com/xamarin">https://github.com/xamarin</a><br />
Mobile library <br />
<a href="https://github.com/xamarin/Xamarin.Mobile">https://github.com/xamarin/Xamarin.Mobile</a> <br />
<br />
<b>Ninja Coder</b><br />
Adrian Sudbury – Ninja Coder Author<br />
Twitter <br />
<a href="https://twitter.com/asudbury">@asudbury</a><br />
<br />
Blog <br />
<a href="http://adriansudbury.blogspot.co.uk/">http://adriansudbury.blogspot.co.uk/</a><br />
<br />
Ninja Coder <br />
<a href="http://visualstudiogallery.msdn.microsoft.com/618b51f0-6de8-4f85-95ce-a50c658c7767">http://visualstudiogallery.msdn.microsoft.com/618b51f0-6de8-4f85-95ce-a50c658c7767</a><br />
<br />
<br />
<br />
<b>Portable Class Libraries</b><br />
<a href="http://www.hanselman.com/blog/CrossPlatformPortableClassLibrariesWithNETAreHappening.aspx">http://www.hanselman.com/blog/CrossPlatformPortableClassLibrariesWithNETAreHappening.aspx </a><br />
<br />Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com2tag:blogger.com,1999:blog-7028181408582795486.post-63590553587983515642013-03-27T16:54:00.001+13:002013-03-27T16:59:04.635+13:00Using sqlite.net with POCO classes<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-NZ</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="371">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:8.0pt;
mso-para-margin-left:0cm;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
SQLite has become one of the most pervasive embedded databases around. It's built into Android, iOS and OSX and is a part of many applications. It has also become the recommended client side database for WinRT applications</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The go-to solution for using SQLite in .net is
sqlite.net.<span style="mso-spacerun: yes;"> </span>It’s a simple ORM that comes
as one (or two if you want async support) source files.<span style="mso-spacerun: yes;"> </span>You can get the full source from <a href="https://github.com/praeclarum/sqlite-net">github</a> or just
the main files from <a href="http://www.nuget.org/packages/sqlite-net">Nuget</a>. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Sqlite.net lets you store nearly any object in the database without needing to descend from a specific type. However to make it work well, you need to decorate your objects with data attributes denoting primary keys, indexes and so on.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
For example:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">class</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Valuation</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span>[</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">PrimaryKey</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">, </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">AutoIncrement</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">]</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">int</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> Id { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span>[</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Indexed</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">]</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">int</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> StockId { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span></span>[</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Indexed</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">]</span> </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> DateTime Time { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 2;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">decimal</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> Price { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span>}</span><span style="color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
On startup, you register your class with SQLite as follows:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span></span>var myConnection =
new </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">SQLiteConnection</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"> (</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">"Stocks.db"</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">);</span></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span></span>myConnection.CreateTable<</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">Valuation</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">> ();</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This will check to see if the table exists in the database
and create or update it if required. </div>
<div class="MsoNormal">
You can then start using the database in your code.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span></span>var </span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">valuations = myConnection.Table<</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">Valuation</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">>().Where(...);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
However for my use case (cross platform application with
data objects defined in a portable class library and used in WPF, WinRT and MVC
applications), the attribute approach didn’t work.<span style="mso-spacerun: yes;"> </span>The nice thing about open source though is
that you can always change things…</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The latest github version of sqlite.net now has an optional
argument for CreateTable that allows defining indexes by convention.<span style="mso-spacerun: yes;"> </span> </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Acceptable values are:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>[</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Flags</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">]</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">enum</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">CreateFlags</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>None = 0,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>ImplicitPK = 1,<span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">//
create a primary key for field called 'Id' </span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>ImplicitIndex = 2, </span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">// create an index for fields ending in 'Id' </span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>AllImplicit = 3,<span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">// do
both above</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>AutoIncPK = 4<span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">// force
PK field to be auto inc</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So to define and register a class, we can now use something
like the following:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">class</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">Valuation</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> int Id { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> int StockId { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> DateTime Time { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">decimal</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"> Price { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">get</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">set</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">; }</span></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
And then </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span></span>myConnection.CreateTable<</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">Valuation</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">>(</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">CreateFlags</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">.AllImplicit | </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">CreateFlags</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">.AutoIncPK);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This will create the table, make Id into an auto incrementing primary key and add an index for StockId. To explicitly add additional indexes, use the CreateIndex
methods.<span style="mso-spacerun: yes;"> </span>E.g. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;"><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><span style="mso-tab-count: 1;"> </span></span>myConnection.CreateIndex<</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">Valuation</span><span style="background: white; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-highlight: white;">>(v => v.Time);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br />
The main advantage of this approach is that it lets you separate storage details of the object from it's definition. This is great for cases when you don't want to, or can't, use the sqlite attributes in the main class. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The main disadvantages are that you have now separated storage from definition, and currently there is no way to set the field size.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Sample applications demonstrating both approaches can be found on <a href="https://github.com/praeclarum/sqlite-net/tree/master/examples">github</a>. The sqlite.dll binaries can be downloaded from <a href="http://www.sqlite.org/download.html">here</a>.</div>
Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com1tag:blogger.com,1999:blog-7028181408582795486.post-92116410218695404792011-08-04T16:50:00.004+12:002011-08-04T17:17:48.344+12:00Delphi for iOS!I attended the Rad Studio World Tour today in Auckland. Delphi XE2 has some nice features (x64, <span class="blsp-spelling-error" id="SPELLING_ERROR_0">OSX</span>, <span class="blsp-spelling-error" id="SPELLING_ERROR_1">FireMonkey</span>) but the standout for me was the <span class="blsp-spelling-error" id="SPELLING_ERROR_2">iOS</span> support.<br /><br />Developing for the iPhone <span class="blsp-spelling-error" id="SPELLING_ERROR_3">et</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_4">al</span> is mostly a pain in the proverbial. <span class="blsp-spelling-error" id="SPELLING_ERROR_5">XCode</span> is somewhat of a mess and Objective C was designed by someone with an unholy fetish for square brackets. The last time I did iPhone <span class="blsp-spelling-error" id="SPELLING_ERROR_6">dev</span>, I did most of my coding in c++ on Windows and only booted into OSX for deployment and testing on the iPhone.<br /><br /><span class="blsp-spelling-error" id="SPELLING_ERROR_7">Embarcadero</span> are looking to fix that with Delphi XE2. You can write and test your code in Delphi on Windows. When you need to try it on <span class="blsp-spelling-error" id="SPELLING_ERROR_8">iOS</span>, you create a <span class="blsp-spelling-error" id="SPELLING_ERROR_9">xcode</span> project (1 mouse click, only needed once) and then boot into OSX and open the <span class="blsp-spelling-error" id="SPELLING_ERROR_10">xcode</span> project there. From <span class="blsp-spelling-error" id="SPELLING_ERROR_11">xcode</span> you can edit, compile, run and debug your 100% <span class="blsp-spelling-corrected" id="SPELLING_ERROR_12">Delphi</span> code. If you have either Windows or OSX in a virtual machine you can flick from one <span class="blsp-spelling-error" id="SPELLING_ERROR_13">tother</span> as you wish. Yor app can be compiled and run in both Windows and iOS.<br /><br />Awesome!<br /><br />It's not all perfect, <span class="blsp-spelling-error" id="SPELLING_ERROR_14">xcode</span> is still there, <span class="blsp-spelling-error" id="SPELLING_ERROR_15">OSX</span> is a must and the whole code signing is probably as irritating as before, but it's much better than the objective c alternative. It only works with new apps written using FireMonkey but you will be able to pull in older code.<br /><br />The <span class="blsp-spelling-error" id="SPELLING_ERROR_16">iOS</span> app is full native code, with access to hardware such as <span class="blsp-spelling-error" id="SPELLING_ERROR_17">gps</span>, <span class="blsp-spelling-corrected" id="SPELLING_ERROR_18">accelerometer</span> and camera.<br /><br />Note: Accessing the phone hardware means that your app will no longer run under windows due to either the hardware or the support units not being there. I suspect that this is resolvable with some conditional defines and a bit of hacking.<br /><br />Much to my supprise I am now excited again; both about delphi programming and about iOS programming.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com12tag:blogger.com,1999:blog-7028181408582795486.post-89813229516070195832011-06-11T14:44:00.002+12:002011-06-11T14:54:53.506+12:00Delphi image components, ImageEn has a new homeIf you have used image editing and manipulation in delphi, there is a good change you have used or heard of ImageEn components. I have used them in my photo printing program, <a href="http://www.picsprint.com/">Pics Print</a>.<br /><br />The ImageEn component suite has now moved to delphi shareware company <a href="http://www.xequte.com/">Xequte</a>. You can find them at <a href="http://www.xequte.com/imageen/">www.xequte.com/imageen</a> or at <!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-NZ</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:enableopentypekerning/> <w:dontflipmirrorindents/> <w:overridetablestylehps/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} </style> <![endif]--><a href="http://www.imageen.com/">www.imageen.com</a>. If you want to see the components in action, download demos from <a href="http://www.xequte.com/imageen/download/Index.html#Demos">here</a>.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xequte.com/imageen/graphics/home_build_apps.gif"><img style="cursor:pointer; cursor:hand;width: 671px; height: 550px;" src="http://www.xequte.com/imageen/graphics/home_build_apps.gif" alt="" border="0" /></a>Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com2tag:blogger.com,1999:blog-7028181408582795486.post-47012992293219713252011-03-09T12:26:00.001+13:002011-03-11T20:02:39.156+13:00Helpful tips for US based developers AKA Short date time is evilEnglish is a bit like html. There is a standard, but not everyone understands it, and there are a number of slightly incompatible implementations.<br /><br />This is most obvious in spoken English where accents, and idioms vary wildly causing mutual incomprehension.<br /><br />The last time I was in the USA, I had the following conversation in a restaurant:<br /><br /><span style="font-style: italic;">Me: Can I have a coke please</span><br /><br /><span style="font-style: italic;">Waitress: I’m sorry, what did you want?</span><br /><br /><span style="font-style: italic;">Me: A coca cola please</span><br /><br /><span style="font-style: italic;">Waitress: I <span class="blsp-spelling-error" id="SPELLING_ERROR_0">didn</span>’t quite get that. What did you want?</span><br /><br /><span style="font-style: italic;">Me (using the British technique of speaking slowly and loudly so the natives understand): A COCA COLA PLEASE</span><br /><br /><span style="font-style: italic;">Waitress (getting quite testy): What?</span><br /><br /><span style="font-style: italic;">Me: Can I have a Pepsi?</span><br /><br /><span style="font-style: italic;">Waitress: I’m sorry, we don’t have Pepsi. Would you like a coke?</span><br /><br /><br /><span style="font-weight: bold;">English as she is wrote.</span><br /><br />The problem with the World Wide Web is the worldwide part of it. Whatever you write, will probably be read by people from a different country. Even if your audience is English speaking, there are enough differences between countries for confusion and irritation to creep in.<br /><br />A few examples:<br /><br /><ul><li> Last year, Steam had a <span class="blsp-spelling-error" id="SPELLING_ERROR_1">pre</span> release offer for a game due to be released on 10/12/10(or similar). When is that? My natural reading was Dec 10, but it may have been Oct 12. There was no way of telling without trying to divine the writer’s intentions and country of residence.</li><li>Last month, I evaluated several <span class="blsp-spelling-error" id="SPELLING_ERROR_2">rss</span> readers for Win Phone 7. The first one I looked at had the dates <span class="blsp-spelling-error" id="SPELLING_ERROR_3">hardcoded</span> as mm/dd. If the author had just used the standard system formatting, it would have been correct and less work.</li><li>I also looked at The Weather Channel for Win Phone 7. There was a setting to use metric units. However even with this selected some (but not all) temperatures were shown in Fahrenheit. As an added bonus, the tile would sometimes show a temperature of -18. <span class="blsp-spelling-error" id="SPELLING_ERROR_4">Hawkes</span> Bay hasn't seen -18 since the last ice age.</li><li>In Blogger post options, the Post date is in m/d/yy format<br /></li></ul><br /><br /><span style="font-weight: bold;">So what do (mostly)US websites and applications frequently get wrong?</span><br /><span style="font-weight: bold;"><br />Dates</span><br />Short date time is evil! Repeat that and make it a mantra.<br /><br />Most of the countries I have visited use dd/mm/<span class="blsp-spelling-error" id="SPELLING_ERROR_5">yy</span>. The USA uses mm/dd/<span class="blsp-spelling-error" id="SPELLING_ERROR_6">yy</span>. I believe some countries use <span class="blsp-spelling-error" id="SPELLING_ERROR_7">yy</span>/mm/dd, but don't quote me on that.<br /><br />The upshot is that a date such as 09/10/11 is entirely ambiguous without context. Even if the date has some hints, such as 09/17/11, I still have to stop and parse the date rather than reading it. When reading, I devote less than a 1/10 of a second per word. Having to stop, figure out the date, and then start up again seriously screws up my reading.<br /><br />It's even worse when entering dates, now I have even more opportunity for screwing up. Fortunately most sites have moved to date time pickers or separate day/month/year boxes. Not all have though, one site I was on today used a single edit box with a helpful "dd/mm/<span class="blsp-spelling-error" id="SPELLING_ERROR_8">yyyy</span>" label beside it.<br /><br />Blogs and articles frequently refer to seasons. I.e. the new gadget is due in Summer 2011.<br />This is still problematic; our seasons are about 5.5 months out from the USA so that requires a certain amount of adjustment.<br /><br />As for the holiday season, <span class="blsp-spelling-error" id="SPELLING_ERROR_9">WTF</span>? I had to ask an American friend for clarification.<br /><br /><span style="font-style: italic;">"in general US holiday season means from Thanksgiving (3rd Thursday in November) to the day after new year’s day"</span>.<br /><br />That's not what I would have guessed. If we had a holiday season here, it would start just before Christmas and extend till late Jan. No-one would release anything then, we are all on holiday.<br /><br /><span style="font-weight: bold;">Measurement units</span><br />When it comes to measures, there is the US still soldiering on with the Imperial system, and pretty much everyone else is on metric. Unfortunately many sites and applications use just the Imperial measures which is at best an aggravation and at worst requires a quick unit conversion with Google, or more likely, a move onto a different site/app.<br /><br />Now I understand feet and inches in small quantities provided I don't need to be accurate. Miles require a mental conversion so it has to be something important before I will bother with the maths. After that, I get lost quite quickly.<br /><br />Ounces are awkward. To my uncertain knowledge, the only people around here who still use ounces are those engaged in buying and selling small amounts of dope. This is not at all useful in performing conversions. <span style="font-style: italic;">Update: I have been reliably informed that the local drug dealers have moved on and now sell in metric units and/or dollar units (e.g. a $250 bag).</span> Pounds are the same as ounces, only more so.<br /><br />Don't get me started on fluid ounces. I have absolutely no idea how big a fluid ounce is, and no desire to know. This has caused me some aggravation in the past; "How big a drink should I have? Well 60 oz sounds small..."<br /><br /><span style="font-weight: bold;">Number formats</span><br />Most countries use "," as the thousand separator and "." as the decimal separator. A few however have it the other way round. Some use spaces for a separator, and the Romans don't even use <span class="blsp-spelling-corrected" id="SPELLING_ERROR_10">Arabic</span> <span class="blsp-spelling-corrected" id="SPELLING_ERROR_11">numerals</span>.<br /><br /><span style="font-weight: bold;">What to do?</span><br /><ol><li>Don't hard code date formats. I use 'dd <span class="blsp-spelling-error" id="SPELLING_ERROR_12">mmm</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_13">yyyy</span>' in <span class="blsp-spelling-corrected" id="SPELLING_ERROR_14">written</span> text. In my web applications, I mostly use 'dd <span class="blsp-spelling-error" id="SPELLING_ERROR_15">mmm</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_16">yyyy</span>'. When I use the system short date time then I make sure that I also use <a href="http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx">asp.net globalisation settings</a>.</li><li>Don't hard code number formats either.<br /></li><li>Test with multiple cultures. I generally test with NZ and US cultures for dates. I also use Norway or Sweden for testing number formatting.<br /></li></ol><br /><span style="font-weight: bold;">Why am I picking on the Americans?</span><br />American based programmers seem to the be worst offenders. There are 2 main reasons for this:<br /><ol><li>The USA is a large part of the English speaking market, too large to be ignored for developers outside it. Anyone wanting to sell software into there needs to take account of the US language and units. The reverse is not <span class="blsp-spelling-corrected" id="SPELLING_ERROR_17">necessarily</span> true.</li><li>Observational bias. If someone was to <span class="blsp-spelling-error" id="SPELLING_ERROR_18">hardcode</span> metric and dd/mm/<span class="blsp-spelling-error" id="SPELLING_ERROR_19">yyyy</span> in their applications, I would never notice.</li></ol><span style="font-weight: bold;">Update</span><br />I didn't put my location in the original post; my point is that you should write and program so that others can understand regardless of your, and their, location. Nonetheless, for those that are interested, I live and work in <a href="http://www.hawkesbaynz.com/">Hawkes Bay, New Zealand</a>.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com21tag:blogger.com,1999:blog-7028181408582795486.post-86734555881273244552010-12-17T14:28:00.004+13:002010-12-20T21:43:40.060+13:00Developing on the Win phone 7 hardware without a developer accountMicrosoft have released a free toolset for developing Windows Phone 7 applications. However you cannot debug or deploy onto actual hardware until you create a developer account @ $99 per year.<br /><br />In my case, I only have a demo phone for 2 weeks so a developer account seems like a waste of money.<br /><br />To work around this restriction, you need to do the following:<br /><br /><span style="font-weight: bold;">1 Unlock the phone:</span><br />Download and install the Chevron unlocker and certificate from <a href="http://forum.xda-developers.com/showthread.php?t=857127">here</a>.<br /><br /><span style="font-weight: bold;">2 Stop the phone from relocking every time you reboot</span><br />Edit your hosts file (C:\Windows\System32\drivers\etc\hosts)<br />Add the line<br /><span style="font-style: italic;">127.0.0.1 developerservices.windowsphone.com</span><br /><br />You can now deploy and debug on your phone.<br /><br /><span style="font-weight: bold;">Note</span>: the phone will still relock itself every couple of weeks, giving the following error<br /><br /><span style="font-style: italic;">“[application name] has been revoked by Microsoft. Please uninstall it.”</span><br /><br />Just rerun Chevron and unlock again.<br /><br /><span style="font-weight: bold;">2nd note</span>: You can deploy your .xap file to others and they can run them on unlocked phones. However the continual relocking may get annoying.<br /><br /><span style="font-weight: bold;">3rd note</span>: You can't use Chevron to pirate applications. It will only allow you to run unsigned applications.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com0tag:blogger.com,1999:blog-7028181408582795486.post-89398741221083275572010-12-13T09:48:00.004+13:002010-12-18T08:16:30.887+13:00Developing for Windows Phone 7 in a virtual machineAccording to Microsoft, installing the windows phone developer tools into a virtual machine is not supported. This is because the phone emulator is itself a virtual machine and, as Inception has shown, running a virtual machine inside a virtual machine gets really slow. The emulator also requires DirectX 10 for XNA develoment, and current virtual machines only offer DirectX9.<br /><br />However I do all my development in virtual machines. I already have a VM setup with VS2010, version control, database etc. I don't fancy setting that up all over again just for a phone, particularly one that I only have for 2 weeks.<br /><br />Time to do some testing...<br /><br /><span style="font-weight: bold;">Virtual PC</span><br />Running the dev tools in a Windows 7 Virtual PC works (or rather fails to work) as advertised. While I could create and compile a phone project, I couldn't actually run it in the emulator.<br /><br /><span style="font-weight: bold;">VMWare</span><br />Using a VMware vm was much better. I could compile and run a silverlight project on the emulator. On my laptop, the emulator performance was dire. On my desktop however, emulator performance was adequate but not stunning.<br /><br />On either machine, XNA projects wouldn't run on the emulator due to the lack of DirectX 10. They would compile but trying to deploy would fail with "<span style="font-style: italic;">The current display adapter does not meet the emulator requirements to run XNA Framework applications</span>."<br /><br />However deploying and running on a real phone worked fine. Both Silverlight and XNA deployed and ran without any issues.<br /><br /><span style="font-weight: bold;">Booting from a virtual hard drive</span> (thanks Paul)<br />Should work but requires Windows 7. See <a href="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx">here</a>.<br /><br /><span style="font-weight: bold;">TL;DR</span><br />You can develop Silverlight applications in a VMWare virtual machine, testing against the emulator (slow) or actual hardware (fast). You can develop XNA applications in a VMWare vm but you need to deploy to actual hardware.<br /><br /><span style="font-weight: bold;">Useful links</span><br />Microsoft's free tools: <a href="http://create.msdn.com/en-US/">Create App hub</a><br />Charles Petzold giant ebook: <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=bb8f5eb6-8214-4387-bf02-f78f314a74eb">Programming Windows Phone 7</a><br />Reddit Win Phone 7 section: <a href="http://www.reddit.com/r/wp7dev/">http://www.reddit.com/r/wp7dev/</a>Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com5tag:blogger.com,1999:blog-7028181408582795486.post-72919915477656473912010-09-10T19:25:00.003+12:002010-09-10T20:00:10.198+12:00.net Unit Testing 101Links, slides and sample code from my .net Unit Testing 101 presentation.<br /><span style="font-weight: bold;"></span><br /><a href="http://www.nunit.org/">NUnit - unit testing library </a><br /><a href="http://www.testdriven.net/">TestDriven.net - Visual Studio integration</a><br /><a href="http://www.mindscape.co.nz/products/LightSpeed/default.aspx">Lightspeed ORM</a> Free or full version is needed to run the sample code<br /><br /><a href="http://www.pragprog.com/titles/utc2/pragmatic-unit-testing-in-c-with-nunit">Pragmatic unit testing ebook</a><br /><br /><a href="http://www.sourceitsoftware.com/download/UnitTesting101.zip">Presentation and code</a>Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com0tag:blogger.com,1999:blog-7028181408582795486.post-27151664809421096512010-03-22T21:41:00.011+13:002010-03-29T07:52:49.260+13:00Windows Phone 7 - A party pack of sweets for developersThey are playing advertisements for <a href="http://www.cadbury.co.nz/Products/Candy-Confectionery/Pascall-Party-Pack.aspx"><span class="blsp-spelling-error" id="SPELLING_ERROR_0"><span class="blsp-spelling-error" id="SPELLING_ERROR_0">Pascall's</span></span> Party Pack</a> on TV at the moment. The tag line is "All sweets you love, and one you can't stand." That pretty much sums up Windows Phone 7 for developers. Lots of goodness with a few things that may leave a bad taste in your mouth.<br /><br />Despite the name, Windows Phone 7 Series is not a <span class="blsp-spelling-corrected" id="SPELLING_ERROR_1">successor</span> to Windows Mobile 6.x. Instead the name is a marketing nod towards Windows 7. Although both WP7 and WM6 are based on Windows CE, there is no resemblance at a higher level. From a user point of view, WP7 is closer to the iPhone than to WM6. A more accurate name would be Windows Phone 1.<br /><br />After far too much time reading, watching and playing, here are my thoughts on WP7 as relates to development:<br /><br /><span style="font-weight: bold;">Tasty:</span><br /><ul><li>Development is done in c# and <span class="blsp-spelling-error" id="SPELLING_ERROR_2"><span class="blsp-spelling-error" id="SPELLING_ERROR_1">Silverlight</span></span>/<span class="blsp-spelling-error" id="SPELLING_ERROR_3"><span class="blsp-spelling-error" id="SPELLING_ERROR_2">XNA</span></span>. While native code would be nice, C# is easier to get into than Objective C. I haven't used either <span class="blsp-spelling-error" id="SPELLING_ERROR_4"><span class="blsp-spelling-error" id="SPELLING_ERROR_3">Silverlight</span></span> or <span class="blsp-spelling-error" id="SPELLING_ERROR_5"><span class="blsp-spelling-error" id="SPELLING_ERROR_4">XNA</span></span> previously but they look a lot more promising than the <span class="blsp-spelling-error" id="SPELLING_ERROR_6"><span class="blsp-spelling-error" id="SPELLING_ERROR_5">XP</span></span> era Windows Forms used by Windows Mobile.</li><li>The tools are much better than those for the iPhone, and free<br /></li><li>Push notifications look at lot easier to do than on the iPhone</li><li>Apparently <span class="blsp-spelling-error" id="SPELLING_ERROR_7"><span class="blsp-spelling-error" id="SPELLING_ERROR_6">xbox</span></span> live integration is really good (I wouldn't know)<br /></li><li>There are metric <span class="blsp-spelling-error" id="SPELLING_ERROR_8"><span class="blsp-spelling-error" id="SPELLING_ERROR_7">shitloads</span></span> of tutorials, walk <span class="blsp-spelling-error" id="SPELLING_ERROR_9"><span class="blsp-spelling-error" id="SPELLING_ERROR_8">throughs</span></span> and documentation (Twitter apps are the new hello world)</li><li>Games programming looks really, really nice<br /></li></ul><br /><span style="font-weight: bold;"><span class="blsp-spelling-error" id="SPELLING_ERROR_10"><span class="blsp-spelling-error" id="SPELLING_ERROR_9">Meh</span></span>:</span><br /><ul><li>The tools don't work well in virtual machines. You can make it work in a Win 7 32bit <span class="blsp-spelling-error" id="SPELLING_ERROR_11"><span class="blsp-spelling-error" id="SPELLING_ERROR_10">VM</span></span> but it will run like a dog. The tools don't work at all in Win 7 x64. If you don't want to install onto your main system, you can try booting from a <a href="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx">virtual hard drive</a>.<br /></li></ul><br /><span style="font-weight: bold;">Yuck:</span><br /><ul><li>No database support (apparently it's not necessary <span class="blsp-spelling-error" id="SPELLING_ERROR_12"><span class="blsp-spelling-error" id="SPELLING_ERROR_11">coz</span></span> you have <span class="blsp-spelling-error" id="SPELLING_ERROR_13"><span class="blsp-spelling-error" id="SPELLING_ERROR_12">xml</span></span> and the cloud). <span class="blsp-spelling-error" id="SPELLING_ERROR_14"><span class="blsp-spelling-error" id="SPELLING_ERROR_13">SQL</span></span> Server CE is built into the <span class="blsp-spelling-error" id="SPELLING_ERROR_15"><span class="blsp-spelling-error" id="SPELLING_ERROR_14">rom</span></span>, but no access is provided.<br /></li><li>No multitasking (push notifications only)</li><li>No access to the file system. Application files all go into Isolated Storage in the app folder.<br /></li><li>No "<span class="blsp-spelling-error" id="SPELLING_ERROR_16"><span class="blsp-spelling-error" id="SPELLING_ERROR_15">sideloading</span></span>" of applications. Apps can only be installed from the Marketplace, or by Visual Studio</li><li>No built in file synchronisation (it's this cloud thing again). </li><li>No <span class="blsp-spelling-error" id="SPELLING_ERROR_17"><span class="blsp-spelling-error" id="SPELLING_ERROR_16">Silverlight</span></span> support in Windows Mobile 6.x (but there is <span class="blsp-spelling-error" id="SPELLING_ERROR_18"><span class="blsp-spelling-error" id="SPELLING_ERROR_17">Silverlight</span></span> for <span class="blsp-spelling-error" id="SPELLING_ERROR_19"><span class="blsp-spelling-error" id="SPELLING_ERROR_18">Symbian</span></span> <span class="blsp-spelling-error" id="SPELLING_ERROR_20"><span class="blsp-spelling-error" id="SPELLING_ERROR_19">wtf</span></span>) and no Win forms support in WP7. I.e. even if your win mobile app was written in c# it needs to be rewritten for WP7.<br /></li><li>Limited <span class="blsp-spelling-error" id="SPELLING_ERROR_21"><span class="blsp-spelling-error" id="SPELLING_ERROR_20">APIs</span></span> (no access to contacts, no sockets, ...)</li><li>No native code - no c, c++, pascal etc (and thus <a href="http://blog.pavlov.net/2010/03/22/stopping-development-for-windows-mobile/">no <span class="blsp-spelling-error" id="SPELLING_ERROR_22"><span class="blsp-spelling-error" id="SPELLING_ERROR_21">firefox</span></span> :(</a>)<br /></li></ul><br />I haven't felt this conflicted since the <a href="http://vfr1200online.com/index.php/vfr-1200/87-vfr-1200-f-first-ride-impressions.html"><span class="blsp-spelling-error" id="SPELLING_ERROR_23"><span class="blsp-spelling-error" id="SPELLING_ERROR_22">vfr</span></span> 1200</a>. Some nice things balanced by some not so nice.<br /><br />As mentioned, so this is essentially version 1. Some of the issues are planned to be fixed after the initial release (copy/paste, database access).<br /><br /><span style="font-weight: bold;">Links</span><br /><br /><span style="font-weight: bold;">Microsoft</span><br /><a href="http://developer.windowsphone.com/windows-phone-7-series/">Windows Phone 7 tools</a><br /><a href="http://msdn.microsoft.com/en-us/library/ff431744%28VS.92%29.aspx">Code samples</a><br /><a href="http://developer.windowsphone.com/">Developer network</a><br /><a href="http://live.visitmix.com/videos">Mix10 videos (check out the keynote)<br /></a><a href="http://windowsteamblog.com/blogs/wpdev/archive/2010/03/18/windows-phone-7-series-ui-design-amp-interaction-guide.aspx?utm_source=twitterfeed&utm_medium=twitter"><span class="blsp-spelling-error" id="SPELLING_ERROR_25"><span class="blsp-spelling-error" id="SPELLING_ERROR_24">UI</span></span> Guide</a><br /><br /><span style="font-weight: bold;"><span class="blsp-spelling-error" id="SPELLING_ERROR_26"><span class="blsp-spelling-error" id="SPELLING_ERROR_25">Silverlight</span></span></span><br /><a href="http://10rem.net/articles/how-to-get-started-in-wpf-or-silverlight-a-learning-path-for-new-developers">Get started in <span class="blsp-spelling-error" id="SPELLING_ERROR_27"><span class="blsp-spelling-error" id="SPELLING_ERROR_26">Silverlight</span></span></a><br /><a href="http://timheuer.com/blog/archive/2010/03/15/get-started-with-silverlight-for-windows-phone.aspx">Get started with <span class="blsp-spelling-error" id="SPELLING_ERROR_28"><span class="blsp-spelling-error" id="SPELLING_ERROR_27">Silverlight</span></span> in WM7</a><br /><br /><span style="font-weight: bold;">Example apps</span><br /><a href="http://rodrigueh.com/post/WP7-DOTNET-Twitter-Client-for-Windows-Phone-7-with-Silverlight.aspx">Twitter client</a><br /><a href="http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx">Another twitter client (Scott <span class="blsp-spelling-error" id="SPELLING_ERROR_29"><span class="blsp-spelling-error" id="SPELLING_ERROR_28">Gu</span></span>)</a><br /><a href="http://blois.us/blog/2010/03/labyrinth-sample-for-windows-phone.html">Labyrinth</a><br /><a href="http://sviluppomobile.blogspot.com/2010/03/sqlite-for-wp-7-series-proof-of-concept.html">Sqlite database</a><br /><br /><span style="font-weight: bold;">Blogs</span><br /><a href="http://www.artificialignorance.net/blog">Artificial Ignorance</a><a href="http://10rem.net/articles/how-to-get-started-in-wpf-or-silverlight-a-learning-path-for-new-developers"><br /></a><a href="http://10rem.net/">10rem</a><br /><a href="http://sviluppomobile.blogspot.com/2010/03/sqlite-for-wp-7-series-proof-of-concept.html">Mobile development</a>Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com6tag:blogger.com,1999:blog-7028181408582795486.post-53387630239073421032010-02-13T13:20:00.006+13:002010-02-14T18:19:03.420+13:00Solving a mid-life crisis with a Solid State DriveMy development laptop is now 18 months old, which makes it older than me in computer years. As part of a mid-life refresh, I replaced the boot drive, (250gb 7200rpm) with an Intel X25M 160gb ssd.<br /><br />The result of this is that things are much snappier. How much snappier? I timed a few things of importance to me, booting my laptop and virtual machines, starting delphi and rebuilding a medium sized project (600,000 loc).<br /><br />Overall, using an ssd cut the times by an average of 39%. Not too bad an improvement. To put it another way, my "getting started" time (boot laptop, boot vm, start delphi) went from 6:05 to 3:37.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDARHOgrVKdp9oW5-lPoSKBQeXj7HNzNXt9n-dTYKEignja17UEG9B7I3EvoMO-EKUmeF9-cIH6YKERWZ1sXDZ_2om409PsDTYDBDySiDsNa9DpeFwz9uQtKfF2v-10kVkStD9yUCtLlU/s1600-h/ssd.jpg"><img style="cursor: pointer; width: 400px; height: 241px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDARHOgrVKdp9oW5-lPoSKBQeXj7HNzNXt9n-dTYKEignja17UEG9B7I3EvoMO-EKUmeF9-cIH6YKERWZ1sXDZ_2om409PsDTYDBDySiDsNa9DpeFwz9uQtKfF2v-10kVkStD9yUCtLlU/s400/ssd.jpg" alt="" id="BLOGGER_PHOTO_ID_5437542856181429634" border="0" /></a><br /><br /><span style="font-weight: bold;">Edit:</span><br />The Delphi 2007 install is screwed up somewhere. It certainly never used to take 3 minutes to start up:( but sometime last year it started getting really slow. I don't use that install or vm much so I haven't bothered trying to sort it out.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com4tag:blogger.com,1999:blog-7028181408582795486.post-6524281072001519682010-01-14T21:18:00.005+13:002010-01-14T23:35:25.498+13:00[.net] Using sql server full text searching with Mindscape's LightSpeed<span style="font-style: italic;">Advance warning: This post is only of use to people using Lightspeed or suffering from insomnia. </span><br /><br /><span style="font-weight: bold;">The problem</span><br />For my current c# project, I am using <a href="http://www.mindscape.co.nz/products/LightSpeed/default.aspx">Mindscape's Lightspeed</a> O/R framework. Lightspeed is a mighty fine product that makes object persistence a breeze. I would kill to have this in delphi.<br /><br />However the only full text searching that LightSpeed supports out of the box is <a href="http://incubator.apache.org/lucene.net/">Lucene.net</a>. Sql Server full text searching is not provided and no-one else seems to have created it.<br /><br />The good news is that Lightspeed has a pluggable search engine framework so it is possible to add a new search engine. The bad news is that it's not overly well documented and there aren't many examples. The good news is that their online support is <a href="http://www.mindscape.co.nz/forums/Thread.aspx?ThreadID=2702">pretty good</a>.<br /><br /><span style="font-weight: bold;">The resolution</span><br />Mindscape have a <a href="http://www.mindscape.co.nz/blog/index.php/2009/02/25/lightspeed-writing-a-custom-search-engine/">blog post</a> outlining the process of adding a new search engine. However there are a number of traps for young players that aren't covered there, or indeed anywhere. The following should shed some light on the process.<br /><br />Creating a new search engine requires implimenting ISearchEngine<br /><pre class="csharp"> <span style="color: rgb(6, 0, 255);">public</span> <span style="color: rgb(6, 0, 255);">interface</span> ISearchEngine<br /> <span style="color: rgb(0, 0, 0);">{</span><br /> IList<span style="color: rgb(0, 0, 0);"><</span>SearchResult<span style="color: rgb(0, 0, 0);">></span> Search<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(6, 0, 255);">string</span> query, <span style="color: rgb(6, 0, 255);">params</span> <span style="color: rgb(6, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">]</span> scopes<span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(6, 0, 255);">void</span> Add<span style="color: rgb(0, 0, 0);">(</span>IndexKey indexKey, <span style="color: rgb(6, 0, 255);">string</span> data<span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(6, 0, 255);">void</span> Update<span style="color: rgb(0, 0, 0);">(</span>IndexKey indexKey, <span style="color: rgb(6, 0, 255);">string</span> data<span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(6, 0, 255);">void</span> Remove<span style="color: rgb(0, 0, 0);">(</span>IndexKey indexKey<span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(6, 0, 255);">void</span> Optimize<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(6, 0, 255);">void</span> Clear<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">)</span>;<br /> LightSpeedContext Context <span style="color: rgb(0, 0, 0);">{</span> <span style="color: rgb(6, 0, 255);">get</span>; set; <span style="color: rgb(0, 0, 0);">}</span><br /> <span style="color: rgb(6, 0, 255);">void</span> BeginBulkAdd<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(6, 0, 255);">void</span> EndBulkAdd<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">)</span>;<br /> <span style="color: rgb(0, 0, 0);">}</span></pre>For sql server, and for most databases with inbuilt FTS, most of these methods can just be left as empty method bodies. All that needs to be implemented is Context (stores lightspeed configuration info such as the database connection string) and Search.<br /><br />All that is needed to implement Context is:<br /><pre class="csharp"> public LightSpeedContext Context <span style="color: rgb(0, 0, 0);">{</span> <span style="color: rgb(6, 0, 255);">get</span>; set; <span style="color: rgb(0, 0, 0);">}</span><br /><br /><span style="color: rgb(0, 0, 0);"></span></pre> The fun comes in implementing Search:).<br /><br /><span style="font-weight: bold;">Example class</span><br />LightSpeed takes a class and maps it to a database table. In my case, the class is CmsModels.Entities.AccClaim. It is stored in the table AccData and has an integer primary key called ClaimId.<br /><br />To perform a search, say finding all of my claims, I need to run the following query:<br /><pre class="csharp"> select *<br /> from FreeTextTable(AccData, *, 'Sean Cross Prevshort')<br /> order by RANK desc<br /></pre>returning something like<br /><pre class="csharp"> KEY RANK<br /> 175671 27<br /> 175673 23<br /> 175646 15<br /> 175657 7<br /></pre>Key is the pk field (ClaimId) and Rank is how well the record matched the query.<br /><br /><span style="font-weight: bold;">Implimenting search</span><br />The Search method takes a query ("Sean Cross Hastings") and an array of type names (["CmsModels.Entities.AccClaim", ...]). It returns a list of SearchResult objects. SearchResult has the following constructor:<br /><br /><pre class="csharp"> public SearchResult(<br /> string key,<br /> string scope,<br /> string entityId,<br /> float score<br /> )<br /><br /><span style="color: rgb(0, 0, 0);"></span></pre> In short, we take the query and the class name, construct a query, run it and use the results to create a list of SearchResult objects. Easy, in theory.<br /><br /><span style="font-weight: bold;">The devilish details</span><br /><span style="font-style: italic;">A Getting the table name</span><br />Given an object name, Lightspeed has a number of ways of determining the table name. Which option is chosen depends on the model and class settings.<br />The possibilities are<br /><ol><li>Table name = class name (eg AccClaim)<br /></li><li>Table name = pluralised class name (eg AccClaims)</li><li>Table name is explicitly set in class attributes (eg [Table("AccData", IdColumnName="ClaimID")])</li><li>Table name is set programmaticly using a user defined naming strategy object (eg TBL_ACCCLAIM)</li></ol>AFAIAA It is not possible to cover all these cases without access to LightSpeed internals. I have suggested that they provide a GetMyBloodyTableName method but that hasn't happened yet.<br /><br />I have opted to only support cases 1 and 3 as this covers most of my classes, and it's easy. Any table name that falls into a different case can still be searched by specifying the table name explicitly.<br /><br />To get the table name, I look for a TableAttribute and use it. If I can't find one, I use the type name.<br /><pre class="csharp"> string tableName = "";<br /> Type t = Type.GetType(scope);<br /> object[] tableAttrib = t.GetCustomAttributes(typeof(TableAttribute), false);<br /> if (tableAttrib.Length > 0)<br /> {<br /> tableName = ((TableAttribute)tableAttrib[0]).Name;<br /> }<br /> else <br /> {<br /> tableName = t.Name.ToUpper();<br /> }<br /></pre><span style="font-style: italic;">B Running the query</span><br />LightSpeed doesn't support running random sql so it's back to ado.net. The Context object can be used to create a SqlCommand object so it's pretty straightforward:<br /> <br /><pre class="csharp"> IDbCommand command = Context.DataProviderObjectFactory.CreateCommand(); <br /> Context.CreateUnitOfWork().PrepareCommand(command) <br /> command.CommandText = string.Format("select * from FreeTextTable([{0}], *, @query) order by RANK desc", tableName); <br /> ((SqlCommand)command).Parameters.AddWithValue("@query", query); <br /> IDataReader reader = command.ExecuteReader(); <br /><br /> while (reader.Read()) <br /> {<span style="font-family: Georgia,serif;"><span style="font-family: monospace;"></span></span><br /> ...<br /> }<br /></pre><span style="font-style: italic;">C Creating the SearchResult objects</span><br />The SearchResult constructor is as follows:<br /><pre class="csharp"> public SearchResult(<br /> string key,<br /> string scope,<br /> string entityId,<br /> float score<br /> )</pre> <span style="font-style: italic;">scope </span>is the full class name passed into the Search method (eg "CmsModels.Entities.AccClaim")<br /><span style="font-style: italic;">entityId </span>is the pk returned from the query in the Key field (eg 175671)<br /><span style="font-style: italic;">score </span>is the rank returned from the query in the Rank field (eg 27)<br /><br /><span style="font-style: italic;">key </span>is the problem child. It is not properly explained anywhere in the documentation. I only found out how it is created by creating a dummy Add method, putting a breakpoint in there and examining the values passed in. It is a string in the format "{type name}]{entityId}" (eg "[AccClaim]175671").<br /><br />So creating the results is<br /><pre class="csharp"> while (reader.Read())<br /> {<br /> string entityId = reader[0].ToString();<br /> int rank = reader.GetInt32(1);<br /> string srKey = string.Format("[{0}]{1}", t.Name, entityId);<br /> var sr = new SearchResult(srKey, scope, entityId, rank);<br /> result.Add(sr);<br /> }<br /></pre><span style="font-weight: bold;">Use the source Luke</span><br />The full source code is <a href="http://www.mindscape.co.nz/forums/Post.aspx?ThreadID=2702&PostID=8325">here</a>. This is "works on my machine" quality code, so use with care. In particular:<br /><ol><li>It doesn't handle pluralisation or naming strategies</li><li>I cast directly to SqlCommand without testing it. Works for me but..<br /></li><li>It's not solidly tested. I only use it for one table so it may do funny things with other table structures. <br /></li><li>While running the code for the first time, the office power failed and the entire building went dark. I'm not saying it's related, but if it happens to you, you are on your own.<br /></li></ol><span style="font-weight: bold;">Things for MindScape to do</span><br />Provide a GetMyBloodyTableName and GetMyBloodyKey helper methods. Pretty please.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com0tag:blogger.com,1999:blog-7028181408582795486.post-5939750683676415332009-12-09T16:07:00.002+13:002009-12-09T16:27:25.516+13:00Solving Excel's "DBCC TRACEON" error with brute force and ignoranceWe use excel reports extensively for reporting. They are fast to create and everyone can read and manipulate them. However there are the occasional gotchas. In the past, I have had to muck about with macros to fix <a href="http://sourceitsoftware.blogspot.com/2009/08/changing-excel-query-connection-strings.html">connection string</a> errors. <br /><br />We upgraded to sql server 2008 on the weekend. Following that, nearly every data aware spreadsheet started giving "User 'public' does not have permission to run DBCC TRACEON" errors.<br /><br />The problem, and a resolution is described <a href="http://www.fits-consulting.de/blog/PermaLink,guid,10259e27-75b2-4800-9b0b-0b526f556c10.aspx">here</a>. Older versions of Excel/MS query identified themselves by including APP=Microsoft® Query;" in the connection string. MS also hard coded a check for "Microsoft® Query" in sql server which then runs DBCC TRACEON for no apparent reason.<br /><br />Under sql server 2000, this in fine, but under sql server 2008, this fails as DBCC requires admin permissions.<br /><br />The correct approach is change the connection string as described in the linked posts. Previously I have done this with macros. However this time I had 200+ spreadsheets to change :(.<br /><br />I used a free search and replace utility (<a href="http://www.ecobyte.com/replacetext/">ReplaceText</a>) to replace all instances of "APP=Microsoft® Query;" with "APP=Microsoft® WTFIT;". 2 important things here, the search and the replacement text are the same size, and the strings include "App=". Failing to do either will give you a corrupt file.<br /><br />Problem solved in about an hour. It's not a pretty solution but it's better than spending a week at it.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com1tag:blogger.com,1999:blog-7028181408582795486.post-91541358412814759492009-11-16T22:24:00.003+13:002009-11-20T20:11:11.821+13:00Why I am moving from delphi to .netThis post is somewhat of a conterpoint to <a href="http://www.delphifeeds.com/go/s/62471">Why we didn’t convert to .Net. And perhaps we never will…</a> I would have writen a post earlier, but I have spent most of the last week writing a tender proposal. The tender was for a claims management application with 70 users scattered across the country. My proposal was for a web application, using asp.net mvc and writen in c#.<br /><br />My main objection to the WoW post is not his (or her) conclusion, but the subtext that .net has nothing to offer. Delphi programmers (or at least the vocal ones hanging out in non-technical) seem to have a strong view on what "real' programming is, and .net fails on several points (not native code, garbage collected, large installation footprint) for these guys. My view is that "real" programming is solving problems, and using the best tools for the job. In some cases that is delphi, but increasingly for me it is c#.<br /><br />I haven't suddenly jumped ship, I reevaluated our (Catalyst's) needs earlier this year. Two things came out of that; most of our futher development will be in web apps, and .net is a better fit for us.<br /><br />My and Catalyst's needs are not univeral. I don't pretend that my reason for moving apply to everybody. None the less, here are my reasons for moving:<br /><br /><span style="font-weight: bold;">Performance: </span><br />When it comes to performance, my most important benchmark is developer time. As a (mostly) solo developer, I don't have enough time to do all the things that I want. Anything that improves my productivity is good. I find c# faster to develop in.<br /> <br />From an runtime speed, it's hard to find good benchmarks. My feeling is that Delphi is faster, but not enough to make a noticable difference in my kind of apps. .net is let down by the winforms implimentation which (the last time I used it) had painfully slow drawing. The rest of it is plenty fast enough.<br /><br /><span style="font-weight: bold;">Language features:<br /></span>Garbage collection and Linq. You ever love them or hate them. I love them. Delphi has mostly caught up with the other big ticket items but not these.<br /><br />The standard library is another .net plus. It may have an enormous footprint but it's certainly extensive.<br /><br /><span style="font-weight: bold;">Staffing:</span><br />I work in a small city. Finding delphi developers here is nearly impossible. I only know of dev company using delphi and, for historical reasons, I can't use them. <br />.net developers is a different story. I could throw a stone out the window and hit one (seriously, they're just across the road).<br /><br /><span style="font-weight: bold;">Finally</span><br />I am not abandoning delphi completely, I have a number of delphi apps to maintain so I will be using it for a while yet. .net is not a silve bullet either. For web apps I find .net better, but for desktop apps it's pretty much even.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com23tag:blogger.com,1999:blog-7028181408582795486.post-42359257723165690322009-09-22T16:43:00.002+12:002009-09-22T16:52:12.203+12:00D2010 suppport in tiOPFtiOPF is a Object Persistence Framework. That is, it is a framework based around saving your objects to, and loading them from, databases and/or flat files.<br /><br />Delphi 2010 support has now been added to the latest repository version.<br /><br />No release has been made as of yet, so you need to to retrieve it from the subversion repository. See <a href="http://tiopf.sourceforge.net/SourceCodeRepository.shtml">here</a> for instructions.<br /><br /><span style="font-weight: bold;">Notes</span><br /><ul><li>Running unit tests requires copying the xdom.pas unit from Delphi 2009as this is no longer supplied<br /></li><li>There are a large number of failures with BDE paradox tests. I haven't investigated this yetas no-one uses paradox any more<br /></li><li>tiVirtualTree and related components have been removed from the gui controls as they don't work under D2009/D2010. </li><li>Unicode is still not supported :(</li></ul><span style="font-weight: bold;"><br />Links</span><br /><ul><li><a href="http://tiopf.sourceforge.net/">tiopf.com</a></li><li><a href="http://tiopf.sourceforge.net/Doc/overview/index.shtml">tiopf overview</a></li></ul>Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com3tag:blogger.com,1999:blog-7028181408582795486.post-27603539019531939402009-09-15T15:56:00.004+12:002009-09-16T00:00:20.750+12:00C# for the iPhone: Monotouch releasedNovell's <a href="http://monotouch.net/">MonoTouch</a> product has been released. MonoTouch is mono for the iPhone.<br />This allows compiling .net applications to native code and deploying to the iPhone.<br /><br />There are akready 200 apps in the app store using Mono via Unity so the underlying technology is fairly well tested. MonoTouch adds Cocoa support and integration into MonoDevelop.<br /><br />MonoTouch has 2 main issues for some users, the $399US price point, and the logo.<br />The price has disappointed a number of beta testers and the logo is the second worst I have seen recently (worst is the <a href="http://www.toastmasters.org.nz/index.cfm/Club_Finder.html">Toastmasters</a> goatse).Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com9tag:blogger.com,1999:blog-7028181408582795486.post-91299735502932857102009-08-28T14:44:00.004+12:002009-08-29T10:47:23.153+12:00When you install Delphi 2010, put it in a virtual machineI recently compared the performance of virtual machines with the real hardware. The figures were <a href="http://sourceitsoftware.blogspot.com/2009/07/windows-performance-index-vmware.html">suprisingly good</a>.<br /><br />Shortly after that, disaster struck. My laptop wouldn't turn on. It took Dell 2 weeks to fix, replacing the motherboard and the video card.<br /><br />If I had delphi installed directly, I would have had 2 weeks of very limited productivity. As it was, I ripped the hard drive out, stuck it in a usb caddy and continued working on another machine. I was back up to speed the next day. <br /><span style="font-style: italic;">Edit: It didn't take a full day to get productive again, I did other work until it became apparent that it would be a while before my computer was fixed. It only took about 30 minutes to transfer the data over and get going.</span><br /><br />If it had been a hard drive problem, I would have restored the latest vm backup off a dvd, pulled the latest changes from the version control or the source backup and been back up to speed with limited data loss.<br /><br />I get a new laptop next month. Installing delphi is going to be as easy as installing vmware and copying the vm files over. 30 minutes work, most of which is surfing the internet waiting for the files to copy. The last time I actually had to install Delphi, it took hours.<br /><br />There are other advantages as well, my development backups fit on a single dual layer dvd, I get to run and test on multiple OSs and disaster recovery plan is much shorter.<br /><br />So make Delphi 2010 your starting point. Download <a href="http://www.virtualbox.org/">Virtual Box</a>, <a href="http://www.vmware.com/">VMWare Workstation ($$$)</a> or <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&displaylang=en">Virtual PC</a> and use that for development. If you are running Windows 7, you could look into Windows XP Mode and use that.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com14tag:blogger.com,1999:blog-7028181408582795486.post-27886742429711893682009-08-14T09:56:00.002+12:002009-08-14T10:36:44.798+12:00Changing Excel query connection stringsWe use Excel and database queries extensively for reporting purposes. It's quick and easy to set-up, and provides reports that our clients can manipulate.<br /><br />However I have recently run into a rather painful excel quirk with ODBC connections: Excel stores the database connection string internally. Even if you change the ODBC connection on the computer, excel still uses the original connection from when the query was created.<br /><br />This bit us when moving the reports to a different machine. Despite having the same ODBC connection set up, excel wouldn't refresh the query and gave the error "[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied."<br /><br />Aside<br />A similar problem can happen if you update the database from sql server 2000 to sql server 2005 or 2008. In that case you may get the error "[Microsoft][SQL Native Client][SQL Server]User 'DOMAIN\username' does not have permission to run DBCC TRACEON." In that case, you need to alter the connection string to change "APP=Microsoft® Query" to something else. Apparently MS hard coded a check for "Microsoft® Query" in sql server which then runs DBCC TRACEON for no apparent reason. I suggest "APP=WTFWYT"<br /><br /><br /><span style="font-weight: bold;">Changing one query</span><br />(from <a href="http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/ad8ad177-65b3-4962-b0aa-530a2c9d6d86">here</a>)<br />"<span style="font-style: italic;">Open the worksheet and place the cursor on a cell within the cell range of </span><br /><span style="font-style: italic;">the query. Press Alt-F11 to open the VBEditor. Press Ctrl-G to open the </span><br /><span style="font-style: italic;">Intermediate window. Type the command: ? ActiveCell.QueryTable.Connection. </span><br /><span style="font-style: italic;">The embedded connection string will be echoed back to the screen. Put double </span><br /><span style="font-style: italic;">quotes around the string and update the connection information with the new </span><br /><span style="font-style: italic;">server info. Move the cursor to the beginning of the connection string and </span><br /><span style="font-style: italic;">insert the following in front of the string: </span><br /><span style="font-style: italic;">ActiveCell.QueryTable.Connection =</span><br />"<br /><br /><span style="font-weight: bold;">Changing multiple queries in a spreadsheet</span><br />(modified from <a href="http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/a013c536-164e-4883-b989-93e9e33d8664">here</a>)<br />You need to create the following macro (change connection string to suit, see above) and run it in each spreadsheet requiring change. (See the steps below). Once the macro has run successfully, delete it before saving the spreadsheet.<br /><br /><span style="font-style: italic;">Sub ChangeConnections()</span><br /><span style="font-style: italic;"> Dim sh As Worksheet, qy As QueryTable </span><br /><span style="font-style: italic;"> For Each ws In ActiveWorkbook.Sheets</span><br /><span style="font-style: italic;"> For Each qy In ws.QueryTables</span><br /><span style="font-style: italic;"> qy.Connection = "..."</span><br /><span style="font-style: italic;"> On Error Resume Next</span><br /><span style="font-style: italic;"> qy.Refresh</span><br /><span style="font-style: italic;"> If Err.Number <> 0 Then MsgBox "Problem refreshing QueryTable: " & Err.Description</span><br /><span style="font-style: italic;"> Next qy</span><br /><span style="font-style: italic;"> Next ws</span><br /><span style="font-style: italic;">End Sub</span><br /><br /><span style="font-weight: bold;">Getting the new connection string</span><br />The easiest way to find the new connections string is to create a new query and do the ?ActiveCell.QueryTable.Connection trick.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com14tag:blogger.com,1999:blog-7028181408582795486.post-70447043332671902762009-07-10T16:44:00.004+12:002009-07-15T12:02:48.565+12:00Windows Performance Index - VMware workstation v Virtual Box<a href="http://www.virtualbox.org/">Virtual Box 3</a> has been released. I haven't used previous versions of VB, but it has a good rep. Version 3 now supports 3d acceleration. I have been wanting to use Aero and Glass in my virtual machines so that I could develop Vista specific applications so I gave it a try.<br /><br />First the bad news, VB doesn't support enough 3d features to run Aero (neither does VMware). I did discover a work around though, connect to your virtual machine using Remote Desktop Connection from a Vista machine, turn all graphics options to high and volia.<br /><br />While I had VB installed, I did a quick and dirty comparision with VMware workstation using Windows Performance Index. Take these results with a grain of salt, I didn't spend much time playing with the setup and tweaking. I couldn't get dual core to work on VB, it just blue-screened, and I didn't have the time to spend sorting it out.<br /><br />Windows Performance Index<br /><table style="border-collapse: collapse; width: 527pt;" border="0" cellpadding="0" cellspacing="0" width="702"><col style="width: 111pt;" width="148"> <col style="width: 101pt;" width="134"> <col style="width: 93pt;" width="124"> <col style="width: 111pt;" span="2" width="148"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 111pt; font-weight: bold;" height="20" width="148"><br /></td> <td class="xl68" style="width: 101pt; text-align: center; font-weight: bold;" width="134">Host</td> <td class="xl68" style="width: 93pt; text-align: center; font-weight: bold;" width="124">VMware<br />Single proc</td> <td class="xl68" style="width: 111pt; text-align: center; font-weight: bold;" width="148">VMware<br />Dual proc</td> <td class="xl69" style="width: 111pt; text-align: center; font-weight: bold;" width="148">Virtual Box<br />Single Proc</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; font-weight: bold;" height="20">Processor</td> <td style="text-align: center;" class="xl70">5.4</td> <td style="text-align: center;" class="xl70">4.4</td> <td style="text-align: center;" class="xl70">5.2</td> <td style="text-align: center;" class="xl71">4.4</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; font-weight: bold;" height="20">Memory</td> <td style="text-align: center;" class="xl70">5.1</td> <td style="text-align: center;" class="xl70">4.9</td> <td style="text-align: center;" class="xl70">5.2</td> <td style="text-align: center;" class="xl71">5.9</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl67" style="height: 15pt; font-weight: bold;" height="20">Primary Hard disk</td> <td style="text-align: center;" class="xl72">5.4</td> <td style="text-align: center;" class="xl72">5.3</td> <td style="text-align: center;" class="xl72">5.4</td> <td style="text-align: center;" class="xl73">4.7</td> </tr> </tbody></table><br />The memory figures are surprising, I am not sure if the VB figures of 5.9 are real or just a sign of something wrong somewhere. Draw your own conclusions on that. <br /><br />VB is slower in hard drive, but otherwise up with the play processor wise. Getting dual core working would probably give similar processor figures to VMware dual core.<br /><br />I was impressed with how well VMware matches up to the host system. While VB doesn't seem to be quite there yet, it is still doing pretty well, and you can't beat the price.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com4tag:blogger.com,1999:blog-7028181408582795486.post-44458802393411271482009-06-30T22:42:00.005+12:002009-07-01T07:51:42.981+12:00iPhone programming might be getting a whole lot easierThe mono project has announced <a href="http://www.mono-project.com/MonoTouch">MonoTouch</a>. MonoTouch is Mono for the iPhone and the iPod touch. Applications writen with MonoTouch work and non-jailbroken phones, and can be submitted to the app store.<br /><br />See <a href="http://tirania.org/blog/archive/2009/Jun-29.html">Miguel's blog</a> for additional details. According to the comments, a beta should be released in August.<br /><br />Time to start brushing up my C# skills.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com4tag:blogger.com,1999:blog-7028181408582795486.post-18342187654197915312009-06-29T18:06:00.005+12:002009-06-30T22:49:02.311+12:00Guido just doesn't get windows programmingAmong the blogs I follow is that of <a href="http://neopythonic.blogspot.com/">Guido van Rossum</a>, the creator of Python. Mostly they are interesting but his latest one (<a href="http://neopythonic.blogspot.com/2009/06/ironpython-in-action-and-decline-of.html">IronPython in Action and the Decline of Windows</a>) is a large pile of wtf. Apparently programming windows apps is tedious and gui creation requires many lines of code. Even more surprising to me, web apps are far easier to create.<br /><br />Wow, apparently he has never heard of delphi, visual studio or any of the other gui editors that have been about since at least the mid 80s. The last time I laid a gui out in code, other than for eductational purposes, would have been about 1986. I have no desire to do it again either.Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com4tag:blogger.com,1999:blog-7028181408582795486.post-37659835089476419712009-05-13T15:41:00.003+12:002009-05-13T16:46:01.222+12:00iPhone Dev: Zombie Mansion post mortem<span style="font-weight: bold;">Overview</span><br />I released Zombie Mansion in mid December 08. It is a 1st person shooter, the 2nd available on the iPhone and the first one to be designed for mobile devices rather than being a pc port. ZM was a port and extension of the work I had done previously on the <a href="http://sourceitsoftware.com/yeti.html">Yeti engine</a>.<br /><br />Seeing as how every other iPhone developer is sharing their tales of mega success, or crushing failure, I though I would add my story.<br /><br /><br /><span style="font-weight: bold;">Sales</span><br />ZM has sold steadily, if not spectacularly. Unfortunately I have not made enough to pay off my house and buy a fast car. On the other hand, it sold well enough to pay my mortgage payments for the 1st 3 months. Sales are as you would expect: hundreds sold in the first couple of days, rapidly dropping off as ZM moved off the recent releases page. My first update provided a brief blip but my second update was unnoticeable in terms of sales.<br /><br />I took 2 weeks leave to finish ZM, and I estimate that I spent the equivalent of another 2 weeks previously. This doesn't include the original porting work I did moving the yeti engine to the pocket pc.<br /><br />As a return on time spent, ZM performed slightly better than working at my day job. It was however considerably more fun. It would have performed even better but I made a couple of bad design decisions.<br /><br /><br /><span style="font-weight: bold;">Programming</span><br />Unusually, I did the bulk of the development in windows using visual studio rather than in xcode on OSX. I already had an OpenGL ES port running on Windows Mobile and Windows so an iPhone port wasn't much of a problem.<br /><br />Coding was done in a mixture of C (yeti code) and C++ (my code).<br />On the iPhone, I used the <a href="http://oolongengine.com/">Oolong engine</a> to handle the sound, input and 3d setup. Oolong provides c++ wrapper classes for all this (and more).<br /><br />On the pc and windows mobile side, I used the <a href="http://www.imgtec.com/powervr/insider/powervr-sdk.asp">PowerVr sdk</a> to handle 3d setup. Keyboard handling is trivial, and I used <a href="http://www.shlzero.com/">Hekkus</a> to provide sound support.<br /><br />Once I had this all set-up,I did most coding in visual studio. At irregular intervals, I would reboot into OSX and compile with xcode. I mostly used xcode for iPhone specific stuff and performance testing. All my support tools (map editor, 3d importer etc.) are windows based (in c++ builder and Delphi) so that necessitated mostly using windows. I prefer visual studio to xcode, so it wasn't much of a chore.<br /><br /><br /><span style="font-weight: bold;">Mistakes</span><br />I made a couple of mistakes. The first, and most major was simplifying the weapons too much. I went with one weapon, a staff, with upgrades rather than with multiple weapons. In retrospect, a bad call.<br /><br />The second mistake was not putting some help tips around controls. The controls work well if you leave your thumb on the d pad and slide it to control. If you pick your thumb up and move it, the controls don't work as well. Some easy way of explaining this to the player would have made their initial impressions better.<br /><br />The underlying problem is that perennial development favourite, I underestimated the time needed to write the software. I ran out of annual leave and thus ran out of time. While I enjoyed the game that I wrote, it would have been better if I had more time to add extra features and polish.<br /><br /><br /><span style="font-weight: bold;">Dealing with Apple</span><br />There are 3 major drawbacks to iPhone development: Apple, Apple and Apple. I don't know if they are overworked, incompetent or just don't care. Either way, developer support seems to be missing in action.<br /><br />Since I have had children, I have made a concious effort to improve my language, removing the more robust terms I picked up working in the abbottiors. Three months of dealing with Apple has made a mockery of my self-betterment attempts, leaving me swearing like Gordon Ramsey on a bad day.<br /><br />Simply getting a paid developer contract took six weeks. My first payment, for December, didn't get paid until late March. Emails asking when money was going to arrive were ignored, or fobbed off with stock responses or outright lies. Whenever I phoned, I was told they couldn't help and to email another department.<br /><br />Even when I did get paid, there was no notification. Apple can email me every week, trying to sell me a second rate album farted out by a talentless boy band, but they can't be bothered sending me an email saying "We have now condescended to pay you".<br /><br />As a comparison, RegNow emailed me on Jan 4th letting me know my December payment had been released, and the money was in my account on Jan 6th. Even now that Apple has decided to make my monthly payments on a monthly basis, they still take nearly 40 days longer than Regnow.<br /><br /><br /><span style="font-weight: bold;">Random thoughts</span><br />There is clearly still money to be made in iPhone dev. ZM hasn't disturbed the sales charts, but it has still sold well enough to cover it's costs and my time. I imagine that there are many developers in a similar position, not making riches, but making enough to get by and keep developing. A small stable of good games/applications could provide a nice living without requiring a hit.<br /><br />It used to be that you could get a large amount of exposure and thus sales by releasing an update every couple of weeks. However the volume of new applications has changed that. There are so many apps being released each day that the initial rush of sales from being in the "what's new" charts is much smaller. You need to get sales the hard way, with marketing; promotion and advertising.<br /><br />I also have a couple of windows shareware applications, Pics Print and Rental Property Manager. While it is not easy to compare windows utilities and business applications with an iPhone, the return on time invested is far greater for these 2, particularly RPM, than for ZM.<br /><br />All this brings me full circle from where I started out six months ago. There is money to be made in iPhone apps, but there is also money to be made in windows shareware as well. If you are a windows developer, particularly if you are a Delphi developer, then you are probably better off developing windows shareware than iPhone apps. I know a lot more developers making money off windows than off iPhones.<br /><br />Oh, and <a href="http://sourceitsoftware.blogspot.com/2008/08/programming-for-iphone-really-sucks.html">developing for iPhones still sucks</a>! Not as badly as I first thought, but still noticeably.<br /><br /><span style="font-weight: bold;"></span>Seanhttp://www.blogger.com/profile/09419639577416328173noreply@blogger.com3