<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Think Vitamin &#187; Kieran Masterton</title>
	<atom:link href="http://thinkvitamin.com/author/kieranmasterton/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkvitamin.com</link>
	<description>The Web Practitioner&#039;s Blog</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:41:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Recurring Billing For Web Apps</title>
		<link>http://thinkvitamin.com/code/reoccurring-billing-for-web-apps/</link>
		<comments>http://thinkvitamin.com/code/reoccurring-billing-for-web-apps/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 12:00:55 +0000</pubDate>
		<dc:creator>Kieran Masterton</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=6601</guid>
		<description><![CDATA[Increasingly web application developers and entrepreneurs are turning to the &#8220;Software As A Service&#8221; (SaaS) model to monetize their products. Together with this growth has come the need for reliable recurring billing systems and in turn a number of enterprising folks have built said solutions and fittingly used the SaaS model to monetize their efforts. [...]]]></description>
			<content:encoded><![CDATA[<p>Increasingly web application developers and entrepreneurs are turning to the &#8220;Software As A Service&#8221; (SaaS) model to monetize their products.<br />
Together with this growth has come the need for reliable recurring billing systems and in turn a number of enterprising folks have built said solutions and fittingly used the SaaS model to monetize their efforts.</p>
<p>In this article we will look at how these services work, why you&#8217;d want to use them, the various options available, and how they differ from one another. Hopefully it should give you a better idea of which service is right for you and how you plan to use it.</p>
<h3>Why do I Need this Service?</h3>
<p>There are many tools that are making web application development easier and easier, whether that be development frameworks such as <a href="http://rubyonrails.org/">Rails</a> and <a href="http://www.djangoproject.com/">Django</a> or services like <a href="http://aws.amazon.com/">Amazon Web Services</a> and <a href="http://code.google.com/appengine/">Google App Engine</a>, recurring billing systems are no different.<span id="more-6601"></span></p>
<p>Building a billing system can be a complicated process with issues such as how to handle failed transactions, when and how to recharge cards, and not to mention all the data protection issues surrounding storing financial information and PCI compliance etc. These services allow you to abstract these concerns and let you focus on building the software you care about.</p>
<h3>How do They Work?</h3>
<p>The services all have a number of core functions in common. They provide a web application interface where you can create different products and configure pricing options. The service then deals with taking and storing your customer&#8217;s credit card details (normally with a PCI compliant third-party).</p>
<p>The information about customers, products and subscriptions is then exposed via a secure API which allows you to hook your app into the service. A fairly simple, elegant and, in my experience, reliable solution to something that could potentially be a major headache for app developers.</p>
<p>Essentially as a developer you have two options:</p>
<p><strong>Option One</strong></p>
<p>You choose to forward paying customers to the service&#8217;s hosted payment pages. This is the quickest and simplest way to get started. These pages are secure and accept query string parameters to pre-populate fields such as name and email address.</p>
<p>Successful payments will then be forwarded to a callback URL and any change to a subscription&#8217;s status will be posted back to your app via a post-back URL.</p>
<p>Both of these URLs are specified by you in the product settings of the billing service. Obviously, you would be mad not to validate the callback with a API query and likewise you will also need to check the nature of the subscription status change upon post-back notification.</p>
<p><strong>Option Two</strong></p>
<p>The process is almost identical to option one, however, you do not send users to the service&#8217;s hosted page to take payment. Your application collects (but does not store) all payment details and that data is then delivered to the billing service via their API.</p>
<p>In this instance the onus is upon you to take the user&#8217;s credit card details securely and handle the API&#8217;s response appropriately. However, the obvious benefits of this option is that the user&#8217;s experience is seamless, you have complete control over user interface design and user&#8217;s are unaware you&#8217;re using an external billing service.</p>
<h3>Billing Systems vs. Payment Gateways</h3>
<p>Amidst these technical decisions it is also important remember that these billing services are not payment gateways, they do not carry out the card transitions. They purely deal with the business logic of charges, re-charges, charge backs and data storage. In order to charge the card and for the money to end up in your account the billing service provider hooks into the API of your payment gateway of choice.</p>
<p>This means that it is important to check which payment gateways these service providers support. Some support more than others and until recently some have had a very limited choice of gateways.</p>
<p>Some common payment gateways include:</p>
<ul>
<li><a href="http://www.authorize.net/">Authorize.net</a></li>
<li><a href="http://www.rbsworldpay.com/">Worldpay</a></li>
<li><a href="http://www.trustcommerce.com/">TrustCommerce</a></li>
<li><a href="http://www.paymentexpress.com/index.html">Payment Express</a></li>
<li><a href="https://www.paypal-business.co.uk/process-online-payments-with-paypal/index.htm">PayPal Website Payments Pro</a></li>
</ul>
<p>There are also differences in these gateways and it is important to choose the right one for you and the billing service you choose.</p>
<p>Something to consider is that most of the gateways mentioned above require a merchant account which you would have to arrange with your bank. However, a lot of people avoid this by using Paypal Payments Pro where the money is transfered into a Paypal account ready for you to withdraw.</p>
<p>If you&#8217;d like to know more about merchant accounts hear what Ryan has to say about his experience in this arena on <a href="http://carsonified.com/blog/tvr/think-vitamin-radio-episode-7/">Think Vitamin Radio Episode 7</a>.</p>
<h3>What&#8217;s on Offer?</h3>
<p>There are a good range of providers to choose from and unlike some services they do vary in their cost, features and pricing model. Here&#8217;s a breakdown of a few of the big players in the space.</p>
<p><strong>Chargify</strong></p>
<p><a href="http://chargify.com/"><img style="border: 1px solid #999;" title="chargify" src="http://carsonified.com/wp-content/uploads/2010/07/chargify.jpg" alt="" width="470" height="250" /></a></p>
<p>Chargify is seemingly the solution with the richest set of features and the lowest barrier to entry. They offer a free account which is limited to 50 paying customers plus 1,000 non-paying customers.</p>
<p>Their pricing model is clearly designed with the thought that those first 50 customers are the hardest to acquire and once you have those customers paying X amount per month you can afford to pay for their higher volume service.</p>
<p>These start from $49 a month for up to 500 customers and is graduated there on up to $2,499 per month for unlimited customers. As a result of these graduated monthly fees Chargify does not add any per-transaction cost, so within their pricing brackets your costs are fixed.</p>
<p>The people behind <a href="http://twitter.com/chargify">@chargify</a> on Twitter are extremely helpful both in explaining their own service and in offering advice about merchant accounts and receptive banks in both the UK and USA.</p>
<p>This is unsurprising as Chargify is brought to you by the guys behind Grasshopper and if you&#8217;re a Rails person it is also worth noting that Chargify&#8217;s CEO and Founder is Lance Walley who was also Co-Founder of Rails hosting provider Engine Yard. Both these companies are known for their excellent software and, in my experience, great customer service which bodes well for Chargify.</p>
<p><a href="http://chargify.com/">http://chargify.com/</a></p>
<p><strong>Spreedly</strong></p>
<p><a href="http://spreedly.com/"><img style="border: 1px solid #999;" title="spreedly" src="http://carsonified.com/wp-content/uploads/2010/07/spreedly.jpg" alt="" width="470" height="250" /></a></p>
<p>Spreedly is a younger service and therefore less feature rich. For example, I expressed an interest in charging a set up fee. A one-off fee that is only charged upon sign up. This can be useful to those services that have a fixed overheads for each user who signs up and something that&#8217;s easy to set up on Chargify.</p>
<p>However, Spreedly don&#8217;t currently offer this feature, but they say it is something that they are keen to do in the future. Likewise, at this point they don&#8217;t seem to have the choice to create add-ons for customers to add to their purchase at point of sale. Again, this is very useful for SaaS businesses offering bolt-on services.</p>
<p>Spreedly also takes a slightly different approach to Chargify in terms of pricing. They have a flat-rate monthly charge of $19 but also take 20c or 2% (whichever is the lower amount) of each transaction.</p>
<p>As with Chargify this pricing model scales with your business and means that at times Spreedly could be considerable cheaper than Chargify. That said, there are also points of customer volume where Spreedly&#8217;s costs will exceed Chargify&#8217;s. Plus with Chargify the frequency of your payment transactions is not an issue, if you want to charge users every 14 days you can at no extra cost whereas this would prove an expensive exercise with Spreedly.</p>
<p>A great benefit of Spreedly is the quantity of payment gateways they support. They are clearly focusing on simplicity and their support for gateways which is by no means a bad thing. As with Chargify the folks behind <a href="http://twitter.com/spreedly">@spreedly</a> were extremely helpful via Twitter and found my questions about their service without the need for a direct @ message. They were happy to answer questions and offer alternative approaches to features that weren&#8217;t available yet. In short, Spreedly is definitely worth a look if your current needs are simple and you like the idea of a per-transaction cost.</p>
<p><a href="http://spreedly.com/">http://spreedly.com/</a></p>
<p><strong>CheddarGetter</strong></p>
<p><img style="border: 1px solid #999;" title="cheddar" src="http://carsonified.com/wp-content/uploads/2010/07/cheddar.jpg" alt="" width="470" height="250" /></p>
<p>First up &#8211; what a name &#8211; CheddarGetter definitely wins in the name game. However, how does it stand up against Chargify and Spreedly. Well, in terms of features CheddarGetter definitely rivals Chargify and exceeds Spreedly. However, their pricing structure is different again. Like Chargify they have graduated montlhy charges based on customer volume with no transaction fees.</p>
<p>As with both Spreedly and Chargify <a href="http://twitter.com/cheddargetter">@cheddargetter</a> offer phenomenal service via Twitter. Mention the name CheddarGetter in the context of a question and they will find you and offer support. This proactive approach seems to be the norm is this space but we shouldn&#8217;t forget how rare it is to get this kind of customer service.</p>
<p>The major downside of CheddarGetter right now is its lack of payment gateway integration. The limited list of gateways includes Network Merchants and Authorize.net but no Paypal Website Payments Pro for those of you who don&#8217;t want to deal with getting a merchant account with your bank. That said, with some more payment gateway integration CheddarGetter has real potential.</p>
<p><a href="https://cheddargetter.com/">https://cheddargetter.com/</a></p>
<h3>But How do I Choose?</h3>
<p>As you can see the billing services spaces has quite a spread of different pricing models so they can be hard to compare in terms of price and work out features vs. cost per customer vs. potentially cost per transaction with Spreedly.</p>
<p>Chad Glendenin has <a href="http://blog.glendenin.com/chargify-vs-spreedly-vs-cheddargetter-subscri">an excellent comparison of the pricing of these services</a> including graphs which map customer growth vs. cost of service for all these of the providers I&#8217;ve mentioned. These are extremely useful in demonstrating how these services actually compare in terms of price and highlights the customer volume markers where favour shifts from one service to another. He also provides his Python script for generating these figures so that you can run the numbers with your own payment frequencies and prices.</p>
<p>It&#8217;s clear that if you expect a very high quantity of subscribers, meaning 15,000+ customers paying monthly, then Chargify&#8217;s features and unlimited plan makes them the obvious choice.</p>
<p>However, if you&#8217;re expecting very low volume, or your only taking annual payments and this is something you&#8217;re setting up on the side of a day job, Spreedly&#8217;s per-transaction model and simplicity would suit your needs. However, these are both extreme ends of the spectrum.</p>
<p>Extremes aside, I think this decision is really about features and not price. The costs are marginal compared to whether the service can provide you with what you need. Integration with a billing system while a fairly straightforward process isn&#8217;t something that you want to have change after 18 months.</p>
<h3>Conclusion</h3>
<p>If you&#8217;re planning more complicated pricing models, add on products, short payment intervals, or want a metered service where customers pay for their usage then you need to hunt down each service&#8217;s feature list and ensure they offer what you need. You are buying simplicity, you&#8217;re buying the ability to focus on your own app and abstract the billing logic, make sure the service you choose offers you what you need not just the best price.</p>
<p>Finally, if you guys are using any of these services it would be great to hear from you in the comments about your experiences and your decision making when you chose the service.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkvitamin.com/code/reoccurring-billing-for-web-apps/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>How to Crowdfund your Startup</title>
		<link>http://thinkvitamin.com/web-industry/how-to-crowdfund-your-startup/</link>
		<comments>http://thinkvitamin.com/web-industry/how-to-crowdfund-your-startup/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 15:37:07 +0000</pubDate>
		<dc:creator>Kieran Masterton</dc:creator>
				<category><![CDATA[Web Industry]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=5578</guid>
		<description><![CDATA[In November 2009, my business partner and I successfully Crowdfunded a business designed to provide independent filmmakers with an alternative method of film distribution, OpenIndie. The result of our month-long campaign was over $12,400 to bootstrap our company, a good amount of press interest and a built-in audience and user base for our site. What [...]]]></description>
			<content:encoded><![CDATA[<p>In November 2009, my business partner and I <a href="http://www.kickstarter.com/projects/972012474/openindie-100-pioneering-filmmakers-embrace-moder">successfully Crowdfunded</a> a business designed to provide independent filmmakers with an alternative method of film distribution, <a href="http://openindie.com/">OpenIndie</a>. The result of our month-long campaign was over $12,400 to bootstrap our company, a good amount of press interest and a built-in audience and user base for our site.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-5589" style="border: 1px solid#999;" title="openindie" src="http://carsonified.com/wp-content/uploads/2010/04/openindie.jpg" alt="" width="470" height="284" /></p>
<h3>What is Crowdfunding?</h3>
<p>Before discussing the pros and cons of <a href="http://en.wikipedia.org/wiki/Crowd_funding">Crowdfunding</a> I should explain a little about how the process actually works. The most important thing to considering when Crowdfunding your venture is that this isn&#8217;t like taking investment. The process can take many forms, and just like taking investment, won&#8217;t be right for everyone. That said, here&#8217;s the most common model being used by everyone from startups and non-profits to artists, musicians and filmmakers:</p>
<p>An individual or organisation states that they need X amount of money to fund their venture.  This venture can be anything, from a cupcake shop to an independent feature film; and the amount of money can be a small part or all of the total cost of the venture. The individual or organisation then uses their existing networks to leverage the crowd, that&#8217;s you, to donate money to their venture in return for a reward.</p>
<p>Often this reward is directly related to the venture being funding, so it could be a batch of cupcakes or a credit at the end of someone&#8217;s film; but equally it could simply be a very small thank you for your contribution. I recently came across someone who successfully crowdfunded enough money to pay for the hull of her ship that she needed to circumnavigate the globe.</p>
<p>In return for a small contribution she promised a postcard from a random location on her travels delivered to your door. As you can see, this isn&#8217;t investment in the traditional sense, in fact rule number one of Crowdfunding is that you don&#8217;t offer a percentage of your venture as a reward. Rather this process is something akin to patronage by a different name. However, there is an important difference between Crowdfunding and patronage that I will explain using the example of my own experience.<span id="more-5578"></span></p>
<h3>Pre-Selling your Product to Fund your Business</h3>
<p><a href="http://openindie.com/">OpenIndie</a> is the brainchild of filmmaker <a href="http://twitter.com/arincrumley">Arin Crumley</a> and <a href="http://twitter.com/kieranmasterton">myself</a>, a Developer with an academic background in film. The concept is to turn the existing model of film distribution on its head. Instead of Hollywood pushing out content, users of OpenIndie can pull screenings of films to them by requesting films to screen in their area.</p>
<p>This is a model that Arin developed for his film <a href="http://www.imdb.com/title/tt0439182/">Four Eyed Monsters (2005)</a> and it has since been used by indies like <a href="http://www.imdb.com/title/tt1300563/">Age of Stupid (2009)</a> and even big studios like Paramount with <a href="http://www.imdb.com/title/tt1179904/">Paranormal Activity (2007)</a>.</p>
<p>During our discussions about the amount of work involved in building a site of this kind it soon became clear that this wasn&#8217;t going to be the sort of project I could achieve on my own during evenings and weekends. At the time, I was working as a Developer for a large British magazine publisher which left me very little time for personal projects.</p>
<p>The decision was quickly made that we needed some form of bootstrap funding, approximately $10,000 to fund three or four months of fulltime development and hosting costs for the time it takes to monetize the site. We weren&#8217;t after serious investment because we knew we had the skills in-house to build and promote the site.</p>
<p>Likewise, because of the nature of the site we felt that anyone interested in investing would probably have a vested interest in the world of film distribution and we didn&#8217;t want anyone to have influence over the direction of the site.</p>
<p>Around that time <a href="http://kickstarter.com">Kickstarter.com</a> launched. Kickstarter is designed to allow anyone with an idea to get the money needed to make that idea a reality. However, they impose a few constraints. You have to ask for a fixed amount of money, and you only get that money if you raise all of it within a maximum of a three month period. $1 short of a $10,000 goal and nobody&#8217;s credit card gets charged and you don&#8217;t get a cent &#8211; a fact that focuses the mind somewhat.</p>
<p>In our case we worked extremely hard to leverage our existing networks, Twitter in particular. When it comes to Twitter indie film is a small world and it became clear that it was important for us to connect with the filmmakers that would want to use our service. Be as open as possible, allow them to ask us questions and emphasise that we&#8217;re building a site for them and with them.</p>
<p>We had to make the decision very early on about rewards and one of our first decisions was to ask for a fixed number of donations at a fixed rate. That way our progress is measurable. We asked for 100 filmmakers to give $100 a piece to be the first 100 individuals to add their film to the site, a target that at the time we considered ambitious.</p>
<h3>Crowdfunding Options</h3>
<p>There are a whole range of options for Crowdsourcing your funding, some sites focus on more creative endeavours while others are more suited to a broader range of projects. The site that I think is really setting the standard for crowdfunding is <a href="http://kickstarter.com">Kickstarter.com</a>.</p>
<p>We used them to fund OpenIndie and we chose them for two reasons. First, Arin had already had success in funded a $3,500 campaign to pay for some expenses on his latest feature film. Second, Kickstarter was flexible enough to accommodate funding a business as opposed to just creative ventures. That said, here&#8217;s a couple of great options if you&#8217;re considering Crowdfunding.</p>
<h3>IndieGoGo</h3>
<p><img style="border: 1px solid#999;" title="indiegogo" src="http://carsonified.com/wp-content/uploads/2010/04/indiegogo.jpg" alt="" width="470" height="250" /></p>
<p><a href="http://indiegogo.com/">IndieGoGo.com</a></p>
<p>Originally designed to help filmmakers fund their work the projects on IndieGogo now go far beyond just filmmaking. The site is more than flexible enough to be used to fund creative endeavours and businesses of all kinds. A great feature of this site is the ability to add team members to your campaign. This can be really useful because often a successful venture is about the team that you’ve built around an idea. It is important to show those backing your business that the idea is in good hands and it helps when leveraging multiple people’s networks.</p>
<p>IndieGoGo takes 9% of the final money raised as a fee for using the service but also offers a 5% cash reward for anyone who hits their goal, which is nice and effectively means your fee is only 4%. The site is also international friendly meaning that anyone from anywhere in the world can use the site to fund their venture.</p>
<h3>Kickstarter</h3>
<p><img style="border: 1px solid#999;" title="kickstarter" src="http://carsonified.com/wp-content/uploads/2010/04/kickstarter.jpg" alt="" width="470" height="250" /></p>
<p><a href="http://kickstarter.com/">Kickstarter.com</a></p>
<p>Not the first Crowdfunding site to hit the net, but certainly currently one of the best. Kickstarter has a number of different categories for projects. These include the likes of Technology, Music, Games and Food. With such diverse categories it&#8217;s simple to fit your business idea into Kickstarter&#8217;s model. One major disadvantage of Kickstarter is that it is currently only open to project creators who have a US bank account. This is a restriction of Amazon Payments which it uses to take your backer&#8217;s pledges.</p>
<p>Anyone from anywhere in the world can back your campaign, but only those with a US bank account can set up a campaign. Last time I spoke to the guys at Kickstarter about this issue they assured me that Amazon are looking to rectify this problem, but for now, it&#8217;s a fairly major barrier for use for those outside the United States. Kickstarter takes 5% of the final money raised as a fee for using the service plus around 3% for Amazon credit card processing fees.</p>
<h3>GrowVC</h3>
<p><img style="border: 1px solid#999;" title="growvc" src="http://carsonified.com/wp-content/uploads/2010/04/growvc.jpg" alt="" width="470" height="250" /></p>
<p><a href="http://growvc.com/">Growvc.com</a></p>
<p>GrowVC takes a similar model to Kickstarter and IndieGoGo, and applies it strictly to business startups, but with a couple of important distinctions. First, in my opinion this isn&#8217;t true Crowdfunding because it seems that with GrowVC funders get a share in the business, a fact that makes me think this is more like transparent angel investment.</p>
<p>I should note however that GrowVC do not actually claim to be a Crowdfunding site though they are applying some of the same principles to a similar problem. Secondly, instead of losing a percentage of your total monies raised, as a project creator, you pay monthly for the service based on the amount you&#8217;re attempting to raise.</p>
<p>Prices range from $20 a month to $140 for an unlimited funding account. They also charge funders a monthly fee for the privilege of investing and while this could be a barrier to investing it also ensures that investors are serious about what they&#8217;re doing. In short, a very different option, but a valid one nonetheless.</p>
<h3>Ulule</h3>
<p>And finally, one other site worthy of note but not yet launched is <a href="http://ulule.com/">Ulule.com</a> which appears to be focused upon a broader range of projects and creative endeavours. They have yet to announce their pricing structure but I think this one has the potential to be great for entrepreneurs. Plus, their promotional video explains very effectively how Crowdfunding works:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="470" height="264" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=10257539&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="470" height="264" src="http://vimeo.com/moogaloop.swf?clip_id=10257539&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h3>What Worked?</h3>
<p>The beauty of this approach was that we were effectively pre-selling our product and we were putting a value upon that product. We were stating what OpenIndie would offer, how it would work and how soon they would be able to access the site. This set the expectations of our users at a realistic level and meant they understood that we weren&#8217;t going to be able to provide this as a free service.</p>
<p>It also meant that because those 100 filmmakers had faith in our idea, enough to back our campaign, they also acted as advocates for us and referred other filmmakers by retweeting and blogging about what we were doing.</p>
<p>Thanks to their faith and generosity I was able to leave my fulltime job, work for three solid months developing the site and launch it on March 1st in time for them to start promoting their films and building audience demand. We get to build our site and the filmmakers get the service they want.</p>
<h3>What didn&#8217;t Work?</h3>
<p>It would be wrong to say that Crowdfunding is the golden ticket to funding your business because it isn&#8217;t. Crowdsourcing takes a lot of work and it relies on you having a pre-existing audience or being able to build one very quickly. In our case Arin was already a known figure within the indie film world which attracted a small amount of press attention and a flurry of activity on Twitter when we first announced our campaign.</p>
<p>However, it took four weeks of tweeting, blogging, answering questions, doing interviews and, quite honestly, pimping the hell out of our campaign page to secure our $10,000. We funded approximately 14 hours before our deadline and went on to raise just shy of a further $2,500 making our total $12,413.</p>
<p>Now that you&#8217;ve popped your virtual champaign cork and celebrated the massive achievement of raising the money you need to build your baby, it&#8217;s time to deliver the rewards you promised. In our case some of those were easy. We offered anyone giving $15 or more a copy of the Four Eyed Monsters Soundtrack on CD or MP3, for example.</p>
<p>However, some rewards were harder to fulfil, for instance every filmmaker who signed up was promised a one hour consultation with Arin to discuss how best to build an audience for their film. We&#8217;re still working our way through the 100 filmmakers. Scheduling so many consultations across so many time zones with filmmakers schedules being so full and Arin&#8217;s time being limited has been a challenge. We continue to offer this service as part of our filmmaker sign up, but we now work with another expert in the field of audience building to fulfil these consultations.</p>
<h3>Five Golden rules of Crowdfunding</h3>
<p>I can not tell you if my experience of Crowdfunding is the norm, but here are a few things I have learnt from funding OpenIndie:</p>
<p><strong>1. Ask for what you need</strong></p>
<p>Make a budget and be sure that you can do what you need for the sum you&#8217;re setting as your goal. The most important thing when Crowdfunding is being sure that you can deliver on your promises.</p>
<p><strong>2. Be realistic</strong></p>
<p>This one takes its lead from number one. Can you actually do this? Do you have the skills? Are you sure? Don&#8217;t promise what you can&#8217;t deliver and never under deliver on your promises.</p>
<p><strong>3. Set a unit price and set a total unit goal</strong></p>
<p>People really respond to A) being part of an exclusive group and B) the need to reach a goal which isn&#8217;t financial. We asked for 100 filmmakers to donate $100. You could ask for 100 Magicians or 50 Accountants or 200 used car salesmen. Whatever your niche, focus upon it and ask yourself what appeals to that niche.</p>
<p><strong>4. Pre-sell your product</strong></p>
<p>Presumably your business has a product. Ours is film profiles, yours might be perfume, books or bookkeeping. Whatever it is, offer those people buying into your exclusive club that product if the campaign successfully funds. Everyone who donates $100 or more gets our exclusive funders special edition perfume, for example.</p>
<p><strong>5. Be open</strong></p>
<p>Transparency is straight out of the Web Business 101 classroom but it really can&#8217;t be said enough. Be open and honest with those giving you money and nothing will creep up and bite you on the ass.</p>
<h3>Is Crowdfunding for you and your business?</h3>
<p>It is very important to note that Crowdfunding is not a funding solution for everyone and it does not work with all business models. The process also has its critics who claim that it isn&#8217;t sustainable and that business startups aren&#8217;t charities so why are they asking for handouts? These are both valid criticisms. Certainly at OpenIndie we have found that Crowdfunding is not a sustainable source of revenue.</p>
<p>Since our <a href="http://www.kickstarter.com/projects/972012474/openindie-100-pioneering-filmmakers-embrace-moder">successful campaign in November</a> we have twice attempted to raise similar amounts by the same means, but neither attempt was successful. This was for two reasons. First, I think that we launched our second campaign too early. People wanted to see the site built and get to interact with it before deciding whether to donate yet more money to its development.</p>
<p>And, second, we are a small team of two and during development neither Arin or I had the time needed to push the second campaign in the way we did the first. In retrospect a second campaign probably wasn&#8217;t the right move. It&#8217;s called Kickstarter for a reason. That said, I think if you have a really niche product, and you have the audience needed to make a Crowdfunding campaign work it can be a brilliant means by which to see your ideas become reality. It has certainly been a fantastic experience for OpenIndie.</p>
<p>With respect to the concern that businesses are not charities and should not be asking for handouts, I see can this point of view and actually agree. This is why I advocate the pre-sale of goods in return for funding. By demonstrating your product and offering those investing an exclusive item in return for the help you need to get started you are not asking for a handout.</p>
<p>You are asking for them to have faith in you and yes, you could fail to produce the product you offered and your backers would walk away with nothing. However, if your backers know this up front and are still happy to put their hands in their pockets, and a successful business is born out of this act of faith, then I think Crowdfunding has the potential to bring a massive amount of ideas to life.</p>
<p>Finally, I&#8217;d like to ask you if you&#8217;ve had any experience of Crowdfunding either a business or creative endeavor? Or if you&#8217;ve come across a new Crowdfunding site why not let us know in comments?</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkvitamin.com/web-industry/how-to-crowdfund-your-startup/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>How to Debug in PHP</title>
		<link>http://thinkvitamin.com/code/how-to-debug-in-php/</link>
		<comments>http://thinkvitamin.com/code/how-to-debug-in-php/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:00:31 +0000</pubDate>
		<dc:creator>Kieran Masterton</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://carsonified.com/?p=3037</guid>
		<description><![CDATA[Nobody enjoys the process of debugging their code. If you want to build killer web apps though, it&#8217;s vital that you understand the process thoroughly. This article breaks down the fundamentals of debugging in PHP, helps you understand PHP&#8217;s error messages and introduces you to some useful tools to help make the process a little [...]]]></description>
			<content:encoded><![CDATA[<p>Nobody enjoys the process of debugging their code. If you want to build killer web apps though, it&#8217;s vital that you understand the process thoroughly.</p>
<p>This article breaks down the fundamentals of debugging in PHP, helps you understand PHP&#8217;s error messages and introduces you to some useful tools to help make the process a little less painful.</p>
<p><em>Editor&#8217;s Note: We&#8217;ll be running workshops like &#8220;How to Build a Web App from A-Z&#8221; at <a href="http://events.carsonified.com/fowa/2009/london/workshops#workshop_53?utm_source=TV&#038;utm_medium=Text%2Blink&#038;utm_campaign=How%2Bto%20Debug%20in%20PHP">The Future of Web Apps London</a>.</em></p>
<p><span id="more-3037"></span></p>
<h3>Doing your Ground Work</h3>
<p>It is important that you configure PHP correctly and write your code in such a way that it produces meaningful errors at the right time. For example, it is generally good practice to turn on a verbose level of error reporting on your development platform. This probably isn&#8217;t such a great idea, however, on your production server(s). In a live environment you neither want to confuse a genuine user or give malicious users too much information about the inner-workings of your site.</p>
<p>So, with that in mind lets talk about the all too common &#8220;I&#8217;m getting no error message&#8221; issue. This is normally caused by a syntax error on a platform where the developer has not done their ground work properly. First, you should turn display_errors on. This can be done either in your php.ini file or at the head of your code like this:</p>
<p><code>&lt;?php<br />
ini_set('display_errors', 'On');</code></p>
<p><em>Tip: In these code examples I omit the closing (?&gt;) PHP tag. It is <a href="http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html#coding-standard.php-file-formatting.general" title="Zend Coding Standards">generally considered good practice</a> to do so in files which contain only PHP code in order to avoid accidental injection of white space and the all too common &#8220;headers already sent&#8221; error.</em></p>
<p>Next, you will need to set an error reporting level. As default PHP 4 and 5 do not show PHP notices which can be important in debugging your code (more on that shortly). Notices are generated by PHP whether they are displayed or not, so deploying code with twenty notices being generated has an impact upon the overhead of your site. So, to ensure notices are displayed, set your error reporting level either in your php.ini or amend your runtime code to look like this:</p>
<p><code>&lt;?php<br />
ini_set('display_errors', 'On');<br />
error_reporting(E_ALL);</code></p>
<p><em>Tip: E_ALL is a constant so don&#8217;t make the mistake of enclosing it in quotation marks.</em></p>
<p>With PHP 5 it&#8217;s also a good idea to turn on the E_STRICT level of error reporting. E_STRICT is useful for ensuring you&#8217;re coding using the best possible standards. For example E_STRICT helps by warning you that you&#8217;re using a deprecated function. Here&#8217;s how to enable it at runtime:</p>
<p><code>&lt;?php<br />
ini_set('display_errors', 'On');<br />
error_reporting(E_ALL | E_STRICT);</code></p>
<p>It is also worth mentioning that on your development platform it is often a good idea to make these changes in your php.ini file rather than at the runtime. This is because if you experience a syntax error with these options set in your code and not in the php.ini you may, depending on your set up, be presented with a blank page. Likewise, it is worth noting that if you&#8217;re setting these values in your code, a conditional statement might be a good idea to avoid these settings accidentally being deployed to a live environment.</p>
<h3>What Type of Error am I Looking at?</h3>
<p>As with most languages, PHP&#8217;s errors may appear somewhat esoteric, but there are in fact only four key types of error that you need to remember:</p>
<p><strong>1. Syntax Errors</strong></p>
<p>Syntactical errors or parse errors are generally caused by a typo in your code. For example a missing semicolon, quotation mark, brace or parentheses. When you encounter a syntax error you will receive an error similar to this:</p>
<p><code><strong>Parse error:</strong> syntax error, unexpected T_ECHO in /Document/Root/example.php on line 6</code></p>
<p>In this instance it is important that you check the line above the line quoted in the error (in this case line 5) because while PHP has encountered something unexpected on line 6, it is common that it is a typo on the line above causing the error. Here&#8217;s an example:</p>
<p><code>&lt;?php<br />
ini_set('display_errors', 'On');<br />
error_reporting(E_ALL);<br/><br/><br />
$sSiteName = "Think Vitamin"<br />
echo $sSiteName;</code></p>
<p>In this example I have omitted the semi-colon from line 5, however, PHP has reported an error occurred on line 6. Looking one line above you can spot and rectify the problem.</p>
<p><em>Tip: In this example I am using <a href="http://en.wikipedia.org/wiki/Hungarian_notation" title="Wikipedia entry for Hungarian Notation">Hungarian Notation</a>. Adopting this coding standard can aid with debugging code while working collaboratively or on a piece of code you wrote some time ago. The leading letter denoting the variable type means that determining a variable type is very quick and simple. This can aid in spotting irregularities which can also help highlight any potential logic errors.</em></p>
<p><strong>2. Warnings</strong></p>
<p>Warnings aren&#8217;t deal breakers like syntax errors. PHP can cope with a warning, however, it knows that you probably made a mistake somewhere and is notifying you about it. Warnings often appear for the following reasons:</p>
<ol>
<li>Headers already sent. Try checking for white space at the head of your code or in files you&#8217;re including.</li>
<li>You&#8217;re passing an incorrect number of parameters to a function.</li>
<li>Incorrect path names when including files.</li>
</ol>
<p><strong>3. Notices</strong></p>
<p>Notices aren&#8217;t going to halt the execution of your code either, but they can be very important in tracking down a pesky bug. Often you&#8217;ll find that code that&#8217;s working perfectly happily in a production environment starts throwing out notices when you set error_reporting to E_ALL.</p>
<p>A common notice you&#8217;ll encounter during development is:</p>
<p><code>><strong>Notice:</strong> Undefined index: FullName in /Document/Root/views/userdetails.phtml on line 55</code></p>
<p>This information can be extremely useful in debugging your application. Say you&#8217;ve done a simple database query and pulled a row of user data from a table. For presentation in your view you&#8217;ve assigned the details to an array called $aUserDetails. However, when you echo $aUserDetails['FirstName'] on line 55 there&#8217;s no output and PHP throws the notice above. In this instance the notice you receive can really help.</p>
<p>PHP has helpfully told us that the FirstName key is undefined so we know that this isn&#8217;t a case of the database record being NULL. However, perhaps we should check our SQL statement to ensure we&#8217;ve actually retrieved the user&#8217;s first name from the database. In this case the notice has helped us rule out a potential issue which has in turn steered us towards the likely source of our problem. Without the notice our likely first stop would have been the database record, followed by tracing back through our logic to eventually find our omission in the SQL.</p>
<p><strong>4. Fatal Errors</strong></p>
<p>Fatal Errors sound the most painful of the four but are in fact often the easiest to resolve. What it means, in short, is that PHP understands what you&#8217;ve asked it to do but can&#8217;t carry out the request. Your syntax is correct, you&#8217;re speaking its language but PHP doesn&#8217;t have what it needs to comply. The most common fatal error is an undefined class or function and the error generated normally points straight to the root of the problem:</p>
<p><code><strong>Fatal error:</strong> Call to undefined function create() in /Document/Root/example.php on line 23</code></p>
<h3>Using var_dump() to Aid Your Debugging</h3>
<p>var_dump() is a native PHP function which displays structured, humanly readable, information about one (or more) expressions. This is particularly useful when dealing with arrays and objects as var_dump() displays their structure recursively giving you the best possible picture of what&#8217;s going on. Here&#8217;s an example of how to use var_dump() in context:</p>
<p>Below I have created an array of scores achieved by users but one value in my array is subtly distinct from the others, var_dump() can help us discover that distinction.</p>
<pre><code>&lt;?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);<br/><br/>
$aUserScores = array('Ben' => 7,'Linda' => 4,'Tony' => 5,'Alice' => '9');
echo '&lt;pre&gt;';
var_dump($aUserScores);
echo '&lt;/pre&gt;';</code></pre>
<p><em>Tip: Wrap var_dump() in &lt;pre&gt; tags to aid readability.</em></p>
<p>The output from var_dump() will look like this:</p>
<pre><code>array(4) {
  ["Ben"]=>
  int(7)
  ["Linda"]=>
  int(4)
  ["Tony"]=>
  int(5)
  ["Alice"]=>
  string(1) "9"
}</code></pre>
<p>As you can see var_dump tells us that $aUserScores is an array with four key/value pairs. Ben, Linda, and Tony all have their values (or scores) stored as integers. However, Alice is showing up as a string of one character in length.</p>
<p>If we return to my code, we can see that I have mistakenly wrapped Alice&#8217;s score of 9 in quotation marks causing PHP to interpret it as a string. Now, this mistake won&#8217;t have a massively adverse effect, however, it does demonstrate the power of var_dump() in helping us get better visibility of our arrays and objects.</p>
<p>While this is a very basic example of how var_dump() functions it can similarly be used to inspect large multi-dimensional arrays or objects. It is particularly useful in discovering if you have the correct data returned from a database query or when exploring a JSON response from say, Twitter:</p>
<p><code>&lt;?php<br />
ini_set('display_errors', 'On');<br />
error_reporting(E_ALL);<br/><br/><br />
$sJsonUrl = 'http://search.twitter.com/trends.json';<br/><br/><br />
$sJson = file_get_contents($sJsonUrl,0,NULL,NULL);<br />
$oTrends = json_decode($sJson);<br/><br/><br />
echo '&lt;pre&gt;';<br />
var_dump($oTrends);<br />
echo '&lt;/pre&gt;';</code></p>
<h3>Useful Tools to Consider when Debugging</h3>
<p>Finally, I want to point out a couple of useful tools that I&#8217;ve used to help me in the debugging process. I won&#8217;t go into detail about installing and configuring these extensions and add-ons, but I wanted to mention them because they can really make our lives easier.</p>
<p><strong>Xdebug</strong></p>
<p><a href="http://www.xdebug.org/" title="Xdebug">Xdebug</a> is a PHP extension that aims to lend a helping hand in the process of debugging your applications. Xdebug offers features like:</p>
<ul>
<li>Automatic stack trace upon error</li>
<li>Function call logging</li>
<li>Display features such as enhanced var_dump() output and code coverage information.</li>
</ul>
<p>Xdebug is highly configurable, and adaptable to a variety of situations. For example, stack traces (which are extremely useful for monitoring what your application is doing and when) can be configured to four different levels of detail. This means that you can adjust the sensitivity of Xdebug&#8217;s output helping you to get granular information about your app&#8217;s activity.</p>
<p>Stack traces show you where errors occur, allow you to trace function calls and detail the originating line numbers of these events. All of which is fantastic information for debugging your code.</p>
<p><em>Tip: As default Xdebug limits var_dump() output to three levels of recursion. You may want to change this in your xdebug.ini file by setting the xdebug.var_display_max_depth to equal a number that makes sense for your needs.</em></p>
<p>Check out <a href="http://www.xdebug.org/docs/install" title="Xdebug installation guide">Xdebug&#8217;s installation guide</a> to get started.</p>
<p><strong>FirePHP</strong></p>
<p>For all you <a href="https://addons.mozilla.org/en-US/firefox/addon/1843" title="FireBug">FireBug</a> fans out there, <a href="http://www.firephp.org/" title="FirePHP">FirePHP</a> is a really useful little PHP library and Firefox add-on that can really help with AJAX development.</p>
<p>Essentially FirePHP enables you to log debug information to the Firebug console using a simple method call like so:</p>
<p><code>&lt;?php<br />
	$sSql = 'SELECT * FROM tbl';<br />
	FB::log('SQL query: ' . $sSql);</code> </p>
<p>In an instance where I&#8217;m making an AJAX search request, for example, it might be useful to pass back the SQL string my code is constructing in order that I can ensure my code is behaving correctly. All data logged to the Firebug console is sent via response headers and therefore doesn&#8217;t effect the page being rendered by the browser.</p>
<p><em>Warning: As with all debug information, this kind of data shouldn&#8217;t be for public consumption. The downside of having to add the FirePHP method calls into your PHP is that before you go live you will either have to strip all these calls out or set up an environment based conditional statement which establishes whether or not to include the debug code.</em></p>
<p>You can install the Firefox add-on at <a href="http://www.firephp.org/" title="FirePHP">FirePHP&#8217;s website</a> and also <a href="http://www.firephp.org/HQ/" title="Fire PHP libs">grab the PHP libs</a> there too. Oh, and don&#8217;t forget if you haven&#8217;t already installed FireBug, <a href="https://addons.mozilla.org/en-US/firefox/addon/1843" title="FireBug">you&#8217;ll need that too</a>.</p>
<h3>In Conclusion &#8230;</h3>
<p>Hopefully during the course of this article you have learned how to do your ground work by preparing PHP for the debugging process; recognise and deal with the four key PHP error types and use var_dump() to your advantage. Likewise, I hope that you will find Xdebug and FirePHP useful and that they will make your life easier during your development cycle. </p>
<p>As I&#8217;ve already mentioned, and I really can&#8217;t say this enough, always remember to remove or suppress your debug output when you put your sites into production after all there&#8217;s nothing worse than all your users being able to read about your errors in excruciating detail.</p>
<p>Got a great debugging tip to share? Do you use a great little PHP extension that makes your bug trapping life easier? Please tell us about them in comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkvitamin.com/code/how-to-debug-in-php/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.336 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-11 17:16:47 -->

