tag:blogger.com,1999:blog-4379641398044919102024-03-13T19:28:37.494-07:00Programmer MikeMike takes to heart the adage that <a href="http://decafbad.com/blog/2002/08/26/ooobeh">ideas are f***ing worthless</a> without action.Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-437964139804491910.post-91260489231924036582010-06-28T09:38:00.000-07:002010-06-28T09:38:54.039-07:00Fighting the demonsI've been sick... my temperature got up to 101.8 degrees F at one point.... so I've been out of it. I'm finding it fun to get back into programming, but the bitgrid project is making me realize quite a few things about myself. It takes a few minutes to add a new feature, but the hardest part is starting.... there are many temptations and diversions, as always. Those are the biggest obstacles, at least in this project.<br />
<br />
I'm using Delphi 5... something old and comfortable. I'm writing quick and dirty code, and making use of Mercurial source control to allow me to experiment freely. It's quite liberating. I've got no real inertia to overcome at this point except that which I provide myself. It's this type of project that provides the best opportunity for introspection, and I intent to use it.<br />
<br />
This hobby project will help in many other places.Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-41175014918119661602010-06-24T14:33:00.000-07:002010-06-24T14:33:03.510-07:00Using Google code for the first timeI've created a Google Code project - <a href="http://code.google.com/p/bitgrid-sim/">bitgrid-sim</a> to support my <a href="http://bitgrid.blogspot.com/">BitGrid</a> idea by providing a simulator for people to wrap their heads around. It's really basic, but it gets the job done.<br />
<br />
I was able to figure out how to get TortoiseHg on my windows boxen to sync with each other, and I've even managed to get everything pushed to the BitGrid-sim mercurial repository at Google.<br />
<br />
It is SO nice having a safety net to catch me if I really screw things up. This is making programming fun again!Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-23029804830229899192010-06-24T09:39:00.000-07:002010-06-24T09:39:06.814-07:00Pascal based operating system?I found a google code <a href="http://code.google.com/p/fpos/">project</a> which is intended to create an operating system in the Pascal programming language.... it should be possible to leverage it to make a VERY small virtual appliance for VMware, and my CABsec ideas as well.<br />
<br />
If I get time, I'll look into it more.Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-21900452988483627852010-04-24T15:00:00.000-07:002010-04-24T15:06:04.107-07:00An eye opening experience at APCUI owe a special debt today to Conrad Weisert, who showed me the full potential of object oriented programming in C++ today. His use of the object oriented paradigm to handle many of the corner cases ahead of time when dealing with quantities such as money, time, and even electrical units really impressed me. <div><br /></div><div>He's written a<a href="http://www.dorsethouse.com/books/ooc.html"> book about the subject</a>, which I intend to purchase. I'm even willing to look past the Case Sensitivity of C++ now that I've been enlightened.</div>Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-39167536332280186112010-04-09T21:07:00.001-07:002010-04-09T21:30:14.506-07:00Dusting off the cobwebsI've managed to dust off some of the cobwebs, and get this laptop and my desktop at work to sync using <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a>, which is a Windows GUI for Mercurial. Getting used to a distributed source control system wasn't too bad, especially because I'm the only programmer so far. <div><br /></div><div>I've pulled the code for <a href="http://myfs.appspot.com/">my capabilities demo</a> across, and have been tweaking it a bit. The demo itself is rather basic, so it needs a lot of work to be a useful teaching tool. The key take away is that a <i>capability</i> in cabsec speak is just a key.</div><div><br /></div><div>I also looked into Delphi 2010, and have no way of justifying the $1000 price at this point in time, especially since it's not functionally better than <a href="http://www.lazarus.freepascal.org/">Lazarus</a>/FreePascal for me at this time. I was loading JPEGs into an image, and found it still uses the same lame methods as Delphi 5. </div><div><br /></div><div><br /></div>Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-53473225449942522762009-07-28T21:03:00.000-07:002009-07-28T21:05:25.532-07:00getting back into it... day 4<div>I installed PyScripter (written in Delphi) and my productivity went way up now that I have a good debugger. I've now passed my unit tests for the first time. I feel I'm now on my way to becomming a python programmer, slowly but surely.</div><div><br /></div><div>Installed same tools on my work machine, and did my first sync. I expected the contents on the C:\wave folder of obsolete to be updated... but that's not how a distributed system works... you then tell it to sync the changes on that machine to the tip... which prevents a ton of headaches... a much saner way to go.</div><div><br /></div><div>I edited the ignore options on Tiny, now we don't care about the .pyc files.</div><div><br /></div><div>I've deliberately made a bad edit and commit and reverted it... works well!</div><div><br /></div><div>I'm feeling pretty good about this.</div><div><br /></div>Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-20030669954596831872009-07-27T21:42:00.000-07:002009-07-27T21:47:11.133-07:00getting back into it... day 3Today I decided I needed a debugger... since I'm not really up on the syntax of python (lists look like tuples look like arrays to me)... I was <i>really</i> lost... it took about an hour to digging around to decide on <a href="http://code.google.com/p/pyscripter/">PyScripter</a> to be my IDE. I don't want to get tied into a product I can't afford, so I took a pass on Komodo from ActiveState.<div><br /></div><div>I've managed to finally deduce what I was doing wrong, and pass one of my trivial unit tests... the code now looks like this:</div><div><br /></div><div><br /></div><br />--Translate01.py<br /><tt><pre>"""Translates internal representation to and from xhtml"""<br /><br />#define Exceptions<br /><br />class HtmlError(Exception): pass<br />class invalidHtmlError(HtmlError): pass<br /><br />#Define escape mapping<br />htmlCharMap = [('>', ">"),<br /> ('<', "<")]<br /><br /><br />def toHtml(x):<br /> """convert x to html string"""<br /> return x<br /><br />def fromHtml(s):<br /> """convert html string to internal representation"""<br /><br /> result = ''<br /> index = 0<br /> while index < len(s):<br /> foundat = -1<br /> i = 0<br /> for ascii,html in htmlCharMap:<br /> if (foundat < 0) & (s[index:index+len(html)] == html):<br /> foundat = i<br /> i += 1<br /> if foundat >= 0:<br /> ascii, html = htmlCharMap[foundat]<br /> result += ascii<br /> index += len(html)<br /> else:<br /> result += s[index]<br /> index += 1<br /> return result<br /></pre></tt><br />Translate01_test.py:<br /><tt><pre>"""Unit test for translate01.py"""<br /><br />import translate01<br />import unittest<br /><br />class KnownValues(unittest.TestCase):<br /> knownValues = ( ( '', ''),<br /> ( 'x','x'),<br /> ( '>','>'),<br /> ( '<','<'),<br /> ( 'this is a test','this is a test') )<br /><br /> def testToHtmlKnownValues(self):<br /> """ToHtml should give known results with known input"""<br /> for s1,s2 in self.knownValues:<br /> result = translate01.toHtml(s1)<br /> self.assertEqual(s2,result)<br /><br /> def testFromHtmlKnownValues(self):<br /> """FromHtml should give known results with known input"""<br /> for s1,s2 in self.knownValues:<br /> result = translate01.fromHtml(s2)<br /> self.assertEqual(s1,result)<br /><br /><br />if __name__ == "__main__":<br /> unittest.main()<br /></pre></tt>Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-32098218278377703352009-07-25T20:38:00.001-07:002009-07-25T20:44:46.706-07:00getting back into it... day 2I've downloaded and installed <a href="http://bitbucket.org/tortoisehg/stable/wiki/Home">TortiseHg</a> for Windows (I'm running XP on my netbook) and I've done my first few tests with it... it's pretty nice. I've used TortiseSVN in the past, so I kind of knew what to expect. I chose TortiseHg and <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a> because it's the version control system that Python is going to use in the future, so that's good enough for me. I don't have the experience or time to get it, so I'm going with the crowd on this one for now.<div><br /></div><div>I added some test cases, now my code doesn't pass. Here's the current version of the testing unit:</div><br /><br /><pre><tt>"""Unit test for translate01.py"""<br /><br />import translate01<br />import unittest<br /><br />class KnownValues(unittest.TestCase):<br /> knownValues = ( ( '', ''),<br /> ( 'x','x'),<br /> ( '>','>'),<br /> ( '<','<') )<br /> def testToHtmlKnownValues(self):<br /> """ToHtml should give known results with known input"""<br /> for s1,s2 in self.knownValues:<br /> result = translate01.toHtml(s1)<br /> self.assertEqual(s2,result)<br /> def testFromHtmlKnownValues(self):<br /> """FromHtml should give known results with known input"""<br /> for s1,s2 in self.knownValues:<br /> result = translate01.fromHtml(s2)<br /> self.assertEqual(s1,result)<br /> <br /><br />if __name__ == "__main__":<br /> unittest.main() <br /></tt></pre>Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-31817442686498428182009-07-24T18:23:00.000-07:002009-07-24T20:23:08.779-07:00Shaking off the cobwebs, getting back into itI've got some programming ideas, inspired by previous efforts and the most recent lessons learned from Google Wave, I'm going to start a python project to handle translating source code (specifically pascal code) bidirectionally to object code and symbol tables.<div><br /></div><div>My main programming exerience is in Borland's Delphi 5, which suceeded a number of years using Turbo Pascal 7.0 under DOS. So, these new languages like Python, etc al. are a bit odd to me, but I really like the power of the built in dictionaries, tuples, etc.</div><div><br /></div><div>I'm using an old build of Active State python (2.5.1) which I'll be updating. I managed to write a few modules with very trivial amounts of code, cribbing heavily from "Dive into Python" by Mark Pilgrim.</div><div><br /></div><div>Here it is... ALL of it... </div><div><br /></div><div><br /></div><div>Translate01.py:</div><div><br /></div><div><div>"""Translates internal representation to and from xhtml"""</div><div><br /></div><div>#define Exceptions</div><div><br /></div><div>class HtmlError(Exception): pass</div><div>class invalidHtmlError(HtmlError): pass</div><div><br /></div><div>def toHtml(x):</div><div> """convert x to html string"""</div><div> return x</div><div><br /></div><div>def fromHtml(x):</div><div> """convert html string to internal representation"""</div><div> return x</div><div><br /></div><div><br /></div><div><br /></div><div>Translate01_test.py:</div><div><br /></div><div><div>"""Unit test for translate01.py"""</div><div><br /></div><div>import translate01</div><div>import unittest</div><div><br /></div><div>class KnownValues(unittest.TestCase):</div><div> knownValues = ( ( '', ''),</div><div> ( 'x','x'))</div><div> def testToHtmlKnownValues(self):</div><div> """ToHtml should give known results with known input"""</div><div> for s1,s2 in self.knownValues:</div><div> result = translate01.toHtml(s1)</div><div> self.assertEqual(s2,result)</div><div> def testFromHtmlKnownValues(self):</div><div> """FromHtml should give known results with known input"""</div><div> for s1,s2 in self.knownValues:</div><div> result = translate01.fromHtml(s2)</div><div> self.assertEqual(s1,result)</div><div> </div><div><br /></div><div>if __name__ == "__main__":</div><div> unittest.main() </div><div><br /></div><div><br /></div><div><br /></div><div>It actually runs.... and tests ok... (because it's trivial right now)</div><div><br /></div><div><div>PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] on win32.</div><div>Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information.</div><div>>>> ..</div><div>----------------------------------------------------------------------</div><div>Ran 2 tests in 0.000s</div><div><br /></div><div>OK</div><div><br /></div><div><br /></div><div>So.... I'm on a journey... and I just took the very first step... a thousand miles to go. ;-)</div></div></div></div>Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-91255129251099170122007-11-08T14:28:00.001-08:002007-11-08T14:28:00.612-08:00Big Crane<div style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a href="http://www.flickr.com/photos/--mike--/1923380573/" title="photo sharing"><img src="http://farm3.static.flickr.com/2077/1923380573_1a8476367f_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> <a href="http://www.flickr.com/photos/--mike--/1923380573/">Big Crane</a> <br /> Originally uploaded by <a href="http://www.flickr.com/people/--mike--/">--Mike--</a> </span></div>This is a big hydrocrane which was unloading the counterweights from a tower crane at Randolph and State streets in Chicago, Illinois this morning.<br /><br />I used HUGIN and Emblend to create a TIF, then Paint Shop Pro 10 to help tweak for a bit better contrast ratio.<br /><br />Comments welcome.<br />--Mike--<br clear="all" />Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-57194014957520846032006-11-12T06:15:00.001-08:002006-11-12T06:15:18.187-08:00FlickrThis is a test post from <a href="http://www.flickr.com/r/testpost"><img alt="flickr" src="http://www.flickr.com/images/flickr_logo_blog.gif" width="41" height="18" border="0" align="absmiddle" /></a>, a fancy photo sharing thing.Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0tag:blogger.com,1999:blog-437964139804491910.post-41801125973037922972006-09-04T10:14:00.000-07:002006-09-04T10:16:03.175-07:00Transparency, A-Lists, and time<a href="http://homepage.mac.com/dave_rogers">Dave Rogers</a> correctly points out that <a href="http://homepage.mac.com/dave_rogers/GHD09-06.html#note_2988">technology doesn't change what we do</a>, only how we do it. The case in point this time is the overwhelmingly male speakers roster at the <a href="http://www.office20con.com/">Office 2.0 2006 Conference</a>. Out of 54 speakers, only 1 is a woman.<br /><br />Now, I've actually done some thinking about this, rather than just firing off a reactionary posting as is encouraged by the blogosphere. Actual contemplation and discussion is highly discouraged by the sweeping wave nature of discourse among the "a listers", who tend to dive into a topic, and leave it just as quickly..... interesting tangents....<br /><br />Anyway... I asked Noran about this, and she gave me an insightful and very deep answer, which completely and totally supported Dave's point... technology makes work easier, but in most cases doesn't change what we do, even in the medical field.<br /><br />Of course... I was actually asking a different question... (what about the underrepresentation of women) and she <span style="font-style: italic;">again</span> came up with an insightful and deep answer... It doesn't matter who speaks, as long as they are the most qualified. We talked about how to make sure it's fair... and we agree it gets very difficult very quickly. (I.E. are all religions and races represented??)<br /><br />After sleeping on it, getting even further away from the wave of conversation... I reach what I believe to be the proper way to handle this... <span style="font-weight: bold;">more transparency</span>.<br /><br />If we all knew who was invited to speak, and why... we'd all be better served. We could better judge the nature of the conference, and the motivations of the organizers. Better informed decisions help make the best markets. Of course, the converse is that profiteers who want to get something for nothing (or little work) will lose... so they'll prefer to keep things opaque.<br /><br />Well this is my first Blogger beta post... let's see how it does.<br /><br />-----<br />Update: <a href="http://bbgun.burningbird.net/">Shelley Powers</a> <a href="http://bbgun.burningbird.net/diversity/so-much-fun/">reports</a> that they've added three very good women to the roster.Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com0