Wednesday, November 23, 2011

How to open multiple Gmail accounts in Chrome...

[Although the title of this post relates specifically to Gmail, this feature / functionality can be used for a wide assortment of online applications.]


I love the Google Web Applications, including Gmail, Calendar and Reader.  I also manage many Gmail accounts for various reasons.  One thing that I find myself doing a lot is switching from one Google Account to another.

Typically, I start my day by logging into my personal Gmail account.  However, there are times when I have to create a new appointment using a different Google Account.  I used to do the following steps:

  1. Log out of my personal account
  2. Log into the account that I want to create the appointment in
  3. Create the appointment
  4. Log out of that account
  5. Log back into my personal account
I always wished there was a way to stay logged into my own personal account, open a tab, log into the other account and do what needs to be done there, but unfortunately that does not work.  If you are already logged into Google, when you open another tab to another Google resource (gmail, calendar...) it keeps you in the same account.

The way around it is to use Chrome's Incognito mode.  If you are logged into a Google account, create a new window in Incognito mode (File -> New Incognito Window).  In that window, you can access another Google Resource under a different account, all the while staying in your original account on the first browser window.

This neat little trick was introduced to me by a co-worker, and it has been a real time saver.  I hope that it is a timesaver for you as well.

Pay it forward.

Thursday, November 17, 2011

What has been keeping me busy...

Every once in a while, your world gets turned upside down.  Someone challenges you to think different, and because of it you will never be the same.  After developing software professionally for the past eleven years, I have had the pleasure of being introduced to some new ideas and concepts, that have caused me to rethink how to develop software.

There will be more to come, but I thought I would send out this little teaser of what I have been spending time with.

Disruptor

Imagine someone suggesting that the way traditional way of scaling and boosting performance by adding more CPUs is not correct.  Then imagine this same company that made this suggestion is proving it by processing more than six million orders per second on a single thread.  LMAX has done just that, but more than that, they have completely open sourced their findings and their Java solution.  Wondering how to write your next multi-threaded application?  You should definitely give the disruptor some attention.

Event Sourcing

While learning about the Disruptor, I came across a new term that I had never heard of before, but one that I will never forget.  The easiest way to think about Event Sourcing is when you think about your bank account.  How does a bank determine your current balance?  It rolls up the debits and credits of your account since the beginning of your account.  What if we applied this same technique to our data model when developing software?  We would be able to look at the system and our data at any point in time.  Anyone likes to guess the state of the system at 2 o'clock in the morning after being woken up due to a production issue?

Events are not just for notifications, by Greg Young, is a great introduction to Event Sourcing.

CQRS

Last, but not least is my current obsession.  During Greg Young's talk, he mentioned something called CQRS.  Since I was so impressed with what he had to say about Event Sourcing, I thought I would look up what CQRS is all about.  In a nutshell, it is an alternative to N-Tier Software Design (Database Tier, Services Tier, UI Tier).  It allows software to be designed and tested with behavior.  Grounded in the principles of Domain Driven Design, this architecture has taken me a while to understand, and I am still learning.  The implications of what is possible with it, are amazing.

To learn more, I would recommend the following:

If you would like to get your feet wet in what it would be like to develop software using these principles, I would highly recommend the Axon Framework.  I have been using it for a month now, and it is great.  Not to mention the documentation is outstanding and the responses that I have received on the mailing list has been wonderful.

So, that is what has been keeping me busy.....there will definitely be more to come, but I thought I would offer this as a primer before digging in too deep.

Tuesday, October 11, 2011

Use compile errors like bookmarks....

I have started a new practice and it is really working out great!!!  I am using compiler errors as my means of knowing where I left off on a certain task.  For example, it is 4:45, and my wife is cooking a mean meal (by "mean", I am saying that if I don't get home on time, then she is going to be very mean to me for the rest of the night).  I don't have time to fix all of the compiler errors so I just check it in to version control.  That way, when I come back to work in the morning, or after the weekend, I know just where I need to start again.

The best part of this new process, is that none of my co-workers mind.  At all.  They don't care one bit.  They actually do not think that it impedes on our Test Driven Development practices or our Continuous Integration Builds......amazing, eh?

How am I getting away with this new process of mine?  If you haven't guessed it by now, it is because I am using Git.  My checkins that I do where things don't compile, are only checked in locally to a branch on my computer.  The rest of the team doesn't see these compiler errors, and therefore, they are never affected.

Just one more reason why you should look at distributed version control - no more "mean" dinners for me.

:)

Wednesday, July 27, 2011

Groovy / Grails Training

Today begins the second day of a four day Groovy / Grails training class that we are giving to Grand Valley State University. This is the second time that I have given this training and I couldn't have asked for a greater class.  The students are experienced, energetic and fun.  During the Object Oriented Analysis and Design portion of the class, they came up with solutions to the workshops that were very creative and interesting.

Today we will complete the Groovy portion of the training.  We are going to review:

  • Collections
  • Closures
  • Groovy Sql
  • Testing
  • Meta Object Programming
The remainder of the week, we will be discussing Grails and the various technologies that make up the Grails framework.

If you or your team is interested in Groovy / Grails Training, feel free to contact us.

Monday, May 2, 2011

Git and Subversion :- New Subversion Branch Created

