SVN Merge - Merging a Branch Into the Trunk

By: SethCardoza - Published: 2009-03-06 21:04:02 in Category: Version Control

So you've created a branch for one reason or another, mainly to make sure that the trunk stays stable and doesn't create chaos for the other developers on your team. You've committed several changes to this branch and thoroughly tested them to make sure everything is in working order. Now how do you get them back into the trunk? This is how.

You should have a local copy of the branch since that is where you have done the development.

/local/path/to/repository/branch

Now, if you don't already have a copy of the trunk locally, get one. Navigate to your local copy of the trunk.

/local/path/to/repository/trunk

You will need the revision number of the revision when you created the branch. For the sake of this example, I will say that the branch was at revision 100. Now run the following command to merge the branch into your local copy of the trunk.

svn merge -r 100:HEAD https://svn.example.com/path/to/repository/branch/my-dev-branch

You should now see that the files modified in your branch have been merged in your local copy of the trunk. Some files may be in conflict, and will have a "C" next to them in the file list after the merge command was run. You can also run an svn status to see if any files are in conflict. Resolve all conflicts, manually if necessary. Now make sure everything is working on your local copy of the trunk. If so, check your changes into the trunk.

On a side note, I like to tag the trunk before I merge a branch back into it. It just puts my mind at ease knowing I have a snapshot of a known working copy of the trunk.

Book Review: Watchmen

By: SethCardoza - Published: 2009-02-27 23:18:27 in Category: Book Reviews

Watchmen is a graphic novel based in an alternate 1985, where Richard Nixon is still President. Costumed heroes have been outlawed, except for those sponsored by the government. The fear is that people with that much power can wreak havoc if unchecked. The story starts off with the death of The Comedian, a costumed hero that has done a great deal of work for the government. Rorschach, another costumed hero, one that is not government sponsored, finds his death very suspicious. He investigates his death, and the eventual deaths of other costumed heroes. The character profiles and personalities are not particularly original, especially to those big into comic books, but they are based on tried and true characters that work.

The time setting is obviously dated, but story itself could easily be adapted to the present day. There is plenty of detail, both in the writing and the artwork, that will make you want to read this over so that you don't miss anything. There are some excerpts from an biography written by one of the characters that do give some important details to the back story, but they can be a bit long and dry. It would have been nice if these details were worked in more seamlessly with some artwork, rather than the excerpts used.

Overall, the book is a great work of art. With the movie due out in less than a week, I recommend reading it before seeing the movie. I think the movie will be good, but will not do the book justice. It will be a tough story to adapt to film. The excerpts I mentioned earlier will have to be told instead of read. Something I neglected to mention, the comic within the comic, will hopefully make it into the film in some way or another. It is not key to the story, but it is one of those little touches of detail that makes the book great.

Building for the Future

By: SethCardoza - Published: 2009-02-26 21:28:50 in Category: Agile Development

If you're building for the future, you're doing it wrong. That isn't to say that you should cut corners wherever possible. The key is to spend your time building what you need now. If you concentrate on building what you need now, you will be able to do a better job. You will be able to refine every subtle detail, catch most bugs (create fewer bugs in the first place), and finish on time.

Building for the future rarely ends well. Time and resources are spent on building for something that might never be used. Can you guarantee that your product will make it to the future for which you are planning? Can you guarantee that the features you are prepping your system for will make it to fruition? How often to specifications and requirements change during a product's life cycle? There is a chance your product will fall. It is highly likely that new ideas will come about and features you planned on building are no longer wanted.

Rather than spend your time building for the future, build for what you need now, and spend the time to do it right. Making a small, but robust, set of features work properly will give your product a higher success rate than building for features you might add later.

The Benefits of Agile Development

By: SethCardoza - Published: 2009-02-21 23:18:35 in Category: Agile Development

Note: If you are completely new to the Agile Development methodology, I suggest you read up on it first as I will use quite a bit of terminology particular to the methodology.

While I think Agile Development is a better approach to web development when compared to the waterfall approach, and loosely practice it in my personal projects, we only just recently implemented it at work. We finished our first sprint this week, and completed a block of work in 9 days that I thought would take months with our old process. To be fair, we doubled our team from 3 developers to 6. While we did greatly increase the size of our team, the biggest factors were having a concrete set of tasks for the sprint, and not wasting hours per week in status meetings like we had in the past.

The best thing about the switch to the Agile Development process was that fact that everyone is happier. We are a large publishing/media company with limited web development resources. The business units are constantly fighting to get their work done. Now, they get to pick what gets done within a given sprint. In the end, there's no reason for them not to be happy anymore, and they are much happier now. I have been working on this project for 9+ months, and only recently have started to receive praise from the business units for our hard work. On the other side of things, developers are equally as happy, if not more. We are not being constantly pulled in every direction, our highest priorities no longer change on a day-to-day basis. We are able to concentrate on a specific set of tasks during the sprint, and are able to see those tasks completed. We can see the fruits of our labor. And, if there are interruptions, it is understood that a change in priorities will affect the time of completion for our tasks.

