Linking to a Google Doc .doc as .pdf Feb 8, 2011 I recently decided to update my resume, which forced me to revisit an issue I originally faced when posting my resume to my site: I am writing it as a doc file in Google Docs but I want to link to it as a PDF and have my updates visible immediately. ...
Rails 3 + RSpec + Rake tasks are missing Feb 6, 2011 Recently, I installed Rails 3 using rvm. I wanted to follow quickly through Rails 3 in Action so I could see the differences between Rails 2. ...
Syncing between Motorola Droid and Banshee or Rhythmbox in Ubuntu Nov 27, 2010

I like to download those cheap albums on AmazonMP3 that are like “The 99 Darkest Classical Pieces” or whatever. The AmazonMP3 download, however, puts these mp3s in folders according to the artist instead of Various Artists or by album name. Because the Droid’s music player reads music based on the folder structure and not on the id3 tags, this means I have about 30 or 40 different entries for the same album. It’s annoying, to say the least.

I recently decided to use Rhythmbox to pull all of the music from the Droid and then copy it back over to see if it would automatically put the mp3s in the correct folders. To my surprise,

...
Tip for Writers and Novelists: Use Subversion to track changes in your work! Nov 16, 2010

As a developer, I take some things like version control for granted.

Recently, I suggested version control to my wife to make it easier for her to compare her current revisions with earlier revisions.  Currently, when she wants to make a new revision, she creates a new file with a different filename.  This doesn’t give her to Word comparing or change tracking.  So, if she deleted a paragraph two, three, or twenty revisions ago, she could easily go back to a draft containing the paragraph and retrieve the text or compare against the current revision.  It would even be possible to check out the earlier revision!

On top of change tracking, a subversion repository offers a complete backup of documents.  This would be excellent for someone who is worried about losing their documents.  For instance, you can create a subversion repository on an external hard drive and you’ll never lose anything earlier than your last check-in.  Granted, you have to adopt the version control process, but the benefits greatly outweigh the possible headaches of having no sort of version control or revision history.

For any writers who may stumble across my site, this post will walk you through setting up a local subversion repository for free.

Required Download: TortoiseSVN

My version of TortoiseSVN is 1.6.6.  Although your version may be slightly different than the screenshots, the overall steps should remain the same.  After installing TortoiseSVN, be sure to reboot your computer to make sure the svn caching mechanism is working. Then, continue reading…

...
Select Actions Update (Google Chrome Extension) Nov 13, 2010 Last night, I published a major update to the Select Actions Google Chrome Extension. This update removes some “scary” permissions which claimed the extension had access to all websites. ...
System76 Ubuntu NetBook and Tethering on Verizon Droid (Android) Nov 10, 2010

One of the first things I wanted to do when I got my netbook was to setup tethering.  However, I don’t want to pay $30 more a month just to view the same pages I’d otherwise be viewing on my phone (i.e. Facebook, Twitter, Google News/Gmail).  The answer to this is an application called EasyTether.  It’s currently only $10 on the Android Market.  Click here to download EasyTether.

The setup guide in EasyTether will walk you through getting the application configured on your phone and connecting that to your computer.  However, some people may have Linux-based NetBooks and not have the technical knowledge to write a simple script to startup ‘easytether’ in a console.  I’d like to provide those steps.  Please read on if you’re interested!

**Note: You *MUST* have your sudo password to proceed.

...
System76 Starling 3 Netbook Review Nov 6, 2010

Recently, I began a position which allows me to ride the bus to and from work, giving me a lot of free time to read or develop. My home laptop is a 15.4″ widescreen which is a little too much to tote around on the bus, so I decided to purchase a netbook. After a few months of researching, I found one that I really wanted.

I had never even heard of System76 until one day when I saw a man close to my age on the bus using one. You know how you can somewhat tell when someone is using Linux (intense look, typing quickly, half-smiling like they have a secret)? This interested me, so when I got home and googled System76 I was happy to see that my assumption of the man using a Linux netbook was correct.

System76 Starling


System76.com – Starling NetBook

First of all, when I opened the box for my Starling, I was happy to see that there wasn’t a whole lot of junk inside the box. There was a computer, some packaging to make sure it survived shipment, and a power cable. There was no manual per se, only a single-page welcome with a couple of Ubuntu stickers. The manual and any documentation for the computer is available online at knowledge76.com. If this kind of thing puts you off to buying a computer, maybe it’s not the right choice for you. If, on the other hand, you believe in the ease-of-use provided by Ubuntu Linux, more powerful and higher-quality hardware than most Windows netbooks, you should probably read on.

