<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>legoboku.eng</title><description>Slowing down is exactly what is needed to go fast! The careful, thoughtful and verified work leads to higher quality.&lt;br&gt;
– James Grenning, "Test Driven Development for Embedded C"</description><managingEditor>noreply@blogger.com (yohei)</managingEditor><pubDate>Sun, 27 Sep 2026 00:45:40 +0900</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">35</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://legobokueng.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:summary>Slowing down is exactly what is needed to go fast! The careful, thoughtful and verified work leads to higher quality. – James Grenning, "Test Driven Development for Embedded C"</itunes:summary><itunes:subtitle>Slowing down is exactly what is needed to go fast! The careful, thoughtful and verified work leads to higher quality. – James Grenning, "Test Driven Development for Embedded C"</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Friend to friend car sharing service implementation with Kinoma Create</title><link>http://legobokueng.blogspot.com/2014/09/friend-to-friend-car-sharing-service.html</link><category>Hackathon</category><category>IoT</category><category>Kinoma Create</category><author>noreply@blogger.com (yohei)</author><pubDate>Thu, 18 Sep 2014 14:58:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-7064947328395034218</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuyh_OmA0kWSw86J3VgtO5y4Ze8jXxId3S5zRpWv1aWT_shgRkiFFeVK8A9RQJqZRIekpv4Eo0__Q8Afz9TGOPGRWs3g0PI2T37sF_X3PQe_QZM8GuiivxTkIR7wn3Ef0HWgSDrlcu1X0/s1600/IMG_20140906_181415373.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuyh_OmA0kWSw86J3VgtO5y4Ze8jXxId3S5zRpWv1aWT_shgRkiFFeVK8A9RQJqZRIekpv4Eo0__Q8Afz9TGOPGRWs3g0PI2T37sF_X3PQe_QZM8GuiivxTkIR7wn3Ef0HWgSDrlcu1X0/s1600/IMG_20140906_181415373.jpg" height="180" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;I joined &lt;a href="http://attcarhomehackathon.com/"&gt;AT&amp;amp;T Hackathon @ Super Mobility Week - Code for Car &amp;amp; Home&lt;/a&gt;&amp;nbsp;at&amp;nbsp;Las Vegas on September 6-7 with my two other team members Rama and Kishore. This hackathon is aimed towards developing new applications for connected car and home industry by utilizing AT&amp;amp;T api’s and IoT hardware and software provided by multiple vendors present&amp;nbsp;&lt;a href="http://attcarhomehackathon.com/sponsors/"&gt;here&lt;/a&gt;. In the hackathon, we tried to make a friend to friend car sharing system which is more secure and interactive than existing services. We intended to use &lt;a href="http://kinoma.com/create/"&gt;Kinoma Create&lt;/a&gt; platform as in car unit interface that interacts with a driver by visual and audio information. We joined &lt;a href="http://www.meetup.com/sfnodejs/events/199887782/"&gt;Kinoma Create meetup&lt;/a&gt; before the hackathon and Kinoma team lend us their pre-release version to be used with our Hackathon. So, we would like to share our experience in this entry.&lt;br /&gt;
&lt;div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;"&gt;
&lt;div style="line-height: 1.15;"&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
Our motivation for the AT&amp;amp;T hackathon&lt;/h2&gt;
Most people in United states use their car less than 2 hours per day, that is less than 10% utilization rate. At the same time when you need an additional car for a weekend trip or travel outside of home town it is expensive to rent a car. Our concept takes advantage connected car technology to easily share this underutilized car between friends and family. Both parties in this transaction will be benefited as borrower can use car for fraction of rental car cost while owner can use incentive (monetary or points) from this transaction for his future travel.  As new P2P car sharing application like getaround, relayrides are getting popular but they will not be useful for sharing cars with friends, family and neighbors. Since these P2P companies takes a portion of rental cost they will not suit sharing scenarios where friends and family will use each others car. In our scenario, we are not considering monetary incentive but this can be easily added as form of points or any other form to our system.&lt;br /&gt;
&lt;br /&gt;
Our major motivation in this project is to develop an application that can help a friend, trusted neighbor or family member to easily request, safely use and return car as per agreed schedule. At the same time our application also aims to provide car owner with tools to learn about borrowers past driving score, giving guidelines about his car usage and report on how his car was handled by borrower. To achieve this we developed friend-to-friend car sharing  application to solve technical challenges in car sharing scenarios as discussed here.&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Technical challenges for friend to friend car sharing&lt;/h2&gt;
Next, we explain technical challenges for the car sharing that we tried to solve in the AT&amp;amp;T hackathon based on the scenario above. We tried to solve common issues we see when we share own cars with friends, family and neighbors.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Owner’s problem&lt;/h3&gt;
&lt;h4&gt;
&lt;ul&gt;
&lt;li&gt;(security) It is difficult to give car keys to borrowers if owner is not available at the time of pickup.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;(1) Actual world authentication&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight: normal;"&gt;If the owner is not available at the time of pickup, the owner can’t check borrower’s ID and the borrower lose a chance to share his car. To make a sharing process easy, the owner needs not only online authentication at a time of reservation but also actual world authentication that works remotely.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;(2) Electronic keys for car and garage&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight: normal;"&gt;If the owner is not available at the time of pickup, the owner also can’t give keys to the borrower. The owner need a way to provide electronic keys for car and garage from remote.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;(safety) Owner wants his car to be driven without aggressive driving and return on schedule without any problems.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;(3) reinforce the borrower with good driving behavior&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight: normal;"&gt;Even though the borrower is reliable person, the borrower might not be safe driver. The owner might want to have a way to monitor the borrower’s driving and reinforce the borrower with good driving behavior.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/h4&gt;
&lt;div&gt;
&lt;h3&gt;
Borrower’s problem&lt;/h3&gt;
&lt;h4&gt;
&lt;ul&gt;
&lt;li&gt;(usability) It may be difficult for borrowers to drive this car without knowing operation details or local driving etiquette.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;(4) Less distractive car operation details for a car&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight: normal;"&gt;It is common that we don’t know how to operate a car if we rent different type of car from own car. The borrower wants to operate the car with the same way as his own car.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/h4&gt;
&lt;/div&gt;
&lt;h2&gt;
System overview&lt;/h2&gt;
&lt;div&gt;
Our solution aims to provide two main features for car sharing. First it support automatic borrower authentication through in-home unit. Our in-home unit detects proximity of borrower by bluetooth beacon technology and enables him to access car parked inside a garage. Second we provide authentication and driving related information through in-car unit.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG8L7EBnPmCSaswVJ0idm5CuD2OAm-U7FJPims-lljtuqS_vkLxuny1rmSQwXj82F5O-gfzi5kGEwXxS0C971_JjoWGvMTHusR7eMTgbMCgLza2rpW0bS4pws9dpPRKcqg-bHi09aYNnE/s1600/2014-HackArhchitecture.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG8L7EBnPmCSaswVJ0idm5CuD2OAm-U7FJPims-lljtuqS_vkLxuny1rmSQwXj82F5O-gfzi5kGEwXxS0C971_JjoWGvMTHusR7eMTgbMCgLza2rpW0bS4pws9dpPRKcqg-bHi09aYNnE/s1600/2014-HackArhchitecture.png" height="480" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Why we chose Kinoma Create&lt;/h2&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijUdvamxirhezN47CBUX9DtoNP7gfM5OKqFDrk1Ekw5k9BfYXGmlNWXAV6y2nXbpIjKDaXiOF0mibr5PjUWLs8l8nGgL1jou7M-K2C2_jgBAD3yCoexNUqBTQ9_zV9nwFTgKplrsWr5HY/s1600/IMG_20140827_200625473_HDR.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijUdvamxirhezN47CBUX9DtoNP7gfM5OKqFDrk1Ekw5k9BfYXGmlNWXAV6y2nXbpIjKDaXiOF0mibr5PjUWLs8l8nGgL1jou7M-K2C2_jgBAD3yCoexNUqBTQ9_zV9nwFTgKplrsWr5HY/s1600/IMG_20140827_200625473_HDR.jpg" height="180" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
We planned to use Arduino and Raspberry Pi to implement the in-car unit. Although, when we joined the Kinoma Create meetup, we found out that it supports the following requirements and it is easier to implement the in-car unit. So we decided to use it for the in-car unit.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Built in network functionality to communicate with server and mobile application&lt;/li&gt;
&lt;li&gt;Display and touch interface to implement interactive user interface for a driver&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Our impression on Kinoma Create&lt;/h2&gt;
&lt;div&gt;
Kinoma platform is helpful for us to quickly develop a simple prototype for our application due to its hardware programming capabilities, built in connectivity and sample application provided by Kinoma team. Developing application on Kinoma studio is straightforward and easy to port completed application to platform. Programmers who are familiar with Java Script may find it easy to write new applications while Hardware programmers like flexibility of programmable pins. Their examples need to be expanded for network and protocol applications but with little effort we were testing our first applications.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
&lt;div&gt;
We defined and created a simple car sharing application for friends, family and neighbors. We used multiple hardware platforms. We used Kinoma Create to build our in-car unit quickly with built in network functionality and display and touch interface. Through the prototyping, we saw potential of Kinoma Create for mainly web developer to build IoT application rapidly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Acknowledgment&lt;/h2&gt;
&lt;div&gt;
Thank you Kinoma Team for providing pre-release version! Since Kinoma Create is nice product for Javascript programmers to take a step into IoT world. We believe this product will become successful in IoT industry.&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuyh_OmA0kWSw86J3VgtO5y4Ze8jXxId3S5zRpWv1aWT_shgRkiFFeVK8A9RQJqZRIekpv4Eo0__Q8Afz9TGOPGRWs3g0PI2T37sF_X3PQe_QZM8GuiivxTkIR7wn3Ef0HWgSDrlcu1X0/s72-c/IMG_20140906_181415373.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Stepping into a pattern for handling asynchronous operations in Java Script called "JavaScript Promise"</title><link>http://legobokueng.blogspot.com/2014/07/stepping-into-pattern-for-handling.html</link><category>Asynchronous</category><category>HTTP</category><category>JavaScript</category><category>Programming</category><author>noreply@blogger.com (yohei)</author><pubDate>Mon, 21 Jul 2014 14:31:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-2852972774031254593</guid><description>I have been currently working on &lt;a href="http://parse.com/"&gt;Parse.com&lt;/a&gt; and &lt;a href="https://www.automatic.com/"&gt;Automatic&lt;/a&gt; for my prototyping. I had a problem communication between Parse and Automatic web service through HTTP.&lt;br /&gt;
&lt;br /&gt;
Here is my question on &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="043a5038-eedb-44b8-89f8-1e5209c4eccd" id="117de7dc-b0ad-4efe-9c0a-f7549a33bc51"&gt;stackoverflow&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://stackoverflow.com/questions/24772571/parse-cloud-httprequest-call-with-http-request-header"&gt;Parse&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="88033d12-e531-4a36-aebb-09bcc0ef61a5" id="b551d82b-a4f4-4512-9dd9-9e4e03e12b76"&gt;.&lt;/span&gt;Cloud&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="88033d12-e531-4a36-aebb-09bcc0ef61a5" id="e87875c4-5806-4455-8391-3ad4d5c68b22"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="88033d12-e531-4a36-aebb-09bcc0ef61a5" id="4ba75d7c-6363-430b-a65b-4b2a2c90c794"&gt;httpRequest&lt;/span&gt; call with HTTP request header&lt;/a&gt;&lt;br /&gt;
The point is that I sent an HTTP request but any callback functions are not called.&lt;br /&gt;
&lt;br /&gt;
According to &lt;a href="http://stackoverflow.com/questions/24772571/parse-cloud-httprequest-call-with-http-request-header/24791007#24791007"&gt;the suggested solution&lt;/a&gt;, I found the following two mistakes in my code.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Wrong callback function&lt;/li&gt;
&lt;li&gt;I did not respond to a response from a server&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Thanks to the solution, I could learn how to write a callback function&amp;nbsp;for &amp;nbsp;asynchronous operations in JavaScript.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe width="100%" height="300" src="http://jsfiddle.net/legoboku/PJ3fR/embedded/" allowfullscreen="allowfullscreen" frameborder="0"&gt;&lt;/iframe&gt;
This is a pattern for handling asynchronous operations in JavaScript that you can see in JavaScript libraries like AngularJS. It is called "&lt;a href="http://wildermuth.com/2013/8/3/JavaScript_Promises"&gt;JavaScript Promises&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
I stepped into the very beginning of asynchronous operations in JavaScript this time. If I found something interesting, I will write it on this blog.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Completed "Introduction to Databases" of Stanford Univeristy with "distinction" </title><link>http://legobokueng.blogspot.com/2014/03/completed-introduction-to-databases-of.html</link><category>database</category><category>online course</category><author>noreply@blogger.com (yohei)</author><pubDate>Mon, 24 Mar 2014 01:17:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-8072700024253522486</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-kWoXyLH_e0g/Uyjsbop7YII/AAAAAAAAQjk/LdBddIUrVRg/s1600/state_of_accomplishment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-kWoXyLH_e0g/Uyjsbop7YII/AAAAAAAAQjk/LdBddIUrVRg/s1600/state_of_accomplishment.png" height="221" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
I completed "&lt;a href="https://class.stanford.edu/courses/Engineering/db/2014_1/about"&gt;Introduction to &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6c8d64a4-a132-40ab-9440-bdf4228785a3" id="0eaecdb3-2e43-4253-96d9-a50119d18a80"&gt;Databeses&lt;/span&gt;&lt;/a&gt;" of Stanford Univeristy with "Distinction", Yeah! This entry explains how this online course looks like.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px; margin: 0px; position: relative;"&gt;
Why &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e1272b27-096c-4bb8-b9ab-160753dd80b1" id="635ad649-6735-4e8e-a5ca-b85f8b76460b"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="da0f9f8c-ca4b-4b39-8206-a8ae1e7b3691" id="137b2368-f6ae-4c57-9f30-d4dc647cf4ab"&gt;did I participated&lt;/span&gt;&lt;/span&gt; in this course?&lt;/h4&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
I was embedded software engineer and seldom use databases. Although, I was transferred&amp;nbsp;to the Business Intelligence company as temporally&amp;nbsp;trainee last October. Then, I often use several relational databases&amp;nbsp;recently. So, I became to think I need to study database again. At that time, I found this course. Studying with &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="43bd02cc-f0ef-4abe-964c-99dbd2c77998" id="8f3cf63e-47da-4d7d-94e8-1f42b6a479a8"&gt;book&lt;/span&gt; alone is a little bit hard, So I took this course.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px; margin: 0px; position: relative;"&gt;
Topics that this course covers&lt;/h4&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
As I expected this course focuses on relational database theory, including SQL or table design, but they also cover non relational database including XML and JSON.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Relational Database&amp;nbsp;Overview&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;XML Data&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;JSON Data&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Relational Algebra&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;SQL&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Relational Design Theory&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Querying XML&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Unified Modeling Language&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Indexes&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Transactions&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Constraints and Triggers&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Views&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Authorization&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Recursion&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Online Analytical Programming&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c66ee2f4-fe5b-46d4-9e43-ae5e722953c4" id="f86f4b4a-426b-4de3-a434-bc50edf6a32e"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c4307c08-61aa-465f-b365-6594c360a9a1" id="b479a1c1-2b81-4671-8d5d-719d57f57be3"&gt;NoSQL&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h4 style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px; margin: 0px; position: relative;"&gt;
How to participate in this course&lt;/h4&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
In this course, every material became&amp;nbsp;public from the beginning. You can start from any topic. Although, deadline of each assignment work is different. So, you should pick a topic that deadline is close first.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
For each topic, you repeat the following procedure:&lt;/div&gt;
&lt;div style="background-color: white;"&gt;
&lt;ul style="margin: 0.5em 0px; padding: 0px 2.5em;"&gt;
&lt;li style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 1.4; margin: 0px 0px 0.25em; padding: 0px;"&gt;Watch some short videos that explain topics&lt;/li&gt;
&lt;li style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 1.4; margin: 0px 0px 0.25em; padding: 0px;"&gt;Answer simple quizes（No score here）&lt;/li&gt;
&lt;li style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 1.4; margin: 0px 0px 0.25em; padding: 0px;"&gt;Try to basic problems&lt;/li&gt;
&lt;ul style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;multi-selection question（low score）&lt;/li&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;&lt;span style="line-height: 1.4;"&gt;Programming work（middle score）&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-family: Trebuchet MS, Trebuchet, Verdana, sans-serif;"&gt;&lt;span style="font-size: 15px; line-height: 21px;"&gt;Try to challenge problems&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"&gt;
&lt;li style="margin: 0px 0px 0.25em; padding: 0px;"&gt;Advanced programming work（high score）&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px; margin: 0px; position: relative;"&gt;
Certification&lt;/h4&gt;
&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
When you answer each question, it is automatically scored. You can see how much percentage of scores you already got. If you solve all basic problems, you get 50 % and can complete the course. If you also try challenge problems and get 75 %, you can get "State of Accomplishment with Distinction".&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;h4 style="margin: 0px; position: relative;"&gt;
Oh, everything is English!&lt;/h4&gt;
&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;
It is really hard point for Japanese people. I actually worked in the office where no one speaks in English but now &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c1909db2-e442-40ad-9840-457482da0050" id="2008a34c-0299-46ef-8a1a-ab7fc71eb398"&gt;my&lt;/span&gt; all coworkers speak in English. So, no problems with this for me now.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
Although, I felt difficulty when a teacher talked really fast about a topic&amp;nbsp;that I was not familiar&amp;nbsp;with. At the time, I had to watch the videos again and again. As a result, I tried to understand by solving some problems. Or sometimes I research some Japanese materials related to the topics.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;h4 style="margin: 0px; position: relative;"&gt;
How hard it was?&lt;/h4&gt;
&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
It depends on your skill and knowledge. It seems that it takes 3 hours&amp;nbsp;every week to complete the course. You need 7 to 8 hours&amp;nbsp;every week to complete with distinction. I sometimes had to study all day on Saturday or Sunday. If you work full time, you cannot take more than one course at the same time.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;h4 style="margin: 0px; position: relative;"&gt;
The important point to take an online course&lt;/h4&gt;
&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
If every material becomes public from the beginning, you should consider your private schedule and make a concrete schedule for the course. You might be struggling&amp;nbsp;with difficult problems, so you should have some time to spare.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
You should not postpone challenge problems even though their deadlines are late because you might forget about details when you are back to the problems :)&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
--&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 15px; line-height: 21.559999465942383px;"&gt;
Have fun with an online course!!&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://3.bp.blogspot.com/-kWoXyLH_e0g/Uyjsbop7YII/AAAAAAAAQjk/LdBddIUrVRg/s72-c/state_of_accomplishment.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>"Fluentd: Open Source Log Management" by Sadayuki Furuhashi, Treasure Data at SF Metric Meetup</title><link>http://legobokueng.blogspot.com/2014/03/fluentd-open-source-log-management-by.html</link><category>Fluentd</category><category>meetup</category><category>OSS</category><category>Treasure Data</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 23 Mar 2014 14:58:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-5189021672656477742</guid><description>&lt;iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="//player.vimeo.com/video/87210603?title=0&amp;amp;byline=0&amp;amp;portrait=0" webkitallowfullscreen="" width="500"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;a href="http://vimeo.com/87210603"&gt;Sadayuki Furuhashi talks about Fluentd: Open Source Log Management&lt;/a&gt; from &lt;a href="http://vimeo.com/librato"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="52ad1cc0-cbce-478f-9c79-8041c4f7ea0e" id="40bbb074-8cc1-4ee8-b6f8-666f3e7069be"&gt;Librato&lt;/span&gt;&lt;/a&gt; on &lt;a href="https://vimeo.com/"&gt;Vimeo&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This is a participation report for the SF Meetup. This &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="d86231da-75cb-429b-885b-557f3c3b9158" id="b8531036-5333-4d1b-8c41-2be88c17723b"&gt;meetup&lt;/span&gt;&amp;nbsp;is probably data analysis for server administration. A log management is really far from my current &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c21923b0-b338-4b4d-a7f4-574bdc0f05ae" id="7feda611-2e18-4401-b81b-7d3ea762e3a8"&gt;job but&lt;/span&gt; I have been interested in &lt;a href="http://fluentd.org/"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c21923b0-b338-4b4d-a7f4-574bdc0f05ae" id="b49ad62e-6b61-4bd5-9873-435cf5c631c0"&gt;fluentd&lt;/span&gt;&lt;/a&gt;&amp;nbsp;since I knew that it is &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c21923b0-b338-4b4d-a7f4-574bdc0f05ae" id="9175782b-a8d5-4370-8d30-001136b71660"&gt;good approach&lt;/span&gt; to make data collection easy. And this is a good chance to hear about it from the founder. So, I participated in this.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
About SF Metric Meetup&lt;/h4&gt;
&lt;blockquote class="tr_bq"&gt;
In the 21st Century successful teams are data-driven. This monthly &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3a17a880-4556-42bd-911c-632378338777" id="e0fc7695-649e-4350-b43e-ae0976b94175"&gt;meetup&lt;/span&gt; provides a forum for monitoring geeks to gather and trade new ideas, data, and war stories. If you love data, this &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2b5c77d3-5153-4e71-9b12-4ae90fee273a" id="c4c37035-8b1f-4906-b0a2-8eaadafb35be"&gt;meetup&lt;/span&gt; is for you! (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="14a07a53-7fa9-44be-92b6-c09fe8185bef" id="507d9327-e56f-4d6b-a18b-de5291a25d62"&gt;cited&lt;/span&gt; from &lt;a href="http://meetup.com/"&gt;meetup.com&lt;/a&gt;)&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h4&gt;
About the speaker&lt;/h4&gt;
Sadayuki Furuhashi is an architect and founder of Treasure Data. He is also a founder of some open source projects including &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6d26873c-0d7b-44ea-8fe3-dd94d1571f81" id="b7c1eaaa-274e-4aa6-b205-9602584e0135"&gt;fluentd&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
About &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="45b7b7e4-035a-45aa-8406-3b206c20d35f" id="a4b45e41-7105-46ad-879d-939d589fe7de"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="45b7b7e4-035a-45aa-8406-3b206c20d35f" id="7f551ebb-0233-4113-aec6-bd9459c2488a"&gt;fluentd&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
Fluentd is extensive log management tool written by Ruby. Nowadays, the major web tech &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ab27d2ea-5ad2-4da2-a7dc-2798d140f14c" id="1ac416d2-cd2a-4634-a206-073c0aba435f"&gt;companes&lt;/span&gt; produce millions of lines of logs every day and their analysis sever operational status with the logs. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="11e6e1dc-7810-4fb5-9c85-897c387343b0" id="222b9c83-cceb-4d57-8a24-8705063552d6"&gt;Fluentd&lt;/span&gt;&amp;nbsp;makes this collection/shape/analysis process easier.&amp;nbsp;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
What they tried to do in this &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="cc845ac0-63f8-4eab-9e1f-e0a7d31bcf5e" id="6165890c-9818-46a2-9022-5fbd5247cb2f"&gt;meetup&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
This time he came to the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="188ad18f-1e66-4dac-8ace-12441b25c4c1" id="3982c733-6326-42c3-bffe-1a687452927b"&gt;meetup&lt;/span&gt;&amp;nbsp;with his coworkers of Treasure Data.&amp;nbsp;I talked&amp;nbsp;with some his coworkers about their business.&amp;nbsp;They are trying to make his open source projects, including Fluentd, MessagePack popular through some &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1b0e8ac6-2946-41cc-9ad2-a8facd440954" id="da289c93-561a-4116-8d2c-02bcf2e30698"&gt;meetups&lt;/span&gt;,&amp;nbsp;before providing charged service. I realized that it is important to have this kind of networking opportunity and talk about own products to potential customers. I keep paying attention to their products and services.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Remote debugging for Tomcat and IntellJ on Max OS X</title><link>http://legobokueng.blogspot.com/2014/03/remote-debugging-for-tomcat-and-intellj.html</link><category>Debug</category><category>IntellJ</category><category>Java</category><category>Tomcat</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 23 Mar 2014 14:26:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-3938484681731658904</guid><description>IntellJ supports remote debugging for Tomcat. It is really convenient&amp;nbsp;for debugging. This entry shows how to adopt remote&amp;nbsp;debugging with Tomcat and IntellJ.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
My dev environment&lt;/h4&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Max OS X 10.9.2&lt;/li&gt;
&lt;li&gt;Java 1.8.0&lt;/li&gt;
&lt;li&gt;Tomcat 8.0.3&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
Set up&lt;/h4&gt;
&lt;div&gt;
Tomcat&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Create a new file called &amp;lt;Tomcat install directory&amp;gt;/bin/&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a39181f3-da20-4abe-8727-b1087673b0be" id="dc8b6fd9-b96b-435b-acfb-11752162b9a9"&gt;setenv&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a39181f3-da20-4abe-8727-b1087673b0be" id="8d6445f0-ed5e-4287-ad72-b9a23cb4e996"&gt;.&lt;/span&gt;sh. (This file will be automatically read by &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="731dc784-8dd1-4d54-90e3-9917a9e0b62d" id="e45ae0ed-a585-4dda-9edb-7f44cf46bff5"&gt;catalina&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="731dc784-8dd1-4d54-90e3-9917a9e0b62d" id="497358f8-2a13-44cd-bd03-3be62e068560"&gt;.&lt;/span&gt;sh)&lt;/li&gt;
&lt;li&gt;Add the following content to &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="62729075-d0cc-4c3f-b47c-835ee67d6292" id="2e4e5cd4-6513-4999-b6ea-857e34e7dc09"&gt;setenv&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="62729075-d0cc-4c3f-b47c-835ee67d6292" id="b06ff6d3-773c-4f78-8ca2-408448a3597d"&gt;.&lt;/span&gt;sh. 8080 is a port number for Tomcat. Please specify for your tomcat.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="s1"&gt;CATALINA_OPTS&lt;/span&gt;&lt;span class="s2"&gt;=&lt;/span&gt;"-&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="57714c92-c62f-4358-9869-b38dd80cea47" id="4f8fe84a-f4ea-4c4c-8ba3-84047d52b1e1"&gt;agentlib&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="57714c92-c62f-4358-9869-b38dd80cea47" id="197a0146-9bc1-4924-ab8e-e6167ed8cf48"&gt;:&lt;/span&gt;jdwp=transport=dt_socket&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="57714c92-c62f-4358-9869-b38dd80cea47" id="639b6093-b1aa-4975-a33f-3cdcde6b5a88"&gt;,&lt;/span&gt;address=8080&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="57714c92-c62f-4358-9869-b38dd80cea47" id="8d52577f-72dc-4ad3-a467-a0455da2cff8"&gt;,&lt;/span&gt;server=y&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="57714c92-c62f-4358-9869-b38dd80cea47" id="7f8c9a68-a5e1-45ac-9c3b-5ada27878b9b"&gt;,&lt;/span&gt;suspend=n"&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Start Tomcat normally using startup&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="43ac1381-a2fd-40ee-9fc5-f5e82daeb5d6" id="6df68c4a-cd2d-454f-b07b-6a52b71033f6"&gt;.&lt;/span&gt;sh.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
IntellJ&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Select "Run -&amp;gt; Edit Configuration" then "Run/Configuration" screen is open.&lt;/li&gt;
&lt;li&gt;Specify "Name" like "Tomcat".&lt;/li&gt;
&lt;li&gt;Specify "Port", which is the same number as Tomcat's port &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1893a829-c1c4-4cca-87a9-8fffb7fd3724" id="e1c43b77-d91e-4cd5-8068-525a834155a0"&gt;numer&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
Debug&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;If you want to start debugging on IntellJ, just select "Run -&amp;gt; debug 'Tomcat'".&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If IntellJ shows a message like below, you are already connected.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Connected to the target VM, address: '&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ba2826f7-ce55-4f3b-8d56-7fcd1c4375d2" id="19ccbd65-9bda-48b4-9e1f-25ac702506fc"&gt;localhost&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ba2826f7-ce55-4f3b-8d56-7fcd1c4375d2" id="8bf7aa93-c197-470a-9807-abd2b731a472"&gt;:&lt;/span&gt;8080', transport: 'socket'&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Now you can debug. Please refer &lt;a href="https://www.jetbrains.com/idea/webhelp/debugging.html"&gt;here&lt;/a&gt; for more detail about debugging by IntellJ.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Apache Lucene: Then and Now, Java User Group meetup at Twitter HQ</title><link>http://legobokueng.blogspot.com/2014/02/apache-lucene-then-and-now-java-user.html</link><category>Cloudera</category><category>Hadoop</category><category>Java</category><category>meetup</category><category>Twitter</category><author>noreply@blogger.com (yohei)</author><pubDate>Tue, 18 Feb 2014 03:08:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-87445926309088073</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfttw0LJjNcsoGyTvp4w7YOXl29KLzwL_vBXPF3iHaKM5zKXBhqYBxTiC_qVXHHfzNiAkK6chfWwveePMC6n5CsfQ7Q43A-ze8TDNFuFX3P34wiHWMnL2qfnIAoXTs1NAM_hsUJBx7GE/s1600/highres_332557642.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfttw0LJjNcsoGyTvp4w7YOXl29KLzwL_vBXPF3iHaKM5zKXBhqYBxTiC_qVXHHfzNiAkK6chfWwveePMC6n5CsfQ7Q43A-ze8TDNFuFX3P34wiHWMnL2qfnIAoXTs1NAM_hsUJBx7GE/s1600/highres_332557642.jpeg" height="211" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe width="560" height="315" src="//www.youtube.com/embed/5444z-L2V2A" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.meetup.com/sfjava/events/159274122/" target="_blank"&gt;Meetup.com - Apache Lucene: Then and Now&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This time, Doug Cutting (&lt;a href="https://twitter.com/cutting"&gt;@cutting&lt;/a&gt;) talked about the history of Apache Lucene and how Apache Lucene is used for the implementation of Internet search engines and local, single-site searching in major tech companies like Linkedin or Twitter. He also mentioned this project  is integrated with Hadoop and still evolving.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
Doug Cutting (&lt;a href="https://twitter.com/cutting"&gt;@cutting&lt;/a&gt;) is the founder of numerous successful open source projects, including Lucene, Nutch, Avro, and Hadoop. Doug joined Cloudera in 2009 from Yahoo!, where he was a key member of the team that built and deployed a production Hadoop storage and analysis cluster for mission-critical business analytics. Doug holds a Bachelor’s degree from Stanford University and sits on the Board of the Apache Software Foundation. (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7e01bb55-5089-48c8-a7f5-182337b4e668" id="2b54dd90-be53-4bb3-bf7a-98ea7a4602b9"&gt;cited&lt;/span&gt; from &lt;a href="http://www.meetup.com/sfjava/events/159274122/"&gt;Meetup.com&lt;/a&gt;)&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
His talk is based on the following blog entries.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.cloudera.com/blog/2013/06/cloudera-search-the-newest-hadoop-framework-for-cdh-users-and-developers/"&gt;Cloudera Search: The Newest Hadoop Framework for CDH Users and Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.cloudera.com/blog/2013/07/the-blur-project-marrying-hadoop-with-lucene/"&gt;The Blur Project: Marrying Hadoop with Lucene&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
As you see, his roles in his company (Cloudara) is the implementation of the new open source project, Blur.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;a href="http://incubator.apache.org/blur/"&gt;Blur&lt;/a&gt; is an Apache Incubator project that provides distributed search functionality on top of Apache Hadoop, Apache Lucene, Apache ZooKeeper, and Apache Thrift. When I started building Blur three years ago, there wasn’t a search solution that had a solid integration with the Hadoop ecosystem. Our initial needs were to be able to index our data using MapReduce, store indexes in HDFS, and serve those indexes from clusters of commodity servers while remaining fault tolerant. Blur was built specifically for Hadoop — taking scalability, redundancy, and performance into consideration from the very start — while leveraging all the great features that already exist in the Hadoop stack. (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7fa3acc9-26ef-40ff-a492-cb62fbfafc86" id="0c91df45-1c57-42f9-970b-f7eaa81903ef"&gt;cited&lt;/span&gt; from &lt;a href="http://blog.cloudera.com/blog/2013/07/the-blur-project-marrying-hadoop-with-lucene/"&gt;blog.cloudera.com&lt;/a&gt;)&lt;/blockquote&gt;
And Cloudera is providing a better way for non-programming users interact with Hadoop data.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
In the context of our platform, &lt;a href="http://www.cloudera.com/content/cloudera/en/products/cdh.html"&gt;CDH&lt;/a&gt; (Cloudera’s Distribution including Apache Hadoop), Cloudera Search is another framework much like MapReduce and &lt;a href="http://www.cloudera.com/content/cloudera/en/products/cdh/impala.html"&gt;Cloudera Impala&lt;/a&gt;. It’s another way for users to interact with Hadoop data and for developers to build Hadoop applications. Each framework in our platform is designed to cater to different families of applications and users (&lt;a href="http://blog.cloudera.com/blog/2013/06/cloudera-search-the-newest-hadoop-framework-for-cdh-users-and-developers/"&gt;cited from blog.cloudera.com&lt;/a&gt;)&lt;/blockquote&gt;
&amp;nbsp;See Cloudera blog for more details.&lt;br /&gt;
&lt;br /&gt;
It seems that there are &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c27d6c8a-1b0b-493e-b49b-a1978a80cab7" id="8ef7fd73-00c9-43f8-acda-de0621f38efd"&gt;meetup&lt;/span&gt;&amp;nbsp;of &lt;a href="http://www.meetup.com/sfjava/"&gt;Java user group in SF&lt;/a&gt; once or twice a month. I am planning to continue joining &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="44a86b50-175f-410b-be4b-a72c9dd0def5" id="fdd92fd1-1f6b-42a8-9257-63cc7e028af3"&gt;meetup&lt;/span&gt;.</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfttw0LJjNcsoGyTvp4w7YOXl29KLzwL_vBXPF3iHaKM5zKXBhqYBxTiC_qVXHHfzNiAkK6chfWwveePMC6n5CsfQ7Q43A-ze8TDNFuFX3P34wiHWMnL2qfnIAoXTs1NAM_hsUJBx7GE/s72-c/highres_332557642.jpeg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>JSON Lint - validation tool for JSON</title><link>http://legobokueng.blogspot.com/2014/01/json-lint-validation-tool-for-json.html</link><category>JSON</category><category>tool</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 19 Jan 2014 11:13:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-368300367122415187</guid><description>There are several validation tools for JSON. These tools help you to write and test JSON data or schema.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://jsonlint.com/" target="_blank"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f64b3f27-3a4f-4a3e-9b8f-9f5c7ad810eb" id="38cd3f0e-4d49-4d1b-a7ae-c8df26290a34"&gt;JSONLint&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This tool validates that JSON data is valid or not.&lt;/li&gt;
&lt;li&gt;It does not deal with JSON schema.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;a href="http://jsonschemalint.com/" target="_blank"&gt;JSON Schema Lint&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This tool validates&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;JSON schema is valid&lt;/li&gt;
&lt;li&gt;JSON data is valid&lt;/li&gt;
&lt;li&gt;JSON data is valid against &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="4c68682a-18d3-482b-8e95-491d19a677ae" id="df84ea36-93c4-4c31-af06-9317052edf04"&gt;JSON schema&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>INSERT VS COPY: The fastest way to do a bulk insert into PostgreSQL</title><link>http://legobokueng.blogspot.com/2014/01/insert-vs-copy-fastest-way-to-do-bulk.html</link><category>database</category><category>PostgreSQL</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 12 Jan 2014 04:43:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-8072053507666438824</guid><description>It takes time to populate lots of data in database by many "INSERT" statements. The official PostgreSQL documentation mentions the topic.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.postgresql.org/docs/current/interactive/populate.html" target="_blank"&gt;PostgreSQL 9.3.2 Documentation Chapter 14. Performance Tips&amp;nbsp;14.4. Populating a Database&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The chapter shows many options, but I am paying attention to first two.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Disable autocommit&lt;/h4&gt;
&lt;br /&gt;
PostgreSQL commits each statement automatically. That means if you run an INSERT statement, it runs like this for each statement:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Open a transaction&lt;/li&gt;
&lt;li&gt;Insert data&lt;/li&gt;
&lt;li&gt;Close the transaction&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
It is redundant. In this case, it becomes faster if you use autocommit&amp;nbsp;like this:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
BEGIN; -- the beginning of the transaction&lt;br /&gt;INSERT xxxx&lt;br /&gt;INSERT xxxx&lt;br /&gt;END; &amp;nbsp; &amp;nbsp;-- the end of the transaction&lt;/blockquote&gt;
&lt;br /&gt;
PostgreSQL does not commit the statements between BEGIN and END.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
COPY&lt;/h4&gt;
&lt;br /&gt;
COPY is also to use populate data, but the different point is that COPY does not offer autocommit. It means that PostgreSQL commit after all data is populated&amp;nbsp;on a database.&lt;br /&gt;
Please refer to &lt;a href="http://www.postgresql.org/docs/current/interactive/sql-copy.html" target="_blank"&gt;the document &lt;/a&gt;about how to use COPY statement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Auto increment primary key in PostgreSQL</title><link>http://legobokueng.blogspot.com/2014/01/auto-increment-primary-key-in-postgresql.html</link><category>database</category><category>PostgreSQL</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 12 Jan 2014 04:20:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-8357444430282816762</guid><description>If you want to increment primary key automatically in Postgres,&amp;nbsp;"serial" is a good option.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.postgresql.org/docs/9.3/static/datatype-numeric.html#DATATYPE-SERIAL" target="_blank"&gt;PostgreSQL 9.3.2 Documentation&amp;nbsp;Chapter 8. Data Types&amp;nbsp;8.1.4. Serial Types&amp;nbsp;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/7718585/set-auto-increment-primary-key-in-postgresql" target="_blank"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="673bee7e-dfb7-4d26-b3a5-bd8c93f53429" id="8a9d9910-80f6-4612-a890-3cad6c6abe97"&gt;Stackoverflow&lt;/span&gt; - Set auto increment primary key in Postgresql&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Please that you do not need to specify a primary key to insert data to your database.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to fix an error "Unable to find a $JAVA_HOME at “/usr”, continuing with system-provided Java"</title><link>http://legobokueng.blogspot.com/2013/12/how-to-fix-error-unable-to-find.html</link><category>Java</category><category>Troubleshooting</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 15 Dec 2013 12:05:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-8673673995064542917</guid><description>Somehow, I have got this error whenever I run Java command:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$java -version&lt;br /&gt;Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...&lt;br /&gt;java version "1.7.0_25"&lt;br /&gt;Java(TM) SE Runtime Environment (build 1.7.0_25-b15)&lt;br /&gt;Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)&lt;/blockquote&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
I found the same error as my case at&amp;nbsp;the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7003d8b7-e6ba-442b-8256-3c03013be1f8" id="834651ed-0967-4383-aff4-ff0e6386dd73"&gt;stackoverflow&lt;/span&gt;.&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://stackoverflow.com/questions/15673709/unable-to-find-a-java-home-at-usr-continuing-with-system-provided-java" target="_blank"&gt;Unable to find a $JAVA_HOME at “/usr”, continuing with system-provided Java&lt;/a&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This happens when $JAVA_HOME is not set correctly. In my case, the following works &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="017c45ad-036f-492b-80cb-a6429cc48c57" id="993439a3-282f-43d3-ace5-ee686593b37f"&gt;form&lt;/span&gt; me.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
export JAVA_HOME="$(/usr/libexec/java_home)"&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My environment is as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;OS X 10.9&lt;/li&gt;
&lt;li&gt;Java 1.7.0_25 (installed by brew)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Install R with homebrew under Montain Lion (Mac OS X 10.8.X)</title><link>http://legobokueng.blogspot.com/2013/09/install-r-with-homebrew-under-montain.html</link><category>homebrew</category><category>Mac</category><category>R</category><author>noreply@blogger.com (yohei)</author><pubDate>Thu, 12 Sep 2013 21:19:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-7753294645250311068</guid><description>&lt;div&gt;
You need to install &lt;span class="GINGER_SOFATWARE_noSuggestion GINGER_SOFATWARE_correct" ginger_sofatware_markguid="97db9773-9ba4-4ba5-b310-b51a6ef9e408" ginger_sofatware_uiphraseguid="439b1f56-1f21-4252-82be-b0477e959357" grcontextid="gfortran:0"&gt;gfortran&lt;/span&gt;&amp;nbsp;before R.&amp;nbsp;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
$ brew &lt;span class="GINGER_SOFATWARE_correct" ginger_sofatware_markguid="8c018856-7c88-42f9-994a-52e59747e1b6" ginger_sofatware_uiphraseguid="c90c462a-488e-4d21-9712-88f050c507b1" grcontextid="install:0"&gt;install&lt;/span&gt; &lt;span class="GINGER_SOFATWARE_noSuggestion GINGER_SOFATWARE_correct" ginger_sofatware_markguid="b770b4d7-fba8-4170-abe8-9130eb70b008" ginger_sofatware_uiphraseguid="c90c462a-488e-4d21-9712-88f050c507b1" grcontextid="gfortran:1"&gt;gfortran&lt;/span&gt;&lt;/blockquote&gt;
You might find that you don't have XQuartx. Please download and install it at&amp;nbsp;&lt;a href="https://xquartz.macosforge.org/"&gt;https://xquartz.macosforge.org&lt;/a&gt;.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ brew &lt;span class="GINGER_SOFATWARE_correct" ginger_sofatware_markguid="58c20617-ee80-4af3-895d-19f4a3750dbf" ginger_sofatware_uiphraseguid="c7f5f7d3-eb79-47d6-9784-874aa77438d8" grcontextid="install:0"&gt;install&lt;/span&gt; R&lt;br /&gt;Unsatisfied dependency: XQuartz&lt;br /&gt;Homebrew does not package XQuartz. Installers may be found at:&lt;br /&gt;https://xquartz.macosforge.org&lt;br /&gt;Error: An unsatisfied requirement failed this build.&lt;/blockquote&gt;
&lt;div&gt;
After you install XQuartz, you can install R like this:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
$ brew&amp;nbsp;&lt;span class="GINGER_SOFATWARE_correct" ginger_sofatware_markguid="bda33966-56a6-46b1-a2bf-4074659b7add" ginger_sofatware_uiphraseguid="f4e85335-a131-435a-b303-1866eb0958e6" grcontextid="install:0"&gt;install&lt;/span&gt;&amp;nbsp;R&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Ant 1.8 "warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds"</title><link>http://legobokueng.blogspot.com/2013/09/ant-18-warning-includeantruntime-was.html</link><category>Ant</category><category>Java</category><author>noreply@blogger.com (yohei)</author><pubDate>Sat, 7 Sep 2013 18:29:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-5631223953638561356</guid><description>I installed Ant 1.8 and build Java applications with Ant. Then, I found the following message:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span class="GINGER_SOFATWARE_correct" ginger_sofatware_markguid="a1f83a89-6cb2-4c30-bb65-394a547ba931" ginger_sofatware_uiphraseguid="41783934-ef3d-4747-a3f7-c05a4e2bec5a" grcontextid="warning:0"&gt;warning&lt;/span&gt;: '&lt;span class="GINGER_SOFATWARE_noSuggestion GINGER_SOFATWARE_correct" ginger_sofatware_markguid="3e2a74e3-a0f6-466d-bc46-da6078762823" ginger_sofatware_uiphraseguid="41783934-ef3d-4747-a3f7-c05a4e2bec5a" grcontextid="includeantruntime:1"&gt;includeantruntime&lt;/span&gt;' was not set, defaulting to build&lt;span class="GINGER_SOFATWARE_correct" ginger_sofatware_markguid="a9f4766f-5503-4113-a155-514b71b7c021" ginger_sofatware_uiphraseguid="41783934-ef3d-4747-a3f7-c05a4e2bec5a" grcontextid=".:2"&gt;.&lt;/span&gt;sysclasspath=last; set to false for repeatable builds&lt;/blockquote&gt;
You can find a good explanation of this warning with following link:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html"&gt;http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There were incompatible&amp;nbsp;change on Ant version 1.8. So, you may find the same message if you build &lt;span class="GINGER_SOFATWARE_correct" ginger_sofatware_markguid="8c20c6ae-6eea-4f68-abf4-4f9b7bb7c4ef" ginger_sofatware_uiphraseguid="1651376b-ad73-4387-a888-aee1d83e63ef" grcontextid="old ant file:0"&gt;old ant file&lt;/span&gt; with Ant 1.8.&lt;br /&gt;
&lt;br /&gt;
Please just add includeantruntime="false" to &lt;span class="GINGER_SOFATWARE_noSuggestion GINGER_SOFATWARE_correct" ginger_sofatware_markguid="74c91b1e-e1a2-4898-948f-5681f13b0892" ginger_sofatware_uiphraseguid="d18fd058-b2ba-4e8e-b698-fae96a723ba9" grcontextid="javac:0"&gt;javac&lt;/span&gt; task.&lt;span style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How I did interpretration for TDD workshop by James Grenning at #agilejapan   </title><link>http://legobokueng.blogspot.com/2013/06/how-i-did-interpretration-for-tdd.html</link><category>agile</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 2 Jun 2013 21:52:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-9007990578813138514</guid><description>I did interpretation for TDD workshop by James Grenning, the author of "&lt;a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c" target="_blank"&gt;Test Driven Development for Embedded C&lt;/a&gt;" at Agile Japan 2013 on May 24th. This was first time for me to be interpreter at a conference.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="356" marginheight="0" marginwidth="0" mozallowfullscreen="" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/21929867" style="border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;" webkitallowfullscreen="" width="427"&gt; &lt;/iframe&gt; &lt;br /&gt;
&lt;div style="margin-bottom: 5px;"&gt;
&lt;strong&gt; &lt;a href="http://www.slideshare.net/legoboku/testdriven-development-for-embedded-c-by-james-grenning-at-agile-japan-2013" target="_blank" title="Test-Driven Development for [Embedded] C by James Grenning at Agile Japan 2013"&gt;Test-Driven Development for [Embedded] C by James Grenning at Agile Japan 2013&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="http://www.slideshare.net/legoboku" target="_blank"&gt;Yohei Onishi&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
This time was good lesson for me. I summarized my experience so that this entry also become good lesson for some other people.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Why did I become one of interpreters for the workshop?&lt;/h2&gt;
&lt;div&gt;
Let me tell you about history that I became interpreter fot the workshop.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I am an organizer of study group for "Test Driven Development for Embedded C" in Tokyo, Japan and I also was a reviewer for Japanese translation of the book. When translation was going to an end, I proposed to Akiyuki Takoshima, a supervisor for translation, that we invited James to Japan for publication party for translation. We thought Agile Japan was the best for it because it was planed to held after publication and organizers of Agile Japan usually invite keynote speaker from foreign country, mostly US.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
I expected that it would be difficult negotiation but the answer from Kenji Hiranabe, one of organizers, was very good. He said "Oh, that's nice idea. I have wanted to invite him to discuss about importance of quality in agile software development". Then Agile Japan organizer started negotiation and I and Akiyuki started preparetion for TDD workshop.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Basics of technical interpretation&lt;/h2&gt;
&lt;div&gt;
Next, I want to tell you about technical interpretation.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You may think interpretation is just word exchange of different languages. I think real interpretation is more than that. In my opinion, we do interpretation as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style="color: #cccccc;"&gt;Maybe this is almost same as what non-native English speaker do when they talk in English...&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Understand what speaker said&lt;/li&gt;
&lt;li&gt;Understand its intention and digest result of step 1&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If we don't understand its intention, we have to ask speaker&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Just exchange result of step 2 from original language to target language&lt;/li&gt;
&lt;li&gt;Change result of step 3 in natural and simplified expression and talk to other people&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;We do step 3 and step 4 at a time&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
I think you think that step 3, automatic language exchange, is interpretation but I have to do more because we want to avoid loosing original speaker's intention and to tell it people in an easy-to-understand way.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To do this, we need both language skill and specialized knowledge for target area because we have different terminology each area. If we don't care about that, attendee don't understand what speaker say.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For example, in the case of translation, we often found that reviewers on amazon.co.jp write comment for translation of technical book that quality of translation is very bad.This is because there are problems on either step above.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Problem on step 1: translator don't understand original text&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Problem on step 2: translator don't have enough knowledge for target area&lt;/li&gt;
&lt;li&gt;Problem on step 3:&amp;nbsp;translator don't improve quality of translation&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Then what do interpreter do during workshop?&lt;/h2&gt;
&lt;div&gt;
It depends on workshop. I basically think that interpreter there are two tasks.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Tell trainer's explanation to attendee&lt;/li&gt;
&lt;li&gt;Help question and answer&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
No big deal. That's it.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Tell trainer's explanation to attendee&lt;/h3&gt;
&lt;div&gt;
For this, interpreter see trainer carefully and waits good time to interpret. Then good time come, interpreter tells it to attendee. Trainer sometimes tell us about timing for interpretation but he/she usually want to focus on what he/she say and attendee's reaction . So interpreter should &amp;nbsp; &amp;nbsp; manipulate timing.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Help question and answer&lt;/h3&gt;
&lt;div&gt;
For this, it is easy. We just hear question from attendee, check its intention and tell it to trainer. When trainer answer then we do opposite.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
What do interpreter should prepare?&amp;nbsp;&lt;/h2&gt;
&lt;h3&gt;
(1) acquisition of specialized knowledge for target area&lt;/h3&gt;
&lt;div&gt;
As I wrote above, we need specialized knowledge for target area to interpret. we have to read whole workshop material. We also should read trainer's blog, interview article or movie to understand content of workshop, trainer's way of speaking/pronunciation.. If we do, we can understand what trainer say easily.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
(2) Practice of interpretation&lt;/h3&gt;
&lt;div&gt;
I think shadowing is easy and best for practice of interpretation. There are good books for interpretation. If you are interesting in practice, please refer the books.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Retrospective for this time&lt;/h2&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;br /&gt;Keep（Good point, what I want to continue）&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;(1) I had enought time to aquire specialized knowledge for target area&lt;/div&gt;
&lt;div&gt;
Before workshop, I held study group, wrote interview article, reviewed translation of the book and &amp;nbsp; translated workshop material. I knew everything. No worries about that :)&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
(2) I had meeting with trainer twice before workshop&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
I had meeting with trainer 1 week before and 2 hour before workshop. I could solve our question such as timing for Q&amp;amp;A, laptop for demo, etc.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
(3) I could do interpretation without any eye contact&lt;/h4&gt;
&lt;div&gt;
In this time, interpreter manipluated timing for interpretation so that trainer can focus on what he/she say. We sometimes made mistakes but we did good job in general.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Problem&lt;/h3&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;br /&gt;(1) We translated workshop material then trainer couldn't read it&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
In this time, we are not professional interpreter. So we thought we should show Japanese translation of workshop material so that attendees can understand it easily. But trainer couldn't read it and sometimes didn't know what to speak next. This is not big problem because he had original version of material and we can tell. But this was not good for trainer's&amp;nbsp;&lt;span style="background-color: white; font-family: Arial, 'Arial New', 'ＭＳ Ｐ ゴシック', sans-serif; font-size: 13px;"&gt;cognitive load.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
(2) We couldn't interpret jokes&lt;/h4&gt;
&lt;div&gt;
Trainer often said jokes because he want attendees to be relaxed. But joke is difficult to interpret. Sorry James :(&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Try（What to improve）&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;h3&gt;
(1) Keep original text on material and add Japanese subtitle&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
This is good for both of trainer and attendee. Kenji Hiranabe, interpreter of keynote, did this.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
(2) Interpret jokes&lt;/h4&gt;
&lt;div&gt;
We need sens of humor? ummm :(&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
In the End&lt;/h2&gt;
Thank you Agile Japan organizer for giving me a chance to interpret. It was very good lesson for both of TDD and interpretation. This chance must improve my interpretation skill. It was good experience for my life :)&lt;br /&gt;
&lt;br /&gt;
Thank you Akiyuki-san, supervisor for translation. We did translation of material and interpretation at workshop. He gave me lots of advice. I could do it because he helped me.&lt;br /&gt;
&lt;br /&gt;
Thanks you James. My interpretation was not like professional interpreter. James helped me : ) I have to say thank him for his open mind for my proposal. &lt;br /&gt;
&lt;br /&gt;
If I will have next chance for interpretation, I will do better. I have confidence now :)</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Want an opportunity for programming education? Join the global day of coderetreat!</title><link>http://legobokueng.blogspot.com/2012/12/want-opportunity-for-programming.html</link><category>Event</category><category>Programming</category><category>RSpec</category><category>Ruby</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Thu, 13 Dec 2012 23:45:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-4649327737083860277</guid><description>I join the "&lt;a href="http://globalday.coderetreat.org/" target="_blank"&gt;Global Day of Coderetreat 2012&lt;/a&gt;" on December 9th 2012. I also joined one in 2011. So, this was the second time for me to join it :)&amp;nbsp;In this entry, I explain followings to you:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;What is Coderetreat?&lt;/li&gt;
&lt;li&gt;What is the Global Day of Coderetreat?&lt;/li&gt;
&lt;li&gt;How to maximize your educational effectiveness&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
What is Coderetreat?&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Coderetreat is a retreat for programmers. Most programmers need retreat because they always have to work for next delivery and they don't have enough time to learn basic skills such as programming and testing. The purpose of this event is to give them an&amp;nbsp;opportunity to learn basic skills in a place where there is not delivery date.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Characteristics of coderetreat are follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;We make program for&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank"&gt;Conway's game of life&lt;/a&gt;. It is a kind of simulation or artificial life as follows.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIpt-R3vIhWLUEkEjwoJ0StxndlkCyDcdc8OioBA5PecSFu63fUDmjJF0pj5QqnjgZPi_xTiv8s0XDlrvycnoevm9NqtycN4wvvvlE_WB6hMM6PxShG7VgCeBuVGps0Jm7uWBa-7xhY9Q/s1600/Gospers_glider_gun.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIpt-R3vIhWLUEkEjwoJ0StxndlkCyDcdc8OioBA5PecSFu63fUDmjJF0pj5QqnjgZPi_xTiv8s0XDlrvycnoevm9NqtycN4wvvvlE_WB6hMM6PxShG7VgCeBuVGps0Jm7uWBa-7xhY9Q/s1600/Gospers_glider_gun.gif" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;A single Gosper's Glider Gun creating "gliders"&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;You have 6 pair programming sessions. Each session includes 45 minutes pair programming and 15 minutes retrospective. You change your partner each session.&lt;/li&gt;
&lt;li&gt;You have to delete your code at the end of session. You write code from the scratch every time. This gives you a chance to try different way of design. Actually you have to think design of code differently because facilitator gives you design constraints each session.&lt;/li&gt;
&lt;li&gt;You get a chance to learn object-oriented design, pair programming and TDD. Facilitator or other participants teach you by hands-on if you need it.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;You can have good chance to learn new languages because your partner may know only languages that you are not&amp;nbsp;familiar&amp;nbsp;with. You may use it for the first time but you will make program with your partner's help. Actually I tried Ruby, Java, Scala and JavaScript despite I usually use C/C++ in my work.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Free lunch and sweets are provided by&amp;nbsp;sponsors. Yeah! Here are sweets at Tokyo site.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLTsYfRxXtfb0JZVh6gOuve6J-MJc43nuvOpzoB_moi8A4bKs1qmJUzi_zbBqAqEpPtjw1W1ywJXj3LsSQ3qUpKJvP4qz9TR2_c72wQOXhpQEkrC-z3b2Z8t_BHKr5OWQ45mXKLVbg04/s1600/cake.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLTsYfRxXtfb0JZVh6gOuve6J-MJc43nuvOpzoB_moi8A4bKs1qmJUzi_zbBqAqEpPtjw1W1ywJXj3LsSQ3qUpKJvP4qz9TR2_c72wQOXhpQEkrC-z3b2Z8t_BHKr5OWQ45mXKLVbg04/s320/cake.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
What is the Global Day of Coderetreat?&lt;/h2&gt;
This time was not just a "Coderetreat" but the "Global Day of Coderetreat" because it held in many countries. You can see &lt;a href="http://coderetreat.org/events/event/search?q=Global+Day+of+Code+Retreat+2012" target="_blank"&gt;city list&lt;/a&gt; on the official site. 56 cities? I am not sure how many countries hold but it was global event !&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We connected to India last year. We chat what was going on both site. I was very excited that we were doing same activity with global scale!&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
How to maximize your educational effectiveness&lt;/h2&gt;
&lt;div&gt;
You spend whole day for this event. You should make this event&amp;nbsp;meaningful.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But how to do it? I think that it is better to try different way, learn from everyone and broaden your eyes.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here are my activity list for this time.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
1. Use different language and testing framework from usual one.&lt;/h3&gt;
&lt;div&gt;
I am embedded software engineer and I usually write C/C++ code. I sometimes write Visual Basic or Python code. I don't have&amp;nbsp;opportunities to use other languages in my work but I am interested in other languages.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For C/C++ programmer, sometimes other&amp;nbsp;languages&amp;nbsp;and frameworks&amp;nbsp;have good features and concepts. Learning new language cultivate your programming style. But it is little bit difficult for us to start learning by ourself because we don't know where we go at first.&amp;nbsp;So ask your partner about language is better way to learn.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In my case, I had fun with Ruby and RSpec, testing framework for Ruby. You can write code with your  intuition without deep understanding of language specification. That's really comfortable for&amp;nbsp;beginners. And you can struct your test code by elements such as "description" and "context". Your test code will be easy to read.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Features of Ruby and RSpec are quite new to me and quite different from C/C++ world. You can't everything of other languages but you may be able to bring essence into your work. Your work will change.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
2. Design your code with different way as usual&lt;/h3&gt;
&lt;div&gt;
The purpose of this event is to give participants new experience. We should try little bit different way.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For example, if you don't do modeling or object-oriented design during your work, you might design your code with array. But I recommend you to try object-oriented design. You might think:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;What kind of object do we need?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;What responsibilities does each object have?&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Thinking about these questions make your design better.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In my case, we tried different one. I used map and filter to overcome several constraints such as no if statements and no loop. With this idea, I could write shorter and smart code.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
3. Try technical practice in ideal situation&lt;/h3&gt;
&lt;div&gt;
Coderetreat is not real job. Even if you don't complete, no one gets angry. You can try any practice as you want.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For example, if you know TDD but you have never tried it, then try it in coderetreat. You will discover how it works.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I tried double test loop that is introduced in "&lt;a href="http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627" target="_blank"&gt;Growing Object-Oriented Software, Guided by Tests&lt;/a&gt;". In this practice, we write end-to-end acceptance test first and write code for inside module with TDD to pass acceptance test.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I often see that many participants tend to focus on detail of components and end up with perfect components and incompletion of whole game. If you do this in your work, your project will collapse.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you write acceptance test for one scenario and write code with TDD to pass acceptance test, you get a system that works for certain&amp;nbsp;scenario&amp;nbsp;early. There is another benefit. You found considering points for architecture design early. You can avoid some risks in your project.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
4. Share what your were interested in during retrospective&lt;/h3&gt;
&lt;div&gt;
At the end of each session, every pair do retrospective, wrote own thought about session on stickies and put them on the board to share your experience.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Facilitators usually pick up topics to share but you can ask them to share your topics. You will receive many feedback from other participants.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaXfHhWXX4UqpjNGHM393Hhac9Xsz6kBtFpu81RdZvYCHij6pVSe-g03xNPQygnRX58VzgbONDOruCFK4hVQl27z8sPdfPwnZBr0mUWDok-Hbzu0SJw41sxdL06dgY0OI4wU1sCB66htw/s1600/retrospective.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaXfHhWXX4UqpjNGHM393Hhac9Xsz6kBtFpu81RdZvYCHij6pVSe-g03xNPQygnRX58VzgbONDOruCFK4hVQl27z8sPdfPwnZBr0mUWDok-Hbzu0SJw41sxdL06dgY0OI4wU1sCB66htw/s320/retrospective.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
5. Communicate with&amp;nbsp;participants&amp;nbsp;in other countries&lt;/h3&gt;
&lt;div&gt;
At this time, we have two tags for twitter. "#gdcr12" for global and "#gdcr12ja" for Japan. I tweeted for "#gdcr12" then @jbrains from Canada respond me quickly! It was really quicker response than I expected! It was very helpful.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7b1ASk6eCyv2r0DypPZMz_8U5RQz2xbjgcXnxlx4opqR_d85tqfRDOVqyGVniFWWV7j-1-AzMQp7401kvgFudyf02Og9xpFgI6-0DrHICLnP5BDOJaE6FLCpw2SoLtLenh8E2bCaPqj0/s1600/tweet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7b1ASk6eCyv2r0DypPZMz_8U5RQz2xbjgcXnxlx4opqR_d85tqfRDOVqyGVniFWWV7j-1-AzMQp7401kvgFudyf02Og9xpFgI6-0DrHICLnP5BDOJaE6FLCpw2SoLtLenh8E2bCaPqj0/s320/tweet.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Thanks to @jbrains and @haradakiro, I found the video that introduce "Verbs instead of Nouns". Byt there isn't much information about that :( I don't understand what happens with that activity yet.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
&lt;div&gt;
In this entry, I introduced coderetreat and how to maximize&amp;nbsp;your educational effectiveness. This event is well structured and worth to join. If you want to get an&amp;nbsp;opportunity&amp;nbsp;to learn basic skills of programming and testing, this is good way for you:) Please join next time!&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIpt-R3vIhWLUEkEjwoJ0StxndlkCyDcdc8OioBA5PecSFu63fUDmjJF0pj5QqnjgZPi_xTiv8s0XDlrvycnoevm9NqtycN4wvvvlE_WB6hMM6PxShG7VgCeBuVGps0Jm7uWBa-7xhY9Q/s72-c/Gospers_glider_gun.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Book review: Test Driven Development for Embedded C</title><link>http://legobokueng.blogspot.com/2012/10/book-review-test-driven-development-for.html</link><category>embedded</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Mon, 8 Oct 2012 18:06:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-1270251300963536669</guid><description>I wrote &lt;a href="https://www.ogis-ri.co.jp/otc/hiroba/OoBook/tdd4ec/index.html"&gt;Japanese article&lt;/a&gt; to introduce “&lt;a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c"&gt;Test Driven Development for Embedded C&lt;/a&gt;” for embedded software developers in Japan last month. This entry is English version of it.&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
As you can see with the title, this is the book about Test Driven Development for embedded software with C language. The author, &lt;a href="http://www.renaissancesoftware.net/blog/"&gt;James Grenning&lt;/a&gt;, is training, coaching and consulting agile software development or TDD over the world. He is also the inventor of agile estimation technique “planning poker” and one of the authors of &lt;a href="http://agilemanifesto.org/"&gt;agile manifesto&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h2&gt;
Must read book for embedded software developer&lt;/h2&gt;
&lt;br /&gt;
Recently Japanese TDD passionates like &lt;a href="https://twitter.com/t_wada"&gt;@t_wada&lt;/a&gt; are holding &lt;a href="http://devtesting.jp/tddbc/"&gt;TDD boot camp&lt;/a&gt; in major cities of Japan. This is an event for TDD beginners to have an exercise of TDD. People get together at one place, make pair for exercise and do TDD with specific problems.&lt;br /&gt;
&lt;br /&gt;
Thanks to them, we can have more chance to exercise TDD and people are becoming to discuss practical topic about TDD on their blog or social media. TDD is not majority in the industry yet but I am feeling TDD is becoming common technique for us.&lt;br /&gt;
&lt;br /&gt;
On the other hand, most of embedded software are left out of boom of TDD boot camp. They think that they have nothing is to do with TDD because every article on book or blog is written about enterprise or web system. They are things on other planets.&lt;br /&gt;
&lt;br /&gt;
This is a book for you, embedded software developers :) This book deals with typical example of embedded software and C/C++ testing framework and explain how to do TDD with very tiny step of carefully. It also can be good textbook for module design of C code.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Why embedded software developer need TDD?&lt;/h2&gt;
&lt;br /&gt;
Embedded software developer might think why they need TDD. The author answer the question in the chapter 5 “Embedded TDD Strategy” of the book. He explain the we can solve “the target hardware bottleneck” problem, which is common for embedded software development. &lt;br /&gt;
&lt;br /&gt;
The target hardware bottleneck is a problem that target hardware could be a bottleneck disturbs software testing. Generically, target hardware is different from host computer that is used to develop software. And we can have these situation:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The problems leads to delay or increasing of working hour for software testing&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Target hardware are not ready till the end of project&lt;/li&gt;
&lt;li&gt;Target hardware is expensive and we can’t prepare enough number of target hardware&amp;nbsp;&lt;/li&gt;
&lt;li&gt;It takes long time to build and upload software to target hardware&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;The problems leads to difficulties to find bugs&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;It is difficult to identify where bugs are because the target hardware also have bugs in the beginning&lt;/li&gt;
&lt;li&gt;Compiler for target hardware is different from one for host computer. Then we find unintentional behavior of software on the target hardware&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
To solve the target hardware bottleneck problem, the author recommend these approaches:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Ensure quality of software by TDD on host computer before testing on the target hardware&lt;/li&gt;
&lt;li&gt;Do same tests on both of host computer and target hardware to find bug that are happend because of different between them.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
And the author recommends TDD cycle for embedded software development as follows: &lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjY2w7PJEIvy4w5ADy6Yj1l-XvuF7BNHIudqi2aGtaG2ob-4sQATbmv5uRNaWlSgXUWAy1n6jn2KHRfbJGgLL6qYz0-MUyoPHPUeD51T9HZ_0Wz3HvbRaT-siIoZkF7ImUuND7b3wYJqY/s1600/micro_cycle.png"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjY2w7PJEIvy4w5ADy6Yj1l-XvuF7BNHIudqi2aGtaG2ob-4sQATbmv5uRNaWlSgXUWAy1n6jn2KHRfbJGgLL6qYz0-MUyoPHPUeD51T9HZ_0Wz3HvbRaT-siIoZkF7ImUuND7b3wYJqY/s320/micro_cycle.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The book focuses on the stage 1 on the cycle.  It doesn’t explain stage 2 to 5 in detail but you can find more information about step 5 on the author’s paper (PDF) “&lt;a href="http://renaissancesoftware.net/files/articles/ESC-424Paper_Grenning-StoryTesting-v1r0.pdf"&gt;Scenario Testing with Executable Use Cases&lt;/a&gt;”. &lt;br /&gt;
&lt;br /&gt;
I also write this cycle on &lt;a href="http://legobokueng.blogspot.jp/2012/04/boost-quality-of-embedded-software.html"&gt;my blog entry&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
How is the book organized&lt;/h2&gt;
&lt;br /&gt;
The book consisted of three part.&lt;br /&gt;
&lt;br /&gt;
In the first part “Test Driven Development”, the author introduces the process of TDD when we develop LED device driver. He also introduces why embedded software developer need TDD, test cycle including TDD and testing framework for C, Unity and &lt;a href="http://cpputest.org/"&gt;CppUTest&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The second part is about technique to replace dependant module to test with C. It is very difficult to replace module with C, the only ways we can do are link substitution, preprocessor substitution and function pointer substitution. It also explains C++ mocking library “&lt;a href="http://www.cpputest.org/node/30"&gt;CppUMock&lt;/a&gt;” to test complex interaction with dependent module. &lt;br /&gt;
&lt;br /&gt;
In the third part “Design and Continuous Improvement”, knowledge and technique to improve design continuously such as SOLID principle, test for legacy code and test patterns are introduced. If you are not familiar with object oriented design and programming, it is very difficult to understand. You need to read the books about object oriented design and programming first. &lt;br /&gt;
&lt;br /&gt;
Please refer to the full table of contents on &lt;a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c"&gt;the official site&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
How to read the book&lt;/h2&gt;
&lt;br /&gt;
&lt;h3&gt;
For those who wants to know characteristics of TDD for embedded software&lt;/h3&gt;
&lt;br /&gt;
When I introduce the book to my coworker and he asked me “What is the difference between TDD for embedded and the others?” I think that basic points are same. For example, there is no difference between dependency to module and dependency to hardware.&lt;br /&gt;
&lt;br /&gt;
I think that the most biggest difference is language constraint. Comparing to object oriented language, you need more technique to make test doubles, which is module to replace dependent module. In order to understand the technique, please refer to the chapter 7 “Introducing Test Doubles”, the chapter 8 “Spying on the Production Code” and the chapter 9 “Runtime-Bound Test Doubles”.&lt;br /&gt;
&lt;br /&gt;
On the other hand, there is special bonus for embedded software developer. As I wrote before, we can solve the hardware bottleneck problem. Please refer to “Benefit for Embedded” at the chapter 1 and the chapter 5 “Embedded TDD Strategy”.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
For those who wants to try TDD with example&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;
To put TDD in practice, you need not only knowledge but technique. You must acquire technique by doing exercise. You can read the process to test and refactor your code for example of LED device driver in the chapter 3 “Starting a C Module” and the chapter 4 “Testing Your Way to Done”. &amp;nbsp;Try them.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Example in the chapter 3 and 4 is quite simple. You need test doubles in actual development. You can read about test doubles in the chapter 7 ”Introducing Test Doubles”, the chapter 8 ”Spying on the Production Code” and the chapter 9 “Runtime-Bound Test Doubles”.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
For those who wants to know better C module design&lt;/h3&gt;
&lt;br /&gt;
TDD covers not only design and implement activity but also continuous improvement to better design by refactoring. You need to know what is better design to improve design of your software.&lt;br /&gt;
&lt;br /&gt;
The chapter 11 “SOLID, Flexible and Testable Designs” introduces better design principles and  implementation with C. You can understand how to design low-coupling module design with C.&lt;br /&gt;
&lt;br /&gt;
There is also explanation to eliminate piles of if / switch-case statements by implementing polymorphism in the object oriented design concept with C. The code is tricky and it is very difficult to understand if you don’t understand object oriented design. In the case, you need to read object oriented software design book such as “&lt;a href="http://www.amazon.com/Software-Development-Principles-Patterns-Practices/dp/0135974445" target="_blank"&gt;Agile Software Development&lt;/a&gt;” first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
How Japanese readers say about the book&lt;/h2&gt;
&lt;br /&gt;
In conclusion, I introduce comments from the members of “Test Driven Development for Embedded C” studying group.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;It is very helpful to understand how TDD master think and do because every tiny step and design decisions are written at the beginning of the book. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;I read the book and solve some exercises, then I could understand basic rhythm of TDD.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;I was wondering how to apply object oriented design to C code before I read this book. Thanks to the book, I understood how to do it.&lt;/li&gt;
&lt;li&gt;I think that it is very difficult to understand the book at first if the readers understand object oriented design and test. Example of C code is not enough for beginners.&lt;/li&gt;
&lt;li&gt;This book is very good as index of modern software testing. It includes TDD, test for legacy code, SOLID principle and refactoring, xUnit Test Patterns. Every embedded software developer should read this!&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjY2w7PJEIvy4w5ADy6Yj1l-XvuF7BNHIudqi2aGtaG2ob-4sQATbmv5uRNaWlSgXUWAy1n6jn2KHRfbJGgLL6qYz0-MUyoPHPUeD51T9HZ_0Wz3HvbRaT-siIoZkF7ImUuND7b3wYJqY/s72-c/micro_cycle.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><enclosure length="2556995" type="application/pdf" url="http://renaissancesoftware.net/files/articles/ESC-424Paper_Grenning-StoryTesting-v1r0.pdf"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>I wrote Japanese article to introduce “Test Driven Development for Embedded C” for embedded software developers in Japan last month. This entry is English version of it. ---------- As you can see with the title, this is the book about Test Driven Development for embedded software with C language. The author, James Grenning, is training, coaching and consulting agile software development or TDD over the world. He is also the inventor of agile estimation technique “planning poker” and one of the authors of agile manifesto. Must read book for embedded software developer Recently Japanese TDD passionates like @t_wada are holding TDD boot camp in major cities of Japan. This is an event for TDD beginners to have an exercise of TDD. People get together at one place, make pair for exercise and do TDD with specific problems. Thanks to them, we can have more chance to exercise TDD and people are becoming to discuss practical topic about TDD on their blog or social media. TDD is not majority in the industry yet but I am feeling TDD is becoming common technique for us. On the other hand, most of embedded software are left out of boom of TDD boot camp. They think that they have nothing is to do with TDD because every article on book or blog is written about enterprise or web system. They are things on other planets. This is a book for you, embedded software developers :) This book deals with typical example of embedded software and C/C++ testing framework and explain how to do TDD with very tiny step of carefully. It also can be good textbook for module design of C code. Why embedded software developer need TDD? Embedded software developer might think why they need TDD. The author answer the question in the chapter 5 “Embedded TDD Strategy” of the book. He explain the we can solve “the target hardware bottleneck” problem, which is common for embedded software development. The target hardware bottleneck is a problem that target hardware could be a bottleneck disturbs software testing. Generically, target hardware is different from host computer that is used to develop software. And we can have these situation: The problems leads to delay or increasing of working hour for software testing Target hardware are not ready till the end of project Target hardware is expensive and we can’t prepare enough number of target hardware&amp;nbsp; It takes long time to build and upload software to target hardware&amp;nbsp; The problems leads to difficulties to find bugs It is difficult to identify where bugs are because the target hardware also have bugs in the beginning Compiler for target hardware is different from one for host computer. Then we find unintentional behavior of software on the target hardware To solve the target hardware bottleneck problem, the author recommend these approaches: Ensure quality of software by TDD on host computer before testing on the target hardware Do same tests on both of host computer and target hardware to find bug that are happend because of different between them. And the author recommends TDD cycle for embedded software development as follows: The book focuses on the stage 1 on the cycle. It doesn’t explain stage 2 to 5 in detail but you can find more information about step 5 on the author’s paper (PDF) “Scenario Testing with Executable Use Cases”. I also write this cycle on my blog entry. How is the book organized The book consisted of three part. In the first part “Test Driven Development”, the author introduces the process of TDD when we develop LED device driver. He also introduces why embedded software developer need TDD, test cycle including TDD and testing framework for C, Unity and CppUTest. The second part is about technique to replace dependant module to test with C. It is very difficult to replace module with C, the only ways we can do are link substitution, preprocessor substitution and function pointer substitution. It also explains C++ mocking library “CppUMock” to test complex interaction with dependent module. In the third part “Design and Continuous Improvement”, knowledge and technique to improve design continuously such as SOLID principle, test for legacy code and test patterns are introduced. If you are not familiar with object oriented design and programming, it is very difficult to understand. You need to read the books about object oriented design and programming first. Please refer to the full table of contents on the official site. How to read the book For those who wants to know characteristics of TDD for embedded software When I introduce the book to my coworker and he asked me “What is the difference between TDD for embedded and the others?” I think that basic points are same. For example, there is no difference between dependency to module and dependency to hardware. I think that the most biggest difference is language constraint. Comparing to object oriented language, you need more technique to make test doubles, which is module to replace dependent module. In order to understand the technique, please refer to the chapter 7 “Introducing Test Doubles”, the chapter 8 “Spying on the Production Code” and the chapter 9 “Runtime-Bound Test Doubles”. On the other hand, there is special bonus for embedded software developer. As I wrote before, we can solve the hardware bottleneck problem. Please refer to “Benefit for Embedded” at the chapter 1 and the chapter 5 “Embedded TDD Strategy”. For those who wants to try TDD with example To put TDD in practice, you need not only knowledge but technique. You must acquire technique by doing exercise. You can read the process to test and refactor your code for example of LED device driver in the chapter 3 “Starting a C Module” and the chapter 4 “Testing Your Way to Done”. &amp;nbsp;Try them. Example in the chapter 3 and 4 is quite simple. You need test doubles in actual development. You can read about test doubles in the chapter 7 ”Introducing Test Doubles”, the chapter 8 ”Spying on the Production Code” and the chapter 9 “Runtime-Bound Test Doubles”. For those who wants to know better C module design TDD covers not only design and implement activity but also continuous improvement to better design by refactoring. You need to know what is better design to improve design of your software. The chapter 11 “SOLID, Flexible and Testable Designs” introduces better design principles and implementation with C. You can understand how to design low-coupling module design with C. There is also explanation to eliminate piles of if / switch-case statements by implementing polymorphism in the object oriented design concept with C. The code is tricky and it is very difficult to understand if you don’t understand object oriented design. In the case, you need to read object oriented software design book such as “Agile Software Development” first. How Japanese readers say about the book In conclusion, I introduce comments from the members of “Test Driven Development for Embedded C” studying group. It is very helpful to understand how TDD master think and do because every tiny step and design decisions are written at the beginning of the book. &amp;nbsp; I read the book and solve some exercises, then I could understand basic rhythm of TDD.&amp;nbsp; I was wondering how to apply object oriented design to C code before I read this book. Thanks to the book, I understood how to do it. I think that it is very difficult to understand the book at first if the readers understand object oriented design and test. Example of C code is not enough for beginners. This book is very good as index of modern software testing. It includes TDD, test for legacy code, SOLID principle and refactoring, xUnit Test Patterns. Every embedded software developer should read this!</itunes:subtitle><itunes:author>noreply@blogger.com (yohei)</itunes:author><itunes:summary>I wrote Japanese article to introduce “Test Driven Development for Embedded C” for embedded software developers in Japan last month. This entry is English version of it. ---------- As you can see with the title, this is the book about Test Driven Development for embedded software with C language. The author, James Grenning, is training, coaching and consulting agile software development or TDD over the world. He is also the inventor of agile estimation technique “planning poker” and one of the authors of agile manifesto. Must read book for embedded software developer Recently Japanese TDD passionates like @t_wada are holding TDD boot camp in major cities of Japan. This is an event for TDD beginners to have an exercise of TDD. People get together at one place, make pair for exercise and do TDD with specific problems. Thanks to them, we can have more chance to exercise TDD and people are becoming to discuss practical topic about TDD on their blog or social media. TDD is not majority in the industry yet but I am feeling TDD is becoming common technique for us. On the other hand, most of embedded software are left out of boom of TDD boot camp. They think that they have nothing is to do with TDD because every article on book or blog is written about enterprise or web system. They are things on other planets. This is a book for you, embedded software developers :) This book deals with typical example of embedded software and C/C++ testing framework and explain how to do TDD with very tiny step of carefully. It also can be good textbook for module design of C code. Why embedded software developer need TDD? Embedded software developer might think why they need TDD. The author answer the question in the chapter 5 “Embedded TDD Strategy” of the book. He explain the we can solve “the target hardware bottleneck” problem, which is common for embedded software development. The target hardware bottleneck is a problem that target hardware could be a bottleneck disturbs software testing. Generically, target hardware is different from host computer that is used to develop software. And we can have these situation: The problems leads to delay or increasing of working hour for software testing Target hardware are not ready till the end of project Target hardware is expensive and we can’t prepare enough number of target hardware&amp;nbsp; It takes long time to build and upload software to target hardware&amp;nbsp; The problems leads to difficulties to find bugs It is difficult to identify where bugs are because the target hardware also have bugs in the beginning Compiler for target hardware is different from one for host computer. Then we find unintentional behavior of software on the target hardware To solve the target hardware bottleneck problem, the author recommend these approaches: Ensure quality of software by TDD on host computer before testing on the target hardware Do same tests on both of host computer and target hardware to find bug that are happend because of different between them. And the author recommends TDD cycle for embedded software development as follows: The book focuses on the stage 1 on the cycle. It doesn’t explain stage 2 to 5 in detail but you can find more information about step 5 on the author’s paper (PDF) “Scenario Testing with Executable Use Cases”. I also write this cycle on my blog entry. How is the book organized The book consisted of three part. In the first part “Test Driven Development”, the author introduces the process of TDD when we develop LED device driver. He also introduces why embedded software developer need TDD, test cycle including TDD and testing framework for C, Unity and CppUTest. The second part is about technique to replace dependant module to test with C. It is very difficult to replace module with C, the only ways we can do are link substitution, preprocessor substitution and function pointer substitution. It also explains C++ mocking library “CppUMock” to test complex interaction with dependent module. In the third part “Design and Continuous Improvement”, knowledge and technique to improve design continuously such as SOLID principle, test for legacy code and test patterns are introduced. If you are not familiar with object oriented design and programming, it is very difficult to understand. You need to read the books about object oriented design and programming first. Please refer to the full table of contents on the official site. How to read the book For those who wants to know characteristics of TDD for embedded software When I introduce the book to my coworker and he asked me “What is the difference between TDD for embedded and the others?” I think that basic points are same. For example, there is no difference between dependency to module and dependency to hardware. I think that the most biggest difference is language constraint. Comparing to object oriented language, you need more technique to make test doubles, which is module to replace dependent module. In order to understand the technique, please refer to the chapter 7 “Introducing Test Doubles”, the chapter 8 “Spying on the Production Code” and the chapter 9 “Runtime-Bound Test Doubles”. On the other hand, there is special bonus for embedded software developer. As I wrote before, we can solve the hardware bottleneck problem. Please refer to “Benefit for Embedded” at the chapter 1 and the chapter 5 “Embedded TDD Strategy”. For those who wants to try TDD with example To put TDD in practice, you need not only knowledge but technique. You must acquire technique by doing exercise. You can read the process to test and refactor your code for example of LED device driver in the chapter 3 “Starting a C Module” and the chapter 4 “Testing Your Way to Done”. &amp;nbsp;Try them. Example in the chapter 3 and 4 is quite simple. You need test doubles in actual development. You can read about test doubles in the chapter 7 ”Introducing Test Doubles”, the chapter 8 ”Spying on the Production Code” and the chapter 9 “Runtime-Bound Test Doubles”. For those who wants to know better C module design TDD covers not only design and implement activity but also continuous improvement to better design by refactoring. You need to know what is better design to improve design of your software. The chapter 11 “SOLID, Flexible and Testable Designs” introduces better design principles and implementation with C. You can understand how to design low-coupling module design with C. There is also explanation to eliminate piles of if / switch-case statements by implementing polymorphism in the object oriented design concept with C. The code is tricky and it is very difficult to understand if you don’t understand object oriented design. In the case, you need to read object oriented software design book such as “Agile Software Development” first. How Japanese readers say about the book In conclusion, I introduce comments from the members of “Test Driven Development for Embedded C” studying group. It is very helpful to understand how TDD master think and do because every tiny step and design decisions are written at the beginning of the book. &amp;nbsp; I read the book and solve some exercises, then I could understand basic rhythm of TDD.&amp;nbsp; I was wondering how to apply object oriented design to C code before I read this book. Thanks to the book, I understood how to do it. I think that it is very difficult to understand the book at first if the readers understand object oriented design and test. Example of C code is not enough for beginners. This book is very good as index of modern software testing. It includes TDD, test for legacy code, SOLID principle and refactoring, xUnit Test Patterns. Every embedded software developer should read this!</itunes:summary><itunes:keywords>embedded, TDD</itunes:keywords></item><item><title>Test Driven Development for Embedded C: Introducing runtime-bounded test doubles and the mock object</title><link>http://legobokueng.blogspot.com/2012/07/tdd-for-embedded-c-introducing-runtime.html</link><category>C++</category><category>CppUTest</category><category>embedded</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Sat, 14 Jul 2012 17:14:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-8013729618019668515</guid><description>&lt;br /&gt;
&lt;span style="background-color: white;"&gt;I had a meeting with reading group of "&lt;a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c" target="_blank"&gt;Test Driven Development for Embedded C&lt;/a&gt;" in Tokyo, Japan. We read the chapter 9 "Runtime-Bounded Test Doubles" and the chapter 10 "The Mock Object", then we discussed them. In this entry, I introduce the chapters and some topics from our discussion.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;The chapter 9 "Runtime-Bounded Test Doubles"&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When we implement product code with C, we have three ways to replace dependent module with test doubles. They are preprocessor substitution, link substitution and function pointer substitution.&lt;br /&gt;
&lt;br /&gt;
Link-time substitution, which is introduced in chapter 7 "Introducing Test Doubles", is not flexible because it can't be replaced at runtime. If you want to use product code once and use test doubles at other time, function pointer substitution, which is introduced at chapter 9, is effective way. &lt;br /&gt;
&lt;br /&gt;
Although function pointer substitution is very flexible, it has a side effect. Heavy usage of preprocessor or function pointer substitution reduces code readability. You should use them in a limited way.&lt;br /&gt;
&lt;br /&gt;
By the way, the author doesn't explain preprocessor substitution. He may doesn't like it because of side effect.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;The chapter 10 "The Mock Object"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The chapter 10 introduces the mock object, which is not so popular among embedded software engineers. The subject is a device driver for existent flash memory. The mock object is useful way to ensure quality of device driver before integrate it with hardware because:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: white;"&gt;It is difficult to test complex interaction between software and hardware based on specific protocol with usual testing framework.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white;"&gt;It may be impossible to test error case in real device.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Most part of the chapter 10 focuses on how to implement the mock object in C. You can also know "&lt;a href="http://www.cpputest.org/node/30" target="_blank"&gt;CppUMock&lt;/a&gt;", which is C++ mocking library, and "&lt;a href="http://sourceforge.net/projects/cmock/" target="_blank"&gt;CMock&lt;/a&gt;", which is mock generation tool for C.&lt;br /&gt;
&lt;br /&gt;
I found that mock object is usually complicated. If you implement mock object in C by yourself, you must to test it thoroughly before you use it. Test may be unnecessary if a mocking library assure quality of mock object.&lt;br /&gt;
&lt;br /&gt;
You might think that making mock object is waste of time. But I think that it worth spending cost to make mock object and test with mock object. The more you standardize &amp;nbsp;device I/O, the more effectiveness of test grow. You can ensure quality of device driver more and more before integrate it with hardware.&lt;br /&gt;
&lt;br /&gt;
At last we discussed why the mock object is popular among enterprise or web engineers but not among embedded engineers. Our conclusion is that mocking library with LL is very useful because LL has less constraint and mocking library is well maintained to use easily. On the other hand, library for C/C++ are still on the way to become useful.&lt;br /&gt;
&lt;br /&gt;
This is one of difficulties for embedded engineers. To gain strength from TDD, we need to prepare way to overcome language constraint.&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Boost quality of embedded software early with Dual Target Testing</title><link>http://legobokueng.blogspot.com/2012/04/boost-quality-of-embedded-software.html</link><category>embedded</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 29 Apr 2012 23:38:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-6769333318448375556</guid><description>&lt;br /&gt;
I held the &lt;a href="http://atnd.org/events/26137" target="_blank"&gt;third monthly meeting&lt;/a&gt; of "&lt;a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c" target="_blank"&gt;Test Driven Development for Embedded C&lt;/a&gt;" reading group in Tokyo.&lt;br /&gt;
&lt;br /&gt;
We read following two chapters then.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The fifth chapter "Embedded TDD Strategy"&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This chapters introduces "Dual Target Testing" which is important to do TDD for embedded software development&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;The sixth chapter "Year, but..."&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This chapter introduces opposing views for adopting TDD and answers for them&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
In this entry, I explain what is dual target testing and why we need it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;Concurrent development software and hardware makes embedded system development difficult&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Concurrent development of software and hardware is common in embedded system development. As I told in the entry "&lt;a href="http://legobokueng.blogspot.jp/2012/03/is-tdd-one-of-solutions-for-difficulty.html" target="_blank"&gt;Is TDD one of the solutions for difficulty of concurrent development of software and hardware?&lt;/a&gt;", concurrent development is one of difficulties in embedded system development. Bug whose cause are difficult to find often occurs because we move ahead while software and hardware are low quality.&lt;br /&gt;
&lt;br /&gt;
I give you an example of concurrent development. I often develop embedded software as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3VNBMnqG8mRXWiRYle2GqU-a8Si-JX5esGJICkZJKaY2sDAjINrloAFqmmSCKd3Ija3W-HGhPPHflXADPqEE33eltr90FJdjMinnNyTQVGMzpXu6nwVStetu2ABfpxa7RZIv98f7mSI/s1600/process.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3VNBMnqG8mRXWiRYle2GqU-a8Si-JX5esGJICkZJKaY2sDAjINrloAFqmmSCKd3Ija3W-HGhPPHflXADPqEE33eltr90FJdjMinnNyTQVGMzpXu6nwVStetu2ABfpxa7RZIv98f7mSI/s400/process.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;I divide development period into several iterations.&lt;/li&gt;
&lt;li&gt;Each iteration has function scope.&lt;/li&gt;
&lt;li&gt;At the end of the iteration, we integrate software and hardware to make prototype. We evaluate it.&lt;/li&gt;
&lt;li&gt;I continue prototyping and create spec incrementally.&lt;/li&gt;
&lt;/ul&gt;
I think this kind of prototyping is common in embedded system development.&lt;br /&gt;
&lt;br /&gt;
In this kind of prototyping, we have difficulties as follows.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;I don't have hardware at the beginning.&lt;/li&gt;
&lt;li&gt;I usually use minimum hardware to check booting OS.&lt;/li&gt;
&lt;li&gt;I also start from checking operation with previous product&lt;/li&gt;
&lt;/ul&gt;
After integration of hardware and software, QA team starts evaluation of prototype. They find lots of bugs. I recieved piles of bug reports and I start investigation of bug cause. This is very difficult task because quality of software and&amp;nbsp;hardware is&amp;nbsp;low then. Bugs are everywhere. Software engineers have to spend much time to prepare evidence to say software has no bugs.&lt;br /&gt;
&lt;br /&gt;
This work is not productive. To realize productive embedded system development, software engineers have to spend enormous effort boosting software quality before hardware is ready.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;Boost quality of embedded software early with Dual Target Testing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
What can we do to boost quality of embedded software before hardware is ready ? James Grenning, the author of Test-Driven Development for Embedded C, recommend Dual Target Testing. This is a technique to make test with both of target hardware and PC possible at the&amp;nbsp;beginning.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUaYRdwYkM0elK3SPcIz7cqk5Og5SGeGJn_NRQQra-EwAl8sUMFiqsWRaAZXtN9v5YwUomrNV7xsmI7a8DrxOkALOJheDA8vQjdcAZ2pe9IA5EvKfkyq6KN-Y_IH-ZXSf3yQS0PYkdwRc/s1600/micro_cycle.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUaYRdwYkM0elK3SPcIz7cqk5Og5SGeGJn_NRQQra-EwAl8sUMFiqsWRaAZXtN9v5YwUomrNV7xsmI7a8DrxOkALOJheDA8vQjdcAZ2pe9IA5EvKfkyq6KN-Y_IH-ZXSf3yQS0PYkdwRc/s400/micro_cycle.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here are key points.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;We build high quality software with exhaustive unit test and&amp;nbsp;refactoring&amp;nbsp;on PC from the beginning. Then we move to &amp;nbsp;unit test with eval hardware.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This work reduce unproductive work like finding logical mistake with poor debug environment on eval hardware.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Compiling for target processor and unit test on eval hardware and target hardware reduce bugs which causes are difference of development environment between host and target.&lt;/li&gt;
&lt;/ul&gt;
We can check only with unit test scope but we can start smoothly becausse we get high quality software before we move to eval hardware.&lt;br /&gt;
&lt;br /&gt;
We don't need check logical mistake of module on eval hardware. Reducing unproductive work make us concentrate on spend enormous effort for advanced work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;We need to write unit tests consistently for dual target testing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We need to write many unit test code for dual target testing. This is more a time-consuming way than moving to eval hardware without tests.&lt;br /&gt;
&lt;br /&gt;
It is very easy to check with eval hardware without unit test but everything needs to be done manually. Keeping&amp;nbsp;quality&amp;nbsp;is very difficult if everyone commit lots of code. We spend much time to find cause of bugs.&lt;br /&gt;
&lt;br /&gt;
Writing unit tests for dual targeting test is very time-consuming way in the short term but it is very productive way in the long term because we can find mistake quickly. We reduce debug time and we can spend more advanced work.&lt;br /&gt;
&lt;br /&gt;
We will talk which style is good for us at the next meeting.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;How can we do dual target testing?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I will explain detailed techninque for dual target testing next time. Stay tuned :)</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3VNBMnqG8mRXWiRYle2GqU-a8Si-JX5esGJICkZJKaY2sDAjINrloAFqmmSCKd3Ija3W-HGhPPHflXADPqEE33eltr90FJdjMinnNyTQVGMzpXu6nwVStetu2ABfpxa7RZIv98f7mSI/s72-c/process.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Rarejob lesson logs</title><link>http://legobokueng.blogspot.com/2012/03/rarejob-lesson-logs.html</link><category>English</category><category>Rarejob</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 18 Mar 2012 21:23:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-8500529080447282565</guid><description>&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;December 23, 2012&lt;/span&gt;&lt;br /&gt;
And I took article discussion. Today we discussed about this article.&lt;a href="http://online.wsj.com/article/SB10000872396390443675404578059311445951162.html"&gt;http://online.wsj.com/article/SB10000872396390443675404578059311445951162.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Discussion points are follows.&lt;br /&gt;·What are possible problems that countries may encounter wh&lt;br /&gt;en dealing with each other?&lt;br /&gt;·How can people ensure harmony between nations with different cultures, values, or religions?&lt;br /&gt;&lt;br /&gt;We usually have some problems with countries close to us. Japan has territory issues with China. Philippine has other issues with China. &lt;br /&gt;I think that It is difficult to have harmony at political problem but we can do something at citizens level. Chinese people who have never been to Japan might think Japanese people are bad people but ones who live in Japan don't think like that because they knew what is reality. Reality is that most Japanese people are polite and kind. Once they visited Japan and knew reality, they will change his mind. Having chance to know each other is good way to cooperate each other.&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: #fff2cc; font-size: large;"&gt;December 23, 2012&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
I took TOEFL interview test for the first time. I was asked to hear following question, prepare answer in 15 minutes and answer for in 45 minutes. It is very hard.&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, 'hiragino kaku gothic pro', meiryo, 'ms pgothic', sans-serif; line-height: 17.981481552124023px;"&gt;"Some families think that having a pet is important to provide enjoyment to the members. Others think that a pet would only be a burden at home. Which opinion do you agree with and why? Give specific details and examples in your answer"&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="color: #333333; font-family: lucida grande, tahoma, verdana, arial, hiragino kaku gothic pro, meiryo, ms pgothic, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 17.96666717529297px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: #fff2cc; font-size: large;"&gt;March 26, 2012&lt;/span&gt;&lt;br /&gt;
Total 13.5 hours. I used conversation material for intermediate level today.&lt;br /&gt;
In today's lesson, my tutor said that her mom loves the movie 'Hachiko the Akita dog' so they call her pet "Hachiko". That is nice.&lt;br /&gt;
I asked my tutor "What is your most favorite food?" Her answer is chocolate. Why do every girls like chocolate? I don't understand why because I don't eat it often.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;March 18, 2012&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Total 11.5 hours. I used conversation
material for intermediate level today.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;In today's lesson, we talked about my role
in my family. It is to show my family outside of home. For example, I take them
to overseas. I took them to Taiwan, Switzerland and Germany. Best city to visit
is Zurich. I watched Italian opera with English subtitles. It was my first time
to watch opera. So I was very impressed. My family is too.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;span style="background-color: #fff2cc; font-size: large;"&gt;March 17, 2012&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Total 11.25 hours. I used conversation
material for intermediate level today.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;In English lesson, we talked about small
family is better than big one. I don't think so. Big family is fun and you can
learn social skill. You have to appeal to your parents in big family. That make
you social person. In small family, you cannot get that experience.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;But for my own family, I want to have small
one. Raising many children costs very much in Tokyo. Two children are enough
for me. My tutor has same opinion with me. She grew up in big family but she
wants to have small family.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>The second monthly meeting of the "Test-Driven Development for Embedded C" book club in Tokyo</title><link>http://legobokueng.blogspot.com/2012/03/second-monthly-meeting-of-test-driven.html</link><category>embedded</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 18 Mar 2012 16:01:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-4285315375269119486</guid><description>&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
The second meeting of "&lt;a href="http://pragprog.com/book/jgade/test-driven-development-for-embedded-c" target="_blank"&gt;Test-DrivenDevelopment for Embedded C&lt;/a&gt;" book club in Tokyo took place on March 4th.&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;&lt;span lang="EN-US"&gt;We read the three and fourth&amp;nbsp;&lt;/span&gt;chapter&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;At this time, we read the third chapter
"Starting C Module" and the fourth chapter "Testing Your Way to
Done". We had first TDD session during these chapters. We wrote test code
and product code for LED driver then we refactored both of them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;The third and fourth chapters are highlight
of the first half of this book. If you start to read this book, I recommend you
to try the example of these chapters by yourself.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;There are sample codes on my github
repository.&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Test code for LED driver&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/yohei1126/embeddedtdd/blob/master/unity/LedDriver/LedDriverTest.c" target="_blank"&gt;LedDriverTest.c&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Product code for LED driver&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/yohei1126/embeddedtdd/blob/master/src/LedDriver/LedDriver.c" target="_blank"&gt;LedDriver.c&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/yohei1126/embeddedtdd/blob/master/include/LedDriver/LedDriver.h" target="_blank"&gt;LedDriver.h&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;span style="background-color: #fff2cc; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;span style="background-color: #fff2cc; font-size: large;"&gt;Always make code stable&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;There are two very informative topics at
this time.&amp;nbsp;&lt;/span&gt;First one is to make code stable. Author
describes TDD work like this:&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDu5PAyjFV2bSrClqFUxxDVevZ7URXuEctFiYuzB4JY2jIaH0LjzDgzfZ_t_T8STHJwIP97oQLnV0zsaUl18FUgRVxzruDah818ULE1xy-o9zKucgyuTvaZH7kSr5thR-Av50MKbIlkm8/s1600/TDD_StateMachine.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDu5PAyjFV2bSrClqFUxxDVevZ7URXuEctFiYuzB4JY2jIaH0LjzDgzfZ_t_T8STHJwIP97oQLnV0zsaUl18FUgRVxzruDah818ULE1xy-o9zKucgyuTvaZH7kSr5thR-Av50MKbIlkm8/s400/TDD_StateMachine.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;And I saw this diagram and I found like these:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzvL0bVBIzpAeJt5JlKrn5-jvmVywN3npBxcruImlk3fWbQY5X8ieG7UB31qMDv33M8awwMMQ64jP123aAHMDHa6O0ogeZncDSMeMm_LvciF-dNLFz1q1BNBk5UT6vItbHGEFDLmahl8A/s1600/%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%9E%E3%82%B7%E3%83%B3%E5%9B%B30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzvL0bVBIzpAeJt5JlKrn5-jvmVywN3npBxcruImlk3fWbQY5X8ieG7UB31qMDv33M8awwMMQ64jP123aAHMDHa6O0ogeZncDSMeMm_LvciF-dNLFz1q1BNBk5UT6vItbHGEFDLmahl8A/s400/%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%9E%E3%82%B7%E3%83%B3%E5%9B%B30.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;There are two stable states of code, which are
stable state that passed tests and one that don't pass.&lt;/li&gt;
&lt;li&gt;TDD doesn't make another state of code.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;In the stable state that passes tests,
there are not refactored code and refactored code. This topic is well known for
TDD new comers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;The stable state that doesn't pass tests is
a transient state. Compile error, link error, test failure. TDD makes this
process obvious. TDD doesn't make unbalance state that passes tests but include
incomplete implementation and mistakes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
You might think that you don't need to do such rigorous way. Of course, some people can implement perfect code at a time but most of us can't do it. We make mistakes. So we need way to find mistakes.