If you have read any of my previous blog posts before, you know that I am use Git in order to track Subversion repositories. Recently, I had another experience that I had to resolve and I wanted to make sure that I share it with you.

The team decided to cut a branch of the code that I have been tracking. After they did that, I ran git svn fetch. After doing this, Git realized that a new branch was created and it started to search through the subversion repository to pull back any history that it might not have.

This probably is a good idea, if I were tracking the entire Subversion history, but I am not. The result was Git was starting to pull back history that I didn't have in my Git repo, nor history that I wanted. It would have taken hours to pull in that amount of history, and as I mentioned, I was not interested in retaining the whole entire repository.

In order to resolve this, I performed the following command:

git svn fetch -r:HEAD --no-follow-parent

I think that the most important part of this command is the --no-follow-parent. This tells git not to look back in time at the history, and just pull in the information from the specified starting point.

I hope that this helps someone else out there....

Pay it forward.

Thursday, April 14, 2011

Git Push :- Only Current Branch

Recently, when sharing a bare repository on my machine with one of the members on my team, we ran into a funny scenario. But first, it is probably worth mentioning the following information:

  • We are currently using git to push to svn
  • We have a master branch that is tracking the svn/trunk

I created a new bare repository that will allow us work together on a specific task. When using Git, you only want to push into a bare repository (a repo without a working directory), instead of the real one. He was able to pull the code just fine, but when he tried to push the changes into the bare repository, not only did it try to push the branch that we were currently working on, but it also tried to push the master branch as well. That is because the bare repository that I created, had a master branch, and so did his local, and therefore it was matching on that branches name. (Note: I was also experiencing this same behavior).

After Googling for an answer to the behavior and hoping to get the desired behavior of only pushing the changes from the branch that I am currently on, I found git push current branch, on StackOverflow. If you are like me, and want the desired behavior of only pushing the current branch that you are on to the remote repository, and not all of the branches, just run the following command in your git repository:

git config push.default tracking

There are other options besides 'tracking' but this is giving me the desired behavior that I was looking for...

Enjoy...

Tuesday, April 12, 2011

Git and Subversion :- Bringing others on board...

In the previous post, Pulling a Subversion Repository into Git Locally, I shared the process that I went through in order to pull Subversion into Git so that I can start using Git locally with Subversion as my remote repository. Since that time, I have been trying to figure out the best way to get Git to Subversion repositories set up for others on my team. I have gone through a lot of trial and error and now I believe that I have finally come up with an easy step-by-step solution.

Before I begin, let me first say that you probably want to follow these instructions for two main reasons:

Cloning a Subversion Repository is very time consuming
If you have never cloned a Subversion repository using Git, you will be amazed at how long this process can take (depending on how much history you want in Git). I typically chose 1000 revisions in the past, and that could take up to an hour or more. This is no fault of Git, instead, Subversion is to blame. With this process, only one person has to incur that time investment. Everyone else, can just reap the benefits without the hassle

Fetching too much data
This was the problem that has stumped me for months. While I was able to alleviate the first challenge of the time investment for everyone, I could not figure out why Git was trying to retrieve so much history from Subversion. This amount of history was even earlier than the 1000 revisions of the initial clone. Finally, I figured out that it has to do with a property called branches-maxRev. Through the use of this property, we can make sure that when you perform git svn fetch, that it will not attempt to retrieve any more history than necessary. So, let's get started

By this time, I am already assuming that you have followed the directions from Pulling a Subversion Repository into Git Locally, and you already have a Git repository with the amount of history from Subversion that you desire. From that point:

  1. Navigate to your git repo. Not the .git folder, but the folder containing that folder
  2. Open your browser to the git svn man page
  3. Scroll to the bottom section titled Basic Examples, and look at the third example
  4. Locally, start the git daemon server by typing: git daemon. This will start a git server on your local machine that will allow others to pull from you.
  5. Follow the instructions from the Basic Example starting with mkdir all the way to the end. Please note that the line that section that says server:/pub/project must be replaced with a valid git url (for instance git://jdcarlflip.blogspot.com/path/to/git/repo)
  6. Once you have finished those instructions, in your newly created repo, open the file .git/svn/.metadata
  7. Inside of there, you want to put a line under the uuid similar to the following branches-maxRev = 11111 where 11111 is the revision number that you do not want to go past. If you don't know what to put in there, look back at your original repo that you cloned from, and use the same number.
  8. After you have done this, type in git svn fetch, and it should not attempt to retrieve any revisions that are older than the ones you have already

If there are any questions, please let me know.....Enjoy.

Thursday, February 24, 2011

Mobile Dev Day :- iOS Development

This past weekend, I had the wonderful experience of going to MobiDevDay Conference that was held in my hometown, downtown Detroit. It was an amazing conference, and a big thank you to all of the work and effort that went into making it such an excellent and wonderful experience.

Since I am familiar with the concepts of Android development, I decided to spend some time looking at what it takes in order to develop an iOS application. I have never, ever seen what Objective-C even looks like, before this conference, and I am glad that I made the decision to look at it.

....fast forward to yesterday....
I was having lunch with a friend of mine, who is a polygot programmer. He told me about a wonderful FREE series on iTunesU from Stanford University that really helped him learn how to develop Objective-C.

If you are interested, here is the iTunes link.

Enjoy....