Steal my idea: dual videocards/video outputs on a laptop

Why doesn’t someone make a laptop with dual video cards on it?
That way you can run two displays in addition to your laptop instead of one.

It wouldn’t have to be able to run a 2560 x 1600 display on both cards, 1920 x 1080 will do (that’s two nice 24″ displays). I know lots of developers who’d pay good money for that.

PS: As with all ideas posted on this blog, feel free to take them and use as your own.
Whether you’re successful or not, it’d be awesome if you’d write back and let me know :D

Add comment June 24th, 2009

Netbeans 6.7 rc2/rc3 not ready for primetime?

Regarding my post yesterday about Netbean’s new 6.7 rc releases

While my initial user experience was dandy, I have since discovered some show stopping bugs.

- When trying to import your plugins from a previous version (6.5 in my case), the screen that pop up mysteriously disables mouse clicks.
So you basically get stuck at a screen like this one …

Netbeans plugin export fail

… with no possible way of moving forward or back.
I had to kill the netbeans process and restart (happened in both rc2 and rc3).
To be fair, after restarting, I had no more problems … the plugins seemed to have imported just fine.

- I also discovered another odd problem while trying to work on migration files in Rails. After Netbeans produced one intellisense dropdown, the entire IDE would start freezing on every 2 or three key strokes … making itself unusable. I had this problem in rc2, no such problem with rc3.

On the plus side, startup time is *a lot* faster than in 6.5. As soon as I loaded a few modules the startup speed went back to be cell-phone-customer-service slow, so no plus there.

+ The whole netbeans process seems to be self contained now. It used to be that when you looked in process explorer, you’d see Netbeans, nbexec and java, with the real size of netbeans contained in the Java process.
This, happily, is no longer the case. Netbeans still easily tops 200MB of memory though :\

- Trying to create a new rails app, the browse button on this screen does not work, terrible eh?

browse button on 'create new project' doesn't work in Netbeans 6.7

Add comment June 18th, 2009

Fixing Ruby irb window console in Netbeans for Windows

PS: This worked for Netbeans 6.7 RC2, however it will HORRIBLY break any attempt to use irb from the windows command line

If you right click on a project in Netbeans then go to ‘Ruby Shell (IRB)’, you should get dropped into a ruby IRB window.

Unfortunately for most of you on windows, you might get this instead …

Netbeans irb window fails on windows

An easy fix is to go to irb.bat and comment out the first 7 lines of code so that it looks like this

#@echo off
#@if not "%~d0" == "~d0" goto WinNT
#\bin\ruby -x "/bin/irb.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
#@goto endofruby
#:WinNT
#"%~dp0ruby" -x "%~f0" %*
#@goto endofruby
#!/bin/ruby
#
#   irb.rb - intaractive ruby
#   	$Release Version: 0.9.5 $
#   	$Revision: 11708 $
#   	$Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
#   	by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
 
require "irb"
 
if __FILE__ == $0
  IRB.start(__FILE__)
else
  # check -e option
  if /^-e$/ =~ $0
    IRB.start(__FILE__)
  else
    IRB.setup(__FILE__)
  end
end
__END__
:endofruby

Add comment June 17th, 2009

Netbeans 6.7 Release candidate/RC 3 released

Netbeans 6.7

I’d been using 6.5 for the last couple of months, forgetting to look for updates in my RSS feed, when I came across the announcement of Netbeans 6.7 RC 2.

I quickly downloaded it and started using it, when I found out that RC3 was released just yesterday as well, I’ve downloaded it, but since I’m in the middle of a slew of projects I won’t be installing it until the weekend.

However with RC2, I am impressed that they finally fixed the silly problem of each version of Netbeans not importing settings from previous versions.

The install went smoothly and I was up and running faster than usual.

The things that jumped out at me are

+ There is no annoying subversion connection window that jumps up in the output section for each project that you’re working on any more

- The Ruby irb output window still doesn’t work for me (see screenshot)

Netbeans irb window fails on windows

- Still no word wrap (I know they’ve said to expect it in version 7.0, but seriously …)

- I spent almost 2 hours yesterday trying to figure out what changed between RC3 and RC2, and I couldn’t do it.
If you can, please drop me a line.
Apparently with each new release, the documentation page updates to the current release. So basically there isn’t a release page for RC2 any longer (please fix this guys).

+ For Ruby on Rails here are the things that are new (nothing exciting really)
Here are the release notes for RC3

Ruby and Rails

  • Remote debugging support
  • Improvements to Ruby constants support
  • Run and debug actions for test cases and suites included in context menu
  • Support for Shoulda tests

enjoy.

1 comment June 17th, 2009

requiring gems from github (specifically flickr-fu and xml_magic) using config.gem

So the rails way of requiring a gem in your app is by using the config.gem instruction in environment.rb (as opposed to sticking a require statement in your environment.rb).

However including gems from github is a different beast … sometimes the gem author will tell you exactly how to do it, or sometimes they won’t, as the case with flickr-fu.

Just fyi … typically when you are including a gem from git hub you will want to do something like this …