Another great thing about this methodology is that it is understood that no one get 8 hours of work done in an 8-hour day. There are interruptions, meetings, time is taken to help team member solve their tasks, and etc. Currently, it is assumed that we can complete 6 hours of work in an 8-hour day, and we plan the work items in the sprint accordingly. If at the end of the sprint, it is determined that we can complete more or less work in a given day, we plan accordingly for the next sprint.

It has only been a couple weeks since we started implementing Agile Development, and there will be plenty of kinks to work out, but it has already made a tremendous difference. The business units are happier, and are in more control of their products. The developers are happier and in more control of their code and how things get done. Realistic expectations are set, and goals can finally be met.

Discover New Music With Last.fm

By: SethCardoza - Published: 2009-02-06 22:28:56 in Category: General

If you don't know, Last.fm is an internet radio station. You can learn more about the general stuff on the website. This post is about how to discover new music now that you are using Last.fm. Here's a list of some ways to discover new music with Last.fm

  • Last.fm recommended music station
  • Listen to an artist
  • Listen to friend's radio stations
  • Listen to tags

The easiest way to discover new music is to listen to the Last.fm recommended music station. This is tailored to you based on the music you already listen to. Depending on how diverse your taste in music is, this will play music from numerous genres

Selecting a specific artist will usually play at least one song from that artist, and then similar artists, usually in the same, or similar genres. So if I were to start listening to Rolling Stones, this station would most likely not play Ludacris.

You can befriend people on Last.fm and listen to their radio station. This is a great way to discover new music, especially if your friends have different tastes than you do.

Last, but my favorite, is tags. You can type in a tag, and listen to music that has been tagged with whatever you've typed in. This can be as general as basic genre like, rock, rap, hip-hop, techno, and etc. The really interesting thing is putting in more obscure tags. Some of my recent favorite are, progressive metal, video game rock, mega man, and underground.

K-Lite Codec Pack for Mac

By: SethCardoza - Published: 2009-02-01 20:00:02 in Category: General

I had to do a bit of searching to find this, so I figured it would be useful for others. If you're newer to OS X and Quicktime, and are used to using the K-Lite Codec packs for Windows, you're probably wondering what to do for your Mac. Download Perian, and install it. It will be all that you need.

Achieving Your Goals

By: SethCardoza - Published: 2009-01-31 14:08:50 in Category: General

Having a hard time losing the weight? Just can't seem to find the time to start learning a new programming language? Make it a contest. Find a friend that wants to achieve a similar goal, and make a friendly competition out of it. Set a goal, lose 5 pounds in a month, write a basic application in the new language in a month's time, the loser buys lunch. It's enough of an incentive to want to beat your friend, but nothing that will ruin the friendship*.

*Seth Cardoza provides no warranty as to the status of your friendship at the end of the contest.

Super Bowl Office Pool Sheet

By: SethCardoza - Published: 2009-01-26 20:54:26 in Category: General

It's that time of year again. Yep, time for some office gambling. I whipped up a quick sheet and figured I would share it with the world. I'm sure someone will need one, and this will look somewhat professional. Click here to view and print, and see below for a preview.

Preview Super Bowl Office Pool Sheet

Integrating Akismet with CakePHP

By: SethCardoza - Published: 2009-01-22 20:53:23 in Category: Don't Rewrite Wordpress

Fighting comment SPAM is an ongoing battle. When I first created the ability to add comments, I used a simple hidden field and session token thinking that would handle most of the SPAM. That failed quickly. I soon had hundreds of comments linking to Viagra and the like. I put a bandage in place flagging any comment posted that had more than one link. I didn't expect it to work forever, but hoped it would hold up longer than it did. But, my site soon had SPAM comments all over again. I had to do something more permanent, and fast. I found a class written by Felix Geisendörfer, integrating CakePHP with Akismet.

I quickly downloaded and added it to my project. It didn't work! Luckily it just needed to be updated to work with CakePHP 1.2. It was a simple fix and I was on my way to turning the tides in the fight against comment SPAM. After updating the class to work with CakePHP 1.2, it was as simple as making a few calls to the class, passing the necessary information. I posted the updated class to CakeForge, allowing me to give back to the open source community for the first time.

All of this functionality is built into the latest version of Wordpress, but being the stubborn person that I am, I'm sticking to CakePHP, loving every minute of it, and learning a great deal along the way.

CakePHP Upgrade from 1.1 to 1.2

By: SethCardoza - Published: 2009-01-10 23:32:18 in Category: CakePHP

CakePHP 1.2 has finally released, but how do you upgrade site your site running CakePHP 1.1? It is a fairly simple process with brief formal instructions on cakephp.org. Most will only have to make a few changes as CakePHP 1.2 is not backwards compatible. All of the html helper form element methods have been moved to a form helper. This means that this:

    <?php echo $html->input('username'); ?>

