tag:blogger.com,1999:blog-8407136223177413542024-03-05T11:48:12.351-05:00Kadople Blogadminhttp://www.blogger.com/profile/17325837927900485874noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-840713622317741354.post-31371475937830659602016-10-02T23:33:00.001-04:002016-10-02T23:33:34.192-04:00React Native<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsqO29-DRPiI2Nj2QjqMpvguGRHSYunQqoDAaiNTwLkbAfZhK4qPn7c21ZoWhPN80-ApJVwmes18cgvGRuTBYPSAPvufyo8R-mRE8cdTlA8jvUgNJvgn_NcYeHTJsJCLKJ5jYXmsoELkQ/s1600/react-native-framework.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsqO29-DRPiI2Nj2QjqMpvguGRHSYunQqoDAaiNTwLkbAfZhK4qPn7c21ZoWhPN80-ApJVwmes18cgvGRuTBYPSAPvufyo8R-mRE8cdTlA8jvUgNJvgn_NcYeHTJsJCLKJ5jYXmsoELkQ/s320/react-native-framework.png" width="320" /></a></div>
I've been tinkering with <a href="https://facebook.github.io/react-native/">React Native</a> this weekend and doing some reading on its literature. Ran into this great article: <a href="https://medium.com/@tomgoldenberg/10-things-we-learned-while-building-a-react-native-app-44e22f1c06f#.uf3145yyc">10 Things We Learned While Building a React Native App</a>.Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com4tag:blogger.com,1999:blog-840713622317741354.post-163494701674471992016-09-14T23:51:00.002-04:002016-09-14T23:57:57.477-04:00Electron<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp6T4hHsVygsBRIsWVPfGEFuwsHHLTia0eOksp-TDR7H4rg5whHKRHU2hqe7cZZW7U5KAMqOR05UxcQPALtCstWB17kXQgwUCrSaof7uJiw5meMnsgWJgwPswKgIxjYK6h0fHYbzhgqoE/s1600/electron.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp6T4hHsVygsBRIsWVPfGEFuwsHHLTia0eOksp-TDR7H4rg5whHKRHU2hqe7cZZW7U5KAMqOR05UxcQPALtCstWB17kXQgwUCrSaof7uJiw5meMnsgWJgwPswKgIxjYK6h0fHYbzhgqoE/s1600/electron.jpg" /></a></div>
<a href="http://electron.atom.io/">Electron</a> has reached <a href="http://electron.atom.io/blog/2016/05/11/electron-1-0">version 1.0</a> (back in May of this year). It's worth taking a look. Seems more promising than <a href="https://cordova.apache.org/">Apache Cordova</a>.Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-75134473127515858662013-09-18T23:18:00.001-04:002013-09-27T17:44:10.930-04:0010X<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbO_Zd-iWmo1hI3B6C2M4EBc1bfND00lltqowo7x7Eo0sBIe3q_iGzHcLix7tW7z6awmD-pRIJIweuW8udaeXeXTuQVx98Q2Rx51lspEPL3-QCvZ-AVxH8aHXoN6wpzI2nP1KrwP_prfQ/s1600/TIME_google_vs_death.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbO_Zd-iWmo1hI3B6C2M4EBc1bfND00lltqowo7x7Eo0sBIe3q_iGzHcLix7tW7z6awmD-pRIJIweuW8udaeXeXTuQVx98Q2Rx51lspEPL3-QCvZ-AVxH8aHXoN6wpzI2nP1KrwP_prfQ/s200/TIME_google_vs_death.jpg" width="149" /></a></div>
I'm always in awe whenever I read or listen to anything Google's CEO Larry Page has to say, and<a href="https://plus.google.com/+LarryPage/posts/Lh8SKC6sED1"> today's news about Calico</a> is no exception. TIME's article entitled <a href="http://techland.time.com/2013/09/18/google-vs-death/">Google vs. Death</a> is worth reading. All this 10x thinking has inspired me into pondering about Kadople's vision and mission. There is a couple of possibilities to consider: happiness in life; no more broken marriages, broken relationships, broken homes. Quantifiable, measurable, and achievable? Let's give it a moonshot. Shall we?Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-64563158389602040912013-07-18T13:02:00.000-04:002013-07-18T18:25:18.029-04:00Testing Colorbox for Blogger<div class="separator" style="clear: both; text-align: left;">
The image popup feature of the ExtraNews template I put in yesterday is experiencing some problems. I'm putting up this test post with a couple of images of different types in order to test the <a href="http://www.jacklmoore.com/colorbox/">Colorbox jQuery plugin</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<i>Updated 6:21pm ET</i>: The latest finding is that Colorbox is conflicted by the kind of HTMLs being generated by Windows Live Writer, which the blog authoring tool I'm using to write this blog. So for the time being, no more Live Writer for me, I guess.<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Clicking on one of these pictures should trigger a popup image slideshow.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9J7v_SutdnCA6IZ41zJenYiX3TlvwIStVtXlHZljmiwUdHsrI2V6OJSXf5-dN2-A_eg-5okATOhomnscpfIFYyWIMnkAAw_XN2iUlExwykGBUw6PS5ly4Oiy_5XBVJtskLqd0izj6_CI/s1600/16.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9J7v_SutdnCA6IZ41zJenYiX3TlvwIStVtXlHZljmiwUdHsrI2V6OJSXf5-dN2-A_eg-5okATOhomnscpfIFYyWIMnkAAw_XN2iUlExwykGBUw6PS5ly4Oiy_5XBVJtskLqd0izj6_CI/s1600/16.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3DpoL1Y5p0j6IpN8ItOa8KbVVPai7v6SCcUCLv-MzYp0Dfl31gEBHOCyXfwNeO-IWbyuYrAIbuczQ8TQzfo2RWo3b6KtebF2WpofhATRoxgzpbEFXoZ92-g20889W_qx-k8Q7whDPHww/?imgmax=800" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3DpoL1Y5p0j6IpN8ItOa8KbVVPai7v6SCcUCLv-MzYp0Dfl31gEBHOCyXfwNeO-IWbyuYrAIbuczQ8TQzfo2RWo3b6KtebF2WpofhATRoxgzpbEFXoZ92-g20889W_qx-k8Q7whDPHww/?imgmax=800" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3DUlUkYTHFTdDCx3tmQutwrLaQrF8e1QifDM5_kYFVxY3bCUJy6HnD-cN201DIApOnBlWDxslriUzDX3oWa7TUp_rDtgMFV16jas1L99BoNiDtysNV9_TZDoYPcx8UXRSYymUPpJsxvI/?imgmax=800" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3DUlUkYTHFTdDCx3tmQutwrLaQrF8e1QifDM5_kYFVxY3bCUJy6HnD-cN201DIApOnBlWDxslriUzDX3oWa7TUp_rDtgMFV16jas1L99BoNiDtysNV9_TZDoYPcx8UXRSYymUPpJsxvI/?imgmax=800" width="320" /></a>
</div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6uFSKSuOzlcVzoi5QeaaKP4yUbnF3bHgo-d5vI7YqKwT17fr-nv8oQE6TTz1KowStFqCzh9sUnF0jdDJgEeAjSXiKX88uu0JuUmv_Wz_Z68P-W-FuDEvzA47XrNZB9fMO_NL2FjE5OJY/?imgmax=800"><img border="0" height="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6uFSKSuOzlcVzoi5QeaaKP4yUbnF3bHgo-d5vI7YqKwT17fr-nv8oQE6TTz1KowStFqCzh9sUnF0jdDJgEeAjSXiKX88uu0JuUmv_Wz_Z68P-W-FuDEvzA47XrNZB9fMO_NL2FjE5OJY/?imgmax=800" width="660" /></a></div>
Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com1tag:blogger.com,1999:blog-840713622317741354.post-53827746524695628542013-07-17T13:58:00.000-04:002013-07-18T17:24:18.905-04:00New blog layout (v0.2)I bumped into this this morning -- <a href="http://www.designerledger.com/best-free-responsive-blogger-templates/">10 Best Free Responsive Blogger Templates</a> -- and got right on it. The result: a new, modern looking layout. I’m liking it. Thank you, <a href="http://www.ivythemes.com/">ivythemes</a>!<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3DpoL1Y5p0j6IpN8ItOa8KbVVPai7v6SCcUCLv-MzYp0Dfl31gEBHOCyXfwNeO-IWbyuYrAIbuczQ8TQzfo2RWo3b6KtebF2WpofhATRoxgzpbEFXoZ92-g20889W_qx-k8Q7whDPHww/?imgmax=800" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img alt="extranews" border="0" height="477" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3DpoL1Y5p0j6IpN8ItOa8KbVVPai7v6SCcUCLv-MzYp0Dfl31gEBHOCyXfwNeO-IWbyuYrAIbuczQ8TQzfo2RWo3b6KtebF2WpofhATRoxgzpbEFXoZ92-g20889W_qx-k8Q7whDPHww/?imgmax=800" title="extranews" width="644" /></a>Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-11983148004535931062013-06-24T14:03:00.001-04:002013-08-02T17:14:53.776-04:00Toronto AngularJS Meetup & Windows Azure<img align="right" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtYC3ueidPNPJx0-9bJ-cQuPu48lXP6jkhfYO9mURi5HL7OEdnC_ehDz7AO4GV1byNj6hKPQENgDLprkLuVQfUjxnqHig9v3yhNgHGJt5Jx5_0spEkGf41lH8KO9Aj0t5d1mZmU3Pzo38/s320/angularjs-large.png" style="display: inline; float: right;" width="240" />Last week, I attended <a href="http://www.meetup.com/AngularJS-Toronto/events/119912512/">the inaugural Toronto AngularJS Meetup</a> and learned a few things: Nick Van Weerdenburg from <a href="http://www.rangle.io/">rangle.io</a> showed us the 5 D’s; the guys from <a href="http://uken.com/">Uken Games</a> showed some tricks about lazy model fetching; Max Kremer of <a href="http://www.trialfire.com/">trialfire.com</a>, leveraging from his rich J2EE experience, showed us why AngularJS is MVC; and <a href="http://www.yearofmoo.com/">Matias Niemelä</a> from the AngularJS team gave us some cool demos on ngAnimate. All in all, a very informative session. Also, thanks to the fact of <a href="http://polarmobile.com/">Polar Mobile</a> hosting the event this time around, I stumbled upon this great video in which CEO Kunal Gupta and other startup CEOs shared their secrets of success: <a href="http://youtu.be/EfYg_wH4XFI">Discovery 12: The Secrets Of Business Success: CEO Experts Panel</a>.<br />
<img align="right" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi09ugy3Qtss7cotV7AamQFh3Gsln3n9W3dlBECyta5lG6nVPoxn9GKzCOv1H0b171obaK4nU7wM5skt31XACq_0IcHZ5WKZs1cPPB70qbRA-BZhiNum0lWEqtKnHOxN6ZRJwWjAienHdI/w188-h27-no/azure_logo.png" style="display: inline; float: right; margin: 0px 0px 0px 5px;" />Also last week, Kadople signed up to <a href="http://www.windowsazure.com/">Windows Azure</a> as we began to experiment with using Azure’s host of services for our backend. This will be interesting. Stay tuned.Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com1tag:blogger.com,1999:blog-840713622317741354.post-46135674820459267482013-06-18T23:55:00.000-04:002013-09-10T12:06:59.484-04:00Getting Started with AngularJS in a Windows 8 JavaScript app<p>In the past few weeks, I’ve started tinkering with <a href="http://angularjs.org/">AngularJS</a>, trying to get it to play nicely within the Windows 8 JavaScript application environment. This blog entry is an attempt to document that journey.</p> <p>I was following Dan Wahlin’s <a href="http://weblogs.asp.net/dwahlin/archive/2013/04/12/video-tutorial-angularjs-fundamentals-in-60-ish-minutes.aspx">Video Tutorial: AngularJS Fundamentals in 60-ish Minutes</a>, and adapting the exercises to a Windows Store JavaScript app. First hurdle: right after starting a simple “hello, angular world!” message in default.htm, and hitting F5 in Visual Studio 2012, I immediately got this error as Angular tries to insert its own attributes into the HTML header tag: <br></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgroBa775I6H_74661YTJX5qZzfPXPtyFIT2lVsIrl9XNuoS3TX17Du2xzV92-1vK4cv_n9ZpwNjsvTGcVt5PRIKVm__NRuJ2n4TxGDN0lXkixATEN2OnTqGXdkym3-cL-ic47bGLGHt34/s1600-h/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin: 6px auto 2px; display: block; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbPGKBdwEKM6ZcQV7EID1Dz5GmrX2v-tW806nyDEvjnCvmUS91hKhivpg7BjUG_eR3ibyrn_VpgcfSgayrLg6N8KZhdpu5U1RqcydW9EhIWZTnUsAWcSzbpA2x2LavemjVZgw7ke8cF7A/?imgmax=800" width="644" height="366"></a></p> <blockquote> <p><em>Unhandled exception at line 123, column 117 in ms-appx://1af1a67e-6a0b-4170-87a7-60f0e4ca3bc2/Scripts/angular.min.js</em></p> <p><em>0x800c001c - JavaScript runtime error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement. For more information, see …</em></p></blockquote> <p><em></em><em></em></p> <p>After some digging around the web, I learned that this is a fairly common problem that people run into when using an external JavaScript framework other than the WinJS core library.</p> <p>Found blog entries by <a href="http://blog.jonathanchannon.com/2013/01/24/using-angularjsbackbonejs-in-windows-8-javascript-app/">Jonathan Channon</a> and <a href="http://onehungrymind.com/windows-8-and-angularjs/">Lukas Ruebbelke</a> who wrote about a solution which used <a href="https://github.com/appendto/jquery-win8">jquery-win8</a>, which was based on jquery-1.8.2 and has been discontinued, apparently because someone claimed that JQuery 2.0 is now compatible with Win8 (?). However, my “hello world” app uses jQuery 2.0.2 with Angular 1.1.7 and it still has the problem. </p> <p>So the problem is not so much in Angular, but rather in JQuery, and this <a href="http://net.tutsplus.com">net.tuts+</a> article explains why: <a href="http://net.tutsplus.com/tutorials/javascript-ajax/building-windows-store-applications-with-jquery-2-0/">Building Windows Store Applications With jQuery 2.0</a>. </p> <p>David Müller of <a href="http://www.incloud.de/">Incloud</a> wrote some helpful step-by-step instruction on how to hack the jQuery source to make it Windows 8 ready: <a href="http://www.incloud.de/2012/08/windows-8-using-jquery-for-app-development/">Windows 8 – Using jQuery for app development</a>, which involves judiciously wrapping DOM manipulation functions around <em>MSApp.execUnsafeLocalFunction()</em> calls<em>. </em>And that’s sort of the basis that allowed me to get my sample app to work. Here is a diff snapshot of the mods I’ve made:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhID4x8HB4ktFWYq-kD-oHf1gsJyXZ8k7QzmGK7pNWokSdIDB6UiHT3Tw6Att3VqqhJuW6utBIiCYlzqnDKK7zuYonMqt4V5ZrPA8nsVpoe9ZQa-c0QhSVvxFx83XmvQ7LDzryETBi1V5U/s1600-h/image%25255B120%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ0byCZHX1a71hM-ChETD99CAWVdoeROLaA47pMEk4znRSpJ8RtJDovg_zl3nV5uzkwUQ6OHBYZ9gtoBNC99VxjFxjZAbnEZ_orUAxovKeOnTw0YKECt_OiqRHCg6gUjdG-WdMPXBHzMY/?imgmax=800" width="908" height="365"></a></p> <p>For what it’s worth, I’ve posted the <a href="https://github.com/th2tran/public/tree/master/Win8.AngularJS.App1">source code on my GitHub repository</a>. I suspect that as I build out more functionality into my application, there will be more places which need <i>execUnsafeLocalFunction()</i>. We shall see.</p> <p>A couple of issues/concerns arose which will have to be investigated in a follow-up exercise. First, I’m not very happy about having to perform surgery on jQuery and would have preferred a more OO (non-invasive) approach. Secondly, I’m uncomfortable about having to add <em>MSApp.execUnsafeLocalFunction()</em> wrappers around the relevant DOM manipulation methods. Could this potentially make my app vulnerable to script injection attacks? More to come later…</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com1tag:blogger.com,1999:blog-840713622317741354.post-53774807203043698692013-06-07T13:04:00.000-04:002013-07-19T17:46:16.427-04:00Knocking out a web based PDF viewerLast month, I spent some time learning <a href="http://knockoutjs.com/">KnockoutJS</a>. I then used it to build a simple ASP.NET project which allows you to view PDF documents in the browser without requiring any pdf browser plugin. Overall, it was a good learning experience.<br />
For HTML5 compliant browsers, I used <a href="http://mozilla.github.io/pdf.js/">Mozilla’s pdf.js</a> library; and for the older browsers, I used the <a href="http://www.swftools.org/">SWFTools</a> utilities to convert the PDF file to Flash, and then send back the Flash viewer to the client. Knockout provides the data and command bindings at the UI layer for the document grid to bring up the viewer as each document in the grid is clicked. On the backend, I used an <a href="http://www.asp.net/web-api">ASP.NET Web Api</a> controller which receives Ajax requests from the client JavaScript to send the document hitlist, or the document viewer.<br />
Here are some of the screenshots for the app. I may post the source code to GitHub sometime in the future, after some tidying and beautifying.<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikpO_SZl6zs4I7_RRchAmwALHl8_X0ogxVFbFoz75lKFUl1yTDmApCOy0bOhZNEaia3T1C_Io_jYlPaIMTNzJ5Ti8lwzVewhoMoA1IhLwU3-ncCm_ZpLSX3jMqfnzygYNiQACEi3W5E6Q/" /><br />
<br />
<div align="center">
<table align="center" border="0" cellpadding="2" cellspacing="0" style="width: 651px;"> <tbody>
<tr> <td valign="top" width="649"><div align="left">
<strong>Document Hit List:</strong>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKFqIadY3FYxiy3iJB5FaR8QG4io2OJiIhzY5oDLbWjh8UMgy2s5XQ7FoHO8TQ6Mo3VIIH0qvG4XjlBC5Zj3TYwHpEDJNhyphenhyphen47GWe2ySxexS0wB0wcK-pIn5OoFxdzPrKBKXgIvzdf4yLA/s1600/image%255B16%255D" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKFqIadY3FYxiy3iJB5FaR8QG4io2OJiIhzY5oDLbWjh8UMgy2s5XQ7FoHO8TQ6Mo3VIIH0qvG4XjlBC5Zj3TYwHpEDJNhyphenhyphen47GWe2ySxexS0wB0wcK-pIn5OoFxdzPrKBKXgIvzdf4yLA/s320/image%255B16%255D" title="Document Hit List" width="320" /></a></div>
<strong><br /></strong></div>
</td></tr>
<tr> <td valign="top" width="649"><div align="left">
<strong>Document Hit-List with HTML5 viewer:</strong><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKZFD4eTN0ASu9CWej1QV4IMu1Re_M-slfn7tI4lp8zLpL77IQXzvniX149xAhN61Lrfc-8WZslWHo-2z0pe7mKdR-v7-sciLhyphenhyphenK6yxQzcQBwD0FtqZFAF977q6PBqWkjt4Wko_-RGBGg/s1600-h/image%25255B17%25255D.png"> </a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ORHWycVnRE3aI_bZVaS97JhBcEbL2kIe6a-U4vDbQyA-qe-LWQClbeoDtiv2lqA1lPTUw1ZWMFLzjrUqaityXIhqurhivmeID75Nc7slFOi6zMbEGZXKCABpVSYrQIio0l95gAD9I1o/s1600/image%255B17%255D" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ORHWycVnRE3aI_bZVaS97JhBcEbL2kIe6a-U4vDbQyA-qe-LWQClbeoDtiv2lqA1lPTUw1ZWMFLzjrUqaityXIhqurhivmeID75Nc7slFOi6zMbEGZXKCABpVSYrQIio0l95gAD9I1o/s400/image%255B17%255D" title="Document Hit List with HTML5 Viewer" width="400" /></a></div>
<strong><br /></strong></div>
</td></tr>
<tr> <td valign="top" width="649"><div align="left">
<strong>Flash-based viewer:</strong><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi-qcCy_BX20t6XLWZGl24rfZBGAGhnRtnJ-nVN-8-F_pcOWvvbF6oG98JolxubYmiFB66LSZwePo6ITspl6Vnez9zPXzkkOoC8pxQS3WOw2twzHt3rnHKjmxmtL0874xxbZ0mtqLYYhE/s1600/image_thumb%255B12%255D" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi-qcCy_BX20t6XLWZGl24rfZBGAGhnRtnJ-nVN-8-F_pcOWvvbF6oG98JolxubYmiFB66LSZwePo6ITspl6Vnez9zPXzkkOoC8pxQS3WOw2twzHt3rnHKjmxmtL0874xxbZ0mtqLYYhE/s320/image_thumb%255B12%255D" title="Hit List with Flash Viewer" width="320" /></a></div>
<strong><br /></strong></div>
</td></tr>
</tbody></table>
</div>
Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com2tag:blogger.com,1999:blog-840713622317741354.post-4980632428320641352012-08-26T01:19:00.001-04:002012-09-22T23:27:42.312-04:00Rhino Mocking "out" parametersLast week, I was stumped by a block of <a href="https://nuget.org/packages/rhinomocks">Rhino Mocks</a> code. Here's a stripped down version of it:<br />
<pre class="csharp" name="code"> [TestClass]
public class DataHelperTests
{
private MockRepository _mocks = new MockRepository();
[TestMethod]
public void TestSubstString()
{
var dp = _mocks.StrictMock<IDataProvider>();
dp.Expect(p => p.TryGetData(Arg.Is("ERR001"), out Arg<string>.Out("This is a test error message.").Dummy)).Return(true);
var result = DataHelper.SubstString(dp, "Error ERR001: ${ERR001}");
Assert.AreEqual("Error ERR001: This is a test error message.", result);
}
}</pre>
<br />
The above unit test uses Rhino Mocks' method for mocking <i>out</i> parameters.
<i>DataHelper</i> is a helper class which manipulates <i>IDataProvider</i> object. Just to give you some context without going into the gory details about DataHelper's implementation, the <i>SubstString()</i> method essentially performs a series of key replacements based on value retrieved from a database, supported by <i>IDataProvider.TryGetData()</i>. The method <i>TryGetData()</i> returns a boolean value indicating whether or not it was successful in retrieving a value for the key.<br />
<br />
This is where things get tricky. The above test code would fail.<br />
<br />
It failed because the <i>Expect()</i> statement had no effect...until you add this all-important <i>ReplayAll()</i>.<br />
<br />
Here's the test code in its entirety:<br />
<br />
<pre class="csharp" name="code"> [TestClass]
public class DataHelperTests
{
private MockRepository _mocks = new MockRepository();
[TestMethod]
public void TestSubstString()
{
var dp = _mocks.StrictMock<IDataProvider>();
dp.Expect(p => p.TryGetData(Arg.Is("ERR001"), out Arg<string>.Out("This is a test error message.").Dummy)).Return(true);
_mocks.ReplayAll();
var result = DataHelper.SubstString(dp, "Error ERR001: ${ERR001}");
Assert.AreEqual("Error ERR001: This is a test error message.", result);
}
}</pre>
<br />
Truthbetold, I just installed Alex Gorbatchev’s <a href="https://github.com/alexgorbatchev/SyntaxHighlighter">SyntaxHighlighter</a> script on this blog. This post is just an excuse for me to test out the script. Kudos to Matt Ball for the <a href="http://heisencoder.net/2009/01/adding-syntax-highlighting-to-blogger.html">detailed install instructions for Blogger</a>.Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com1tag:blogger.com,1999:blog-840713622317741354.post-9813146759433212462012-08-26T01:12:00.001-04:002012-08-26T02:40:40.388-04:00[WorkAround] Windows 8 Release Preview with Guest Additions on VirtualBoxA few months ago, I installed Windows 8 Release Preview on a <a href="http://www.virtualbox.org/">VirtualBox</a> 4.1 and started playing with it. Performance is pretty decent, considering that it’s running inside a VM. But after I installed the Guest Additions, it crapped out and wouldn’t boot. Without the Guest Additions, I was stuck in 1280x1024 screen resolution while my monitor was capable of doing 1920x1080.<br />
<br />
Well, tonight I decided to be brave and installed Virtual Box 4.2 RC2. I thought I would re-try installing the new Guest Additions and see what happens this time around. Well, this is what happened after the reboot:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-wzztSPrcRpcKF6q0io6qWS8ss98Ckxsf3v6BkvocZnGVRrQKWSPrIpZqeX3I-BAiVjK5EFLUm2VOMILulPqF8KBlLOpuJTYkXTyZYhz_B0GO1WtGcShjWnUxcijJ-X_p9JLd-rnZylU/s1600-h/win8-vbox-after-guest-additions%25255B3%25255D.png"><img alt="win8-vbox-after-guest-additions" border="0" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9Y2G4a2jZLui7hmWDWX3uhWFdaPWbgqVb3HJd_7TDI80qBXQ1535SUFbq8bkbRr9ONs4Nf6aguT-KgKcDa9W0tOURah5S4sw1UFcPra3eeMvNazOSh3Pi7a48L_QicVBVRFYwMIxAb3M/?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="win8-vbox-after-guest-additions" width="641" /></a><br />
<br />
I had previously taken a snapshot of the VM before attempting the Guest Additions installation, though, so it was fairly painless to undo the installation.<br />
I then jumped onto the <a href="https://forums.virtualbox.org/">VirtualBox Forums</a> and quickly found this hint by <a href="https://forums.virtualbox.org/memberlist.php?mode=viewprofile&u=73628">Piercussion</a>:<br />
<blockquote>
<h5>
<a href="https://forums.virtualbox.org/viewtopic.php?f=2&t=44577&start=570#p234162"><em>Re: Windows 8?</em></a></h5>
<a href="https://forums.virtualbox.org/viewtopic.php?p=234162#p234162"><em><img alt="Post" height="9" src="https://forums.virtualbox.org/styles/prosilver/imageset/icon_post_target.gif" title="Post" width="11" /></em></a><em>by <strong><a href="https://forums.virtualbox.org/memberlist.php?mode=viewprofile&u=73628">Piercussion</a></strong> » 24. Aug 2012, 14:19</em><br />
<em>I was able to get Guest Additions to work (partly) buy disabling 3D Acceleration and enabling 2D Acceleration. However, I'm still not able to use 16:9 resolutions and it crashes going in and out of full-screen mode.</em></blockquote>
Sure enough, I disabled 3D Accelleration like so:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmvgo0Gbt4D5pBnYAH2LZWYOgQKQupmsQ4lCO3V5BG-2mXIxv1vkxVKkT5XyfnWyS_UXAZZU5WLhCFRvCEXf51gOIdT6TGSKR0fhVavLco0NHDyE3t0TagvCiXXeWMEObKXc2rjICxKec/s1600-h/win8-vbox-disabled-3d-acceleration%25255B7%25255D.png"><img alt="win8-vbox-disabled-3d-acceleration" border="0" height="479" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr4AzubFWmilCTFTjPSzCROYUqHLj4UnP1x4chI_PtGgUuQDSsJtP7cqQElSAav65Y3IZOoHsNUcrlMVTxlE41sg_m3jvK-BxlrVw37KgAhMc5582RKQfT_bZ8rG291oDNW_JaN47z4aY/?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="win8-vbox-disabled-3d-acceleration" width="644" /></a><br />
<br />
And I was able to bump up the screen resolution to 1920x1080:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNm0qLEJ2XpmCiPPeNZbvmOCu6uY36r_2n6FVUmPaqXdX79MHGX3kHTjAfWDvWI1HhzpZYxoMEN2-HIkrg_-n8ecpi2tgRXrl98nRuf_Wt2gpmuskkGyiV_rDE9c-CjqlyqmL-FUArnKY/s1600-h/win8-vbox-1920x1080-screen-res%25255B6%25255D.png"><img alt="win8-vbox-1920x1080-screen-res" border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUGn9FhavAxknY1Q_VBY_4HXl7ZahHETlJI35-pSb2Ngqw3-GX-SDzEVUkPLYz31osB3QuV9kjgBlsdVs6kVQD1zN52Z_yizWABYBciBK6xjVi6BLuAfgytMuy61G8liYEiHaHnl6v0LY/?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="win8-vbox-1920x1080-screen-res" width="482" /></a><br />
<br />
Hat tip to <a href="https://forums.virtualbox.org/memberlist.php?mode=viewprofile&u=73628">Percussion</a> and <a href="https://forums.virtualbox.org/memberlist.php?mode=viewprofile&u=73674">cybervzhn</a> for the tips!Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-85983363420929409012012-06-21T01:39:00.001-04:002013-08-02T17:00:26.496-04:00Kadople.com v0.2 and ruminations on web hosting options for a microStartupLast week I updated the theme for our web site, which is being hosted by Google Sites (thanks, Google!).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8MEQ3xNIV9bMOWFsqCgwkeqVSC6MMA-uAkiGW0VygQs6RtAP9LsS8aZWFonklPftW7RtiU0BaRPPu6gpBvFeatNmiCSdg4-DBNDjeTwHTQ25mSZEDlgv8oojt85M8oFpifTLOPTPyxV0/s1600/website-v0.2%255B3%255D" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8MEQ3xNIV9bMOWFsqCgwkeqVSC6MMA-uAkiGW0VygQs6RtAP9LsS8aZWFonklPftW7RtiU0BaRPPu6gpBvFeatNmiCSdg4-DBNDjeTwHTQ25mSZEDlgv8oojt85M8oFpifTLOPTPyxV0/s400/website-v0.2%255B3%255D" width="400" /></a></div>
<br />
This is the second iteration of the site. I missed the chance to take a snapshot of the first iteration.<br />
I kind of like this theme, but must admit, I’m finding that the layout customization feature is a bit limiting with Google Sites. Wondering if the Business Edition of Sites would provide more freedom in that regard. It’s unfortunate that there’s no Microsoft equivalent of Google Apps. Being a Microsoft technologist, I would have been more inclined to go with a Microsoft solution. I guess there’s <a href="http://www.microsoft.com/en-us/office365/small-business.aspx#fbid=NZ0TJjzWTKh">Office 365 for small business</a>, but where’s the free part of the service that would be comparable to <a href="http://www.google.com/enterprise/apps/business/">Google Apps</a>? There’s also <a href="https://www.wordpress.com/">wordpress.com</a> but customization seems a bit restricting as well, unless you install your own copy of WordPress, which takes us back to the question of web hosting on a shoestring budget. <a href="https://www.tumblr.com/">Tumblr</a>, which provides free hosting, is also a good option, except that it’s littered with NSFW materials. <br />
<br />
In the end, I like Google Sites not only because it’s free, but also for its scriptability via <a href="https://developers.google.com/apps-script/">Apps Script</a>, and may be I’ll get into some of that in the near future. So for now, Google Sites it is. The next step up for us will likely be Windows Azure. I watched some of their <a href="http://www.meetwindowsazure.com/Conversations">demo sessions at TechEd 2012</a> a few weeks ago and was thoroughly impressed.Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-51947861545745794682012-05-24T23:39:00.001-04:002012-05-25T21:52:49.249-04:00Disruptive Innovation<p>Good discussion by the  IBM Global Business Services vPanel on <a href="http://smarterplanet.tumblr.com/post/23615083022/catch-the-replay-of-the-dynamics-of-disruptive">The Dynamics of Disruptive Innovation</a>:</p> <iframe style="border-right-width: 0px; outline-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" height="340" src="http://cdn.livestream.com/embed/newintelligence?layout=4&clip=pla_68b7f55e-6394-4761-9b52-49f522ea10c3&color=0x006ccd&autoPlay=false&mute=false&iconColorOver=0xe4f2ff&iconColor=0xb5dcff&allowchat=true&height=340&width=560" frameborder="0" width="560" scrolling="no"></iframe> <p>“Disruptive” has become the buzzword of the day lately. The panel experts on this webcast remind us that disruption is usually a characteristic of good innovation, but it is counter-productive to start something with the sole intention of being disruptive. Secondly, it is important that CEOs of large corporations adapt more quickly to disruptive innovation at the crucial times in their business. And finally, I really like Navi Radjou’s closing challenge which seems to direct not only at small startup companies: “disruptive innovation done on a shoestring [budget]”.</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-46718136854748326742012-05-20T16:12:00.001-04:002012-05-20T16:15:07.136-04:00How far is that extra mile anyway?<p><em>I’ve been meaning to contribute at least once a week to this blog, but have been swamped in the past few weeks, so no time to write new materials. Here’s an opinion I wrote <a href="http://th2tran.blogspot.ca/2006/06/how-far-is-that-extra-mile-anyway.html">nearly 6 years ago</a>, which still seems to be valid today.</em></p> <p>_______________________</p> <p>We have all heard of the phrase "going the extra mile" when people talk about providing exceptional service to their customers. And I'm definitely a proponent of this mentality.</p> <p>However, I've also once heard of the phrase "your lack of planning does not constitute my emergency", murmured by a former colleague when referring to a particularly demanding customer, and also think that it makes perfect sense.</p> <p>At the office, I sometimes get calls from our partners/resellers with requests of the kind "um...I've got this demo in 2 hours, and I need your help to build this integration against this application that I want to show for my demo."</p> <p>First thought that always came to my mind was that wonderful phrase uttered by the colleague. I mean, c'mon! My day is usually fully planned out and these kind of things really throw a monkey wrench into things.</p> <p>My following thought would be, well, they <b>are</b> trying to sell our product for us, and consider the alternative: I tell the partner to blow off and tell the customer to reschedule and give us more time. On such close notice, this would make the partner look very bad in front of the customer, not to mention the partner might have made a long trip onsite for this demo--all of which aren't the end of the world, but a lost opportunity nonetheless. <br />With that thought, I put my regular schedule aside, got online with the partner and in 2 hours, whipped up a prototype demo into shape, in time for them to show the customer. Everyone was happy...well, except may be me! <whine>You've taken 2 hours of my life on something you could have done yourself, and I want it back!</whine>.</p> <p>So, although I think that my colleague's "lack of planning" speech is absolutely spot-on--just like the theory of <a href="http://www.google.ca/search?q=define%3Acommunism">communism</a> is absolutely spot-on--unfortunately, just like communism, it's not very practical ;-)...which brings me to the subject of this blog post: how far is that extra mile? I'll get back to you when I have the answer.</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-67395161875066842072012-05-04T22:08:00.000-04:002012-05-05T01:14:16.955-04:00My brief encounter with Adsense<p>This week concluded my very short lesson in Google Adsense. I signed up to the program on April 13th and my application got approved on the 17th. I then sent a quick email to my friends and relatives all over the world, saying something like:</p> <blockquote> <p><em>Hey, I just started my company web site and put some Google ads on it. Google pays me a few cents every time someone clicks on the ad and view the web site being advertised. Please check them out and help me earn some extra cash. :-)</em></p> </blockquote> <p>What I should have told them was: only click on the ads if you’re interested in them; don’t click wildly just on any ads or you’ll get me in trouble.</p> <p>Sure enough, in one week, I saw the estimated earnings jumped from $2-3/day to over $60/day on May 2. Out of a total of 501 page views, I received 451 ad clicks. Admittedly, a few of those clicks were my own, as I found some of the ads to be interesting. </p> <p>Needless to say, I was not surprised when I received this email this morning:</p> <blockquote> <p><em>Hello, <br />After reviewing our records, we've determined that your AdSense account <br />poses a risk of generating invalid activity. Because we have a <br />responsibility to protect our AdWords advertisers from inflated costs due <br />to invalid activity, we've found it necessary to disable your AdSense <br />account. Your outstanding balance and Google's share of the revenue will <br />both be fully refunded back to the affected advertisers.</em></p> </blockquote> <p>The Catholic part of me can’t help but say: Mea culpa!  Thanks, Google, for keeping me honest. However, I feel bad for the poor souls whose accounts were falsely disabled, as evident from the long trail of comments following <a href="https://plus.google.com/109412257237874861202/posts/RpNNBRr61Hp">Matt Cutts’ plus</a>. But, as Professor <a href="http://en.wikipedia.org/wiki/Randy_Pausch">Randy Pausch</a> famously said once: “The walls are there to stop the people who don’t want it badly enough.” This is definitely one distraction I don’t want. </p> <p>One last comment on Adsense’s Wrong Click Detection algorithm: Clicking on the ads on my own site is prohibited. Improvement to the algorithm is needed so that this shouldn’t have to be one of the rules. I may be genuinely interested in the ad precisely because it relates so well to the topic which my site/blog content is discussing.</p> <p>So that’s the end of that. Let’s move on.</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-32516957005846118452012-05-03T06:53:00.000-04:002012-05-03T07:40:37.258-04:00Corporate Blogging Etiquette<p>Since writing the first few blog entries for Kadople, I’ve become conscious of the need to keep a certain level of appropriateness in my posts. Should I blog about stuff I’m working on, what I had for breakfast, the people who irritated me today, people whom I irritated? And so on…</p> <p>So I did some googling, and quickly came up with this great article from <a href="http://michaelhyatt.com/">Michael Hyatt</a> entitled <a href="http://michaelhyatt.com/thomas-nelson-corporate-blogging-guidelines.html">Thomas Nelson Corporate Blogging Guidelines</a>, which outlines about 10 rules for a corporate blogger. I think the article is geared towards large corporations rather than small startups, but I particularly like this rule:</p> <blockquote> <p><em><strong>Keep secrets.</strong> Do not disclose sensitive, proprietary, confidential, or financial information about the Company, other than what is publicly available in our corporate press releases. This includes revenues, profits, forecasts, and other financial information related to specific authors, brands, products, product lines, customers, operating units, etc. Again, if in doubt, check with your supervisor before posting this type of information.</em></p> </blockquote> <p>So I guess this means I won’t be posting screen shots of the apps I’m currently working on. We’ll see.</p> <p>Not sure about this one:</p> <blockquote> <p><em><strong>Own your content.</strong> Employee blog sites are not Company communications...</em></p> </blockquote> <p>Well, unless you want it to be. There’s a pattern I’ve observed from following blogs of corporate CEOs and CTOs, more often than not, that they purposely keep their blog site separate from the company web site. I don’t know why that is, but perhaps this partly explains it:</p> <blockquote> <p><em>…your blog entries legally belong to you. They represent your thoughts and opinions. You may want to remind your readers of this fact by including the following disclaimer on your site:</em></p> <blockquote> <p><em>The posts on this blog are provided ‘as is’ with no warranties and confer no rights. The opinions expressed on this site are my own and do not necessarily represent those of my employer.”</em></p> </blockquote> <p><em>You assume full responsibility and liability for all actions arising from your posts. We also encourage you to put a copyright notice on your site in your name (e.g., “© 2009, John Smith”).</em></p> </blockquote> <p>At this point in time, I don’t see a need to personally brand myself as distinct from my child (my company). On the contrary in fact, I want this to be the voice of my child, at least while it is still in its infancy.</p> <p>So what’s appropriate corporate blogging etiquette for a young company? I’ll continue searching. Or, perhaps as I continue writing, a pattern will emerge as to what’s appropriate and what’s not. We’ll wait and see.</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0tag:blogger.com,1999:blog-840713622317741354.post-71604942604187277632012-04-30T01:43:00.001-04:002012-05-20T16:17:29.431-04:00Windows 8 HTML5 Apps–This Ain’t Your Grandpa’s JavaScript<p>In the past few weeks, I’ve been playing with Windows 8 Consumer Preview. I’d like to build some new apps for it, and have been struggling with which language flavour to go with: HTML5/JavaScript or XAML/C#. </p> <p>On the one hand, I’ve been working with WPF in the past couple of years, so XAML seems like a natural transition. Although I’ve encountered a few of the WPF pain points mentioned <a href="http://fixwpf.org/">here</a>, I’ve also heard that Windows 8 XAML was a complete overhaul of the old WPF. So it may not be too bad.</p> <p>One the other hand, I read <a href="http://codesnack.com/blog/about-me/">Brent Schooley</a>’s blog article, <a href="http://codesnack.com/blog/2012/01/16/metrosnack-xaml-or-html5/">Choosing XAML or HTML5 for Windows Developer Preview apps</a>, which favours HTML5 due to better UI designer support in Blend. Skillset reusability is also an obvious plus: I can now use the same programming language to build desktop apps or web apps, even if a paradigm shift is be requried. My two first reservations are:</p> <ol> <li>integration with Windows core (via system DLL calls, etc…), and </li> <li>source code protection. </li> </ol> <p><strong>OS Integration</strong> <br />Let’s say I go with JavaScript. What then? Wouldn’t JavaScript be limited to only making HTTP requests to the cloud and not able to reach down to the Windows core to do some heavy duty native operating system integration when it needs to? This is a Windows app, afterall.</p> <p>My mind was put to rest when I read Dave Isbitski’s post, <a href="http://blogs.msdn.com/b/davedev/archive/2012/04/24/accessing-the-camera-in-a-windows-8-metro-style-app-using-html-and-javascript.aspx">Accessing the Camera in a Windows 8 Metro Style App using HTML and JavaScript</a>. Really? HTML and JavaScript can do that? Enters <a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx">WinJS</a>. This ain’t your grandpa’s JavaScript. It can instantiate and interact with native objects as easily as C# would. This reminds me of something else. Remember Internet Explorer 4 and <a href="http://en.wikipedia.org/wiki/Active_Desktop">Active Desktop</a>? Active Desktop was a flop because it was an open invitation for web attackers to exploit the operating system. I think after 15 years, though, HTML technologies has finally caught up with Microsoft’s vision <grin> to bring web technologies to the Windows desktop. Hey, if you can write a full blown server-side app nowadays with JavaScript (via <a href="http://nodejs.org/">Node.js</a>), why shouldn’t you be able to do the same for desktop apps.</p> <p><strong>Source Code Protection</strong> <br />Call me suspicious, but I’m still not comfortable about exposing my all of source code to customers and, potentially, competitors. In my very humble opinion, open source software may be good for the human race in the long run, but if you’re a small ISV trying to make something for yourself in this vast industry, open sourcing could be deadly. So, how do you get around this exposure?  One obvious option would be put your sensitive algorithms in your service layer, hosted on a private cloud somewhere and away from prying eyes. But does that means HTML5/JavaScript is only suitable for cloud based Metro Style apps? Hard to believe that it is. Perhaps you can have hybrid JavaScript/.NET apps, with HTML5/JavaScript code being responsible for presentation logic and pure .NET assemblies being responsible for business logic. It seems like a reasonable way to go.</p> <p><strong>So where does this leave XAML?</strong></p> <p>I read a recent <a href="http://channel9.msdn.com/Forums/Coffeehouse/Windows-8-Apps-Xaml-vs-HTML5">discussion thread</a> on <a href="http://channel9.msdn.com/Forums/Coffeehouse">Channel 9’s Coffeehouse Forum</a> in which the general consensus seemed to be an abhorence for HTML5 in favour of XAML. WPF guru, <a href="http://joshsmithonwpf.wordpress.com">Josh Smith</a> has also blogged <a href="http://joshsmithonwpf.wordpress.com/2012/03/20/does-anyone-actually-care-about-winrt/">a short and damning post against WinRT</a> and consequently, I would assume, of HTML5/JavaScript for the desktop. I myself have not worked with WPF long enough to be religiously bound to it. So, I’m going to give HTML5 a fighting chance. I’m going to continue playing with this thing for another couple of months and see whether or not I’ll become abhored by it, and will log my findings on this blog whenever possible.</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com2tag:blogger.com,1999:blog-840713622317741354.post-87257707422895393782012-04-26T01:53:00.001-04:002012-04-26T08:50:43.062-04:00C# default properties<p>I’d like to start out the <em>Coders’ Corner</em> section of this blog with a simple C# trick that I call “default properties”, having come from the VB world.</p> <p>Suppose that I have this class called Person (code screen shots taken from Visual Studio 11 Beta):</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikVvf4fnd2M2KgLW-PT3HYcWNjZSKaRcElSnurAFjhxCGx43EVqDFuYMJN_5cH9-ncmgsIC7o56tzS014ErSyoTqIMvlnzxipXO0XkYFAus3joC8eIPVYTeSRoZTk6ickxMdvumZyz7xg/s1600-h/person.cs%25255B7%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="person.cs" border="0" alt="person.cs" align="left" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIQ7adcAOAvEegF3DpVZFXZvOjtfuQcWuUOFCJYQ_bzRUvkUJxXjGfvRymYY9vpduYFz2awXw68VRZYmgpY_lbfD1VsTKkq_FZBJAgbvMssDdAZ6-RGxjV7D3qdHwncTj55KqTPFaNYiE/?imgmax=800" width="305" height="99" /></a></p> <p> </p> <p> </p> <p> </p> <p>I “new” it up in a collection like this:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisNU1Ii3D6VhY_nUvCUuHS4Tf0GNPbJeg8zdjzWVbh2BSqW5hKBisjN472YMOzbjaUC3a3jAMUDDuV7EkVrPz6Rvll6mCRgXwfVxSnhoS5qDWuc5-aaR52I5Eq1mC9ngjUmRJ4udXL5o0/s1600-h/main.cs-1%25255B9%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="main.cs-1" border="0" alt="main.cs-1" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikst3BEORPNhxFdcMFpaMl15Biyc6KsdWGQH-j40rGkJtZJ7v_rvxYlIPcEqyutf5-HLSTnmn88v4xhCsrydP7HhIH3e526YvZ2-qlJw2PZaA_X6xr67DSHxBSv4346M8Z8SaIQ_Yi-0o/?imgmax=800" width="603" height="76" /></a></p> <p>Now, let’s say that I set up a <font color="#0000ff"><em>foreach</em></font> loop which does something to the collection, like this:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqr5d5qPL3gxdZbrfk0Jsx6c0CbsJeiBcgE3y8Pc8F7hOd7H-D16ZNo7E8CGlx28LTBIDQK7m1e3IqM-tJ1LyxhNSqdu3psZNvmeXQb5MSFaEtl472XFjTk7dnoMCyAABO8DbM6Eb1cwg/s1600-h/main.cs-2%25255B4%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="main.cs-2" border="0" alt="main.cs-2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhupA-RHYQZLZH68sZKaR-ngLyiqVMCLnJuO0RujVSRw_szQ0sn3bANRdZM2Siu_DieiyR01v_WTJDgBK3gz2ib8ojNYbi6BG2uCm38Y78vY0ehU5NIXH8e-6nQGnP39kJvpbcTQS6UCfg/?imgmax=800" width="387" height="34" /></a></p> <p>What I would like it to do is to use p’s <em>Name</em> property, without having to tell it explicitly within the context of <em><font color="#0000ff">WriteLine</font>()</em>. </p> <p>As is, the above code would give me this output:</p> <p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMe0cRdI0UnqUXIIPRRPYQz1kaUlyTSSY0eMhj3-kfC79Nw3WPfjCqOw4hxF-x9XrVL-fzOcnpd7YEiMiT8DdEi75mU9gFEABDULNnyqaQ-xFJKIdjqEpSose29AxuqEZjmDhjYFWgXUM/s1600-h/consoleapp1-output%25255B3%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="consoleapp1-output" border="0" alt="consoleapp1-output" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbV-KzeIC7DXNXDoWGwoIC4CU3PD4qwnssxJGc48xMQKx8Q-gF3d3lGkcIoJbeYD9kYyP9XgbIVj4iVOX0VNgvFjuM0i1-gs30A1D9miGC_cuaqFdA7ZwA91ftA8zNsFQj5-7bERJpsz4/?imgmax=800" width="669" height="134" /></a></p> <p>The trick is to use <a href="http://msdn.microsoft.com/en-us/library/85w54y0a.aspx">C# conversion operators</a>, like so:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLgAM8ebHgsC73hdAFnaHo0DYUy_t1xYF8dktBn-OMJmO9RIv5EbG-QcpsrNuOr9kkL2b5hobmwINaBz8omM3PaniYL-ZmJqEwSoomGyuxLfvwx-zfwvWcaTq1FFHg4yf1litmj9bFuLM/s1600-h/person.cs-2%25255B4%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="person.cs-2" border="0" alt="person.cs-2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyahrWO6VBLS-n-EDha103e-8YH1w8V8pcxoOv_BUUctS_2s3BYj8hldrMDLPfx9g-oNfQBUNMhzNF1BaEfslIxsVgsKQyE2uhdTgvG32KYHGNP6fIlYrg_5peaXj0RUyMBUC4daq2l-w/?imgmax=800" width="454" height="191" /></a></p> <p>When <font color="#0000ff">WriteLine</font>() is used, the system knows that the method expects a string, and finds the implicit cast operator which converts a <em><font color="#4bacc6">Person</font></em> into a <em><font color="#0000ff">string</font></em>.</p> <p>And the output:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh41eNWta5Wa_la5G1vwMAqoCytnc3o5v0U4grU5AN5FXEAA9beXz47p0igKjp103vzFZvn2F_5DVI1zYQn73jvyJ_3xpySUzT1OKVRZx9YSGmFrFj0k5srHp63cciQGjCX2TkfpXE7wJM/s1600-h/consoleapp1-output-2%25255B4%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="consoleapp1-output-2" border="0" alt="consoleapp1-output-2" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz3K5hGrL2BU9T0GAKh83SwhawBCtbDzzFf5QlqRlneu4d9k_ck4vNBhJm2IN37zRdmufOHGpYyCRouiKchLN2HoD3VIq96pmaNGOKw3xucGfZgKHfYAvuRwHt7-wU2UM5J9G9ivP3VuA/?imgmax=800" width="394" height="211" /></a></p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com4tag:blogger.com,1999:blog-840713622317741354.post-78639850805088251922012-04-13T23:17:00.001-04:002012-04-13T23:26:28.731-04:00The Kadople Experiment<p>Kadople was incorporated for the primary purpose of doing software development consulting work. I also wanted to leverage the business entity to create and market some cool apps. </p> <p>What exactly will those “cool apps” be, and what user problems will they solve? Those are the questions  I’m still pondering. But most likely it will be something for the Microsoft Windows platform, since that has been my specialty as a coder for the past 15 years. Perhaps it will be something on the up-and-coming <a href="http://blogs.msdn.com/b/b8/">Windows 8</a>, using <a href="http://blogs.msdn.com/b/windowsstore/">Windows Store</a> as distribution mechanism. Or perhaps it’ll be something that will run on the cloud.</p> <p>The idea of starting my own microISV has been simmering in my head since 2005, but I’ve been largely ignoring it due to lack of conviction. I had already have a full time job in which I put in way too many hours. Would I still be able to put in the time required to make something of my own? Would my family suffer? What if, what if, and what if…</p> <p>Well, after some 5+ years of simmering, I’ve finally decided to just go for it, on the hunch that if you start it (the business), they (the ideas) will come. Let’s wait and see what becomes of this hunch.</p> <p>And so begins the Kadople Experiment.</p> Anonymoushttp://www.blogger.com/profile/05861253125412768780noreply@blogger.com0