Friday, July 29, 2011

How To Use Your DropBox.COM Folder As a Git Repository with Tortoise Git

Update: If you have lost your Tortoise Git overlay icons, you need to do some registry work. See the bottom of this article.

You probably came to this article because you are new to the Git Revision Control System and want to know where to store the "source control database" somewhere other than your own computer.

In my specific situation, I develop software under the Windows OS and I may have some side-project such as some research I am doing outside of my work.

GitHub.com is great, and I use it for my business but in order to get your own private GiT repository, you have to pay. They only allows you to let you have a repository if it is open to the public. But in my case, I use Git not just for software source code but many other types of files, for example, my next epic surf novel.

The main problem for me is that I would like to maintain my small repositories without a need to have an elaborate GiT server. Fortunately a GiT repository server can be nothing more than a file system that's accessible from your computer, and even better there are many "cloud disk" services around, many of them are free. The Dropbox.com based cloud disk is very convenient because it maintains the local cache, so the interaction with GiT is very fast. You just need to remember to allow it the time to synchronize the data.

Before moving forward with my example, I assume that you have installed the Windows Git and Tortoise Git on your Windows machine. I also assume that you have used Git for other stuff, for example at your work, so you are generally familiar with synchronizing your own Git repository against the server.

So here are some very straight forward steps to do.

  1. On your DropBox, create a folder which has the name of your repository. For now I will call it MyRepo
  2. From your explorer go inside MyRepo
  3. Right click and select "Git create repository here..."
  4. A dialog box will appear with a box that says "Make it bare." You need to click that check box and OK.
  5. On  any other local disk, I assume you already have your project Git that you want to synchronize.
  6. Go your local project Git folder.
  7. Right click on the folder from the Explorer and select Tortoise Git, and select Settings submenu
  8. On the dialog box navigate down to the Git node and select the Remote sub node.
  9. You are likely to have the "origin" as the remote repository, but you may have others. Select whichever one you would like to connect it to the one on the Dropbox.
  10. On the URL box, type in the path on the dropbox containing the bare bone repo you have just created. For example, C:\Users\Manabu\Dropbox\MyRepo
Now you can synchronize between your repo and the one on the Dropbox.

Fixing the Lost Overlay Icons

Go to http://www.sitepoint.com/missing-tortoisesvn-file-status-overlay-icons/ for more information. But the key for this is to go to


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers


and then remove anything you don't need above and beyond 11 total that's allowed.






Saturday, July 23, 2011

Do and Don’ts of Email


While I am on the email topic from my previous post, I would like to pass on some of the things that made my email in work more effective. You may want to read some of my tips.

Consider Your Subject Line is Being Like a Tweet

Pack in as much useful information in the Subject line. I consider the subject line the Tweet area to contain almost the “body” of the message. This works because most people actually don’t read all email messages. They look at the subject line list and decide whether they will read the message or not.

Start Your Subject Line with the Name of Your Recipient

Again, compare these lines of subjects

1.     “Tonight’s Dinner Plan”
2.     “Want Join us for a dinner?”
3.     “John Let’s Have a Dinner at French Landry at 6”

Which do you think is most effective? To me, it is the third one. If you read the subject line #3, you almost don’t need to read the body of the email. And I know you will click the email to read on.

Start Your Subject Line with a Verb

Your email will be more effective if you start your subject line more in the “Call for Action” style.

Consider the following examples,

1.     “Blood Donation Drive This Afternoon”
2.     “Donate Your Blood This Afternoon!”

Do Not Send Additional Messages in a Quick Succession

My experience is that if you do that the recipients will only read either the first or the last message and they ignore the rest.

Carefully Time When To Send a Message

This is a bit tricky, but you need to know when your recipient will read your email message.  Most people have their email client set so that the most recent one would appear on top and messages are downloaded automatically. They usually scan only the top 10-20 lines of subject lines on their email clients. So if your message does not make it in that top 10 at the time they are reading, then you might as well consider the message lost.

