steve.blog - Home tag:www.stephenbartholomew.co.uk,2008:mephisto/ Mephisto Noh-Varr 2008-06-13T15:23:35Z stephen tag:www.stephenbartholomew.co.uk,2008-06-13:225 2008-06-13T15:23:00Z 2008-06-13T15:23:35Z Using Git with multiple staged deployments <p>Like most developers, at <a href="http://www.curve21.com">Curve21</a> generally have our applications set up with 2 remote environments - staging &amp; production. New developments are deployed to the staging server for final checking &amp; sign-off before being pushed out to the wilderness.</p> <p>We've also (as many have) recently moved to using Git for a source control. A lot has been written about Git in the past few months and suffice to say we've found it fantastic. One thing I've not seen a lot about though is how to deal with different deployments targets.</p> <p>Here's an idea we've had which we're trying out on a project. I'm interested to get feedback and to hear about any other ways people are working with Git.</p> <h2>The Idea</h2> <p>Basically, we need to be able to do the following:</p> <ul> <li>Work on a new feature </li> <li>Push the new feature out to staging</li> <li>Switch back to the production code for bug fixing</li> <li>Push the staging features to production</li> </ul> <p>So, here's the setup we're testing out:</p> <ul> <li>Remote repository has 3 branches - master, staging &amp; production</li> <li>Local repositories can push/pull to these branches</li> </ul> <p>The 'new feature' workflow looks like this:</p> <ol> <li>Create a branch for a new feature</li> <li>Merge new feature into master</li> <li>Rebase master into staging</li> <li>Deploy to staging server</li> <li>When ready, merge staging into production</li> <li>Deploy to production server</li> </ol> <p>With this setup, you have ultimate flexibility over what goes where. The master branch tracks the main development which is shared to all developers. When a new feature needs to be tested it can be easily pushed to the staging server.</p> <p>If there are bugs to be fixed in production, these can be fixed in the production branch and deployed without picking up or affecting the items in development or out on staging. Capistrano can pick up any branch you ask it to for a specified environment.</p> <p>Once we've tried this out and fine-tuned it, I'll post the results. If it works and others are interested, I'll sort out a tutorial for our we're doing it.</p> <p>So - feedback &amp; questions welcome! </p> stephen tag:www.stephenbartholomew.co.uk,2008-05-16:222 2008-05-16T16:37:00Z 2008-05-16T16:39:36Z Protx: An update <p>Last year I wrote a rather <a href="http://www.stephenbartholomew.co.uk/2007/7/27/protx-making-customers-feel-like-shit">angry post</a> about the quality of service provided by <a href="http://www.protx.com/">Protx</a> during a system upgrade.</p> <p>This caused a bit of a stir, possibly due to the high Google ranking and certainly the derogatory tone of the post.</p> <p>I've since been contacted by Simon Black who took over as Managing Director of Protx last year. He has been pushing through a number of changes that he hopes will improve the customer support experience. </p> <p>One of the more apparent surface changes is an update of the <a href="http://techsupport.protx.com/contactus.asp">Protx support pages</a>. The change in tone from the <a href="http://www.stephenbartholomew.co.uk/2007/7/27/protx-making-customers-feel-like-shit">original</a> pages is very positive: <hr /> <i>"At Protx we are passionate about providing high quality support and service to our customers. Our technicians are trained to ensure that they provide you with a professional service and the correct technical response to your question. </p> <p>We are happy to speak to you over the phone, communicate via email, or if you prefer you can resolve the query yourself using our in-depth website. You choose the method that’s best for you. </p> <p>We aim to pick up calls within 60 seconds and respond to emails within 24 hours."</i> <hr /> Simon also sent the following update on the progress they've been making to improve the service: <hr /> <i>"Since last August Protx has transformed it's support operation by more than doubling the size of the team and investing in training and development. During 2008 there will be continual improvements to the way we provide customer service which will include overhauling the entire Support web pages.</p> <p>Our aim is provide an excellent customer experience and we are proud to receive feedback showing that this is now happening more and more. The software platform we launched last Summer has resulted in a significant decrease in the number of Support issues raised on average. It has also allowed us to launch new features, for example, a much more efficient method for taking regular payments.</p> <p>In the coming months and years we will invest significantly to ensure we provide a great service, remain the easiest payment gateway to integrate with and provide more and more added value to our customers' businesses.</p> <p>Any customers or developers that are unhappy with the service they have received from Protx can send an email to feedback@protx.com and they will receive a prompt response from one of our senior managers."</i> <hr /> I'm not sure I'd use Protx again, but I think it's great to see positive action being taken on something as important as customer service. </p> <p>Customer service is a product itself in any successful company. It should be treated with the same care and attention as you give other products you sell. </p> stephen tag:www.stephenbartholomew.co.uk,2008-05-14:219 2008-05-14T20:59:00Z 2008-05-15T10:04:24Z StaticMatic 2 is coming <p>StaticMatic is currently going through a major over-haul. There are loads of great features in the works as well as changes to the way to core works. </p> <p>The major change is that StaticMatic 2 will now use ActionPack. This means we get loads of great new features:</p> <ul> <li>Any templating language you like</li> <li>Access to all ActionView helpers</li> </ul> <p>On top of this we also now have:</p> <ul> <li>Rake tasks for commands</li> <li>Better error handling</li> <li>'Modified Date' sensitive building of static files - StaticMatic now only builds files you've modified</li> </ul> <p>We're also now hanging out with cool kids on github: <a href="http://github.com/stevebartholomew/staticmatic/tree/master">http://github.com/stevebartholomew/staticmatic/tree/master</a>.</p> <h2>Call to Arms</h2> <p>Now, we need your help. StaticMatic 2 is not yet feature complete. There is still a lot of work to do with getting all the current features in as well as working up the new stuff.</p> <p>What we need is for you to try out the new features on your existing StaticMatic sites. The great thing is, you can run the new version without conflicting with the current one:</p> <ol> <li><p>Download the edge version into your site's root directory:</p> <p>~/Sites/mygreatsite $ git clone git://github.com/stevebartholomew/staticmatic.git</p></li> <li><p>Create a Rakefile in your site's root containing this:</p> <p>require 'rake' require 'staticmatic/lib/tasks/staticmatic'</p></li> </ol> <p>That's it. You can use the new StaticMatic commands:</p> <pre><code>rake preview rake build </code></pre> <p>Or you can use your Gem version:</p> <pre><code>staticmatic preview . staticmatic build . </code></pre> <p>The main thing that needs testing is integration into ActionView - try out the helpers, see what happens. There's a fair few hoops to jump through to make ActionView happy being separated from ActionController so it can play up!</p> <h2>New to StaticMatic?</h2> <p>If you're new to StaticMatic, you can try out the new version by installing the current one and creating a new site:</p> <pre><code>sudo gem install staticmatic staticmatic setup mygreatsite </code></pre> <p>and following the instructions above.</p> <h2>Be Gentle!</h2> <p>There's a fair way to go before we're ready for a release, but hopefully you can still have fun trying out the new features. Join us over at the <a href="http://groups.google.co.uk/group/staticmatic">Google Group</a> for more discussion.</p> stephen tag:www.stephenbartholomew.co.uk,2008-04-29:209 2008-04-29T18:43:00Z 2008-04-29T18:43:45Z Passenger (mod_rails) <p>We've been developing client applications with Rails for a few years now. We're not really a hosting company, but our love of Rails meant that it was easier to host client apps ourselves than faff around trying to get them running on their own ISP's servers. Hosting in house took that pain away.</p> <p>It's worked well, but now we're running quite a few, it's getting pretty cumbersome to manage. We still manually set up mongrels for each one, define the proxy requests in apache, restart - rinse and repeat. </p> <p>This is one of the reasons that I got so excited about <a href="http://www.modrails.com/">Passenger (mod_rails)</a>.</p> <p>Passenger has been getting a fair bit of press in it's short life out in the public so far and it's easy to see why. While it's not the answer to all the scaling issues that come with a web app, it's a fantastic way to simplify the deployment and hosting process, especially for shared hosts.</p> <p>In the same way that we set up mongrels to fire up our rails apps and keep them running while apache sends requests between them, Passenger loads up the rails framework and our application code when a request is made. </p> <p>The framework and application code are kept loaded and are shared by separate worker processes. These worker processes are started up and shutdown based on the load on the app.</p> <p>The best thing about this is that it happens behind the scenes with very little configuration. Restarting your application is a 'touch tmp/restart.txt' away and the rest is done for you.</p> <p>We've already started trial this with our internal applications and it'll be interesting to see how it pans out. If this means that our lives are made easier and more hosting companies consider rails, this is looks to be a very important development.</p> stephen tag:www.stephenbartholomew.co.uk,2008-04-13:204 2008-04-13T09:54:00Z 2008-04-13T09:57:07Z Remember when we use to worry about servers & scaling? <p>I'm so ridiculously excited about <a href="http://code.google.com/appengine/">Google App Engine</a>.</p> <p>In the next year or so, I hope we see more and more hosting companies taking on this model. </p> <p>Removing the need to worry about servers and scaling will be great for everyone. If you're a hosting company, I strongly recommend you look into how you could do this. Most developers would pay over the odds for the pain of servers &amp; scaling to be taken away.</p> stephen tag:www.stephenbartholomew.co.uk,2008-03-06:193 2008-03-06T12:15:00Z 2008-03-06T12:24:05Z Email Standards <p>Battling with browsers is a daily chore for most web developers. <a href="http://www.webstandards.org/">Web standards</a> put up a great fight to get proper support into browsers, but what of email clients?</p> <p>There are actually more ways to view your mail shots than there are to view your website - what with both desktop and online clients. All of these have different support for html and css.</p> <p>Often the developer's answer is to strip everything back to basics or put hacks in to make things work correctly - but there is another way!</p> <p>Last november the guys from <a href="http://www.campaignmonitor.com/">Campaign Monitor</a> set up the <a href="http://www.email-standards.org/">Email Standards Project</a> that should hopefully do for emails what we already have for websites.</p> stephen tag:www.stephenbartholomew.co.uk,2008-03-05:189 2008-03-05T19:41:00Z 2008-03-05T19:43:07Z Passionate People <p><a href="http://www.37signals.com/svn/posts/895-typical-person-no-such-thing">From 37signals</a>: "There are only people who are passionate about what they do, and people who aren’t"</p> <p>This fact is so much more important than some people realise. Just think about how different it is when you're served by someone with passion at a cafe. Imagine if a company made sure that that passion was number one on the agenda for employees. </p> <p>That's exactly what <a href="http://www.37signals.com/svn/posts/893-workplace-experiments">37s work experiments</a> are all about. </p> stephen tag:www.stephenbartholomew.co.uk,2008-03-05:187 2008-03-05T16:04:00Z 2008-03-05T16:05:57Z "I don't have time" <p>I hate "I don't have time". It should be banned. It's used all the time and it's rarely true.</p> <p>"I don't have time" normally means one of 2 things:</p> <ul> <li>You have other priorities that you'd prefer to do instead</li> <li>You probably think you're saving time be skipping something important now, but you'll end up paying for it later</li> </ul> <p>Owning an old house means that I have a constant list of DIY jobs to do. Often I don't get as much done as I'd like. I could say "I don't have time" but that's simply not true. It tends to be "I <em>could</em> do that, but I'd rather go out for dinner".</p> <p>The second example mostly crops up for me in development work. People say they don't have time to test or create proper application structure. They then proceed and spend 3 times longer with loads more stress hacking and debugging a unwieldy application.</p> <p>People like "I don't have time" because it shifts responsibility. The world is obviously giving you too many things to do.</p> <p>So here's the bottom line: get over yourself and think about whether you <em>really</em> "don't have the time". </p> <p>You're either prioritising something else - which is fine - or your prioritising the wrong thing - which means you need to take a step back and decide on what's really important.</p> stephen tag:www.stephenbartholomew.co.uk,2008-01-17:186 2008-01-17T18:30:00Z 2008-01-17T18:31:05Z We're hiring! <p>The time has come for Curve21 to expand a bit more, so we're looking for a developer to join our growing team in Brighton.</p> <p>Here's the official line: <a href="http://www.curve21.com/jobs/developer.html">http://www.curve21.com/jobs/developer.html</a></p> <p>Let us know if you're interested!</p> stephen tag:www.stephenbartholomew.co.uk,2007-10-23:180 2007-10-23T17:13:00Z 2007-10-23T17:15:00Z Review: Practical Rails Social Networking Sites <h2>Good</h2> <ul> <li>Takes a project right from start to finish</li> <li>Agile/small team approach - design a feature, implement, repeat</li> <li>Covers popular subjects: social networking, google maps, microformats</li> <li>Shows effective use of plugins</li> <li>Testing made part of the development process from the beginning</li> </ul> <h2>Not so good</h2> <ul> <li>Unfortunately based on Rails 1.2 which means that a fair amount of the url helpers wont work on the latest release of Rails</li> <li>It would have been great to see test-driven development - books can inspire cultural change</li> </ul> <h2>Overall</h2> <p>Despite being pitched as more advanced on the 'Apress Roadmap', this book would equally appeal to people new to Rails and those with a bit more experience. It's 'real-world' project approach makes the learning much more relevant - a must for motivation.</p> <p><strong>Rating:</strong> 8/10</p> stephen tag:www.stephenbartholomew.co.uk,2007-10-11:175 2007-10-11T15:47:00Z 2007-10-11T15:51:46Z Handling content in a Haml template <p>I get asked this a lot about <a href="http://staticmatic.rubyforge.org">StaticMatic</a> &amp; <a href="http://haml.hamptoncatlin.com/docs/haml">Haml</a>: Structured templates are great for HTML markup, but what about the actual <em>content</em> of pages?</p> <p>As StaticMatic is used to manage static sites, you'll quite often have your page's content in a Haml template. While Haml works great for logical HTML markup, it can be a bit cumbersome when working with actual content:</p> <pre><code>%p This is a paragraph of text with a = link "website link", "http://www.stephenbartholomew.co.uk" in the middle. %p It's even worse when the link is at the = link "end", "http://www.stephenbartholomew.co.uk" \. </code></pre> <p>Thankfully, there is a simple solution in the form of filters:</p> <pre><code>:markdown This is a paragraph of text with a [link](http://www.stephenbartholomew.co.uk) in the middle. It's pretty great [now](http://www.stephenbartholomew.co.uk). </code></pre> <p>This can be used in any Haml templates - it's not specific to StaticMatic. It is however more apparent :0)</p> <p>Haml has a number of different filters available including plain text, ruby, redcloth and textile - check out the <a href="http://haml.hamptoncatlin.com/docs/haml">docs</a> for more information.</p> stephen tag:www.stephenbartholomew.co.uk,2007-09-18:168 2007-09-18T20:53:00Z 2007-09-20T14:49:25Z StaticMatic - 0.8.4 <p>A new day, a new release: <a href="http://staticmatic.rubyforge.org/releases/0_8_4.html">StaticMatic - 0.8.4</a></p> <p>Now with partials &amp; multiple directories!</p> stephen tag:www.stephenbartholomew.co.uk,2007-09-16:162 2007-09-16T20:11:00Z 2007-09-18T14:17:02Z iPhone. UK. O2. <p>So this might be common knowledge, but for those not in the know, I got this from a sales person at my local O2 store.</p> <p>No idea of the timescale (roll on tuesday), but they say the iPhone will be £300 for the handset on existing contracts eligible for upgrade and £600 for the handset outright.</p> <p>This means I've got a 2 month wait - worth it for £300 I think...</p> <p>Oh, also a neurotic guy from the Apple store told me today that they're expecting iPod touches in on the 28th of September.</p> <p><strong>Update</strong></p> <p>So the real figures are out. I've no idea where the sales person at the O2 store got the £600 from... As for the £300, I can only think that they were adding VAT. Anyway, just goes to show that you shouldn't listen to sales people :0) </p> stephen tag:www.stephenbartholomew.co.uk,2007-09-11:157 2007-09-11T10:58:00Z 2007-09-11T11:01:17Z LRUG StaticMatic Talk - Slides <p>There's not a huge amount in these slides, but they do have all the links and references that I talked about last night: <a href="http://www.stephenbartholomew.co.uk/assets/2007/9/10/StaticMatic_-_Haml_Everywhere.pdf">StaticMatic LRUG talk slide notes</a></p> stephen tag:www.stephenbartholomew.co.uk,2007-09-05:154 2007-09-05T18:10:00Z 2007-09-05T18:11:56Z 7 stores every single day <p>Howard Schultz, founder of Starbucks: "We open 7 stores every single day"</p> <p>In this day and age, how on <em>earth</em> could anyone consider that as something to be proud of?</p>