becomes this:

    <?php echo $form->input('username'); ?>

One other big change was the removal of the generateList() method used to create an array for later use in select elements. The change in code is as follows:

    <?php $this->ModelName->generateList($conditions, $order, $limit, $keyPath, $valuePath); ?>

becomes this:

    <?php $this->ModelName->find('list', $params); ?>

The upgrade instructions provide a possible migration approach suggested in the documentation. It was a relatively simple process, only taking a few hours, including a good deal of testing.

Visit A Comic Shop

By: SethCardoza - Published: 2008-12-29 21:31:10 in Category: General

If you are in the Orlando area and enjoy comics, A Comic Shop is the place for you. It's small, but has a great selection of current comics. If you're looking for something a bit older, they'll be more than happy to find it for you. All the employees there are knowledgeable about their products and often give great recommendations for something new.

If you aren't into comic books but want to get started, A Comic Shop has a great program for you. Most comic shops have one free comic book day each year, where you have to wait in line with everyone else to get a staff selected free comic book, which will not suit every one's interests. A Comic Shop updates free comic book day for today's generation with My Free Comic Book Day. If you follow the link, you can print out a coupon for a free comic book up to a $3.99 value. You can pick out anything in the store, and if you don't know what might interest you, ask the staff and they will be glad to help you find something.

Amazon Discontinues 30-Day Price Guarantee

By: SethCardoza - Published: 2008-12-27 20:35:31 in Category: General

While it was some time ago, I recently found out that Amazon.com has discontinued it's 30-day price guarantee as of September 1, 2008. For those of you who may not know what this is or the incredible value of it, it was an excellent service that allow you receive a refund of the price difference within 30-days of the purchase if the price of an item had decreased. This made many people feel more comfortable purchasing from Amazon, since their prices fluctuate on a regular basis. Coupled with Amazon Prime (free 2 day shipping on most orders), it was a system that almost guaranteed people would return to Amazon often. I think this is a mistake on Amazon's part. I'm sure they didn't make as much money in the short term, with having to issue refunds often. One thing it did do though, was give people confidence in doing business with Amazon, and most likely created many return customers, something that is very difficult to do online.

SVN Switch - Switching to or from the Trunk to a Branch

By: SethCardoza - Published: 2008-12-21 23:40:23 in Category: Version Control

I recently had to make my first branch on a project using svn. Making a branch is easy enough with svn copy, but where do you go from there? You could check out a fresh copy of the branch from the repository, but you already have the environment setup and working for the trunk copy. There is an easy and elegant solution, and it lies within svn switch. First navigate to your working copy via the command line. Now to switch to a branch, or tag, in the repository, simply type:

svn switch http://svn.example.com/project/path/to/repo/branch .

Your working copy will now be the branch copy, and any committed changes will go to the branch. It is a simple and easy to use command that should speed up your development.

Book Review: The Non-Designer's Design Book

By: SethCardoza - Published: 2008-11-09 16:46:31 in Category: Design

The Non-Designer's Design Book

I am more of a developer than a designer. However, web development does not allow me the luxury of focusing only on development. My work constantly forces me to make design decisions, big and small

One of the best resources that I have found is "The Non-Designer's Design Book". It is a great book and perfect for its target audience. The Non-Designer's Design Book does an excellent job of covering the basics of design, and is an invaluable resource to those that have no design skills.

It covers four basic design principles:

  • Contrast,
  • Repetition,
  • Alignment,
  • Proximity,

and notes the unusual acronym created, and that it only makes it easier to remember. Each principle is analyzed and reviewed in detail, providing numerous examples for each. The abundance of examples is great, especially since each example covers a slightly different nuance to the design principle. Even the most skilled designer could learn something from this book.

Latest Version of Hotmail Lacking in Usability

By: SethCardoza - Published: 2008-11-05 22:45:48 in Category: Usability

Recently, Microsoft has done a great deal of remodeling to Hotmail. Most is just the transition to Windows Live Mail. The first revision was hard to get used to, as change usually is, but I eventually grew to like it more than the original. There's all kinds of AJAX functionality to make it more modern and to keep up with GMail.

Microsoft's latest changes make Hotmail almost impossible to use. It seems like they were trying for a more minimalistic approach, but went to far. As you can see in this screen shot, Screen shot of new Hotmail buttons are almost impossible to decipher from the rest of the page. The buttons are little more than text links, lacking and sort of hover event other than an underline. My folders on the left hand side blend in with the rest of the sidebar and even the message pane. What Microsoft needs to do, is accentuate the borders on the individual panes more, create larger, more discernible buttons, and have a hover event that clearly lets me know which button I am about to click on. Microsoft needs to make improvements to their system, not worsen it, or it will never be able to keep it's customers from moving on to better services like GMail.