&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;Do not care about performance too much at
first but care about readability&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Second topic is code readability. Here is
informative description in the book.&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span lang="EN-US"&gt;don't let the performance factor outweigh
improved design and readability unless there is proof the code is contributing
to a specific performance problem.&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Author doesn't mean that performance is not
important. We had same opinion. When we deal with problem on performance, we
have to find performance bottleneck with profiler. If you put emphasis on performance
and write unreadable code while you don't know where bottleneck is, maintenance time
increase and have bad effect on costs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;So here is better way: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Considering a way to meet consider
requirement at architecture design phase&lt;/li&gt;
&lt;li&gt;Finding performance bottleneck with
profiler at the beginning of architecture implementation phase&lt;/li&gt;
&lt;li&gt;Refactoring code so that each module becomes more readable&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;We talked about own attempt&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;First topic is auto build and test with
Eclipse. If you use this function, you can also do static analysis, code format
and code coverage as follows. This is very easy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Second topic is '&lt;a href="http://adlint.sourceforge.net/pmwiki/pmwiki.php?n=Main.HomePage?setlang=en" target="_blank"&gt;AdLint&lt;/a&gt;'. This is new open
source static code analysis tool. I talked my plan to introduce own
environment. I want to show demo next time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Third topic is auto code formant with code
formatting tool such as &lt;a href="http://astyle.sourceforge.net/" target="_blank"&gt;Artistic Style&lt;/a&gt;. You need to care when you use it on
build process because it may make unintended code format. Manual execution may
be better.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;Fourth topic is code coverage tool. '&lt;a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_blank"&gt;lcov&lt;/a&gt;'
is good for gcc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;span style="background-color: #fff2cc; font-size: large;"&gt;What's next?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;&lt;a href="http://atnd.org/events/26137" target="_blank"&gt;Third meeting&lt;/a&gt; will take place on April.&lt;span style="font-family: 'ＭＳ 明朝', serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;We will read the fifth chapter "Embedded TDD Strategy" and
the sixth chapter "Yeah, but …". &amp;nbsp;First one is good to adopt TDD to embedded
system development. Second one gives us hints to recommend TDD to other people.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDu5PAyjFV2bSrClqFUxxDVevZ7URXuEctFiYuzB4JY2jIaH0LjzDgzfZ_t_T8STHJwIP97oQLnV0zsaUl18FUgRVxzruDah818ULE1xy-o9zKucgyuTvaZH7kSr5thR-Av50MKbIlkm8/s72-c/TDD_StateMachine.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Is TDD one of the solutions for difficulty of concurrent development of software and hardware?</title><link>http://legobokueng.blogspot.com/2012/03/is-tdd-one-of-solutions-for-difficulty.html</link><category>embedded</category><category>TDD</category><author>noreply@blogger.com (yohei)</author><pubDate>Sun, 11 Mar 2012 20:28:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-4228003903674371453</guid><description>In my 5 year experience of embedded software engineer, I became to think concurrent development of software and hardware is the biggest risk of embedded systems. I thinks TDD is one of the solutions for the problem. So I held a&lt;a href="http://legobokueng.blogspot.com/2012/02/book-club-of-test-driven-development.html" target="_blank"&gt;&amp;nbsp;book club&lt;/a&gt; of&amp;nbsp;"&lt;a href="http://www.amazon.com/gp/product/193435662X/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=legoboku-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=193435662X"&gt;Test Driven Development for Embedded C (Pragmatic Programmers)&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=legoboku-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=193435662X" style="border-bottom-style: none !important; border-color: initial !important; border-image: initial !important; border-left-style: none !important; border-right-style: none !important; border-top-style: none !important; border-width: initial !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important;" width="1" /&gt;"&amp;nbsp;in Tokyo. Here is my thought on how we fight with difficulty of&amp;nbsp;
concurrent&amp;nbsp;development of software and hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;Writing code for uncompleted hardware is so hard : (&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
General process of embedded software development is as follows:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Developing software on own computer&lt;/li&gt;
&lt;li&gt;Debugging on an evaluation board&lt;/li&gt;
&lt;li&gt;Testing on a target hardware&lt;/li&gt;
&lt;/ol&gt;
At the first step, we don't have the target hardware and have to write code for imaginary hardware that we have never seen. After we got the evaluation board, which is the second step, we try to debug on it to find bugs.&lt;br /&gt;
&lt;br /&gt;
Most of engineers that I have met try to debugging on an evaluation board as quickly as possible, so they tend not to care about testability for unit test. As a result, we get high coupling code.&lt;br /&gt;
&lt;br /&gt;
At the time, we have to advance the development with several risks as follows:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Own computer, evaluation board and target hardware have a little bit different library and compiler.&lt;/li&gt;
&lt;li&gt;The evaluation board is bad in quality at the beginning of the development.&lt;/li&gt;
&lt;li&gt;There are many mistakes in logic of code&lt;/li&gt;
&lt;li&gt;Software engineer has to resolve underlying discrepancy in specification at the end of development.&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
Problems occur someday. They make debugging time longer and distinguishing cause of bugs more difficult.&lt;br /&gt;
&lt;br /&gt;
&lt;i style="background-color: #f3f3f3;"&gt;If we do agile software development for embedded software system, this will be a bottleneck.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;Dual-Target Testing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For this problem, the author of "&lt;a href="http://www.amazon.com/gp/product/193435662X/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=legoboku-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=193435662X"&gt;Test Driven Development for Embedded C (Pragmatic Programmers)&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=legoboku-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=193435662X" style="border: none !important; margin: 0px !important;" width="1" /&gt;" recommend hardware-independent software design and unit test on both of own computer and evaluation board from the beginning. This is called "Dual-Target Testing". If we do it from the beginning, we can eliminate bugs and make test easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;What do we need for Dual-Target Tesing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
At first, we need software design techniques to make software more testable. That is discussed in the books like "&lt;a href="http://www.amazon.com/gp/product/0321146530/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=legoboku-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321146530"&gt;Test Driven Development: By Example&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=legoboku-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0321146530" style="border: none !important; margin: 0px !important;" width="1" /&gt;" written by Kent-Beck or "&lt;a href="http://www.amazon.com/gp/product/0131177052/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=legoboku-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0131177052"&gt;Working Effectively with Legacy Code&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=legoboku-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0131177052" style="border: none !important; margin: 0px !important;" width="1" /&gt;" written by Michael Feathers.&lt;br /&gt;
&lt;br /&gt;
Second, we need cooperation with hardware engineers for low layer software development. For example, in the book of "Test-Driven Development for Embedded C ", there is a scene that software engineer and hardware engineer are discussing about design of interface between software and hardware so that software engineer can decide design of Test Double.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc; font-size: large;"&gt;What "Test-Driven Development for Embedded C" is doing for this?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are some code examples in my github. There is &lt;a href="https://github.com/yohei1126/embeddedtdd/blob/master/src/LedDriver/LedDriver.c" target="_blank"&gt;product code&lt;/a&gt; and &lt;a href="https://github.com/yohei1126/embeddedtdd/blob/master/unity/LedDriver/LedDriverTest.c" target="_blank"&gt;test code&lt;/a&gt; for LED driver.&lt;br /&gt;
&lt;br /&gt;
Key point of this example is a dependency injection at a constructor. Passing writing port address to constructor makes software independent with hardware. We can do unit test on both of own computer and the evaluation board.&lt;br /&gt;
&lt;br /&gt;
This driver has writing port only. State of LED driver is stored at variable ledsImage once, then write to the port. This was an issue that software engineer and hardware engineer discussed in the book.&lt;br /&gt;
&lt;br /&gt;
You might think that this example is quite simple and there are more difficult examples in real world. I think basic idea is the same as this example, which is interface design between software and hardware and low coupling software design against hardware and other software modules.&lt;br /&gt;
&lt;br /&gt;
I will held &lt;a href="http://atnd.org/events/26137" target="_blank"&gt;the third monthly meeting&lt;/a&gt; of "Test Driven Development for Embedded C" book club in Tokyo and see this problem deeply : )&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>The book club of "Test Driven Development for Embedded C" started in Tokyo, Japan</title><link>http://legobokueng.blogspot.com/2012/02/book-club-of-test-driven-development.html</link><category>book</category><category>CppUTest</category><category>embedded</category><category>TDD</category><category>unity</category><author>noreply@blogger.com (yohei)</author><pubDate>Mon, 6 Feb 2012 00:11:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-3985144525492314009</guid><description>&lt;br /&gt;
The book club started today : )&lt;br /&gt;
&lt;br /&gt;
Core members of the book club met at "TDD Boot Camp Tokyo for C++" in 2011. This was the event that embedded or game engineers got together and had a TDD practice.&lt;br /&gt;
&lt;br /&gt;
At that time, I wrote my position paper like this: "I want to learn TDD for embedded software, so I want to hold a book club of Test Driven Development for Embedded C. Why don't you join? " To my delight, two engineers said to me that they would join. After I called for participants of this book club on Twitter, 10 engineers joined! That was how we started.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;What is motivation of participants?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Participants are embedded software engineers of MFP, medical devices, communication devices, home electronics and etc. We have common point. We have legacy code, code without tests, in our projects and have a hard time of debugging. This is unpredictable activity.&lt;br /&gt;
&lt;br /&gt;
To reduce time of debugging, to discovery bugs rapidly, we are paying attention to TDD.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;What we read today&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Today we read the first three chapters.&lt;br /&gt;
&lt;br /&gt;
The first chapter&amp;nbsp;"Test Driven Development"&amp;nbsp;introduces what is TDD, purpose of TDD and benefits of TDD.&lt;br /&gt;
&lt;br /&gt;
TDD is one of design techniques, so I can say that I do TDD to improve software design. But the biggest purpose of TDD is to prevent from bugs by getting quick feedback of test results and find mistake rapidly.&lt;br /&gt;
&lt;br /&gt;
The second chapter&amp;nbsp;"Test Driving Tools and Conventions"&amp;nbsp;introduces Unity for C and CppUTest for C/C++ as testing frameworks that were introduced in this book.&lt;br /&gt;
&lt;br /&gt;
CppUTest has a function to add tests into test suite automatically. This is very good for TDD.&amp;nbsp;And it was developed with old function of C++ so that old compiles can compile it.&lt;br /&gt;
&lt;br /&gt;
Unity doesn't have a function to add tests automatically but there is ruby script to do it. It is very convenient.&lt;br /&gt;
&lt;br /&gt;
The third chapter&amp;nbsp;"Starting a C Module "&amp;nbsp;introduces the steps of TDD. We try practical example, LED driver. In this chapter, we can learn embedded software version of Dependency Injection. That is to put physical address of LED driver at runtime. With this way, we can separate software from hardware and we can get benefit to test without hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;What we didn't understand&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We didn't understand following two points.&lt;br /&gt;
&lt;br /&gt;
The first point. Can we design like this LED Driver example in real project? This example is OK because it is so simple. But in real project, dependency of hardware is so complicated. Changing physical address affects other hardware in some way. So we don't design like this.&lt;br /&gt;
&lt;br /&gt;
Maybe, we can test only where we want to test without representing complicated hardware interaction. (I don't know how to do it)&lt;br /&gt;
&lt;br /&gt;
Or, we don't test bottom of embedded software but focus on upper layer, which is hardware abstraction layer. That is easier to test than bottom layer. In this way, we can't test everything but we can reduce debugging time.&lt;br /&gt;
&lt;br /&gt;
The second point is how we test mass of legacy code. If we need too much time before starting TDD, we lose motivation. To do TDD for real project, we need way to reduce initial cost and introduce TDD incrementally. The 13th chapter may introduce how to fight against legacy code. In near future, we can learn how to do it : )&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fff2cc;"&gt;&lt;span style="font-size: large;"&gt;How I felt after first time&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We found that we have so many unknowns this time but we felt joyful that we got together at this book club. I want to say thank you to organizer of "TDD Boot Camp Tokyo for C++" and Mr. James W. Grenning. the author of Test Driven Development for Embedded C.&lt;br /&gt;
&lt;br /&gt;
My job is to make the place that participants can learn a lot and enjoy : )&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>How to compile googletest with gcc and CMake on Mac OS X SnowLeopard</title><link>http://legobokueng.blogspot.com/2011/09/how-to-compile-googletest-with-gcc-and.html</link><category>C++</category><category>cmake</category><category>g++</category><category>gcc</category><category>googletest</category><category>MacOS</category><author>noreply@blogger.com (yohei)</author><pubDate>Wed, 21 Sep 2011 08:01:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-7547736714588452484</guid><description>I often found the way with Visual Studio C++ or XCode on web but I don't use them on my laptop. So I researched the way without IDE.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;u&gt;My settings&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Mac OS X 10.6.8（Snow Leopard）&lt;/li&gt;
&lt;li&gt;&amp;nbsp;gcc 4.5.4&lt;/li&gt;
&lt;li&gt;cmake 2.8.5&lt;/li&gt;
&lt;/ul&gt;
According to googletest's &lt;a href="http://code.google.com/p/googletest/source/browse/trunk/README"&gt;README&lt;/a&gt;, you need more than 2.6.4 of cmake but the version of gcc is not clear.&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 18px; line-height: 24px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Process&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;Get source code of google test from svn repository&lt;/li&gt;
&lt;li style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;Build googletest with cmake&lt;/li&gt;
&lt;li style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;Create source file that has main function&lt;/li&gt;
&lt;li style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;Create test code&lt;/li&gt;
&lt;li style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;Build test code with g++&lt;/li&gt;
&lt;li style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;Run the test&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 18px; line-height: 24px;"&gt;&lt;b&gt;&lt;u&gt;(1) Get source code of google test from svn repository&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;
&lt;/span&gt;&lt;br /&gt;
Place the source where you want.&lt;br /&gt;
&lt;pre class="brush: shell"&gt;svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;u&gt;(2) Build googletest with cmake&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Make a directory that cmake runs, which is good for anywhere. &amp;nbsp;{GTEST_DIR} is where theres is googletest. It is success when you get libgtest.a and libgtest_main.a after build.
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class="brush: shell"&gt;mkdir mybuild
cd mybuild
cmake ${GTEST_DIR}
make
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;(3) Create source file that has main function&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px;"&gt;
&lt;/span&gt;&lt;br /&gt;
Create source file that has main function. You can find sample as below link.&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="line-height: 22px;"&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px;"&gt;&lt;a href="http://code.google.com/p/googletest/source/browse/trunk/src/gtest_main.cc" style="color: #2288bb; text-decoration: none;"&gt;http://code.google.com/p/googletest/source/browse/trunk/src/gtest_main.cc&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px;"&gt;
&lt;/span&gt;&lt;br /&gt;
You have to call below functions in main function.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;testing::InitGoogleTest(&amp;amp;argc, argv);&amp;nbsp;&lt;/li&gt;
&lt;li&gt;RUN_ALL_TESTS();&lt;/li&gt;
&lt;/ul&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px;"&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;#include &amp;lt;iostream&amp;gt;
#include "gtest/gtest.h"