Another strategy is actually just save it in your draft folder, phone call the recipient and then during the conversation mention to the person you have just send an email.

Typical times people read messages include;

The first thing in the morning
During or just after lunch
Just after dinner

You may want to start tracking the most effective time with respect to your important recipients.

Limit The Message Body Size to One Screen

People are busy (even if they really are not) they can only devote about 1 min of their time to read a message. If you wrote a message that do not fit in one screen then they tend stop reading it, moving on to the next one and never come back to your message.

Organize the Email For The Recipient

You have been frustrated with people who repeatedly ask you to send the same email message over and over again. It is not entirely the recipient’s fault; it is that the email is difficult to manage. Over time you will learn who would be asking for repeats, and in that case, make a CC copy of it on your end, put the copy in a folder with the recipient’s name on it. Then you can quickly re-send.

Use The Phone and Voicemail

If you are dealing with some emotional stuff such as one of you being frustrated, angry or extremely happy etc., then call the person up, or at least use the voicemail to leave your live message. Unless you are a NY Times Best Seller author, it is much easier to convey your emotions via voice. Talk to the person live!


Thursday, July 21, 2011

So What’s So Wrong About Email?


Everyone uses email, even if we asked them not to. I ask people to write issues into our issue tracking system. I ask people not to do attachments, instead upload them to our Google Docs and send links in the email to the document, even then people continue to attach documents, and when it comes to dealing with people outside of our organization, they don’t want to log into Basecamp account we provided, they claim they often cannot see Docs shared on the Google Docs…  Some people in my company think I am the search engine and send emails to me essentially the query to our KB or to the Google.

So what’s wrong with all these? Why can’t they use email for all of the above? It is super convenient to write about a product issue and send an email to someone whom you think can handle. Attachments are one of the best file transfer protocol there is, and I can push files to just about anyone without thinking about FTP or user accounts and passwords.

I am starting to think, can we get rid of the web, and we only use the email? It is an extreme thinking but can such a technology possible?

How would I go about to make this happen in a more realistic way? I think that the future email engines would contain a search engine front-end, a lot more statistics driven choice of automated answers, intelligent filters. This sounds awfully a lot like how Gmail works, for example, and I think they are doing a great job.

Email as the Search Engine:

I would like the search engine to already scan the KB or other places I designate based on the content I received and also the prior usage or response pattern, and suggests  possible responses I may have already written. I often get, “send me the server specifications PDF” email several times a quarter from the same person. I would like to tell the email system, next time this happens, just auto generate a reply. I then do not have to repeat myself.

I am experimenting with this using the “canned” response on Gmail but that’s not very smart yet, and it fires unnecessary responses.

Email as a File Version Control System:

If the email works a bit more like GiT and automatically aggregate the versions of different attachments that come by, and when I look for the attachments, it can give me a list of all versions, this will solve the problem of versions in attachments. This will also bring down the size of the in-box as duplicate files would be normalized.

Email as an Issue Tracking System

Gmail does this fairly well now, perhaps if I tag an email as an issue to track, then all of the related email messages will be visible by the team that I designate as a separate in-box where other people can respond, and workflow tag such as In Progress, Solved are also easy to put in. Assigning an issue is a snap then, I just forward the email to the person. 

Email as a Knowledgebase

May be I can tag some email as a knowledge and the next time I am writing on some topic, dynamic search would be performed to either suggest a response that I already wrote, or other similar email messages I have written in the past.

Most or all of the above can become possible without changing the existing email infrastructure. They are about how email servers are implemented, so it will not break the rest of the world, we do not have to change the behaviors of any of the people I am dealing with now.


Monday, July 18, 2011

DotNetNuke 5 Module Development Tips with Visual Studio 2010

I am jotting down some things I need to remember to know when starting a new C# DotNetNuke module development using the Starter Kit, most of the steps are described elsewhere, notably HERE, but sometimes they contain  wrong information in the original text that you need to dig through the user comments to find out the solution. Also there are a few key things I need to remember to do every time.

