The Games of the Future?

In order to jump start posting more often I’m going to deviate slightly from my technical articles and ramble a bit to get back into the blogging mood. Please bare with me, the next article I write should be back on track.

A sore yet fond subject of my past is video games. Like so many people my age, my past is filled with countless hours of playing video games. Honestly, I remember the happiness and sense of accomplishment I felt from playing games and I have actually built lasting friendships with people I knew only though online personas. However, I stopped “playing games” sometime around 2005, and I’ve since frowned on the subject.

I look back on my gaming history with some resentment because at some point I concluded that I was wasting time. Time that I could spend learning, earning, growing, and doing something of importance. Whatever triggered this I don’t really know. While being “game free” I’ve noticed some things that have disturbed me.

There is a LOT of game playing going on. Not all gameplay is bothers me. Everyone needs some entertainment and games happen naturally in social activities. I mean excessive gameplay. I can’t even completely describe exactly what qualifies as matching this description.

I decided to look at myself to see if my time spent without games has had a positive affect on me. I’m a little biased but I think that things have turned out well for me. Sparing you the details I feel I have a successful challenging job where I feel I can make some kind of impact on the world. Cheesy I know.

But, looking deeper I noticed that my time “without games” was in fact not game-less. Where before I spent time playing games with seemingly no positive impact on my future, I was applying some of the same concepts (experience, points, etc) improving myself. I know you didn’t come here to listen to me talk about myself, so how can I turn this into something constructive? While I was thinking about this I recently came across two presentations that describing a potential future of video games.

Briefly, the idea that appealed to me was that games could be used to improve lives positively. There is an obviously subjective angle to what is considered life improving, but in general there are plenty of things that can be agreed on. Improvements to your health (exercise), being part of a bigger picture (saving energy and gas), and the ability to motivate yourself and do a good job. These are not your traditional video games, but it is taking the addictive desirable qualities of video games and applying those to real life aspects, and that is what appeals to me.

An example that stood out to me was some recent hybrid cars. These new cars give the driver live, accurate feedback about how efficiently they are driving their car. This extra information gives the driver an incentive to improve their driving. Be it to improve milage, save gas, prolong the life of their vehicle, or whatever. The ambition to be the best or be very good, crucial to many areas and notable in video games, is being used for good.

I am seeing this more and more and I’m liking what I see. I really hope that more and more people recognize these concepts and use them for the right reasons. I really hope that the idea of positive activities being games takes off.

The two videos I saw were Jesse Schell “When games invade real live” and Jane Mcgonigal “Gaming can make a better world”. In fact, this page lists 5 videos including both of these meaning the others are likely pretty good too.

Too Many Unproductive Comments

It seems as though there is an epidemic across the web. Bad comments. Not spam, not flames, not even rude remarks… just plain drivel. I spent the last few weeks reading all the comments (or as many as I could stand) on the hundreds of blog articles I read every week. They fall into two major categories, which I’ll discuss below.

I’ve linked to this in the past but I’ve really taken it to heart: Your Shit Does Stink — Good Friends Are Hard to Find.

What the gentlemen at Less Everything were saying has just continually amplified in my mind over these last few (dare I say “trying”) weeks. Their article is short, and worth the jump, but to put it in context:

It’s easier to just smile and nod and say, “that’s great,” and that’s what most of us do. But a true friend will tell you to polish it up or go make changes or start again.

The same applies to comments on a blog post. The idea is to inspire discussion, clarify points, etc. eventually enriching the value of the article itself. Instead, in a number of sites I’m seeing “fluff” comments, which just make the entire experience of reading comments a downright drag when I’m actually interested in the content. So, I counted…

I took a well written article with over 100 comments and counted more then 50% of the comments were of this “fluff” nature. Although not directly from the article where I calculated my statistics, I pulled this paragon of an example:

Useless Comment

