<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6248914526570463298</id><updated>2012-02-18T16:13:06.730-10:00</updated><category term='wattdepot'/><title type='text'>Embedded Edge</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-3384253617101592212</id><published>2012-02-18T16:13:00.000-10:00</published><updated>2012-02-18T16:13:06.741-10:00</updated><title type='text'>Not bad for a birthday party.</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/-mkLXTmPVz_M/T0BXErUhaNI/AAAAAAAAAFA/qW6eRQEqD_4/s1600/IMG_2596.JPG" imageanchor="1" style="clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"&gt;&lt;img border="0" height="212" src="http://2.bp.blogspot.com/-mkLXTmPVz_M/T0BXErUhaNI/AAAAAAAAAFA/qW6eRQEqD_4/s320/IMG_2596.JPG" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;Lisa's birthday party featuring&amp;nbsp;&lt;a href="http://vmrock.com/"&gt;Virgin Mary&lt;/a&gt;,&amp;nbsp;fire-spinners and a lot of drunk&amp;nbsp;physicists. Thanks to everyone who showed up! Many thanks to all the performers!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Happy birthday&amp;nbsp;sweetheart!&amp;nbsp;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-5D-iNA8L0m8/T0BXZTqLK9I/AAAAAAAAAFI/SN5PF8PMDvI/s1600/IMG_2712.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="424" src="http://4.bp.blogspot.com/-5D-iNA8L0m8/T0BXZTqLK9I/AAAAAAAAAFI/SN5PF8PMDvI/s640/IMG_2712.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-bL-22bqA5ig/T0BZsv5NaUI/AAAAAAAAAFY/nqlwKMQJZ0c/s1600/IMG_2727.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-bL-22bqA5ig/T0BZsv5NaUI/AAAAAAAAAFY/nqlwKMQJZ0c/s640/IMG_2727.JPG" width="424" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-bKLabm5QdbQ/T0BaT2jMaLI/AAAAAAAAAFg/wdJU4Mc3mxw/s1600/IMG_2600.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-bKLabm5QdbQ/T0BaT2jMaLI/AAAAAAAAAFg/wdJU4Mc3mxw/s640/IMG_2600.JPG" width="426" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-3384253617101592212?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/3384253617101592212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2012/02/not-bad-for-birthday-party.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/3384253617101592212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/3384253617101592212'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2012/02/not-bad-for-birthday-party.html' title='Not bad for a birthday party.'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-mkLXTmPVz_M/T0BXErUhaNI/AAAAAAAAAFA/qW6eRQEqD_4/s72-c/IMG_2596.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-2380657474199760510</id><published>2012-02-13T13:48:00.000-10:00</published><updated>2012-02-13T13:48:00.658-10:00</updated><title type='text'>i915 finally (mostly) stable</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-tfA2Zk76hs4/TzmfGHuDdTI/AAAAAAAAAE4/EYNc6BAtPqE/s1600/desktop.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-tfA2Zk76hs4/TzmfGHuDdTI/AAAAAAAAAE4/EYNc6BAtPqE/s320/desktop.png" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Its been two months since I got my UX31 zenbook, and nearly a year since the sandy bridge CPU/GPU combo chips hit the market. Initially the linux support was very much lacking: with the rc6 powersaving enabled I was getting random graphics glitches and reboots, without the&amp;nbsp;power-saving&amp;nbsp;options I was getting 2.5 hours of battery life plagued by less frequent reboots.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;This all changed with the a string of commits by &lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;Daniel Vetter to the 3.2.6 kernel tree. Having compiled this kernel I did not experience any more crashes, graphics glitches, and the battery life is now solid 7 hours.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;I would like to send a warm thank you to Mr. Vetter for making my laptop usable for software development.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-2380657474199760510?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/2380657474199760510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2012/02/i915-finally-mostly-stable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2380657474199760510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2380657474199760510'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2012/02/i915-finally-mostly-stable.html' title='i915 finally (mostly) stable'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-tfA2Zk76hs4/TzmfGHuDdTI/AAAAAAAAAE4/EYNc6BAtPqE/s72-c/desktop.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-4238735320724144592</id><published>2012-02-12T13:38:00.000-10:00</published><updated>2012-02-12T13:38:37.030-10:00</updated><title type='text'>Laptop Ants</title><content type='html'>I turned on my shiny new ASUS zenbook this morning only to find that it got very buggy. Around 50 very tiny ants spilled out of the cooling vents instantly, followed by a steady stream of about 10 a minute. One might make an argument that the are doing me a favor by cleaning out the dead skin sells and microscopic bits of food which get trapped in the keyboard, however spilling a cup full of ants during say a meeting with my PI might look a bit unprofessional....&lt;br /&gt;In order to remedy the situation I am going to try to run the cpu/gpu at full speed and frequency until its toasty 89C. Hopefully ants will get the hint and decide to abandon their new found home. Wish me luck.&lt;br /&gt; &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-4238735320724144592?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/4238735320724144592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2012/02/laptop-ants.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4238735320724144592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4238735320724144592'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2012/02/laptop-ants.html' title='Laptop Ants'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-2448927359847909551</id><published>2012-01-29T16:02:00.001-10:00</published><updated>2012-01-29T16:02:20.972-10:00</updated><title type='text'>cdce62005</title><content type='html'>Clock distribution for ADCs is hard. Especially so if your design requirements include less then 20ps jitter and more then 10 channels. Luckily IC&amp;nbsp;engineers&amp;nbsp;at TI came up with pretty awesome of the shelf solution. &lt;a href="http://www.ti.com/product/cdce62005"&gt;CDCE62005&lt;/a&gt;&amp;nbsp;is a 5 channel LVDS compatible clock generator/cleaner, which&amp;nbsp;promises1ps jitter, and up to 1.175 Ghz operation, and easy SPI control. Furthermore at 20$ a piece it wont break your budget.&lt;br /&gt;&lt;a href="http://code.google.com/p/mtc-cajipci/"&gt;Cajipci&lt;/a&gt; parts are mostly picked out, as long as the specification review goes well, we will finish schematic capture and move to layout in a couple weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-2448927359847909551?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/2448927359847909551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2012/01/cdce62005.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2448927359847909551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2448927359847909551'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2012/01/cdce62005.html' title='cdce62005'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-829291477952036026</id><published>2012-01-19T16:04:00.000-10:00</published><updated>2012-01-19T16:04:59.187-10:00</updated><title type='text'>CAJIPCI</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-RyzzQYoXKOI/TxjKEsNNcKI/AAAAAAAAAEs/kpt0undfZc4/s1600/logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://2.bp.blogspot.com/-RyzzQYoXKOI/TxjKEsNNcKI/AAAAAAAAAEs/kpt0undfZc4/s200/logo.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;Another semester, another set of responsibilities. This time I along am tasked with developing a CPCI circuit board with capable of programming, distributing a clock to and possibly triggering a neutrino detector.&lt;br /&gt;I have written PCI drivers and firmware in the past, however this is my first attempt at creating a circuit board. You can follow my progress at: &lt;a href="http://code.google.com/p/mtc-cajipci/"&gt;http://code.google.com/p/mtc-cajipci/&lt;/a&gt;&lt;br /&gt;The board name is CAJIPCI which stands for Clock And JTAG In PCI. I tried very hard to come up with a witty acronym, but this is the best I can do.&lt;br /&gt;So far all I have been trying to figure out the circuit board CAD software called PADS. PADS is a very nice and complete design suit, however I have a couple gripes with it:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Only runs under windows. It would be nice to use eagle, but we don't have the license for it.&lt;/li&gt;&lt;li&gt;As with all design software stability leaves much to be desired.&lt;/li&gt;&lt;/ul&gt;Hopefully if this goes well our group will have a working detector by the end of summer. Wish me luck, and till next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-829291477952036026?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/829291477952036026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2012/01/cajipci.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/829291477952036026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/829291477952036026'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2012/01/cajipci.html' title='CAJIPCI'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-RyzzQYoXKOI/TxjKEsNNcKI/AAAAAAAAAEs/kpt0undfZc4/s72-c/logo.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-4829417585349188479</id><published>2011-12-14T03:30:00.002-10:00</published><updated>2011-12-14T03:42:42.734-10:00</updated><title type='text'>Lessons learned from continuous integration.</title><content type='html'>I spent a better part of my semester studying continuous integration. I started by participating in a team exercise to build&amp;nbsp;&lt;a href="http://embeddededge.blogspot.com/2011/11/wattdepot-cli.html"&gt;client&lt;/a&gt; software to communicate with a Wattdepot server. &lt;a href="http://embeddededge.blogspot.com/2011/12/three-pillar-and-continious-integration.html"&gt;Then&lt;/a&gt; each teams switched and reviewed each others work based on the documentation, issue tracker, build server&amp;nbsp;statistics, and of course the quality of code itself. Finally we extended the other teams&amp;nbsp;code base&amp;nbsp;by adding&amp;nbsp;additional&amp;nbsp;functionality.&lt;br /&gt;Original code was&amp;nbsp;completely&amp;nbsp;synchronous: once user entered a command he was presented with the output and redirected back to the prompt. The new functionality however had an&amp;nbsp;asynchronous&amp;nbsp;component. We implemented the following additional commands:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;u&gt;monitor-goal&lt;/u&gt;&amp;nbsp;:&amp;nbsp;Monitors power&amp;nbsp;consumption&amp;nbsp;and output&amp;nbsp;whether&amp;nbsp;it exceed the baseline value.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;u&gt;set-baseline&lt;/u&gt; : Allows user to set the baseline for monitor-baseline.&lt;/li&gt;&lt;li&gt;&lt;u&gt;monitor-power&lt;/u&gt;&amp;nbsp;: Monitors power consumption and outputs it to the screen with a time-stamp.&lt;/li&gt;&lt;/ul&gt;Monitor command executed in a loop at a given interval, waiting for user to hit the return key, while set-baseline returns&amp;nbsp;immediately&amp;nbsp;after the baseline is set.&lt;br /&gt;I found this portion of the&amp;nbsp;exercise&amp;nbsp;to be my favorite. Not only was I working on top of a well build system, but the problems at hand were no longer trivial.(In fact I think we might have&amp;nbsp;over-complicated&amp;nbsp;the implementation.) There were two main&amp;nbsp;challenges&amp;nbsp;in this project:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;u&gt;set-baseline&lt;/u&gt;&amp;nbsp;and &lt;u&gt;monitor-goal&lt;/u&gt;&amp;nbsp;need to communicate the baseline values.&lt;/li&gt;&lt;li&gt;monitor commands need to run&amp;nbsp;asynchronously&amp;nbsp;and at a given interval, while waiting for user input.&lt;/li&gt;&lt;/ol&gt;We solved the first problem by implementing a&amp;nbsp;singleton&amp;nbsp;class which maintained a map of baselines for various location we were able to monitor. The second problem was solved using threads. Once the input to the command was processed, main thread would start a worker thread and then sleep and&amp;nbsp;periodically while checking for user input. The worker thread on the other hand would sleep for a specified interval, perform its task and then go back to sleep.&lt;br /&gt;I found the other teams code base well documented and easy to understand. In order to make my new command available to the system all I had to do was change one line! Makes me feel foolish for implementing internal reflection in our code. The only complaint I have with the code-base, was the command unit testing. All tests for commands were inside a single class. This works well, if there is only one person working on the commands, however with a team of three people editing a single file we were bound to have version control nightmares, so the tests were&amp;nbsp;refactored.&lt;br /&gt;I mentioned the three pillars of software&amp;nbsp;engineering&amp;nbsp;on this site before, and I will mention them again. The first two are fairly easy to test: all you need to do is try to use the software. The last one however requires some work. In order to check if a software project is developer friendly one must dive into the code and documentation, and piece together what the original developer was thinking. This can teach you quite a bit about software development, or make you long for a new career.&lt;br /&gt;Working with third party code is always an adventure. While most open source projects come with a well groomed code-base and&amp;nbsp;excellent&amp;nbsp;documentation, some of the more obscure projects will make you wish you implemented them from scratch.&amp;nbsp;Luckily&amp;nbsp;this time developers put a lot of work into the project, and it shows by how easy it was for our team to make it even better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-4829417585349188479?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/4829417585349188479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/12/lessons-learned-from-continuous.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4829417585349188479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4829417585349188479'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/12/lessons-learned-from-continuous.html' title='Lessons learned from continuous integration.'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-7023792461277830293</id><published>2011-12-01T23:19:00.001-10:00</published><updated>2011-12-01T23:25:22.764-10:00</updated><title type='text'>Three pillars and the quest for intelligent group software development</title><content type='html'>&lt;style type="text/css"&gt; &lt;!--  @page { margin: 0.79in }  P { margin-bottom: 0.08in }  H3 { margin-bottom: 0.08in }  H3.cjk { font-family: "unifont" }  H3.ctl { font-family: "FreeSans" } --&gt; &lt;/style&gt;   &lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-weight: normal;"&gt;I mentioned &lt;a href="http://embeddededge.blogspot.com/2011/08/three-pillars.html"&gt;three pillars&lt;/a&gt; on this blog before. They provide a very simple methodology for judging  quality of a software project. My software engineering class is currently covering &lt;a href="http://en.wikipedia.org/wiki/Continuous_integration"&gt;continuous integration&lt;/a&gt; so my hale-aloha team decided to apply the three pillars along with some concepts of continuous integration to our software projects. I attempted to analyze a wattdepot project located &lt;a href="http://code.google.com/p/hale-aloha-cli-jz/"&gt;here&lt;/a&gt;. This software project had the same specifications as my &lt;a href="http://embeddededge.blogspot.com/2011/11/wattdepot-cli.html"&gt;wattdepot-cli&lt;/a&gt;, however the implementation is entirely unique.&lt;/span&gt;&lt;/span&gt;&lt;div align="LEFT"&gt;&lt;/div&gt;&lt;h3 class="western"&gt;Does the system accomplish a useful task?&lt;/h3&gt;I was able to install the software by downloading the distribution package from the projects download page and running the provided jar file. On execution I was greeted by a friendly message:&lt;br /&gt;&lt;pre class="brush: asm"&gt;Connected to the Hale Aloha WattDepot server.&lt;br /&gt;Type help for a list of possible commands.&lt;br /&gt;cli &amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-style: normal;"&gt;The &lt;/span&gt;&lt;i&gt;help&lt;/i&gt;&lt;span style="font-style: normal;"&gt; command provided a nicely formatted help message describing each available command. I was able to execute all of the command, and the data returned was in the ballpark of what it should be. The only problem I encountered with valid input was that the &lt;/span&gt;&lt;i&gt;daily-energy, energy-since, &lt;/i&gt;&lt;span style="font-style: normal;"&gt;and&lt;/span&gt;&lt;i&gt; rank-towers&lt;/i&gt;&lt;span style="font-style: normal;"&gt; commands did not support current date as the argument. &lt;/span&gt;&lt;br /&gt;&lt;div style="font-style: normal;"&gt;On the other hand I found that the error checking on the input could use a bit more work. Using Wireshark I found that the program still made a request to the server even if I pass an argument to the future(2034-11-30), or an argument which matches the regex but makes no sense as a time stamp(2011-11-88). &lt;span style="font-style: normal;"&gt;Instead of validating the dates on the client side, this project uses the server as the error checking mechanism. &lt;/span&gt;On the bright side if a wrong number of arguments was passed to the program, it behaved as it should, by printing the associated help message.&lt;/div&gt;&lt;div style="font-style: normal;"&gt;Overall I think this software project produced a nice and usable program. Unfortunately the time constrains associated with the development resulted in a couple rough edges.&lt;br /&gt;&lt;/div&gt;&lt;h3 class="western" style="font-style: normal;"&gt;Can an external user can successfully install and use the system?&lt;/h3&gt;&lt;div style="font-style: normal;"&gt;As described in the first question I was able to download the distribution archive from the downloads page. The &lt;a href="http://code.google.com/p/hale-aloha-cli-jz/wiki/UserGuide"&gt;user guide&lt;/a&gt; included installation instruction and the software requirements for the package. With Java build once run anywhere model I was able to get the code up and running with minimal hassle.&lt;/div&gt;&lt;div style="font-style: normal;"&gt;Furthermore the version number of the build was attached to the jar file for easy identification.&lt;br /&gt;&lt;/div&gt;&lt;h3 class="western" style="font-style: normal;"&gt;Can an external developer successfully understand and enhance the system?&lt;/h3&gt;&lt;div style="font-style: normal;"&gt;&lt;a href="http://code.google.com/p/hale-aloha-cli-jz/wiki/DeveloperGuide"&gt;Developer guide&lt;/a&gt; is packed with helpful info. It provides guidelines for submitting code, supplied a links to a build server, as well as requirements for code submissions. Furthermore developer guide provided instructions to build Javadoc documentation. &lt;/div&gt;&lt;div style="font-style: normal;"&gt;Documentation build without a hitch and it looked complete and thorough. In fact it was so clear I was able to understand the inner-working of the program just by looking at the generated documentation. All of the class names indicate their purpose. Furthermore a standard command interface provides a very easy to implement additional commands.&lt;/div&gt;&lt;div style="font-style: normal;"&gt;Software is complimented by a large array of tests which provide 83% test coverage according to Jacoco. Tests covered all of the relevant functions and were almost always well partitioned. However the test for the current date are missing from the source, which I imagine is the cause of the errors I was reciving in question 1. It seems that while the test coverage is almost perfect, however it may be beneficial to re-partition the test cases.  &lt;/div&gt;&lt;div style="font-style: normal;"&gt;After examining documentation I build the system from source via the directions provided in the developer manual. It build without a hitch and ran just as the provided jar. Furthermore the system verified successfully using the ant verify directive described in the documentation.&lt;/div&gt;&lt;div style="font-style: normal;"&gt;At that point I finally dove into the code. I found that the code base was well commented and followed the required guidelines. Methods and local variable names were well selected, and descriptive. There were no god classes, and no dead code.&lt;/div&gt;&lt;span style="font-style: normal;"&gt;Next I examined the issue page. I found between the two developers the work was divided evenly, with one developer working on the commands and the other working on the command interface and command processor. I would think that a novice contributor could use the &lt;/span&gt;Issues page to determine which developer would be the best person to communicate with on a specific topic.&lt;br /&gt;Finally I checked the continuous integration server. I found that all but one of the commits to the source were done for a specific issue, which goes with the main methodology of the continuous integration. While there were several days(Nov 23 – Nov 25) where the build was broken, it can be attributed to a hale-aloha server crash.  &lt;br /&gt;I think that the developers put together a well build ecosystem for software development, and set an excellent example for new developers. I don't consider myself a strong Java developer, non the less I was able to follow the development flow, and software design that my classmates put forward.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-7023792461277830293?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/7023792461277830293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/12/three-pillar-and-continious-integration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/7023792461277830293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/7023792461277830293'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/12/three-pillar-and-continious-integration.html' title='Three pillars and the quest for intelligent group software development'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-4777087321755251695</id><published>2011-11-28T22:32:00.001-10:00</published><updated>2011-11-29T10:28:30.915-10:00</updated><title type='text'>Wattdepot cli</title><content type='html'>Having gotten my feet wet with &lt;a href="http://embeddededge.blogspot.com/2011/11/wattdepot-fun.html"&gt;Wattdepot&lt;/a&gt;, I just could not get enough. I and a couple of my fellow grad students decided to, create a simple command line driven client to a Wattdepot server. We made the core of the program use internal reflection which made it extremely easy to add extra functionality based on the command interface. Having never played with internal reflection before, I had a hard time following my colleges core code, however I found it easy to create commands based on the API. &lt;br /&gt;Having worked on the team based project before, we found it fairly easy to integrate myself with the rest of the developers. We managed to develop a complete system with good test coverage, and usable documentation.&lt;br /&gt;In order to further integrate our team further, we used a Jenkins build server. This allowed us to quickly catch problems in our code without having dig through the revision history. In combination with JUnit testing allowed us to maintain a vary good build history with only a single failed build, during the development.&lt;br /&gt;In the end we managed to put together a nice software package. Our program was able to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Display current power consumption by a tower or a lounge.&lt;/li&gt;&lt;li&gt;Compute the daily energy use by a tower or a lounge.&lt;/li&gt;&lt;li&gt;Compute energy consumed by a tower or a lounge from a user specified date.&lt;/li&gt;&lt;li&gt;Rank towers based on energy consumption for a user specified time interval.&lt;/li&gt;&lt;/ul&gt;Well there you go. To do efficient team based software development you need the right tools and the right team.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-4777087321755251695?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/4777087321755251695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/11/wattdepot-cli.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4777087321755251695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4777087321755251695'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/11/wattdepot-cli.html' title='Wattdepot cli'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-7753834907311584926</id><published>2011-11-07T21:06:00.000-10:00</published><updated>2011-11-07T21:06:57.062-10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wattdepot'/><title type='text'>Wattdepot fun</title><content type='html'>&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;A few days ago I discovered an interesting software project called &lt;a href="http://code.google.com/p/wattdepot/"&gt;Wattdepot&lt;/a&gt;. It aims to monitor energy consumption habits, by combining output of any number of sensors, in one place. This project is based around Java daemon which monitors communication with sensors, and a client side library for communication with the server. I decided to put my Java skills to a test and write a few simple apps for communicating with the Wattdepot server.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;By the end of the day I ended up with six programs:&lt;/span&gt;&lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;A program which lists all data sources and their descriptions.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Compute the latency for all available source.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Build and print the source hierarchy.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Calculate the energy usage for the previous day. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Compute the peak usage for the previous day.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Compute the average energy usage.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;I think between these programs there is enough functionality to create a fairly complete resource usage monitor.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;The only problem I encountered during this exercise was the multitude of calendars available in java. There is the &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/xml/datatype/XMLGregorianCalendar.html" title="class in javax.xml.datatype"&gt;XMLGregorianCalendar&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt; which is used in the wattdepot API, there is a &lt;a href="http://download.oracle.com/javase/6/docs/api/java/util/GregorianCalendar.html"&gt;GregorianCalendar&lt;/a&gt; which shares a lot of functionality with its XML counterpart. Finally there is a Calendar type which seems to be a super-set of the GregorianCalendar.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Finally I found a small bug with the time synchronization between the sensors, server and client. A lot of the time when I request a set of sensor data which spans an interval starting from the current time, I get a BadXML exception, since the current time may be in the future for the sensor or the server. I am used to dealing with a clock skew on the order of a few tenths of picoseconds in the embedded systems I work on, so I am not sure how one would remedy this issue. One workaround I found was to use NTP on my client and only request data up to 20 minutes ago; ever since then the exceptions dissipated.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Well there you have it. My small excursion in to wattdepot. If you got some free time and would like to know more then you ever want to know about java calendars, check them out. See you next time.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-7753834907311584926?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/7753834907311584926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/11/wattdepot-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/7753834907311584926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/7753834907311584926'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/11/wattdepot-fun.html' title='Wattdepot fun'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-2197792266229332324</id><published>2011-11-01T12:00:00.001-10:00</published><updated>2011-11-01T12:01:23.270-10:00</updated><title type='text'>Hawaii Power Crisis</title><content type='html'>As with most infrastructure of Hawaii, Power production was never really planned. With the population growing&amp;nbsp;uncontrollably, the energy&amp;nbsp;generation&amp;nbsp;is&amp;nbsp;struggling&amp;nbsp;to keep up the only way HECO finds profitable, by&amp;nbsp;burning&amp;nbsp;more oil:&lt;br /&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="http://1.bp.blogspot.com/-KdSFAvdj7RY/TrBkPgB6C0I/AAAAAAAAAEU/VNR1osou9HY/s1600/Image374a.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="239" src="http://1.bp.blogspot.com/-KdSFAvdj7RY/TrBkPgB6C0I/AAAAAAAAAEU/VNR1osou9HY/s320/Image374a.gif" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;a href="http://www.oilcrisis.com/"&gt;http://www.oilcrisis.com&lt;/a&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Things have gotten so bad that even the military, who are&amp;nbsp;generally&amp;nbsp;not know for their green thumb, has begun constructing&amp;nbsp;renewable&amp;nbsp;power&amp;nbsp;installations such as the wind mill station on the north shore of&amp;nbsp;Hawaii.&lt;br /&gt;A good question is where is all of this&amp;nbsp;energy&amp;nbsp;going? Here are a couple of chart freely available on the internet:&lt;br /&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="http://2.bp.blogspot.com/-3ZCd2qtxQVg/TrBlrjk0e9I/AAAAAAAAAEc/wDI871N4qo4/s1600/04_watanabe_pie.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="225" src="http://2.bp.blogspot.com/-3ZCd2qtxQVg/TrBlrjk0e9I/AAAAAAAAAEc/wDI871N4qo4/s320/04_watanabe_pie.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Energy consumption breakdown for Watanabe Hall.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&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="http://3.bp.blogspot.com/-B3tbNo8L5XU/TrBltMzC28I/AAAAAAAAAEk/S4yN4zh0PkM/s1600/PIE-CHART-3-D.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="273" src="http://3.bp.blogspot.com/-B3tbNo8L5XU/TrBltMzC28I/AAAAAAAAAEk/S4yN4zh0PkM/s320/PIE-CHART-3-D.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Home use energy breakdown.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Above we have a breakdown for a typical workplace(this happens to be where I work), and a typical house home. What is&amp;nbsp;mind-boggling&amp;nbsp;to me is the amount energy that Watanabe Hall spends on air conditioning. This building serves as a&amp;nbsp;headquarters&amp;nbsp;for the physics department at University of Hawaii. We have a small cluster which is running jobs 24/7, lots of scientific equipment which is known to suck down power, a machine shop which is staffed and running 8 hours a day, and even a free electron&amp;nbsp;laser&amp;nbsp;which&amp;nbsp;occupies&amp;nbsp;most of the first floor, and considering the amount of radiation it produces, probably sucks down a considerable amount of power. Yet all of these energy sinks combined don't compare to the energy consumption of the AC.&lt;br /&gt;&lt;br /&gt;The second pie chart represents&amp;nbsp;energy&amp;nbsp;consumption of a typical Oahu home. It is clear that the water heater is the biggest&amp;nbsp;culprit&amp;nbsp;in energy consumption. This is not surprising since water has a really high specific heat.&lt;br /&gt;&lt;br /&gt;So now we have picked out the most vital areas for improvement both at home and at the workplace, but how do we fix this. Lets start from home; The solar water heater is an obvious answer, however an&amp;nbsp;inconvenient&amp;nbsp;one if you like to take showers at night. However if one&amp;nbsp;examines&amp;nbsp;an average water heater, you will soon find that most of the time it is simply heating the water for no reason, in order to maintain some amount of hot water for immediate use. Perhaps an answer at home lies in a combination of a solar water heater along with a high BTU electric water heater which is only on when you need it.&lt;br /&gt;&lt;br /&gt;As for the office the problem is significantly harder. While slapping a whole bunch of solar cells on the roof might sound like a good idea; I believe that a&amp;nbsp;redesign&amp;nbsp;of the way we do air conditioning is required. There have been&amp;nbsp;rumors&amp;nbsp;of a project involving using ocean water to cool downtown&amp;nbsp;building, which sound like a step in the right direction, however it has not maid it past the planning stages.&lt;br /&gt;&lt;br /&gt;Make sure you turn all the lights off when you leave. Till next time....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-2197792266229332324?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/2197792266229332324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/11/hawaii-power-crisis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2197792266229332324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2197792266229332324'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/11/hawaii-power-crisis.html' title='Hawaii Power Crisis'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-KdSFAvdj7RY/TrBkPgB6C0I/AAAAAAAAAEU/VNR1osou9HY/s72-c/Image374a.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-1115061874602514915</id><published>2011-10-25T02:29:00.002-10:00</published><updated>2011-10-25T02:31:50.664-10:00</updated><title type='text'>Interview Question Brainstorming.</title><content type='html'>Today I decided to do a mental exercise, of looking at 5 interview questions, which any Java software engineer should be able to answer. This is only my interpretation, since I am by no means a java software engineer, however since a lot of my computer science curriculum is in Java this is what I managed to pick up:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Is Java typesafe?&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; For years I followed the argument between the Java and the C++ fanatics. For years the C++ camp has been convinced that Java is too slow and memory intensive, while the Java camp has argued that C++ is not type-safe, and more bug prone. Now that I learned to write in both languages I found that both claims are overstated. Consider a following code segment:&lt;br /&gt;&lt;pre class="brush: java"&gt;public String concat(List strs)&lt;br /&gt;  {&lt;br /&gt;    if(strs.size() &amp;gt; 0){&lt;br /&gt;    return (String) strs.get(0);&lt;br /&gt;    }&lt;br /&gt;    else{&lt;br /&gt;      return null;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;There are a two problems with this code. First the function argument &lt;i&gt;List&lt;/i&gt; is a container of unspecified type. This means that it is absolutely legal to call this function with an argument of &lt;i&gt;List&amp;lt;Integer&amp;gt;&lt;/i&gt;, however at runtime the code will crash. Furthermore &lt;i&gt;null&lt;/i&gt; is an object is an member of every time, therefore an explicit check for the &lt;i&gt;null&lt;/i&gt; object needs to be added at every entry point into the perfect "typesafe" Java code. Short answer &lt;b&gt;NO&lt;/b&gt;. Java is only as typesafe as the developer. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Whats an IDE and how is it different from a build system?&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Last few months I struggled my way through learning Eclipse. At first I was repulsed by the complexity, and the lack of vim shortcuts. Now however I am pretty comfortable using Eclipse as a Java development platform, because it brings a friendly interface to most of the Java tools.&lt;br /&gt;&amp;nbsp; So what is an IDE? The right answer is: code aware editor which integrates project management, building testing and version control. The tempting answer is: anything better then notepad.&lt;br /&gt;&amp;nbsp; How does it differ from a build system? A lot of programers think that the IDE &lt;u&gt;is&lt;/u&gt; the build system, but for the most part they are mistaken. Almost all IDEs are a fronend to a build system, be it make or ant. Why is this important? Because not everyone uses the same editor, but everyone who is collaborating on a project should be using the same build system.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Whats revision control and what is it used for?&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Picking a revision control system is one of the first important decisions that any collaborative software project makes. On the other hand a lot of developers view revision control as a way to roll back form the mistakes they made in the current session. Yet version is so much more then that. First of all it is the only sane method to do collaborative software development. Can you imagine how hard it would be to maintain a project like Apache or the Linux kernel if everyone relied on patches? It also allows developers to support multiple versions of the same software through branches and tags, allows for integration with bug tracking and documentation systems and much much more.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt; 4. How do centralized and distributed revision control systems differ?&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; Distributed version control is a hot new topic in software engineering. It allows for collaborative development on a truly massive scale. Git for example powers the development of the Linux kernel, with more then a million lines of code and countless contributing developers. Centralized version control system have a single master branch. Collaborative development in such a system is done by all of the developers committing to this branch thus moving the development forward. Distributed VC systems like git allow for multiple master branches, in fact they allow for every commit/revision to be its own local branch. This for example allows developers to put away revisions of code even if they don't have access to the centralized VC server. During the release branches are merged together only to be branched again for the next release.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. All software testing falls into two categories what are they and how are they different?&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; Software testing suits such as JUnit and Apache::Test allow programers to write a set of asserted test to make sure that the changes in the source tree don't break the build. There are many methodologies in testing such as Black/White box testing and certain software project even choose test driven design as a development strategy. Regardless of the methodology these tests fall into two categories &lt;b&gt;Validation &lt;/b&gt;and &lt;b&gt;Verification&lt;/b&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Validation test make sure that software is functional for a specific purpose. This usually involves unit tests on the internal data structures and algorithms.&lt;/li&gt;&lt;li&gt;Verification test make sure that software adheres to the specifications. This usually involves behavioral test on the software package.&lt;/li&gt;&lt;/ul&gt;So here are my $0.02 on how ace your next software engineering interview. Till next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-1115061874602514915?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/1115061874602514915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/10/interview-question-brainstorming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/1115061874602514915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/1115061874602514915'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/10/interview-question-brainstorming.html' title='Interview Question Brainstorming.'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-4264963883959061564</id><published>2011-10-20T00:39:00.000-10:00</published><updated>2011-10-20T00:39:11.067-10:00</updated><title type='text'>Set Yoshimi free.</title><content type='html'>Today I decided to release Yoshimi to the robocode community under the LGLP license. Having always used my private code repository I decided to experiment with Google project hosting instead. Now, I used a lot of private code repositories in my career, and I run a local subversion repository at home for all my personal projects, but none the less I was very impressed with what Google project hosting had to offer. The main features which sparked my interest was the bug-tracking system and the wiki. At home I use &lt;a href="http://trac.edgewall.org/"&gt;trac&lt;/a&gt; to provide both bug tracking and the wiki. Trac integrates very well with my version control system of choice, subversion, by allowing submitter to close/alter bug tickets and reference the wiki. The only downfall of trac is that it need to be rerun after every commit, which I usually accomplish that rebuilding of track as a cron job. This means that the changes to the source tree don't make it to the bug tracker/wiki until the cron job runs. Under Google project hosting however, the changes to the wiki and the bug tracker appear instantly with every commit, which I imagine alleviates confusion with the development team.&lt;br /&gt;The rest of google project hosting features are pretty straight forward. There is a &lt;a href="http://www.websvn.info/"&gt;websvn&lt;/a&gt; rip off for browsing source code online, encrypted connection to the repository, a generous quota for the download section. Most importantly Google has made sure that their project hosting environment is highly integrated and very easy to use. I would recommend Google project hosting to anyone who want a quick and easy way to host a small/medium project.&lt;br /&gt;Yoshimi source can be found &lt;a href="http://code.google.com/p/robocode-nes-yoshimi/"&gt;here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-4264963883959061564?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/4264963883959061564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/10/set-yoshimi-free.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4264963883959061564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4264963883959061564'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/10/set-yoshimi-free.html' title='Set Yoshimi free.'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-4093637262023817441</id><published>2011-10-10T22:54:00.003-10:00</published><updated>2011-10-11T00:17:59.876-10:00</updated><title type='text'>Yoshimi</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-mYdTVaR2CgA/TpQEOhPxEuI/AAAAAAAAAEM/pEUuyjtoLHc/s1600/117443.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-mYdTVaR2CgA/TpQEOhPxEuI/AAAAAAAAAEM/pEUuyjtoLHc/s1600/117443.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&amp;nbsp; I spend the last couple of week designing and writing a robocode competitive robot Yoshimi. The name comes from the Flaming Lips song &lt;a href="http://www.youtube.com/watch?v=AzlMeTxVdH8"&gt;Yoshimi Battles the Pink Robots&lt;/a&gt;. Implementation of this robot is entirely my work, however I used the build system from &lt;a href="http://code.google.com/p/robocode-pmj-dacruzer/"&gt;pmj-daCruzer&lt;/a&gt; in order to simplify my project.&lt;br /&gt;&amp;nbsp;&amp;nbsp; Yoshimi attempts to confuse her opponent by staying still until the opponent fires its gun. Once she detects that, she will attempt to move away from the bullet's path. For targeting this robot maintains several previous positions, and once she collects enough&amp;nbsp; data she will attempt to calculate the future position of the opponent and fire.&lt;br /&gt;&amp;nbsp;&amp;nbsp; The Radar on Yoshimi is design to maintain the lock on her opponent in order to maximize the collected data for targeting. Once the robot is detected the direction of the radar is reversed for the next sweep. The problem with this approach is that it looses radar lock fairly often. Furthermore once the lock is lost Yoshimi's radar will have to travel the rest of the arc before the target is found again. However even with these downfalls, I found that this method works fairly well. While it is not possible to detect when the opponent fired, Yoshimi carefully tracks her opponents energy and if it is ever suspiciously lower then it should be Yoshimi will attempt to dodge the bullet.&lt;br /&gt;&amp;nbsp;&amp;nbsp; Movement of Yoshimi is design to be as confusing as possible. Every other robot detection Yoshimi will turn perpendicular to her opponent. If it was detected that the opponent fired a bullet, Yoishimi will attempt to dodge it by moving forward or backward a random amount. In order to do this move successfully Yoshimi must move to a good position with plenty of room to move around. This is accomplished by moving at least 100px away from the walls in a radial arc movement.&lt;br /&gt;&amp;nbsp;&amp;nbsp; By maintaining a list of previous positions Yoshimi is able to interpolate the future position of the enemy robot. Initially I attempted to do this by fitting positions with higher order polynomials, but I found that my sampling was too far bellow the nyquist frequency of movement for robots such as Spin bot and Crazy. Furthermore when fighting robots with linear movement such us Walls, polynomial fits created beats which further through off my targeting. While its rather disappointing I settled on using linear fitting which works reasonably well.&lt;br /&gt;&amp;nbsp;&amp;nbsp; Here are the results for battles against sample robots. All results are for a 100 round match:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;against &lt;b&gt;Walls&lt;/b&gt; wins every time. Survival: 100/100&lt;/li&gt;&lt;li&gt;against &lt;b&gt;RamFire&lt;/b&gt; looses pretty badly. Survival:&amp;nbsp; 2/100&lt;/li&gt;&lt;li&gt;against &lt;b&gt;SpinBot&lt;/b&gt; wins but not every time. Survival 80/100&lt;/li&gt;&lt;li&gt;against &lt;b&gt;Crazy&lt;/b&gt; wins almost every time. Survival 99/100&lt;/li&gt;&lt;li&gt;against &lt;b&gt;Fire&lt;/b&gt; wins every time. Survival 100/100&lt;/li&gt;&lt;li&gt;against &lt;b&gt;Corners&lt;/b&gt; wins every time. Survival 100/100&lt;/li&gt;&lt;li&gt;against &lt;b&gt;Tracker&lt;/b&gt; wins almost every time. Survival 99/100&lt;/li&gt;&lt;/ul&gt;&amp;nbsp;&amp;nbsp; Pretty nice if you ask me. The predictive shooting works well enough to show robots such as Crazy and SpinBot who is boss. Dodging bullets works well enough to take out Tracker and Fire bots. The only problem is RamFire, this robot moves to the position where Yoshimi is not able to dodge its bullets, and fires really large bullets. One possible solution to this would be to make the dodge logic run away from the robot if its too close, however I did not try to implement it quite yet.&lt;br /&gt;&amp;nbsp;&amp;nbsp; This is the largest software project I have ever written in Java so I needed a good testing framework to save me from myself. Once again JUnit came to the rescue. Yoshimi uses a several internal data structures such as circular buffers, and polar vectors. All of these data-structures&amp;nbsp; included unit tests. Also robocode uses a very strange left-handed coordinate systems, which made writing trigonometric code very bug prone. All of the spacial calculation routines included unit tests as well. Finally robocode includes a testing framework which was very useful for getting kinks out of the more advanced algorithms which would have been impossible to test via JUnit.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have to say I learned quite a bit about Java and software engineering in general. I found testing to be imperative in construction of this robot. This was mainly fueled by my lack of the understanding of Java. At first I started to write this code with the intention of adding tests later ,but a few random NullPointerExeptions in the middle of the match, quickly made me change my outlook. Furthermore I started writing this robot as a superclass of the more basic Robot, but eventually gave up and ported it to the Advanced robot superclass. If I were to write a new robot from scratch I would definitely pick AdvancedRobot from the start, but I found that the difference in implementation was minimal and very well described. Overall the amount of available documentation and examples from robocode community was excellent, and the API was very clean and easy to work with. I would recommend robocode to any Java beginner.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-4093637262023817441?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/4093637262023817441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/10/yoshimi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4093637262023817441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/4093637262023817441'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/10/yoshimi.html' title='Yoshimi'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-mYdTVaR2CgA/TpQEOhPxEuI/AAAAAAAAAEM/pEUuyjtoLHc/s72-c/117443.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-943965457633103168</id><published>2011-09-29T11:36:00.002-10:00</published><updated>2011-09-29T11:37:06.086-10:00</updated><title type='text'>Ant Fun</title><content type='html'>&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; As I continue my learning of java I am constantly amazed by the amount of readily available software libraries, both free and open source. Of course as with all languages, using 3rd party libraries makes the redistribution of your code a huge hassle. In languages I know and love such as C and C++ a shell script will walk through your system and find all the required software. This is great as long as the software exists on your system, however if a dependency is missing the configure script will fail to generate the Makefile and your compilation comes to a grinding halt, until you obtain the failing dependency.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; It seems that java developers decided to stop playing the cat and mouse game of dependency management and instead created a build system which can take care of these semantics automatically. This build system stack consists of the actual build system called &lt;b&gt;ant&lt;/b&gt; and a dependency installer called &lt;b&gt;ivy&lt;/b&gt;. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; Having grown up on &lt;b&gt;Makefile&lt;/b&gt;, which is basically a structured shell script, I decided to start slow by learning ant first. In order to do that I first started with an ant script which would print a string "Hello Ant". This very simple ant script had a single target with an echo statement.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; Next I played with the property directive. One thing I found strange in moving from Make was that the variables in ant are immutable. So initializing a same variable to two different values in different spots in the script, effectively ignores the last assignment.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; Before trying ant with java code, I examined the dependencies for build targets. As expected ant ran the dependencies in the right order. Furthermore as&amp;nbsp; with make ant was able to find deadlocks in circular dependencies.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; Finally I applied my newly acquired ant knowledge to a simple java project. The project contained a single class with a main method which printed the familiar "&lt;i&gt;Hello Ant&lt;/i&gt;". I created ant scripts which compiled, ran and generated javadoc for the code. Furthermore I created an ant script which compressed the entire project for redistribution.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; I found ant to be a satisfactory java counterpart to make.While ant lacks the flexibility of running shell commands, it makes up for it by a simple xml configuration file, and compatibility with tools like pmd findbugs and checkstyle. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;Till next time...&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;P.S: How many ants are needed to fill an apartment  ? Ten ants.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-943965457633103168?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/943965457633103168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/09/ant-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/943965457633103168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/943965457633103168'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/09/ant-fun.html' title='Ant Fun'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-8149885137592033634</id><published>2011-09-21T10:42:00.001-10:00</published><updated>2011-09-21T11:07:15.731-10:00</updated><title type='text'>Super Wallet</title><content type='html'>&lt;div style="text-align: left;"&gt;&amp;nbsp; &amp;nbsp;Yesterday&amp;nbsp;my wallet finally fell apart and that got me thinking about making a new one from scratch.&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: left;"&gt;Now if I am going to make something that is going to reside in my back pocket for years to come I am going to make it right!&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp; &amp;nbsp;I started out with a piece of&amp;nbsp;&lt;a href="http://www.rockywoods.com/Fabrics-Kits/Other-Heavy-Durable-Fabrics/NOMEX-and-KEVLAR-Blend-Golden-Brown"&gt;Kevlar-Nomex&lt;/a&gt; fabric. This stuff has a breaking strength of 500lb and is extremely slash resistant. For how&amp;nbsp;tough&amp;nbsp;it is however it does nothing for EM shielding. Any self respecting geek must have an RF shielded wallet, so I fixed this deficiency with a 6g layer of &lt;a href="http://www.amazon.com/Chemicals-Silver-Conductive-Epoxy-0-35/dp/B003BDMJSY/ref=sr_1_1?ie=UTF8&amp;amp;qid=1316635938&amp;amp;sr=8-1"&gt;silver epoxy&lt;/a&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="http://1.bp.blogspot.com/-M-ForCvtQJU/TnpF3ic-PrI/AAAAAAAAAD0/fGhZQ2D0udM/s1600/IMG_20110920_175322.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="311" src="http://1.bp.blogspot.com/-M-ForCvtQJU/TnpF3ic-PrI/AAAAAAAAAD0/fGhZQ2D0udM/s320/IMG_20110920_175322.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Needs more Epoxy.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &amp;nbsp;Silver epoxy has amazing EM shielding properties, and on top of that, it provides extra strength to the Kevlar. If you want to make it cheaper, I think using regular epoxy with a layer of tin foil might work just as well. Once there was a nice uniform layer of epoxy on the Kevlar I let it dry for about 4 hours and then sewed a layer of 330 Denier Nylon to the Kevlar:&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="http://3.bp.blogspot.com/-Dv6xINzYMw4/TnpGwfmhh8I/AAAAAAAAAD8/793dyLumZi0/s1600/IMG_20110920_194945.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="238" src="http://3.bp.blogspot.com/-Dv6xINzYMw4/TnpGwfmhh8I/AAAAAAAAAD8/793dyLumZi0/s320/IMG_20110920_194945.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;So Shiny!&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&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="http://1.bp.blogspot.com/-lSEj2vZ3p7M/TnpGtXaYQ_I/AAAAAAAAAD4/OXcNXq3JQnk/s1600/IMG_20110920_194937.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="238" src="http://1.bp.blogspot.com/-lSEj2vZ3p7M/TnpGtXaYQ_I/AAAAAAAAAD4/OXcNXq3JQnk/s320/IMG_20110920_194937.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Almost done with the front.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: right;"&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp;While Kevlar is slash resistant luckily it is not puncture resistant, so its possible to work it with a sewing machine. Once the the back was finished I added a 1 inch nylon strip to the outside for extra reinforcements.&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp;Next I made the other side of the bill pouch out of Nylon fabric and strips:&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="http://2.bp.blogspot.com/-6FGYmn9oZPk/TnpIXmc020I/AAAAAAAAAEA/FWAROKhnrxc/s1600/IMG_20110920_205114.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;span class="Apple-style-span" style="color: black; font-size: x-small;"&gt;&lt;img border="0" height="195" src="http://2.bp.blogspot.com/-6FGYmn9oZPk/TnpIXmc020I/AAAAAAAAAEA/FWAROKhnrxc/s320/IMG_20110920_205114.jpg" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Excuse my crappy camera.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; Finally I attached it all together:&lt;/div&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-4staj2RSfdo/TnpJSXgzRNI/AAAAAAAAAEE/yug1UISEb-E/s1600/IMG_20110920_210209.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="181" src="http://1.bp.blogspot.com/-4staj2RSfdo/TnpJSXgzRNI/AAAAAAAAAEE/yug1UISEb-E/s320/IMG_20110920_210209.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Inside.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&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="http://1.bp.blogspot.com/-qK7lQY4RKWA/TnpL6VtoUeI/AAAAAAAAAEI/ig5wuVrk-lw/s1600/IMG_20110921_103108.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="239" src="http://1.bp.blogspot.com/-qK7lQY4RKWA/TnpL6VtoUeI/AAAAAAAAAEI/ig5wuVrk-lw/s320/IMG_20110921_103108.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Outside.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;So here is my supper wallet. Till next time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-8149885137592033634?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/8149885137592033634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/09/super-wallet.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/8149885137592033634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/8149885137592033634'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/09/super-wallet.html' title='Super Wallet'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-M-ForCvtQJU/TnpF3ic-PrI/AAAAAAAAAD0/fGhZQ2D0udM/s72-c/IMG_20110920_175322.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-6897429761313719088</id><published>2011-09-19T03:47:00.000-10:00</published><updated>2011-09-19T03:47:16.366-10:00</updated><title type='text'>Robocode Fun</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/--YKajYhUJtA/Tnc4GHtcpnI/AAAAAAAAADw/QBNiC4V9Ptc/s1600/crazyRobocode.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="clear: left; color: black; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="244" src="http://4.bp.blogspot.com/--YKajYhUJtA/Tnc4GHtcpnI/AAAAAAAAADw/QBNiC4V9Ptc/s320/crazyRobocode.png" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp; This weekend I decided to put my Java and software&amp;nbsp;engineering&amp;nbsp;knowledge to the test, by testing out the &lt;a href="http://robocode.sourceforge.net/"&gt;robocode&lt;/a&gt;&amp;nbsp;framework. This framework is a mix of a game engine and&amp;nbsp;programming&amp;nbsp;environment&amp;nbsp;which allows the user to create an AI robot, and battle other robots in a simulated arena.&lt;br /&gt;&amp;nbsp; &amp;nbsp; Robocode has a long and&amp;nbsp;colorful&amp;nbsp;history. It was first released by Mathew Nelson of IBM in 2001. Eventually IBM decided to cut development and Robocode entered public domain. Since then it has undergone several major rewrites by the open source community. Robocode has been ported to the &lt;a href="http://robocode.sourceforge.net/docs/robocode.dotnet/Index.html"&gt;.Net&lt;/a&gt; framework which allows C# and VB.NET users to develop and battle robots.&lt;br /&gt;&amp;nbsp; &amp;nbsp; Robocode robots all inherit from tree basic robot classes:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;JuniorRobot : &amp;nbsp;The simplest robot which provides all game variables as a public field.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;Robot: A more advanced robot with&amp;nbsp;synchronous&amp;nbsp;event processing.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;AdvancedRobot: A very advanced&amp;nbsp;superclass&amp;nbsp;whith&amp;nbsp;asynchronous&amp;nbsp;command and event processing.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&amp;nbsp; &amp;nbsp; JuniorRobot was far too simple for me, and it went against all of my software&amp;nbsp;engineering&amp;nbsp;ideal, (No getter/setter methods?) AdvancedRobot was far to complex for the simple exercises I had in mind, so I&amp;nbsp;settled&amp;nbsp;on the Robot superclass. I coded the total if 13 simple robots, all of which performed a single predefined task:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: verdana; line-height: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol style="list-style-type: decimal;"&gt;&lt;li&gt;The minimal robot. Does absolutely nothing at all.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Moves forward a total of 100 pixels per turn. When it hits a wall, it reverses direction.&lt;/li&gt;&lt;li&gt;Each turn, moves forward a total of N pixels per turn, and then turns right. N is initialized to 15, and increases by 15 per turn.&lt;/li&gt;&lt;li&gt;Moves to the center of the playing field, spins around in a circle, and stops.&lt;/li&gt;&lt;li&gt;Moves to each corner of the battlefield.&lt;/li&gt;&lt;li&gt;Moves to the center, once there moves in a circle of 100px.&lt;/li&gt;&lt;li&gt;Picks an enemy and follows it.&lt;/li&gt;&lt;li&gt;Picks an enemy and politely follows it at 50px.&lt;/li&gt;&lt;li&gt;Moves away from the closest enemy.&lt;/li&gt;&lt;li&gt;Does not move, rotates the gun and fires when a target is in the&amp;nbsp;cross-hairs.&lt;/li&gt;&lt;li&gt;Does not move and only fires when a specific target is in the&amp;nbsp;cross-hairs.&lt;/li&gt;&lt;li&gt;Does not move, rotates the gun and fires when a target is in the&amp;nbsp;cross-hairs. The bullet power is proportional to the distance to the target.&lt;/li&gt;&lt;li&gt;Track a specific enemy with the turret.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Everything was going&amp;nbsp;swimmingly&amp;nbsp;until I got to robot number 6. From that point on I started to wish that I used the AdvancedRobot superclass instead of Robot. With&amp;nbsp;asynchronous&amp;nbsp;movement it is&amp;nbsp;possible&amp;nbsp;to move and turn at the same time. This would have made moving in a circle a lot&amp;nbsp;easier. At robot 13 it became clear why&amp;nbsp;competitive&amp;nbsp;robots use AdvancedRobot as the superclass: Robot can't track the target with the radar and turn its turret towards it at the same time! Furthermore Robot detection events are blocking, which means that processing of an event can only happen one at at time, and blocking movement in your detection event handler will keep you from accepting more events. This forces you to keep all the heavy&amp;nbsp;processing&amp;nbsp;and movement in the main execution loop, while using the event handlers for setting &amp;nbsp;flags, and storing event values. The whole situation reminded me of the bottom and top&amp;nbsp;half's&amp;nbsp;of the interrupt handlers in operating systems. If your interrupt handler performs lengthy computations or transfers you run a risk of missing important events, such as network packets or timer ricks, since&amp;nbsp;interrupt&amp;nbsp;handlers run with&amp;nbsp;interrupts&amp;nbsp;disabled. Instead modern OS's&amp;nbsp;interrupt&amp;nbsp;handlers gather all the&amp;nbsp;interrupt&amp;nbsp;data and&amp;nbsp;schedule&amp;nbsp;it to be&amp;nbsp;processed&amp;nbsp;in the normal kernel context.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; I was still able to finish my goal of 13 robots, with all the capabilities described above. This got me thinking about creating a&amp;nbsp;competitive&amp;nbsp;robot. I have a pretty nifty idea for target prediction which involves a Fourier transform of the accumulated&amp;nbsp;competitors&amp;nbsp;positions. If the robot is moving in&amp;nbsp;oscillatory&amp;nbsp;motion Fourier transform will give me a fundamental frequency of the movement, which in turn will allow my robot to calculate the future position of the enemy. The number of positions transformed can be tuned by the hit/miss factor. If the enemy robot is very&amp;nbsp;chaotic&amp;nbsp;the algorithm will&amp;nbsp;eventually&amp;nbsp;fall back to only using three points which is&amp;nbsp;equivalent&amp;nbsp;to a basic projection. On the other hand if the&amp;nbsp;opponents&amp;nbsp;movement are very periodic the algorithm should perform much better then basic projection, hopefully with hit rate of some of the more advanced pattern matching algorithms. Watch out SpinBot here I come.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So here are my adventures in Robocode. Till next time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-6897429761313719088?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/6897429761313719088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/09/robocode-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/6897429761313719088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/6897429761313719088'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/09/robocode-fun.html' title='Robocode Fun'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--YKajYhUJtA/Tnc4GHtcpnI/AAAAAAAAADw/QBNiC4V9Ptc/s72-c/crazyRobocode.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-2075496945499657654</id><published>2011-08-30T11:03:00.001-10:00</published><updated>2011-08-30T12:07:03.407-10:00</updated><title type='text'>JUnit in java</title><content type='html'>JUnit is a testing framework for Java programs. Here are my JUnit adventures with the FuzzBuzz program:&lt;br /&gt;&lt;pre class="brush: java"&gt;package edu.hawaii.ics613;&lt;br /&gt;&lt;br /&gt;public class FuzzBuzz&lt;br /&gt;{&lt;br /&gt;	/**&lt;br /&gt;	 * @param num: Number to be processed&lt;br /&gt;	 * @return: string according to the FuzzBuzz rules.  &lt;br /&gt;	 */&lt;br /&gt;	public static String proccess_number(Integer num)&lt;br /&gt;	{&lt;br /&gt;		if(num % 15 == 0) return "FuzzBuzz";&lt;br /&gt;		if(num % 3 == 0) return "Fuzz";&lt;br /&gt;		if(num % 5 == 0) return "Buzz";&lt;br /&gt;		return num.toString();&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	/**&lt;br /&gt;	 * @param args: Ignored  &lt;br /&gt;	 */&lt;br /&gt;	public static void main(String[] args) &lt;br /&gt;	{&lt;br /&gt;		for(int i = 1; i&lt;= 100; i++)&lt;br /&gt;		{&lt;br /&gt;			System.out.println(proccess_number(i));&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Here is the Junit class:&lt;pre class="brush: java"&gt;import static org.junit.Assert.*;&lt;br /&gt;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;&lt;br /&gt;import edu.hawaii.ics613.FuzzBuzz;&lt;br /&gt;&lt;br /&gt;public class FuzzBuzzTest {&lt;br /&gt;&lt;br /&gt;	@Test&lt;br /&gt;	public void test() &lt;br /&gt;	{&lt;br /&gt;		///Test for trivial case&lt;br /&gt;		assertEquals("1", FuzzBuzz.proccess_number(1));&lt;br /&gt;		///Test for %3 case&lt;br /&gt;		assertEquals("Fuzz", FuzzBuzz.proccess_number(3));&lt;br /&gt;		///Test for %5 case&lt;br /&gt;		assertEquals("Buzz", FuzzBuzz.proccess_number(5));&lt;br /&gt;		///Test for %15 case&lt;br /&gt;		assertEquals("FuzzBuzz", FuzzBuzz.proccess_number(15));&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;It took about 10 minutes to get a hang of JUnit, thanks to the autocompletion in Eclipse. Remember [CTRL + Space] is your best friend. So I guess that's enterprise software engineering 10% code, 45% documentation, and 45% testing. So that's is JUnit. Till next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-2075496945499657654?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/2075496945499657654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/08/junit-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2075496945499657654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/2075496945499657654'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/08/junit-in-java.html' title='JUnit in java'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-8086789395668307047</id><published>2011-08-28T16:58:00.002-10:00</published><updated>2011-08-28T16:58:42.395-10:00</updated><title type='text'>Google Sites Page</title><content type='html'>I made a Google sites portfolio page. If you are interested in my work check it out &lt;a href="https://sites.google.com/site/sergeynegrashov/"&gt;here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-8086789395668307047?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/8086789395668307047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/08/google-sites-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/8086789395668307047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/8086789395668307047'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/08/google-sites-page.html' title='Google Sites Page'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-8351198932351826371</id><published>2011-08-28T16:28:00.002-10:00</published><updated>2011-08-28T16:53:22.097-10:00</updated><title type='text'>The Three Pillars.</title><content type='html'>My software&amp;nbsp;engineering&amp;nbsp;class has&amp;nbsp;recently&amp;nbsp;introduced a concept of the three prime directives&amp;nbsp;of software&amp;nbsp;engineering, applied to an open source project. The directives are as&amp;nbsp;follows:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;Does software&amp;nbsp;accomplish&amp;nbsp;at least one&amp;nbsp;useful&amp;nbsp;task?&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Can a new user successfully install and use the software?&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Can a new developer successfully understand and&amp;nbsp;enhance&amp;nbsp;the system?&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I decided to put this knowledge to the test, by applying these questions to an open source project &lt;a href="http://sourceforge.net/projects/jwordpad/"&gt;JwordPad&lt;/a&gt;.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-iG5Yikir-MA/Tlr1wI4pEzI/AAAAAAAAADs/UJYao4WnkYo/s1600/jwpad.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="83" src="http://1.bp.blogspot.com/-iG5Yikir-MA/Tlr1wI4pEzI/AAAAAAAAADs/UJYao4WnkYo/s400/jwpad.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Here are my results:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;The software is a clone of the WordPad editor, which comes installed with M$ Windows operating system. The UI is written is swing, so it does not integrate well with the OS. It does not use the default font, instead it picks the first available font from the OS at startup. Apart from that the software is a usable replacement for Wordpad, as long as you have 50Mb of system memory to spare on an editor with no syntax highlighting.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Installation&amp;nbsp;is straight forward, software is redistributed as an archive&amp;nbsp;comprised&amp;nbsp;of both binaries and source. A simple command of&amp;nbsp;&lt;i&gt;java JWordPad&lt;/i&gt;&amp;nbsp;will bring up the editor. I was able to open and save text files; however the editor stalls on any file larger that 1Gb, even though it was running on a 6 core Phenom with 8 Gigs of ram.&lt;/li&gt;&lt;li&gt;All together the program is a bit shy of 600 lines of code. Most of the code lacks comments, however code is well&amp;nbsp;formatted&amp;nbsp;and readable. Given a&amp;nbsp;rudimentary&amp;nbsp;knowledge&amp;nbsp;of Java and swing, any developer can jump in and improve the program or add new features.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;So these are the prime directives. Till next time.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-8351198932351826371?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/8351198932351826371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/08/three-pillars.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/8351198932351826371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/8351198932351826371'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/08/three-pillars.html' title='The Three Pillars.'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-iG5Yikir-MA/Tlr1wI4pEzI/AAAAAAAAADs/UJYao4WnkYo/s72-c/jwpad.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-7746189344544924518</id><published>2011-08-25T14:47:00.002-10:00</published><updated>2011-08-25T16:08:41.917-10:00</updated><title type='text'>Minix in VirtualBox</title><content type='html'>My operating systems class is focusing on&amp;nbsp;&lt;a href="http://www.minix3.org/"&gt;Minix&lt;/a&gt;&amp;nbsp;this semester. This means all students are required to have access to a Minix system in order to work on the class&amp;nbsp;assignments. I did not have a spare computer to run&amp;nbsp;Minix, and it seems silly to run a&amp;nbsp;&lt;strike&gt;barely&lt;/strike&gt;&amp;nbsp;stable research operating system on a production laptop or &amp;nbsp;workstation. So the only way out was virtualization. I am a fan of Oracle's&amp;nbsp;&lt;a href="http://www.virtualbox.org/"&gt;VirtulBox&lt;/a&gt;, so I&amp;nbsp;decided&amp;nbsp;to stick with it.&lt;br /&gt;&lt;br /&gt;First attempt at installation was&amp;nbsp;disappointing. As soon as the OS got past the CD boot loader, I got a kernel panic. It seems that in order to boot Minix in VirtualBox, the host CPU must have the special virtualization instructions, as described&amp;nbsp;&lt;a href="http://wiki.minix3.org/en/UsersGuide/RunningMinixOnVirtualBox"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Once I moved to a newer machine OS booted and installed in under 10&amp;nbsp;minutes. With 10Gig virtual &amp;nbsp;drive and 64MB of ram the os feels snappy and responsive. Pkgin package manager is somewhat similar to apt, however the amount of available software is pitiful compared to any modern operating system. Some of the packages are simply broken, sudo utility core dumped every time I tried to run it, cscope printed garbage to the screen, but such is life...&lt;br /&gt;&lt;br /&gt;I did manage to install the openssh server and forwarded the ssh port to the host machine. This allowed both shell and filesystem access to the Minix system, so I can use non-Minix IDEs and version control tools from the host machine without having to worry about getting the code onto the Minix file system.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Here is a screenshot of Minix VM with an ssh session connected to it.&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="http://1.bp.blogspot.com/-_ETP-L7Q6sM/Tlbr22Ci4EI/AAAAAAAAACI/aUJcXg3k1rw/s1600/minix.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="612" src="http://1.bp.blogspot.com/-_ETP-L7Q6sM/Tlbr22Ci4EI/AAAAAAAAACI/aUJcXg3k1rw/s640/minix.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-7746189344544924518?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/7746189344544924518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/08/minix-in-virtualbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/7746189344544924518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/7746189344544924518'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/08/minix-in-virtualbox.html' title='Minix in VirtualBox'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-_ETP-L7Q6sM/Tlbr22Ci4EI/AAAAAAAAACI/aUJcXg3k1rw/s72-c/minix.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-6938574927409768441</id><published>2011-08-24T22:12:00.003-10:00</published><updated>2011-08-25T16:10:10.661-10:00</updated><title type='text'>Posting code in blogger</title><content type='html'>&lt;a href="http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html"&gt;Here&lt;/a&gt; is a blog post describing how to setup code highlighting in blogger. Here are my results:&lt;br /&gt;&lt;b&gt;Java:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;//FuzzBuzz code for a java program&lt;br /&gt;package ics.test;&lt;br /&gt;&lt;br /&gt;public class test {&lt;br /&gt;&lt;br /&gt;	public static int main(String[] args) {&lt;br /&gt;		for(int i = 0; i&amp;lt; 100; i++)&lt;br /&gt;		{&lt;br /&gt;			if(i%15 == 0)&lt;br /&gt;			{&lt;br /&gt;				System.out.println("FuzzBuzz");&lt;br /&gt;			}&lt;br /&gt;			else if(i%5 == 0)&lt;br /&gt;			{&lt;br /&gt;				System.out.println("Fuzz");&lt;br /&gt;			}&lt;br /&gt;			else if(i%3 == 0)&lt;br /&gt;			{&lt;br /&gt;				System.out.println("Buzz");&lt;br /&gt;			}&lt;br /&gt;			else&lt;br /&gt;				System.out.println(i);&lt;br /&gt;		}&lt;br /&gt;		return 0;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;x86 assembly:&lt;/b&gt;&lt;br /&gt;&lt;pre class="brush: nasm"&gt;;FuzzBuzz program in x86 assembly with nasm&lt;br /&gt;;To compile use:&lt;br /&gt;;nasm -f elf -l fuzzbuzz.lst fuzzbuzz.asm&lt;br /&gt;;gcc fuzzbuzz.o -o fuzzbuzz -m32&lt;br /&gt;extern printf &lt;br /&gt;SECTION .data &lt;br /&gt;&lt;br /&gt;fuzz:		db	"Fuzz", 10, 0 &lt;br /&gt;buzz:		db	"Buzz", 10, 0 &lt;br /&gt;fuzz_buzz:	db	"FuzzBuzz", 10, 0&lt;br /&gt;num:	db	"%d", 10, 0 &lt;br /&gt;&lt;br /&gt;SECTION .text &lt;br /&gt;	global main &lt;br /&gt;main:&lt;br /&gt;	mov eax, 1&lt;br /&gt;loop:&lt;br /&gt;	push eax&lt;br /&gt;	mov edx,0&lt;br /&gt;	mov ecx,15&lt;br /&gt;	idiv ecx&lt;br /&gt;	mov eax, edx&lt;br /&gt;	cmp eax,0&lt;br /&gt;	je fuzz_buzz_case&lt;br /&gt;	pop eax&lt;br /&gt;&lt;br /&gt;	push eax&lt;br /&gt;	mov edx,0&lt;br /&gt;	mov ecx,3&lt;br /&gt;	idiv ecx&lt;br /&gt;	mov eax, edx&lt;br /&gt;	cmp eax,0&lt;br /&gt;	je fuzz_case&lt;br /&gt;	pop eax&lt;br /&gt;&lt;br /&gt;	push eax&lt;br /&gt;	mov edx,0&lt;br /&gt;	mov ecx,5&lt;br /&gt;	idiv ecx&lt;br /&gt;	mov eax, edx&lt;br /&gt;	cmp eax,0&lt;br /&gt;	je buzz_case&lt;br /&gt;	pop eax&lt;br /&gt;	push eax&lt;br /&gt;num_case:&lt;br /&gt;	call num_print&lt;br /&gt;	jmp loop_itt_complete&lt;br /&gt;fuzz_buzz_case:&lt;br /&gt;	call fuzz_buzz_print&lt;br /&gt;	jmp loop_itt_complete&lt;br /&gt;buzz_case:&lt;br /&gt;	call buzz_print&lt;br /&gt;	jmp loop_itt_complete&lt;br /&gt;fuzz_case:&lt;br /&gt;	call fuzz_print&lt;br /&gt;	jmp loop_itt_complete&lt;br /&gt;loop_itt_complete:&lt;br /&gt;	&lt;br /&gt;	pop eax &lt;br /&gt;	inc eax &lt;br /&gt;	cmp eax, 100&lt;br /&gt;	jle loop 	&lt;br /&gt;	ret &lt;br /&gt;&lt;br /&gt;fuzz_print:&lt;br /&gt;	push dword fuzz &lt;br /&gt;	call printf&lt;br /&gt;	add esp, 4&lt;br /&gt;	ret&lt;br /&gt;buzz_print:&lt;br /&gt;	push dword buzz &lt;br /&gt;	call printf&lt;br /&gt;	add esp, 4&lt;br /&gt;	ret&lt;br /&gt;num_print:&lt;br /&gt;	push eax&lt;br /&gt;	push dword num&lt;br /&gt;	call printf&lt;br /&gt;	add esp, 8&lt;br /&gt;	ret&lt;br /&gt;fuzz_buzz_print:&lt;br /&gt;	push dword fuzz_buzz&lt;br /&gt;	call printf&lt;br /&gt;	add esp, 4&lt;br /&gt;	ret&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-6938574927409768441?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/6938574927409768441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/08/posting-code-in-blogger.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/6938574927409768441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/6938574927409768441'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/08/posting-code-in-blogger.html' title='Posting code in blogger'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6248914526570463298.post-413632523336904050</id><published>2011-08-24T14:29:00.001-10:00</published><updated>2011-08-25T16:09:29.061-10:00</updated><title type='text'>Suspend your disbelief</title><content type='html'>As the digital age moves forward, prospective employers are&amp;nbsp;turning&amp;nbsp;to the web in order to closer examine their&amp;nbsp;applicants. Unfortunately as far as academia is&amp;nbsp;concerned&amp;nbsp;the professional persona is not the number of blogs you maintain, or the number of linked-in&amp;nbsp;recommendations, but the number of publications under your belt, and the&amp;nbsp;amount&amp;nbsp;of funding you have available for next year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6248914526570463298-413632523336904050?l=embeddededge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://embeddededge.blogspot.com/feeds/413632523336904050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://embeddededge.blogspot.com/2011/08/suspend-your-disbelief.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/413632523336904050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6248914526570463298/posts/default/413632523336904050'/><link rel='alternate' type='text/html' href='http://embeddededge.blogspot.com/2011/08/suspend-your-disbelief.html' title='Suspend your disbelief'/><author><name>Serge</name><uri>http://www.blogger.com/profile/00327399920857616262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-s0OAmxmXC3A/TlWRiSK9PuI/AAAAAAAAAAc/9HAQtY5XO6o/s220/me.jpg'/></author><thr:total>1</thr:total></entry></feed>
