Home Page of Ron Star

Ubuntu Gnome 14.04 Beta 2 (April 2014)

trustyI’m sitting here waiting for my backup to finish so I can install Ubuntu Gnome 14.04 Beta 2. I’m actually booted into it and testing it out while I’m doing my backup. So far I really want it on my system. I want to really put it through the test with all my daily software.

The main reason I want to use it is the improvements for high DPI screens. My laptop is somewhere around 350 DPI. 13.10 was awful at this resolution and I kept trying to figure out how to get everything to look right. I use my system mostly for work and I don’t do much if any gaming or graphics. I spend most of my time in a text editor and web browser.

The web browser is where it all goes wrong. I have to zoom up to 150% so I can read most web sites. If you are one of those web developers that force 10 point font on everyone then get stuffed. The problem with zooming is that borders and columns stop lining up right. Pixels from one element to another are out of whack. Padding is different. So before I push the web sites out I have to set my zoom to 100% so I can see if the pixels are lining up right. Then I tweak for an hour before I can ship it.

So far with the improved resolution of 14.04 I haven’t had that issue. I am zooming sites to see if I can find any issues with the alignments and so far it’s been fine. By the way, Google Chrome is the worst offender of the problem.

Squirrel… Why is Google Chrome getting worse at rendering sites? Chrome was the best for a long time. I’ve been using Firefox to test things, because people have reported rendering bugs in Firefox, and I’m finding a lot of sites just work better in Firefox. eBay is one of them. Try to post an item on eBay in Chrome. I don’t know if it’s just my setup but it’s impossible. Half the posting screen doesn’t render. Works great in Firefox. Same problems with the BofA home banking site. There are things that just don’t work in Chrome anymore, and I’m using the latest “stable” version. Digress…

I really like the new version with the high res screen improvements. It was one of the few things that bugged me about Gnome Shell. I can’t think of anything else that I would change at the moment.

Thumbs up to the Gnome dev team!

My New Rosewill Keyboard (April 2014)

rosewill-keyboardThe keyboard that I ordered for my new workstation is the cheap Rosewill $14.00 slim low profile full size keyboard in black. It’s actually not too bad. I like the look of the keys. They are square and low profile as well, but not as low profile as laptop keyboards. I wanted something with a little bit more travel and a better sound. This keyboard hits those marks.

I wish it was a bit lower on the table though. It’s about twice as high as my laptop keyboard. I was expecting something a bit more “low profile”. It’s pretty wide too. I haven’t been on a full size keyboard for probably 8 years. I’m going to have to get used to the mouse being way far away. I might just switch to my left for mousing.

I’m typing 58 words per minute on it so far. That’s pretty good. I didn’t check my speed on my old keyboard, but that Dell has a horrible keyboard. The space bar doesn’t always work and you have to mash the arrow keys (I know I shouldn’t use the arrows, lol). The thing that really bugs me about most laptop keyboards is the left CTRL key is too far away. I use that key a lot.

I’m not fully sure if I like it yet, but it was only $14 so it’s OK if I don’t. I would love to try out a Das Keyboard someday. I would have to really, really like it to justify the price. Those keyboards are pricey. But they are suppose to be the best thing out there. I’m not sure. But typing in a all black term would bring back some memories. Late night coding sessions might be a bit noisy when Jane is sleeping.

Thinking About a Linux Workstation (March 2014)

Xigmatek-AquilaI’ve been playing around with the idea of building a new Linux workstation PC. My XPS13 is starting to feel a little cramped and I’d really like to have a bit more speed. Also the screen on my WindowsQA testing system died a few weeks ago and I can’t use it now. It is pretty weak anyway. It was like $250 from Best Buy.

I stayed up late last night checking out reviews and searching for components. I found some pretty cool boards and cards. Things sure are faster than they used to be 15 years ago when I last built a PC. My goal was to get something that compares to the new Apple Mac Pro. I think I’ve found something that’s pretty good.

Here is what I have so far:

So this package is $2,220 and is pretty nice. I can clock it to 4.8GHz, has 32GB RAM and nice SSD. It has a pretty good graphics card.

I think I would be pretty happy with this setup. And with this much power I could get rid of my WindowsQA desktop and just run everything in VM’s. It should also be great for compiling Go code. I’m kinda looking forward to it.

Update: I decided to go with a slightly bigger option of the Micro-ATX that can go up to 32GB of ram. Had to go to a bigger case. Don’t really like the case but it’s the best I can find so far.

Update 2: I added the 6 port video card because it was the same price as the 4 port and has twice the memory. Might as well.

Update 3: When NewEgg says “With Power Supply: Yes” that really means “No, it doesn’t have a power supply inside.” So I added a power supply to the mix.

Guard – Why Won’t You Auto-Run My Tests! (Fixed!) (February 2014)

I’ve been having this problem recently. I can’t figure out why Guard will not auto-run my tests when I change a file. On old projects I could edit a file, save it, and Guard would run tests on that file. Worked great. Jump forward to my recent projects. I have to manually run my tests and it’s a PITA.