I made little effort to hide the identity of the user and the website (which I have the highest respect for). The fact of the matter is that this comment is not only worthless, it pollutes the pot of potentially worthy comments and thus detracts from the value of the article itself. In this particular example the commenter actually admits to not reading the article but then claims he knows it will be awesome?!?! Give me a break. Hell, if I was the author of the article I would be upset at such an ignominious comment (yah, I looked that one up).

I’ve gone years on this blog without making a rant. This is my first. So, admittedly, I did not hold back. However, eventually I calmed down and tried to really think about this “problem.”

From the author’s perspective this simple “praise” is uplifting. For those offering the praise its quite simply that… many want to portray honest thanks and support to the author. This is all well and good. However, there are still many reading the article intending to engage in discussion. Undoubtably the author should both encourage and look forward to this kind of discussion; even more so then the praise!! Why? Because its in our nature. We write so that others can read. We enable comments so others can tell us what they think. If we didn’t care for other’s opinions or views then comments could just as easily be disabled.

So, essentially there are two categories of comments, Praise and Discussion. So, I think that this should become a model. The more recent up/down voting scheme is not the model to use for most blog articles. It works well on ranking sites like StackOverflow and Reddit where correctness or opinion influences the votes. However in this case there is:

  • Praise – essentially always an “up-vote.”

  • Discussion – a level playing field likely to contain constructive criticism as well as support for the article.

Both avenues should be available so that the author and all the commenters have the freedom to interact with whichever degree they feel is appropriate. In the end the discussion is separated from the “fluff” and everyone wins.

I’m thinking of the current system of WordPress with comments and trackbacks/pings. They are handled separately, but that is because fundamentally they are different. To make a system like I’ve suggested work would either require user action, moderation, or a (likely) sophisticated action. Two of those don’t scale and the last is probably too complex to be reliable. If I’ve learned anything from StackOverflow its that they have actively crafted and trained their community of users to “do good” and do all of this low level work willingly and it has paid off very well.

For starters “commenters” must at least be given the choice: to contribute to a discussion, or to thank the author for a well written article. I don’t intend on building this system yet, because I personally don’t have the influence or the popularity to make an impact. Yet.

Just keep this in mind the next time you comment. Actually try to “add value.” To rip off the Army… The whole world can read what you’re writing. Is it worth reading?

Cheers?

My Mac Workflow – “How I Work”

I’ve seen a number of articles recently where people talk about their programming setups. Whenever people blog about their setups it always opens my eyes to some neat tips and tricks that end up improving my own workflow. So, I decided I’d post what I do. Hopefully that will give some people some ideas. Maybe I may even get some feedback on how I could improve things. For reference, this article was published in March 2009.

Ubiquitous Tools

These tools are typically Preference Panes or Menubar applications that I always have running. I asked myself if I could remove any of them and I thought… no, I don’t think I can.

QuickSilver

I have QuickSilver open 100% of the time I use my mac. If QuickSilver ever crashes I will drop what I’m doing and use SpotLight to reopen it. I occasionally use ⌘+Tab to switch between applications. However, typically I will use a custom global keyboard shortcut I have made to launch a particular application, or make use of the heavily weighted key combinations I’ve built up to open commonly used applications. I even use QuickSilver to browse though my hard drive for files!

QuickSilver with the HUD Theme

Key Settings for my QuickSilver are:

  • BezelHUD Theme
  • ⌃+Space Activation

  • ⌃⌥⌘N => Launch TextMate (therefore brings to the front if open)

  • ⌥⌘T => Launch Terminal (therefore brings to front if open)

  • ⇧⌘D => Launch Dictionary (therefore brings to front if open)

  • “w” => WebKit, “saf” => Safari, “m” = Mail, “i” = iTunes, “ff” = Firefox

  • Added Indexing Important Directories. This is important for School files, etc.

TextExpander

I’ve attested to the awesomeness of TextExpander in the past. It truly is remarkably useful and someone telling you how useful it is just never seems to be enough. You have to experience it. You also have to take control and make it really be an extension of yourself. Which I recently did.

I added a number of generic commands so that I can type ⇧⌘⌥⌃⌫⌦⌅⎋⏎♥ and more with exceptional ease. This has not only made me very happy that I didn’t have to search through the special character, but it also makes my messages to other mac users much more expressive and accurate. “cmd+alt+S” is hard to read. ⌘⇧S is not. End of the story. I have hundreds of other uses for this little gem but I won’t bore you with the details.

TextExpander

There are two things that I find with TextExpander. I never correct my spelling errors, because the words I find myself misspelling so often are auto-corrected!!! So I never learn… its now easier to type the typo! But seriously TextExpander isn’t have 100% perfect for expanding when you want it to. That can be customized and I’ll be trying these customizations soon.

GrabUp

The ability to take a picture of anything I can see on my computer, have it automatically uploaded to the web and a direct URL be put in my clipboard is so undeniably awesome that I can’t even mention this application without smiling. I struggled with this exact concept for years on Window, created such elaborate hot-key schemes to get it done. With GrabUp, its just the usual ⇧⌘4. I can’t recommend this enough.

GrabUp

Caffine

I’m a heavy laptop user. I have my settings set so that my laptop will dim quite quickly if it gets no user input. Sometimes, like watching videos or reading PDFs or long blog posts, I don’t want it to dim. A simple click on the menu bar icon and I know my Mac will be dim-free for as long as I want it.

Caffine

I mention this application because it truly is part of my workflow. It has its place, and I wouldn’t get rid of it. It gives me a super simple switch that I can “flip” on or off when I want to maximize my power usage, or when I don’t. That is important to me.

Spaces and Hot Corners

I’m spoiled. I exploit the crap out of Spaces to keep myself organized. I currently use 6 spaces, 3 for business, 3 for personal. Applications like Mail, iTunes, iCal, Adium are all tied to particular Spaces so I can find them without blinking. It is my favorite feature of Mac OS X Leopard.

Spaces

Secondly I make use of Hot Corners for Spaces, Expose, Dashboard, and Show Desktop. I make use of all four corners of my screen. Every corner has a purpose and every corner gets heavy usage. I also have a few shortcuts on my mouse for Spaces and Expose, but more then 90% of their usage is triggered by a wicked fast flick of the cursor to a corner. I’m told people are intimidated by it.

Development

TextMate

I’m a huge TextMate fan. Its my editor of choice. I’m not one of those people who wants to force you to change to “my editor.” I’ve learned that its just better to encourage people to choose an editor they like and put forth the effort to customize and enhance it for themselves. TextMate gives me plenty of room to write my own commands, add features, and make customizations to that make me look like a wizard doing any task.

TextMate

Shown above, what stole my heart with Textmate was that it could correctly syntax highlight php, javascript, css, and html all in the same file according to their respective languages, and it looked amazing doing it!! My jaw dropped, my neurons fired, and I’ve never looked back.

It normally goes without mentioning, but this is the “how I work” blog post so I should mention it. Learn the hot-keys and shortcuts for every application. Invent your own hot-keys. Customize, customize, customize. Find out what you do over and over, and automate it. Figure out what bothers you and fix it. 20 minutes spent customizing an application or learning its features can save you hours and hours in the long run. When you finally dedicate yourself to using an application, especially an editor, customize your environment!

Terminal

I always have a terminal open. Normally more then one, with different kinds of shells (bash, ruby, and javascript). Like I’ve mentioned before I have invested some time into making customizations that help make my terminal more comfortable.

terminal

Above are just some of my aliases, but my really good aliases are my single character ones. Click on the image above to check out my GitHub repository for my dotfiles (.bashrc, .bash_profile, .irb_rc, etc). I keep this updated frequently as I find more and more tricks to my liking.

As always here is a link to a site showcasing the scripts I’ve written that I use all the time. I call it my ~/bin. Its all free, so take a peek and dig in.

ExpanDrive

The most recent addition to my must have toolkit is ExpanDrive. I was fortunate enough to get this application while it was discounted and I’m really glad I did! I’m almost always connected to this web server (bogojoker) and my college account!

expandrive