GTEST_API_ int main(int argc, char **argv) {
  std::cout &amp;lt;&amp;lt; "Running main() from testmain.cc\n";

  testing::InitGoogleTest(&amp;amp;argc, argv);
  return RUN_ALL_TESTS();
}
&lt;/pre&gt;
&lt;b&gt;&lt;u&gt;(4) Craeate test code&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;#include "gtest/gtest.h"

TEST(firstTest, abs)
{
  EXPECT_EQ(1, abs( -1 ));
  EXPECT_EQ(1, abs( 1 ));
}
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;u&gt;(5) Build test code with g++&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
You have to add the directory where there is googletest's header file into include path. You also have to build test code with static library of google test that you made at (2).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As below, testmain.cc is a file that has main function and mytest.cc is a file that has test code.&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px; line-height: 22px;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px; line-height: 22px;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px; line-height: 22px;"&gt;&lt;/span&gt;&lt;br /&gt;

&lt;pre class="brush: shell"&gt;
g++ -I{GTEST_DIR}/include testmain.cc mytest.cc libgtest.a libgtest_main.a -o mytes
&lt;/pre&gt;

&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px; line-height: 22px;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 16px; line-height: 22px;"&gt;
&lt;/span&gt;&lt;b&gt;&lt;u&gt;(6) Run the test&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;Run the test. It is success if you see the test result as below. &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: white; font-size: 16px; line-height: 22px;"&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="background-color: white; clear: both; font-size: 16px; line-height: 22px; text-align: center;"&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgYlvVgNBPDn_W3xD27n8q2lYFvIrYJZ_rgfIBg53OVBHj_j70lDtR1qD6aAW5UXqSzQaleaXOFsf3iX-1iAGFQKOD3aYgWrNmaAapUYcuIuNXp8M0NRHudXkCAcQZ78V_VQfR0qVVKFM/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588%25EF%25BC%25882011-09-20+23.07.41%25EF%25BC%2589.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgYlvVgNBPDn_W3xD27n8q2lYFvIrYJZ_rgfIBg53OVBHj_j70lDtR1qD6aAW5UXqSzQaleaXOFsf3iX-1iAGFQKOD3aYgWrNmaAapUYcuIuNXp8M0NRHudXkCAcQZ78V_VQfR0qVVKFM/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588%25EF%25BC%25882011-09-20+23.07.41%25EF%25BC%2589.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: white; font-size: 16px; line-height: 22px;"&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;"&gt;
&lt;/span&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgYlvVgNBPDn_W3xD27n8q2lYFvIrYJZ_rgfIBg53OVBHj_j70lDtR1qD6aAW5UXqSzQaleaXOFsf3iX-1iAGFQKOD3aYgWrNmaAapUYcuIuNXp8M0NRHudXkCAcQZ78V_VQfR0qVVKFM/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588%25EF%25BC%25882011-09-20+23.07.41%25EF%25BC%2589.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>auto_ptr and shared_ptr for resource management</title><link>http://legobokueng.blogspot.com/2011/09/autoptr-and-sharedptr-for-resource.html</link><category>C++</category><category>EffectiveC++</category><category>TIPS</category><author>noreply@blogger.com (yohei)</author><pubDate>Tue, 20 Sep 2011 16:49:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-2220737165461881640</guid><description>&lt;br /&gt;
Resource management is common troublesome issue for C/C++ programmer. If you don't free a resource that you acquire, you will run out of resource some day.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://aristeia.com/"&gt;Scott Meyers&lt;/a&gt;, the author of &lt;a href="http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876"&gt;Effective C++&lt;/a&gt;, recommended RAII(Resource Acquisition Is Initialization) for resource management. There are several ways to do it but simple way is to use auto_ptr and shared_ptr if your concern is about memory.&lt;br /&gt;
&lt;br /&gt;
Give you a couple of example.&lt;br /&gt;
&lt;br /&gt;
In this example, an error occurs before you delete an object that you acquirer, so resource leak happens. So you have to care about somebody except you because he can write a code that resource leak happens.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;Investment* createInvestment() {
  return new Investment;
}

