Thursday, August 29, 2013

HOW TO: Switch a cloned Git repo to your fork

Here we go, yo, so what's the scenario?

You clone a Git repository from, say, GitHub, to dive into the source code.  Eventually, you decide you would like to make some changes and submit a pull request.  You need to switch your repo to point to your fork. Here's how.

List the current remote(s)

Here we see I cloned the Jenkins project, which was itself forked from Kohsuke's account.

$ git remote --verbose
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)

Replace the existing origin with your fork

$ git remote rm origin
$ git remote add origin

Replace the existing upstream with the old origin

...if applicable, of course.

$ git remote rm upstream
$ git remote add upstream

Double-check the remote(s)

$ git remote --verbose
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)

Monday, August 26, 2013

Visual Studio error message template

Visual Studio (among others) will recognize lines that follow a certain pattern in the output window and turn them into links that open an editor to the file and then position the cursor where the error occurred.

The general pattern used by the tools and recognized by Visual Studio is:

fileName(startLine,startColumn[,endLine,endColumn]): error errorCode: errorMessage
An example message would look like:

C:\Source\path\to\solution\project\FileWithCompileError.cs(154,20,154,26): error CS0103: The name 'result' does not exist in the current context
The endLine and endColumn are optional; presumably not all errors can be pinpointed to a range so accurately.

Monday, March 12, 2012

Friends don't let friends use Windows 8 Consumer Preview

Here is a screenshot that I hope will be worth 1000 words.  Click it to download it in its full size (1680x1050).

What you see is Windows 8 Consumer Preview with a modified High Contrast theme and three types of font smoothing (none, grayscale and ClearType), even though the setting is clearly OFF in the displayed "ClearType Text Tuner" and in the option "Smooth edges of screen fonts" has also been turned off in "Performance Options".

If you've been reading this blog, you know that I can't stand any form of on-screen font smoothing and my inability to turn it off, despite even trying the usual registry modifications (see below) means I will not only NOT be using Windows 8, but also I will NOT be developing applications for Windows 8.

These changes are usually sufficient to get Windows to stop smoothing fonts system-wide (except in Internet Explorer 9):

[HKEY_CURRENT_USER\Control Panel\Desktop]

I have other concerns with Windows 8, but this is the most ridiculous one.

Tuesday, December 27, 2011

Dell could not get your question

Dell has some "Windows 7 - Boxing Week Laptop & Desktop Deals", so I decided to check out their website. Having used a Dell laptop recently, I remembered the lack of a "Menu key", so after poking around for a bit, this "chat with us" window started to scroll annoyingly in the way, so I thought I'd take advantage of it. This is what happened next:

 21:17:51    System  System 
 21:20:29    System  System 
You are now being connected to an agent. Thank you for using Dell Chat
 21:20:29    System  System 
Connected with Gowrishankar G
 21:20:29    Agent  Gowrishankar G 
Welcome to Dell Canada Sales Chat! I hope you are doing well and thank you for waiting. My name is Gowrishankar (Extn:4161496) I will be your online Product advisor.
 21:20:34    Agent  Gowrishankar G 
 21:20:49    Agent  Gowrishankar G 
hello Olivier
 21:21:09    Customer  Olivier Dagenais 
Your link didn't work.
 21:21:45    Customer  Olivier Dagenais 
Not a problem
 21:21:57    Agent  Gowrishankar G 
Great! Glad you chatted in today. How can I help you today with the purchase
 21:22:14    Customer  Olivier Dagenais 
Anyway, I would like to know if there is a page with pictures of all the available keyboard layouts for 17" laptops.
 21:22:34    Customer  Olivier Dagenais 
I was looking at this:
 21:22:35    Customer  Olivier Dagenais 
 21:22:47    Customer  Olivier Dagenais 
There's a picture of the keyboard on the right I can zoom into.
 21:22:53    Customer  Olivier Dagenais 
I don't like that layout.
 21:23:09    Agent  Gowrishankar G 
Give me a moment
 21:23:13    Customer  Olivier Dagenais 
 21:26:29    Agent  Gowrishankar G 
 21:26:39    Agent  Gowrishankar G 
You can open the link and click on gallery
 21:27:44    Customer  Olivier Dagenais 
That's the same page I was at.
 21:27:56    Customer  Olivier Dagenais 
Where can I see the other available keyboard layouts?
 21:28:15    Agent  Gowrishankar G 
you have to click on gallery
 21:28:36    Customer  Olivier Dagenais 
I did.
 21:28:42    Customer  Olivier Dagenais 
There is only one picture of a keyboard there.
 21:30:47    Agent  Gowrishankar G 
did you find the option gallery
 21:31:33    Customer  Olivier Dagenais 
 21:31:39    Customer  Olivier Dagenais 
It is not what I was looking for.
 21:32:48    Agent  Gowrishankar G 
 21:33:23    Customer  Olivier Dagenais 
 21:33:32    Customer  Olivier Dagenais 
I am looking for a laptop keyboard that has the "Menu key"
 21:33:48    Customer  Olivier Dagenais 
It is usually to the right of the space bar, between Alt and Ctrl.
 21:35:44    Agent  Gowrishankar G 
could not get your question
 21:36:41    Customer  Olivier Dagenais 
Does Dell make any laptops with the "Menu key" to the right of the space bar?
 21:38:45    Agent  Gowrishankar G 
No we don't have the "Menu key"
 21:38:54    Customer  Olivier Dagenais 
Thank you. That is all.
 21:39:40    Agent  Gowrishankar G 
Thank you very much for your time

I keep poking around and notice that if you click Customize, you eventually get to pick your keyboard!  Great, let's see what my options are:

Multi-task any time of the day or night with a backlit keyboard.
Standard Keyboard - English
Learn MoreHelp Me Choose 
Standard Keyboard - English [Included in Price]
Backlit Keyboard - English [add $25.00 or $1.00/month1]

Bummer. I guess I'm out of luck if I wanted the bilingual keyboard that I'm seeing in stores everywhere these days (and I certainly do not!  I want a US English keyboard layout like my old HP Pavilion dv8000.).

At this stage, even if Dell laptops somehow eventually do get a "Menu key", I'm not convinced I want to support an organization that hires "sales people" that can't understand English.

UPDATE: I found that HP's website contains manuals for its laptop series, including lists of part numbers for replacement keyboards, by language, as well as instructions for removing and replacing keyboards. This is great if all you can find is a laptop with a French-Canadian keyboard; you can replace it after the purchase.

UPDATE 2: I ended up ordering a refurbished HP laptop that already has a US English keyboard. It doesn't have the inverted T arrow keys, but I don't use those as often...

UPDATE 3: I ended up returning said refurbished HP laptop after some testing revealed that their recovery discs didn't actually work.