I’m running Ruby 2.1, Ruby 2.1.1, Rails 4.0.3.

New Rails project

rails new test-project

Gemfile:

  source 'https://rubygems.org'
  gem 'rails', '4.0.3'
  gem 'sqlite3'
  gem 'guard'
  gem 'guard-minitest'

Guardfile:

  guard :minitest do
    # with Minitest::Unit
    watch(%r{^test/(.*)\/?test_(.*)\.rb$})
    watch(%r{^lib/(.*/)?([^/]+)\.rb$})     { |m| "test/#{m[1]}test_#{m[2]}.rb" }
    watch(%r{^test/test_helper\.rb$})      { 'test' }

    # Rails 4
    watch(%r{^app/(.+)\.rb$})                               { |m| "test/#{m[1]}_test.rb" }
    watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
    watch(%r{^app/controllers/(.+)_controller\.rb$})        { |m| "test/integration/#{m[1]}_test.rb" }
    watch(%r{^app/views/(.+)_mailer/.+})                   { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
    watch(%r{^lib/(.+)\.rb$})                               { |m| "test/lib/#{m[1]}_test.rb" }
    watch(%r{^test/.+_test\.rb$})
    watch(%r{^test/test_helper\.rb$}) { 'test' }
  end

Output when I change a file:

  11:23:26 - DEBUG - Stop interactor
  11:23:26 - DEBUG - Hook :run_on_additions_begin executed for Guard::Minitest
  11:23:26 - DEBUG - Hook :run_on_additions_end executed for Guard::Minitest
  11:23:26 - DEBUG - Start interactor

Output when I press [ENTER]:

  11:31:27 - INFO - Run all
  11:31:27 - DEBUG - Hook :run_all_begin executed for Guard::Minitest
  11:31:27 - INFO - Running: all tests
  11:31:27 - DEBUG - Command execution: bundle exec ruby -I"test" -I"spec" -r bundler/setup -r minitest/autorun -r ./test/controllers/thisisatest_controller_test.rb -r ./test/helpers/thisisatest_helper_test.rb -r ./test/test_helper.rb -r /home/phill/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/guard-minitest-2.2.0/lib/guard/minitest/runners/old_runner.rb -e "" -- 
  Run options: --seed 3898

  # Running tests:

  .

  Finished tests in 0.047909s, 20.8730 tests/s, 20.8730 assertions/s.

  1 tests, 1 assertions, 0 failures, 0 errors, 0 skips

  11:31:28 - DEBUG - Hook :run_all_end executed for Guard::Minitest

Here is my GIST of the problem: https://gist.github.com/Phill/9215877

Update!

I found this thread https://github.com/guard/listen/issues/155 that solved my problem. It had nothing to do with Guard/Listen. It was my text editor. I’m using Sublime Text 3 and with Atomic Saves turned on it would not trigger Listen for changes. Turning it off in the config fixed the problems.

"atomic_save": false

Minitest and CouchDB (February 2014)

I ran into a problem recently where I needed to reset the DB when I ran my tests to avoid duplicate inserts. There are plenty of tools out there for other databases including MongoDB. But nothing for CouchDB using CouchRestModel. But it’s easy enough to just build something. After all, it’s just a DELETE/PUT http call to the db server.

In my test_helper.rb I added this:

def reset_test_db!
  puts "\n*** Reset Database\n\n"

  @host = 'localhost'
  @port = '5984'
  @path = "/[mydb]_test"

  # Delete database
  request = Net::HTTP::Delete.new(@path)
  response = Net::HTTP.new(@host, @port).start {|http| http.request(request) }

  # Create database
  request = Net::HTTP::Put.new(@path)
  response = Net::HTTP.new(@host, @port).start {|http| http.request(request) }
end

reset_test_db!

That’s all I needed.

Yeah, I know, I need to abstract out the database name. I’ll figure that out the next time.

Firefox v30 (Nightly Build) (February 2014)

I’m really enjoying Firefox v30. The new interface is pretty nice. And I’m finding that it is a lot faster than Chrome for a lot of sites. I’m going to try to switch over, but there are a few sites that just work better in Chrome (Google sites).

I’m also finding that Chrome isn’t working for a lot of sites recently. Like BofA and AT&T. Not the greatest examples, but I use them enough that it’s annoying. Like sometimes when I click things nothing happens or it reloads the same page. Might be a JavaScript bug but I don’t know. Another tid-bit is that Firefox passes the Acid test 100% and Chrome does not. Not sure if that means anything though.

What brings me to Firefox recently was reported bugs viewing some of the web sites I’ve build. Easy fixes usually but strange they display fine in Chrome/IE but not in Firefox. So I need to use it more anyway.

I think I’ll use it as my non-work browser for a few weeks. Time to find all the extensions I use and get them installed. The default theme is pretty good, but could be a tiny bit better. Fits my use case better than Chrome. I need to find a good ad blocker. FireFoxAdKiller doesn’t really seem to work all that well so far. Probably just me.

Anyway, I think I’ve typed enough words to be a decent size blog post. Back to my Chef server scripts…

Getting the Buggy Ready for Paint! (March 2010)