Sunday, April 20, 2014
Step 1: Your second language should be similar to your first
Step 2: Compare and contrast common task based libraries to get a gist of the differences.
Step 3: Get involved with the community
Step 4: Write several simplistic projects that replace the common big frameworks.
Step 5: Learn a third language and a fourth, fifth…
Monday, May 20, 2013
While the WebAPI certainly seems modeled after that, and it's a noble effort, I've been struggling to get routes working the way I want running into issues with nested resources and using parameters in the url. The preferred solution seems to be to use IQueryable and OData, I don't use an ORM that implements IQueryable, and I wasn't willing to switch. So I have stumbled onto the pattern of using FromUrl to at least pass parameters in a more complex than the standard way.
Sunday, April 7, 2013
I journal quite a bit and my holy grail has been using my favorite text editor (Vim or Vim bindings) with Evernote to store the everything in a smart searchable format. Today I stumbled onto a neat little tool that makes this all happen called Geeknote http://www.geeknote.me/. It's written in Python and works fine on my Mac.
#!/bin/sh# Download the repository.git clone git://github.com/VitaliyRodnenko/geeknote.gitcd geeknote# Launch Geeknote and go through login procedure.python geeknote.py login#change vim to whatever you want it to bepython geeknote.py settings --editor vim
#change checkout_dir to match where you've checked out the latest
#change notebook to whatever notebook you use as your journal
if [ -z "$1" ]
echo creating a note named $title in the $notebook notebook
python $checkout_dir/geeknote.py create --title $title --notebook $notebook --content "test"
python $checkout_dir/geeknote.py edit --note $title --notebook $notebook --content "WRITE"
Writing Journal Entries
journal #creates a note in journal with todays date as the title
journal custom_title #no spaces allowed and will use the title specified
Monday, February 18, 2013
Sunday, September 25, 2011
Running Jenkins as a hidden userFirst I noticed that jenkins was running as the "daemon" user, this obviously wasn't going to work for github and rvm needs. So I did some googling and had some guides to get Jenkins running as a specific user. I did the following (sourced from http://colonelpanic.net/2011/06/jenkins-on-mac-os-x-git-w-ssh-public-key/ ). Note: That's really $PASSWORD up above. This gives you a prompt to enter that password. Next you'll need to stop the Jenkins service and edit the plist and start the service back up.
You're plist file should end up like this.
RVM issuesNow my next issue was despite what I'd read elsewhere I was unable to get Jenkins to use the default ruby provided by RVM. So I just pasted the commands that I would run anyway in the "Execute Shell" build step.
Getting Jenkins to see testsI've been using Test:Unit/Minitest lately just to keep more consistent with my day to day work. However I haven't found a way to get my tests to show when using the "Execute Shell" task. I found a little gem called ci_reporter that exports to the standard junit format, unfortunately it doesn't work with minitest yet. That's ok I haven't done anything that Test:Unit doesn't support so far so I added the the following to my Gemfile (note the part about unit-test 2.0):
Running "rake ci:setup:testunit test" should give you a bunch of xml files in tests/reports. Now we need to tell Jenkins where to find those reports so add a post build action to pick them up as junit reports.
Rcov reportsThis was pretty easy.
- Install Jenkins plugin for RCov (it's in the plugin list in the admin section).
- add simplecov and semiplecov-rcov to your Gemfile.
- configure Jenkins rcov plugin to look in coverage/rcov
- add the following 4 lines to the TOP of your tests/test_helper.rb file: