Wednesday, October 27, 2010

Rhosync Compile Errors–Rake Log File

Standard behaviour to run a Rhosync webserver requires running the following command in the folder containing your Rhosync server app (talking windows here):

   1:  rake rhosync:start

which will run in a new cmd window. Problem is if there is a compile error, this window will close before you get to see the error. I was expecting to see errors in logs somewhere, but my limited searching turned up nothing.

Easy fix is to just call rake instead. e.g.

 

   1:  rake

Probably easy for most people to work out, but for us linux noobs simple things can sometimes seem very difficult :(

Tuesday, October 26, 2010

Android <3 – 5 Best Apps

Purchased a Samsung Galaxy S a couple of months ago after trying to hold out for a Windows Phone 7 … phone. Never made it and my Samsung Omnia was getting a bit long in the tooth (though custom roms from XDA made it bearable). For various, probably unreasonable, reasons I was reluctant to but another samsung phone. Bit the bullet, and I’m glad I did. Phone is awesome yada, yada, yada. Just thought I’d share my top 5 favourite apps:

Launcher Pro Plus – US$2.99

LPPLauncher app to replace Samsung’s iPhone-ish TouchWiz Launcher. I can’t give LauncherPro Plus enough wraps, smooth, powerful, intuitive, customizable. The ability to create shortcuts on your home-screens is invaluable. Not just app shortcuts though, webpages, contacts, activities(i.e. message a contact, navigate to a destination, etc). Really makes this phone fun to use. Free Version is full-featured but I recommend purchasing the app to help out the developers.

 

 

 

 

Handcent SMS – FREE

Hancent

Replaces the standard android/samsung messaging app. Again really nice app to use, highly customizable, fast, etc. Best feature would have to be the “Quick Reply” popup that allows you to reply to an SMS without having the entire messaging app open up.

 

 

 

 

 

BRUT Mod – FREE

brutWorldwide navigation using Google Maps Directions, map tiles caching on SD card, etc. ‘nuff said

 

 

 

 

 

 

 

AppBrain – FREE (Ad supported)

appbrainReplacement market app. Manage you apps online. Hot apps, recommendations, backups, app lists. It’s got them all. Fast clean, interface. I would probably purchase this to get rid of the ads, but they seem to only have a donate option :S

 

 

 

 

 

 

Winamp – FREE

winampOnly just installed this, but it looks like it will be my number one music player for the foreseeable future. It’s got playlists, it’s fast, it’s smooth, has a great homescreen widget and best of all a lock screen widget. Not sure I could ask for much else in a media player.

 

 

 

 

 

 

It’s not really surprising that all these apps are just replacements for existing functions on the Galaxy S which are all severely hindered in some way. Next time I’ll look at apps that actually add features…

Monday, October 25, 2010

Node != Nodejs

Recently built a new Ubuntu 10 VM to test out a few Node.js ideas. While support for windows is improving, it just isn’t ready for prime time. I’m very much a linux noob so I just tried following the various guides out there.

I’ve followed these steps successfully recently so it came as a surprise when running:

   1:  neil@ubuntu:~$ cd node
   2:  neil@ubuntu:~/node$ ./configure

resulted in:

   1:  neil@ubuntu:~/node$ ./configure: 4: autoconf: not found
(or some other such error)

Now trying to brute my way through the install I pushed on and ran:

   1:  neil@ubuntu:~/node$ make
   2:  neil@ubuntu:~/node$ sudo make install
furthers errors ensued…

However then running:

   1:  neil@ubuntu:~/node$ node

gave me the oh so informative:

   1:  The program 'node' is currently not installed.  You can install it by typing:
   2:  sudo apt-get install node

DO NOT RUN sudo apt-get install node

As this will install the node module. Confused? Well node != nodejs. node is apparently a Amateur Packet Radio Node program. Not what we want unless you’re into ham radios… Attempting to run node will usually result in something along the lines of:

   1:  axconfig: port 1 not active 
   2:  axconfig: port 2 not active 

 

How to fix all this? Well thanks to stack-overflow and the nodejs group at least I knew where to start:

First remove the node package:

   1:  sudo apt-get remove --purge node
   2:  sudo apt-get clean

 

And then run the following to get a stable version of nodeJS running (e.g. v0.2.4):

   1:  sudo apt-get install build-essential
   2:  cd node
   3:  git checkout v0.2.4
   4:  ./configure
   5:  make
   6:  sudo make install

 

You should now be able to run nodeJS scripts. YMMV

Thursday, August 19, 2010

Visual Studio – Tip #1

 

Like a lot of people, I find F1 in Visual Studio practically useless. I did read a suggestion to remap F1 to Debug->Run just so it did something useful.

Not wanting to waste a precious key I’ve decided to remap F1 to run the currently selected unit test in Resharper’s Unit Test Sessions window via the ReSharper_UnitTestSession_RunProcess command. Only problem is that windows needs to be selected before RunProcess will work. Visual Studio Macros to the rescue:

   1:      Sub Run_Current_Session()
   2:          DTE.Windows.Item("{B2BC9916-E3E6-43A8-AD5F-3BDB95F53DB5}").Activate()
   3:          DTE.ExecuteCommand("ReSharper_UnitTestSession_RunProcess")
   4:      End Sub

Moving on I’ve applied the same tactic to map F6 to ReSharper_UnitTestSession_DebugProcess. The productivity increase has been quite noticeable.

More random tips soon…

Thursday, March 11, 2010

ASP.NET MVC2 RC2 Areas Namespace Conflict

While converting an MVC1 app to MVC RC2 I created an Area and moved my existing controllers into said area. Resharper identified the “Namespace does not correspond to file location, should be: AAA.Areas.BBB.Controllers” as expected. A simple “Move declarations to namespace ‘AAA.Areas.BBB.Controllers’” was sufficient to alleviate the issue.

At this point I also realised I needed to change my default namespace for the project to “XXX.AAA” and hence the namespace of my controller needed to change to “XXX.AAA.Areas.BBB.Controllers”. No problem.

Tried to navigate to said controller and received http 404, “The Resource cannot be found”. Debugged and found the route was being registered via AreaRegistraion.RegisterArea but the controller constructor wasn’t being hit.

Fix 1 (The hard way) : context.MapRoute(name, url, defaults, namespaces) allows you to specify the controller’s namespace/s as outlined by haacked.

Fix 2 (The easy way): make sure the area registration uses the same namespace as the controller i.e. “XXX.AAA.Areas.BBB” instead of the original “AAA.Areas.BBB”.

Now everyone’s happy :)