Gray Soft / Tags / Bloggingtag:graysoftinc.com,2014-03-20:/tags/Blogging2014-05-13T15:47:50ZJames Edward Gray IIProof of Lifetag:graysoftinc.com,2014-05-09:/posts/1162014-05-13T15:47:50ZHard evidence that this blog is coming back to life with new content and features.<p>As many of you noticed, and some of you regularly messaged me about, this blog has been offline for quite some time. There are many reasons for this: I was rewriting the software this blog runs on, the host that served it closed their doors, I had to take an extended break in working on it for multiple reasons, and, when I got back to it, my half-complete rewrite had enough bit rot that I decided to start fresh. The good news is that all of that mess has finally passed. As you can see, that means this blog is back is business.</p>
<p>If you are a long time reader and you have a good memory, you'll notice that I changed the name of my blog. That's because the old name was <a href="http://en.wikipedia.org/wiki/Fifty_Shades_of_Grey">a not-so-clever play on my name that was later appropriated for a rather different collection of writing</a>. I think that's worth resetting the Google credit counter to get away from.</p>
<p>Oh and there have been a few upgrades…</p>
<h4>New Content</h4>
<p>All of my posts are back. Some content is a bit dated and I've tried to add clarifying notes where they were needed, but I was pleasantly surprised to see that much of it is still useful today. I believe my coverage of <a href="/character-encodings/understanding-m17n-multilingualization">Character Encodings</a> is what readers missed the most and it's fully restored.</p>
<p>But wait, there's more!</p>
<p>For a time, I wrote a series of for-pay articles on how I think about programming in Ruby, called <a href="/rubies-in-the-rough">Rubies in the Rough</a>. All of that content, close to 400 printed pages, is now freely available on this blog. Enjoy.</p>
<p>I plan to add more new content in the future. However, it's probably worth mentioning that I've given myself permission to quit some projects that have been dragging me down.</p>
<p>With <a href="/higher-order-ruby">my series on Higher-Order Ruby</a> one post from done, I realized that I just didn't like it. In some places I had Rubyified the code so much it was no longer about functional principles. In others, I kept so much of the functional style that the code is tortured Ruby that I can't recommend. My understanding of what functional programming is just wasn't strong enough when I tried to write that series.</p>
<p>Similarly, I never finished <a href="/key-value-stores/using-key-value-stores-from-ruby">my coverage of Tokyo Cabinet and related tools</a>. I was building <a href="https://github.com/JEG2/oklahoma_mixer">a client library</a> for this database when it was pretty much end-of-lifed to make way for the newer <a href="http://fallabs.com/kyotocabinet/">Kyoto Cabinet</a>. This killed my motivation to finish the project.</p>
<p>You won't be seeing more of those projects. Sorry. I'm planning to launch all new projects so I can make all new mistakes.</p>
<h4>New Engine</h4>
<p>I've heard people I respect say that you should just choose some blog engine so you can focus on getting posts out. My extended absence surely proves the wisdom of such recommendations, but that's just not my style. I'm a programmer who enjoys tinkering.</p>
<p>This blog engine is my own build of the feature list I've found myself wishing for in a blog engine. I'm sure there are bits I'll need to fix up as we break it in, but I hope readers will find something to like in the additions. I'm already growing fond of syntax highlighted code, "click to copy" code blocks, and series navigation links. I'm not a big feed user, but, for those who are, they also have several upgrades.</p>
<p>Comments have changed a lot as well. I considered dumping them, but a read through showed that my blog seems to attract more signal than noise. There are some gems in these comments that I would miss. I did switch them to opt-in though, hiding them unless you click a link. This should allow you to choose whether you want to brave them. If you do partake, you'll see more upgrades: nesting, <a href="https://help.github.com/articles/github-flavored-markdown">GitHub Flavored Markdown</a> support, previews, plus highlight and reply quoting.</p>
<p>One small advantage us tinkers do get is that I now have a bunch of new code that might be worth talking about. I did some different things with this version of the software, like basing multiple features off of PostgreSQL-isms and caching content that gets displayed in various forms. You may just see some posts about these tricks down the road a bit.</p>
<p>Welcome back everyone.</p>James Edward Gray IIRubies in the Roughtag:graysoftinc.com,2012-01-13:/posts/942014-04-25T17:40:09ZI still write a lot of good articles about Ruby. Learn where you can find them.<p><em>[<strong>Update</strong>: the Rubies in the Rough articles were originally available by subscription, but they are now free <a href="/rubies-in-the-rough">on this blog</a>.]</em></p>
<p>I know this blog has been quiet for quite some time now, but I'm still writing about Ruby. In fact, I'm very excited about a new series of articles I am producing called <a href="/rubies-in-the-rough">Rubies in the Rough</a>.</p>
<p>In that series, I am working hard not to teach the language or syntax or anything else that's trivial, but the thought processes behind how I program Ruby. I think this is some of the most important work I've ever done for Ruby. Anyone can learn a few keywords, but understanding how to think about problems and the solutions we code for them is key, in my opinion.</p>
<p>This new series isn't free, but it is a steal. It works out to two bucks an article and I often write close to 20 printed pages. This is some serious content.</p>
<p>If you want to learn how I think about programming, do yourself a favor and subscribe to <a href="/rubies-in-the-rough">Rubies in the Rough</a>. It can teach you to see programming challenges as I see them and loan you my confidence as you solve them.</p>James Edward Gray IIBrowser CAPTCHAtag:graysoftinc.com,2008-12-03:/posts/712014-04-17T15:29:55ZSome details from my on going war against spam.<p>I'm sure everyone has noticed that my blog posting has dramatically fallen off from the rate I was getting articles out. Unfortunately, I've been spending my blog time fighting the endless war against spam. I've made some progress there and thought I would share some details that others might find useful.</p>
<p>As I've <a href="/about-this-blog/death-and-spam">covered previously</a> this blog now requires me to approve all comments. I'm super happy with this decision. I approve posts promptly, so there's pretty much no downside for users and this means you have not seen a single spam message on this site since I made the change. This was literally the perfect solution… on the viewer's side of the fence.</p>
<p>What it didn't fix was the hassle on my side. I don't mind approving messages at all, as long as I have a reasonable pile to go through. However, the spammers really ramped up their efforts against me lately and this blog received 11,134 comment posts in the month of November alone. Six of those were legitimate comments. That exceeds my definition of reasonable.</p>
<p>To fight back, I've added a new plugin to this blog I call Browser CAPTCHA.</p>
<p>If you've read this blog closely enough to know how much I hate CAPTCHA's, that name probably surprises you. It's true that I believe CAPTCHA's are pure evil. If you feel the need to control what makes it past the server and you think, "I'll screw up my interface to make a human prove they are a human," then I think you may have a problem with your brain being missing. I swear I always need three shots just to get past a Google CAPTCHA and that's the "Do No Evil" company. Whatever you do, don't get desperate and hit the hearing impaired CAPTCHA button, because that has to be the only thing worse than a normal CAPTCHA. I'm sure the suicide rates for people with vision impairments must be on the rise in this era of site security.</p>
<p>Browser CAPTCHA doesn't do any of that. Instead, I took a page out of Sun Tzu's <em>The Art of War</em> and got to know my enemy a bit better. Spam bots are not browsers and they do some things differently. If you can detect those differences, you know you are not dealing with a human. Thus my plugin screws up the interface <strong>for your browser</strong>. If it can pass the test, I trust the post.</p>
<p>What are some differences between browsers and spam bots? Here's a list shared with me from Allan Odgaard:</p>
<ul>
<li>Spam bots don't have a Javascript engine. This is the big deal. It seems universally true so it's definitely a key to detecting them. Force them into needing Javascript to pass some test and you've got them.</li>
<li>Spam bots don't typically pay attention to cookies. This turns out to be a handy performance detail, since you can use mod_rewrite to redirect incoming requests to certain URL's if they are missing a magic cookie before they even reach your application.</li>
<li>Spam bots don't correctly handle redirects for POST requests. You can use this to add another layer of protection.</li>
</ul><p>The current version of Browser CAPTCHA uses these combined factors to test browsers when they try to post a comment. There are <a href="http://nedbatchelder.com/text/stopbots.html">other differences my friends have made me aware of</a>, but I haven't employed them yet.</p>
<p>How's this working out? I've had seven spam posts since I made the change a little over two full days ago. They all came in together and I could tell it was a human investigating the changes I had made. If that's the worst thing I have to worry about now, it's a huge improvement. We will see how things go, but I definitely recommend similar strategies to others fighting in the war…</p>James Edward Gray IIDeath and Spamtag:graysoftinc.com,2008-03-18:/posts/482014-04-10T20:42:54ZThe things you can definitely count on in this life.<p>The popular expression warns us that death and taxes are the only two certainties, but I'm worried we may need to add spam to the list. Publish any material that draws readership on the Web and invites reader feedback and you can be certain sure you will be swimming in spam soon enough.</p>
<p>One of the biggest reasons I switched to my own blogging engine was to fine tune my spam control strategy. Until today, the system was that I received an email anytime a comment was posted to this blog and it was a single keystroke to remove any offensive content. While that was as simple as I can think to make a process, the fact was that it still wasn't good enough.</p>
<p>The spammers ramped up their efforts until I was facing about 50 useless posts every 12 hours. While I didn't mind clearing them, the fact was that visitors were probably seeing spam due to the regularity of the postings and the time between the post and my clearing it. Obviously, there was at least spam on the blog while I slept each night.</p>
<p>Call me old fashioned, but I don't believe you should run into spam while reading a programming blog. I think you should be able to enjoy the on-topic content and post here in peace. I also don't believe in security systems that hassle posters, like a CAPTCHA.</p>
<p>Given that, I've decided to turn the tables on the spammers. All comments are now held for my approval before they are posted. While I do regret the loss of immediacy, the truth is that your comment will typically be live in a matter of hours and we don't really need anything faster than that here. If we can come to accept that small concession, we gain a perfect spam filter and neither you or I have to worry about what you will see here anymore. I feel it's worth the trade.</p>James Edward Gray IIFinding Serenitytag:graysoftinc.com,2007-08-23:/posts/372014-04-05T14:33:06ZSome notes about the first rewrite to the engine that runs this blog.<p><em>[<strong>Update</strong>: This blog no longer runs on Serenity. I've created yet another engine to power it.]</em></p>
<p>I'll be nice and not name any names, but my old blog software was really struggling. I've dealt with numerous issues from it over the years I've run this blog and all of that extra maintenance finally wore me down.</p>
<p>I'm sure you've noticed the theme change here by now. That's the surface result of me having replaced the entire backend. This blog now runs on a blogging engine I invented called Serenity. It's a young engine at this point, but I suspect it will improve as I fiddle with it and find what I like.</p>
<p>I've moved all of the content over, so my hope is that nothing is missing. Unfortunately there have been some URL changes. I apologize for that and promise that I don't plan to change them again anytime in the near future.</p>
<p>Thanks for being patient with me during this transition. I hope that it will lighten my maintenance load and give me more time to write articles.</p>James Edward Gray II