Photoshop pet peeve #402

Why doesn’t Photoshop have a spell checker built in? Honestly it takes long enough to load the app anyways, Id gladly wait another 4 seconds for that feature.

Scrape the members of a Ning site

This is pretty easy to do, after reading through some Ning documentation, and their blog I found this little jewel that list the members of a Ning site via rss.
  • All members -  http://{yournetworkurl}/profiles/friend/feed?xn_auth=no&sort=alphabetical&page=1
  • Recent members -  http://{yournetworkurl}/profiles/friend/feed?xn_auth=no&sort=mostRecent&page=1
  • Featured members – http://{yournetworkurl}/profiles/friend/feed?xn_auth=no&featured=1

I promise to share my scraping techniques at another time -  just thought I’d share the rss feed urls.

Coining the phrase ‘Merge Hell’

merge hell (noun) merge hell occurs when you have branches made from branches, with work on similar features or the same pages between the two branches and you then need to merge a branch into a branch, and then that branch into trunk. The time you spend doing those merges will now be known as merge hell.

Most of this can be avoided by implementing a good SVN process – SVN processes can vary from company to company, but the general work-flow should be as follows:

1. A developer or group of developers is given new task, requirements or specifications. They will need to keep these additions, features, changes in a new branch – so you create a branch from trunk, where trunk is an exact replica of your production code.

svn cp http://svn.ourwebsite.com/repos/trunk http://svn.ourwebsite.com/branches/newfeature

2. The team or individual does all their work inside the newly created branch. Once the work is done* it is time to merge trunk into our branch. You can do this by changing into the directory of the branch and first testing the merge process by using a dry run.

cd branches/newfeature
svn merge --dry-run http://svn.ourwebsite.com/repos/trunk

At this point there is two outcomes, a perfect merge with no conflicts – or merge hell.

If you find yourself in merge hell, you’ll have to defend your branch by manually defeating conflicts. Merging conflicts is an art, often times you’ll need to pull developers in and go line by line to figure out what needs to stay and what can go. Merge hell is multiplied by the size of your development team concurrently working on projects that have branched from trunk and merged back. But by first merging trunk into your branch then reintegrating your branch back into trunk hopefully you can stay out of merge hell.

Continuing on, once your conflict free – you can then run the merge.

 svn merge http://svn.ourwebsite.com/repos/trunk

Then to signify your merge of trunk you can commit merged files to the branch.

svn ci -m "Merged from trunk"

3. Now is a great time to test your branch, in fact you will need to, to ensure that nothing was broken with the addition of your new code and the merging of trunk into your branch. See *Once the work is done, because those same things may happen here as well. So, once the work is done – we have bug-free code*.

If we have made it this far – your code has passed some sort of QA and/or testing, and those processes, including fixing the errors that those processes uncover, take time. Within this time, especially within larger teams, another feature may have made it into trunk, giving merge hell another chance to show its face. If there is new features in trunk you’ll need to re run the above merge process in your branch (go back to step 2, do-not pass go, do-not collect $200). Potentially, your branch could be stuck in this step indefinitely, depending on the planning and communication levels of your team(s). One thing is for sure you do-not want to be stuck at this step on the day of a production push, you want to be beyond it.

4. Time to integrate (re-integrate) your branch into trunk. And, since your branch is now a working copy of trunk with your work/feature included this should be merge hell and file conflict free.

Check out a copy of trunk, merge in your branch and commit to trunk

svn co http://svn.ourwebsite.com/repos/trunk trunk
cd trunk
svn merge --reintegrate http://svn.ourwebsite.com/branches/newfeature
svn ci -m "Re-integrated new feature into Trunk"

*Once the work is done – often times this can refer to when the developer feels he is done coding, or this may also refer to a full fledged qa hand off prior to merging trunk, or this may refer to just the running of selenium and php unit tests, or even a stakeholder review – whatever the case may be at your company.

*Bug-Free Code refers to software with fewer bugs.

Professional 6 Month Goals

Ive been working at IntegraClick for a over a year now, and recently was asked to fill out the below form, detailing my professional goals for the next 6 months. I figured to post it here for the world to see, since it may help me actually accomplish these goals by making them public.

Goals:

1. Become fully prepared to take the Zend Certification exams for PHP 5.3

How I plan to achieve this goal: Although I am proficient in my daily use of PHP, I will explore the language farther, and read the Zend Study Guide for the exam. I think by the end of 6 months I will be ready to take my first practice exam, so I can determine which areas I need to improve.

2. Re-factor our news feed system, and completely remove its use of EJS (embedded javascript) views and jMVC (JavascriptMVC).

How I plan to achieve this goal: Since we have decided to pull away from jMVC (more on this at some other time) from our main application, I would like to completely re-factor the news feed systems away from it, I will accomplish this by re-factoring on down time.

3. I would like to become more productive when writing back-end code, whether it be controllers code, table methods, Doctrine Queries/DQL, etc.

How I plan to achieve this goal: I think my plans to study the finer points of PHP  in preperation for the Zend Certification will be a large contributor to this goal.

A new blog, again.

Well it’s that time again. This new year’s resolution includes making a blog post once a month (This one doesn’t count.). That seems totally do-able, 12 blog posts and one year to do it in.