<?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-8462164</id><updated>2011-04-21T16:05:11.559-07:00</updated><title type='text'>Line. Connection. Aim</title><subtitle type='html'>Conflicted, focused, self-deprecating egomaniacal sociopath with delusions of grandeur.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8462164.post-7453524219583736966</id><published>2007-05-15T12:19:00.000-07:00</published><updated>2007-05-15T13:56:04.085-07:00</updated><title type='text'>7 Things You Probably Didn't Know About Me</title><content type='html'>Gus tagged me, and I have little better to do.&lt;br /&gt;&lt;br /&gt;1.  My earliest memory is from age 3.  I was walking next door with my neighbor who was a year older.  He asked me if I were four yet.  I said, "No, I am still three."&lt;br /&gt;&lt;br /&gt;2.  I actually liked the first Linkin Park CD even though I was plenty old enough to know better.&lt;br /&gt;&lt;br /&gt;3.  I have broken at least one window and/or windshield with the following items: a tennis ball, a soccer ball, my head.&lt;br /&gt;&lt;br /&gt;4.  I am not a germ-freak, but for the most part, I don't like people touching me.  We can shake hands, play a contact sport, but don't make me high five you, and for the love of God, don't ever pat me on the back or lean on me.  Don't get me started on people who have different ideas than me about whether hugging me is appropriate.  I prefer physical contact is limited to the following:&lt;br /&gt;&lt;br /&gt;- Shaking hands upon greeting and departure&lt;br /&gt;- Contact sports (This does not include &lt;a href="http://www.urbandictionary.com/define.php?term=gay+chicken"&gt;Gay Chicken&lt;/a&gt;)&lt;br /&gt;- You are a doctor.   Better yet, you are my doctor (or other medical professional).&lt;br /&gt;- You are &lt;a href="http://www.adrienneg.com/"&gt;Adrienne&lt;/a&gt;.&lt;br /&gt;- You are family or a close friend, but even then, let's keep it to a minimum.&lt;br /&gt;- You are saving me from bodily harm or death&lt;br /&gt;&lt;br /&gt;5. Many introverts find direct eye contact uncomfortable, but I often despise it.  And it sucks how much non-introverts don't get this.  Sometimes when I am making eye contact with someone I am not familiar with, it feels like that person is peering right into my soul, deciphering all my secrets, and depriving me of my last shred of privacy, all the while shining a spotlight on me so that my soul is not just exposed, it is also being advertised.&lt;br /&gt;&lt;br /&gt;6. The smell of Tequila alone can make me vomit.&lt;br /&gt;&lt;br /&gt;7.  Even though I am in the worst shape in my life, I can still do a front handspring.&lt;br /&gt;&lt;br /&gt;I tag no one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-7453524219583736966?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/7453524219583736966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=7453524219583736966' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/7453524219583736966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/7453524219583736966'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2007/05/7-things-you-probably-didnt-know-about.html' title='7 Things You Probably Didn&apos;t Know About Me'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-751189593190447227</id><published>2007-03-29T06:47:00.000-07:00</published><updated>2007-03-29T06:49:15.277-07:00</updated><title type='text'>Roadtrip</title><content type='html'>Thanks to Google, I can make that road trip to Stockholm I have been talking about all these years.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://maps.google.com/maps?f=d&amp;hl=en&amp;amp;saddr=Mustang,+Oklahoma,+United+States&amp;daddr=KTH-hallen,+Stockholm,+Sweden&amp;amp;sll=47.398349,-39.726562&amp;sspn=88.269688,220.78125&amp;amp;ie=UTF8&amp;z=3&amp;amp;ll=47.398349,-39.902344&amp;spn=88.269688,220.78125&amp;amp;om=1&amp;amp;layer=t"&gt;My Route&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-751189593190447227?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/751189593190447227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=751189593190447227' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/751189593190447227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/751189593190447227'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2007/03/roadtrip.html' title='Roadtrip'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-117216752591728802</id><published>2007-02-22T10:05:00.000-08:00</published><updated>2007-02-22T10:14:17.958-08:00</updated><title type='text'>Kat and Gus, Thank You; Pete McCordic, I'm Sorry</title><content type='html'>&lt;a href="http://www.metroplaza.net/"&gt;Gus&lt;/a&gt; and &lt;a href="http://www.platkat.com/"&gt;Kat&lt;/a&gt; gave &lt;a href="http://www.adrienneg.com/"&gt;Adrienne&lt;/a&gt; and me a signed copy of Amy Sedaris' &lt;a href="http://www.amazon.com/Like-You-Hospitality-Under-Influence/dp/0446578843/sr=8-1/qid=1172100165/ref=pd_bbs_sr_1/103-7971138-3592605?ie=UTF8&amp;amp;s=books"&gt;I Like You: Hospitality Under the Influence&lt;/a&gt;.  They rule for that.  Thanks, guys. &lt;br /&gt;&lt;br /&gt;I read &lt;a href="http://www.platkat.com/2006/12/strangers-with-cookbooks.html"&gt;Kat's post&lt;/a&gt; about meeting Amy Sedaris sometime after she'd posted, and concluded that if Adrienne and I were the couple she was referring to, we would have received the book by now.  I felt a little disappointed because I have watched a decent amount of Strangers with Candy with Gus and Kat, and I had a hard time imagining they knew a couple more deserving than Adrienne and me.  Lo and behold, I get home for work one day a few weeks later to find a package on my porch.  I thought the new video card I ordered had just arrived freakishly fast.  Then I noticed it was from New York, NY.  No way in hell a video card gets from NY to an OKC 'burb that fast, so I was intrigued at the box's contents.  I opened the box and much silent resentment was lifted from my shoulders when I realized Adrienne and I were the recipients of the above-mentioned Amy Sedaris book.  The book was signed:&lt;br /&gt;&lt;br /&gt;Adrienne and Jim,&lt;br /&gt;&lt;br /&gt;Sorry you broke up.&lt;br /&gt;Good Times!&lt;br /&gt;&lt;br /&gt;Amy Sedaris&lt;br /&gt;&lt;br /&gt;I love that she included Good Times!.&lt;br /&gt;&lt;br /&gt;Then it got me thinking about Kat's post, and meeting celebrities in general.  I can't say I have ever met a full-blown celebrity, but some "niche" ones.&lt;br /&gt;&lt;br /&gt;Which brings me to Pete McCordic, professional bowler, and niche-celebrity for the purposes of this story.&lt;br /&gt;&lt;br /&gt;I bowled in a Pro-Am tournament at the 1989 Seagram's U.S. Open in Edmond, OK, my one and only encounter with Pete McCordic.  Having never met a pro bowler and being only 13, I probably had unrealistic expectations.  I suppose somewhere deep down, I wanted to impress him, or for him to see some remarkable bowling talent I hoped I possessed.  But alas, this was not the case.  Pete didn't take any particular interest in me or any of the other youth competitors.  I don't think he really wanted to be there.  If &lt;a href="http://www.imdb.com/title/tt0430289/"&gt;A League of Ordinary Gentlemen's&lt;/a&gt; portrayal is accurate, there is probably a good chance he was hung over.&lt;br /&gt;&lt;br /&gt;For a long time, Pete held a certain distinction in professional bowling that was a bit of a double-edged sword.  He led the tour's career earnings list, for players with &lt;b&gt;no titles&lt;/b&gt;.  So yeah, he cashed consistently, but had never won.  I believe this distinction weighed heavily on him at times. Finally in 1988 and fifteen years into his professional bowling career, Pete earned his first title at the Fresno Open.&lt;br /&gt;&lt;br /&gt;Rewind to 1987.  There had been a thirteen-year drought for 300s bowled on television.  Pete shoots 300 on TV against Wayne Webb at Greater Los Angeles open, collecting a $100,000 bonus from True Value in the process.&lt;br /&gt;&lt;br /&gt;Some weeks before the tournament, I read an interview with Pete McCordic in Bowlers' Journal.  In it he lamented the 300 coming before the title at Fresno because he didn't want to be remembered as "the guy that shot the 300".&lt;br /&gt;&lt;br /&gt;So failing to get his attention through my bowling prowess (which, admittedly, would have been tough considering I averaged in the mid-140s at the time, and it was the toughest lane condition I had ever bowled on.  Hell, in the title match of the pro tournament, neither pro broke 200 (M. Aulby defeated J. Pencak, 195-178).), I decided I would try to get Pete's attention anyway.&lt;br /&gt;&lt;br /&gt;Beaming with fake admiration only a 13-year-old can conjure, I said to him, "You're the guy that shot the 300".  Yes, even at 13, I was a vindictive ass.&lt;br /&gt;&lt;br /&gt;He stifled a cringe, faked a smile, shot 190-something, and moved to the next pair.&lt;br /&gt;&lt;br /&gt;So, Pete McCordic, I'm sorry.  I've always wondered if you would have responded differently if I had said something cool, like "Hey, congratulations on Fresno", but we seldom get the closure we crave.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/jamesb___/398912186/" title="Photo Sharing"&gt;&lt;img src="http://farm1.static.flickr.com/128/398912186_fdaa8f52ce_o.png" alt="mccordic" height="212" width="320" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-117216752591728802?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/117216752591728802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=117216752591728802' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/117216752591728802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/117216752591728802'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2007/02/kat-and-gus-thank-you-pete-mccordic-im.html' title='Kat and Gus, Thank You; Pete McCordic, I&apos;m Sorry'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-114730684128769534</id><published>2006-05-10T17:20:00.000-07:00</published><updated>2006-05-10T17:49:49.026-07:00</updated><title type='text'>The Childhood of a Lawyer and Its Repercussions</title><content type='html'>I know this is long overdue, but I just haven't had much to write about lately.  Still don't, in fact, I have to dig deep into my childhood to find an anecdote worth repeating.  Or maybe it isn't.  I don't know.  You be the judge.&lt;br /&gt;&lt;br /&gt;In my early childhood, I had a best friend whom we will call Eric.  Protecting his identity is kind of important, as you will see as this story unfolds.&lt;br /&gt;&lt;br /&gt;So for Eric's ninth birthday, we went to see &lt;a href="http://www.imdb.com/title/tt0087805/"&gt;Ninja III: The Domination&lt;/a&gt; at the dollar movies in Yukon.  I hadn't seen Ninja, or Ninja II, and I am not even sure those movies were ever made.  But it was 1984, the height of suburban white kid ninja phases and profitable movie sequels.   So, without a doubt, we were in.&lt;br /&gt;&lt;br /&gt;Before the movie, Eric announces he has to take a dump.  Eric loved shock value as one may infer.  But the shock value I was in store for, well, I was not prepared.&lt;br /&gt;&lt;br /&gt;Eric proceeded to climb on the large counter in the men's restroom, and dropped a big, fat, steaming log directly into one of the sinks.&lt;br /&gt;&lt;br /&gt;We laughed.  I thought it was funny at the time (I was eight).  When we came back to use the restrooms after the movie--Eric, in a much more conventional manner--we saw the log was gone.  I remember joking, "someone got hungry".  My weak attempt at shock value paled in comparison to Eric's steamer.&lt;br /&gt;&lt;br /&gt;I have reflected on this incident much over the years, and my viewpoint has evolved considerably.  A couple of years later, I marveled at the balls Eric had to do such a thing.  The thing about the men's restrooms at that movie theater was that there was no door; just a short hallway and a 90-degree turn provided all the necessary privacy.  If someone had walked in, Eric would have been caught.  There would not have been any kind of sounds to warn us of a third party's entrance.  We would have had no explanation.  (I say "we" because I think I would have gotten in trouble due to guilt by association.)  Let's consider:&lt;br /&gt;&lt;br /&gt;(Shock and Disgusted Imaginary Man):  "What in the Hell&amp;#8230;?   What the Hell are you doing?!"&lt;br /&gt;&lt;br /&gt;(Eric):  "I had to go really bad.  All the stalls were full."&lt;br /&gt;&lt;br /&gt;(SDIM):  "What?! You two little bastards are the only ones in here.  There are four empty stalls&amp;#8230;"&lt;br /&gt;&lt;br /&gt;I just don't think it would have been pretty after that.&lt;br /&gt;&lt;br /&gt;A couple of years later, I thought it was funny to taunt Eric about the terrible thing he had done in subtle ways.  I remember saying to my mother, "Mom, one time Eric and I went to the movies, and someone had pooped in the sink."&lt;br /&gt;She responded, "Only the scum of the Earth would do that."  After that, I always told Eric he was the scum of the Earth in jest.  I think he wore the title with pride.&lt;br /&gt;&lt;br /&gt;Right around the time I turned 17, I ended up getting a job at the bowling alley where I bowled league.  I was kind of like a busboy for bowling lanes, what those in the industry refer to as "concourse boy".  It occurred to me that some other poor stiff getting minimum wage had to clean up Eric's mess.  While the night crew cleaned the bathrooms, I knew that if some other little bastard committed a similar bathroom atrocity during business hours, my boss wasn't going to let it wait for the night crew, and I would be tasked for the necessary steamer extraction.  I waited and waited for it to come full circle.&lt;br /&gt;&lt;br /&gt;After all, it wasn't like I was dealing with the upper crust of society working at a bowling alley.  While I knew a league bowler wouldn't shit in the sink, the one thing I learned there was to never underestimate the appalling behavior open bowlers (non-league bowlers) were capable of.  Hell, I was amazed at the number of people who wandered in with no intention of bowling and their behavior.  But I saw the way some people drank there, and I always expected someone to vomit on the floor eventually.  &lt;br /&gt;&lt;br /&gt;I was prepared to quit on the spot if that occurred.&lt;br /&gt;&lt;br /&gt;But it never came full circle.  No poop, no vomit.  Although once when I was working the desk after a promotion and &lt;a href="http://www.metroplaza.net"&gt;Gus&lt;/a&gt; was working concourse, someone spilled a tuna fish sandwich's contents on the floor, and we both thought it was puke.  He asked me what it was, knowing damn well what we both feared it was, in a tone that suggested he might be willing to quit on the spot as well.  Maybe that was the "coming full circle" that I deserved since I just laughed at Eric's dump and didn't take an active role.&lt;br /&gt;&lt;br /&gt;I guess that is the end of the story for the most part.  Eric moved away, but stayed in our school district.  We didn't hang out much after he moved, but I do remember he was voted "Most Likely to Succeed" in his senior class.  Last I heard, he was a lawyer in San Diego or something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-114730684128769534?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/114730684128769534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=114730684128769534' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/114730684128769534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/114730684128769534'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2006/05/childhood-of-lawyer-and-its.html' title='The Childhood of a Lawyer and Its Repercussions'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-113450009694913002</id><published>2005-12-13T10:54:00.000-08:00</published><updated>2005-12-14T08:27:20.670-08:00</updated><title type='text'>The Littlest Cowboy</title><content type='html'>What is up with the significant portion of young mothers who seem to be playing dress up with their children?&lt;br /&gt;&lt;br /&gt;The other day, Adrienne and I were at Primo's having a nice dinner.  There is family all close to us, and we are having to withstand overhearing their stupid conversation.  Nothing beats a trophy wife elementary school teacher with diarrhea of the mouth bitching about how hard it is to be a teacher.&lt;br /&gt;&lt;br /&gt;A young boy about 3 years old was in a high chair near our table.  I look down and notice a small set of cowboy boots sitting on floor next to the high chair.  I am appalled for two reasons:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Why can't this little bastard eat with his shoes on?  Maybe he could if he were wearing more traditional footwear.&lt;br /&gt;&lt;li&gt;Why the hell is this little bastard wearing cowboy boots?&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Seriously, why does this kid need to wear cowboy boots?  Does he need protection from rattlesnakes when he is out bailing hay amongst the goldenrods?  Surely, this kid had no practical reason to be in cowboy boots.  Why not just give him a monocle, a fedora , and a pocket watch?  Wouldn't that just be precious? Or was the mom using her son as an accessory to proclaim, "We're Gawd feerin' simple folk that supports Dubya and our troops"?  I leave that for you to decide.&lt;br /&gt;&lt;br /&gt;Before leaving, Dad dutifully put the boots back on the Littlest Cowboy's feet and lifted him out of the high chair.  As soon as his feet hit the floor, the Littlest Cowboy took off in a full sprint that lasted about a step and a half on the slick tile floor.  Yeah, the Littlest Cowboy bit it pretty hard.  And I am such a bastard, I smiled inwardly, not so much at the Little Cowboy's pain, but rather that his mother's insistence on playing real life dolly with him caused that pain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-113450009694913002?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/113450009694913002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=113450009694913002' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113450009694913002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113450009694913002'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/12/littlest-cowboy.html' title='The Littlest Cowboy'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-113449801507238968</id><published>2005-12-13T10:20:00.000-08:00</published><updated>2005-12-13T10:22:36.546-08:00</updated><title type='text'>From the sick mind of charr</title><content type='html'>&lt;a href="http://hoarymarmot.blogspot.com/2005/11/fun-with-letter-s.html"&gt;This&lt;/a&gt; was too good not to share.  My only regret is not finding it six weeks ago.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-113449801507238968?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/113449801507238968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=113449801507238968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113449801507238968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113449801507238968'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/12/from-sick-mind-of-charr.html' title='From the sick mind of charr'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-113443269584898782</id><published>2005-12-12T16:11:00.000-08:00</published><updated>2005-12-13T10:40:42.536-08:00</updated><title type='text'>Reminiscing about My First Day of College (AKA "What a prick!")</title><content type='html'>My first day of college was a long one beginning with Physics for Non-Majors at 10:30 AM and ending with Freshmen Composition, a three-hour class that met once a week at 6:30 PM.  I also didn't live on campus.  I commuted from my parents' house (about a 35 mile drive) for the first few weeks of the semester.  I like to think those facts contributed to some ill-advised decisions/behavior during that first English class.&lt;br /&gt;&lt;br /&gt;Those of you who know me know that I am not the most social of people to strangers and I have a small issue with social anxiety.  You can imagine how pleased I was when the instructor announced our first activity would be to pair with a classmate, interview them (and get interviewed as well), and write a paper to introduce them to the rest of the class.&lt;br /&gt;&lt;br /&gt;To protect the innocent, I will change the name of my interviewee.  She was a fairly attractive blonde country girl we'll call LaDonna Simpson.  During our interview, I was immediately struck by LaDonna's southern accent.  I started thinking about various interviews I had read with athletes from small southern towns in Sport Illustrated and how the writer would always remark on the accent.  They were always poignant and non-judgmental; after all there is nothing wrong with being a little "country".  I got it stuck in my head I wanted to do the same thing with LaDonna.&lt;br /&gt;&lt;br /&gt;I don't remember much of the interview, but I remember reading the paper.  After a few mundane sentences into my first paragraph, I wrote something to the effect of&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;I&gt;"After a few lines of dialogue with Ms. Simpson, one thing is apparent:  Purcell, Oklahoma is as country as it sounds."&lt;/I&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;As soon as the last word left my mouth, the class let out a collective "ooh", like I had just called her fat or flat or ugly or any of the other myriad of insults middle school boys use to taunt their female counterparts.  It sounded a lot better in my head.   In fact, this was really the first time I had found a southern accent not only less than repulsive, but even mildly charming.  I guess it was the first time I had heard one that wasn't littered with the typical grammatical errors generally associated with southern accents.&lt;br /&gt;&lt;br /&gt;In hindsight, I should have stopped and explained I intended no insult, but my fear of public speaking clung firmly to my initial objective: to get through this unpleasantness as quickly as possible.  The next semester would only inflame my regret as LaDonna was the only student that was in both my English I and English II classes.  I do recall her never speaking to me again.  In my defense, she probably would have never spoken to me had we not been paired up on the first day of class.&lt;br /&gt;&lt;br /&gt;After all of the interview papers were read, the instructor had everyone go around the room and say two or three unique things about ourselves that were not mentioned in the interview.  I don't remember what I said as I was completely overshadowed by a classmate.&lt;br /&gt;&lt;br /&gt;I remember there being two guys in the class that were friends, while the rest of us were completely on our own.  Nothing of much interest was said until it got to one of the two friends.&lt;br /&gt;&lt;br /&gt;He said, "I am hypoglycemic. I make 20,000 copies a week, and I am routinely abducted by aliens".&lt;br /&gt;&lt;br /&gt;This got a collective laugh from the class excluding me.  I thought it was kind of a lame joke.  The instructor questioned his seriousness.  He was steadfast.  The more convinced I became he believed aliens abducted him, the less I was able to control my laughter.  Most of the class had stopped laughing at this point.&lt;br /&gt;&lt;br /&gt;He continued, "I was carry around some alien paraphernalia, so in case I am abducted by new guys, they will know I am cool".&lt;br /&gt;&lt;br /&gt;The question on everyone's mind, "Do you have any alien paraphernalia on you now?" was asked by our instructor.&lt;br /&gt;&lt;br /&gt;"Yes", he said, and proceeded to pull out a medium density plastic triangle.  It look to be denser than a plastic Frisbee, but presumably less dense than the high-density polymer plastic gun used by &lt;a href=http://www.imdb.com/title/tt0107206/&gt;Mitch Leary&lt;/a&gt;.  Affixed to each vertex of the green triangle were a few foldout tools.  It was like a Swiss army knife times 1.5.&lt;br /&gt;&lt;br /&gt;He unfolded a tool resembling a prison shank, and said "Like this could be used to dig or whatever."&lt;br /&gt;&lt;br /&gt;"As you can see, they are very advanced" his friend taunted.  I lost it.  I am a sucker for sarcasm.&lt;br /&gt;&lt;br /&gt;Some people were still occasionally chuckling.  My face was buried in my hands, totally losing my shit.  It was as close as I have ever come to &lt;a href=http://www.southparkstudios.com/show/display_episode.php?season=5&amp;id1=510&amp;id2=75&gt;blowing a funny fuse&lt;/a&gt;.  The alleged abductee, however, seemed to get more and more visibly flustered.  The instructor tried to smooth things over, stating the student really believed he was being abducted, it was very real to him, and we should respect that.  I tried my best to be mature, but I seemed to start laughing about it again every few minutes for the duration of the class's first session.&lt;br /&gt;&lt;br /&gt;Obviously, the lesson here is that I am a really insensitive asshole.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-113443269584898782?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/113443269584898782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=113443269584898782' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113443269584898782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113443269584898782'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/12/reminiscing-about-my-first-day-of.html' title='Reminiscing about My First Day of College (AKA &quot;What a prick!&quot;)'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-113131922959913333</id><published>2005-11-06T15:20:00.000-08:00</published><updated>2005-11-09T21:01:39.383-08:00</updated><title type='text'>A fun &amp; sneaky family...</title><content type='html'>I was working on my bowling tracking app a few days before Halloween when my doorbell rang.  I wasn't expecting company, and I didn't particularly welcome any distractions.&lt;br /&gt;&lt;br /&gt;I reluctantly got up and went to answer the door.  As I approached the my front door, I could see something had been taped to the outer glass door.  It turned out to be this:&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/33/60567399_8475a2c70c_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;I opened the door, and no one was there.  This bag was sitting on my front porch.&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/31/60567372_ef0f6476b3_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;The bag wasn't empty.  It contained:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A Quaker Oats Chocolate Chip Granola Bar&lt;br /&gt;&lt;li&gt;A mini Hershey's Milk Chocolate candy bar&lt;br /&gt;&lt;li&gt;Two rolls of Smarties&lt;br /&gt;&lt;li&gt;A bag of Chewy Sweet Tarts&lt;br /&gt;&lt;li&gt;A pack of Whoppers&lt;br /&gt;&lt;li&gt;A Vampire Bobblehead contain Jack O' Lantern gum&lt;br /&gt;&lt;li&gt;A pair of Halloween socks&lt;br /&gt;&lt;li&gt;A Halloween Poem&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/33/60567330_b6f91f0f52_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;Here is the poem:&lt;br /&gt;&lt;ul&gt;&lt;i&gt;Happy Halloween!&lt;br /&gt;&lt;br /&gt;A fun &amp; sneaky family has come to town&lt;br /&gt;To leave you some goodies that was see you have found&lt;br /&gt;If you do not wish to disappoint all&lt;br /&gt;Continue this greeting, this sneaky family call!&lt;br /&gt;Buy or make some treats, 2 paper ghosts, and 2 notes like this&lt;br /&gt;Deliver them to 2 neighbors who may have been missed&lt;br /&gt;Don't let them see you, be sneaky, no doubt&lt;br /&gt;And make sure they put their paper ghosts out!&lt;br /&gt;Next, you have only two days to act, so be quick&lt;br /&gt;Leave it at doors where there is no light&lt;br /&gt;Ring the doorbell and run, and stay out of sight!&lt;br /&gt;Last but not least, come join in the season&lt;br /&gt;Don't worry, be happy - you need no good reason&lt;br /&gt;Be cool, have fun, and remember don't be seen!&lt;br /&gt;Share the spirit of Halloween!!&lt;br /&gt;&lt;/i&gt;&lt;/ul&gt;&lt;br /&gt;I don't think the author had much regard for meter.  Then you have the line "Next, you have only two days to act, so be quick".  It doesn't rhyme with anything.  But I understand because sometimes when I am writing a traditional poem, I forget and think I am writing a Haiku.  Then when I proofread it, I notice, but I decide I can't do it any better and leave it.  I also have to applaud the random use of exclamation marks.  But the most troubling thing is expectation/obligation to &lt;a href="http://www.imdb.com/title/tt0223897/"&gt;Pay It Forward&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So, I would have to buy two large pieces of white construction paper, an assortment of candy, a Halloween themed bag of the appropriate capacity, and some Halloween themed socks, and I would have to make a copy of the poem.  Not only that, but it appears all the other houses in my neighborhood had been "hit", so I would have to drive around local neighborhoods looking for a mark.  Creepily driving around neighborhoods that aren't mine looking for a mark would look very suspicious and wouldn't be very smart on my part.  I was not ready to risk looking like a kidnapper or burglar or serial killer just to get in the Halloween spirit.  But let's assume I find a mark without being reported as a suspicious individual in the area.  So now, I have to return to the neighborhood at night, sneak uncomfortably close to a stranger's home, tape the ghost to the door, drop the bag, ring the doorbell, run away, and drive off without the luxury of a getaway driver.  Oh yeah, wait, I am supposed to do all that twice.  Needless to say, I didn't pay it forward.  The whole process would have been a big pain in the ass not to mention the potential for an unpleasant brush with the law.&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/26/60567222_20c2119d39_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;That is my left hand in the picture next to the Halloween themed socks.  I don't think they are going to fit.  Anyone with small feet need some socks?&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-113131922959913333?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/113131922959913333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=113131922959913333' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113131922959913333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113131922959913333'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/11/fun-sneaky-family.html' title='A fun &amp; sneaky family...'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-113130504858931605</id><published>2005-11-06T11:24:00.000-08:00</published><updated>2005-11-08T21:25:41.016-08:00</updated><title type='text'>Bowling App Update</title><content type='html'>Coding has slowed down at work, but it has significantly picked up at home.  I have been putting a fair amount of work into my bowling tracking application for my phone.&lt;br /&gt;&lt;br /&gt;First off, I have name for the application, "Brandt", after the late great &lt;a href="http://www.buffalosportshallfame.com/Class_of_1991/Allie_Brandt/allie_brandt.html"&gt;Allie Brandt&lt;/a&gt;.  Allie Brandt bowled record 886 three game sanctioned series in 1939.  That record stood for nearly six decades.  He bowled that set long before urethane, reactive resin, and all of the other crutches that allow certain &lt;a href="http://andrew425.blogspot.com"&gt;off the corner bowlers&lt;/a&gt; think they are good enough to average 220.&lt;br /&gt;&lt;br /&gt;These screen shots are of the PC-build since I can't take screenshots of my phone, and I haven't ported the application back to the phone yet anyway.  I am going to show my high game of bowling, which also happens to demo a number of the (near) completed UI features.  I remember it like it was yesterday.&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/32/60214565_37a621f4d8_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;Yeah, so I left the 2-4-8-10, a leave I had only spared once in my life, on the first shot.  I was not expecting this to be my high game at this point.  I remember the pinsetter even knocked over one of the pins, and I had to call the front desk to have the leave re-spotted.  I made a joke about it being a waste of time to re-spot since I was only going to miss it anyway.&lt;br /&gt;&lt;br /&gt;As you can see, the 2-4-8-10 is a split, and my application can determine a split and provides a visual indication similar to today's automatic scoring systems.&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/29/60214559_145a5fb71a_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;But lo and behold, I spared it.&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/26/60214560_2ba62debd6_o.png"&gt; &lt;img src="http://static.flickr.com/26/60214564_6b9198efba_o.png"&gt; &lt;img src="http://static.flickr.com/32/60214568_9f5e517558_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;You may notice that I diverge from the behavior exhibited by most automatic scoring systems in regards to updating the score for a frame after a mark.  I think most scoring implementations were too infatuated with the paper and pencil scoring metaphor.  I personally want as much explicit information as possible when I am bowling.&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/33/60214558_9c5c1e40f4_o.png"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;So, I settled in and threw the ball really well for the rest of the game and continued striking.  And that is the story of the first time I shot 290.  I have done it since leaving a 10-pin in the first frame which I obviously converted.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-113130504858931605?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/113130504858931605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=113130504858931605' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113130504858931605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/113130504858931605'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/11/bowling-app-update.html' title='Bowling App Update'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-112932478569043915</id><published>2005-10-14T14:19:00.000-07:00</published><updated>2005-10-14T14:19:45.700-07:00</updated><title type='text'>Teen Girl Squad/Mentos Connection</title><content type='html'>I have been wanting to get this off my chest for a while now.   There is a commercial out for sugar free Mentos.  It uses a bunch of bird  noise samples to make a little song.   Then a bird comes on and says "There's no sugar!" in a voice identical to a slightly excited The Ugly One from &lt;a href="http://www.homestarrunner.com/tgs10.html"&gt;Teen Girl Squad&lt;/a&gt;.  Could it be The Ugly One was suffering from Avian influenza this whole time?   Only time will tell...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-112932478569043915?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/112932478569043915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=112932478569043915' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/112932478569043915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/112932478569043915'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/10/teen-girl-squadmentos-connection.html' title='Teen Girl Squad/Mentos Connection'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-112748583007981416</id><published>2005-09-23T07:30:00.000-07:00</published><updated>2005-09-23T07:32:18.866-07:00</updated><title type='text'>Humbling Syntax</title><content type='html'>Work has been a bit slow lately, mainly because I have had to wait for other people to complete some tasks before I have much to do.  Unlike some of the people discussed &lt;a href="http://entitlitous.blogspot.com/2005/09/work-efficiency.html"&gt;here&lt;/a&gt;, even when I "waste time" at work, I try to find something I can justify its benefits to my employer.  So I spent time this week trying to learn more about the C++ Standard Template Library with the help of &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0201889544/qid=1127484577/sr=8-2/ref=pd_bbs_2/002-8669061-8077615?v=glance&amp;s=books&amp;n=507846"&gt;The C++ Programming Language&lt;/a&gt;.  I actually own two copies of this book, one being an old printing from when I took &lt;a href="http://www.cs.ou.edu/academics/2413.shtml"&gt;Data Structures&lt;/a&gt; in college, and a more recent hardback printing.  I use the old copy at work, and the new one at home.  The old one had the following code:&lt;br /&gt;&lt;table width=100% bgcolor="white"&gt;&lt;code&gt;&lt;br /&gt;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;binary(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;i)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bitset&amp;lt;8*&lt;font color="blue"&gt;sizeof&lt;/font&gt;(&lt;font color="blue"&gt;int&lt;/font&gt;)&amp;gt;&amp;nbsp;b&amp;nbsp;=&amp;nbsp;i;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;b.&lt;font color="blue"&gt;template&lt;/font&gt;&amp;nbsp;to_string&amp;lt;&lt;font color="blue"&gt;char&lt;/font&gt;&amp;gt;()&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;'\n';&lt;br&gt;}&lt;/code&gt;&lt;/table&gt;&lt;br /&gt;Which even Stroustrup says:&lt;br /&gt;&lt;ul&gt;&lt;i&gt;Unfortunately, invoking a an explicitly qualified member template requires a rather elaborate and rare syntax.&lt;/i&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;I found this rather humbling, as this isn't something I would have even recognized as legal standard C++.  But wait, it doesn't compile.  After deciphering error messages, it appeared Microsoft had omitted default template parameters for the character traits and allocator.  So, I added the template parameters making the code look like this:&lt;br /&gt;&lt;br /&gt;&lt;table width=100% bgcolor="white"&gt;&lt;code&gt;&lt;br /&gt;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;binary(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;i)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bitset&amp;lt;8*&lt;font color="blue"&gt;sizeof&lt;/font&gt;(&lt;font color="blue"&gt;int&lt;/font&gt;)&amp;gt;&amp;nbsp;b&amp;nbsp;=&amp;nbsp;i;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;b.&lt;font color="blue"&gt;template&lt;/font&gt;&amp;nbsp;to_string&amp;lt;&lt;font color="blue"&gt;char&lt;/font&gt;,&amp;nbsp;char_traits&amp;lt;&lt;font color="blue"&gt;char&lt;/font&gt;&amp;gt;,&amp;nbsp;allocator&amp;lt;&lt;font color="blue"&gt;char&lt;/font&gt;&amp;gt;&amp;nbsp;&amp;gt;()&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;'\n';&lt;br&gt;}&lt;br&gt;&lt;/code&gt;&lt;/table&gt;&lt;br /&gt;After getting a successful compile, I tried googling missing template default parameters in &amp;lt;bitset&amp;gt;, but didn't find anything.  As I say down to start this blog post, I grabbed my newer version of the book, and sure enough, the first code snippet had been replaced with the second.  I am not sure if it was a printing error in the earlier edition or if changes had been made to the STL.  I am not sure I care, either.  But I do take comfort in knowing that the Visual Studio .NET 2003 STL implementation is correct in this regard.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-112748583007981416?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/112748583007981416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=112748583007981416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/112748583007981416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/112748583007981416'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/09/humbling-syntax.html' title='Humbling Syntax'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-112722689306071505</id><published>2005-09-20T07:34:00.000-07:00</published><updated>2005-09-20T07:34:53.093-07:00</updated><title type='text'>The Inevitable Return of the Great White Dope</title><content type='html'>So, after much chastising from various friends, I have decided it is time to update this thing.  I suppose many of you are reading mainly to find out my pirate name, but you'll have to  wait until the end.&lt;br /&gt;&lt;br /&gt;Bowling has started.   We are four weeks in and Andy is owning me.  He has shot 725, 715, 624, 697 to my 686, 570, 690, 535.  Notice my schizophrenic scoring pattern.  One week, I am ready for PBA regionals, the next I should join a mixed league or just do Rock 'N Bowls or something.&lt;br /&gt;&lt;br /&gt;The week of the 570, I get a flat tire on the way home from bowling.  Just the way I like my flat tires, this one occurred at SW 104th and May at about a 9:45 PM.  So SW 104th and May is about equidistant from luxury homes and meth-riddled apartment complexes.  I was really excited to become completely absorbed in changing my tire with my back turned to the entire world in such an environment.&lt;br /&gt;&lt;br /&gt;Apparently alloy wheels like to bond to the axle, because even after removing the lug nuts, I was still unable to get the wheel off.  I finally gave up, and called my dad, leaving my beloved ride at a point equidistant between luxury homes and meth-riddled apartments.&lt;br /&gt;&lt;br /&gt;Armed with my father, a rubber mallet, irritation, and several new strategies for removing the wheel, I returned determined to change the tire.  After about forty-five minutes for wrestling, the wheel comes off rather anti-climactically.  An hour and half and $160 later, my car is restored to its former glory.&lt;br /&gt;&lt;br /&gt;OK, so here is my pirate name.&lt;br /&gt;&lt;br /&gt;&lt;div style="position:relative; border:1px #320 solid; background-color:#c9b390; padding:0 10px; width:400px; text-align:center; font-family:serif; left:50%; margin:25px 0 25px -200px; color:#320;"&gt;&lt;br /&gt;  &lt;div&gt;&lt;br /&gt;    My pirate name is:&lt;br /&gt;    &lt;/div&gt;&lt;br /&gt;  &lt;div style="font-size:32px;"&gt;&lt;br /&gt;    Dirty Sam Kidd&lt;br /&gt;    &lt;/div&gt;&lt;br /&gt;  &lt;img src="flag.gif" style="top:5px; position:relative; display:block; width:100px; background-color:#320;" /&gt;&lt;br /&gt;  &lt;div style="left:110px; top:-60px; width:290px; position:relative; text-align: justify;"&gt;&lt;br /&gt;    &lt;/div&gt;&lt;br /&gt;You're the pirate everyone else wants to throw in the ocean -- not to get rid of you, you understand; just to get rid of the smell. Even though you're not always the traditional swaggering gallant, your steadiness and planning make you a fine, reliable pirate.    Arr!&lt;br /&gt;&lt;br&gt;&lt;br /&gt;  &lt;a href="http://www.fidius.org/quiz/pirate/" style="position:absolute; width:100%; left:0px; bottom:20px; color:#f8eecc;"&gt;Get your own pirate name from fidius.org.&lt;/a&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-112722689306071505?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/112722689306071505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=112722689306071505' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/112722689306071505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/112722689306071505'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/09/inevitable-return-of-great-white-dope.html' title='The Inevitable Return of the Great White Dope'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111794267137363608</id><published>2005-06-04T20:37:00.000-07:00</published><updated>2005-06-04T20:37:51.413-07:00</updated><title type='text'>Tszyu vs. Hatton</title><content type='html'>I went into this fight as a Hatton supporter. While the fight was entertaining, I am left unsatisfied.&lt;br /&gt;&lt;br /&gt;I think Ricky Hatton got some home cooking from the refereeing.  Several times, he made eye contact with the referee, and got a break.  Other times, when the tie up was in Ricky Hatton's favor, it was allowed to last much longer than normal.  If John Ruiz had gotten this type of favorable treatment, he would have beaten Roy Jones, Jr.&lt;br /&gt;&lt;br /&gt;We also have to look at the low blow issues.  Kostya's "low blow" that dropped Hatton was a bit low, but Hatton's low blow that dropped Tszyu was a full fist lower.&lt;br /&gt;&lt;br /&gt;Press row scoring was much closer than the judges.  It was a difficult fight to score.  I am highly suspicious that the really close rounds went to Hatton by default.&lt;br /&gt;&lt;br /&gt;Kostya showed he was the fighter with superior skills.  Hatton was competitive because he is one of those athletes with freakishly good conditioning.  The first athlete that comes to mind with this sort of freakish conditioning is &lt;a href="http://www.realprowrestling.com/categories/8AA3EAF6-E75B-353C-DFAAD5B1C34508EE/henson.html"&gt;Sammy Henson&lt;/a&gt;.  Unfortunately, most of you are probably unfamiliar with Sammy Henson.  He is one of the most dominating athletes I have ever seen in an individual sport.&lt;br /&gt;&lt;br /&gt;Kostya (did I mention we are on a first name basis? =) ) looked very uncomfortable.  The decision to have the fight in Manchester, IMHO, was a bad one.  Kostya seemed uncomfortable with the crowd, which is understandable.  Someone who has accomplished as much as Kostya shouldn't have to deal with such a one-sided crowd sentiment.&lt;br /&gt;&lt;br /&gt;I think a rematch in a neutral location is necessary.  I think the winner should face Miguel Cotto if he defeats Muhammad Abdullaev.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-111794267137363608?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111794267137363608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111794267137363608' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111794267137363608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111794267137363608'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/06/tszyu-vs-hatton.html' title='Tszyu vs. Hatton'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111651695959660917</id><published>2005-05-19T08:35:00.000-07:00</published><updated>2005-05-19T08:35:59.616-07:00</updated><title type='text'>Cruel Irony (lose vs. loose)</title><content type='html'>&lt;img src="http://photos13.flickr.com/14367990_e0ef67ef83.jpg"&gt;&lt;br /&gt;&lt;br /&gt;Lately, I have been working on a feature that involves an animated tray icon.  I am completely the suck as an icon artist, but I downloaded &lt;a href="http://axialis.com/iconworkshop/"&gt;Axialis IconWorkshop&lt;/a&gt; and fell in love with it.  I feel in love with it to that point that I even bought it.  And who couldn't?  Good features, a sexy and functional UI...&lt;br /&gt;&lt;br /&gt;Here is the cruel and ironic part:  That sexy collection of zeros and ones presented me with the above dialog.  Yes, there is a grammatical error.  Some people might have to read is several times to notice it.  Not me though, the whole "lose/loose" issue is like a red hot spike being driven into my eye, turned, withdrawn slowly--effectively cauterizing the wound so I have no hope of bleeding out, and then repeated several times.  It seems more people get this wrong than right.&lt;br /&gt;&lt;br /&gt;Well, I am no Webster, but let me take a stab:&lt;br /&gt;&lt;br /&gt;loose - not tight&lt;br /&gt;&lt;br /&gt;lose - unsuccessfully retaining possession&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/8462164-111651695959660917?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111651695959660917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111651695959660917' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111651695959660917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111651695959660917'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/05/cruel-irony-lose-vs-loose.html' title='Cruel Irony (lose vs. loose)'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111602534069335110</id><published>2005-05-13T16:02:00.000-07:00</published><updated>2005-05-13T16:02:20.730-07:00</updated><title type='text'>Your PDA is safe... for now</title><content type='html'>I am sure in one of my &lt;a href="http://jamesb43.blogspot.com/2005/03/my-phone-can-beat-up-your-pda.html"&gt;previous posts&lt;/a&gt;, I struck fear in the hearts of older PDA owners everywhere.  Well, they can all resume normal sleeping patterns as I have lost my beloved Motorola MPx220.&lt;br /&gt;&lt;br /&gt;So, on this fateful Saturday, I called my Dad's house to see if he and my little sister wanted to go out for lunch.  Well, my dad's brother was in Oklahoma, and he was out visiting him.  I figured this was a good chance to catch up with my little sister, so I offered to take her out to lunch.  We went to eat chinese at the Mustang Mandarin.  I took my phone out of my pocket and set it down on the table.  My little sister asked the now-in-hindsight-very-foreshadowing question, "Is that smart to leave your cell phone on the table?"  Well, no one took it, but I left it there when we were leaving.&lt;br /&gt;&lt;br /&gt;I returned to the restaurant on Monday when I realized where I had left it.  The lady at the front counter asked "How many?", and I explained I left my phone here and asked if it had been found.&lt;br /&gt;&lt;br /&gt;Now this customer service nightmare of a lady pulls out the wicker basket that served as the lost and found.  It is full of crap, but I don't see my phone.  She moves an item or two on top and then rather abruptly becomes very certain it isn't there.  I wanted to snatch the basket out of her hand and rummage through it myself, but I felt that was inappropriate in regards to the privacy of the other people that had lost items at the Mustang Mandarin. Irritated, I left empty handed.&lt;br /&gt;&lt;br /&gt;This is the part where I get pissed.  Let's assume she didn't know anything about the disappearance of my phone and is completely innocent despite her suspicious demeanor.  The cool think to have done, would have been for her to empty out the basket and gratuitously look for my phone making sure I can see it isn't there.  I mean, losing a cell phone is a big pain in the ass.  The brush off I got from that lady guarantees I will never go back to the establishment, bad mouth it to anyone who will listen, and curse it every time I drive by.&lt;br /&gt;&lt;br /&gt;Accepting defeat, I began exploring my options for a replacement phone.  I wasn't sure I wanted another MPx220.  There had been a few times I had issues with the ear piece volume being too soft, which is ironic because my previous Motorola phone seemed to have a default volume of "Even great grampy can hear it!"  Even with my former metal band member hearing, I had to ask people to speak more quietly if they ever got the least bit excited.&lt;br /&gt;&lt;br /&gt;I ended up buying an &lt;a href="http://www.pcmag.com/article2/0,1759,1674705,00.asp"&gt;AudioVox SMT 5600&lt;/a&gt; aka &lt;a href="http://radio.weblogs.com/0001011/2004/12/11.html#a8858"&gt;"The Scoblephone"&lt;/a&gt; on eBay.  It should arrive in five business days or so.  Looking forward to seeing how it compares to the MPx220.&lt;br /&gt;&lt;br /&gt;&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/8462164-111602534069335110?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111602534069335110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111602534069335110' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111602534069335110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111602534069335110'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/05/your-pda-is-safe-for-now.html' title='Your PDA is safe... for now'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111353074781450315</id><published>2005-04-14T19:05:00.000-07:00</published><updated>2005-04-14T19:05:47.813-07:00</updated><title type='text'></title><content type='html'>I mentioned in my previous post that my next post would be about cryptography, buy my encryption issue has presented me with some unforseen difficulties, so I am going to post about my bowling again.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.metroplaza.net"&gt;Gus&lt;/a&gt; came down a couple of weekends ago, and we went bowling at Yukon AMF Lanes, which is not my home house.  I had been in a spare shooting slump, but the  lane conditions were unfamiliar, so I found myself shooting a lot of spares.  I gradually started finding a shot, although it was one I wasn't too fond of.  That is okay, because that kind of thing makes me a better bowler.  I beat him the first two games, as I should considering the amount I bowl verses the amount he bowls.  Even though I won the first two games, my scores were a far cry from the 204 I am averaging at Norman AMF Lanes in my league.  My back was killing me, but I wanted to shoot at least 200 before we left.  So, the third game, I think Gus has four strikes in a row ("four in row" to the knowledgeable bowler).  I think I am beat and my ego is severely bruised.  Later in the game, I matched him with my own four in a row.  I get into the tenth frame finishing last (Gus and I bowl TV format when we bowl meaning he threw his ninth and tenth frames and I was left with the tenth).  I thought I had to double to win as I hadn't been paying close attention to the score.  I throw a great shot the first shot in the tenth, and I am rewarded with one of a number of strikes the bowling gods still owe me.  Second shot in the tenth is a carbon copy of the first, except this time the bowling gods screwed me over once again in the familiar form of a ringing 10.  Disappointed and unwilling to admit defeat, I look up at the telescore, or as Gus and I used to like to bastardize the term in our youth, the "Tell-us-the-score", and I realize I just need to convert the ten pin to win.  While I had been in a spare shooting slump, I had been shooting ten pins particularly well after slumping on them earlier in the year.  Now here is where I have to back up a bit.  Right after Gus and I got our pair of lanes, some weird extended family of just adults got put on the pair next to us.  Gus and I were on 9 and 10, so we cringed when we heard the desk lady announce, "Seven and eight needs assistance putting in names".  We figured they were non-bowlers.  It turned out they were former bowlers and were really considerate people.  Unfortunately, sometimes my bowling psyche is delicate, and one of the grandmas didn't give me the two lane courtesy I so sorely need while shooting the deciding ten pin.  Yeah, I missed it and we tied at 202.  However, our little outing proved therapeutic to my bowling...&lt;br /&gt;&lt;br /&gt;Fast forward to Wednesday (my league night) sometime shortly after noon.  Now, Andy has been on a tear, completely pwning me on the lanes.  He had taken the front ten for a 289 a few weeks earlier.  We are at the end of the league season, and my hour and 35 minute round trip commute typically saps my motivation at this point in the year, so Andy and I usually exchange sh*t talking emails to help with motivation.  He hadn't sent me one yet, so I sent him one proclaiming his hot streak was over and I would sweep him tonight.  &lt;i&gt;Author's note: I am completely aware of the run-on sentences that litter my blog posts, but I want my blog to be conversational, so I write like I speak, and I speak in run-ons.&lt;/i&gt;  Sure enough, I threw good shots for most of the night, swept him like I said, and shot 657.  That is a 219 average for those of you that are deficient in dividing numbers by 3.  When I say I swept Andy, that means I beat him all three games and obviously series.  We bet a dollar on each game and one for series, but typical Andy, he only has three to pay me.&lt;br /&gt;&lt;br /&gt;So, the next week, Andy sends me an email on Wednesday making some reference to Apollo Creed.  At league, we are bowling on 19 and 20.  During practice, Andy and I notice right away that 20 is way oily than normal, and 19 is slightly drier than the typical house shot.  Although I know this means scoring will be difficult, I know that it favors my team because my team had more talent.  In practice, I am extremely lined in on 19, but I also start experiencing an excruciating pain in my left foot of fury, but I manage not to bitch about it all night.  About the 7th frame I started noticing the guys on the other team finally realizing that the lanes were different.  Lane 20 is so screwed up, that it was screwing up the shots I made on 19.  I ended up doubling in the tenth for a 179, while Andy punched out for a 184. Crapola...&lt;br /&gt;&lt;br /&gt;The second game, I start out with a brooklyn on 20, and then I strike again on 19.  On 19, I threw completely perfect shots and thought I had Andy straight pwned and I was finishing on my good lane.  I couldn't strike on 20 again for the rest of the game.  In the tenth frame, I threw a terrible shot and left the 3-6-10.  I threw an equally bad shot at the spare and took the 3 off the the 3-6-10.  I shot 192 with an open in the tenth, and Andy won again.  Double crapola...&lt;br /&gt;&lt;br /&gt;The third game starts, and for seven frames, I can't throw a decent shot to save my life, but I am making most of my spares.  Seven frames without a strike is pretty much unheard of for me.  At this point, Andy can shut me out by ten pins.  So I order a beer, and threw the last five strikes, forcing Andy to double in the tenth to win.  He doesn't even throw the first one.  Furthermore, he misses the spare, which means I won series and we break even.  A small victory...&lt;br /&gt;&lt;br /&gt;Andy's co-worker buddy, Mark, started bowling with us this year.  I would put his last name, but that is asking a lot.  I just know it is something German that starts with an "L", so let's just call him Mark Laufenbrauershwhillerbocker.  Anyway, I would bet my left teste he is the only PhD holder in our league, although he does IT work now.  He has to be, by far, the happiest, most positive IT guy I have ever met.  He keeps threatening to start blogging, but I am sure he is too busy with whatever terrible dark secret he has.  There is has to be an explanation for a happy, pleasant IT guy, and I don't think it can be pretty. :)&lt;br /&gt;&lt;br /&gt;I guess the point of this post is that I am doing okay against Andy since he landed on planet earth the last few weeks.  The last week is position round, and Andy can bet his sweet a$$ that the last week will have me as pitcher and him as catcher.&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/8462164-111353074781450315?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111353074781450315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111353074781450315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111353074781450315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111353074781450315'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/04/i-mentioned-in-my-previous-post-that.html' title=''/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111190318520033373</id><published>2005-03-26T21:59:00.000-08:00</published><updated>2005-03-26T22:02:13.213-08:00</updated><title type='text'>Solving 2nd order polynomials in x86 assembly</title><content type='html'>So, I got asked to tutor a co-worker in an x86 assembly course.  I saw it as a great opportunity to fill a gap in my education.  Overall, I think my &lt;a href="http://www.cs.ou.edu/"&gt;computer science education&lt;/a&gt; is pretty good, but it is woefully inadequate when it comes to assembly.  The only required course I took that had me "writing" any assembly was a &lt;a href="http://www.cs.ou.edu/academics/2613.shtml"&gt;computer organization&lt;/a&gt; course based around the Motorola 68000 in which we were only required to write assembly code on notebook paper. Even then, I recognized this could be a problem, so I took an electrical/computer engineering course, &lt;a href="http://www.ou.edu/bulletins/courses/electrical_&amp;_computer_engineering_courses.htm#_vpid_46"&gt;micro-processor system design&lt;/a&gt;, as an elective.  We wrote most of the assembly for that class on notebook paper as well, although we did some very contrived tasks with DOS's debug.com program.  Yeah, I wasn't kidding when I said my education is woefully inadequate when it comes to assembly.&lt;br /&gt;&lt;br /&gt;My co-worker didn't need help with the early part of the course, so she didn't ask me for the tutoring until recently.  That also meant I had a lot of catching up to do, but that was actually a good thing for me.  If I am not being overwhelmed by a challenge, I tend to get bored.  I ended up spending the majority of Thursday evening, all day Friday (I was off work), and most of today (Saturday) reading the &lt;a href="http://www.drpaulcarter.com/pcasm/redir.php?file=pcasm-book-pdf.zip"&gt;textbook&lt;/a&gt;, hunting for other assembly resources, installing the software, and working on the course's current project.&lt;br /&gt;&lt;br /&gt;Looking at the course material, I am fairly impressed.  The author of the text was a former professor for the course, and he had provided some routines to the students for input and output.  That is a smart move since one of the biggest obstacles in the early stages of learning assembly is that I/O is difficult, and a student doesn't get much feedback if they can't do any I/O.  Also, they are using free tools for the course, which being a former student, I didn't like paying for extra crap even if I did get it at a better price than the general public.  These are the tools for the course:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://nasm.sourceforge.net/wakka.php?wakka=HomePage"&gt;NASM&lt;/a&gt; - Netwide Assembler&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.delorie.com/djgpp/"&gt;DJGPP&lt;/a&gt; - A windows port of gcc&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;For windows, you will also need the contents of this &lt;a href="http://www.drpaulcarter.com/pcasm/djgpp-ex.zip"&gt;zip file&lt;/a&gt;.  For other platforms, check &lt;a href="http://www.drpaulcarter.com/pcasm/"&gt;here&lt;/a&gt; (bottom of the page).&lt;br /&gt;&lt;br /&gt;The way they do the projects in the course is to have driver program in C really only calls a function defined in the assembly code.  Here's the source for that:&lt;br /&gt;&lt;br /&gt;&lt;table width=100% bgcolor="white"&gt;&lt;code&gt;&lt;br /&gt;&lt;font color="blue"&gt;#include&lt;/font&gt;&amp;nbsp;"cdecl.h"&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;PRE_CDECL&amp;nbsp;asm_main(&amp;nbsp;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;)&amp;nbsp;POST_CDECL;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;main()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;ret_status;&lt;br&gt;&amp;nbsp;&amp;nbsp;ret_status&amp;nbsp;=&amp;nbsp;asm_main();&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;ret_status;&lt;br&gt;}&lt;/code&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The header &lt;code&gt;cdecl.h&lt;/code&gt; is uninteresting.  It just provides macros for portably handling the specification of the calling convention.&lt;br /&gt;&lt;br /&gt;This particular project was to write a program to solve quadratic equations, so the instructor allowed the students to use &lt;code&gt;scanf&lt;/code&gt; for reading in the floating point values since nothing like that was included in the afore mentioned I/O routines.  Here's the one I wrote:&lt;br /&gt;&lt;table width=100% bgcolor="white"&gt;&lt;code&gt;&lt;br /&gt;&lt;font color="blue"&gt;#include&lt;/font&gt;&amp;nbsp;&amp;lt;stdio.h&amp;gt;&lt;br&gt;&lt;font color="blue"&gt;#include&lt;/font&gt;&amp;nbsp;"cdecl.h"&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;PRE_CDECL&amp;nbsp;read_float(&lt;font color="blue"&gt;double&lt;/font&gt;*&amp;nbsp;pd)&amp;nbsp;POST_CDECL;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;read_float(&lt;font color="blue"&gt;double&lt;/font&gt;*&amp;nbsp;pd)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%lf",&amp;nbsp;pd);&lt;br&gt;}&lt;/code&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;And honestly, that is about as much pure C I can stomach writing in a single sitting.  Well, maybe it is not that bad, but I feel seriously tied down when I write C since I am a big OO fan.  But anyway, on to my first assembly code that does anything mildly interesting.  Oh, and by the way, my syntax highlighter doesn't work on assembly.  When I mentioned it would be easy to extend to other languages, I was mainly thinking Java and C#.  Okay so I am getting to the code for real this time:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;%include "asm_io.inc"&lt;br /&gt;&lt;br /&gt;%macro print_float 1&lt;br /&gt;    push dword[%1+4]&lt;br /&gt;    push dword[%1]&lt;br /&gt;    push dword ffmt&lt;br /&gt;    call _printf&lt;br /&gt;%endmacro&lt;br /&gt;&lt;br /&gt;%define a               [ebp-8]&lt;br /&gt;%define b               [ebp-16]&lt;br /&gt;%define c               [ebp-24]&lt;br /&gt;%define root1           [ebp-32]&lt;br /&gt;%define root2           [ebp-40]&lt;br /&gt;%define discriminant    [ebp-48]&lt;br /&gt;    &lt;br /&gt;extern _read_float&lt;br /&gt;extern _printf&lt;br /&gt;&lt;br /&gt;segment .data&lt;br /&gt;ffmt            db  "%12.4f", 0&lt;br /&gt;minus_four      dw  -4&lt;br /&gt;prompt          db  "Enter coefficients a, b, and c: ", 0&lt;br /&gt;no_soln_msg     db  "No real roots", 0&lt;br /&gt;soln_msg        db  "The roots are: ", 0&lt;br /&gt;progress_msg    db  "Making progress...", 0&lt;br /&gt;&lt;br /&gt;segment .bss&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;segment .text&lt;br /&gt;    global  _asm_main&lt;br /&gt;    global  _read_float&lt;br /&gt;    global  print_float&lt;br /&gt;    &lt;br /&gt;_asm_main:&lt;br /&gt;    enter   0,0               ; setup routine&lt;br /&gt;    pusha&lt;br /&gt;    push    ebp&lt;br /&gt;    mov     ebp, esp&lt;br /&gt;    sub     esp, 56&lt;br /&gt;    push    ebx&lt;br /&gt;    mov     eax, prompt&lt;br /&gt;    call    print_string&lt;br /&gt;    lea     eax, a&lt;br /&gt;    push    eax&lt;br /&gt;    call    _read_float&lt;br /&gt;    pop     eax&lt;br /&gt;    lea     eax, b&lt;br /&gt;    push    eax&lt;br /&gt;    call    _read_float&lt;br /&gt;    pop     eax&lt;br /&gt;    lea     eax, c&lt;br /&gt;    push    eax&lt;br /&gt;    call    _read_float&lt;br /&gt;    pop     eax&lt;br /&gt;    fild    word[minus_four]    ; stack is -4&lt;br /&gt;    fld     qword a             ; stack is a, -4&lt;br /&gt;    fld     qword c             ; stack is c, a, -4&lt;br /&gt;    fmulp   st1                 ; stack is ac, -4&lt;br /&gt;    fmulp   st1                 ; stack is -4ac&lt;br /&gt;    fld     qword b             ; stack is b, -4ac&lt;br /&gt;    fld     qword b             ; stack is b, b, -4ac&lt;br /&gt;    fmulp   st1                 ; stack is b^2, -4ac&lt;br /&gt;    faddp   st1                 ; stack is b^2-4ac&lt;br /&gt;    ftst                        ; determine if discriminant is negative&lt;br /&gt;    fstsw   ax&lt;br /&gt;    sahf                        &lt;br /&gt;    jb      near no_real_roots&lt;br /&gt;    &lt;br /&gt;    mov     eax, soln_msg&lt;br /&gt;    call    print_string&lt;br /&gt;    call    print_nl&lt;br /&gt;    fsqrt                       ; stack: sqrt(b*b - 4*a*c)&lt;br /&gt;    fstp    qword discriminant  ; store result so calculation is not &lt;br /&gt;                                ; repeated&lt;br /&gt;    fld1                        ; stack is 1.0&lt;br /&gt;    fadd    st0                 ; stack is 2.0&lt;br /&gt;    fld     qword a             ; stack is a, 2.0&lt;br /&gt;    fmulp   st1                 ; stack is 2.0*a&lt;br /&gt;    fld     qword discriminant  ; stack is sqrt(b^2-4ac), 2a&lt;br /&gt;    fld     qword b             ; stack is b, sqrt(b^2-4ac), 2a&lt;br /&gt;    fchs                        ; stack is -b, sqrt(b^2-4ac), 2a&lt;br /&gt;    fadd    st1                 ; stack is -b+sqrt(b^2-4ac), sqrt(b^2-4ac), 2a&lt;br /&gt;    fdiv    st2                 ; stack is (-b+sqrt(b^2-4ac))/2a, &lt;br /&gt;                                ; sqrt(b^2-4ac), 2a&lt;br /&gt;    lea     eax, root1&lt;br /&gt;    fstp    qword[eax]          ; stack is sqrt(b^2-4ac), 2a&lt;br /&gt;    print_float eax&lt;br /&gt;    pop     eax&lt;br /&gt;    pop     eax&lt;br /&gt;    pop     eax&lt;br /&gt;    call    print_nl&lt;br /&gt;    fld     qword b             ; stack is b, sqrt(b^2-4ac), 2a&lt;br /&gt;    fchs                        ; stack is -b, sqrt(b^2-4ac), 2a&lt;br /&gt;    fsub    st1                 ; stack is -b-sqrt(b^2-4ac), sqrt(b^2-4ac), 2a&lt;br /&gt;    fdiv    st2                 ; stack is (-b-sqrt(b^2-4ax))/2a, &lt;br /&gt;                                ; sqrt(b^2-4ac), 2a&lt;br /&gt;    lea     eax, root2&lt;br /&gt;    fstp    qword[eax]          ; stack is sqrt(b^2-4ac), 2a&lt;br /&gt;    print_float eax&lt;br /&gt;    ffree   st1&lt;br /&gt;    ffree   st2&lt;br /&gt;    jmp     quit&lt;br /&gt;        &lt;br /&gt;no_real_roots:&lt;br /&gt;    ffree   st0&lt;br /&gt;    mov     eax, no_soln_msg&lt;br /&gt;    call    print_string&lt;br /&gt;&lt;br /&gt;quit:&lt;br /&gt;    pop     ebx&lt;br /&gt;    mov     esp, ebp&lt;br /&gt;    pop     ebp&lt;br /&gt;    popa    &lt;br /&gt;    mov     eax, 0            ; return back to C&lt;br /&gt;    leave                     &lt;br /&gt;    ret&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;While I didn't say how long I spent doing the actual assembly code, it was a lot longer than I anticipated.  I spent a considerable amount of time reading the floating point input and verifying it was correct.  I also spent some time debugging issues with the stack which I think greatly improved my understanding of the stack in general.  The last thing I struggled with was a completely stupid oversight on my part which involved popping values from the floating point stack.  The ironic thing is that I had to do no debugging whatsoever of the root calculation code, and that was supposed to be the interesting part of this project.&lt;br /&gt;&lt;br /&gt;For the sake of completeness, I will address building this code.  If you download the zip file mentioned above for your particular platform, the first C program listed will already be there in driver.c.  The compiled version of the assembly I/O routines will be in asm_io.o or asm_io.obj depending on your platform.  The program for reading a floating point value should be pasted into a file saved as read_float.c.  The assembly code was saved into a file named quadratic.asm.  Under this situation, here are the commands to build this program:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;nasmw -f coff quadratic.asm&lt;br /&gt;gcc -o quadratic quadratic.o asm_io.o driver.c read_float.c&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Path information has been omitted, but if you store the .c and .asm files in the same directory as nasmw.exe, you can run the commands as shown from the NASM directory.  DJGPP stores environment variables that make invoking it from other directories convenient.&lt;br /&gt;&lt;br /&gt;As a side note, I generally type the HTML for links while I am writing and fill in the URLs later.  After filling in the in the URLs concerning my education, I am embarrassed by my university.  Apparently certain departments quit updating their webpages about three years ago.  If I may flaunt my impressive football knowledge, it make me sort of feel like &lt;a href="http://www.seahawks.com/ardisplay.aspx?SecID=29&amp;ID=4337"&gt;Dave Krieg&lt;/a&gt;, the longtime Seattle Seahawks quarterback whose &lt;a href="http://www.gazetteextra.com/antiqueshow021405.asp"&gt;college&lt;/a&gt; (search for "defunct" on the resulting page) became defunct while he was still playing in the NFL.  The sad thing is that my university doesn't have a good excuse for not updating their web pages, like CEASING TO EXIST like Dave Krieg's college.  And the OU links came from the highest ranking google hits when searching for relevant terms, which means this pathetic practice is easily observed by anyone.  Maybe it's because I don't donate any money to them, but then I again, I completely paid for my own education other than the $250 I got from the Young American Bowling Alliance.  But I didn't set out to criticize my university with this post, so I guess I should just let it go.&lt;br /&gt;&lt;br /&gt;This is probably not the last post you will see about x86 assembly from me, but with any luck, my next post will be about &lt;a href="http://en.wikipedia.org/wiki/Cryptography"&gt;cryptography&lt;/a&gt;.  I know everyone in on the edge of their seats now. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-111190318520033373?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111190318520033373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111190318520033373' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111190318520033373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111190318520033373'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/03/so-i-got-asked-to-tutor-co-worker-in.html' title='Solving 2nd order polynomials in x86 assembly'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111129371447074674</id><published>2005-03-19T20:41:00.000-08:00</published><updated>2005-03-19T21:07:31.696-08:00</updated><title type='text'>Syntax Highlighting:  What every parent should know</title><content type='html'>So, with only &lt;a href="http://jamesb43.blogspot.com/2005/03/scoring-game-of-bowling.html"&gt;one post&lt;/a&gt; in between my admitted dislike for implementing &lt;a href="http://en.wikipedia.org/wiki/Finite_state_automaton"&gt;FSAs&lt;/a&gt;, what do I do but go out and volunteer to implement one in one of my &lt;a href="http://jamesb43.blogspot.com/2005/03/scoring-game-of-bowling.html#c111099651828303354"&gt;comments&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you are too lazy to follow the links, I don't blame you.  But the jist of it is that &lt;a href="http://www.metroplaza.net/"&gt;gus&lt;/a&gt; complained about the lack of syntax highlighting in all the code I have been posting lately.&lt;br /&gt;&lt;br /&gt;I can't blame him.  I have been a huge &lt;a href="http://blogs.msdn.com/larryosterman"&gt;Larry Osterman&lt;/a&gt; fan since the &lt;a href="http://channel9.msdn.com/"&gt;Channel 9&lt;/a&gt; post about the completion of his &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=27667"&gt;twentieth year&lt;/a&gt; at Microsoft.  But the one complaint, well, not really complaint, but suggestion for improvement I would make for his blog is &lt;a href="http://en.wikipedia.org/wiki/Syntax_highlighting"&gt;syntax highlighting&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So now I have written a small, quick and dirty MFC app to turn code snippets into syntax highlighted HTML.  I am sure others have done this before me, but I thought it would be more interesting to write the app, than &lt;a href="http://www.google.com"&gt;Googling&lt;/a&gt; until I found one.  Being a quick and dirty app, I implemented the source to HTMLized functions as members of the main window class.  Let's have a look at the definition of the class, syntax highlighted with my new tool:&lt;br /&gt;&lt;br /&gt;&lt;table width=100% bgcolor="white"&gt;&lt;code&gt;&lt;br /&gt;&lt;font color="green"&gt;///&lt;/font&gt;&lt;br&gt;&lt;font color="green"&gt;///&amp;nbsp;&amp;lt;summary&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;font color="green"&gt;///&amp;nbsp;This&amp;nbsp;class&amp;nbsp;models&amp;nbsp;the&amp;nbsp;main&amp;nbsp;window&amp;nbsp;of&amp;nbsp;the&amp;nbsp;Snippet2Html&amp;nbsp;application&lt;/font&gt;&lt;br&gt;&lt;font color="green"&gt;///&amp;nbsp;&amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;font color="green"&gt;///&amp;nbsp;&amp;lt;author&amp;gt;Jim&amp;nbsp;Barnett&amp;lt;/author&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;font color="green"&gt;///&amp;nbsp;&amp;lt;date&amp;gt;3/18/2005&amp;lt;/date&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;font color="green"&gt;///&lt;/font&gt;&lt;br&gt;&lt;font color="blue"&gt;class&lt;/font&gt;&amp;nbsp;CMainWindow&amp;nbsp;:&amp;nbsp;&lt;font color="blue"&gt;public&lt;/font&gt;&amp;nbsp;CDialog&lt;br&gt;{&lt;br&gt;&lt;font color="blue"&gt;public&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CMainWindow(CWnd*&amp;nbsp;pParent&amp;nbsp;=&amp;nbsp;0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;afx_msg&amp;nbsp;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;OnBnClickedCopyToClipboard();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;afx_msg&amp;nbsp;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;OnBnClickedHtmlify();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;NONE&amp;nbsp;=&amp;nbsp;0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;SLASH&amp;nbsp;=&amp;nbsp;1;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;SLASHSLASH&amp;nbsp;=&amp;nbsp;2;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;SLASHSTAR&amp;nbsp;=&amp;nbsp;3;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;SLASHSTARSTAR&amp;nbsp;=&amp;nbsp;4;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;LITERAL&amp;nbsp;=&amp;nbsp;5;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;LITERALESCAPE&amp;nbsp;=&amp;nbsp;6;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;CHARLITERAL&amp;nbsp;=&amp;nbsp;7;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;CHARLITERALESCAPE&amp;nbsp;=&amp;nbsp;8;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;COMMENTHTML;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;ENDCOMMENT;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;ENDSPECIAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;SPECIALHTML;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;INITHTML;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;ENDHTML;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;enum&lt;/font&gt;&amp;nbsp;{&amp;nbsp;IDD&amp;nbsp;=&amp;nbsp;IDD_SNIPPET2HTML_DIALOG&amp;nbsp;};&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;protected&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;CheckForReservedWord(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState,&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;amp;&amp;nbsp;nPos,&amp;nbsp;CString&amp;amp;&amp;nbsp;sHtmlified)&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;virtual&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;DoDataExchange(CDataExchange*&amp;nbsp;pDX);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;HandleReservedWord(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nPos,&amp;nbsp;CString&amp;nbsp;sToken,&amp;nbsp;CString&amp;amp;&amp;nbsp;sCode)&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;HtmlifyCode();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;IgnoreReserved(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState)&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;IsSpecial(CString&amp;nbsp;sToken)&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;virtual&lt;/font&gt;&amp;nbsp;BOOL&amp;nbsp;OnInitDialog();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;afx_msg&amp;nbsp;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;OnPaint();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;afx_msg&amp;nbsp;HCURSOR&amp;nbsp;OnQueryDragIcon();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HACCEL&amp;nbsp;m_hAccel;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HICON&amp;nbsp;m_hIcon;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;m_sCode;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;static&lt;/font&gt;&amp;nbsp;CStringArray&amp;nbsp;m_sReservedOrDirective;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BOOL&amp;nbsp;m_fWebForm;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DECLARE_MESSAGE_MAP()&lt;br&gt;};&lt;/code&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Not terribly interesting by itself, so lets move on to the main function of interest and its helpers:&lt;br /&gt;&lt;br /&gt;&lt;table width=100% bgcolor="white"&gt;&lt;code&gt;&lt;br /&gt;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;CMainWindow::HtmlifyCode()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="green"&gt;/*&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Comment&amp;nbsp;to&amp;nbsp;prove&amp;nbsp;multiline&amp;nbsp;comments&amp;nbsp;do&amp;nbsp;not&amp;nbsp;always&amp;nbsp;fail&amp;nbsp;:)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;/font&gt;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VERIFY(UpdateData(&lt;font color="blue"&gt;true&lt;/font&gt;));&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;sHtmlified&amp;nbsp;=&amp;nbsp;_T("");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TCHAR&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nCurPos&amp;nbsp;=&amp;nbsp;0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;sToken;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;for&lt;/font&gt;&amp;nbsp;(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;m_sCode.GetLength();&amp;nbsp;++i)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;chCurrent&amp;nbsp;=&amp;nbsp;m_sCode.GetAt(i);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(chCurrent)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;nbsp;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;nbsp;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\t'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\n'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASHSLASH)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;ENDCOMMENT;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;else&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;lt;br&amp;gt;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(!m_fWebForm)&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("\r\n");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('/'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;NONE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASH;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASH:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASHSLASH;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified.Insert(sHtmlified.GetLength()-2,&amp;nbsp;COMMENTHTML);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASHSTARSTAR:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;ENDCOMMENT;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;default&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('*'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASH:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASHSTAR;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified.Insert(sHtmlified.GetLength()-2,&amp;nbsp;COMMENTHTML);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASHSTAR:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASHSTARSTAR;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;default&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\r'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&amp;nbsp;&lt;font color="green"&gt;//&amp;nbsp;eat&amp;nbsp;it&lt;/font&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('"'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;LITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\''):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;NONE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;lt;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;lt;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;gt;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;gt;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;amp;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;amp;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\\'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;LITERALESCAPE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERALESCAPE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;LITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;default&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(!CheckForReservedWord(nState,&amp;nbsp;i,&amp;nbsp;sHtmlified))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;else&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;CHARLITERALESCAPE)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;=&amp;nbsp;INITHTML&amp;nbsp;+&amp;nbsp;sHtmlified;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;ENDHTML;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_sCode&amp;nbsp;=&amp;nbsp;sHtmlified;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UpdateData(&lt;font color="blue"&gt;false&lt;/font&gt;);&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;CMainWindow::IgnoreReserved(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState)&amp;nbsp;const&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;((nState&amp;nbsp;==&amp;nbsp;SLASHSLASH)&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASHSTAR)&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASHSTARSTAR)&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;LITERAL)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;LITERALESCAPE))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;true&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;false&lt;/font&gt;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;CMainWindow::IsSpecial(CString&amp;nbsp;sToken)&amp;nbsp;const&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;for&lt;/font&gt;&amp;nbsp;(INT_PTR&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;m_sReservedOrDirective.GetCount();&amp;nbsp;++i)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(sToken&amp;nbsp;==&amp;nbsp;m_sReservedOrDirective[i])&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;true&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;false&lt;/font&gt;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;void&lt;/font&gt;&amp;nbsp;CMainWindow::HtmlifyCode()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="green"&gt;/*&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Comment&amp;nbsp;to&amp;nbsp;prove&amp;nbsp;multiline&amp;nbsp;comments&amp;nbsp;do&amp;nbsp;not&amp;nbsp;always&amp;nbsp;fail&amp;nbsp;:)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;/font&gt;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VERIFY(UpdateData(&lt;font color="blue"&gt;true&lt;/font&gt;));&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;sHtmlified&amp;nbsp;=&amp;nbsp;_T("");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TCHAR&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nCurPos&amp;nbsp;=&amp;nbsp;0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;sToken;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;for&lt;/font&gt;&amp;nbsp;(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;m_sCode.GetLength();&amp;nbsp;++i)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;chCurrent&amp;nbsp;=&amp;nbsp;m_sCode.GetAt(i);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(chCurrent)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;nbsp;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;nbsp;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\t'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\n'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASHSLASH)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;ENDCOMMENT;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;else&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;lt;br&amp;gt;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(!m_fWebForm)&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("\r\n");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('/'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;NONE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASH;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASH:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASHSLASH;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified.Insert(sHtmlified.GetLength()-2,&amp;nbsp;COMMENTHTML);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASHSTARSTAR:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;ENDCOMMENT;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;default&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('*'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASH:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASHSTAR;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified.Insert(sHtmlified.GetLength()-2,&amp;nbsp;COMMENTHTML);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;SLASHSTAR:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;SLASHSTARSTAR;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;default&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\r'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&amp;nbsp;&lt;font color="green"&gt;//&amp;nbsp;eat&amp;nbsp;it&lt;/font&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('"'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;LITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\''):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;NONE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;lt;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;lt;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;gt;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;gt;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('&amp;amp;'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;_T("&amp;amp;amp;");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;_T('\\'):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;switch&lt;/font&gt;&amp;nbsp;(nState)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;LITERALESCAPE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERAL:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERALESCAPE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;LITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;LITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;case&lt;/font&gt;&amp;nbsp;CHARLITERALESCAPE:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;default&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(!CheckForReservedWord(nState,&amp;nbsp;i,&amp;nbsp;sHtmlified))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;chCurrent;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASH)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;NONE;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;else&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;CHARLITERALESCAPE)&amp;nbsp;nState&amp;nbsp;=&amp;nbsp;CHARLITERAL;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;=&amp;nbsp;INITHTML&amp;nbsp;+&amp;nbsp;sHtmlified;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sHtmlified&amp;nbsp;+=&amp;nbsp;ENDHTML;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_sCode&amp;nbsp;=&amp;nbsp;sHtmlified;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UpdateData(&lt;font color="blue"&gt;false&lt;/font&gt;);&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;CMainWindow::IgnoreReserved(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState)&amp;nbsp;const&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;((nState&amp;nbsp;==&amp;nbsp;SLASHSLASH)&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASHSTAR)&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;SLASHSTARSTAR)&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;LITERAL)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;||&amp;nbsp;(nState&amp;nbsp;==&amp;nbsp;LITERALESCAPE))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;true&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;false&lt;/font&gt;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;CMainWindow::IsSpecial(CString&amp;nbsp;sToken)&amp;nbsp;const&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;for&lt;/font&gt;&amp;nbsp;(INT_PTR&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;m_sReservedOrDirective.GetCount();&amp;nbsp;++i)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(sToken&amp;nbsp;==&amp;nbsp;m_sReservedOrDirective[i])&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;true&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;false&lt;/font&gt;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;CMainWindow::CheckForReservedWord(&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nState,&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;amp;&amp;nbsp;nPos,&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;amp;&amp;nbsp;sHtmlified)&amp;nbsp;const&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;int&lt;/font&gt;&amp;nbsp;nOrigPos&amp;nbsp;=&amp;nbsp;nPos;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;const&lt;/font&gt;&amp;nbsp;CString&amp;nbsp;sDelimiters&amp;nbsp;=&amp;nbsp;_T("&amp;nbsp;\n\t+-\\*~&amp;lt;&amp;gt;!=&amp;amp;;:.{}[]()|^%\\/?',=");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Get&amp;nbsp;the&amp;nbsp;next&amp;nbsp;token&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;sToken&amp;nbsp;=&amp;nbsp;m_sCode.Tokenize(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_T("&amp;nbsp;\n\t+-\\*~&amp;lt;&amp;gt;!=&amp;amp;;:.{}[]()|^%\\/?',="),&amp;nbsp;nOrigPos);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CString&amp;nbsp;sNextChars&amp;nbsp;=&amp;nbsp;(m_sCode.Left(nPos+sToken.GetLength())).Right(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sToken.GetLength());&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;bool&lt;/font&gt;&amp;nbsp;fAtTokenStart&amp;nbsp;=&amp;nbsp;(nPos&amp;nbsp;==&amp;nbsp;0)&amp;nbsp;?&amp;nbsp;true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:&amp;nbsp;(sDelimiters.Find(m_sCode.GetAt(nPos-1))&amp;nbsp;!=&amp;nbsp;-1);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;if&lt;/font&gt;&amp;nbsp;(IsSpecial(sToken)&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;!IgnoreReserved(nState)&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;(sToken&amp;nbsp;==&amp;nbsp;sNextChars)&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;fAtTokenStart)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nPos&amp;nbsp;+=&amp;nbsp;HandleReservedWord(nPos,&amp;nbsp;sToken,&amp;nbsp;sHtmlified);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;true&lt;/font&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="blue"&gt;false&lt;/font&gt;;&lt;br&gt;}&lt;/code&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;I guess you could say I cheated a little since I only used the automaton to do the highlighting of comments and wrote some helper functions to deal with the keywords/preprocessor directives.  One of the main shortcomings of my simple approach is that context senstive preprocessor directives are not supported (such as the the &lt;code&gt;#pragma once&lt;/code&gt; directive, particularly the "once" token.  You could criticize the memory usage of this algorithm since I used another CString to insert the HTML rather than just inserting the HTML right into m_sCode.  I think that would have been messier, and it would have been an unnecessary performance hack.&lt;br /&gt;&lt;br /&gt;A lot of these web form interfaces don't let you have decently formatted HTML without screwing up your original intention.  They tend to interpret &amp;lt;br&amp;gt;\n as two lines, which kept double spacing my code. The m_fWebForm boolean variable indicates wherther you want one big nasty line of HTML if true, or you want decently formatted, somewhat human readable HTML if false.  It took a fair amount of work to figure out what truly caused the double-spaced code.  This task proved to be much more of a learning experience than I intended, but I guess that could be a good thing.&lt;br /&gt;&lt;br /&gt;I am already planning on some improvements.  It would be really easy to add highlighting to string and char literals.  If I modified it to read values from a file for some variables that are currently hard-coded, this app could be made language agnostic.  I may do that just for the fun of it, but I am self-admitted C++ elitist.&lt;br /&gt;&lt;br /&gt;So, that is it.  Is this any better, gus?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-111129371447074674?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111129371447074674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111129371447074674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111129371447074674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111129371447074674'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/03/syntax-highlighting-what-every-parent_19.html' title='Syntax Highlighting:  What every parent should know'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111094814286992423</id><published>2005-03-15T20:42:00.000-08:00</published><updated>2005-03-15T20:42:22.870-08:00</updated><title type='text'>Scoring a game of bowling</title><content type='html'>So, I have mostly finished writing the class to model a game of bowling.  I have tested the game code, and it was kind of painful.  While writing the code to test the scoring functions, I noticed the code base getting uglier and uglier.  After feeling like most of the class was sufficiently debugged, I took a moment to reflect and realized most of the ugliness was in the test code, which made me feel a whole lot better about myself.  I think I have way too fragile of an ego to post the debugging code, but since I have nothing to blog about outside the development of this application, I thought I would go ahead and post the scoring code.&lt;br /&gt;&lt;br /&gt;Here is the definition of the class modelling a game of bowling:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;class CGame : public CObject&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;	CGame();&lt;br /&gt;	virtual ~CGame();&lt;br /&gt;	void ScoreFrame(int nFrame);&lt;br /&gt;	void ScoreGame();&lt;br /&gt;	void ScoreTenthFrame();&lt;br /&gt;	void SetRegularFrame(CFrame* pFrame);&lt;br /&gt;	void SetTenthFrame(CTenthFrame* pTenthFrame);&lt;br /&gt;&lt;br /&gt;#ifdef _DEBUG&lt;br /&gt;	int CalculateScoreByFrame(int nFrame);&lt;br /&gt;	void DumpGame();&lt;br /&gt;	void MakeFrame(int nFrame, TCHAR chFirst, TCHAR chSecond);&lt;br /&gt;	void MakeTenthFrame(TCHAR chFirst, TCHAR chSecond, TCHAR chThird);&lt;br /&gt;	void StringToGame(CString sGame);&lt;br /&gt;	static bool TestGame();&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;	static const int NUMREGULARFRAMES = 9;&lt;br /&gt;protected:&lt;br /&gt;	int m_nCompletedFrames;&lt;br /&gt;	int m_nScoredFrames;&lt;br /&gt;	int m_nScoreByFrame[NUMFRAMES];&lt;br /&gt;	CFrame* m_pFrames[NUMREGULARFRAMES];&lt;br /&gt;	CTenthFrame* m_pTenthFrame;&lt;br /&gt;&lt;br /&gt;private:&lt;br /&gt;	operator=(const CGame&amp; Game) {};&lt;br /&gt;	CGame(const CGame&amp; Game) {};&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;I left the debugging member function declarations in there for an exercise to the read to imagine their ugliness.  Believe me, it is probably worse than you imagine.  I don't think this class is done, but it most of the way, and it is sufficiently defined to test the major points of functionality.  Oh yeah, and &lt;code&gt;NUMFRAMES&lt;/code&gt; is defined in a separate header of global constants.  I hope you aren't surprised to learn its value is 10.  So lets take a look at the highest level function, &lt;code&gt;ScoreGame&lt;/code&gt;.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;void CGame::ScoreGame()&lt;br /&gt;{&lt;br /&gt;	for (int i = 0; i &lt; NUMREGULARFRAMES; ++i)&lt;br /&gt;		ScoreFrame(i+1);&lt;br /&gt;&lt;br /&gt;	ScoreTenthFrame();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Pretty clean so far.  You can't ask for too much more.  So how about the function to score a non-tenth frame of bowling with a zero-based index as a parameter.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;void CGame::ScoreFrame(int nFrame)&lt;br /&gt;{&lt;br /&gt;	ASSERT(nFrame &gt;= 1 &amp;&amp; nFrame &lt;= NUMREGULARFRAMES);&lt;br /&gt;&lt;br /&gt;	if (m_pFrames[nFrame-1]-&gt;IsMark())&lt;br /&gt;	{&lt;br /&gt;		m_nScoreByFrame[nFrame-1] = 10;&lt;br /&gt;	}&lt;br /&gt;	else&lt;br /&gt;	{&lt;br /&gt;		m_nScoreByFrame[nFrame-1] = m_pFrames[nFrame-1]-&gt;GetCount(1)&lt;br /&gt;			+ m_pFrames[nFrame-1]-&gt;GetCount(2);&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	if (nFrame &gt;= 2)&lt;br /&gt;	{&lt;br /&gt;		if (m_pFrames[nFrame-2]-&gt;IsSpare())&lt;br /&gt;		{&lt;br /&gt;			m_nScoreByFrame[nFrame-2] += m_pFrames[nFrame-1]-&gt;GetCount(1);&lt;br /&gt;		}&lt;br /&gt;		else if (m_pFrames[nFrame-2]-&gt;IsStrike())&lt;br /&gt;		{&lt;br /&gt;			if (m_pFrames[nFrame-1]-&gt;IsStrike())&lt;br /&gt;			{&lt;br /&gt;				m_nScoreByFrame[nFrame-2] += 10;&lt;br /&gt;			}&lt;br /&gt;			else&lt;br /&gt;			{&lt;br /&gt;				m_nScoreByFrame[nFrame-2] += m_pFrames[nFrame-1]-&gt;GetCount(1)&lt;br /&gt;					+ m_pFrames[nFrame-1]-&gt;GetCount(2);&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	if (nFrame &gt;= 3)&lt;br /&gt;	{&lt;br /&gt;		if (m_pFrames[nFrame-3]-&gt;IsStrike() &amp;&amp; m_pFrames[nFrame-2]-&gt;IsStrike())&lt;br /&gt;			m_nScoreByFrame[nFrame-3] += m_pFrames[nFrame-1]-&gt;GetCount(1);&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Still pretty clean here.  Some people might bitch about the nesting level, but that is a style holy war I am not wanting to get involved in.  Besides, if you have never worked in statements conditionals nested three deep, you are either some functional programming language sicko or a freshmen undergrad. So how about scoring tenth frame?&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;void CGame::ScoreTenthFrame()&lt;br /&gt;{&lt;br /&gt;	// Check for double in 8th and 9th&lt;br /&gt;	if (m_pFrames[7]-&gt;IsStrike() &amp;&amp; m_pFrames[8]-&gt;IsStrike())&lt;br /&gt;	{&lt;br /&gt;		m_nScoreByFrame[7] += m_pTenthFrame-&gt;GetCount(1);&lt;br /&gt;		m_nScoreByFrame[8] += m_pTenthFrame-&gt;GetCount(1)&lt;br /&gt;			+ m_pTenthFrame-&gt;GetCount(2);&lt;br /&gt;	}&lt;br /&gt;	else if (m_pFrames[8]-&gt;IsSpare())&lt;br /&gt;	{&lt;br /&gt;		m_nScoreByFrame[8] += m_pTenthFrame-&gt;GetCount(1);&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	m_nScoreByFrame[9] = m_pTenthFrame-&gt;GetCount(1)&lt;br /&gt;		+ m_pTenthFrame-&gt;GetCount(2);&lt;br /&gt;&lt;br /&gt;	if (m_pTenthFrame-&gt;IsMark())&lt;br /&gt;		m_nScoreByFrame[9] += m_pTenthFrame-&gt;GetCount(3);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This code still fairly clean.  I suppose some CS professor or software architect type might ding me about the magic numbers, and the CTenthFrame class as opposed to CFinalFrame class with a member indicating the number of the final frame.  But in all honesty, I have no intentions of this software being able to handle 15 frame games of bowling a la Randy Quaid in Kinpin.  I don't have any inclination to make this score games of candle pin or duck pin, either, so all you Canucks, lay off. :) I guess you could bitch about the magic numbers in the &lt;code&gt;ScoreFrame&lt;/code&gt; function as well.  I have to say, I won't lose sleep if my application doesn't score games of bowling in bizarro world that number frames -5 to 5.  I just don't think it is necessary to define something like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;const int NINTHFRAME = 8;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;when I have it so firmly in grained that array indices are zero-based.  As tangent, here is one of my favorite computer sciences quotes that undoubtedly exists to poke fun at programming language style preference holy wars:&lt;br /&gt;&lt;br /&gt;Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. (Stan Kelly-Bootle)&lt;br /&gt;&lt;br /&gt;Okay, so I have hinted at underlying ugliness this entire post.  It involves the functions for counting pinfall.  Let's take a look at the ugliness in increasing order of ugly.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;int CShot::GetCount()&lt;br /&gt;{&lt;br /&gt;	switch (m_wResult)&lt;br /&gt;	{&lt;br /&gt;	case MISS:&lt;br /&gt;	case FOUL:&lt;br /&gt;		return 0;&lt;br /&gt;&lt;br /&gt;	case STRIKE:&lt;br /&gt;		return 10;&lt;br /&gt;&lt;br /&gt;	case SPARE:&lt;br /&gt;		return 10;&lt;br /&gt;&lt;br /&gt;	default:&lt;br /&gt;		int nCount = 0;&lt;br /&gt;		for (int i = 0; i &lt; 10; ++i)&lt;br /&gt;		{&lt;br /&gt;			if ((m_wResult &amp; (1 &lt;&lt; i)) != 0)&lt;br /&gt;				++nCount;&lt;br /&gt;		}&lt;br /&gt;		return nCount;&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Not *too* bad, but I can do better: :)&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;int CFrame::GetCount(int nShot)&lt;br /&gt;{&lt;br /&gt;	ASSERT(nShot == 1 || nShot == 2);&lt;br /&gt;&lt;br /&gt;	if (nShot == 2 &amp;&amp; &lt;br /&gt;		((m_pSecondShot-&gt;GetResult() &amp; (CShot::MISS | CShot::FOUL)) != 0))&lt;br /&gt;		return 0;&lt;br /&gt;&lt;br /&gt;	return (nShot == 1) ? m_pFirstShot-&gt;GetCount() &lt;br /&gt;		: m_pSecondShot-&gt;GetCount() - m_pFirstShot-&gt;GetCount();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Not terrible on its own, but now we have some layered ugliness.  It is still prettier than Edward James Olmos.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;int CTenthFrame::GetCount(int nShot)&lt;br /&gt;{&lt;br /&gt;	ASSERT(nShot &gt;= 1 &amp;&amp; nShot &lt;= 3);&lt;br /&gt;&lt;br /&gt;	switch (nShot)&lt;br /&gt;	{&lt;br /&gt;	case 1:&lt;br /&gt;		return m_pFirstShot-&gt;GetCount();&lt;br /&gt;&lt;br /&gt;	case 2:&lt;br /&gt;		if ((m_pSecondShot-&gt;GetResult() &amp; (CShot::MISS | CShot::FOUL)) != 0)&lt;br /&gt;			return 0;&lt;br /&gt;&lt;br /&gt;		if ((m_pFirstShot-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;		{&lt;br /&gt;			return m_pSecondShot-&gt;GetCount();&lt;br /&gt;		}&lt;br /&gt;		else&lt;br /&gt;		{&lt;br /&gt;			return (m_pSecondShot-&gt;GetCount() - m_pFirstShot-&gt;GetCount());&lt;br /&gt;		}&lt;br /&gt;	case 3:&lt;br /&gt;		if ((m_pThirdShot-&gt;GetResult() &amp; (CShot::MISS | CShot::FOUL)) != 0)&lt;br /&gt;			return 0;&lt;br /&gt;		else if (((m_pFirstShot-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;			&amp;&amp; ((m_pSecondShot-&gt;GetResult() &amp; CShot::STRIKE) == 0))&lt;br /&gt;			return (m_pThirdShot-&gt;GetCount()-m_pSecondShot-&gt;GetCount());&lt;br /&gt;&lt;br /&gt;		return m_pThirdShot-&gt;GetCount();&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	return -1; // Unreachable without corrupting nShot&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now I know I have seen/worked with/written uglier code, but what bothers me about it is that the ugliness is a symptom of earlier architecture decisions I had made and, arguably, forgotten about with code developed later.  But on the other hand, I feel reasonably confident about the extensible requirements of this code.  I also realize it is doubtful a significant number of people.  Plus, the size of this code base will not be terribly large when the application is finished.  I think a developer has to know when to compromise elegance for productivity.  Well, now that I seem to be going somewhere with this post, namely, appropriately evaluating the need for code quality for a situation, I feel like I am okay posting some of the uglier test code:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;void CGame::MakeFrame(int nFrame, TCHAR chFirst, TCHAR chSecond)&lt;br /&gt;{&lt;br /&gt;	TRACE(_T("MakeFrame: chFirst = %c, chSecond = %c\n"), chFirst, (chSecond) ? chSecond : _T('0'));&lt;br /&gt;&lt;br /&gt;	CShot* p1stShot = new CShot;&lt;br /&gt;	CShot* p2ndShot = 0;&lt;br /&gt;	WORD wResult = 0;&lt;br /&gt;	int nCount = 0;&lt;br /&gt;	int nFirstShotCount = 0;&lt;br /&gt;&lt;br /&gt;	switch (chFirst)&lt;br /&gt;	{&lt;br /&gt;	case _T('X'):&lt;br /&gt;		p1stShot-&gt;SetResult(CShot::STRIKE);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('1'):&lt;br /&gt;	case _T('2'):&lt;br /&gt;	case _T('3'):&lt;br /&gt;	case _T('4'):&lt;br /&gt;	case _T('5'):&lt;br /&gt;	case _T('6'):&lt;br /&gt;	case _T('7'):&lt;br /&gt;	case _T('8'):&lt;br /&gt;	case _T('9'):&lt;br /&gt;		nCount = static_cast&lt;int&gt;(chFirst - _T('0'));&lt;br /&gt;		for (int i = 0; i &lt; nCount; ++i)&lt;br /&gt;			wResult |= (1 &lt;&lt; i);&lt;br /&gt;		p1stShot-&gt;SetResult(wResult);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('-'):&lt;br /&gt;		p1stShot-&gt;SetResult(CShot::MISS);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('F'):&lt;br /&gt;		p1stShot-&gt;SetResult(CShot::FOUL);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	m_pFrames[nFrame]-&gt;SetFirstShot(p1stShot);&lt;br /&gt;&lt;br /&gt;	switch (chSecond)&lt;br /&gt;	{&lt;br /&gt;	case _T('1'):&lt;br /&gt;	case _T('2'):&lt;br /&gt;	case _T('3'):&lt;br /&gt;	case _T('4'):&lt;br /&gt;	case _T('5'):&lt;br /&gt;	case _T('6'):&lt;br /&gt;	case _T('7'):&lt;br /&gt;	case _T('8'):&lt;br /&gt;	case _T('9'):&lt;br /&gt;		p2ndShot = new CShot;&lt;br /&gt;		nCount = static_cast&lt;int&gt;(chSecond - _T('0'));&lt;br /&gt;		nFirstShotCount = p1stShot-&gt;GetCount();&lt;br /&gt;		wResult = p1stShot-&gt;GetResult();&lt;br /&gt;		for (int i = 0; i &lt; nCount; ++i)&lt;br /&gt;			wResult |= (1 &lt;&lt; (i+nFirstShotCount));&lt;br /&gt;		p2ndShot-&gt;SetResult(wResult);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('-'):&lt;br /&gt;		p2ndShot = new CShot;&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::MISS);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('F'):&lt;br /&gt;		p2ndShot = new CShot;&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::FOUL);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('/'):&lt;br /&gt;		p2ndShot = new CShot;&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::SPARE);&lt;br /&gt;		break;&lt;br /&gt;	&lt;br /&gt;	}&lt;br /&gt;	if (p2ndShot != 0) m_pFrames[nFrame]-&gt;SetSecondShot(p2ndShot);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void CGame::MakeTenthFrame(TCHAR chFirst, TCHAR chSecond, TCHAR chThird)&lt;br /&gt;{&lt;br /&gt;	TRACE(_T("MakeTenthFrame: %c, %c, %c\n"), chFirst, chSecond, (chThird) ? chThird : _T('0'));&lt;br /&gt;&lt;br /&gt;	CShot* p1stShot = new CShot;&lt;br /&gt;	CShot* p2ndShot = new CShot;&lt;br /&gt;	CShot* p3rdShot = 0;&lt;br /&gt;	int nCount = 0;&lt;br /&gt;	int nFirstShotCount = 0;&lt;br /&gt;	bool fMark = false;&lt;br /&gt;	WORD wResult = 0;&lt;br /&gt;&lt;br /&gt;	switch (chFirst)&lt;br /&gt;	{&lt;br /&gt;	case _T('X'):&lt;br /&gt;		fMark = true;&lt;br /&gt;		p3rdShot = new CShot;&lt;br /&gt;		p1stShot-&gt;SetResult(CShot::STRIKE);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('1'):&lt;br /&gt;	case _T('2'):&lt;br /&gt;	case _T('3'):&lt;br /&gt;	case _T('4'):&lt;br /&gt;	case _T('5'):&lt;br /&gt;	case _T('6'):&lt;br /&gt;	case _T('7'):&lt;br /&gt;	case _T('8'):&lt;br /&gt;	case _T('9'):&lt;br /&gt;		nCount = static_cast&lt;int&gt;(chFirst - _T('0'));&lt;br /&gt;		for (int i = 0; i &lt; nCount; ++i)&lt;br /&gt;			wResult |= (1 &lt;&lt; i);&lt;br /&gt;		p1stShot-&gt;SetResult(wResult);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('-'):&lt;br /&gt;		p1stShot-&gt;SetResult(CShot::MISS);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('F'):&lt;br /&gt;		p1stShot-&gt;SetResult(CShot::FOUL);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	m_pTenthFrame-&gt;SetFirstShot(p1stShot);&lt;br /&gt;&lt;br /&gt;	switch (chSecond)&lt;br /&gt;	{&lt;br /&gt;	case _T('1'):&lt;br /&gt;	case _T('2'):&lt;br /&gt;	case _T('3'):&lt;br /&gt;	case _T('4'):&lt;br /&gt;	case _T('5'):&lt;br /&gt;	case _T('6'):&lt;br /&gt;	case _T('7'):&lt;br /&gt;	case _T('8'):&lt;br /&gt;	case _T('9'):&lt;br /&gt;		nCount = static_cast&lt;int&gt;(chSecond - _T('0'));&lt;br /&gt;		if ((p1stShot-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;		{&lt;br /&gt;			nFirstShotCount = 0;&lt;br /&gt;			wResult = 0;&lt;br /&gt;		}&lt;br /&gt;		else&lt;br /&gt;		{&lt;br /&gt;			wResult = p1stShot-&gt;GetResult();&lt;br /&gt;			wResult &amp;= ~(CShot::FOUL|CShot::MISS);&lt;br /&gt;			nFirstShotCount = p1stShot-&gt;GetCount();&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		for (int i = 0; i &lt; nCount; ++i)&lt;br /&gt;			wResult |= (1 &lt;&lt; (i+nFirstShotCount));&lt;br /&gt;		p2ndShot-&gt;SetResult(wResult);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('-'):&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::MISS);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('F'):&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::FOUL);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	case _T('/'):&lt;br /&gt;		fMark = true;&lt;br /&gt;		p3rdShot = new CShot;&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::SPARE);&lt;br /&gt;		break;&lt;br /&gt;	&lt;br /&gt;	case _T('X'):&lt;br /&gt;		p2ndShot-&gt;SetResult(CShot::STRIKE);&lt;br /&gt;		break;&lt;br /&gt;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	m_pTenthFrame-&gt;SetSecondShot(p2ndShot);&lt;br /&gt;&lt;br /&gt;	if (fMark)&lt;br /&gt;	{&lt;br /&gt;		switch (chThird)&lt;br /&gt;		{&lt;br /&gt;		case _T('X'):&lt;br /&gt;			p3rdShot-&gt;SetResult(CShot::STRIKE);&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		case _T('1'):&lt;br /&gt;		case _T('2'):&lt;br /&gt;		case _T('3'):&lt;br /&gt;		case _T('4'):&lt;br /&gt;		case _T('5'):&lt;br /&gt;		case _T('6'):&lt;br /&gt;		case _T('7'):&lt;br /&gt;		case _T('8'):&lt;br /&gt;		case _T('9'):&lt;br /&gt;			if (chSecond == _T('X') || chSecond == _T('/'))&lt;br /&gt;			{&lt;br /&gt;				nCount = chThird - _T('0');&lt;br /&gt;				for (int i = 0; i &lt; nCount; ++i)&lt;br /&gt;					wResult |= (1 &lt;&lt; i);&lt;br /&gt;				p3rdShot-&gt;SetResult(wResult);&lt;br /&gt;			}&lt;br /&gt;			else&lt;br /&gt;			{&lt;br /&gt;				// Handle strike on first ball, non-strike on second&lt;br /&gt;				// Reuse nFirstShotCount even though we want the second &lt;br /&gt;				// shot count&lt;br /&gt;				nCount = static_cast&lt;int&gt;(chThird - _T('0'));&lt;br /&gt;				nFirstShotCount = p2ndShot-&gt;GetCount();  &lt;br /&gt;				wResult = p2ndShot-&gt;GetResult();&lt;br /&gt;				for (int i = 0; i &lt; nCount-nFirstShotCount; ++i)&lt;br /&gt;					wResult |= (1 &lt;&lt; (i+nFirstShotCount));&lt;br /&gt;				p3rdShot-&gt;SetResult(wResult);&lt;br /&gt;			}&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		case _T('-'):&lt;br /&gt;			p3rdShot-&gt;SetResult(CShot::MISS);&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		case _T('F'):&lt;br /&gt;			p3rdShot-&gt;SetResult(CShot::FOUL);&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		case _T('/'):&lt;br /&gt;			p3rdShot-&gt;SetResult(CShot::SPARE);&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		}&lt;br /&gt;		m_pTenthFrame-&gt;SetThirdShot(p3rdShot);&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void CGame::StringToGame(CString sGame)&lt;br /&gt;{&lt;br /&gt;	bool fSecondShot = false;&lt;br /&gt;	int nLength = sGame.GetLength();&lt;br /&gt;	int nFrame = 0;&lt;br /&gt;	TCHAR chSecond = 0;&lt;br /&gt;	TCHAR chThird = 0;&lt;br /&gt;	int nStrikes = 0;&lt;br /&gt;&lt;br /&gt;	for (int i = 0; i &lt; NUMREGULARFRAMES; ++i)&lt;br /&gt;	{&lt;br /&gt;		m_pFrames[i] = new CFrame;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	m_pTenthFrame = new CTenthFrame;&lt;br /&gt;&lt;br /&gt;	for (int i = 0; i &lt; nLength; ++i)&lt;br /&gt;	{&lt;br /&gt;		TCHAR chFirst = sGame.GetAt(i);&lt;br /&gt;&lt;br /&gt;		switch (chFirst)&lt;br /&gt;		{&lt;br /&gt;		case _T('X'):&lt;br /&gt;			switch (nFrame)&lt;br /&gt;			{&lt;br /&gt;			case 0:	case 1:	case 2:	case 3:	case 4:&lt;br /&gt;			case 5:	case 6:	case 7:	case 8:&lt;br /&gt;				MakeFrame(nFrame, chFirst, 0);&lt;br /&gt;				++nStrikes;&lt;br /&gt;				++nFrame;&lt;br /&gt;				break;&lt;br /&gt;&lt;br /&gt;			case 9:&lt;br /&gt;				if ((sGame.GetAt(nLength-2) == _T('/'))&lt;br /&gt;					|| ((sGame.GetAt(nLength-3)) == _T('X')) &amp;&amp; (nStrikes+i == 18))&lt;br /&gt;				{&lt;br /&gt;					chSecond = sGame.GetAt(nLength-2);&lt;br /&gt;					chThird = sGame.GetAt(nLength-1);&lt;br /&gt;				}&lt;br /&gt;				else&lt;br /&gt;				{&lt;br /&gt;					// Get last three shots and figure out if it were all in &lt;br /&gt;					// the 10th&lt;br /&gt;					chFirst = sGame.GetAt(nLength-3);&lt;br /&gt;					chSecond = sGame.GetAt(nLength-2);&lt;br /&gt;					chThird = sGame.GetAt(nLength-1);&lt;br /&gt;					&lt;br /&gt;					// A bad game of bowling (no strikes) would consist of 18 &lt;br /&gt;					// shots leading into the 10th&lt;br /&gt;					&lt;br /&gt;					// check for X followed on shot two shots before end, then &lt;br /&gt;					// check length of string to figure out if that strike was&lt;br /&gt;					// in the ninth or tenth&lt;br /&gt;					if (chFirst == _T('X') &amp;&amp; (i+nStrikes &lt; 18))&lt;br /&gt;					{&lt;br /&gt;						chFirst = chSecond;&lt;br /&gt;						chSecond = chThird;&lt;br /&gt;						chThird = 0;&lt;br /&gt;					}&lt;br /&gt;				}&lt;br /&gt;				MakeTenthFrame(chFirst, chSecond, chThird);&lt;br /&gt;				++nFrame;&lt;br /&gt;				break;&lt;br /&gt;&lt;br /&gt;			}&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		case _T('-'):&lt;br /&gt;		case _T('F'):&lt;br /&gt;		case _T('1'):&lt;br /&gt;		case _T('2'):&lt;br /&gt;		case _T('3'):&lt;br /&gt;		case _T('4'):&lt;br /&gt;		case _T('5'):&lt;br /&gt;		case _T('6'):&lt;br /&gt;		case _T('7'):&lt;br /&gt;		case _T('8'):&lt;br /&gt;		case _T('9'):&lt;br /&gt;			switch (nFrame)&lt;br /&gt;			{&lt;br /&gt;			case 0:	case 1:	case 2:	case 3:	case 4:&lt;br /&gt;			case 5:	case 6:	case 7:	case 8:&lt;br /&gt;				++i;&lt;br /&gt;				chSecond = sGame.GetAt(i);&lt;br /&gt;				MakeFrame(nFrame, chFirst, chSecond);&lt;br /&gt;				++nFrame;&lt;br /&gt;				break;&lt;br /&gt;&lt;br /&gt;			case 9:&lt;br /&gt;				++i;&lt;br /&gt;				chSecond = sGame.GetAt(i);&lt;br /&gt;				chThird = (nLength - nStrikes == 2) ? 0 : sGame.GetAt(nLength-1);&lt;br /&gt;				MakeTenthFrame(chFirst, chSecond, chThird);&lt;br /&gt;				++nFrame;&lt;br /&gt;				break;&lt;br /&gt;&lt;br /&gt;			}&lt;br /&gt;			break;&lt;br /&gt;&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void CGame::DumpGame()&lt;br /&gt;{&lt;br /&gt;	CString sFmt;&lt;br /&gt;	CString sBuf;&lt;br /&gt;	CString sResult[10];&lt;br /&gt;	int nScoreByFrame = 0;&lt;br /&gt;	bool fMarkIn10th = false;&lt;br /&gt;&lt;br /&gt;	sFmt =  _T("______________________________________________________________\n");&lt;br /&gt;	sFmt += _T("|1    |2    |3    |4    |5    |6    |7    |8    |9    |10    |\n");&lt;br /&gt;	sFmt += _T("| %2s  | %2s  | %2s  | %2s  | %2s  | %2s  | %2s  | %2s  | %2s  | %3s  |\n");&lt;br /&gt;	sFmt += _T("| %3d | %3d | %3d | %3d | %3d | %3d | %3d | %3d | %3d | %3d  |\n");&lt;br /&gt;	sFmt += _T("|_____|_____|_____|_____|_____|_____|_____|_____|_____|______|\n");&lt;br /&gt;&lt;br /&gt;	for (int i = 0; i &lt; NUMREGULARFRAMES; ++i)&lt;br /&gt;	{&lt;br /&gt;		if (m_pFrames[i]-&gt;IsStrike())&lt;br /&gt;		{&lt;br /&gt;			// First shot was a strike&lt;br /&gt;			sResult[i].AppendChar(_T('X'));&lt;br /&gt;		}&lt;br /&gt;		else if (m_pFrames[i]-&gt;IsSpare())&lt;br /&gt;		{&lt;br /&gt;			if ((m_pFrames[i]-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::MISS) != 0)&lt;br /&gt;			{&lt;br /&gt;				// First shot was a miss&lt;br /&gt;				sResult[i].AppendChar(_T('-'));&lt;br /&gt;			}&lt;br /&gt;			else if ((m_pFrames[i]-&gt;GetFirstShot()-&gt;GetResult()&lt;br /&gt;					 &amp; CShot::FOUL) != 0)&lt;br /&gt;			{&lt;br /&gt;				// First shout was a foul&lt;br /&gt;				sResult[i].AppendChar(_T('F'));&lt;br /&gt;			}&lt;br /&gt;			else&lt;br /&gt;			{&lt;br /&gt;				// First shot knocked down pins, but wasn't a strike&lt;br /&gt;				sResult[i].AppendChar(static_cast&lt;TCHAR&gt;(&lt;br /&gt;					m_pFrames[i]-&gt;GetCount(1)) + _T('0'));&lt;br /&gt;			}&lt;br /&gt;			sResult[i].AppendChar(_T('/'));&lt;br /&gt;		}&lt;br /&gt;		else&lt;br /&gt;		{&lt;br /&gt;			// If we are in this block, we opened in the given frame&lt;br /&gt;			if ((m_pFrames[i]-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::MISS) != 0)&lt;br /&gt;			{&lt;br /&gt;				// First shot was a miss&lt;br /&gt;				sResult[i].AppendChar(_T('-'));&lt;br /&gt;			}&lt;br /&gt;			else if ((m_pFrames[i]-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::FOUL)&lt;br /&gt;				!= 0)&lt;br /&gt;			{&lt;br /&gt;				// First shot was a foul&lt;br /&gt;				sResult[i].AppendChar(_T('F'));&lt;br /&gt;			}&lt;br /&gt;			else&lt;br /&gt;			{&lt;br /&gt;				// First shot knocked down pins, but wasn't a strike and we &lt;br /&gt;				// didn't spare&lt;br /&gt;				sResult[i].AppendChar(static_cast&lt;TCHAR&gt;(&lt;br /&gt;					m_pFrames[i]-&gt;GetCount(1))+_T('0'));&lt;br /&gt;			}&lt;br /&gt;&lt;br /&gt;			if ((m_pFrames[i]-&gt;GetSecondShot()-&gt;GetResult() &amp; CShot::MISS) != 0)&lt;br /&gt;			{&lt;br /&gt;				// Second shot was a miss&lt;br /&gt;				sResult[i].AppendChar(_T('-'));&lt;br /&gt;			}&lt;br /&gt;			else if ((m_pFrames[i]-&gt;GetSecondShot()-&gt;GetResult()&lt;br /&gt;				&amp; CShot::FOUL) != 0)&lt;br /&gt;			{&lt;br /&gt;				// Second shot was a foul&lt;br /&gt;				sResult[i].AppendChar(_T('F'));&lt;br /&gt;			}&lt;br /&gt;			else&lt;br /&gt;			{&lt;br /&gt;				// We knocked down pins on the second ball, but didn't spare&lt;br /&gt;				sResult[i].AppendChar(static_cast&lt;TCHAR&gt;(&lt;br /&gt;					m_pFrames[i]-&gt;GetCount(2))+_T('0'));&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	// Now process the 10th frame, first shot&lt;br /&gt;	if ((m_pTenthFrame-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;	{&lt;br /&gt;		fMarkIn10th = true;&lt;br /&gt;		sResult[9].AppendChar(_T('X'));&lt;br /&gt;	}&lt;br /&gt;	else if ((m_pTenthFrame-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::MISS) != 0)&lt;br /&gt;	{&lt;br /&gt;		sResult[9].AppendChar(_T('-'));&lt;br /&gt;	}&lt;br /&gt;	else if ((m_pTenthFrame-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::FOUL) != 0)&lt;br /&gt;	{&lt;br /&gt;		sResult[9].AppendChar(_T('F'));&lt;br /&gt;	}&lt;br /&gt;	else&lt;br /&gt;	{&lt;br /&gt;		sResult[9].AppendChar(static_cast&lt;TCHAR&gt;(m_pTenthFrame-&gt;GetCount(1))&lt;br /&gt;			+ _T('0'));&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	// Process second shot in the tenth&lt;br /&gt;	if ((m_pTenthFrame-&gt;GetSecondShot()-&gt;GetResult() &amp; CShot::SPARE) != 0)&lt;br /&gt;	{&lt;br /&gt;		fMarkIn10th = true;&lt;br /&gt;		sResult[9].AppendChar(_T('/'));&lt;br /&gt;	}&lt;br /&gt;	else if ((m_pTenthFrame-&gt;GetSecondShot()-&gt;GetResult() &lt;br /&gt;		&amp; CShot::STRIKE) != 0)&lt;br /&gt;	{&lt;br /&gt;		sResult[9].AppendChar(_T('X'));&lt;br /&gt;	}&lt;br /&gt;	else if ((m_pTenthFrame-&gt;GetSecondShot()-&gt;GetResult()&lt;br /&gt;		&amp; CShot::MISS) != 0)&lt;br /&gt;	{&lt;br /&gt;		sResult[9].AppendChar(_T('-'));&lt;br /&gt;	}&lt;br /&gt;	else if ((m_pTenthFrame-&gt;GetSecondShot()-&gt;GetResult()&lt;br /&gt;		&amp; CShot::FOUL) != 0)&lt;br /&gt;	{&lt;br /&gt;		sResult[9].AppendChar(_T('F'));&lt;br /&gt;	}&lt;br /&gt;	else&lt;br /&gt;	{&lt;br /&gt;		// Handle an open in the 10th that knocked down pins on the second &lt;br /&gt;		// shot, or a strike followed by the first shot of a non-strike&lt;br /&gt;		if ((m_pTenthFrame-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;		{&lt;br /&gt;			sResult[9].AppendChar(m_pTenthFrame-&gt;GetSecondShot()-&gt;GetCount()&lt;br /&gt;				+ _T('0'));&lt;br /&gt;		}&lt;br /&gt;		else&lt;br /&gt;		{&lt;br /&gt;			sResult[9].AppendChar((m_pTenthFrame-&gt;GetSecondShot()-&gt;GetCount()&lt;br /&gt;				- m_pTenthFrame-&gt;GetFirstShot()-&gt;GetCount() + _T('0')));&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	// Handle third shot in the 10th&lt;br /&gt;	if (fMarkIn10th)&lt;br /&gt;	{&lt;br /&gt;		if ((m_pTenthFrame-&gt;GetThirdShot()-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;		{&lt;br /&gt;			// Spared and then struck in 10th, or struck out in the 10th&lt;br /&gt;			sResult[9].AppendChar(_T('X'));&lt;br /&gt;		}&lt;br /&gt;		else if ((m_pTenthFrame-&gt;GetThirdShot()-&gt;GetResult() &amp; CShot::SPARE)&lt;br /&gt;			!= 0)&lt;br /&gt;		{&lt;br /&gt;			// Struck then spared in the 10th&lt;br /&gt;			sResult[9].AppendChar(_T('/'));&lt;br /&gt;		}&lt;br /&gt;		else if ((m_pTenthFrame-&gt;GetThirdShot()-&gt;GetResult()&lt;br /&gt;			&amp; CShot::MISS) != 0)&lt;br /&gt;		{&lt;br /&gt;			// Either threw a double or a spare, then a miss&lt;br /&gt;			sResult[9].AppendChar(_T('-'));&lt;br /&gt;		}&lt;br /&gt;		else if ((m_pTenthFrame-&gt;GetThirdShot()-&gt;GetResult()&lt;br /&gt;			&amp; CShot::FOUL) != 0)&lt;br /&gt;		{&lt;br /&gt;			// Either threw a double or a spare, then a foul&lt;br /&gt;			sResult[9].AppendChar(_T('F'));&lt;br /&gt;		}&lt;br /&gt;		else&lt;br /&gt;		{&lt;br /&gt;			if (((m_pTenthFrame-&gt;GetFirstShot()-&gt;GetResult() &amp; CShot::STRIKE) != 0)&lt;br /&gt;				&amp;&amp; (m_pTenthFrame-&gt;GetSecondShot()-&gt;GetResult() &amp; CShot::STRIKE) == 0)&lt;br /&gt;                sResult[9].AppendChar(m_pTenthFrame-&gt;GetThirdShot()-&gt;GetCount()&lt;br /&gt;					- m_pTenthFrame-&gt;GetSecondShot()-&gt;GetCount()+_T('0'));&lt;br /&gt;			else if ((m_pTenthFrame-&gt;GetSecondShot()-&gt;GetResult() &amp; CShot::SPARE) != 0)&lt;br /&gt;				sResult[9].AppendChar(m_pTenthFrame-&gt;GetCount(3)+_T('0'));&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	int nScore[10];&lt;br /&gt;&lt;br /&gt;	for (int i = 0; i &lt; 10; i++)&lt;br /&gt;		nScore[i] = CalculateScoreByFrame(i);&lt;br /&gt;&lt;br /&gt;	sBuf.Format(sFmt, sResult[0], sResult[1], sResult[2], sResult[3], &lt;br /&gt;		sResult[4], sResult[5], sResult[6], sResult[7], sResult[8], sResult[9],&lt;br /&gt;		nScore[0], nScore[1], nScore[2], nScore[3], nScore[4], nScore[5],&lt;br /&gt;		nScore[6], nScore[7], nScore[8], nScore[9]);&lt;br /&gt;&lt;br /&gt;	TRACE(sBuf);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And why not at this point?  The mother of the ugliness:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;bool CGame::TestGame()&lt;br /&gt;{&lt;br /&gt;	CStringArray TestGames;&lt;br /&gt;	CArray&lt;CGame*&gt; Games;&lt;br /&gt;	TestGames.Add(_T("XXXXXXXXXF-"));&lt;br /&gt;	TestGames.Add(_T("8/8/8/8/8/8/8/8/8/F2"));&lt;br /&gt;	TestGames.Add(_T("9/9-9/9-9/9-9/9-9/9-"));&lt;br /&gt;	//				  1 2 3 4 5 6 7 8 9 10&lt;br /&gt;	TestGames.Add(_T("9/9/9/9/9/9/9/9/9/-1"));&lt;br /&gt;	//				  12345678910&lt;br /&gt;	TestGames.Add(_T("XXXXXXXXXX9/"));&lt;br /&gt;	//				  1 2 345678910&lt;br /&gt;	TestGames.Add(_T("9/9/XXXXXXXXXX"));&lt;br /&gt;	//				  1234 56 78910&lt;br /&gt;	TestGames.Add(_T("XXX9/X9/XXXXXX"));&lt;br /&gt;	TestGames.Add(_T("XXX9/XX9/XXXXX"));&lt;br /&gt;	TestGames.Add(_T("XXX9/9/XXXXXXX"));&lt;br /&gt;	TestGames.Add(_T("11111111111111111111"));&lt;br /&gt;	TestGames.Add(_T("22222222222222222222"));&lt;br /&gt;	TestGames.Add(_T("33333333333333333333"));&lt;br /&gt;	TestGames.Add(_T("81188118811881188118"));&lt;br /&gt;	//                12345678901234567890&lt;br /&gt;	TestGames.Add(_T("9/9/9/9/9/9/9/9/9/9/9"));&lt;br /&gt;	//                12 34 56 78 910&lt;br /&gt;	TestGames.Add(_T("XF/X-/XF/X-/XF/X"));&lt;br /&gt;	TestGames.Add(_T("44444444444444444444"));&lt;br /&gt;	TestGames.Add(_T("--------------------"));&lt;br /&gt;	TestGames.Add(_T("8/8/8/8/8/8/8/8/8/8/8"));&lt;br /&gt;	TestGames.Add(_T("7/7/7/7/7/7/7/7/7/7/7"));&lt;br /&gt;	TestGames.Add(_T("6/6/6/6/6/6/6/6/6/6/6"));&lt;br /&gt;	TestGames.Add(_T("5/5/5/5/5/5/5/5/5/5/5"));&lt;br /&gt;	TestGames.Add(_T("4/4/4/4/4/4/4/4/4/4/4"));&lt;br /&gt;	TestGames.Add(_T("3/3/3/3/3/3/3/3/3/3/3"));&lt;br /&gt;	TestGames.Add(_T("2/2/2/2/2/2/2/2/2/2/2"));&lt;br /&gt;	TestGames.Add(_T("1/1/1/1/1/1/1/1/1/1/1"));&lt;br /&gt;	TestGames.Add(_T("-/-/-/-/-/-/-/-/-/-/-"));&lt;br /&gt;	TestGames.Add(_T("9-XXXXXXXXXXX"));&lt;br /&gt;	TestGames.Add(_T("9/XXXXXXXXXXX"));&lt;br /&gt;	TestGames.Add(_T("9-9-9-9-9-9-9-9-9-9-"));&lt;br /&gt;	TestGames.Add(_T("XXXXXXXXXXXX"));&lt;br /&gt;	TestGames.Add(_T("F/X-/XF/X-/XF/X-/"));&lt;br /&gt;	TestGames.Add(_T("X9/XXXXXXXXXX"));&lt;br /&gt;&lt;br /&gt;	for (int i = 0; i &lt; TestGames.GetCount(); ++i)&lt;br /&gt;	{&lt;br /&gt;		Games.Add(new CGame);&lt;br /&gt;		Games[i]-&gt;StringToGame(TestGames[i]);&lt;br /&gt;		TRACE(_T("Game %d is %s\n"), i+1, TestGames[i]);&lt;br /&gt;		Games[i]-&gt;ScoreGame();&lt;br /&gt;		Games[i]-&gt;DumpGame();&lt;br /&gt;		delete Games[i];&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	return true;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Yeah, I got bit in the ass several times because I had no function that attempted to validate a string as a game of bowling before I fed it into the code that mattered.  The point is that in realistic software development environments, this could would be refactored if it were to become anything more than throw away test-to-give-the-developer-a-warm-fuzzy code.&lt;br /&gt;&lt;br /&gt;Oh, and it is way to big of pain in the the ass to spell check a post when you have this much code.  Just assume all typos were either me being tired or having a good enough grasp of the english language to take some liberties with the rules.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-111094814286992423?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111094814286992423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111094814286992423' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111094814286992423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111094814286992423'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/03/scoring-game-of-bowling.html' title='Scoring a game of bowling'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-111075632945789434</id><published>2005-03-13T15:25:00.000-08:00</published><updated>2005-03-13T18:06:09.370-08:00</updated><title type='text'>Determing if a shot results in a split</title><content type='html'>&lt;code&gt;&lt;pre&gt;&lt;br /&gt;7 8 9 10&lt;br /&gt; 4 5 6&lt;br /&gt;  2 3&lt;br /&gt;   1&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So, I spent the majority of my weekend working working on my bowling tracking app for my mobile. eMbedded Visual C++ is not the most pleasant IDE to work with, so I started writing it as a desktop app which I will later port to the mobile.  So far I have implemented an owner drawn check box that allows the user the toggle the presence if a given pin in a leave.  Once that was completed, I start writing classes to model a shot, a frame, and a game.  As I mentioned in a previous post, I wanted to be able to track statistics related to leaving and converting splits.  It turns out determining if a leave is a split or not is not the most trivial thing to implement.&lt;br /&gt;&lt;br /&gt;I wasn't really sure how to start, so I got up from the computer, pulled out some pencil and paper, and started writing down various splits as fast as I could think of them.  It quickly became apparent that enumerating all possible (or even all realistic) splits was an unfeasible choice for implementation.  At this point, it occurred to this could be viewed as a pattern recognition problem.  As such, I considered attacking the problem with a &lt;a href="http://en.wikipedia.org/wiki/Finite_state_machine"&gt;finite state automaton&lt;/a&gt;.  Unfortunately, I have never been a big fan of implementing FSAs, which probably stems from my disdain for my old compilers professor.  I was hoping to find another solution.&lt;br /&gt;&lt;br /&gt;That is when I turned to my old friend, &lt;a href="http://en.wikipedia.org/wiki/Graph_theory"&gt;graph theory&lt;/a&gt;.  As a result, I developed the following algorithm to determine if a leave is a split:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;If a leave contains the head pin (or 1-pin), it is not a split.&lt;br /&gt;&lt;li&gt;If a leave contains fewer than two pins, it is not a split.&lt;br /&gt;&lt;li&gt;Let each pin in the leave represent a node.  Each node has a vertex to every other pin that is diagonally adjacent and to every other pin that is directly in front or behind it (what is known to bowlers a "sleeper"). If there exists a path of vertices from each node to every other node, the leave it not a split.  Otherwise, it is.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;For some additional clarification, here are some examples of diagonally adjacent pins:&lt;br /&gt;(1, 2), (1,3), (2,4), (2,5), etc.&lt;br /&gt;&lt;br /&gt;The following would not be diagonally adjacent:&lt;br /&gt;(1,4), (1,6), (4,5), (1,5), (2,8) (3, 9)&lt;br /&gt;&lt;br /&gt;The last three examples above are the "sleeper" leaves.&lt;br /&gt;&lt;br /&gt;So now that I had an algorithm, it was time to implement it.  For the implementation code to make sense, some other pieces of the puzzle must be addressed. The first thing is to determine how a leave would be represented.  I could have used a string containing the number of the pins left, like "7 10", but that wouldn't have been to efficient although it would have been convenient at times.  I could have also used a ten element array of booleans indicating if each pin were present.  That also seemed a little bit wasteful, and since I do want to port this to a mobile device in the future, I wanted something more conservative.  In the end, I decided to use a bitmapped word to represent the results of each shot.  The zero bit being set indicated the 1-pin was present, and so on.  I now had six extra bits I could use.  I decided to use the additional bits to indicate a miss (gutter), a foul, a strike, and a spare.  I am left with two unused bits.  Using this scheme, you can store everything you every wanted to know about a game of bowling twenty-one words, or forty-two bytes if you prefer.  The bitmap was defined as part of a class that models a single shot (be it first or second, or third shot if the bowler marked in the tenth).  Here's a snippet:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;class CShot : public CObject&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt; CShot();&lt;br /&gt; virtual ~CShot();&lt;br /&gt;&lt;br /&gt; int GetCount();&lt;br /&gt; virtual void Serialize(CArchive&amp; ar);&lt;br /&gt; void SetResult(WORD wResult);&lt;br /&gt;&lt;br /&gt; WORD GetResult();&lt;br /&gt; static const WORD ONEPIN = 0x0001;&lt;br /&gt; static const WORD TWOPIN = 0x0002;&lt;br /&gt; static const WORD THREEPIN = 0x0004;&lt;br /&gt; static const WORD FOURPIN = 0x0008;&lt;br /&gt; static const WORD FIVEPIN = 0x0010;&lt;br /&gt; static const WORD SIXPIN = 0x0020;&lt;br /&gt; static const WORD SEVENPIN = 0x0040;&lt;br /&gt; static const WORD EIGHTPIN = 0x0080;&lt;br /&gt; static const WORD NINEPIN = 0x0100;&lt;br /&gt; static const WORD TENPIN = 0x0200;&lt;br /&gt; static const WORD MISS = 0x0400;&lt;br /&gt; static const WORD FOUL = 0x0800;&lt;br /&gt; static const WORD STRIKE = 0x1000;&lt;br /&gt; static const WORD SPARE = 0x2000;&lt;br /&gt;            ...&lt;br /&gt;protected:&lt;br /&gt; WORD m_wResult;&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Since the concept of a split doesn't make sense as the result of a second shot, the function for determining weather or not a leave is a split could not be part of CShot.  Instead it is a member function in the class I used to represent a single, non-tenth frame of bowling, CFrame.  Here is the relevant portion of the CFrame class definition:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;class CFrame : public CObject&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt; CFrame();&lt;br /&gt; virtual ~CFrame();&lt;br /&gt;            ...&lt;br /&gt; bool IsMark() const;&lt;br /&gt; virtual bool IsSpare() const;&lt;br /&gt; virtual bool IsStrike() const;&lt;br /&gt; bool IsSplit() const;&lt;br /&gt; bool IsOpen() const;&lt;br /&gt; virtual void Serialize(CArchive &amp;ar);&lt;br /&gt; void SetFirstShot(CShot* pShot);&lt;br /&gt; void SetSecondShot(CShot* pShot);&lt;br /&gt;&lt;br /&gt;protected:&lt;br /&gt; CShot* m_pFirstShot;&lt;br /&gt; CShot* m_pSecondShot;&lt;br /&gt;&lt;br /&gt;private:&lt;br /&gt; operator=(const CFrame&amp; Frame) {};&lt;br /&gt; CFrame(const CFrame&amp; Frame) {};&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Finally, the implementation of this elementary application of graph theory:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;bool CFrame::IsSplit() const&lt;br /&gt;{&lt;br /&gt; ASSERT(m_pFirstShot != 0);&lt;br /&gt; WORD wResult = m_pFirstShot-&gt;GetResult();&lt;br /&gt;&lt;br /&gt; // A leave cannot be considered a spilt if it contains the head pin&lt;br /&gt; if (wResult &amp; CShot::ONEPIN) return false;&lt;br /&gt; &lt;br /&gt; int nCount = m_pFirstShot-&gt;GetCount();&lt;br /&gt; &lt;br /&gt; // There has to be at least two pins standing to be a split&lt;br /&gt; if (nCount == 9 || IsStrike()) return false;&lt;br /&gt;&lt;br /&gt; int nPinsLeft = NUMPINS - nCount;&lt;br /&gt;&lt;br /&gt; while (nPinsLeft)&lt;br /&gt; {&lt;br /&gt;  if (wResult &amp; CShot::TENPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; (CShot::SIXPIN)) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::TENPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else if (wResult &amp; CShot::NINEPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; (CShot::THREEPIN | CShot::FIVEPIN | CShot::SIXPIN)) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::NINEPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else if (wResult &amp; CShot::EIGHTPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; (CShot::TWOPIN | CShot::FOURPIN | CShot::FIVEPIN)) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::EIGHTPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else if (wResult &amp; CShot::SEVENPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; CShot::FOURPIN) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::SEVENPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }  &lt;br /&gt;  }&lt;br /&gt;  else if (wResult &amp; CShot::SIXPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; CShot::THREEPIN) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::SIXPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else if (wResult &amp; CShot::FIVEPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; (CShot::TWOPIN | CShot::THREEPIN)) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::FIVEPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else if (wResult &amp; CShot::FOURPIN)&lt;br /&gt;  {&lt;br /&gt;   if ((wResult &amp; CShot::TWOPIN) == 0)&lt;br /&gt;    return (nPinsLeft &gt; 1);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    wResult &amp;= ~CShot::FOURPIN;&lt;br /&gt;    nPinsLeft--;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;   return (nPinsLeft &gt; 1);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return false;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;I ended up writing a bunch of additional code to generate the bitmapped word for a given leave represented as string.  Then I stuffed a crap load of different leaves in an array with every other one being a split. I wrote a loop that iterated through the array and called the IsSplit function verifying I got the expected result.  I know this code works for any realistic leave, and I am pretty sure it would work for any unrealistic leave as well.  And if you have spent much time at a bowling alley, you have definitely heard stories about some pretty unrealistic leaves. :) &lt;br /&gt;&lt;br /&gt;I think there is a more elegant recursive solution in there somewhere, but I think this implementation is still fairly clean.  Most of the unwieldiness stems from the bitmapped representation of the leave.  But since this is totally different than the kind of problems I have to solve at work, it has made for a refreshing little additional challenge to my little hobby project.  And I think that is cool...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-111075632945789434?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/111075632945789434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=111075632945789434' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111075632945789434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/111075632945789434'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/03/determing-if-shot-results-in-split.html' title='Determing if a shot results in a split'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110998060068470044</id><published>2005-03-04T15:56:00.000-08:00</published><updated>2005-03-04T16:22:34.743-08:00</updated><title type='text'>My Phone Can Beat Up Your PDA</title><content type='html'>So, I bought the &lt;a href="http://www.motorola.com/mdirect/hellomoto/experience/mpx220/flash/homepage.shtml"&gt;Motorola MPx220&lt;/a&gt;.  It totally rules, and I am hella excited about the idea of having a phone I can write programs for.  Or having a phone for which I can write programs.  Whatever.&lt;br /&gt;&lt;br /&gt;The camera is a bit of a disappointment, and I kind of wish it took regular SD cards instead of mini-SDs.  Especially since I bought a 1 GB SD card thinking it would work.  I did end up buying a 256 MB mini-SD, but I don't feel like quite the big man I would if I could carry a gig of Pictures of Richard Nixon on my phone.&lt;br /&gt;&lt;br /&gt;The first application I want to write is a bowling tracker.  After each frame, I can come tell it whether I threw a strike, a spare, or an open, and the pins I left as a spare if applicable.  Then it would sync with a desktop component that would store everything in a database and calculate some meaningful values like:&lt;br /&gt;&lt;br /&gt;Average Score&lt;br /&gt;Average Score by Game (1st, 2nd, or  3rd of three game sets)&lt;br /&gt;Strike Percentage&lt;br /&gt;Spare Percentage&lt;br /&gt;Single Pin Conversion Percentage&lt;br /&gt;Multi-pin Spare Conversion Percentage&lt;br /&gt;Split Leave Percentage&lt;br /&gt;Split Conversion Percentage&lt;br /&gt;etc.&lt;br /&gt;&lt;br /&gt;I would like to make it capable of tracking more esoteric stats than you would even hear from a baseball announcer.&lt;br /&gt;&lt;br /&gt;I am sure it would sell more copies than Windows 95 did.  I mean, come on.  Bowlers serious enough to take the effort to record each shot who also happen to have a smart phone running Windows?  That is no niche market!  Actually, I think I am the only one.&lt;br /&gt;&lt;br /&gt;In bowling related news, I had the first nine strikes in the first game of league the week before last.  I threw the first shot in the tenth too softly, it finished high and I ended up shooting 277.  I suck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-110998060068470044?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110998060068470044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110998060068470044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110998060068470044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110998060068470044'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/03/my-phone-can-beat-up-your-pda.html' title='My Phone Can Beat Up Your PDA'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110783171678898294</id><published>2005-02-07T19:01:00.000-08:00</published><updated>2005-02-07T19:01:56.786-08:00</updated><title type='text'>Overdue Update</title><content type='html'>So, the day after the Super Bowl sucks for me.  I am big football fan, but especially NFL football.  I played two fantasy leagues this year, plus one during the playoffs (which I won).  I have spent close to every Sunday watching during football season watching a game during each timeslot for the last six years.  I haven't missed a single Monday night football game in probably five years.  I rarely turn off games early, which may seem like a waste of time to some, but when you get to see a comeback like the Jets had against the Dolphins a few years ago or the Colts against the Bucs last year, that makes it all worth it to me.&lt;br /&gt;&lt;br /&gt;I also watch entirely too much TV, so I am very opinionated about TV commercials.  I have never eaten at a Carl's Jr. because I think their commercials are horrific.  Most of the anti-drug commercials I see are so stupid and ineffective, it makes me want to find a crack dealer.  Don't even get me started on the local commercials I must tolerate.&lt;br /&gt;&lt;br /&gt;I got to spend the day overhearing everyone's pedestrian observations, moronic opinions, and downright inaccurate accounts of the game.&lt;br /&gt;&lt;br /&gt;I heard people blaming Donovan, calling him inconsistent.  Well, Brady did miss some throws, too, and Donovan threw for the fourth highest passing yardage in Super Bowl history, despite being sacked four times for a loss of 33 yards.  The battle of the quarterbacks was not the deciding factor in this game.&lt;br /&gt;&lt;br /&gt;I heard people claim both offenses were sloppy in the first half.  WRONG.  Both offenses were made to look sloppy by the opposing defenses.  I suppose one could bring up Brady's fumble on the play action fake where Kevin Faulk knocked it out of his hands.  Well, one arguably sloppy play in a half does not constitute sloppy play.&lt;br /&gt;  &lt;br /&gt;The things I read in the blogosphere weren't much better.&lt;br /&gt;&lt;br /&gt;Scoble claimed a &lt;a href="http://radio.weblogs.com/0001011/2005/02/06.html#a9362"&gt;football game broke out late in the third quarter&lt;/a&gt;.  I normally agree with what he has to say, and I consider his opinions when I don't.  But this really underscores one of my major irritations with casual football fans:  they can't appreciate a strong defensive performance.  I think back to the first quarter and the intensity from both defenses, especially &lt;a href="http://sports.espn.go.com/nfl/players/profile?statsId=2821"&gt;Rodney Harrison&lt;/a&gt; and &lt;a href="http://sports.espn.go.com/nfl/players/profile?statsId=4480"&gt;Jeremiah Trotter&lt;/a&gt;, and I cannot fathom how someone would think it wasn't "a game" from the opening kick.&lt;br /&gt;&lt;br /&gt;I guess I should be used to the casual fan rubbing my NFL elitism the wrong way by now.  But at least he linked &lt;a href="http://www.homestarrunner.com/filmstyle.html"&gt;Homestarrunner&lt;/a&gt;, so I guess I am obliged to let it slide. :)&lt;br /&gt;&lt;br /&gt;And the multiple people who watched for the commercials, or TiVo'd it so they could only watch the commercials... what the hell were they thinking?  Does their memory not go back a full year?  Last year's commercials sucked.  So did the year before.  In my opinion, Super Bowl commercials haven't even been close to worthy of the Super Bowl since the Atlanta vs. Denver Super Bowl (that was played in 1999).&lt;br /&gt;&lt;br /&gt;And the commercials sucked this year, too.  I have read the GoDaddy.com commercial has been getting the best reviews in the blogosphere.  Hmm, why could that be?  Maybe because all the commercials sucked, and having a busty female in a sucky commercial makes it less sucky than the ones without a busty female.  Yeah, yeah, I get that is was tying in with that selfish cesspool of human being Janet Jackson's stunt from last year, but it wasn't that clever.&lt;br /&gt;&lt;br /&gt;...Fucking monkeys...  Advertising people, never put another stupid monkey in a commercial.  It's insulting.  It is a cheap way to get some sort of "cuteness" which I find repulsive, but apparently a certain portion of the population finds appealing.&lt;br /&gt;&lt;br /&gt;Olympus, your commercial sucked, too.  I am sick of ads with such synthetic "hipness".  It was cheesy and stupid and fell way short of being hip.  You are no Apple.  The commercial was severely lacking in substance.  What exactly in that monstrosity was supposed to convince me to give up my iPod and my digital camera?&lt;br /&gt;&lt;br /&gt;The Ameriquest commercial was almost decent if it hadn't been so predictable.&lt;br /&gt;&lt;br /&gt;Even Bud Light, who normally is the highlight of Super Bowl commercials, was a real letdown this year.&lt;br /&gt;&lt;br /&gt;And Pepsi.  Pepsi, Pepsi, Pepsi...  Do you test your commercials?  Nobody likes Puffy or P-Diddy or whatever the hell he's called now.  "Yeah, let's get that one talentless quasi-rapper who shoots up night clubs to endorse our product!"  Brilliant...&lt;br /&gt;&lt;br /&gt;I have a dream that one day the Super Bowl commercials won't be riddled with played out marketing gimmicks.  I am almost certain that dream will never come true.  No wonder advertisers and networks push for things like the broadcast flag and ads while you fast forward your TiVo.  Maybe if you could make an ad people wouldn't mind watching every once in a while, you wouldn't have to resort to such childish tactics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-110783171678898294?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110783171678898294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110783171678898294' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110783171678898294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110783171678898294'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2005/02/overdue-update.html' title='Overdue Update'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110330907395614251</id><published>2004-12-17T10:44:00.000-08:00</published><updated>2004-12-17T10:44:33.956-08:00</updated><title type='text'>The Joy of Bowling</title><content type='html'>So, I have gotten a little feedback concerning my lack of writing about one of my other hobbies: bowling.&lt;br /&gt;&lt;br /&gt;Something about bowling transforms me into a white trash, high school kid, which is more fun than it sounds.  My bowling partner in crime, Andy, a lazy f*ck without a blog, and I like to be obnoxious, talk behind peoples' backs, and give them nicknames.&lt;br /&gt;&lt;br /&gt;I bowl a men's league on Wednesday nights.  This league is such a target rich environment.  I remember commenting to Andy after the league meeting (which he didn't attend) at the beginning of the year, "It's even white trashier this year".&lt;br /&gt;&lt;br /&gt;The uping of the white trash value of the league is primarily due to two phenomena: Mike and Rick.&lt;br /&gt;&lt;br /&gt;I guess a little background is in order.  Andy and I are quite snobs when it comes to having mechanically sound form when bowling.  We love to belittle even the smallest imperfection we can find in someone's game.&lt;br /&gt;&lt;br /&gt;So, Mike is a guy that gives the vibe he's suffered major head trauma.  Not just because he's stupid, although his level of stupidity is astounding, but his head seems fairly misshapen and he wears his hair short forfeiting any opportunity to obfuscate the uniqueness of his cranium.  He also likes to say "get 'er done" and sing Aerosmith songs.&lt;br /&gt;&lt;br /&gt;When he bowls, he has this stupid hand action where he starts normally then during his backswing he rotates his hand around to the front of the ball and then back behind it just before delivery.  That is stupid and unnecessary.  The key in bowling is to minimize the number of variables in your physical game.  He obviously has introduced a significant variable into his game with no redeeming traits.&lt;br /&gt;&lt;br /&gt;For this, Mike has been bestowed the title of "Twisted Wrister".&lt;br /&gt;&lt;br /&gt;Rick strikes me as a raging alcoholic whose body and mind quite sobering up some years ago.  Rick is substantially overweight and doesn't have a nickname.  Maybe that will change when his fat ass pops out of his sweatpants at the foul line.  He seems to be closer to doing it every week.&lt;br /&gt;&lt;br /&gt;While we are on the "get 'er done" theme, there is a team of really country guys.  I guess they are decent guys for the most part, but growing up where I did, you are either country or have some resentment for country-ish traits.  I fall into the latter category.  Anyway, one night they were getting extra torn up off Coors Lite, yucking it up like nobody's business, when Andy turned to me said, "Jesus, it's like sitting next to a table of Jeff Foxworthys".  The next week I referred to them as "Team Foxworthy" and it has stuck for a couple of years now.&lt;br /&gt;&lt;br /&gt;I bowled a mixed league (men and women) a couple of years ago.  That league also had its share of colorful characters.&lt;br /&gt;&lt;br /&gt;There was this one guy, Nathan.  Nathan was mentally slow, didn't respect others personal space, and while he was busy not respecting your personal space, he oozed a sexually threatening vibe.  I described him to Andy once as "a sex crime waiting to happen".  I think that is still one of Andy's favorites.  One of my favorites was when Nathan came to bowling in red sweat pants that had something looking like nut stains on the ass.&lt;br /&gt;&lt;br /&gt;Wally was another interesting character I met through bowling.  I don't remember all the details of our first conversation, but I remember him mentioning "25 years in prison".  I tried to not look uncomfortable, but I couldn't help but think this guy killed someone AND he planned it out before hand.  Wally explained he was a cook at a prison for twenty-five years.  I guess I had taken the bait.  Wally was also cool because he was a pretty hefty guy and kind of weathered looking, but he often wore an oversize T-shirt with a female body in a bikini airbrushed on both sides.  The humor in the contrast was not lost on me.&lt;br /&gt;&lt;br /&gt;Other interesting things I have seen due to bowling:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A guy pass out at 4:30 PM because he sold blood to buy vodka and proceeded to drink it&lt;br /&gt;&lt;li&gt;The nastiest feet/toes I have ever seen on a live body&lt;br /&gt;&lt;li&gt;A world record being broken (highest three game series by a youth female)&lt;br /&gt;&lt;li&gt;Andy missing a 10-pin&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-110330907395614251?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110330907395614251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110330907395614251' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110330907395614251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110330907395614251'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/12/joy-of-bowling.html' title='The Joy of Bowling'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110330161524535792</id><published>2004-12-17T08:40:00.000-08:00</published><updated>2004-12-17T08:40:15.246-08:00</updated><title type='text'>Succumbing to Tech Savvy Trends</title><content type='html'>So, gus &lt;a href="http://www.metroplaza.net/blog/2004/12/i-uped-my-hertz.html"&gt;uped his hertz&lt;/a&gt;.  This has caused me to reflect on the computers in my life.  Here's a summary.&lt;br /&gt;&lt;br /&gt;Home desktop - Dell 8250&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pentium 4 somewhere around 2.5 GHz&lt;br /&gt;&lt;li&gt;512 MB of RAM&lt;br /&gt;&lt;li&gt;80GB and 60GB hard drive&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Home desktop 2 - Custom built from &lt;a href="http://www.monarchcomputer.com"&gt;monarchcomputer.com&lt;/a&gt; and &lt;a href="http://www.tigerdirect.com"&gt;tigerdirect.com&lt;/a&gt; (Note: I am in no way affiliated with these sites.  I am just a satisfied customer turned evangelist.)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Athalon 64 (no clue on clock speed)&lt;br /&gt;&lt;li&gt;1GB of RAM&lt;br /&gt;&lt;li&gt;60GB IDE and 100GB Serial ATA&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Work desktop - Dell Precision Workstation&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dual 2.0 GHz Xeon Processors&lt;br /&gt;&lt;li&gt;1 GB of RAM&lt;br /&gt;&lt;li&gt;80 GB hard drive&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Work laptop - Dell latitude C840&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pentium IV 2.2 GHz&lt;br /&gt;&lt;li&gt;1 GB of RAM&lt;br /&gt;&lt;li&gt;60 GB hard drive&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;So why have I bored you with the specs of my computers?  Because I am a dick.  No, wait, it was to underscore my computational lust.  You see, with all this processing power at my disposal, I am seriously considering buying another computer.  Actually, a tablet pc to be more precise.&lt;br /&gt;&lt;br /&gt;See, I am a single guy without loved ones (well, my dad and sisters), so if I want something cool for Christmas, I had better damn well buy it myself. So far, the leading candidate is the &lt;a href="http://www.toshibadirect.com/td/b2c/cmod.to?coid=-26373&amp;sel=0&amp;rcid=-26367&amp;ccid=1291021"&gt;Toshiba M200&lt;/a&gt;, but I am still researching.  So if either of my readers have experience with tablets, please give me your take.&lt;br /&gt;&lt;br /&gt;The other "trend" I am close to succumbing to is podcasting.  Well, I suppose I have partially succumbed already since I have been listening to podcasts for awhile, but I am considering going from podcast consumer to podcast producer by launching a fantasy football podcast.  I wish I had started earlier in the season, but I am considering playing fantasy &lt;a href="http://www.arenafootball.com/"&gt;Arena Football&lt;/a&gt; in the spring, which would provide supplemental content while continuing to cover NFL offseason movements.&lt;br /&gt;&lt;br /&gt;So, if anyone has any tips for starting podcasts or good web hosting providers, drop me a line.  Can anyone point me to the breakout box &lt;a href="http://live.curry.com/"&gt;Adam Curry&lt;/a&gt; uses for &lt;a href="http://radio.weblogs.com/0001014/categories/dailySourceCode/"&gt;The Daily Source Code&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Okay, now I am really starting to digress, but it's my blog, damnit, and I will talk about what I want.  For people that aren't listening to podcasts right now, I would suggest the following for a start:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://radio.weblogs.com/0001014/categories/dailySourceCode/"&gt;The Daily Source Code&lt;/a&gt; - Pretty interesting.  My first listen was severe deja vu.  It took me back to a period when I believed MTV was cool, but I didn't hold it against Adam.&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.dawnanddrew.com/"&gt;The Dawn and Drew Show&lt;/a&gt; - Goofy, fun, well produced, but still raw.&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.coverville.com/archives/podcast/"&gt;Coverville&lt;/a&gt; - Coverville is show that plays a lot of obscure cover songs.  It didn't seem like something I would be into, but I gave it a listen and was completely taken aback.  It also informed me that &lt;a href="http://www.benfolds.com/"&gt;Ben Folds&lt;/a&gt; produced William Shatner's &lt;a href="http://www.amazon.com/exec/obidos/ASIN/B0002RUPH4/qid=1103301116/sr=2-1/ref=pd_ka_b_2_1/103-9774487-7526230"&gt;CD&lt;/a&gt;, which I thought was cool being a big Ben Folds fan and all.  I suppose I should credit Adam as well, but I am turning into a big fan of the &lt;a href="http://www.biddies4ever.com/"&gt;Lascivious Biddies&lt;/a&gt;.  Coverville is a great show that should please music lovers and music snobs alike.&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-110330161524535792?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110330161524535792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110330161524535792' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110330161524535792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110330161524535792'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/12/succumbing-to-tech-savvy-trends.html' title='Succumbing to Tech Savvy Trends'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110254801437404150</id><published>2004-12-08T15:20:00.000-08:00</published><updated>2004-12-08T21:09:00.106-08:00</updated><title type='text'>Things That Irritate Me</title><content type='html'>So, I don't have a lot of time but I am way overdue for a post.  There are a ton of things that irritate me, so this may be my crutch topic when I need something to post about.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;My Roommate's Cat&lt;br /&gt;&lt;br /&gt;My roommate left his cat here while he went to see his family over Thanksgiving.  He also left it with very little food.  It had been irritating me more than usual, and Susan left me note saying it had no food.  When I found the note Susan left, I already had decided that I was not running any more errands that evening, so I fed it a bowl of albacore.  The next day, I went to Wal-Mart to get it some food.  Words cannot describe how cool I felt wandering the aisles in Wal-Mart looking for cat food while being a single guy.&lt;br /&gt;&lt;br /&gt;I got home and fed the cat.  I was hoping the cat would leave me the hell alone for awhile, but now she seemed to want my attention more than ever.  It just goes to show my dad was right.  "No good deed goes unpunished" he would tell me.&lt;br /&gt;&lt;br /&gt;Some people might say this cat is loveable, but I would call it high-maintenance and attention-starved.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Content Quality vs. Content Quality&lt;br /&gt;&lt;br /&gt;Why is it that people whose content is shit just keep producing, while quality content providers release new material few and far between?  I am sure some of you are saying "Well, it takes more time to produce quality content" and that is true.  But f*ck off, I want to rant anyway.&lt;br /&gt;&lt;br /&gt;Locally, I have a few pathetic ambulance chasing lawyers that put out stupid, annoying content weekly.  One of them is David Garrett, and his motto is "Call David Garrett.  He'll know what to do."  Wow, that's comforting.  Why not "Call David Garrett.  He is vaguely familiar with the process of settling a car accident"?  I think if I were a lawyer (BRFFF, sorry, I just threw up in my mouth a little bit), I would want my motto to imply some sort of skill or competency in my given trade.&lt;br /&gt;&lt;br /&gt;Then there's Daniel and Conway.  One of the lawyers looks like he scoured big and tall stores for Crockett-and-Tubbs-looking suits on clearance sometime after Miami Vice went off the air.  Their demeanor is as repulsive as there apparel.  There latest shows the Miami Vice guy continually throwing handfuls of pills in his mouth while speaking.  And while he is speaking, his point is basically that he and his homie are the best ambulance chasers since they aren't diversifying into the class action drugs suits.  Well, I am hella-impressed.&lt;br /&gt;&lt;br /&gt;Then we have &lt;a href="http://hoarymarmot.blogspot.com/"&gt;charr&lt;/a&gt;.  He is off to a great start with his blog, and everyone I have pointed to the &lt;a href="http://hoarymarmot.blogspot.com/2004/11/who-hell-drops-eaves.html"&gt;eavesdrop&lt;/a&gt; post has loved it.&lt;br /&gt;&lt;br /&gt;Oh shit, he updated this week.  He is ruining my argument.  But hell there are other examples... It is left as an exercise to the reader to come up with them.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Blogger.com, or Blogspot.com, or whoever the hell hosts my blog, doesn't support trackback.  &lt;br /&gt;&lt;br /&gt;I think it would be cool to see who linked to my blog, if that were to happen.  It would be cool to see the blogger.com blogs that I have linked to.&lt;br /&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Okay, so three things.  This post sucks, and I guess I do, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-110254801437404150?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110254801437404150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110254801437404150' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110254801437404150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110254801437404150'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/12/things-that-irritate-me.html' title='Things That Irritate Me'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110125432777796816</id><published>2004-11-23T15:58:00.000-08:00</published><updated>2004-11-23T15:58:47.776-08:00</updated><title type='text'>The Emotional Rollercoaster that was My Day</title><content type='html'>&lt;b&gt;Chapter 1 - Frustration&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, today I spent the majority of my time migrating my project intranet pages to a &lt;a href="http://blogcms.com/"&gt;content management system&lt;/a&gt;.  Well, okay, it is now a blog, but what sounds better in my activity report?  Dealing with the skins, the templates, the database, and the scripts to figure out how they all interact to produce a web page was not a straight forward task for those uninitiated with the intricacies of blogging engines and/or content management systems.  Did I mention that I was uninitiated with the intricacies of blogging engines and content management systems?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Chapter 2 - Relief Crescendos to Excitement&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, towards the end of the day, I finally get the little bastard to do the majority of the things I want it to do.  I start getting the pages looking more like what I had in mind than the initial templates, and each task seems to go a little bit easier.  I get the content of the old website migrated over much more easily than anticipated, and the website is finely in a workable state.  Now it supports syndication (read RSS/Atom), searching, and hell of lot easier means of updating the site.  I start to realize how freaking cool this is.  I anticipate the value of the website to increase several fold, as new content is displayed on the front page, and old content gets pushed aside but is still easy to access via the search.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Chapter 3 - Straight Giddy, Yo!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, I am driving home to start five days off work.  It is the closest thing I have had to a vacation in over two and half years, if you don't count the work I missed as a result of my car accident.  I am rocking out to &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/B00004TTFM/qid=1101252258/sr=8-1/ref=pd_csp_1/103-6421038-8577433?v=glance&amp;s=music&amp;n=507846"&gt;Cursive's Domestica&lt;/a&gt;, singing along like a dork vomit in my off-key baritone not caring who sees.  I pick up some Bud Light Beer to drink with Buzz Light Year on the way home.  Oh, I pick it up on the way home, not drink it on the way home with Buzz Light Year.  Whatever.  To Infinity and Beyond!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Chapter 4 - Sympathy and Sadness&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, I get home and I am just about to have a refreshing coldie at the end of day in which I struggled, yet emerged victorious, when the doorbell rings.  I haven't even taking my badge off yet, so I start panicking thinking one of my neighbors has been watching my house so they could give me a piece of their mind over my yard or hedges or some other form of banal minutia.  As I walk to the door, I decided this probably isn't the case since the shadow is all of about 4'6".  I open the door and the young girl asks me if I have seen her sister.  She has a flyer that reads "MISSING" with a picture and vitals, the whole bit.  I don't recognize her.  I haven't been out much in weeks, so there is little chance I have seen her.  I tell the little girl no.  She begins to describe her, something about a hair accessory.  I continue to look at the flyer and see her sister is 22.  I try to convince myself she probably ran off with a guy or something.  The little girl's continued description after I said no was socially awkward, but she's a little girl whose upset about her sister missing.  She's allowed to be socially awkward.  Sort of the story of my life... I make valid reasons for everyone but me to behave socially awkward and beat myself up over it when I do it, but I digress.  True to form, I tell the little girl "I haven't been going anywhere but work, so I don't think I have seen her."  I don't think my logical explanation eased the little girl's disappointment.  I followed with "Well, I haven't seen her, but I hope you have good luck finding her".  Well, that is a nice thought, though awkwardly phrased.  To make matters worse, it came out cold, stale and insincere although I meant every awkward word of it.  It was one of those remarks you want to pull back out of the air before someone can respond because it came out SO wrong.  The little girl thanked me and walked away.  I watched her as she did, and noticed she walked through my yard.  Then it really hit--she was walking door-to-door through my neighborhood by herself on a cold and rainy November day two days before Thanksgiving trying to find her missing sister who could be dead, kidnapped or just never heard from again or who the hell knows what else.  My problems seemed less significant, and my good mood distant.&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/8462164-110125432777796816?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110125432777796816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110125432777796816' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110125432777796816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110125432777796816'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/11/emotional-rollercoaster-that-was-my.html' title='The Emotional Rollercoaster that was My Day'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110082541493426626</id><published>2004-11-18T16:50:00.000-08:00</published><updated>2004-11-18T16:50:14.933-08:00</updated><title type='text'>Oklahoma City MSDN Event Fall 2004</title><content type='html'>So, I just returned home from attending my first MSDN event.  I had read some mixed reviews on the topics, so I thought I would offer my take.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;OOP in VB.NET&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This topic was not of the most interest to me.  When I first heard this was one of the topics, I expected a more conceptual talk which eventually led to the VB syntax.  I didn't really think Microsoft was the best source for information regarding the concepts of OOP.  I mean, you can pick up any number of books that cover these concepts.  When I hear someone from Microsoft speak, I want lowdown, dirty details about their specific technologies that would be difficult or impossible to get elsewhere.  However, the guy sitting next to me still did VB6.  He was a petroleum engineer.  My guess would be that he doesn't go out and seek a lot of other educational sources.  I think there were a lot of other VB6 programmers there in the same boat.&lt;br /&gt;&lt;br /&gt;There wasn't too much conceptual talk really.  Quick and pragmatic the way I like things.  The presenter, &lt;a href="http://blogs.msdn.com/ron_cundiff/"&gt;Ron Cundiff&lt;/a&gt;, showed the code and then explained the implications.  I am not completely sure I would have followed everything conceptually if I weren't the OOP pimp that I am. ;)  Honestly, I think this topic was more effective evangelizing the migration to VB.NET rather than to teach OOP.  I don't think that is necessarily a bad thing.  For me, the topic kind of got me into a groove of listening and understanding.  It had merit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Programming with MapPoint Web Services&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This was kind of neat, but not very applicable to my particular responsibilities.  It was covered pretty fast.  So was my coverage of it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Optimizing ASP.NET 1.1 Web Applications&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I had read an honest, fair, unflattering &lt;a href="http://loudcarrot.com/Blogs/dave/archive/0001/01/01/667.aspx"&gt;review&lt;/a&gt; of this topic.  Well, either OKC had a better presenter, or Microsoft read the review as well.  The discussion of caching was still kind of glossed over, but it was mentioned, some simple strategies were suggested, and its importance was strongly emphasized in the conclusion.  Now, I am a self-taught database guy, and I have never had to create/maintain a database that was of interest to more than five users, so I found the SQL optimizations that were offered were pretty valuable.  I haven't done ASP.NET, either, but the optimizations seemed valid to me.  I enjoyed the performance and stress testing demo as well.&lt;br /&gt;&lt;br /&gt;So, big ups to &lt;a href="http://loudcarrot.com/Blogs/dave/"&gt;Dave Donaldson&lt;/a&gt;.  I think you had a hand in making my MSDN event experience better.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ASP.NET 2.0 Membership and Personalization&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This demo was rushed because we were a bit behind, but WOW!  I don't know a whole lot about membership and personalization, but this demo sure made ASP.NET 2.0 and Whidbey look like the shizzell.  I was blown away with how much functionality Ron implemented with very little code writing.  It got me super pumped about the controls in Whidbey.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I had a great time.  It was cool to talk to some local developers I had never met.  I got a T-Shirt, some cool bits I am dying to try out, and paid for it (I went on company time).  I would suggest going if you have never been to one.&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/8462164-110082541493426626?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110082541493426626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110082541493426626' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110082541493426626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110082541493426626'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/11/oklahoma-city-msdn-event-fall-2004.html' title='Oklahoma City MSDN Event Fall 2004'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-110029736989201882</id><published>2004-11-12T14:09:00.000-08:00</published><updated>2004-11-12T14:09:29.893-08:00</updated><title type='text'>All You Need Are Hubs To Start a LAN Party</title><content type='html'>So, the devil machine axed me the other day if I wanted to go see The Weaker Thans with him.  I wasn't too familiar with The Weaker Thans,  but the devil machine is always good company, so I told him I'd go.&lt;br /&gt;&lt;br /&gt;Later in the week, he called me and told me that Piebald was playing as well.  I like Piebald quite a bit, and I had never seen them, so I was super pumped.&lt;br /&gt;&lt;br /&gt;We got to the show and found out it was all ages.  This means I was the oldest guy there that didn't look like the black sheep brother in Santa Clauses family.&lt;br /&gt;&lt;br /&gt;The thing about hanging out with the devil machine is that he owns/operates a restaurant, and has many young, attractive girls in his employment.  As it turned out, several of them came to the show.&lt;br /&gt;&lt;br /&gt;I lose sight of the devil machine, so I decided to just watch the show and worry about finding him afterward.  One of the afore mentioned subordinate hotties comes up to me and says, "You know they got kicked out, right?"&lt;br /&gt;&lt;br /&gt;No.  No, I didn't.&lt;br /&gt;&lt;br /&gt;So I follow her outside and the whole crew is out there.  I ax devil machine what is up, and he explains that a girl of legal age let an underage girl drink out of her beer, but he got the blame and they kicked him out.&lt;br /&gt;&lt;br /&gt;All in all, I had a pretty good time.  I was about ready to leave anyway, so their getting kicked out was not a big deal.  I got to shoot some pool, drink some beers, hear some tunes, and talk to some people, so it wasn't a bad night.  Piebald did let me down a little bit.  They did play three of the top five songs I wanted to hear, but they did it like they were in a hurry to get the hell out of there.  Maybe I am just a dick.  I haven't been impressed by a live band in a long time.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-110029736989201882?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/110029736989201882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=110029736989201882' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110029736989201882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/110029736989201882'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/11/all-you-need-are-hubs-to-start-lan.html' title='All You Need Are Hubs To Start a LAN Party'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109961242445723839</id><published>2004-11-04T15:53:00.000-08:00</published><updated>2004-11-05T11:02:21.626-08:00</updated><title type='text'>Haircut Awkwardo!</title><content type='html'>So, after several disappointing haircuts, I decided to try to find a new stylist.  My roommate had advocated a small barbershop that is much closer to my home than the place I usually go, so I was down to give it a try.&lt;br /&gt;&lt;br /&gt;I show up at this place and enter.  There's not a soul in sight. I walk around towards the back, ready to yell for some service, when one of the stylists/barbers appears.  She was about 5'4" and appeared to be in her mid-30's.  Her hair was a big yuppie, soccer-mom-of-yesteryear do.  It looked to me like it had been inspired by a MadTV wig worn when one of the females is playing some middle-aged lamer.&lt;br /&gt;&lt;br /&gt;She asks if she can help me, and I explain I need a haircut (actually, "explain" might be too strong of a word since I flatly said, "I need a haircut."&lt;br /&gt;&lt;br /&gt;We communicate enough that I *thought* she knew how I wanted my hair cut.&lt;br /&gt;&lt;br /&gt;Awkward silence falls.&lt;br /&gt;&lt;br /&gt;I notice she is leaving me facing toward the mirror as she does her "magic".  I watch her.  She doesn't seem to notice.  If she did notice, she was completely devoid of all social skills.  If her facial expressions were representative of her emotional state during my haircut, her demeanor seemed to randomly change between challenged, frustrated, confused, remorseful, and gassy.&lt;br /&gt;&lt;br /&gt;I began to ponder if she and the other "stylist" that eventually emerged were really holding up the place and thought it would be easier to give me a shitty haircut and send me on my way than to try make their grand getaway with me there to witness.&lt;br /&gt;&lt;br /&gt;I figured my theory, as entertaining as it was to me, couldn't have been true due to my stylist's just-barely-adequate skills with the shop's customer database.&lt;br /&gt;&lt;br /&gt;"I am very tired today", she says, breaking a uncomfortable silence with something I found less comfortable (i.e. small talk).&lt;br /&gt;&lt;br /&gt;"Yeah, me too," I reply.  Ooh, that's good.  I am such a people person.&lt;br /&gt;&lt;br /&gt;"Trick-or-treat is over", she says.&lt;br /&gt;&lt;br /&gt;"WTF?!", my internal monologue blurts.  I think in reality I made some kind of guttural noise and trailed off.  Like I said, people person.&lt;br /&gt;&lt;br /&gt;"Do you have any kids?", she politely, yet awkwardly inquires.&lt;br /&gt;&lt;br /&gt;"No", I say flatly, as I am not particularly interested in hearing about hers.&lt;br /&gt;&lt;br /&gt;She doesn't speak to me again until it is time to pay her.  So I am back watching her weirdo facial expressions.&lt;br /&gt;&lt;br /&gt;I begin to notice a familiar annoyance of eighties music, but I am not placing it right away.&lt;br /&gt;&lt;br /&gt;Oh, shit!  Not that!  It was "Hip to be Square" by Huey Lewis.&lt;br /&gt;&lt;br /&gt;My brain was being overrun with sound bytes from David Cross's bit on "Shut Up, You Fucking Baby" about marketing companies making up products we don't need.&lt;br /&gt;&lt;br /&gt;The example he gave was Squagels.  That's right, square bagels.  David's story had the Squagel commercials set to the Huey Lewis song.&lt;br /&gt;&lt;br /&gt;It was all I could do to keep from laughing out loud and making this weird interaction several times weirder.&lt;br /&gt;&lt;br /&gt;I manage to compose myself and weather the rest of this ordeal.  I pay. I leave.&lt;br /&gt;&lt;br /&gt;The next morning I get up for work, and during the part of my preparation ritual that involves doing something with my God forsaken hair, I realize "Yup, this sure is the shittiest haircut I have ever had."  She had butchered me.  It was way too short on top.  She cut my cowlick short, even though I told her to be careful of it.  She managed to blend my sides and the top so nicely, that I constantly look like I spent that last several hours wearing a fucking visor on my forehead.  Like, &lt;i&gt;low&lt;/i&gt; forehead.  I have a fucking line circling my head about an inch underneath my hairline.&lt;br /&gt;&lt;br /&gt;I think she was fucked up.  Oklahoma does have a lot of meth labs, you know.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109961242445723839?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109961242445723839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109961242445723839' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109961242445723839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109961242445723839'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/11/haircut-awkwardo.html' title='Haircut Awkwardo!'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109902369629914109</id><published>2004-10-28T21:21:00.000-07:00</published><updated>2004-10-31T08:16:56.510-08:00</updated><title type='text'>Threading in C#</title><content type='html'>I am hella excited. I am going to attend my first &lt;a href="http://www.okcpro.net/"&gt;Oklahoma City .NET Users Group&lt;/a&gt; meeting on Monday.&lt;br /&gt;&lt;br /&gt;Paul Ballard is going to be giving a talk on .NET multi-threading. My last project&lt;br /&gt;was severely multi-threaded, but that was C++/MFC so I thought I would write a small multi-threaded C# program to get a little bit of background.&lt;br /&gt;&lt;br /&gt;My last project involved reading data from piece of hardware. These values were floating point values that tended to bounce a bit. I have done very little C#, so I thought I would write a multi-threaded program that would simulate the variance in these values. I figured it would introduce me to random number generation as well as threading, and I am sure I will need random numbers at some point. I am not going to offer much commentary, but here is the code:&lt;br /&gt;&lt;br /&gt;&lt;font size=-1&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Threading;&lt;br /&gt;&lt;br /&gt;namespace CSThreads&lt;br /&gt;{&lt;br /&gt;  class Class1&lt;br /&gt;  {&lt;br /&gt;    // Flag to tell data provider&lt;br /&gt;    // thread how long to run&lt;br /&gt;    public static bool isRunning;&lt;br /&gt;&lt;br /&gt;    // The data point of interest&lt;br /&gt;    public static double dataPoint;&lt;br /&gt;&lt;br /&gt;    // Sync's access to the data &lt;br /&gt;    // point&lt;br /&gt;    public static Mutex myMutex;&lt;br /&gt;&lt;br /&gt;    [STAThread]&lt;br /&gt;    static void Main(string[] args)&lt;br /&gt;    {&lt;br /&gt;      // Set running flag&lt;br /&gt;      isRunning = true;&lt;br /&gt;&lt;br /&gt;      // Init Mutex&lt;br /&gt;      myMutex = new Mutex();&lt;br /&gt;&lt;br /&gt;      dataPoint = 100.0;&lt;br /&gt;&lt;br /&gt;      // Data providing thread&lt;br /&gt;      Thread myThread = new Thread(&lt;br /&gt;        new ThreadStart(&lt;br /&gt;          ThreadProc));&lt;br /&gt;&lt;br /&gt;      // Start the data providing&lt;br /&gt;      // thread&lt;br /&gt;      myThread.Start();&lt;br /&gt;&lt;br /&gt;      // Read data from other thread&lt;br /&gt;      for (int i = 0; i &lt; 20; ++i)&lt;br /&gt;      {&lt;br /&gt;        // Wait a bit&lt;br /&gt;        Thread.Sleep(500);&lt;br /&gt;&lt;br /&gt;        // Wait to access resource&lt;br /&gt;        // until it is safe&lt;br /&gt;        myMutex.WaitOne();&lt;br /&gt;&lt;br /&gt;        // Retrieve the value&lt;br /&gt;        // of interest&lt;br /&gt;        double currentValue&lt;br /&gt;          = dataPoint;&lt;br /&gt;&lt;br /&gt;        // Unlock resource&lt;br /&gt;        myMutex.ReleaseMutex();&lt;br /&gt;&lt;br /&gt;        // Give the output&lt;br /&gt;        Console.WriteLine("The value&lt;br /&gt;          of the data point is&lt;br /&gt;          {0}",&lt;br /&gt;          currentValue.ToString());&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      // Tell data providing thread&lt;br /&gt;      // to terminate&lt;br /&gt;      isRunning = false;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    static void ThreadProc()&lt;br /&gt;    {&lt;br /&gt;      // Use the number of the beast&lt;br /&gt;      // as the initial seed&lt;br /&gt;      int i = 43;&lt;br /&gt;&lt;br /&gt;      // Do until the other&lt;br /&gt;      // thread tells us not to&lt;br /&gt;      while (isRunning)&lt;br /&gt;      {&lt;br /&gt;        // Initialize Random object,&lt;br /&gt;        // increase seed for variety&lt;br /&gt;        Random r = new Random(i++);&lt;br /&gt;        // Wait to access resource&lt;br /&gt;        // until it is safe&lt;br /&gt;        myMutex.WaitOne();&lt;br /&gt;&lt;br /&gt;        // Generate a random number&lt;br /&gt;        // between 95.0 and 105.0&lt;br /&gt;        dataPoint = (double)r.Next(&lt;br /&gt;          -5000, 5000)/1000.0 &lt;br /&gt;          + 100.0;&lt;br /&gt;&lt;br /&gt;        // Unlock the resource&lt;br /&gt;        myMutex.ReleaseMutex();&lt;br /&gt;&lt;br /&gt;        // Wait a bit&lt;br /&gt;        Thread.Sleep(500);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/font&gt;&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/8462164-109902369629914109?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109902369629914109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109902369629914109' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109902369629914109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109902369629914109'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/threading-in-c.html' title='Threading in C#'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109901563932568646</id><published>2004-10-28T19:07:00.000-07:00</published><updated>2004-10-29T08:24:00.493-07:00</updated><title type='text'>Getting Started Blogging for Free</title><content type='html'>Hi, kids!&lt;br /&gt;&lt;br /&gt;For some strange reason, not all of my friends who have access to a thing called the Internet have blogs.  This post is an attempt to rectify this horrible travesty.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Blog Definition&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To begin, let's define what a blog is.  From whatis.com, a &lt;a href="http://searchwebservices.techtarget.com/sDefinition/0,,sid26_gci214616,00.html"&gt;blog&lt;/a&gt; is defined as:&lt;br /&gt;&lt;br /&gt;On the Internet, a blog (short for weblog) is a personal journal that is frequently updated and intended for general public consumption.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Blog Benefits&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have some things that I publicly want to rant about from time to time.  Well, blogging is great tool for such moments.  It is more socially acceptable than than accosting fellow passengers on public transportation with insane diatribes about asparagus or the Red Sox.  Plus, people don't have physical access to you to beat you up when they don't like your opinions.&lt;br /&gt;&lt;br /&gt;Blogging has also improved communication between my remote friends and me.  Most people have to answer some typical boilerplate type questions in a personal email.  Blogs will allow you to answer them only once.  It is a great way to keep friends and family up to date with what you are doing.  You can tell all your loved ones about last night's bender at the cock fights in one fell swoop.  That's the beauty of technology people!&lt;br /&gt;&lt;br /&gt;Blogging can help you professionally, even if your blog is a bit off color.  (i.e.  &lt;a href="http://www.neopoleon.com/"&gt;Rory Blyth&lt;/a&gt;)  Rory's blog has some great technical content, but he also writes about random personal experiences, weird dreams, world events, and whatever else.  Rumor has it his blog was very instrumental getting him his new job at &lt;a href="http://www.microsoft.com"&gt;Microsoft&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reading Blogs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here are some resources for getting started reading blogs:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.feedster.com"&gt;Feedster&lt;/a&gt; - A good search engine for RSS feeds, although the bastards haven't found me yet.&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.sharpreader.net/"&gt;SharpReader&lt;/a&gt; - A great, free RSS aggregator.&lt;br /&gt;&lt;br /&gt;(Siren noises) Acronym police!  I have used the acronym RSS a couple of times without defining it. RSS stands for Really Simple Syndication.  You subscribe to an RSS feed for a blog or website that you are interested in reading.  An RSS aggregator will give you automatic notifications when new content is available.  This is was cooler than manually checking a friend's blog for new content only to be disappointed because your friend is being a lazy blogger.  RSS also makes it monumentally easier to keep up with a large number of blogs.  You could be the next &lt;a href="http://radio.weblogs.com/0001011"&gt;Robert Scoble&lt;/a&gt;.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Writing Your Blog&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There are any number of places to get free blogs (if you don't believe me, Google &lt;a ref="http://www.google.com/search?hl=en&amp;q=free+blogs&amp;btnG=Google+Search"&gt;free blogs&lt;/a&gt;), but personally I use &lt;a href="http://www.blogger.com"&gt;Blogger&lt;/a&gt; (until I spring for my own domain so I can put up more types of media).&lt;br /&gt;&lt;br /&gt;But using a web form to enter information sucks.  So get &lt;a href="http://www.wbloggar.com/"&gt;w.bloggar&lt;/a&gt;, a free tool that makes it easier to update your blog.&lt;br /&gt;&lt;br /&gt;So get a blog, post a comment, and leave me a link.  Blogging, more popular than open marriages on &lt;a href="http://www.friendster.com"&gt;Friendster&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109901563932568646?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109901563932568646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109901563932568646' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109901563932568646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109901563932568646'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/getting-started-blogging-for-free.html' title='Getting Started Blogging for Free'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109892760743547994</id><published>2004-10-27T18:40:00.000-07:00</published><updated>2004-10-28T05:34:38.126-07:00</updated><title type='text'>Finished. - Tips for Young/New Software Developers</title><content type='html'>I finished my first project at work today.&lt;br /&gt;&lt;br /&gt;After almost two and half years, I locked the SourceSafe database.  After three distinct ulcers, after 154,806 lines of C++, I am finally finished.&lt;br /&gt;&lt;br /&gt;...and it feels &lt;i&gt;great&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;This was my first project right out of college.  The project started out with me working on it by myself for about a year and eventually growing into a five developer effort.&lt;br /&gt;&lt;br /&gt;I ended up:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Designing the majority of the architecture&lt;br /&gt;&lt;li&gt;Maintaining the project web pages&lt;br /&gt;&lt;li&gt;Serving as the SourceSafe administrator&lt;br /&gt;&lt;li&gt;Updating about 2/3 of the user documentation (and directing the updating of the other third)&lt;br /&gt;&lt;li&gt;Jointly developing the test strategy&lt;br /&gt;&lt;li&gt;Writing over half of the final code&lt;br /&gt;&lt;li&gt;Writing the installer&lt;br /&gt;&lt;li&gt;Doing the all graphics and a good chunk of the HTML for the help files&lt;br /&gt;&lt;li&gt;Writing a few other utilities along the way&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Needless to say, I learned a quantity scientists would call "a shitload".&lt;br /&gt;&lt;br /&gt;Here are some of the things I have learned:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;When you think you are being productive by copying and pasting code, you are setting yourself up for ulcers and carpal tunnel.  Stop what you are doing, and improve your design.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Most experienced software engineers will think this is a no-brainer.  But as a green optimistic developer, you think, "this code won't change, and I am not sure where a good spot would be for common code".  It will change.  It will change more than once.  You will pay the price.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;The resource editor in Visual Studio .NET 2002 is buggy and does not integrate well with Visual SourceSafe.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The applications in our project had large dialog-based user interfaces.  The static controls would randomly shrink and truncate the text they were supposed to display.  The menu ID's would randomly revert to the the numeric value rather than symbol defined in the resource.h file.&lt;br /&gt;&lt;br /&gt;The other developers and I had multiple instances of making a change to the .rc file only to be prompted to check it out when you went to save it.  When you checked it out, you had the two joyous options of either losing your changes or losing every change that occurred between the version in your working directory and the version you were about to check out.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;The MSI is a hassle to deal with.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I feel bad for the developers that wrote installers for earlier versions of windows.  I was shocked to find out how convoluted the installation process was after taking installers for granted as a user for so many years.  I think Microsoft is really getting it right with technologies like &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/clickonce.asp"&gt;ClickOnce&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tpcsdk10/lonestar/managed_ovw/tbconnotouchdeployment.asp"&gt;No Touch Deployment&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Consistently formatted code is more valuable than you think.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I read an article on this, and unfortunately I can't remember how I stumbled across it.  How I wish I could post a link...  Let me summarize, the author talked about an experiment where some psychologist or sociologist abandoned a car on the side of the freeway in a well populated area.  The car was not particularly nice, but didn't look like a total clunker either.  The car sat untouched for days.  They picked the car up, drove it to a comparable area, broke out a window, and watched.  The car was stripped within hours.  The same kind of thing can happen to your code.  We had several relatively simple, but poorly formatted sections of code that seemed to get buggier and buggier every time someone modified it.  If your code is poorly formatted, it looks like a careless mess no matter how elegant the semantics of the code are.  Psychologically, this will have an effect on your team members, and often times they will not be as careful when working with a piece of code like this.&lt;br /&gt;&lt;br /&gt;In hindsight, I would like to have had a beautifier that could take a coding standard definition and run on any checked out files as a pre-build step.  I think it would have saved me and the rest of the team many a headache.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;If you are planning on putting synchronous I/O in a user interface thread, think again.  If it still seems like a good idea, think about several more times.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The four applications in my team's project were serial I/O intensive.  You can often get away with limited file I/O in UI threads, but reconsider doing anything else.  In the earlier incarnates of the applications, they did the serial I/O in the UI thread.  This brought the UI to a crawl.  Like most new computer science graduates, I had done threading in school, found it difficult and intimidating, and the assignments I had been given in school did very little to indicate when a new thread was necessary.  As far as not putting I/O in a UI thread, I would think this would be pretty obvious to an experienced developer, but the configuration management tool the organization I contract for uses has major TCP/IP I/O (not to mention our Nazi anti-virus software aggressively scanning all data as it comes in) going on in its UI thread.  It starves the message pump for the UI from getting serviced and makes Windows think that the application is not responding.  I have heard many of my co-workers complain they can't check in or out multiple files without making the application lock up, when in fact, they just need to wait it out.  My other piece of advice would be to prefer asynchronous I/O to spawning a new thread for the I/O unless you can really justify it.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;If you are in a position were you have any management duties (whether you are paid like it or not), prefer written instructions and guidelines to verbal ones.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I think this had several benefits.  There were certain times when I would give verbal guidelines on particular tasks, and when the tasks were "completed", I often found my instructions were half-followed/not followed.  I was in a position where I knew what needed to be done and it seemed obvious to me, but it wasn't to other developers.  This brought me much frustration.  At times, I remember thinking, these other developers were going home at night and (they all had kids of various ages) it occurred to me that I bet they all had accused their kids at some point of not listening.  Initially, I wished I could tell their kids "Well, your dad doesn't listen at work, so it is probably genetic".  After the brief moment of internally venting, I realized that continuing to handle the other developers this way was not going to contribute to the success of our project, and ultimately would not reflect well on me.  After deciding to give more written instructions, it occurred to me that there were times when I probably overloaded them with information and expected them to just "get it" more often than I should have.&lt;br /&gt;&lt;br /&gt;On the other hand, I am still not convinced every time was my fault (in a way).  There were a few times were I thought a developer didn't follow my instructions to the "T" out of laziness.  Well, we all get lazy now and then, and after all, &lt;a href="http://www.wall.org/~larry/"&gt;Larry Wall&lt;/a&gt; said laziness is an important characteristic of a good developer (along with hubris and impatience).  Let me get tangental a bit and say I am not criticizing any other developer that I worked with.  I am merely stating that they are humans, and must be dealt with as such.  I consider myself very enthusiastic about software development, but my motivation is not a constant, although I like to think it consistently high.  But giving your developers written instructions allows them to refer back to the instructions, and it gives you traceability if you need to call a developer on not following instructions.  The written (or typed, or printed) word carries more weight than the spoken.  If your written instructions are in a informal format, add that you are available for clarification.  If your instructions are in a formal document, either make it clear that you are available for clarification, or if you have a small enough team, check in with your developers after they have had adequate time to digest the instructions and offer clarification then.  After all, we are all human, and we rarely get things right the first time.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Prefer to leverage existing tools to "rolling your own".&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;If a developer's tool might exist for a task you need to do, for God's sake, search high and low for it.  If one does exist, try like Hell to make it work even if it means tweaking the way you work a little bit.  Think about it.  If a tool has been sold to a fair number of developers and gotten halfway decent reviews, it is going to take you a long time to write a similar tool and get it to the level of stability as the existing tool.  In most cases, the time you spend configuring that tool to work in your environment will be miniscule compared to the time it will take you to write a tool that caters to your environment, especially when "scope creep" or changing requirements come into play.&lt;br /&gt;&lt;br /&gt;I had written fairly sizeable serial communication library that was absolutely worthless outside of our applications.  Then we found out that several of our users' managers had purchased laptops without serial ports and our code needed to accommodate users with USB to serial adapters.  &lt;a href="http://www.greenleafsoft.com/"&gt;Greenleaf&lt;/a&gt; to the rescue!  We hadn't really begun testing on other OSes at the time, but things I read later indicated that opening a serial port in an OS-agnostic way is non-trivial.  The greenleaf serial communication library made it one line of code.  Had we implemented code to deal with USB to serial adapters, it would have been all for naught.  Sure, we had to write wrappers around greenleaf to preserve the established interface, but that was not near as time-consuming or discouraging as the alternative would have been.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Understand any code your project is dependent upon as much as necessary.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;For this project, we used MFC because we needed to be able to write a native application that targeted everything from Windows 95A to Windows XP SP 2.  I have heard &lt;a href="http://weblogs.asp.net/cfranklin"&gt;Carl Franklin&lt;/a&gt; make the statement that he wouldn't use any code wizard/generator that produced code he didn't understand.  I dare to disagree, but Carl would be the first to admit that there is no development guideline that doesn't have an appropriate place to be broken.  I think it all depends upon the size and scope of your application, and maybe to a certain extent, the age and reputation of the tool in question.  Well, to understand the code that MFC generates in your application, you really have to read source for a good portion of the library.  We certainly got burned a few times in situations that Carl was talking about--where the generated code acts subtly different than how you think it does.  On the other hand, after getting more experience with MFC, we were able to assume more accurately and saved a significant amount of time by not reading MFC source to realize "hey, it does exactly what I thought it did".  I know people dis MFC a lot, but that is neither here nor there, and I still think it was the best choice of technologies for the project requirements, even if it did make deployment more complicated.&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I certainly admit this post is a bit scattered, and I am probably not saying anything new.  But if it helps one other developer, its existence is justified.  As far as being scattered, a young developer with such diverse responsibilities on his or her first project is going to learn important things on a wide variety of aspects of software development.  I am glad this post is that way.  &lt;i&gt;It is not all about the code, people.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Looking at all this stuff I learned from I screwed up, I feel like I need to have a post outlining what I did right on the project.&lt;br /&gt;&lt;br /&gt;Furthermore, I am not an expert on anything, so any comments offering valid counter-arguments are appreciated.  &lt;br /&gt;&lt;br /&gt;In closing, as &lt;a href="http://www.sellsbrothers.com/"&gt;Chris Sells&lt;/a&gt; would say, think deeply, code well.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109892760743547994?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109892760743547994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109892760743547994' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109892760743547994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109892760743547994'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/finished-tips-for-youngnew-software.html' title='Finished. - Tips for Young/New Software Developers'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109879807161764456</id><published>2004-10-26T06:41:00.000-07:00</published><updated>2004-10-26T06:44:16.183-07:00</updated><title type='text'>Unfocused Update</title><content type='html'>I have been trying to come up with some interesting tech kind of post, but it just hasn't happened yet.  But it has also been awhile since I posted, so I wanted to prove I am not lazy.  Oh, wait, I am lazy.&lt;br /&gt;&lt;br /&gt;I have been thinking about getting a new &lt;a href="http://www.engadget.com/entry/6729483382750249/"&gt;mobile phone&lt;/a&gt; like &lt;a href="http://radio.weblogs.com/0001011/2004/10/20.html#a8441"&gt;Scoble's&lt;/a&gt;.  I think my current contract is up because my provider just sent me some promo for a new phone and contract.  My current provider, &lt;a href="http://www.cingular.com"&gt;Cingular&lt;/a&gt;, doesn't seem to offer a single &lt;a href="http://www.pdabuyersguide.com/smartphone.htm"&gt;SmartPhone&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I have been trying to break my unconventional typing habits and become a true touch typist.  Being patronized by &lt;a href="http://www.broderbund.com/jump.jsp?itemID=297&amp;mainPID=297&amp;itemType=PRODUCT&amp;path=1%2C2%2C8%2C63&amp;iProductID=297"&gt;Mavis Beacon&lt;/a&gt; when you are already frustrated and feeling inadequate is enough to make you want commit suicide by headbutting your monitor repeatedly until the sparks fly.&lt;br /&gt;&lt;br /&gt;I have been getting more into the podcasting thing lately.  Oh yeah, maybe that will get my blog more hits.  &lt;a href="http://www.ipodder.org/whatIsPodcasting"&gt;Podcasting&lt;/a&gt;, &lt;a href="http://live.curry.com"&gt;podcasting&lt;/a&gt;, &lt;a href="http://radio.weblogs.com/0001014/categories/ipodder/"&gt;podcasting&lt;/a&gt;!  I am kind of shocked about all the naysaying about this technology.  Rory Blyth had an entertaining &lt;a href="http://neopoleon.com/blog/posts/8961.aspx"&gt;piece&lt;/a&gt; defending podcasting's worth.  My favorite part is the utter disregard for tact.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109879807161764456?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109879807161764456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109879807161764456' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109879807161764456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109879807161764456'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/unfocused-update.html' title='Unfocused Update'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109859152432646370</id><published>2004-10-23T21:18:00.000-07:00</published><updated>2004-10-23T21:18:44.326-07:00</updated><title type='text'>Brush with Greatness 2: Electric Bugaloo</title><content type='html'>On Friday I was hanging out in the dotnetrocks chat room on efnet as I often do during the live show.  The chatters were graced with the presence of &lt;a href="http://radio.weblogs.com/0001011/"&gt;Robert Scoble&lt;/a&gt;, Microsoft employee, the foremost authority on blogs, probably the world's most voracious blog reader (2200+), and from what I could tell, all around cool guy.  A lot of people were responding to everything he said, so he kind of had to choose who he wanted to respond to.  For a couple of minutes, that person was me.  I thought that was hella cool.  He told me story about urging Bill Gates to make a certain business decision about the future of Microsoft when he was in the process of getting hired.&lt;br /&gt;&lt;br /&gt;I felt pretty cool about getting to chat with him.  Then, my over-active analytical skills went to work and I began accusing myself of being a celebrity worshipper.  After a brief period of self-deprecation, I realized that he has direct conversations with Bill Gates, Bill Gates runs Microsoft, and Microsoft is a significant player in determining relevant aspects of modern and future society.  I am allowing myself to tard out over this a little.  It is not like I was getting excited about chatting with someone like Jay Lenno or Julia Roberts.  That would be pathetic...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109859152432646370?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109859152432646370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109859152432646370' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109859152432646370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109859152432646370'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/brush-with-greatness-2-electric.html' title='Brush with Greatness 2: Electric Bugaloo'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109841194499715136</id><published>2004-10-21T19:25:00.000-07:00</published><updated>2004-10-21T19:28:11.346-07:00</updated><title type='text'></title><content type='html'>Okay, I would like to rant about &lt;a href="http://www.bugzilla.org"&gt;bugzilla&lt;/a&gt; if i may.  Here is a tool that is a hella good defect tracking tool.  It seems like they strived (or is it stroved?) to a make a good, free, cross-platform bug tracking tool (All of which I am a fan of).  But then the email notification totally depends on sendmail being installed in /usr/lib.  Now sendmail is a mean, stupid, hard-headed animal.  That is why they call it "Nature's president".  If you get that reference, you are as big of a &lt;a href="http://www.mrshow.com/"&gt;Mr. Show&lt;/a&gt; junkie as me.  I have been cutting my teeth for the last few days trying to write a wrapper for &lt;a href="http://www.oberhumer.com/stefan/index.php?id=2251"&gt;sendmail for Lotus Notes&lt;/a&gt;.  I would blame my current failure to do this on inadequate documentation for ::CreateProcess.  CreateProcess takes LPCTSTR as a parameter for the command line to start this process.  I have a diagnostics log that prints my command line parameter.  I can paste that parameter from my log into a command line window and it works.  Yet everytime bugzilla calls my wrapper program, I get GetLastErrorer() == 3 --&gt; The path cannot be found.  Anyone that can solve this issue will either make me feel like a retard or win eternal cool points, or maybe both.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109841194499715136?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109841194499715136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109841194499715136' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109841194499715136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109841194499715136'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/okay-i-would-like-to-rant-about.html' title=''/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109840060537355230</id><published>2004-10-21T16:16:00.000-07:00</published><updated>2004-10-21T16:20:10.536-07:00</updated><title type='text'>Keystroke Shortcut Nerds Unite!</title><content type='html'>I don't know how many other people are in the same situation, but my workstation at work (and by workstation, I mean cubicle desk, keyboard tray, etc.) is a lot more comfortable using the keyboard than it is the mouse.  Lately, I have been feeling the pain of early or mild carpal tunnel syndrome in my right wrist.  This is particularly bad timing, because I am going through a lot of downtown at work waiting for other people to finish things.  In my downtime, I have been trying to learn more about technologies I don't know so much about: COM, .NET, C#, ASP.NET, RSS to name a few.  Since I am not made of money and company isn't going to buy books that may or may not be applicable to my next project, I have been reading technical documents on the web like a mad man.  When every move and click of the mouse hurts early in day and becomes excruciating in the afternoon, you start to realize there are some improvements that could be made to make web browsing more friendly to keyboard only users.  Here are some of the changes I would like to see:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;HTML expanded so that links on pages can have shortcut keys&lt;/b&gt; - Let's face it, navigating links with Tab and Shift+Tab sucks.  This could be a tough one.  There are two big issues:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Finding shortcut keys that won't collide with browser and OS shortcuts - My solution would be to use Like ALT+Windows KEY+letters and/or CTRL+Windows+letters.  The drawbacks are that this puts more burden on web developers, and the windows key isn't always present.   For Mac Users, it is never present, but hey, if you are Mac user, you always use the mouse anyway.  And my response to the windows key not always being present is "GET WITH THE TIMES".  Implementing this wouldn't be taking away functionality that the "windows-keyless" crowd has now, it would just be providing more functionality to those of us how have purchased a new keyboard since the Windows 95 era.&lt;br /&gt;&lt;li&gt;Providing feedback to the user notifying her of the shortcut keys for each link - From a formatting/aestethic point of view, I don't think this is something that should be displayed all the time next to each link in parenthesis or something.  Maybe pressing ALT+windows or CTRL+windows could pop up tooltips for each of the links that were visible in the client area.  Maybe even the browser could determine the shortcut key so HTML designers wouldn't have the burden.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Extended right click menu accessibility via keystrokes&lt;/b&gt; - I would like to have a shortcut key to access right click menus of icons in my system tray and quick start menu.&lt;br /&gt;&lt;li&gt;&lt;b&gt;Launching items from my quick start menu via keystrokes&lt;/b&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I am sure there are probably others, but my wrist hurts so I am stopping here.  If any of these features are available and I am just ignorant about them, feel free to lambaste/enlighten me.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;This post was created with no use of the mouse whatsoever.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109840060537355230?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109840060537355230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109840060537355230' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109840060537355230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109840060537355230'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/keystroke-shortcut-nerds-unite.html' title='Keystroke Shortcut Nerds Unite!'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109823840508706952</id><published>2004-10-19T19:13:00.000-07:00</published><updated>2004-10-19T19:13:25.086-07:00</updated><title type='text'></title><content type='html'>So work is officially under way on Charlie's and my "Top Double-Secret Hopefully Makes Us an Ass Load of Money" software project after discussing it for the past few days.  Not much done so far, just a list of &lt;a href="http://www.parlezuml.com/tutorials/usecase/index_files/frame.htm"&gt;use cases&lt;/a&gt; we'll need for the project.  I doubt the list is exhaustive, but it is a start.  And it is a little bit further than I have gotten than several other software project I have dreamt about over the past few years.  I am not going to give much detail about it, but when I random blurted out the need for this type of software, a &lt;a href="http://www.metroplaza.net"&gt;very smart guy&lt;/a&gt; commented, "That would be cool".  The smart guy in question tends to think more things are lame than cool, as do I, so I thought his semi-endorsement would good enough for a go ahead.  That and it is excuse for me to write some real C#, learn ASP.NET, and maybe learn some other things along the way that will make me revered by geeks everywhere.&lt;br /&gt;&lt;br /&gt;My homie Gus posted a great bit on his &lt;a href="http://www.metroplaza.net/blog/2004/10/where-did-my-alcohol-tolerance-go.html"&gt;blog&lt;/a&gt;, and I feel I have a mildly entertaining &lt;a href="http://www.metroplaza.net/blog/2004/10/where-did-my-alcohol-tolerance-go.html#comments"&gt;reply&lt;/a&gt; to.  It sucks getting older.  Gus needs to tell his helluva talented writer of a &lt;a href="http://www.platkat.com/"&gt;girlfriend&lt;/a&gt; to quit being a lazy blogger to write more because &lt;a href="http://www.livejournal.com/users/platkat/"&gt;her old stuff&lt;/a&gt; is hella entertaining.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109823840508706952?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109823840508706952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109823840508706952' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109823840508706952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109823840508706952'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/so-work-is-officially-under-way-on.html' title=''/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109803109741514016</id><published>2004-10-17T09:38:00.000-07:00</published><updated>2004-10-17T09:38:17.416-07:00</updated><title type='text'></title><content type='html'>I don't generally sleep well.  I am often bothered by dreams that are so  disturbing or nonsensical that I would be way too uncomfortable to share them.  But the other night, I had a dream that was entertaining and strange, but not so strange to earn me a spot on the government's super secret list of people to monitor because they are like bad and stuff.  So here it goes...&lt;br /&gt;&lt;br /&gt;While I am a moderately successful software engineer, my dream had me returning back to my high school job of concourse boy at the &lt;a href="http://www.66bowl.com/"&gt;bowling alley&lt;/a&gt;.  I was still the same age as I am now, so my opting to do this made little sense.  The bowlers had changed since my stint there during high school.  The bowlers were fatter, drunker, and angrier than I had remembered.  Even though it was not part of my responsibility when I had the job in real life, apparently now I had to deliver food from the snack bar the the fat, drunk, angry bowlers.  My first task was to deliver an eight foot long sub, which had been conveniently cut into two four foot sections, to a fat, drunk, angry bowler.  I had somehow gotten some of the condiments of the sub on my hand, and I felt that was too un-hygenic, despite the fact that the fat, drunk, angry bowler probably should not have expected much in the way of cleanliness when ordering food from a bowling alley.  I could find no napkins, no paper towels, nothing to get me out of my predicament.  Panic set in.  Suddenly, the owner's wife appeared.  She told me I had a phone call, and I could take it her office.  The sub magically disappeared from my hands.  This is typical in my dreams as I have no patience for a segue when my focus has shifted.  I pick up the phone and obviously the caller was &lt;a href="http://www.schwarzenegger.com/en/index.asp"&gt;Arnold Swarzenegger&lt;/a&gt;.  He asked me why I had given him a bad review on his performance as California's governor.  I was confused.  Then I seemed to remember that I had earlier read an article on &lt;a href="http://www.slashdot.org"&gt;slashdot&lt;/a&gt; the stated Arnold was personally calling people who gave him bad reviews on an online survey he had setup.  Slashdot had links to the survey, and I figured I would give him a bad review and see if he would call.  I mean, if it has been posted on slashdot, surely he could no longer personally deal with of the bad reviews.  So when he asks me, I completely froze up.  All I kind think about was all the time I had spent as a kid watching &lt;a href="http://www.imdb.com/title/tt0088944/"&gt;Commando&lt;/a&gt; with my mom.  I muttered out some half assed excuse about being very critical of all politicians and I was in a bad mood and I wasn't really even familiar with much of what he had done  as governor.  I am not sure where the dream went next.  I think I woke up soon.  My dreams don't ever really seem to climax, and apparently my blog posts don't either.&lt;br /&gt;&lt;br /&gt;&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/8462164-109803109741514016?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109803109741514016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109803109741514016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109803109741514016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109803109741514016'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/i-dont-generally-sleep-well.html' title=''/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109777235581080671</id><published>2004-10-14T09:45:00.000-07:00</published><updated>2004-10-16T15:18:19.700-07:00</updated><title type='text'>Brush with greatness</title><content type='html'>A Verl Cool Thing&amp;reg happened to me the other day.  I bought Bob Reselman's book &lt;a href="http://www.CodingSlave.com"&gt;Coding Slave&lt;/a&gt; from Amazon.  Initially, I tried to order from his site, but it did not accept Discover, and I had recently left my debt card/life line in an ATM that was kind of to destroy my card when I got distracted and forgot to retrieve it.  So I get to the select payment method and Discover is not an option, so I back out and order from Amazon.  A few days later, I got an email from Bob Reselman.  Here is our exchange in reverse chronological order.&lt;br /&gt;&lt;font size=-1&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;----------------------&lt;br /&gt;Cool!&lt;br /&gt;&lt;br /&gt;Maybe you can spread the word?&lt;br /&gt;&lt;br /&gt;Bob&lt;br /&gt;&lt;br /&gt;-----Original Message-----&lt;br /&gt;From: James Barnett [mailto:XXXXXXX@XXXXXX.XXX] &lt;br /&gt;Sent: Monday, October 11, 2004 12:29 PM&lt;br /&gt;To: Bob Reselman (Coding Slave)&lt;br /&gt;Subject: Re: Your Coding Slave Order&lt;br /&gt;&lt;br /&gt;Bob,&lt;br /&gt;&lt;br /&gt;I did not complete the transaction because &lt;br /&gt;your site did not accept Discover Card.  &lt;br /&gt;I purchased Coding Slave via amazon.com.&lt;br /&gt;I enjoyed it thoroughly.  Great&lt;br /&gt;work.&lt;br /&gt;&lt;br /&gt;James Barnett&lt;br /&gt;&lt;br /&gt;--- "Bob Reselman (Coding Slave)"&lt;br /&gt;&lt;XXX@XXXXXXXXXX.XXX&gt; wrote:&lt;br /&gt;&lt;br /&gt;&gt; Hi James:&lt;br /&gt;&gt; &lt;br /&gt;&gt;  &lt;br /&gt;&gt; &lt;br /&gt;&gt; I have an order here, in your name, &lt;br /&gt;&gt; dated 10/3/2004, for a copy of Coding&lt;br /&gt;&gt; Slave.&lt;br /&gt;&gt; &lt;br /&gt;&gt;  &lt;br /&gt;&gt; &lt;br /&gt;&gt; Yet, I do not find an associated &lt;br /&gt;&gt; payment for the order in my bank's &lt;br /&gt;&gt; credit card report.&lt;br /&gt;&gt; &lt;br /&gt;&gt;  &lt;br /&gt;&gt; &lt;br /&gt;&gt; Tell me please, do you have a  &lt;br /&gt;&gt; transaction receipt?&lt;br /&gt;&lt;br /&gt;&gt; &lt;br /&gt;&gt; If so, will you please give me &lt;br /&gt;&gt; the transaction number so that &lt;br /&gt;&gt; I may give my bank a good &lt;br /&gt;&gt; talking to?&lt;br /&gt;&gt;  &lt;br /&gt;&gt; &lt;br /&gt;&gt; Thanks,&lt;br /&gt;&gt; &lt;br /&gt;&gt; Bob&lt;br /&gt;&gt; &lt;br /&gt;&gt;&lt;br /&gt;&lt;br /&gt;---------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;Pretty cool, eh?  Well, it is for a dork like me.  I also had quip in the chatroom during the last .NET Rocks live show that Rory Blyth felt was worth repeating on the air.  That's pretty cool, too, except for the fact that there is now permanent evidence that I sometimes have nothing better to do than to listen to people talk about programming on a Friday night.  Yes, I am &lt;a href="http://www.rickymartin.com/"&gt;living la vida loca&lt;/a&gt;, something something, color Mocha, yada yada, wanna choke her, etc., etc,...&lt;br /&gt;&lt;br /&gt;I am doing the questions for the &lt;a href="http://neopoleon.com/blog/posts/8549.aspx"&gt;2004 Semi-Annual One-Time-Only Neopoleon.com "Get Your Grubby Little Hands On a Copy of VS.NET 2003 Special Edition" Contest&lt;/a&gt;.  The first one question was easy.  The second was marginally tedious, but I feel like I should have been able to guess the answer after reading some of Rory's blog &lt;a href="http://neopoleon.com/blog/posts/6368.aspx"&gt;posts&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109777235581080671?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109777235581080671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109777235581080671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109777235581080671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109777235581080671'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/brush-with-greatness.html' title='Brush with greatness'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109763203267850944</id><published>2004-10-12T18:35:00.000-07:00</published><updated>2004-10-12T18:47:12.676-07:00</updated><title type='text'>An update not worthy of a title</title><content type='html'>So, I got back from B's wedding yesterday.  His wedding was cool.  Although I generally abhor ceremonies of any type (I didn't even go to my own college graduation), I actually enjoyed everything except the hideous process of getting to the Hilton in Santa Rosa, CA from the comfort of my ghettoed-out, pseudo-leather couch in Crackerville, I mean Mustang, OK.  I got to see some good friends there, namely the brothers Thomas, aside from B.  The drive back to the airport was an adventure.  I had a crappy Cavalier that was the ever manly color I would call "late 70's sparkly motorcycle helmet blue".  Punching the gas in that piece of crap was less impressive than rolling up the windows in my &lt;a href="http://www.bmwusa.com/vehicles/3/325CiCoupe"&gt;BMW&lt;/a&gt;.  I also think I passed through a toll in one of those express lanes for people who have the special account.  But I didn't get arrested or miss my flight, so it was a small victory.&lt;br /&gt;&lt;br /&gt;Gus wrote and wished my a happy belated birthday.  Much appreciated.  He told me he started blogging, too, but didn't give me a link.  Expect a link here soon.  He's a good guy with interesting viewpoints on many things.&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/8462164-109763203267850944?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109763203267850944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109763203267850944' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109763203267850944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109763203267850944'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/update-not-worthy-of-title.html' title='An update not worthy of a title'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109723691143455561</id><published>2004-10-08T04:48:00.000-07:00</published><updated>2004-10-08T10:48:07.886-07:00</updated><title type='text'>Happy day of birth to me</title><content type='html'>Yesterday was my birthday.  Yippeee skipeee.  Here are some other things you might not know about October 7th:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;October 7th is &lt;a href="http://www.nami.org/Template.cfm?Section=Mental_Illness_Awareness_Week&amp;Template=/ContentManagement/ContentDisplay.cfm&amp;ContentID=16642"&gt;Bipolar Awareness Day&lt;/a&gt;&lt;br /&gt;&lt;li&gt;It is also &lt;a href="www.mentalhealthscreening.org/depression.htm"&gt;Depression Screening Day&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Possibly the most disturbing, is that it is also &lt;a href="http://www.mellencamp.com/index.htm"&gt;John Cougar Mellenhead&lt;/a&gt;'s birthday&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Gosh, with all of that going for October 7th, you think it would have been tough to have a crappy birthday.  I guess I am always up for a &lt;a href="http://www.homestarrunner.com/20x6vs1936.html"&gt;challenge&lt;/a&gt;.  Big ups to Susan for making my birthday a little brighter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109723691143455561?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109723691143455561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109723691143455561' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109723691143455561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109723691143455561'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/10/happy-day-of-birth-to-me.html' title='Happy day of birth to me'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109641345832944160</id><published>2004-09-28T15:49:00.000-07:00</published><updated>2004-10-08T05:19:53.746-07:00</updated><title type='text'>Feeble UIs and Antiquated Coding Standards</title><content type='html'>So I spent all day trying to find a replacement for &lt;a href="http://msdn.microsoft.com/vstudio/previous/ssafe/"&gt;SourceSafe&lt;/a&gt;, and it was not a pleasant experience.  I ran across an alternative called &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt;.  As I previously mentioned, I develop native windows applications using Visual C++ with MFC.  Obviously, my top priority was to find a technically superior alternative that integrated into the Visual Studio environment as well as SourceSafe.  The Visual Studio environment has gotten so much better since Visual Studio 6.  It is really a great development environment.  And while I am a recovering open source zealot, I have to admit Microsoft's interfaces are almost always superior to open source alternatives.  Hell, how can I not admit it when Eric S. Raymond &lt;a href="http://www.catb.org/~esr/writings/cups-horror.html"&gt;does&lt;/a&gt;?  Don't get me wrong, I still use and believe in several open source projects (&lt;a href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt;, &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt;, to name a few).  So basically, I needed an SCC plugin for Visual Studio that works with Subversion.  That led me to a couple of projects/applications:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://nidaros.homedns.org/subway/"&gt;Subway&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.pushok.com/soft_svn.php"&gt;SVN SCC proxy plug-in v.1.0&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Well, Subway is apparently an abandoned project.  I can't blame this on open source or bad UIs, but it was frustrating nonetheless.  I understand there is an NDA and all, but couldn't this guy have found someone to take over?  Actually, I would take this over and I have "signed" the NDA (well, I clicked OK.  Surely that is as legally binding as a blood oath).  He claimed it hosted itself.  I got nowhere with it.  It crashed hard and frequently, sort of like &lt;a href="http://downeyunlimited.com/"&gt;Robert Downey, Jr.&lt;/a&gt;  Obviously, this was not a viable option.&lt;br /&gt;&lt;br /&gt;So I tried SVNSCC.  It installed fine.  That was where the simplicity ended.  It ships with a utility to ease changing SCC providers, which is certainly necessary.  I launched that utility and nothing happened.  Well, I thought nothing happened, but later noticed there was a new goofy icon in my already overcrowded system tray.  Yes, the epitome of intuitive interfaces.  So I right-clicked on the icon and it showed the SCCs I had installed.  When I selected "PushOK SVN proxy", it told me I was unregistered or my trial time period was up (I am paraphrasing here).  WTF?!  I just installed the damn thing.  I clicked "Cancel" thinking there was a problem with the its timeframe computing function.  Weeeee, it crashed.  After much frustration, I thought I'd push the other button ("Register") to see if I got prompted for credit card info.  No, you have to go through some free registration stuff before you can it will work.  &lt;b&gt;&amp;ltSarcasm&amp;gt;&lt;/b&gt;Glad to know that up front.&lt;b&gt;&amp;lt/Sarcasm&amp;gt&lt;/b&gt;  So I finally get the software "working".  The interface left much to be desired.  The dialog asking for the information to retrieve the right repository used cryptic, Subversion specific terms.  I wanted something that will act as much like SourceSafe as possible.  So I fill out the information to the best of my ability, and right away, I see an issue.  Apparently, it doesn't work with Subversion repositories that contain only one project at the root.  At this point, I am all like "Fuck it.  I will write my own."&lt;br /&gt;&lt;br /&gt;After cutting my teeth for the majority of the day, I start browsing the Subversion developer info.  Here is an excerpt from the HACKING file:&lt;br /&gt;&lt;br /&gt;   *  Use only spaces for indenting code, never tabs.  Tab display&lt;br /&gt;      width is not standardized enough, and anyway it's easier to&lt;br /&gt;      manually adjust indentation that uses spaces.&lt;br /&gt;&lt;br /&gt;   *  Stay within 80 columns, the width of a minimal standard display&lt;br /&gt;      window.&lt;br /&gt;&lt;br /&gt;Tabs not standardized enough?  If there is someone out there who still codes with tabs set to eight spaces, they should be stabbed in the face repeatedly in front of their families.  Is there anyone out there blind enough that using four space tab looks left aligned to the previous block?  I know, you are probably thinking" Jim, you un-PC bastard!  There are probably some very talented, legally blind coders out there."  My point exactly.  If there are very talented, legally blind coders, or VTLBCs as I like to call them, they are using voice recognition software and don't give a wet fart if the next block is indented four or eight spaces.  And if you have a decent programmers editor like the Visual Studio editor or &lt;a href="http://www.idmcomp.com/products/index.html"&gt;UltraEdit&lt;/a&gt;, it is more work to reformat code that uses spaces rather than tabs.  I would guess that vi and emacs can be configured to have the same advantages.  And the 80 columns thing.  What year is this?  I didn't buy 21" monitors running at 1600x1200 to waste half my screen real estate so I could collabarate with some schmuck running text VGA mode or whatever.&lt;br /&gt;&lt;br /&gt;Then I tried AnkhSVN .NET Add-in.  While it didn't integrate with Visual Studio the way I hoped, it integrates well enough for me.  I was able to check in, check out, and check in multiple files within a few minutes of using it without reading any documentation.  This solution looks promising and I suggest it be explored for people looking to leave SourceSafe but still enjoy the rich IDE of Visual Studio .NET.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109641345832944160?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109641345832944160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109641345832944160' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109641345832944160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109641345832944160'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/09/feeble-uis-and-antiquated-coding.html' title='Feeble UIs and Antiquated Coding Standards'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109614160980432942</id><published>2004-09-25T12:32:00.000-07:00</published><updated>2004-09-25T12:46:49.803-07:00</updated><title type='text'>Officially Not the Laziest...</title><content type='html'>Mood:    Chill&lt;br /&gt;Music:   Carnival by &lt;a href="http://www.southern.com/southern/band/BURNA/"&gt;Burning Airlines&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Second post... that means I am not the laziest blogger in the world.  I am extremely proud.  I hung out at home and listened to DotNetRocks live for the first time.  They had a great &lt;a href="http://www.malevole.com/mv/misc/killerquiz/"&gt;link&lt;/a&gt; from the show. &lt;a href="http://www.friendster.com/user.php?uid=925660"&gt;Gus&lt;/a&gt; is in town and we are going bowling today.  &lt;a href="http://www.friendster.com/user.php?uid=1153803"&gt;I&lt;/a&gt; am not too popular on Friendster.  Probably because I have only logged on like 5 times and I never do anything.  Well, I am off to watch some of the Arizona game as I would like to see how ol' Mike Stoops is faring.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109614160980432942?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109614160980432942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109614160980432942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109614160980432942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109614160980432942'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/09/officially-not-laziest.html' title='Officially Not the Laziest...'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8462164.post-109606659825918307</id><published>2004-09-24T15:30:00.000-07:00</published><updated>2004-09-24T15:57:13.263-07:00</updated><title type='text'>In the Beginning,...</title><content type='html'>So I thought it was about time I get a blog.  I have all the characteristics of a good blogger.  I'm opinionated, passionate, apathetic, insecure, arrogant, eloquent, illiterate, and I under utilize spell check.  I have a bunch of rants that my friends are tired of hearing.  Well, most of my friends have moved away, but that is another story.&lt;br /&gt;&lt;br /&gt;I suppose I should give a little background about myself just any case someone is pathetic or enlightened enough to read this.  As of this writing, I am moving into my late 20's.  I am a software engineer.  I do contract work for a government agency.  It's a real h00t, let me tell you.  Actually, I like my job, but I have a co-worker that I hate every fiber of this individual's being.  From this point forward, this co-worker will be referred to as the antichrist, or AC for short, but try to not conjure up images of &lt;a href="http://www.mariolopez.net/"&gt;Slater&lt;/a&gt; as that would not be conducive to portraying the image I have in mind of this individual.&lt;br /&gt;&lt;br /&gt;For other coders out there, my current project is a conversion of seven DOS programs to four windows programs.  I have been working on this for two and half years and I am almost done finally.  I am using MFC because I thought it would be quicker since I hadn't done much windows programming when I got hired.  I have been listening to &lt;a href="http://www.franklins.net"&gt;DotNetRocks&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/dotnetrocks"&gt;(2)&lt;/a&gt; a lot lately, and think &lt;a href="http://http://www.neopoleon.com/blog/"&gt;Rory&lt;/a&gt;, and &lt;a href="http://weblogs.asp.net/cfranklin/"&gt;Carl&lt;/a&gt; have me brainwashed into thinking that native applications are going the way of the &lt;a href="http://www.amnh.org/exhibitions/expeditions/treasure_fossil/Treasures/Dodo/dodo.html?dinos"&gt;dodo&lt;/a&gt;, or &lt;a href="http://crystalpepsi.captainmike.org/"&gt;Crystal Pepsi&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I am also a big music fan.  I am currently listening to "Cool Rock Boy" by &lt;a href="http://www.julianahatfield.com/"&gt;Juliana Hatfield&lt;/a&gt;.  She's cooler than me.  Okay, my attention span is spent and my carpal tunnel is flaring up.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8462164-109606659825918307?l=jamesb43.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jamesb43.blogspot.com/feeds/109606659825918307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8462164&amp;postID=109606659825918307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109606659825918307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8462164/posts/default/109606659825918307'/><link rel='alternate' type='text/html' href='http://jamesb43.blogspot.com/2004/09/in-beginning.html' title='In the Beginning,...'/><author><name>Jim B</name><uri>http://www.blogger.com/profile/11985790335479506798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
