tag:blogger.com,1999:blog-35525501999391527522024-03-13T13:09:22.240-05:00MSU robotics research chroniclesAnonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.comBlogger103125tag:blogger.com,1999:blog-3552550199939152752.post-72765495015430819032012-07-23T16:30:00.001-05:002012-07-23T16:30:20.017-05:00Misc links<a href="http://www.policeone.com/pc_print.asp?vid=5558533">Great applications</a> for police UAVs<br />
<br />
<a href="http://www.youtube.com/watch?v=-G3RoBHMu-o&feature=player_embedded">How To Survive A Robot Uprising</a><br />
<div>
<br /></div>
<a href="http://grri2012.wordpress.com/">First German Russian Conference on Robotics</a><br />
<div>
<br /></div>
<div>
A nice article on <a href="http://www.jameco.com/Jameco/workshop/ProductNews/solderingequipment.html?sp_rid=MTgyNDYwMTA5MjgS1&sp_mid=4050183">soldering tools</a>.</div>
<div>
<br /></div>
<div>
I can't use my AR Drone when inside VirtualBox, even after reading this <a href="http://www.ardrone-flyers.com/forum/viewtopic.php?f=8&t=86">howto</a>.<br />
<br />
<a href="http://spectrum.ieee.org/automaton/robotics/robotics-hardware/jamming-grippers-combine-to-form-robotic-elephant-trunk">Jamming elephant trunk</a> -- awesome.<br />
<br />
Autonomous flying <a href="http://spectrum.ieee.org/automaton/robotics/artificial-intelligence/laserequipped-mav-demonstrates-aggressive-autonomous-flight">indoors</a> (ouch), with an <a href="http://www.botjunkie.com/2010/12/06/quadrotor-kinect-one-weird-looking-robot/">on-board lidar</a> and <a href="http://spectrum.ieee.org/automaton/robotics/industrial-robots/sfly-quadrotors-navigate-outdoors-all-by-themselves">outdoors</a> using PTAM (earlier version <a href="http://www.youtube.com/watch?v=SMFR2aFR2E0">here</a>).<br />
<br />
<a href="http://theinstitute.ieee.org/technology-focus/technology-topic/keeping-drones-from-crashing">Speed limit</a> for birds (and drones).<br />
<br />
Interesting <a href="http://spectrum.ieee.org/automaton/robotics/home-robots/what-is-a-household-robot">thoughts</a> on robotics.
<br />
<br />
Info on <a href="http://mate.calpoly.edu/media/files/Review_inductive_learning.pdf">inductive learning</a>.<br />
<br />
<a href="http://dl.acm.org/citation.cfm?id=1035054&bnc=1">Literate programming</a> review; <a href="http://pylit.berlios.de/literate-programming.html">PyLit</a> looks interesting for code to rst capabilities.</div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com2tag:blogger.com,1999:blog-3552550199939152752.post-18741524357920794362012-07-23T16:30:00.000-05:002012-07-23T16:30:12.365-05:00Deleting Mercurial revisionsA Mercurial repository I use for my research group got several large movies added to it, so that several machines could no longer pull. I removed them; my notes on the process:<br />
<span style="background-color: white;"><br /></span><br />
<br />
<ol>
<li><span style="background-color: white;"><span style="font-family: 'Courier New', Courier, monospace;">hg convert --config convert.hg.saverev=False robotics_</span></span><span style="background-color: white;"><span style="font-family: 'Courier New', Courier, monospace;">research_big robotics_research --filemap no_ogv</span>, where no_ogv follows <a href="http://mercurial.selenic.com/wiki/ConvertExtension#A--filemap">this format</a>, per ideas <a href="http://mercurial.selenic.com/wiki/FAQ#FAQ.2BAC8-CommonProblems.I_committed_a_large_binary_file.2BAC8-files_how_do_I_delete_them_permanently.3F">here</a>.</span></li>
<li><span style="background-color: white;">In Bitbucket, strip to revision 0 to empty out the repository (the </span><a href="https://groups.google.com/forum/?fromgroups#!topic/bitbucket-users/VwFhe_Biohc">strip trick</a><span style="background-color: white;">).</span></li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-67878211000754471012011-12-05T16:08:00.001-06:002012-01-12T11:09:26.340-06:00Collaborative bibliograhiesHow can multiple authors share a set of bibliographic entries, referencing them as necessary during the creation of a single, shared document?<br />
<ul>
<li><a href="http://www.bibtex.org/">BibTeX</a> / <a href="http://www.latex-project.org/">LaTeX</a> -- either the only choice for the faithful or an unacceptable morass for the unwashed. I consider it morally wrong for a word processor to generate syntax errors, so I fall in the second group.</li>
<li><a href="http://www.endnote.com/">EndNote</a> -- the mainstream, commercial solution. Sharing requires creativity, as documented below.</li>
<li><a href="http://www.zotero.org/">Zotero</a>, <a href="http://wizfolio.com/">WizFolio</a>, etc. -- I have no experience and feel that these products are a bit too young to inflict on a large team, members of which may not love shiny new applications as much as I.</li>
</ul>
<div>
So, that leaves EndNote. I have a love/hate relationship -- in spite of regular upgrades, many of annoyances in the first version I used persist into X5, some of which I discuss today. For EndNote sharing:</div>
<div>
<ul>
<li>A <a href="http://msurobotics.blogspot.com/2011/11/bibliographies-and-collaboration.html">number of problems</a> make their EndNote Web application a poor choice.</li>
<li>As in the first version I used, the main program permits only <a href="http://www.endnote.com/support/faqs/Network/index.asp#Network">single-user access</a>. Sorry, no <a href="http://www.dropbox.com/">Dropbox</a>, no network share, no Windows Offline, no, no no. What year are we in?</li>
</ul>
<div>
So...the appropriate approach is to:</div>
</div>
<div>
<ol>
<li>Create a new Google Doc (or some other document which allows multiple users to edit it simultaneously).</li>
<li>Each author will then enter references to be cited into their own EndNote library.</li>
<li>Each user can then cite this entered reference by first selecting the reference to cite in EndNote then pressing Ctrl+c (copy). In Google Docs, press paste. This will generate a temporary citation of the form <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">{First author's last name, year #num}</span>. While this works in most cases, EndNote doesn't use the record number (the #num entry) to disambiguate entries with the same last name and year of publication, leaving you somewhat confused as to what {Smith, 1988 #23} really meant when you first cited it. Therefore, manually add one other field of your choice (such as the title) to the temporary citation before the record number, giving <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">{First author's last name, year title #num}</span>. There are <a href="http://www.endnote.com/support/helpdocs/EndNoteX5Help.pdf#page=186">many other</a> nifty temporary citation options.</li>
</ol>
<div>
With that in place, one person (the coordinator) will then produce a final Word document with citations and a bibliography. To so do:</div>
<ol>
<li>All collaborators should save their EndNote library as a compressed library in a shared location (e.g. Dropbox).</li>
<li>The coordinator should then copy everyone else's compressed library to a separate, non-shared directory, then open all these libraries in EndNote.</li>
<li>Now, the coordinator simply opens the shared document in Word and clicks on Endnote | Update references.</li>
</ol>
</div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-48534149866358451972011-11-04T14:57:00.000-05:002011-12-05T16:02:52.937-06:00Bibliographies and collaborationI recently finished writing a proposal with a collaborator. We both used EndNote X5 and EndNote Web to share our bibliographies. Problems I found:<br />
<ol>
<li>Upload from desktop to web is slow. Since updating in-text citations depends on the web, this making checking newly entered citations or fixing broken citations painful.</li>
<li>The web version discards trailing spaces, while the desktop version does not. This making hacking an entry to make it pretty work in preview but not in the final document.</li>
<li>Deleting a reference on the desktop doesn't delete the corresponding reference on the web. The reverse is probably also true, but untested.</li>
<li>A Word doc builds a traveling library, which a simple "update citations" does not update. Instead, the <a href="http://www.endnote.com/support/faqs/CWYW/faq18.asp">best approach</a> is to unformat all citations, quit Word, restart, then reformat. However, this can lead to a number of ambiguous citations. In particular, EndNote will perform a case-insensitive match against any string in any entry; it also gets lost if there are duplicate entries.</li>
</ol>
<div>
My final conclusion is that the EndNote Web process is a poor one.</div>
<div>
<br /></div>
<div>
We also chose to collaborate using Google Docs, which worked very well. EndNote usage was another matter. In particular, the temporary citation process: ctrl+c an entry in EndNote desktop and ctrl-v to another application (Google Docs) produces a citation in the form {Author's last name, year #num}. However, EndNote doesn't trust its #num as a unique identifier and will find anything with a matching last name / year entry. So, using this will cause problems, since the text (last name, year, obscure number) doesn't help humans identify the paper either. In fact, EndNote will match <a href="http://www.endnote.com/support/helpdocs/EndNoteX5Help.pdf#page=156">any</a> {Author's last name, field} formatted item.</div>
<div>
<br /></div>
<div>
Therefore, a much better approach is to pick a more unique field, such as the title: {Author's last name, title}. If this isn't unique, then a {last name, label} where the label is a unique string. Of course, to check uniqueness requires a update citations, which is slow for EndNote Web. The full process is then: look at an entry to cite, manually create a {Author's last name, title} entry, download the paper, update citations, make sure all citations auto-resolve, then fix any problems.</div>
<div>
<br /></div>
<div>
So, what's a better process? Some ideas:</div>
<div>
<ol>
<li>Continue to use EndNote Web:</li>
<ol>
<li>Improve speed: upload only citations, not attachments, to EndNote Web. Create a new library for each new paper and only upload from that smaller library.</li>
<li>Periodically delete all refs in EndNote Web then reupload to remove any deletions made on the desktop.</li>
<li>Deal with any eaten trailing spaces by sighing in frustration.</li>
</ol>
<li>Move to EndNote on the PC.</li>
<ol>
<li>You can't share a file with a collaborator over the <a href="http://www.endnote.com/support/faqs/Network/faq1.asp">network</a> / Dropbox / whatever.</li>
<li>The alternative: get a <a href="http://chemistry.library.wisc.edu/writing/endnote.html#collaborative-writing">copy</a> or compressed copy of your collaborator's library and use that.</li>
</ol>
<li>Try another program. Both <a href="https://www.zotero.org/">Zotero</a> and <a href="http://wizfolio.com/">WizFolio</a> seem to be better at these things.</li>
<ol>
<li>Zotero supports <a href="https://www.zotero.org/support/rtf_scan">temporary citations</a> much like EndNote.</li>
<li>WizFolio supports an <a href="http://help.wizfolio.com/Download.aspx?ver=wizciteweb">older version of Google Docs</a>, but not a temporary citation workaround I can see.</li>
</ol>
</ol>
</div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-3496575664058434062011-07-14T13:46:00.001-05:002011-07-14T14:08:48.838-05:00Pygments to the rescueI'm finally realized that <a href="http://pygments.org/">Pygments</a> is the Answer. I can simply run my code through it and get the output I'm looking for with only a little manual tweaking (see below); I'm sure this can be integrated into Pygments with a bit of hacking. Then, a simple copy and paste retrieves the original source code! Some additional tweaks:<br />
<ol>
<li>I'm like to hide the comment character (# in Python, // in C) to make it look nicer, by giving it a very small font. I suspect I could edit the output of the lexer, or perhaps play with the formatter, to do this.</li>
<li>I need to disable HTML escaping for comments (this is done in the formatter). Perhaps a quick check for non-HTML < characters and escaping only these would help.</li>
<li>I rely on the code editor to support line wrapping, which isn't always present. I don't see an obvious work-around for this. </li>
</ol>
<br />
<br />
My simple tweak to the HTML style from Pygments to make comments look nice:<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">body .c { color: #408080; font-family: Sans-serif; white-space: normal; font-size: 90% } /* Comment */</span>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-54034290871948669782011-07-14T09:37:00.001-05:002011-07-14T09:52:55.385-05:00Documentation and more<span style="font-size: large;"><b>Documentation</b></span><br />
<br />
I continue to work on my documentation idea. So far, I've run into two problems. First, I'll need my code to HTML converter to recognize strings so that doesn't mistake comment characters in a string as a true comment: printf("// not a comment"). Second, the problem of initial spaces: how can I properly translate them? If a source file indents a comment by 4 spaces then the following line of code by 4 spaces, it looks fine. However, in HTML the code font and comment font will be different, so those 4 spaces cause things to look ugly either in HTML or (if the spacing works in HTML) in the code.<br />
<br />
I can think of a couple ideas:<br />
<ol>
<li>Auto-space -- in code, indent a comment line to match the spacing of the next code line. This would work most of the time. In HTML, do the same; make the space characters the same as the code font to insure alignment.</li>
<li>In HTML, always insert the same number of spaces as the code, in the code font. How would I detect these spaces and automatically remove them when going the other direction? Perhaps tagging the initial spaces as <code>.</code></li>
</ol>
For correctly recognizing strings, I'll need some sort of lexer. Yuck. One option is to start with the <a href="http://docs.python.org/library/tokenize.html">Python tokenizer</a>; its' source code (see link on that page) contains all the necessary regular expressions. Another is to use <a href="http://pygments.org/">Pygments</a>, which I'll want for syntax highlighting anyway. I may hack around this for now just to get some working code, then return to fix it. A related but simpler problem is dealing with C /* */ comments.<br />
<br />
In working with the idea, I'm continually surprised by how much just writing about the problem has helped me to solve it. I believe that this will be a big help for me in all future projects, if I can actually find the time to implement it.<br />
<br />
<b><span style="font-size: large;">Other things</span></b><br />
<a href="http://spectrum.ieee.org/automaton/robotics/industrial-robots/john-dulchinos-adept-do-robots-take-peoples-jobs">Do robots take people's jobs?</a> No, they empower people and create jobs, as the arguments in this article show. It included some nice historical perspective and facts (did word processors eliminate secretaries?).<br />
<br />
I found a list of the <a href="http://cwe.mitre.org/top25/">top 25 most dangerous software errors</a> (from a security perspective). Interesting.Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-33483269525743846912011-07-08T15:25:00.001-05:002011-07-08T15:25:36.911-05:00After playing with my <a href="http://msurobotics.blogspot.com/2011/07/documentation-ideas.html">documentation idea</a> a bit, I discovered a serious problem: what I created looked great in Word, but all the comments existed only in Word, leaving me a bit lost when I looked at the source code itself. This is a problem; for many, the source code will be the first thing they see and the only thing they see. In many applications (fixing compiler errors, debugging) I'll be working with the source code. The moral of the story: the source code matters!<br />
<br />
In particular, Knuth composed in a Web file, then produced both a .tex and a .pas (Pascal source file, whatever the extension was). However, neither produced file was editable or even very human-friendly. Instead, I now see that both the "pretty" format (in Word or whatever) and the "plain" format (raw source code) should both be nicely formatted and easily readable.<br />
<br />
That is, I'm building a bridge between a beautiful representation of the code (probably HTML) and a functional representation of the code (as plain text). The beautiful form is easier to edit documentation and comments, insert diagrams, videos, etc. while the functional form provides a tight coupling with the compiler / debugger.<br />
<br />
That changes everything in terms of my design.<br />
<br />
Before I get too carried away with it, let me test-drive this idea by providing some example code. This is the beautiful form, taken from a unit-testing section of the document.<br />
<br />
<br />
<span class="Apple-style-span" style="font-size: large;"><b>Testing</b></span><br />
I don’t have a unit testing framework. So, I’ll develop what’s necessary as I go. There’s a framework for Excel, but it’s very tied to that application. Problems so far with the home-brew approach:<br />
1.<span class="Apple-tab-span" style="white-space: pre;"> </span>There’s no automatic test discovery; I have to manually add all tests.<br />
2.<span class="Apple-tab-span" style="white-space: pre;"> </span>There’s no setup()/teardown() facility<br />
3.<span class="Apple-tab-span" style="white-space: pre;"> </span>There’s no “clean the environment” comment. For example, strLastError can be polluted by earlier tests.<br />
<br />
<span class="Apple-style-span" style="font-size: large;">Source file split testing</span><br />
<b>A documentation file with no extension should produce an error.</b><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Sub Test_SourceWithNoExtension()</span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>First, create a dummy document to test with.<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Dim docSource As Document</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Set docSource = Documents.Add</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Dim strFileName As String</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> strFileName = "Word documentation idea test."</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> docSource.SaveAs fileName:=strFileName</span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Now, do our testing.<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> OpenDocFile</span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Clean up by closing and erasing this old doc. If the test breaks, the developer must close it ma-nually. Time to look for a try/catch in VBA (On Error statement)<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> docSource.Close</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Kill strFileName</span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Check that it worked. Errors are reported as strings, so check for the correct error text.<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Assert (strLastError Like "*Documentation file has no extension:*")</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">End Sub</span><br />
<div>
<br /></div>
<div>
<br /></div>
<div>
Now, here's how I'd like to see this in the functional form (as source code). Since this is VBA, the comment character is the single quote <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">'</span>.</div>
<div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' <h1>Testing</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/h1></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">'</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">p>I don’t have a unit testing framework. So, I’ll</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">develop what’s </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">necessary as I go. There’s a framework</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' for Excel, but it’s very </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">tied to that application.</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' Problems so far with the home-brew </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">approach:</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/p></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ul></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">li>There’s no automatic test discovery; I have to</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' manually add </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">all tests.</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/li></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">li>There’s no setup()/teardown() facility</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/li></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">li></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">There’s no “clean the environment” comment.</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' For example, </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">strLastError can be polluted by </span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' earlier tests.</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/li></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></ul></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">'</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><h2></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Source file split testing</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></h2></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><p></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">A documentation file with no extension should</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">' produce an error.</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></p></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Sub Test_SourceWithNoExtension()</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">First, create a dummy document to test with.</p></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Dim docSource As Document</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Set docSource = Documents.Add</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Dim strFileName As String</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> strFileName = "Word documentation idea test."</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> docSource.SaveAs fileName:=strFileName</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' <p></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Now, do our testing.</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></p></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> OpenDocFile</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><p></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Clean up by closing and erasing this old doc.</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' If the test breaks, the developer must close it</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' manually. Time to look for a try/catch in VBA</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' (On Error statement)</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></p></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> docSource.Close</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Kill strFileName</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ' </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><p></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Check that it worked. Errors are reported as strings, so check for the correct error text.</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></p></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Assert (strLastError Like "*Documentation file has no extension:*")</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">End Sub</span></div>
</div>
<div>
<br /></div>
<div>
It's interesting that, to me, reading the first is much easier than reading the second. Not because of the HTML markup, but because a simple difference in font provides visual cues to divide the code nicely. It feels good to me to read the first! This is certainly what I'm striving for.</div>
<div>
<br /></div>
<div>
I haven't found a reasonably-featured word processor that read and writes HTML, though. Word includes lots of goop, but has all the features I want. I need to try OpenOffice and also <a href="http://www.seamonkey-project.org/doc/features#composer">Compser</a> to see if they're reasonable. While I like several of the browser-based editors (Google Sites / Docs is great), the "allow now access to local files" paradigm seems to prevent their use in editing local files.</div>
Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-21352893802101531072011-07-01T14:52:00.003-05:002011-07-06T15:54:56.254-05:00Documentation ideas<span class="Apple-style-span" style="font-size: large;"><b>The ideal for documentation creation</b></span><br />
<br />
I find that the type of documentation I want to write isn't well supported by the tools I've found. In particular, I typically like to write documentation at three levels. First, there should be a high-level overview, defining the overall purpose and ideas behind a module of code. This should be followed by detailed description of every element in a source file. Finally, I'd like to provide a line-by-line commentary of each function, commenting on the particulars of its implementation. This documentation should, as necessary, include equations, diagrams, images, flow charts, videos, etc. Because code changes frequently, all code snippets or references to names within the code should be easily refreshed by applying a tool.<br />
<br />
I see variants of this approach in use for several types of documentation. I typically write code for other programmers, rather than end users. Therefore, my "users" will be fellow programmers desiring to make use of a module I've created. For these users, a high-level explanation of a given header file followed by a description of each element of the header, provides all the information they need to make use of the module. For fellow developers, I'd like to present the same high-level overview, this time focusing of the algorithms used to implement elements declared in the header. This information naturally belongs with the source file the header accompanies. Next, a per-element detailed description of the source file might also be accompanies by a line-by-line analysis of some of the subtle portions of the code. (On a side note, I'd like to use this to develop and updated version of the PIC24 book I co-authored).<br />
<br />
My dream implementation would be seamless: a fully-featured word-processing program in which I can type code or in-line documentation, including snippets of code in explanatory sections as necessary. All documentation would be transparently encoded in the raw source file. No such tool exists, to the best of my knowledge.<br />
<br />
<span class="Apple-style-span" style="font-size: large;"><b>Existing tools</b></span><br />
<br />
<a href="http://niv.scripturetext.com/ecclesiastes/1-9.htm">There's nothing new under the sun</a>, including this idea. Its best-known formulation, <a href="http://www.amazon.com/exec/obidos/ASIN/0937073814/">Literate Programming</a> by none other than Donald Knuth, "regards a program as a communication to human beings rather than as a set of instructions to a computer. Your program is also viewed as a hypertext document, rather like the World Wide Web." (from an associated <a href="http://www-cs-faculty.stanford.edu/~uno/cweb.html">site</a>). While <a href="http://www.literateprogramming.com/knuthweb.pdf">WEB</a> (Knuth's tool) operates on Pascal to produce TeX documents, a more modern version (<a href="http://www-cs-faculty.stanford.edu/~uno/cweb.html">CWEB</a>) applies the same process to C. The <a href="http://www.literateprogramming.com/">literate programming site</a> provides additional information on these ideas; several other notable implementations (<a href="http://www.ross.net/funnelweb">FunnelWeb</a>, <a href="http://www.cs.tufts.edu/~nr/noweb/">Noweb</a>). The practical result (here's a <a href="http://www.ross.net/funnelweb/tutorial/example.html">sample</a> of some code) is that a program is written in CWEB syntax (mixed C and TeX), then transformed to either C or TeX, making it <a href="http://software-carpentry.org/2011/03/4069/">painful</a> (IMHO) to either write documentation or develop code!<br />
<br />
An opposite approach is to embed documentation into the source code, simplifying the build process but still requiring a translation step to produce documentation. <a href="http://www.doxygen.org/">Doxygen</a> (along with variants such as <a href="http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html">JavaDoc</a>), my favorite documentation tool which I've used for several years, excels at extracting documentation from code and producing a polished, nicely cross-referenced result -- the middle level (describing each element) of my documentation hierarchy. However, it contains several major flaws, IMHO:<br />
<ol><li>There's no way to directly edit the resulting documentation. I often find a typo or other small correction when browsing through the documentation, which then requires that I dig up the corresponding source, edit it, recompile the docs, and check. This discourages quick fixes.</li>
<li>Writing high-level documentation is painful; editing text then compiling reminds me of all the evils of LaTeX without any of the helpfulness of word wrapping, <a href="http://www.tug.org/texworks/">TexWorks</a> docs-to-source synchronization, or quick compilation.</li>
<li>There's no way to write line-by-line commentary for a detailed look at an algorithm.</li>
<li>Including non-textual media is painful.</li>
<li>Trying to fix syntax errors in the source code documentation tags is painful.</li>
</ol><div>Recently, Python adopted use of <a href="http://sphinx.pocoo.org/">Sphinx</a> and <a href="http://docutils.sourceforge.net/rst.html">reStructured text</a> to produce their documentation, which is very impressive. It seems a step back from Doxygen, since there's no automatic linking to source code, while suffering from all its liabilities. The same is true of other alternatives I've found, such as <a href="http://pypi.python.org/pypi/antiweb/0.2.2">antiweb</a>.<br />
<br />
<b><span class="Apple-style-span" style="font-size: large;">Proposed solution</span></b><br />
<br />
So, I'd like to create yet another documentation tool, in the (most likely vain) hope it will have some impact. My ideas:<br />
<br />
<ol><li>I'd like to be able to open some source code in a modern, fully-featured word processor, add documentation (images, diagrams, etc.), then save the result (including any changes I made to the code) back to both the source file and its accompanying documentation file.</li>
<li>The program should support documenting only selected portions of the code; for example, I'd typically omit a copyright notice appearing at the top of every file. It should allow adding comments to arbitrary snippets of code, rather than just as the API level (Doxygen's strength), and placing multiple copies of these snippets in arbitrary order within the code.</li>
<li>All snippets should be auto-refreshable by reflecting any changes made to the source code. They should follow any source code changes such as moving code around, changing names, etc.</li>
</ol><div>After pondering how I can implement this in as simple a fashion as possible, I've converged on the following design:</div><div><ol><li>Label the start of a snippet with a tag marked by rarely-used delimiters, such as &|tag|&.</li>
<li>Auto-generate these tags when the documentation file is edited then saved.</li>
<li>Auto-refresh all snippets when the documentation file is opened by matching source code tagged snippets with their tagged snippets in the documentation file.</li>
</ol><div>I've chosen Microsoft Word as a word processor and begun writing code in VBA (Visual Basic for Applications), Word's macro language. There's little good documentation on the language I've found; the built-in help is poor, MSDN lacks in many areas, and even searching the web produces mediocre results. I may purchase a <a href="http://www.amazon.com/Mastering-Office-2010-Richard-Mansfield/dp/0470634006/ref=zg_bs_4047_8">book</a> to help. I haven't found a good unit-testing framework for Word; a <a href="http://www.blog.methodsinexcel.co.uk/2010/03/30/unit-testing-excel-vba-xlunit-demo/">framework for Excel</a> seems fairly tied to that platform.</div></div><div><br />
</div><div>So far, I've written code that divides a source file into named snippets; not bad progress, but there's much more to do. I should probably next:</div><div><ol><li>Write unit tests, which I should have done first.</li>
<li>Create a good, high-level document to describe all this in more detail.</li>
</ol></div></div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-16052563879261990932011-07-01T14:23:00.001-05:002011-12-05T16:03:08.458-06:00Documentation ideas<span class="Apple-style-span" style="font-size: large;"><b>The ideal for documentation creation</b></span><br />
<br />
I find that the type of documentation I want to write isn't well supported by the tools I've found. In particular, I typically like to write documentation at three levels. First, there should be a high-level overview, defining the overall purpose and ideas behind a module of code. This should be followed by detailed description of every element in a source file. Finally, I'd like to provide a line-by-line commentary of each function, commenting on the particulars of its implementation. This documentation should, as necessary, include equations, diagrams, images, flow charts, videos, etc. Because code changes frequently, all code snippets or references to names within the code should be easily refreshed by applying a tool.<br />
<br />
I see variants of this approach in use for several types of documentation. I typically write code for other programmers, rather than end users. Therefore, my "users" will be fellow programmers desiring to make use of a module I've created. For these users, a high-level explanation of a given header file followed by a description of each element of the header, provides all the information they need to make use of the module. For fellow developers, I'd like to present the same high-level overview, this time focusing of the algorithms used to implement elements declared in the header. This information naturally belongs with the source file the header accompanies. Next, a per-element detailed description of the source file might also be accompanies by a line-by-line analysis of some of the subtle portions of the code. (On a side note, I'd like to use this to develop and updated version of the PIC24 book I co-authored).<br />
<br />
My dream implementation would be seamless: a fully-featured word-processing program in which I can type code or in-line documentation, including snippets of code in explanatory sections as necessary. All documentation would be transparently encoded in the raw source file. No such tool exists, to the best of my knowledge.<br />
<br />
<span class="Apple-style-span" style="font-size: large;"><b>Existing tools</b></span><br />
<br />
<a href="http://niv.scripturetext.com/ecclesiastes/1-9.htm">There's nothing new under the sun</a>, including this idea. Its best-known formulation, <a href="http://www.amazon.com/exec/obidos/ASIN/0937073814/">Literate Programming</a> by none other than Donald Knuth, "regards a program as a communication to human beings rather than as a set of instructions to a computer. Your program is also viewed as a hypertext document, rather like the World Wide Web." (from an associated <a href="http://www-cs-faculty.stanford.edu/~uno/cweb.html">site</a>). While WEB (Knuth's tool) operates on Pascal to produce TeX documents, a more modern version (<a href="http://www-cs-faculty.stanford.edu/~uno/cweb.html">CWEB</a>) applies the same process to C. The <a href="http://www.literateprogramming.com/">literate programming site</a> provides additional information on these ideas; several other notable implementations (<a href="http://www.ross.net/funnelweb">FunnelWeb</a>, <a href="http://www.cs.tufts.edu/~nr/noweb/">Noweb</a>). The practical result (here's a <a href="http://www.ross.net/funnelweb/tutorial/example.html">sample</a> of some code) is that a program is written in CWEB syntax (mixed C and TeX), then transformed to either C or TeX, making it <a href="http://software-carpentry.org/2011/03/4069/">painful</a> (IMHO) to either write documentation or develop code!<br />
<br />
An opposite approach is to embed documentation into the source code, simplifying the build process but still requiring a translation step to produce documentation. <a href="http://www.doxygen.org/">Doxygen</a> (along with variants such as <a href="http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html">JavaDoc</a>), my favorite documentation tool which I've used for several years, excels at extracting documentation from code and producing a polished, nicely cross-referenced result -- the middle level (describing each element) of my documentation hierarchy. However, it contains several major flaws, IMHO:<br />
<ol>
<li>There's no way to directly edit the resulting documentation. I often find a typo or other small correction when browsing through the documentation, which then requires that I dig up the corresponding source, edit it, recompile the docs, and check. This discourages quick fixes.</li>
<li>Writing high-level documentation is painful; editing text then compiling reminds me of all the evils of LaTeX without any of the helpfulness of word wrapping, <a href="http://www.tug.org/texworks/">TexWorks</a> docs-to-source synchronization, or quick compilation.</li>
<li>There's no way to write line-by-line commentary for a detailed look at an algorithm.</li>
<li>Including non-textual media is painful.</li>
<li>Trying to fix syntax errors in the source code documentation tags is painful.</li>
</ol>
<div>
Recently, Python adopted use of <a href="http://sphinx.pocoo.org/">Sphinx</a> and <a href="http://docutils.sourceforge.net/rst.html">reStructured text</a> to produce their documentation, which is very impressive. It seems a step back from Doxygen, since there's no automatic linking to source code, while suffering from all its liabilities. The same is true of other alternatives I've found, such as <a href="http://pypi.python.org/pypi/antiweb/0.2.2">antiweb</a>.<br />
<br />
<b><span class="Apple-style-span" style="font-size: large;">Proposed solution</span></b><br />
<br />
So, I'd like to create yet another documentation tool, in the (most likely vain) hope it will have some impact. My ideas:<br />
<br />
<ol>
<li>I'd like to be able to open some source code in a modern, fully-featured word processor, add documentation (images, diagrams, etc.), then save the result (including any changes I made to the code) back to both the source file and its accompanying documentation file.</li>
<li>The program should support documenting only selected portions of the code; for example, I'd typically omit a copyright notice appearing at the top of every file. It should allow adding comments to arbitrary snippets of code, rather than just as the API level (Doxygen's strength), and placing multiple copies of these snippets in arbitrary order within the code.</li>
<li>All snippets should be auto-refreshable by reflecting any changes made to the source code. They should follow any source code changes such as moving code around, changing names, etc.</li>
</ol>
<div>
After pondering how I can implement this in as simple a fashion as possible, I've converged on the following design:</div>
<div>
<ol>
<li>Label the start of a snippet with a tag marked by rarely-used delimiters, such as &|tag|&.</li>
<li>Auto-generate these tags when the documentation file is edited then saved.</li>
<li>Auto-refresh all snippets when the documentation file is opened by matching source code tagged snippets with their tagged snippets in the documentation file.</li>
</ol>
<div>
I've chosen Microsoft Word as a word processor and begun writing code in VBA (Visual Basic for Applications), Word's macro language. There's little good documentation on the language I've found; the built-in help is poor, MSDN lacks in many areas, and even searching the web produces mediocre results. I may purchase a <a href="http://www.amazon.com/Mastering-Office-2010-Richard-Mansfield/dp/0470634006/ref=zg_bs_4047_8">book</a> to help. I haven't found a good unit-testing framework for Word; a <a href="http://www.blog.methodsinexcel.co.uk/2010/03/30/unit-testing-excel-vba-xlunit-demo/">framework for Excel</a> seems fairly tied to that platform.</div>
</div>
<div>
<br /></div>
<div>
So far, I've written code that divides a source file into named snippets; not bad progress, but there's much more to do. I should probably next:</div>
<div>
<ol>
<li>Write unit tests, which I should have done first.</li>
<li>Create a good, high-level document to describe all this in more detail.</li>
</ol>
</div>
</div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-90221310689578697402011-07-01T09:56:00.001-05:002011-12-05T16:03:37.405-06:00Visual Basic for Applications<span class="Apple-style-span" style="font-size: large;"><b>The ideal for documentation creation</b></span><br />
<br />
I find that the type of documentation I want to write isn't well supported by the tools I've found. In particular, I typically like to write documentation at three levels. First, there should be a high-level overview, defining the overall purpose and ideas behind a module of code. This should be followed by detailed description of every element in a source file. Finally, I'd like to provide a line-by-line commentary of each function, commenting on the particulars of its implementation. This documentation should, as necessary, include equations, diagrams, images, flow charts, videos, etc. Because code changes frequently, all code snippets or references to names within the code should be easily refreshed by applying a tool.<br />
<br />
I see variants of this approach in use for several types of documentation. I typically write code for other programmers, rather than end users. Therefore, my "users" will be fellow programmers desiring to make use of a module I've created. For these users, a high-level explanation of a given header file followed by a description of each element of the header, provides all the information they need to make use of the module. For fellow developers, I'd like to present the same high-level overview, this time focusing of the algorithms used to implement elements declared in the header. This information naturally belongs with the source file the header accompanies. Next, a per-element detailed description of the source file might also be accompanies by a line-by-line analysis of some of the subtle portions of the code. (On a side note, I'd like to use this to develop and updated version of the PIC24 book I co-authored).<br />
<br />
My dream implementation would be seamless: a fully-featured word-processing program in which I can type code or in-line documentation, including snippets of code in explanatory sections as necessary. All documentation would be transparently encoded in the raw source file. No such tool exists, to the best of my knowledge.<br />
<br />
<span class="Apple-style-span" style="font-size: large;"><b>Existing tools</b></span><br />
<br />
<a href="http://niv.scripturetext.com/ecclesiastes/1-9.htm">There's nothing new under the sun</a>, including this idea. Its best-known formulation, <a href="http://www.amazon.com/exec/obidos/ASIN/0937073814/">Literate Programming</a> by none other than Donald Knuth, "regards a program as a communication to human beings rather than as a set of instructions to a computer. Your program is also viewed as a hypertext document, rather like the World Wide Web." (from an associated <a href="http://www-cs-faculty.stanford.edu/~uno/cweb.html">site</a>). While WEB (Knuth's tool) operates on Pascal to produce TeX documents, a more modern version (<a href="http://www-cs-faculty.stanford.edu/~uno/cweb.html">CWEB</a>) applies the same process to C. The <a href="http://www.literateprogramming.com/">literate programming site</a> provides additional information on these ideas; several other notable implementations (<a href="http://www.ross.net/funnelweb">FunnelWeb</a>, <a href="http://www.cs.tufts.edu/~nr/noweb/">Noweb</a>). The practical result (here's a <a href="http://www.ross.net/funnelweb/tutorial/example.html">sample</a> of some code) is that a program is written in CWEB syntax (mixed C and TeX), then transformed to either C or TeX, making it <a href="http://software-carpentry.org/2011/03/4069/">painful</a> (IMHO) to either write documentation or develop code! While other tools (<br />
<br />
<br />
<br />
My favorite documentation tool, which I've used for several years, is <a href="http://www.doxygen.org/">Doxygen</a>. It excels at extracting documentation from code and producing a polished, nicely cross-referenced result -- the middle level (describing each element) of my documentation hierarchy. However, it contains several major flaws, IMHO:<br />
<br />
<ol>
<li>There's no way to directly edit the resulting documentation. I often find a typo or other small correction when browsing through the documentation, which then requires that I dig up the corresponding source, edit it, recompile the docs, and check. This discourages quick fixes.</li>
<li>Writing high-level documentation is painful; editing text then compiling reminds me of all the evils of LaTeX without any of the helpfulness of word wrapping, TexWorks docs-to-source synchronization, or quick compilation.</li>
<li>There's no way to write line-by-line commentary for a detailed look at an algorithm.</li>
<li>Including non-textual media is painful.</li>
</ol>
<div>
<br /></div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-47072532781288272222011-05-03T17:18:00.001-05:002011-05-04T11:06:22.976-05:00Back to bloggingIt's been a busy semester, but it's over now. I'm returning to blogging as a way to trying to be more organized and to share interesting things with others.<br />
<br />
The first question: does this make any sense? Who really cares what my to-do list is? I like having a place to store hyperlinks, since that's where I keep a lot of my ideas. Hopefully, that will be helpful. I'll keep lists in my gmail tasks and see how that works.<br />
<br />
Interesting things:<br />
<br />
<ul><li>The ideas behind the quantum leaps <a href="http://www.state-machine.com/">framework</a> are excellent. The <a href="http://www.state-machine.com/psicc2/index.php">book</a> introducing these concepts is excellent if you can survive the introductory chapter (the "fly-n-shoot" game isn't a very motivating example).</li>
<ul><li>An annoyance: the examples tend to compile and run in DOS mode on a free compiler. That's just not very appealing to me. It would be fun to "port" the framework to run under Python, since the framework is pure C, making it multi-platform.</li>
<li>The framework doesn't include a library for a particular processor. That would be very helpful, since some of the implementation details aren't clear to me. I'm considering creating just such a library for the PIC24. There is a TCP/IP stack <a href="http://www.state-machine.com/resources/appnotes.php#Middleware">implementation</a>, which looks interesting; perhaps a good starting point.</li>
<li>The author's <a href="http://embeddedgurus.com/state-space/">blog</a> makes for very interesting reading.</li>
</ul><li>Get your Starkville weather <a href="http://starkvilleweather.tumblr.com/">updates</a> from Doug Gillham, an excellent meteorologist. They're particularly helpful for severe weather (more tornadoes, anyone?).</li>
<li>A book from the National Academies Press, The Future of Computing Performance: Game Over or Next Level?, gives a great explanation of why <a href="http://www.nap.edu/openbook.php?record_id=12980&page=80#">power</a> limits growth in computing performance. High-performance computing = low power computing, which is a very different paradigm.</li>
<li>NASA posted a draft of their <a href="http://www.nasa.gov/pdf/501622main_TA04-Robotics-DRAFT-Nov2010-A.pdf">robotics roadmap</a>. Now, if I could only find the interest to actually read it...</li>
<li>I'm still looking for a good platform for Intro to Robotics. Some good finds: either the <a href="http://www.robotshop.com/summerour-stinger-robot-kit-3.html">Stinger</a> or the <a href="http://www.robotshop.com/dagu-rover-5-4wd-tracked-chassis-3.html">Dagu Rover 5</a> look good. Both have encoders in addition to DC motors, wheel/tracks, and gearing. However, both probably draw more than 1A for the motors, so I'll need a beefier H-bridge. An <a href="http://www.st.com/internet/analog/product/63147.jsp">L298</a> would work, but needs external diodes and doesn't seem breadboardable. It looks like there's a nice <a href="http://www.robotshop.com/seeedstudio-l298-dual-h-bridge-motor-driver.html">product</a> with all the necessary parts. As a second alternative, there's the <a href="http://www.sparkfun.com/products/9571">Sparkfun motor driver</a>, which contains a micro to do the PWM.</li>
<li>An <a href="http://www.cs.unc.edu/~brooks/Toolsmith-CACM.pdf">amazing paper</a> on what computer science really is. A lot of Biblical references also provide me with insights on how my faith can be expressed in an academic context.</li>
</ul>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-20059463861044903542010-09-16T13:56:00.001-05:002010-09-16T15:58:02.990-05:00Weekly meetingThis week:<br />
<ol><li>Review the <a href="http://spreadsheets.google.com/pub?key=tgg2CFaZixgjGthlxYR0CLQ&output=html">task list</a>.</li>
<li>Next week's meeting canceled -- Dr. Jones traveling to Case Western.</li>
<li>Look through <a href="https://sites.google.com/site/msstaterobotics/Home/new-students/software-installation/subversion-svn">SVN</a>, Dropbox files.</li>
<li>Clean and <a href="https://sites.google.com/site/msstaterobotics/Home/procedures">inventory</a> the lab.</li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-72043745093570819562010-09-09T13:55:00.004-05:002010-09-09T14:51:29.697-05:00Organizational meetingIt's time to get the semester started! The agenda:<br />
<ol><li>Introductions, <a href="https://sites.google.com/site/msstaterobotics/">group home page</a></li>
<li>Research overview</li>
<ol><li>Dynamics for continuum robots</li>
<li>Desktop supercomputing</li>
<li>Alternative navigation</li>
</ol>
<li>New student orientation</li>
<ol><li>Policy -- get everyone started on <a href="https://sites.google.com/site/msstaterobotics/Home/procedures/policies">training</a>. <b>Jacob - update policy page. Krishna - add link to library formatting zip files.</b></li>
<li>Make sure everyone is on e-mail list, has permissions to edit home page, task list, SVN. <b>Dr. Jones -- add Quintin, Tommy, Jacob, Ankit (SVN). Get SVN path fixed for everyone else.</b></li>
<li>Look at thesis formatting.</li>
<li>Review <a href="https://sites.google.com/site/msstaterobotics/Home/new-students/software-installation">software</a>. Get everyone started on SVN. <b>Dr. Jones to do</b> -- find MathType old version.</li>
<li>Update the <a href="https://sites.google.com/site/msstaterobotics/Home/people">people</a> page!</li>
<li>Discuss <a href="https://sites.google.com/site/msstaterobotics/Home/procedures/courses">recommended</a> courses.</li>
</ol>
<li><a href="http://bjones.youcanbook.me/">Schedule</a> weekly meeting times; look at the <a href="http://spreadsheets.google.com/pub?key=tgg2CFaZixgjGthlxYR0CLQ&output=html">task list</a>.</li>
<li>Lab: need to clean and <a href="https://sites.google.com/site/msstaterobotics/Home/procedures">inventory</a>. <b>Dr. Jones - card access for Steven, Ankit.</b></li>
<li><a href="https://sites.google.com/site/msstaterobotics/Home/new-students/software-installation/subversion-svn">SVN</a>, Dropbox need to clean up! </li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-89883773840077956822010-09-06T15:24:00.000-05:002010-09-06T15:24:18.338-05:00Fun linksI've been focusing on staying up to date with my inbox, but my blog has fallen far behind. A bit of catch-up:<br />
<br />
<ul><li>I'm using <a href="http://www.techsmith.com/camtasia.asp">Camtasia</a> to create a series of videos for the "Digital approach to Bible study" <a href="http://www.emmanuelmsu.org/index.php?option=com_content&view=article&id=64&Itemid=72&limitstart=1">Sunday School class</a> I teach. The site uses <a href="http://www.joomla.org/">Joomla</a>, so I got to learn enough of that to post videos using a <a href="http://www.joomlaworks.gr/content/view/35/41/">plugin</a>. While the first two are just .mp4 files and therefore require Quicktime, I figured that uploading an extra file allows me to use the Flash player, which is much more widely supported.</li>
<li>The <a href="http://www.autonomousrobotsblog.com/">Autonomous Robots blog</a> is neat.</li>
<li><a href="http://code.google.com/p/pythonxy/">Python(x, y)</a> is great! I'm really liking it for my <a href="https://sites.google.com/site/robotintro/">Intro to Robotics</a> class. I certainly miss some features (a nice integrated debugger is one).</li>
<li>I decided to have a bit of fun and purchase the original StarCraft. It is fun!</li>
</ul>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com1tag:blogger.com,1999:blog-3552550199939152752.post-15810549808344142962010-08-05T15:13:00.000-05:002010-08-05T15:13:27.443-05:00LinksHere's a random collection of links I found interesting.<br />
<br />
<ul><li>The <a href="http://sites.google.com/site/summerbridgerobotics">summer bridge robotics program</a> I created finished yesterday, with some nice 'bots built. Using Python to program them worked fairly well.</li>
<li>Some fun <a href="http://www.robotdungeon.com/indexRobots.html">hobbyist robotics projects</a> on the web.</li>
<li>A help site on <a href="http://www.embeddedinsights.com/">embedded computing</a>.</li>
<li>The <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit_3_poster_51792a.pdf">PICKit3 poster</a> nicely sums up program/debug connections for a PIC.</li>
</ul>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-56361035124680715472010-07-23T10:39:00.000-05:002010-07-23T10:39:07.471-05:00Electric cars<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_QMs2luEDHy4/TEm3dmeWF4I/AAAAAAAAAQ8/ncRC7kHRk8E/s1600/60112_fig_01.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="http://2.bp.blogspot.com/_QMs2luEDHy4/TEm3dmeWF4I/AAAAAAAAAQ8/ncRC7kHRk8E/s200/60112_fig_01.jpg" width="199" /></a></div>Electronic design posted an interesting <a href="http://electronicdesign.com/article/power/all_electric_vehicles_prepare_to_shock_the_automotive_market.aspx?nl=1">article</a> on the electric car. Here's an image of the Baker Electric, from the early 1900s. Wow.Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com1tag:blogger.com,1999:blog-3552550199939152752.post-8552973930682448612010-07-21T09:08:00.000-05:002010-07-21T09:08:43.737-05:00Summer camp startingToday is the beginning of the robotics portion of Summer Bridge camp I'm helping with. Looking around the web, I ran across another interesting teaching robot, the <a href="http://csbots.wetpaint.com/page/Finch">Finch</a>. The Finch can use <a href="http://wiki.roboteducation.org/Myro_Reference_Manual">Myro</a>, a Python robotics library aimed at education; I might take some ideas from that.<br />
<br />
A team is driving an <a href="http://viac.vislab.it/">autonomous robot</a> for 13,000 km -- wow! They start tomorrow.Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-16835459549852258682010-07-08T15:43:00.002-05:002010-07-08T16:16:11.157-05:00Almost doneMy time here at Eglin AFB is almost over. It's been a great time! I've enjoyed learning a lot of new things and using skills I've developed over the years to solve some of the problems. I gave a presentation, but can't distribute it publicly until I get it approved.<br />
<br />
I recently discovered several wonderful <a href="http://mail.google.com/mail/?ui=2&fs=1&view=pu&st=labs">GMail labs</a> features on their <a href="http://gmailblog.blogspot.com/">blog</a>: hierarchical labels, archive and send, SMS chat, and offline mode. Also, I learned that I can <a href="http://gmailblog.blogspot.com/2010/06/tip-5-things-you-may-not-know-you-can.html">drag and drop attachments</a>. Wow! That's muuuuuch better.<br />
<br />
Now, for random links:<br />
<ul><li><a href="http://spectrum.ieee.org/geek-life/hands-on/how-to-build-a-better-barbecue-pit">BBQ by engineers</a></li>
<li>An open-software, open-source <a href="http://spectrum.ieee.org/automaton/robotics/industrial-robots/scoop-kukas-youbot">robot from Kuka</a> for just $24,000.</li>
</ul><div>A fun video!</div><div><br />
</div><div><div style="text-align: center;"><object height="340" width="560"><param name="movie" value="http://www.youtube.com/v/qybUFnY7Y8w&hl=en_US&fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qybUFnY7Y8w&hl=en_US&fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div></div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-25831472976570481952010-06-04T09:42:00.002-05:002010-06-04T10:10:27.359-05:00To doI tried searching for a paper to go with the quad-rotor video I posted yesterday, but no luck. I did find a couple of other papers, though.<br />
<br />
Today's tasks:<br />
<ol><li>Review paper</li>
<li>Quad-rotor dynamics</li>
<li>Get wireless Matlab control working</li>
<li>Work on P&T</li>
<li>Look for Summer Bridge assistants</li>
<li>Work on parts list -- 6 V and 3.3 V DC-DC converters; price for Meanwell unit </li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-92123693634154525492010-06-03T08:41:00.002-05:002010-06-03T09:47:14.387-05:00Quad-rotor and LiPoSome notes on LiPo batteries:<br />
<ol><li>Here's a <a href="http://www.rcgroups.com/forums/showthread.php?t=209187">good summary</a>. In particular:</li>
<ol><li>We need a connector to mate with the battery's taps, to check that each cell is fully charged. A <a href="http://www.rcgroups.com/forums/showthread.php?t=599287p=3320890&postcount=29">charge balancer</a> would be nice; I've added one to the parts list.</li>
<li>We need a safe charging set-up, with a bucket of sand handy and probably a Pyrex dish with sand to charge batteries in.</li>
<li>Don't charge at more than 1C.</li>
<li>Our ESCs have a built-in low-voltage cutoff that is set to (starting battery voltage) * 0.74. So, the batteries <b>MUST BE FULLY CHARGED BEFORE CONNECTING THEM</b> for this to work properly.</li>
</ol></ol><ol></ol>Now, what neat things can a quad-rotor do?<br />
<div style="text-align: center;"><br />
<object height="340" width="560"><param name="movie" value="http://www.youtube.com/v/MvRTALJp8DM&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/MvRTALJp8DM&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div><br />
The list:<br />
<br />
<ol><li>Look up info re: LiPo charging / discharging</li>
<li>Look for 1A inverting regulator</li>
<li>Consider appropriate battery for quad-copter</li>
<li>Review paper</li>
<li>XBee / Bluetooth</li>
<li>Finish deriving and document dynamics</li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com2tag:blogger.com,1999:blog-3552550199939152752.post-37786773095293388292010-06-02T10:01:00.000-05:002010-06-02T10:01:58.759-05:00To doThe list for today:<br />
<ol><li> Paper review?</li>
<li>XBee</li>
<li>Meeting notes</li>
<li>Schedule pest control</li>
<li>Dynamics</li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-83030072820671186812010-05-28T13:03:00.000-05:002010-05-28T13:03:42.235-05:00Today's plansI finally figured out why my OpenCV code didn't work: there was a transpose in one matrix and I didn't understand how OpenCV lays out memory (it pads each column so that it's a multiple of 4 bytes). In general, indexing in OpenCV involves a painful cast; this is the most helpful summary of how to do that.<br />
<br />
I still can't get two XBee modems to communicate; I'm not sure what I'm doing wrong. I just found a nice <a href="http://www.humboldt.edu/~cm19/XBee%20setup.pdf">howto</a> and a <a href="http://forums.trossenrobotics.com/tutorials/how-to-diy-128/xbee-basics-3259/">tutorial</a> which looks like the right things to try.<br />
<br />
Plans for today:<br />
<br />
<ol><li><s>E-mail / admin</s></li>
<li>Derive dynamics for the quad-rotor</li>
<li>Work on a list of reviewers for my P&T application</li>
<li>Start deriving continuum dynamics</li>
<li><s>Order breadboards, PICKit2s, mini-Bullys, etc.</s></li>
<li>Prepare for meeting with Jimmy, TJ</li>
<li><s>Work on recruiting Summer Bridge helpers</s></li>
</ol>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-74817529982546186812010-05-27T10:39:00.000-05:002010-05-27T10:39:02.718-05:00The morning disappearsThe morning is disappearing. I worked a bit more on my CV, realized I'd forgotten to add my SECON paper and presentation to my list of publications. That took time to dig up (I still don't have the page numbers, can't access the ECE web server to post the PDFs, etc.). Going through my inbox, organizing some Summer Bridge things, etc. took a long time! I have just a few more admin tasks before I can (hopefully) be productive.<br />
<br />
The good news is that my <a href="http://www.ece.msstate.edu/wiki/index.php/Bryan_A._Jones/Publications">home publications page</a> and <a href="http://sites.google.com/site/msstaterobotics/Home/publications-and-media">research publications page</a> are a bit more updated as well, with some additional citations found.Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-10845913188270808432010-05-26T13:52:00.000-05:002010-05-26T13:52:00.695-05:00List-makingIt's high time to get a bit more organized for the summer!<br />
<br />
I've noticed several things about my netbook<br />
<ol><li>It worked best before I installed lots of software. First, the more I install, the more updaters run in the background, consuming precious memory. I'm now in the process of gradually removing unnecessary programs in hopes of restoring some of that performance.</li>
<li>I went through a series of bad turn-on problems after upgrading my netbook's RAM to 2 GB (I have an Acer Aspire One 531h). I finally discovered that powering on with the power supply attached produced failures, at times even reporting that I only had 1 GB installed. I'm guessing the supply can't handle the initial current demands. Likewise, restarting instead of shutting down then powering back on produces flaky behavior.</li>
</ol><div><div>Things to do:</div><div><ol><li>Read</li>
<ol><li>The quad-rotor thesis</li>
<li>Adam's paper</li>
<li>Look at the QR decomposition in more detail. I'd always used the SVD for pseudo-inverse calculations, but wonder if the QR is more efficient.</li>
</ol>
<li>P&T</li>
<ol><li>Determine a list of reviewers</li>
<li>Write a cover letter</li>
<li>Fill out the forms</li>
<li>Ask Tommy questions on his students for CV</li>
<li>Get CV reviewed</li>
</ol>
<li>NSF</li>
<ol><li>Read reviews</li>
<li>Look up references and incorporate</li>
<li>Start reading and editing</li>
</ol>
<li>Quad rotor</li>
<ol><li>Order a MAX3232 to interface with the Microstrain / call Microstrain (look at IMU part number)</li>
<li>Talk about DC-DC converters / power supply for PIC, speed controller</li>
</ol>
<li>Summer bridge</li>
<ol><li>Order parts: breadboards, PICKit 2s</li>
<li>Debug / work around motor noise problems</li>
<li>Build up alternate platform with encoders</li>
<li>p14p development work -- GPIO testing</li>
</ol>
<li>Other</li>
<ol><li>Talk with Ben</li>
<li>Schedule a meeting with TJ</li>
</ol></ol><div><br />
</div></div></div><div></div>Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0tag:blogger.com,1999:blog-3552550199939152752.post-52009965381231352822010-05-17T10:12:00.000-05:002010-05-17T10:12:07.887-05:00Video tracking on a microcontrollerWow; I'm impressed. Here's a great senior design project in which the students do <a href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2010/aip23_kaf42/aip23_kaf42/index.html">video processing / tracking on an AVR</a>. That's a good reminder that even low-resolution, low-speed stuff can produce some impressive results!<br />
<br />
When we do image processing, the question should be "How little data do I need?" instead of "How large an image can I process in real time?Anonymoushttp://www.blogger.com/profile/03610406930874145313noreply@blogger.com0