Posts Tagged ‘web development’

Magento: my experiences thus far.

Sunday, May 3rd, 2009

If you have been looking around for an open source shopping cart / e-commerce system in recent times, you most likely have come across Magento at one point or another and wondered at how it works in real live.

There certainly are some good things to be said for it. It has an impressive feature set, and an intuitive interface which allows the store admins flexible control over discounts, pricing, taxes, etc. However there are some strong drawbacks to consider before taking the plunge and integrating it on a site.


git – commiting a portion of your changes

Sunday, January 18th, 2009

While code the other day I ran into a familiar situation where I wanted to commit just a few of my changes in a file instead of all of them. Some of the code was needed for a quick fix, but the rest was more in the building / testing phase. I know the better setup would have been to have a branch for the bigger change, and merge back when it was all ready to go, but unfortunately that wasn’t the setup this time.

Doing a bit of researching, I found that using git it is possible to commit some of your changes instead of all of them. To do this I have found the interactive commit command the most straight forward to use.

To begin an interactive commit,  issue the command with the –interactive flag (note, that’s two dashes, not the one long one)

git commit --interactive
           staged     unstaged path
  1:    unchanged        +3/-0 index.php
*** Commands ***
  1: [s]tatus	  2: [u]pdate	  3: [r]evert	  4: [a]dd untracked
  5: [p]atch	  6: [d]iff	  7: [q]uit	  8: [h]elp
What now

As you can see it gives you a number of options. In this case we want to patch the file so we hit ‘5’ and then hit enter.

What now 5
           staged     unstaged path
  1:    unchanged        +3/-0 [i]ndex.php
Patch update

This is showing us a list of files that we can choose to patch from. Hitting 1 will select index.php for patching. You have to hit return again to begin the process after a file has been selected.

Patch update 1
           staged     unstaged path
* 1:    unchanged        +3/-0 [i]ndex.php
Patch update
diff --git a/index.php b/index.php
index 90ea18f..e2f84ef 100644
--- a/index.php
+++ b/index.php
@@ -1,7 +1,10 @@
 this is a test of how to commit partial files
+this is the first addition to the file
 some more changes
+and another line goes here
 and some more testing here... this is fun!
 adding some content to the bottom of the file
+okay, last one for now
 and a couple more
Stage this hunk [y/n/a/d/s/?]?

Hitting ‘s’ will split the current hunk and show you the changes to the file one hunk at a time giving you the option to stage the change or not.

After you are satisfied with how you have things set up, hit 7 to quit when given the option and git will bring you to the familiar comment adding screen.

Doing a git diff right after doing this will show you that only the staged changes got committed, the rest are still waiting there for whenever you’re ready to commit them as well.

Stress Testing Apache Using ab

Sunday, November 30th, 2008

If you’ve ever written a web-app you’ve probably wondered how well it will hold up once the world discovers your awesome service. Will it work if you get dugg? What happens if 200 people all try to access your site at once? This is where benchmarking can provide some useful numbers to give you an idea as to how your server will hold up.


Web Design Business Launch in 3 2 1

Sunday, November 16th, 2008

Over the past few months I’ve made a number of posts regarding various tools that are useful for web developers / contractors. Also, numerous posts on server management and web development in general can all lead to one conclusion… I run a web design company.

Nikki and I have recently launched Triple I Web Solutions. We specialize in developing websites for small to medium sized businesses and non-profit organizations. Our focus is to provide creative, usable web solutions catered to the goals of your organization.

Testing Webpages in Multiple Versions of Internet Explorer

Tuesday, November 4th, 2008

If you have done any xhtml / css, I’m sure you have experienced the joy of making the site look the same in all browsers. Typically went implementing a site, I will first develop it in FireFox to get the general layout correct, then test in Safari, Chrome, and the dreaded multiple versions of Internet Explorer. Recently, a colleague of mine pointed me in the direction of a tool called IETester.