With ExpanDrive and TextMate I can edit the live files on my webserver. Or seamlessly copy files from my local hard drive to my webserver in the terminal using a `cp` command. It just makes sense! I even hacked together a script that knows when I’m in an ExpanDrive directory and properly opens the file in a browser.

I try to tell other people that connecting to my web server is as though I just plugged in an external hard drive. I don’t think they believe me… but its true. I lied. Its easier.

Flow and Cyberduck SFTP

When I have larger SFTP requirements it helps to have a dedicated client. The two that I use are either Flow or Cyberduck.

flow

Nothing really special to say here. Actually I’ve had some rough luck with Flow lately and I’ve had to swing back to trusty old Cyberduck occasionally.

Some Go Without Saying

Really, what Mac User doesn’t use Adium and Growl? Its 2009…

Hot Keys. Seriously, learn them.

Sure, I ranted about it up above, but I’m sure a few people didn’t get it yet. Learn shortcut keys. Its irresponsible of you not to. I’ll run over the ones you should be comfortable with. Not the dull ones but the ones that probably confused you years ago when you first saw them. Read them, slowly put your fingers on the keys so you realize what the keys actually are (not what you read on this page but what you feel on the keyboard) and most of all start using them:

  • ⇧⌘] and ⇧⌘[ => Move between tabs. Safari, Adium, Terminal, …

  • ⌘] and ⌘[ => Indent and un-indent text. Mail, Text editors, Development editors, …

  • ⌥⌘T => Special Characters. Pretty much always, unless you’ve overloaded this (like me).

  • ⌘P => If you can Print, then you can save as PDF or save to Web Receipts folder. Good!

  • ⌘, => Open Preferences. Made you do it! Now set start customizing other apps!

Now I’ll walk through how I use some of the other everyday apps.

WebKit and Safari 4

I use the WebKit nightly. I personally find developing with the most bleeding edge features of HTML/CSS exciting. The Web Inspector is so cool that is even inspired me to download the Web Kit source and start contributing (more later). It keeps me on top of the changes and issues affecting the entire web development world.

Aside from the developer aspects, there is no doubt that WebKit/Safari is the primary web browser for Mac Users. So I’m not going to bore you with what has already been said, but try to explain my browser work flow. Its essential to be able to open Webkit, make a google search and display the results in a new tab in under a second. Why? Because I do it a hundred times a day. So here goes some of the Safari specific strokes:

  • ⌘L => Select/Goto the URL bar (the location bar). Essential for copying URLs.

  • ⌥⌘F => Select/Goto the Google Quick Search. Essential for quick google searches.

  • ⇧⌘⏎ => When in the Google Quick Search this runs the search and opens in a new tab.

  • ⌥⌘I => Open the Web Inspector.

  • ⌥⌘C => Open the Web Inspector Console.

  • Right Click → Inspect Element => Open the Web Inspector on that Element

  • ⌘ + Click link => Open in a New Tab in the background

  • ⇧⌘ + Click link => Open in a New Tab in the foreground

  • => Previous Page. Like Back one in History.

  • Drag and Drop file from the hard drive onto a file upload => Sets the file upload to that file!

Again, the problem with seeing these in bulk like this is that they don’t sink in unless you actually try them with your fingers. Muscle memory is way more powerful then visual memory (I have no evidence to back this up other then my own evaluations). Don’t get intimidated, just go character by character, press them on the keyboard, and you’ll actually start remembering and wanting to use them!

I still test in Firefox and most of the above work in Firefox as well.

NetNewsWire

There are a few alternatives for free Mac OS X feed readers. I’m a big App guy so websites like Google Reader just didn’t cut it for me. My favorite design wise, NewsFire, just didn’t cut have the proper user interface and keyboard shortcuts. I’ve been very happy with NetNewsWire for years. It has all of the features I need a nice free package.

netnewswire

I have tons of feeds. I wouldn’t recommend so many feeds for most people. But if you do decide to use NetNewsWire, learn how to use the arrow keys and space bar to traverse everything with unbelievable simplicity!

Entertainment

I almost always have music playing, and recently I’ve felt the need for a little variety. So I use iTunes and Last.fm’s player. I was also lucky and got SRS iWow, which is a really awesome improvement to iTunes normal sound output, even on my laptop. Finally, I use Twitterrific for my Twitter needs.

Ahhhh, Finally! In Closing

So, its taken me months to write this article, and its nowhere near the quality I had hoped it would be. But I’m too exhausted to entirely proofread this to the extent I normally do. I just hope that this article will inspire some of you readers to look at the apps that you use, and learn a new keyboard shortcut, or make an effort to tweak some settings that may have bothered them but they were too lazy to look into.

Cheers.

My Perl and Ruby Story

I’m not old enough to have grown attached to Perl. When I learned Perl people were already looking at Ruby and Python and proclaiming glorious victories. At that same time I saw people gripping Perl, not willing to leave their witty, terse confidant for those prettier, risky “New Kids on the Block.” I had dabbled with PHP and wanted more power. Perl was the natural choice. Previous experience, I thought, told me that I wanted a programming language where symbols, not words, held power. I quickly saw that in Perl. There were scripts nearly 50% symbols performing enticing feats with less characters then a Java Hello World program. So I took a look at Perl.

Summer Dreams Ripped at the Seams

As is the case with most Perl programmers I felt right at home. Perl has a tendency to do whatever you, the programmer, want’s it to do. “Do you want to suddenly make this variable in the middle of an if statement’s condition? Sure, why not, you’re the boss!” I instantly fell in love with its regular expression support. Learning to exploit the s/// statement alone has probably had far more impact on my entire programming career then any college course I’ve taken. The idea of a default variable was a poison I was happy to swallow. It just made so much sense.

# A Perl Script I wrote... Usage is not important
while (<>) {
   print "n$1: $2n" if /(.*?)s*w+ d+, (d+:d+)s*$/;
   print if ! /s*d+:d+s*$/;
}

My interest in Perl stopped when I saw its Object Oriented behavior. However, by that time I was far more interested in its scripting power. I took a very close look at Perl’s syntax and grammar. I knew every optional space… every optional semicolon… how to reduce an entire program to a single line and then reduce it further and further with dirty tricks. I ate up as many of Perl’s special variables as I could, spitting them out into my scripts. Why write “n” when $/ is two less characters… Essentially I learned to “Perl Golf.” It is the art of dwindling a simple script program down to as few characters as possible. This “black magic” side of Perl that got criticized by so many was a dangerous, but fun, sandbox that I spent my time in. Then, it all stopped.

$_=chr 123*rand,/[da-z]/i?$a.=$_:redo for 1..pop;print$a,$/

Normally, whenever I had a few weeks I would spend them learning a new programming language for fun. When I learned Perl I had three weeks off from school before I was to start my first Co-op. Time flew and my “fling” with Perl had to end. Little did I know that Perl left a rash on me that needed to be scratched. This disease made other programming languages look disgusting. Why is it so hard to parse files in Java, why is there no built-in regular expressions support in C++, what is wrong with these languages?!

A New Direction

Time went on. I was given another two weeks. Around that time I had made a decision that I would invest my personal time into web development. I spent hours and hours reading, learning, experimenting, grasping, producing, and all that jazz. It was reaching the end of those two weeks and one thing had been continually pounded into my head… Ruby on Rails was going to be big. I was young, I wanted in! With little time left in those two weeks I figured my time would be best spent focusing on Ruby and investing in Rails when I got more time. I honestly haven’t gotten around to learning Rails yet because I was so enamored with Ruby.

Learning Ruby was initially painful. I’ll admit it. I took a pass at it and was disgusted. To be honest, I can’t remember what was so painful. For one, I was intimidated by its block structure. Being as immature as I was, it felt too verbose… like a sore thumb in the language. But what the hell did I know? I still gave it a shot.

Why's Poignant Guide To Ruby

This book had a greater impact on me then just teaching me Ruby. It reaffirmed what I had seen from all over the web. Ruby users had a sense of humor, they tended toward creative expressiveness instead of technical explicitness, they invested in fun, they were not satisfied with the mundane. Also, the idea that a tutorial could be a story changed the way I thought about teaching in general. I made it far enough to drop my misapprehensions about Ruby’s syntax and embrace something Ruby did well at, Objects.

Perl Replacement

The more I used Ruby the more I realized that I wouldn’t need Perl. All my special variables were there. Replacing s/// with gsub was painful, but undeniably cleaner. I had matured slightly as a programmer and saw the need for code clarity and I now enjoyed Ruby’s block structure. When I challenged myself to create a simple Object Oriented program I saw how Ruby’s classes removed a lot of the repetition I normally put into Java classes. I was pleased.

I have to mention irb, Ruby’s interactive interpreter. This tool has proven invaluable to me. I almost always have an irb prompt open at all times. It is my calculator, my hacking companion, my playground, a debugger, and a friend. Perl lacks such an environment. I’ve had to really work to get the perlconsole working and Perl’s debug REPL just isn’t nearly the same. I’ve been able to expand and customize irb into an indispensable tool that can help me on any project. I think thats important, because with my Generation-X attention span, being able to copy.paste.sort.filter.reorder any text at a moments notice is “clutch.”

irb

Finally I was impressed with ruby gems. Need an html/xml parsing library and you’re unhappy with Ruby’s? Fine, `gem install hpricot`. Its so easy to download a new library, or even a new tool like `gem install cheat`. I liked the idea of distributing ruby scripts via gems that I even made my script a ruby gem (regex_replace). That way I can quickly download/install on any machine that I need it. The ability to build off of existing Ruby libraries is exciting.

The Beginning

As clichéd as that sounds, I feel like it can only get better. I’ve gotten comfortable enough with Ruby that I now write all my day-to-day scripts in it. I’m truly glad that I learned Perl, because it introduced me to the scripting world, and it is a unix staple. But, like so many others, it seems like there is a brighter path. I think thats more then enough for today.

Cheers.

~/bin – Tilde Bin

So I wanted to do a little something over break. I had no idea what I would do, until I came across this article taking a look at the blueprint css framework. I had heard plenty of talk about this css framework, and other grid frameworks, and decided to give it a shot.

So I had something new I wanted to work with, what was the site actually going to be? I gave it a few minutes thought and ended up with an idea that satisfied my semi-recent Internet philosophy:

When I have something worth spreading I should write it on my blog or turn it into a webpage. This way when people ask me about it, or if I need to present the information to someone, I can just point them to that single source. This saves me from having to type and retype the same information over and over for different people. A single “master” source with the most up to date information is always optimal.

With that in mind, I decided to whip up a simple site to showcase the scripts that are in my “tilde bin” folder. Scripts that I wrote and use frequently that others might find useful. Sure I’ll still blog about them, but for those who want to download them its so much faster to point them to ~/bin instead of having them scour my blog.

~/bin

And thus ~/bin was born.

Sidenotes

I was quite satisfied with the result. It took only 24 hours from Conception to Creation. I made use of Blueprint and jQuery (AJAX and animation) to create a pretty fresh website. Sure its pretty basic but I felt comfortable the entire way through, and I loved every minute of it. I’m hoping that when Ruby on Rails 3 is released, if I have some spare time, I’ll convert it and include a small admin dashboard.

As of two years ago I’ve decided to get pretty serious with my New Years Resolutions. This year (like last year) I have a few ideas I’m tossing around. It will be a few weeks until I settle on one. Typically the resolutions will help me improve my health or lifestyle. One of the ideas I’m tossing around is blogging at least once per week. Compared to the other alternatives this is certainly the most fun. It has a hint of a challenge and its pretty doable. Let me know what you think!

My Blog Is

tag cloud

That right there is the only tag cloud that I have ever found interesting. The cool part is that you can generate those tag clouds and with a lot more jazz at this really great service called Wordle.

How I Did It

For those interested on how I got all the tags for the above cloud (with weight) I decided to grab them myself. Here were the simple 4 steps I took.

How to Build the Tag List

The SQL grabs all of the tags used on blog posts (so not categories) at least once. It also grabs the number of times the tag appears on a post. Using a simple ruby script I take the tags (all single words) and multiply them by the number of times they appear. So a “ruby 3” turns into “ruby ruby ruby.” Once that multiplication has taken place I can just plop them into Wordle and make the magic happen!

More clouds here!

A “blog.domain.com” That Works

I seem to have had some really bad luck doing what I thought would be very simple. I finally arrived at a solution that I really don’t feel is optimal, but it works and I’ll monitor it for a while and hope that it continues working. (You’ll know if something ended up changing).

Problem

I own “alpha.com” and I want to create a “blog.alpha.com” that actually pulls pages from “alpha.com/blog/” on the web server but the user should still see “blog.alpha.com” in their browser’s address bar.

How I did it with this WordPress 2.5.1 Blog

Hopefully if you look up at your address bar right now you see blog.bogojoker.com. If not, then this failed and completely ignore me! I ended up having to do three things:

  1. I Setup redirection for a subdomain. I used my hosting company’s Control Panel to create “blog.bogojoker.com” and point it to “http://bogojoker.com/blog/”. Please note this change does not start working immediately. It took a few hours for the redirection to be broadcast over DNS Name Servers. Once it did work I went to the next steps. I wouldn’t recommend going to the next steps until this starts working because I believe they depend on this!

  2. I logged into the WordPress Admin Dashboard. I went to “Settings” and put “http://blog.bogojoker.com” into both the “WordPress address” and “Blog address” fields. This put my browser into an infinite loop which I fixed in the final step.

  3. I FTP’d into my server, went to the “public_html/blog/” directory and commented out these lines from the hidden “.htaccess” file: (Note that adding a “#” to the start of the line comments that line out)

    #RewriteCond %{HTTP_HOST} ^blog.bogojoker.com$ [OR]
    #RewriteCond %{HTTP_HOST} ^www.blog.bogojoker.com$
    #RewriteRule ^(.*)$ http://bogojoker.com/blog/ [R=301,L]

Voila. That is how I did it. I ended up spending far too much time on what I considered “better” solutions that didn’t seem to work. In doing so I found out some things, but I can’t really be sure what I learned anything valuable from it.

Troubleshooting Tricks

If you end up having the same trouble, if you want to experiment on your own, or if you tried something that totally failed hopefully this can help.

At one point during the week everything crashed on me. Not only did the website not redirect properly but the direct paths weren’t working. I chalked it up to me turning the redirection (step 1 above) off. I stumbled upon a temporary solution to fix WordPress in the few hours it would take for that redirection to be reborn through DNS. It involves a little familiarity with mysql or phpMyAdmin and knowing your database schemas.

For those with phpMyAdmin access:

  1. Log into your phpMyAdmin

  2. Select the WordPress’s database. Most servers have username_wp### or the like, this you should recognize pretty easily or can find from your Control Panel

  3. Browse the “wp_options” table

  4. Modify the “siteurl” value to be the “real” path to the blog subdirectory, NOT what you want it to be but where it really is. For example “http://bogojoker.com/blog/” for me.

  5. Now log into your WordPress by manually going to your domains wp-admin page like so: “http://yourDomainHere.com/blog/wp-admin/”

  6. Go to the “settings” tab and change both urls to the url mentioned in step 4.

That should bring your website back up, albeit with the uglier URL structure. For those without phpMyAdmin access the you should have some form of access to your database, be it command line using the “mysql” command or via another graphical interface. Just try to follow the steps above as closely as possible.

I hope this helps you out a little if you want to accomplish the same thing. Even better though, come up with a better solution and let me know. I dreamed of solving this in a couple minutes and ended up spending a little over 3 hours taking a number of approaches. So I figured, what better to do but write about it!

search