is a Software Craftsman living near Richmond, VA. He owns Juicy Parts Software, where he works closely with Clients to build the right solution. Mel is also the organizer of the Central Virginia Ruby Enthusiasts Group. When he is not writing code, Mel spends time with his beautiful wife and three kids. He's also an avid Detroit Red Wings Fan.
I’ve started to put some of the technology pieces together, but I’m still, very much in a prototype-, spike-mode. Per usual, I’m kind of stuck on the visuals for the website. I know what I want; I’m just not sure how to get there from here.
I don’t remember where/when I found it, but I’m going to be using InK for my presentation layer. It includes a lot of nice things out-of-the-box, but the main one is the “responsive” design.
And while it does Grids differently, possibly easier and more straight forward, I think my presentation is at most two columns. The initial iterations will only use a single column.
I probably need a UX/Data design person to help me layout all of the information I plan on presenting; it’s going to be dense. While there’s a lot of data to present I don”t want the UI to feel cluttered.
Naturally, since this website/application is going to be focused on Battlefield3, I’m in need of some military-type images.
I have found some I plan on using; I also want to select one for the site’s background. However, from a suggestion, I was able to find quite a few interesting pictures on DeviantArt.
Ok, the interesting bits; sadly I haven’t dug too deep yet into padrino and the functionality is brings to the project. I’ve generated my skeleton application. I’ve read the docs. I even implemented a PagesController:
app/controller/pages.rb1 2 3 4 5 6 7 8 9 10 11 | |
I’m using Sequel as my ORM. The connection configuration was new:
config/database.rb1 2 3 4 5 6 7 | |
I had to create a PostgreSQL Login Role, password protected, of course. I had to manually add that to the connection information. And, while I didn’t try without, I did add the port information to the connection string.
Sequel also implements migrations:
db/migrate/001_create_players.rb1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
1 2 3 | |
If you’ve used ActiveRecord then nothing should jump out at you, just the syntactical differences. And I’m not sure how I feel about the (apparent) sequential numbering of migrations.
And the Model doesn’t implement any behavior over and above what Sequel
provides. Padrino also allows you to put your models in several different
locations, depending on your needs. It seems this models directory
allows models to be shared across implemented, mounted applications.
There are several different files that got generated but I’m not listing them here because I haven’t changed them.
Here are the Specs that got generated when I generated my controller and model:
spec/app/controllers/pages_controller_spec.rb1 2 3 4 5 6 7 8 9 10 11 | |
1 2 3 4 5 6 7 8 | |
Again, very vanilla because I haven’t added any extra behavior. One note, though,
I did change the controller spec from == "Hello World" to =~ /Hello World/
because I started to implement my InK-inspired layout.
I have quite a few things to do before I can create Version 0.0.0. I still need to implement the mechanism to call the BF3 Stats API. I need to learn more about Sequel in order to know what can and can’t be done via the ORM. I need to implement authentication; I’m leaning towards OmniAuth Identity and support for Twitter, Facebook, and Google+ OAuth.
I guess I should develop some kind of Product Road Map; would probably help me stay on task.
Cheers
I’m going to start building my personal project and I thought I’d share a few details about it.
First, it’s going to be written in Ruby (of course).
Second, it’s going to be built using Padrino. The initial website is going to be small and I don’t need everything that comes with Rails. I first thought of Sinatra, but then I remembered hearing about Padrino. I started reading the Guides and became excited at the prospect of building a website with it.
Third, largely because of Padrio, I’m going to use Sequel as my ORM. For my initial implementation (or so I’m planning) my Postgres database will just be a place to hold JSON data. While I do have relationships within the structure of the JSON, I’m not going to persist them.
Fourth, I hope to regularly blog about my adventures. Although I didn’t document my research phrase, I do/did plan on documenting the construction phase. I’ll get into more details as the implementation progresses.
Ok, I think it’s time I shared a little bit about the project. My goal is to construct an application to help Battlefield 3 players “level up” through the ranks, the classes, and the myriad unlocks for weapons and vehicles.
There’s a fabulous stats site, as well as Battlefield’s Battlelog and even their in-game progress tracking. My site, in presenting the stats data in a slightly different manner, aims to compliment those resources.
Also, if all goes well, there’s even a mobile version planned. In fact, the mobile version was to be implemented first until I thought, “let’s make this a website first to test the theory.”
Look for Post 2 in the coming weeks.
Cheers
BF3Stats is a wonderful website that is part of a group of websites that track gaming statistics for various video games, one of which is Battlefield 3! And, since getting involved with Battlefield 3, I’ve discovered a lot of folks routinely use BF3Stats. In fact, Better Battlelog, a browser extension that enhances Battlefield’s Battlelog, utilizes BF3Stats for many of its features.
If you love numbers and stats, you’ll love this website.
“But wait! There’s more!”
Not only can you track your progress on their website; not only can you track a set of players’ progress, as well; BF3Stats has an API that anyone can use. In fact, I learned about BF3Stats from the Android App: Battlefield BF3 Stats. (As part of the ‘agreement’ for using the API, they request you sport a ‘powered by’ label on your app and/or website)
So I started to explore their API and found it short on examples. le sigh But my little bit of exploration got my wheels turning.
The images on my ’Battlefield’ page, here, is actually supplied/generated by BF3Stats. There’s a way to create these signature images that integrate your stats into the image using the API (I’m sure). Actually, I don’t know how it’s done and I’m not really all that interested in learning how (at least not yet).
Well, don’t expect to learn about my idea just yet. For those that know me, I have too many interests and not enough time. However, for this one, I feel confident I’ll be able to produce something sustainable and, dare I say, popular; hopefully popular with the Battlefield 3 audience.
My overarching goal is to build an Android App that uses BF3Stats but not like the current set of apps. I have a strong need/desire to be different.
Right now I’m completely in the vision/prototyping stage. I have a ton of research to perform to make sure I can achieve my goals. I’ll post more as I get going. I’m hoping to be able to also post my API usages, to serve as examples/tutorials for other folks getting started with BF3Stats. Of course, Ruby will be my language of choice!
Stay Tuned.
Cheers
This is going to be a quick post, mostly to let you know that I will be blogging about my Battlefield 3 adventures.
I’m getting better! But I still consider myself a Noob. However, I’m getting some excellent support from Battlefield G+ Community. They’re posting excellent content.
Ok - that’s enough for now.
Cheers
Yesterday I was tasked with moving over a ‘feature’ from one branch into ‘master’ for eventual deployment, ahead of the rest of the planned features. And, I think, normally, this isn’t a big deal, especially with git. However, my challenge involved several iterations of this ‘feature’ and several changed files over a period of time.
My first thought was to cherry-pick the commits into the ‘master’ branch. After I found the commits I needed to cherry-pick, I thought to myself, “How can I automate this?” That’s because I had 45 commits to process.
I did start down the cherry-pick lane. Using Tower, a Git GUI application, it quickly got old moving a commit into the branch, fixing any conflicts and commiting the change.
I really wanted to move the entire feature into ‘master’ as one unit. Yes I know there are ways to squash commits into one. But I was looking at dealing with 45 commits… and it was late in the evening… I just knew there had to be a better way.
Google’s my friend and I found an excellent article by Jason Rudolph describing exactly what I was trying to do: bring over a mess of files into a branch.
Heading back to Tower, I then cycled through the 45 commits to build me a list of 31 files that had either been added or changed in the implementation of this ‘feature’.
Then on the command-line:
$ git checkout master $ git checkout -b local-merge-branch $ git checkout development <file-1> <file-2> <file-3> ... <file-31>
Actually I did the checkout process over a couple of iterations. And I did it on a local branch to make sure I didn’t screw anything up. It also allowed me to package all the changes into a single unit.
Running my tests produced a failed test. “Crap!”, I thought. What did I miss? Turns out I didn’t miss anything because the failure was in an unrelated test. I just backed out the changes that was causing the failure.
Once I had the Green light (i.e. all tests passing), I stashed my changes:
$ git stash save changes-destined-for-master
And then applied them to ‘master’:
$ git checkout master $ git stash pop
I run the tests one final time; just being thorough. After the tests finished, I committed and tagged.
I would love it if someone could offer suggestions on automating this process.
Is there a way of getting a list of affected files by searching commit messages for a token (in this case it was a Issue Ticket number)?
Is there a better way of accomplishing the same thing?
Is there a way to automate cherry picking?
Until I learn a better way, I’ll use this as an example of moving changed/added files from one branch to another.
Cheers
I can’t believe my last post was back in March. A lot has happened since then. A lot is happening now.
For one thing: you can now access this blog at: http://melriffe.com
The other thing: I’ve been playing a lot of Battlefield3 lately. Maybe, just maybe, I’ll blog about my adventures.
See you soon…
Cheers
I’m back at RubyNation again; 3rd year in a row for what I feel is the best regional conference out there. But I’m biased. Why am I writing this blog post? Well, I briefly thought about ‘in-conference’ blogging. When I say ‘briefly’ I mean for about 3 nanoseconds. For me it’s difficult to concentrate on the presentation while either taking notes or creating the blog post; I can’t multitask.
However, I still wanted to let folks know about this awesome conference.
First, it’s a well run conference: there’s always time between sessions, the food is always good and the snacks are always delicious. Couple that with near endless coffee and you can probably tell why I think it’s a great conference.
Second, there is always a plethora of fantastic talks and stellar presenters. Without fail, RubyNation is able to attract big name folks for the keynotes. It’s quite impressive.
Third, location. I mean, Reston VA is quite close for me and Dulles is right down the street. DC as the backdrop is also attractive for those able to spend a couple extra days sight-seeing.
What’s the theme this year? Well, it seems like a huge focus on front-end, client-side development and evented, asynchronous computing. Though I’m interested in the evented stuff, I’m really interested in the front-end stuff. I’m really digging the talks covering Backbone.js, Spine.js, HTML5, CSS/SASS/Compass, Mobile Development, JQuery Mobile. All of that on the First day!
Tomorrow promises to be equally awesome.
Cheers
While Octopress makes it easier to blog (at least for me anyways), you still need the willpower, discipline, routine, etc, to keep it going.
Right now I’m struggling with what information I want to talk (blog) about here. Is this strictly a personal blog? Will I also blog about work-related topics here? More than likely it will be a combination of the two.
I do have plans of building out http://juicyparts.com as my business site and it will also have a blog that will be strictly work- and technology-related. On this site, I’ll have both.
So what have I been up to since I last blogged? Oh yeah, I did get some feedback on my Octopress requests; more on that later.
As is par for the course I’ve been busy. Busy with Family, Clients, and CVREG. I’ve also started helping out more with Noah’s Scout Pack. Then Heather recently had knee surgery and, because she can’t drive yet, I’ve been driving the kids to work, school, events, etc.
Client work has been steady and piling up. I received some news about a product I built; it’s both exciting and nerve racking.
But at the end of the day I feel like I’m going in a hundred different directions all at once. It’s hard to blog under those conditions.
Ok. Enough whining. Chat ya later…
Cheers
First off, and most importantly, I’m really digging Octopress. I think Brandon Mathis has done an excellent job of packaging all kinds of cool things on top of Jekyll. But I want to do more. I want to learn more of the internals. I have a couple of things in mind that I would like some assistance with:
Right now all posts go into my source/_posts directory. Which is
fine when I have a blog post mostly thought out. However, many times I
have an idea of a blog post that I would like to stash in a document
that isn’t publishable, a rough draft, if you will.
What’s the simplest thing that could work in order to implement this feature?
Right now I just created a source/_drafts folder and if I have
something I want to stash away, I do the following:
1 2 | |
Not elegant; but gets the job done.
When I’m ready to publish the blog post I just move it to the
source/_posts directory.
Is there a better solution?
Do the kool kids still post to Trackback URLs? I mean, if a blog author is going to go to the trouble of providing a Trackback URL and you’re writing a blog post that compliments their post, why not hit their Trackback URL?
There is where I’m completely lost within Octopress/Jekyll. The site gets generated and uploaded. How would I post back to a blog author’s Trackback URL?
As I’m using Octopress more I really want to learn how to take advantage of it and Jekyll. I really want to learn about plugins and extensions. But I have two immediate needs: Drafts and Trackback URLs.
Any assistance will be greatly appreciated (and blogged about).
Cheers
My friend Joey Beninghove started this weekly Developer Chat called Coder Talk. I tried getting on the very first session but my laptop decided to be mean; it was an excellent session on Cucumber and TDD. You’re going to have to trust me on this one because, unfortunately, the session wasn’t recorded.
But every session since then has been recorded, edited, and made available for listening; including tonight’s session on which I was able to join. Visit the site to get information on downloading previous sessions and joining the conversation.
Disclaimer: I knew next to nothing about the pipeline before tonight’s session.
Because I still have Rails 2.x projects and my Rails 3.0 projects are not in production, I was not able to contribute during this part of the talk. However, from the conversation, I learned a lot; I feel I’ll be better prepared when I start using it.
To me, and I’m probably wrong and over simplifying and wrongly over simplifying, but to me it sounds like a mini-CDN embedded into my Rails app that should be behind a caching solution. But I could be wrong.
This is a classic problem. ‘nuff said.
We had a quick chat on splitting up your application into more managable pieces, with a slant towards easier upgrading.
There was mention of needing Rails to make this easier but that position was contested, stating it’s more an architectural issue than a web framework issue.
There was a general consensus that Security makes the implementation of this application segmenting difficult, if not impossible. However, Engines was presented as a possible solution.
And as far as architecture goes: implementations can be realized either with a server-per-application-function or a port-per-application-function; and there may be something in-between or quite different all together. Regardless which architecture is selected, care must be taken when splitting up an applicaiton.
I hope I was able to contribute to the conversation. I had fun and would like to join in next week’s chat. And, while I had planned on doing some billable work, I’m very happy Joey called me.
Cheers
Ok, this one really wasn’t on the list but I went ahead and configured this site for Feedburner support. You can subscribed via RSS/Atom or with your email address.
Again, Octopress made it simple by offering two configuration items I only had to set with the correct URLs.
I may (or may not) style the subscription buttons differenly when I retheme the site. I’m also considering creating a feedburner plugin that will pull in their styled buttons and/or chicklets.
What’s left on my list? you may wonder. Right now it’s creating a new theme for the blog and configuring ‘melriffe.com’ to resolve to this blog.
Cheers
Time to scratch another item from the list of blog enhancements: Google Analytics.
This one was easy since I already have a Google Analytics account for my Business Website (http://juicyparts.com). Unfortunately the site’s currently: Under Construction
So, adding Analytics to my personal blog was fairly straightforward:
google_analytics_tracking_id to the newly created property idScratch one off the list; comments are now enabled on this site!
Octopress makes it very easy to integrate Disqus! into your blog: you just need the short_name. From start to finish it took me, roughly, 15m to enable comments.
First, I signed up for a Disqus! account; they’re free. Unfortunately, my initial short_name was already taken. I changed it to what this site will eventually become. I then enabled all the options I could.
Second, I signed up for an Akisment account because Disqus! offers Akisment integration. For personal blogs you can use Akisment for Free. With API Key in hand, I completed my Disqus! configuration.
Now, it is at this point I preview my site locally and beam, ear-to-ear upon seeing the Comments section. I deploy my site and verify that, indeed, folks can add comments; I add the first comment.
Then I start filling out my Disqus! profile, enabling services, changing my profile picture, following some folks. And I thought: Blog about enabling comments on your blog!
Cheers
While Noah, my son, has been in Cub Scouts for a few years, this is the first time we’ve tried online popcorn ordering. If you can help out, Noah would greatly appreciate your order. One of the benefits of ordering online is getting your order directly shipped to you.
Every sale will help Noah earn money for his Pack so they will be able to fund many of their planned activities. Did you know that 70% of your purchase goes to Noah’s Pack and Council?
I really want to emphasize the direct shipping. Because a large portion of our family lives out-of-state, it’s really difficult asking them to purchase popcorn and ship it to them. With online ordering, Trails End will ship the order directly to them.
Again, if you can help, it will be greatly appreciated!
Noah has been in this pack a couple of years. He’s a Webelow2 this year; next year he’ll be a Boy Scout. Last year was a really good year for him and he’s excited for this year. In fact, this weekend (17-18 Sep), he and his pack are going camping at Luary Caverns.
And Noah is really flourishing in Scouts. He’s quite the Outdoorsman and Craftsman.
Heather is now a Pack Leader, the Assistant Cub Master. If you know Heather then you know she’s a “hands-on” Mom. It was just a matter of time, in my opinion, before she would be helping to run Noah’s Pack.
If you’re in the Mechanicsville, VA area and would like to know more, feel free to contact me and I’ll put you in touch with the right people (i.e. Heather).
Cheers
I’m starting to make some plans to bring this blog up to where I want it:
I think the new theme will be the toughest because I want to create it in the Style of existing Octopress Themes. Right now there are no dates associated to my tasks because it’s definitely ‘spare time’ activity. However, each new feature will have an associated blog post. Hopefully I can share something new for the folks.
Cheers
Today I got a new phone. The HTC EVO 3D. Why? you ask. I dropped my Palm Pre last night and it didn’t survive the fall. :-(
The Palm Pre was a good phone and I really liked WebOS; I liked the “swipe to dismiss an app” metaphor. But, alas, the good times had to end sometime. I was just hoping it would have been a little longer.
Last night, while getting out of my car I fumbled my phone. While it was falling, I over-reacted and actually hit it, propelling it to the floorboard. Due to damages already received from previous drops the screen cracked and there was no life visible when I powered it up. I was sad. I was very sad.
I was already considering upgrading my phone when my discount became available. Although my Pre was a good phone it started acting up; randomly calling people and bringing up apps. But now that it was broken I just decided to bite the bullet and upgrade. Oh sure, I could have had Sprint send it for repair but it was time to move on. It was time to retire the Pre; I don’t hold much hope in HP.
So I jumped in my car and headed over the Sprint Corp. Store in downtown Short Pump. Though I don’t need the 3D camera I like the fact this version of the EVO has a better processor than its predessor.
As some may know I’ve been a Sprint Customer for years; since 1997 I believe. And now the entire family (sans 10 year old son) has cell phones and yadda, yadda, yadda.
They (Sprint) get you with the discounted prices and because I didn’t have any upgrades available (every 2y a phone is availble for an upgrade) I had to pay full price. Ouch! But doable!
I have a lot to learn about the phone and its capabilities. But, at least, I know how to take/receive a call.
Will this be the phone that entices me to do some Android development? Inquiring minds want to know…
Cheers
Before I started the transfer of my wordpress site to here, I found a couple resources I thought I should save:
I’m still reading through the first site. However, using it and the 2d site I was able to import the majority of my old posts into my new blog. I had some trouble at first, trying to follow the directions of the migration process. In the end here’s a summary of what I did:
The resulting markdown files still have some formatting issues. I have to go through and correct each one. However, because of the export process, I was able to import my pages and a few attachments. Right now I have no plans on using them.
Over the next couple of days I plan on fixing the formatting issues and getting more familiar with Octopress and its capabilities.
Cheers
Since RVM come onto the scene, I’ve heard great things about it. But everything I heard was in the context of Snow Leopard (Mac OSX 10.6). For reasons better left unsaid, I’m still on Leopard and was doubtful I would be able to take advantage of RVM.
So I did what most people do: I turned to Google. At first I didn’t find any helpful posts. However, one post stood out and I diligently followed its directions. I made sure I had the right version of XCode. I updated SQLite3. I then installed RVM. Here’s where the fun begins.
I followed the installation directions, updating my .bash_profile as instructed. I then restarted my Terminal session and patiently waited…WTF! My window disappeared! I finally was able to edit my .bash_profile and commented out the line that loaded ~/.rvm/scripts/rvm. Now what?
I then decided to manually source the rvm script in the hopes of seeing an error or something. No dice. Great! No output and my window keeps disappearing. I search the available help and troubleshooting guides: Nothing. I go back to Google: Nothing. I find nothing that is similar to my problem. sad trombone
So I head over to the IRC channel: #rvm on freenode.net. And a couple of folks start helping me out. First I tell them about some warnings I received during installation. I then reinstall (and rvm reload) upon their suggestion. No change in behavior. I tell them, “There’s no output and then after a second or two my Terminal session disappears.” They check my shell: echo $SHELL => /bin/bash. Nope that’s not it. They ask for rvm info. Well I have to run ~/.rvm/bin/rvm because I can’t load RVM as a function. The output looks ok. They ask about my .bash_profile; I also include my custom prompts, thinking I might have a problem there. Nope, all of that looks good.
In between the IRC exchanges I learn about set +e and set -x. Using those two, I’m finally able to see the output from the script and, as I had suspected, the script is stuck in an endless loop! Great! How do I debug that? BTW set +e means: Don’t exit on error and set -x means: debugging outputThe folks helping me are out of ideas; one even nukes and reinstalls RVM; it works for him. It must be something unique to my machine. I feel I’m in store for a lengthly and, quite possibly, fruitless search. Thankfully I have some output captured, early output before the session window disappears. I load up MacVim with the scripts and start looking at each line, comparing it to the output.## Foiled by ‘:’
As I was going through the output I noticed a ‘cd ..’ command. I couldn’t find it in the scripts. Thinking, “somewhere they have to be ‘cd’ing because it’s in the output.” And then it dawned on me: wait a minute, I have ‘:’ aliased. Just at that moment I was pinged from IRC. I excitedly replied that I might hove found the problem. On line 40 of ~/.rvm/scripts/initialize is: : \. Substituting my alias for ‘:’ the output matches; it’s trying to ‘cd’ into several directories. I remove the alias and reload my Terminal session.Drum roll please: rvm is a function. SUCCESS! Now I can take advantage of RVM.Funny thing is: no one thought to ask about my aliases. Assuming I would know that ‘:’ is null, a do nothing command. I do now. And hopefully this will help someone else with similar problems in loading RVM.Cheers!
$ git clone [repository url] [new name] $ cd [new name] $ git remote add xorigin [new repository url] $ git remote rm origin $ git remote rename xorigin origin $ git push -u origin master
Cheers!