Stats/Options

Color options for the Starling NetBook

The Starling NetBook comes in either finish: Obsidian Black or Coral Red Soft Rubber

Display: 10.1″ HD WSVGA Super Clear Ultra-Bright LED backlit (1024 x 600)

Networking: LAN (10/100), WiFi

Wireless: 802.11 bgn

Dimensions: 10.47″ x 7.28″ x 0.72~1.0″ (WxDxH)

Weight: 2.0 lbs.

See the System76 for complete base options and available upgrades. Continue reading for a summary and review.

...
What is JavaScript? Sep 28, 2010 I haven’t updated my site in a while because my wife and I have been very busy moving from the DC-Metro area to Seattle, WA. ...
Bitwise operations and Flags (C#) Jul 31, 2010

I haven’t written anything in a while, so I thought I would finally write about the subject of bitwise operations and the FlagsAttribute.

I mentioned this to one of the developers on my team, and he said that he somewhat understood bit operations but he had never found a reason to use them.

Here is the code I will use to discuss the operations

int a = 57754;
int b = 18782;
			
int aXORb = a ^ b;
int aORb = a | b;
int aANDb = a & b;
int aNOT = ~a;
int bNOT = ~b;
			
string spacer = "---------------------------------------------";
Console.WriteLine("{0} ({1}) a", GetBitString(a), a.ToString());
Console.WriteLine("{0} ({1}) b", GetBitString(b), b.ToString());
Console.WriteLine("{0} ({1}) a ^ b", GetBitString(aXORb), aXORb);
Console.WriteLine(spacer);	
Console.WriteLine("{0} ({1}) a", GetBitString(a), a.ToString());
Console.WriteLine("{0} ({1}) b", GetBitString(b), b.ToString());
Console.WriteLine("{0} ({1}) a | b", GetBitString(aORb), aORb);
Console.WriteLine(spacer);	
Console.WriteLine("{0} ({1}) a", GetBitString(a), a.ToString());
Console.WriteLine("{0} ({1}) b", GetBitString(b), b.ToString());
Console.WriteLine("{0} ({1}) a & b", GetBitString(aANDb), aANDb);
Console.WriteLine(spacer);	
Console.WriteLine("{0} ({1}) a", GetBitString(a), a.ToString());
Console.WriteLine("{0} ({1}) ~a", GetBitString(aNOT), aNOT);
Console.WriteLine("{0} ({1}) ~(~a)", GetBitString(~aNOT), ~aNOT);
Console.WriteLine(spacer);	
Console.WriteLine("{0} ({1}) b", GetBitString(b), b.ToString());
Console.WriteLine("{0} ({1}) ~b", GetBitString(bNOT), bNOT);
Console.WriteLine("{0} ({1}) ~(~b)", GetBitString(~bNOT), ~bNOT);
			
Console.ReadLine();

// And, the GetBitString method
static string GetBitString(int input){
	int sizeInt;
	// Number of bits is bytes * 8
	// I specifically chose 16-bit values to reduce the amount displayed
	unsafe{ sizeInt = (sizeof(ushort) * 8); }
	
	string output = String.Empty;
	for (; sizeInt >= 0; sizeInt--) {
		output += (input >> sizeInt) & 1;
		if(sizeInt % 4 == 0) { output += " "; }
	}
	
	return output;
}

XOR ( ^ )

From MSDN:

Binary ^ operators are predefined for the integral types and bool. For integral types, ^ computes the bitwise exclusive-OR of its operands. For bool operands, ^ computes the logical exclusive-or of its operands; that is, the result is true if and only if exactly one of its operands is true.

I think of XOR as a “one-toggle”. The logic can be seen as (format is [first] : [second] –> [result] ):

0 : 1 --> 1
1 : 1 --> 0
1 : 0 --> 1
0 : 0 --> 0

As you can see,

...
Learning WCF: IIS 7 won’t start service from web project Jun 27, 2010 I’m following along with code in Learning WCF, attempting to quickly become an expert at building WCF Services from scratch. In Chapter 1, there is a project called IISHostedService. ...