RailsConf – Day 1 – Git Immersion

June 7th, 2010 by Brian filed in work has no comments

Jim Weirich – @jimweirich

If for some crazy reason you don’t already have git installed, go download it from here – http://git-scm.com/download

Source Control Made Easy – Pragmatic Bookshelf Screen Cast

git config –global user.name “Brian Olore”
git config –global user.email “brian@olore.net”
git config –global core.autocrlf input

git init – creates a new, empty repository

Git is about changes, not files.

Always additive – Information is never destroyed – makes it really really hard to screw up your repository

SHA1 used for preventing duplication – all files referenced using their hash
- Is there additional meta-data that has things like executable flag, etc ??

Tags point to snapshots & never move

Branches point to snapshots and move with commits
Can branch after committing changes
Cheap, local branches

git clone <url> – make an exact copy of remote working copy
git pull <url> – receive changes from remote url into your working copy

Shared remote archive – allows sharing between many users – like svn, but if remote goes away, can still push/pull between users without the centralized repository

git log –pretty=oneline
5e870f0441fb9a30ad2711e186cb46a1cafd9e30 pulling from command line
63537c6c788c4893cf928509339f84cb9f243c6b First commit

git log –pretty=oneline –abbrev-commit
5e870f0 pulling from command line
63537c6 First commit

git add – adds the changes to be committed, not the file. Can have multiple adds

git diff – compare un-staged (things not yet “add”ed)
git diff –cached – compare staged area (things “add”ed) to “commit”ted

Both gitx (for Macs) and gitk (any platform) are useful in exploring log history.

git reset – changes a branch pointer

git reset –hard – changes the branch pointer and checks out into your working directory.

git rebase master – replays branch changes (rewrites commits) as if they happened on master

DO NOT rebase shared branches – only reset/rebase on local repositories

http:/nvie.com/git-model – “A successful Git branching model”

Tags: ,

Make it faster

March 1st, 2010 by Brian filed in work has 3 comments

This past week or so I’ve been concentrating on improving the performance of our system. Thankfully this isn’t a solo task and my teammate really knows what he’s doing. Luckily I was able to contribute based on my past experiences with things like cache settings in Apache, ulimit settings and other tweaks here and there.Make it fast like Pole Postion fast!

We’ve uncovered a slew of things to work on. The first obvious place was to have the static content served by Apache rather than the mongrels. This has been on the todo-list for a long time, but has always fallen to the wayside. We knocked that off and looked towards the other items that were slowing us down. That’s when I uncovered some TCPSocket weirdness within memcache-client 1.7.4 that comes with activesupport 2.3.5.

During some tests we noticed a severe lag which we narrowed down to the fact that we were pointing to a list of memcached servers that contained one that didn’t exist. Turns out that when the memcached hostname resolves, but is not pingable, memcache-client 1.7.4 waits 3 seconds before responding with an error message (in addition it doesn’t mark the server as “down”, which I think is also a bug). This 3 second delay happens on RHEL 4, and in some brief tests on Ubuntu 10.9, it was even worse, taking over 30 seconds to respond. My guess is that there is some OS level setting that affects this, but I have yet to locate it. The fun part however, is that this problem does not exist in our old environment where we run acivesupport 2.1.2 which uses memcache-client 1.5.0.

Turns out, in 1.5.0, the memcache-client uses a 250ms timeout when calling TCPSocket.new. Something that was lost on the way to 1.7.4. Some initial tests of simply adding this CONNECT_TIMEOUT back in have been promising. It’s currently not throwing the right exception or marking the server as “down”, but once I do that, I will see about posting the source somewhere.

Tags: , ,

Snow days & pair programming

February 12th, 2010 by Brian filed in work has no comments

One of the things I really like about my new job is pair programming. On Tuesday of this week, there was a bit of a panic as we tried to figure out how we were going to get work done with everyone in different locations due to the impending snow storm on Wednesday. To me, it was almost comical. I mean, I had been working from home for the last 6 or so years. I never had someone looking over my shoulder as I wrote code. One day wasn’t going to be a big deal… was it? Given the way this team has worked for the last few years, there really was no plan for how to operate when we aren’t all in the same room.

There was talk of iChat and sharing screens and some other not-so-simple-to-setup environment stuff, but in the end we coordinated what we were working on via chat and agreed we’d pair up on Thursday to review changes/updates we made or wanted to make. Even though I ended up doing the same on Thursday (no plow on my street all day, I couldn’t leave the house!), I was able to be productive and reviewed my work today with some team members.

It was weird working from home again. It was definitely different – I had to use my home laptop and my office space was a bit of a wreck. It took a little while to get totally setup with the VPN etc, but I ended up cranking out some good work.

My final conclusion is that I really like pairing, and working in an open space. Maybe I have great teammates, maybe I’m still in the honeymoon phase of pair programming, who knows, but for now, I’m loving it.

Tags: , ,

Worst parts of my new job

February 8th, 2010 by Brian filed in work has 6 comments

Worst parts of my new job:

  1. No more personal bathroom
  2. Coordinating my attire
  3. Not being able to pick through leftovers for lunch
  4. I can’t (easily) hit the gym at say 11am.
  5. No laptop, no cell phone
  6. No one cared if I had bad breath when working from home!

Best parts of my new job:

  1. The people – incredibly smart, and unbelievable willing to take time out of their day to explain how something works or why something was done a certain way. The openness is infectious.
  2. Pair programming with really smart people, like David Black
  3. No email. OK not ZERO email, but with everyone working in the same place, email is rarely used.
  4. No conference calls. Literally none. I had one on my first day which was a “Welcome to Boeing” deal, but zero since.
  5. Ruby & Rails – No more Java, no more WebSphere Portal :)
  6. No laptop, no cell phone. My day is now done when I walk out the door. I can VPN in to check my mail, but see #3

It comes as no surprise to me that the toughest things am dealing with so far are all related to no longer working from home. I’m not completely over the fact that I now get up at 6 & get into the office at 7:30, but I think I am getting used to it. I feel like an old man sometimes going to bed before 10, but I could be doing worse.

Of course the title of this post was written to make you want to read it. I’m really enjoying the new job but need gimmicks to get people to come read my stuff  :)

New year, new job

January 8th, 2010 by Brian filed in work has 4 comments

A few weeks ago, after 10 fun years at IBM I left and took a new job with Skarven Enterprises, a Boeing Company. I call my years at IBM “fun”, because they were – I really did enjoy my time there. Tons of great projects, always playing with new technologies, building applications that targeted all 300,000 IBMers, and most of all, making so many good friends along the way.

At IBM I did a lot of development, in what I now realize was in a non-traditional environment, for better or worse at times. Skaven is hardcore into Agile. It’s actually a fairly thin layer on top of what I was most doing at IBM (other people are worrying more about the semantics of Agile right now), but it adds enough structure & reporting to make me feel like management is aware of what’s going on. It’s kinda cool to be learning about Agile at the same time as a Sprint is already in progress – it’s a great way to pick up on things quickly.

In my new position I’m going to be doing Ruby on Rails development, which means I have to actually learn it! I’m currently going through lotsa of learning: the system, the development environment, Agile, scrum… and the roads to get there! I’m really psyched, and I can’t wait to contribute some real work. That should be coming in the next few weeks after I “pass the Qualifications Board”.

I’m going to start trying to blog more as I figure out exactly what I’m doing  :)

Tags: , ,