config.gem 'gem-name-from-'gem -list'-command', :lib => 'github_gem_name', :source => 'http://gems.github.com'

“gem name from gem -list command” … by this I mean that you should run a gem -list command from your command line and use the name that shows up for your gem there.

… so the will_paginate gem config.gem statement looks like this …

config.gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'

but for the xml-magic gem, its this ….

config.gem 'xml-magic', :lib => 'xml_magic', :source => 'http://gems.github.com'

and for the flickr-fu gem, its this ….

config.gem 'flickr-fu', :lib => 'flickr_fu', :source => 'http://gems.github.com'

Its not documented anywhere.

I had to figure it out by trial-and error, now you don’t have to :D

Add comment May 22nd, 2009

Southwest Airlines error screen fail

cropper_capture_04-13-200901-58-29-am

Looks alright doesn’t it?

Problem is, there are *absolutely* no clickable links on that error message.

Go ahead … try it.

How to fix it?
You need a link back to the home page at least, suggesting other things the user might want to check out is not a bad idea either.
And for style points, a simple text box to get information about what caused the error to happen, will alert you to the problem so you don’t lose prospective customers.

Add comment April 13th, 2009

Hey Google Maps and Apple, I’ve got a question for you.

Why don’t you allow users just text their current location to another iphone user (instead of having to type out the address everytime)?
Then, when it shows up on the iphone, they can click it to go directly to the location on google maps?

Sounds easy enough for you guys to do in a weekend :D

Add comment April 8th, 2009

What if?

What if, instead of doing things that annoy their customers, like charging for bandwidth
cable companies decided to do innovative things like add bigger hard drives for their DVR devices, or allow you email episodes you’d recorded to your friends (who also had DVR)?

Add comment April 8th, 2009

The best gem/plugin installation doc I’ve ever seen

If only more github gem/plugin installation docs were like this

Add comment February 18th, 2009

How to uninstall a plugin in Rails

This one is simple, but I couldn’t find a decent google result for it.

Before you uninstall the plugin, you have to get its name … go to the vendors directory in your app folder and get the name of the folder

In this case the name of the plugin is “active_scaffold”

Go to the directory of the app you want the plugin removed from and type in

ruby script/plugin remove active_scaffold

or if you’re on a Linux box

./script/plugin remove active scaffold

2 comments February 17th, 2009

Cakephp Filter gotcha for rails folks

Usually in Rails, if you specify a before_filter in the base controller ‘ApplicationController’ (in application.rb), every other controller in that app inherits that filter, so that even if you specify a before_filter in another controller … the filter in application.rb always runs
Example:

class ApplicationController < ActionController::Base
   before_filter :check_login
end
class UploadsController < ApplicationController
    before_filter :get_data
end

The :check_login method is always run even though UploadsController specifies another before_filter.
(You can stop this behavior by specifying a skip_before_filter :check_login in the Uploads Controller)

However if you take this mindset with you to cakephp (more...)

Add comment February 16th, 2009

How to get a hasMany dropdown/select tag in cakephp

Getting a dropdown of items a model hasMany of, should be very easy to do, but I always forget and it takes me far longer to find it than it should.

For this brief example, we’re assuming that we have an Uploads model and a FileCategory model.
Uploads belongs to FileCategory and File Category has many Uploads … get it?

class Upload extends AppModel {
   var $belongsTo = array('Client', 'FileCategory');
}
 
class FileCategory extends AppModel {
   var $hasMany = array('Upload');
}

All you need to do to is get the items for the dropdown with a find(’list’) command and then (more…)

Add comment February 14th, 2009

Cakephp gotcha: Don’t name controller the same as folder in webroot

This one had me going for a bit, but if you name a controller the same as a file that is in the “webroot” folder, and try to navigate to it, cake will just show you a listing of all the files in the same named directory.

As an example, the “files” folder comes with the cakephp installation right?

Not knowing that, I tried to build a files controller and navigate to it.

but it takes me instead to (more…)

Add comment February 13th, 2009

json_encode error “missing ] after element list” with jquery json plugin

If you’re using the excellent jquery json plugin you might run into problems trying to parse json returned from the php function json_encode.

Specifically, when you try to parse the returned json using $.evalJSON you get the javascript error

missing ] after element list

I also had this same problem with the cakephp json component (which I decided to use instead since it would be more portable across php versions than the php5.2+ only json_encode).

The simple fix is this.
Add slashes to your output and surround it with double quotes like this …

$status = json_encode($status);
echo '"'.addslashes($status).'"';

I figured this one out, by examining rails json output that worked just fine with the jquery json plugin.

Add comment February 8th, 2009

Using the zebra widget with jquery Tablesorter (styling alternate table rows)

I ran into this problem trying to figure out how to make sure that styling alternate rows in a table did not become messed up when tablesorter actually sorted the table.

In googling around I figured out that you had to use the zebra widget call in your initial tablesorter contructor. But no one said exactly how to get the zebra widget to apply the alternate row styling.

The simple answer is (more…)

Add comment December 10th, 2008

Next Posts Previous Posts


Feeds

Calendar

March 2010
S M T W T F S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031