Local IIS is a Must for a Newbee DNN Module Developer

Install the base DNN in the local IIS and get that going completely first. It will complicate less for module development as it will need to look up images and other resources in the directory structure.


Where To Store The Project?

The best place seems to be within the DesktopModules folder, create a project directly in there. Then all the references are good to go. By the way, target your project to .NET 3.5

Be sure to uncheck Create Solution Folder box when creating a project in this manner.


What To Type into The Assembly Name and Default Namespace?
  • Type in the same info on both field by replacing YourCompany in the Assembly Name part with what you do, and then copy and paste that to the Default Namespace. This is for C#. I don't know VB at all so I will leave that up to you for VB.
  • Do not do a Globally Replace of YourCompany to whatever. See below!

Do Not Globally Replace YourCompany With Your Real Company


You will get the following type of error message from Edit....ascx.deginer.cs  if you immediately try to compile the project.

DotNetNuke Error 11 'System.Web.UI.UserControl' does not contain a definition for 'Text'

The reason why this happened was that global::DotNetNuke.UI. classes was inadvertently changed by the Visual Studio to global::System.Web.UI

How To Replace YourCompany


Note that order in which this is done is very important. Do not do these in out of sequence.

  1. Make a backup copy of the module project folder so that if you mess these steps, you can get them back.
  2. Open any of the classes in the control. And on the Namespace, right click over YourCompany and use the Refractor menu to change this to whatever you like.
  3. Open the Manifiest file (the one that ends with .dnn). On this one Replace YourCompany. with empty string. This fixes the install folder name from YourCompany.YourModule (make sure that the path does match with how you created your module root directory in the DesktopModules folder.
  4. Save everything.
  5. Make a backup copy of this folder again.
  6. You can now Quick Replace the rest of the files containing YourCompany (for example SQL Provider files). Use the Quick Replace at the Solution level.

Configure the Project's IIS

Next Configure the Project to Use the Local IIS Server so that images, controls and other resources in your development environment. Otherwise, your design surface will have errors. Also if any of the controls on the design surface errors out with a COM error, that means you probably did not follow my previous steps to refactor the classes properly which swapped the controls to the system default ones (not DotNetNuke.UI.Control ones), and ended up globally replacing YourCompany in the classes. You need to start over the project and follow the steps.
  1. Open the project property
  2. Select the Web tab on the left.
  3. Select "Use Local IIS Server"
  4. In the project URL, point it to the URL of your project within the DesktopModules folder. For example, http://localhost/DNN/DesktopModules/MT3 would be that I have the module project named MT3, and I have installed the DNN root at localhost/DNN
  5. Click Override application URL and type in the base URL for the DNN, for example, on my machine it is http://localhost/DNN
  6. This will also create web.config files in the folder which will interfere with the module loading. Rename it to xweb.config just in case you need it in the future.
Debugging

If everything is set right and the DNN itself is a debug version then you can attach to the IIS process w3wp.exe locally and you should be able to set a breakpoint in the project. I will write more as I find out how to do this a bit better without needing to rebuild the DNN from the source.


Sunday, July 10, 2011

GoToMeeting Mac - Microphone Level Adjustment Annoying You?

Symptom:

Every time I start GoToMeeting on my Mac, the microphone level adjusts to a very low level, and you'd need to open the System Preferences to re-adjust this level. You would want to get a single click solution to fix this issue.

Solution:

Use the Automator and create an level adjust applet. It is quite easy to do.

  • On the spotlight search on top right of your finder, type in Automator to locate it.
  • Click on the Automator to launch it.
  • Choose Application (and begin creating an application)
  • Select Utilities from the Libraries
  • Select Adjust Computer Volume
  • Adjust the Input Volume slider to the level you like.
  • Save the Application it creates.
  • Put it on the desktop or somewere you can readily click it.