// an example of memory leak                                                                              
void f1(){
  std::cout &amp;lt;&amp;lt; "f1" &amp;lt;&amp;lt; std::endl;
  try {
    Investment *pInv = createInvestment();

    //If some one write code that can throws error,                                                       
    //destructor of Investment may not be called.                                                         
    throw 1;

    delete pInv;
  } catch(...) {
    std::cout &amp;lt;&amp;lt; "catch" &amp;lt;&amp;lt; std::endl;
  }
}
&lt;/pre&gt;
&lt;br /&gt;
In this example, I used auto_ptr for resource management. Now you don't need to care about resource. When the control flow leaves the scope, auto_ptr frees a pointer.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;//an example of auto_ptr                                                                                  
void f2(){
  std::cout &amp;lt;&amp;lt; "f2" &amp;lt;&amp;lt; std::endl;

  try {
    //If you pass a pointer to auto_ptr,                                                                  
    //auto_ptr frees it when the control flow leaves the scope.                                           
    std::auto_ptr&lt;investment&gt; pInv(createInvestment());
    throw 1;
  } catch (...) {
    std::cout &amp;lt;&amp;lt; "catch" &amp;lt;&amp;lt; std::endl;
  }
}
&lt;/investment&gt;&lt;/pre&gt;
&lt;br /&gt;
auto_ptr has several limitation. For example several auto_ptr cannot contain the same pointer. So you cannot put auto_ptr into STL container because STL container assume that every object can copy.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;void f3(){
  std::cout &amp;lt;&amp;lt; "f3" &amp;lt;&amp;lt; std::endl;
  //several auto_ptr cannot contain the same pointer.                                                     
  //If you copy auto_ptr, then the source becomes null pointer and                                        
  //the destination can contain the pointer.                                                              
  Investment* pInv1 = createInvestment();
  std::auto_ptr&lt;investment&gt; pInv2(pInv1);
  std::auto_ptr&lt;investment&gt; pInv3(pInv2);
}
&lt;/investment&gt;&lt;/investment&gt;&lt;/pre&gt;
&lt;br /&gt;
If you need to contain the same pointer with several auto_ptr, you should use shared_ptr in Boost Libraries. But shared_ptr has limitation. You cannot use it for an array.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;void f4(){
  //several shared_ptr objects can have the same pointer.                                                 
  boost::shared_ptr&lt;investment&gt; pInv1(createInvestment());
  boost::shared_ptr&lt;investment&gt; pInv2(pInv1);

  //If every shared_ptr objects are freed, then the pointer                                               
  //that they have also freed.                                                                            
}
&lt;/investment&gt;&lt;/investment&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a sample code for this entry.&lt;br /&gt;
&lt;a href="https://github.com/yohei1126/effectivecpp/blob/master/chap3/term13/Investment.cpp"&gt;https://github.com/yohei1126/effectivecpp/blob/master/chap3/term13/Investment.cpp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There are other ways for resource management. I will write it some day :)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>One liner is a good way to do some smaller jobs in your life</title><link>http://legobokueng.blogspot.com/2011/09/one-liner-is-good-way-to-do-some.html</link><category>OneLiner</category><category>Perl</category><category>Programming</category><category>TIPS</category><category>UNIX</category><author>noreply@blogger.com (yohei)</author><pubDate>Sat, 17 Sep 2011 06:56:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-7420164322054828977</guid><description>&lt;br /&gt;
Perl one liner is a good way to do some smaller jobs in daily life like renaming a file name or showing a file list.&lt;br /&gt;
&lt;br /&gt;
You may think that you can do it by writing a script or a program. But one of the advantages of one liner is that you can combine it with other command like UNIX pipe and filter.&lt;br /&gt;
&lt;br /&gt;
Here is an example of Perl one liner. You can pick up source files and header files for C/C++ language. It is not so difficult.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: shell"&gt;perl -MFile::Find -e 'find(sub {print "$File::Find::name\n" if $File::Find::name =~ /\.(c|cpp|h)$/ }, ".")'&lt;/pre&gt;
&lt;br /&gt;
You may say that you want to write other language. It is OK. You can use any LL but you may have some limitation in older OS. For example, I am using Open VMS, which is OS by HP, and I can use only Perl in LL. It is good to learn basic of other language for you.&lt;br /&gt;
&lt;br /&gt;
I hope you will write some one liner in your work :)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Best Cow Line (POJ 3617)</title><link>http://legobokueng.blogspot.com/2011/09/best-cow-line-poj-3617.html</link><category>Algorithm</category><category>C++</category><author>noreply@blogger.com (yohei)</author><pubDate>Mon, 5 Sep 2011 17:13:00 +0900</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8130227023372706902.post-1152759101507418588</guid><description>You actually can solve &lt;a href="http://poj.org/problem?id=3617"&gt;the problem No. 3617&lt;/a&gt; in POJ, Peking University Judge Online, with the greedy algorithm.&lt;br /&gt;
&lt;br /&gt;
The author of "&lt;a href="http://www.amazon.co.jp/dp/4839931992"&gt;Programming contest challenge book&lt;/a&gt;" says that the greedy algorithm is effective for a problem that deal with&amp;nbsp;dictionally&amp;nbsp;order.&lt;br /&gt;
&lt;br /&gt;
Here is more simple description of POJ 3617.&lt;br /&gt;
&lt;br /&gt;
- - - - -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Description:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
You have a string S that length is N and make a string T that length is N. At the beginning, length of S is zero. You can do either operation from below:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;- delete the first character of S and add it into the end of T&lt;br /&gt;
&amp;nbsp;- delete the last character of S and add it into the end of T&lt;br /&gt;
&lt;br /&gt;
Make T as small as in dictionary order.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Constraint:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
1 &amp;lt;= N &amp;lt;= 2000&lt;br /&gt;
string s can contain small alphabet.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Sample Input:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
N = 6&lt;br /&gt;
S = "ABCDBCB"&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Sample Output:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
ABCBCD&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;My Solution:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://github.com/yohei1126/pccb/blob/master/beginner/search/GreedyAlgorithm/BestCowLine/BestCowLine.cpp"&gt;https://github.com/yohei1126/pccb/blob/master/beginner/search/GreedyAlgorithm/BestCowLine/BestCowLine.cpp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>