{"id":257,"date":"2008-01-08T20:27:26","date_gmt":"2008-01-09T03:27:26","guid":{"rendered":"http:\/\/www.bspcn.com\/2008\/01\/08\/building-a-com-in-24-hours\/"},"modified":"2011-01-11T08:01:05","modified_gmt":"2011-01-11T15:01:05","slug":"building-a-com-in-24-hours","status":"publish","type":"post","link":"http:\/\/localhost\/wordpress\/2008\/01\/08\/building-a-com-in-24-hours\/","title":{"rendered":"Building a .com in 24 hours"},"content":{"rendered":"
Written by dominiek<\/a><\/p>\n This is about how I spend 24 concentrated hours spread out over 4 days during Holidays to build the online service Wigitize.com<\/a>. It is part of my ongoing learning process on how to run a successful web startup.<\/p>\n Even though I’m a super pimple-faced code-geek, I strive to be a creative entrepreneur who can utilize modern day tools and navigate the chaos to build cool stuff. What I tried to do for this project is use some new methods\/tools out there to solve practical problems in my weakness area: design, frontend coding, system administration and SEO.<\/p>\n Purpose of this article is to show my thought process on the multidisciplinary aspects of this project. Also to invoke the discussion on how these things could be done much better (correct me!) and hopefully also to educate other entrepreneurial minded hackers.<\/p>\n While working for my current client here in Tokyo, I’m often running into problems where I wish there was a third party web service that could solve them. For example: Uploading\/Managing pictures for user generated content. We want to build cool shit, not reinvent the wheel.<\/p>\n Another one of these ‘problems’ – by saying problems I mean ‘important new features’ – was allowing users to import their blog’s RSS feed. When users input the URL of their blog, a listing of their most recent blog entries will be displayed, sounds simple enough right?<\/p>\n Several weeks before, I already wrote a feature that allowed users to display their latest Twitter<\/a> ‘tweets’. Building this ‘passive twitter integration’ seriously did not take any longer than one hour! This is because Twitter provides a blog badge<\/em> or widget<\/em>. More and more sites are starting to provide these widgets making it easier for people to take their data and display it on their blog. And that’s great!<\/p>\n However, the most popular data feed format – RSS – does not have these widget benefits. Widgets rely on a smart technique called JSON which allows your browser to fetch the actual data. With RSS feeds you need relatively complicated server-side processing to display the data.<\/p>\n So wouldn’t it be cool if there was a web service that allowed you to convert any RSS\/Atom feed into a embeddable widget? I’m sure some of you will suggest similar services now :]<\/p>\n A service like that should be:<\/p>\n Aahhh a new project has been born. Let’s open up MS Word and fill in our Prince 2 Project template. Herein we can properly plan for all things we need to be doing and all risks and?<\/p>\n Neh, just kidding! Let’s open up that bottle of wine<\/a> and? just fucking build it!?<\/p>\n For me, this is one of the more tricky parts. But fortunately, the project is simple and Web 2.0 designs simple too! Since I don’t aspire to be the next whoever cool designer, I will just give you my Idiot’s view of doing design:<\/p>\n The weapon of choice: Adobe Photoshop<\/strong> (CS3, the latest shizne!). (Any good web alternatives yet? \ud83d\ude42 They say Photoshop has a steep learning curve and I agree. Still there are some things you can do to speed things up:<\/p>\n Learn the most important shortcut keys, you will use them a hell lot (ordered by usage):<\/p>\n There are some things you will be seeing a lot in particular when doing Web20-like designs:<\/p>\n <\/p>\n When performing blending options on a layer, you should be playing a lot with the following marked options:<\/p>\n <\/p>\n You can learn here<\/a> and here<\/a> how to make these babies:<\/p>\n <\/p>\n Woops, I shouldn’t get to deep into the details. Anyway, based solely on the content a design like this rolled out:<\/p>\n <\/p>\n The colors can be justified as soil and nature, yin yang, peace man!<\/p>\n After having made those designs, I’d like to throw them online somewhere right away. Preferably in a SCM repository like Subversion. Luckily, I remembered an article on ReadWriteWeb about such Developer Tools<\/a><\/p>\n Basically there are two startups that provide freemium SVN and project management hosting. I chose Assembla<\/a> for disk space, but Unfuddle<\/a> was a close second.<\/p>\n That said, 10 minutes later I could start throwing things into my very own http:\/\/svn2.assembla.com\/svn\/wigitize\/trunk<\/em><\/p>\n Hell, it even puts changeset notifications in my Junk box!<\/p>\n <\/p>\n <\/a><\/p>\n Weapons of choice: RubyOnRails 2.0 and Textmate<\/strong>.<\/p>\n Note: If one piece of software is worth paying for, it’s TextMate – am doing so now<\/em><\/p>\n RubyOnRails is very suitable for me, but I’m not sure if it is that suitable for you. I myself have a clear CS-engineering background and am very comfortable with digging in deep. On the other hand, depending slightly on luck, you can do a lot with this framework by just modestly hacking away and watching a screencast<\/a> every now and then.<\/p>\n Rails is quite controversial in terms of scaling and production-ready. However, I think things are changing fast and as I will show you later. Serious innovation is done on how this framework plays with it’s systems layer and technologies like Amazon’s Elastic Computer Cloud<\/a><\/p>\n Like making the design, the coding also starts with content<\/em>. First you jack in the important texts\/inputs you have in your design and than you enclose them in the necessary ps so they can be CSS-styled later<\/em>. In Rails this starts with making a home\/welcome controller and writing the default layout: app\/views\/layouts\/application.html.erb<\/em>. Yes we are using the new Rails 2.0 way of html.erb.<\/p>\n A very important part of Rails I think is the config\/routes.rb<\/em> file. This file holds all your pretty URLs<\/strong> like: http:\/\/wigitize.com\/json\/for\/http:\/\/dominiek.com\/<\/a> . In a way routes.rb lays out all the abstract functionality of your web application. Rumors are that the routes part of the framework is internally the most complex one.<\/p>\n Some quick hinters on Rails practices that will speed up things:<\/p>\n There is a lot of material out there available on coding Rails in general, so I will let go here.<\/p>\n These first two hours are basically setting up all the routes, filling in the HTML and making things work in a very basic sense. For wigitize that meant:<\/p>\n <\/p>\n I spend the next 2 hours seriously code-monkeying on the feed detecting and parsing part of the system. I will soon open source it under the name feedeater<\/strong>.<\/p>\n Styling, already? Yes, I think it’s good to style quite early in the process. For me, there is one single argument: Flow.<\/p>\n When you are making something work it is nice when things already look quite tangible and usable. When you apply styling in an early stage you can see direct usable results of the things you are building, increasing the psychological state of the Flow<\/a>.<\/p>\n Ok, so I also kinda suck doing CSS, but I learned enough to turn an image into a web page. These are my bullet point lessons:<\/p>\n OK, I must admit that I spend way WAY too much time on this! However, when you’re doing things with AJAX, you need to put a spinner<\/em> somewhere to indicate loading.<\/p>\n This so called spinner is pretty kickass and based on a piece of Javascript I wrote earlier<\/a>:<\/p>\n <\/p>\n Yeah Baby! It’s all hypnotic and stuff.<\/p>\n Note: As someone pointed out in the comments, on ajaxload.info<\/a> you can get a lot of spinner images, like the one I’m using here.<\/em><\/p>\n I really like footers and I think they are becoming more and more important. Nowadays footers are used as sitemaps and often they are contextualized as well. These are nice examples of footers: last.fm<\/a> and snooth.com<\/a><\/p>\n For Wigitize the footer is rather small since it’s a small site:<\/p>\n <\/p>\n <\/p>\n The embeddable Widget has the following code:<\/p>\n Providing styles obviously complicates things a bit. When choosing a style, it will include a generic wigitize.css and assign a class to the containing p.<\/p>\n Near future improvements:<\/p>\n Running things in the background – dubbed backgrounding<\/em> – is an important part of production ready web applications. It’s a relatively new concept, since web applications used to be less complex. Now however, we are marching towards the Semantic Web where web apps are expected to become intelligent (the Intelligent Agents are coming, just like in the Langoliers!). I think being able to make your applications autonomous now will already reap you benefits (to be continued as an article).<\/p>\n There are several ways to achieve backgrounding in Rails<\/a>, but the far away most easy one is using BackgrounDRb<\/a>. BackgrounDRb is a plugin for Rails that allows you to easily kick off background processes and schedule regular tasks. Good for our purposes: detecting and fetching feed data.<\/p>\n I don’t agree with all of Zed Shaw’s big rant<\/a> about the Rails community being a ghetto, but I sure do agree that there are a lot of idiots out there that produce things that can screw over your production apps. BackgrounDRb has become one of these projects and I strongly recommend that you do not use the latest code. If you start comparing code and read the mailing list you will see that a new guy has taken over Ezra<\/a> fine project and I suspect that he has lowered the project’s level to pre-stable. I don’t hear any signals from the community and that worries me. Either I’m seeing ghosts or people are blindly accepting anything that’s marked as stable. In any case, I’m using Ezra’s version<\/a> which works fine.<\/p>\n The Wigitize API<\/a> for now is quite quick and dirty. There are two simple ways of using the API and examples are provided. In this area, a lot of improvements will be made down the line since it’s a key point in making any future freemium revenue.<\/p>\n When I buy a domain I always buy a DNS managing package with it as well. This means that I can login somewhere and setup subdomains and set mail records. So the total price of Wigitize.com was 20$ per year.<\/p>\n Providing info@domain.com<\/em> email is easy, just get yourself a free<\/strong> Gmail for organizations account<\/a>. In your Google Apps domain manager you can simply add your domain and in your DNS tool you set the MX record to ASPMX.L.GOOGLE.COM<\/em>. Now you can use gmail and IMAP to read mails sent to your domain.<\/p>\n I was really eager to put this project on Amazon’s Elastic Computer Cloud<\/a> until I calculated my monthly costs. Running costs alone for simple projects like these will cost you 60$ a month. Still I think it’s worthy to look into this once you scale beyond simple project.<\/p>\n After digging around<\/a> I figured out that slicehost.com<\/a> would be a good cheap second. For 20$ a month I have a 256 memory slice with 100GB in data transfer – awesome.<\/p>\n Setting up your slice<\/em> takes 5 minutes with a credit card. This slice is essentially a virtual machine with an IP address, completely yours. And the best thing: you get an awesome web console to control everything! Adding a new machine is a no brainer.<\/p>\n <\/p>\n Now, I’ve used linux\/unix for a long time as a working station. Eventually I got lazy and switched to my current MacBook. Fortunately, you can be lazy for the systems side of things too. All thanks to a lovely tool called Deprec<\/a>.<\/p>\n Deprec allows you to install the complete Rails stack with a small set of commands<\/a>. Shortly thereafter you can deploy your application to your production server by typing cap deploy_with_migrations<\/em>. Please note that for Deprec you need to install Ubuntu Linux on your machine which you can do as follows:<\/p>\n <\/p>\n Deprec installs the Rails stack as: Apache, Mongrel cluster (default of 2 instances) and MySQL. As I’ve written earlier<\/a>, NginX<\/a> is a nice nano-alternative for Apache. I would like to see that in my Rails stack someday, but I’m not going to worry about that now. Clock is ticking!<\/p>\n I think it’s good to prepare a little bit for the storm (and I felt like doing something else for a bit), so I’ve created a nice maintenance message for in case there are system\/scaling problems. In here I think it’s important to give people an extra reminder to bookmark and come back.<\/p>\n <\/p>\n Which brings us to another great service, addthis.com<\/a>. AddThis provides you with a button that makes it easy to bookmark on multiple social bookmarking services.<\/p>\n <\/p>\n Another one of those little tweaks was proper error checking and displaying it to the user. I am using a pink error message to make it look more friendly (maybe I should go even further and make it yellow or something):<\/p>\n <\/p>\n Statistics is another 10 minute no-brainer by using Google Analytics. However I’m on the lookout to find something more real-time like Mint (but than free). Any suggestions?<\/p>\n Note: I just added getclicky.com<\/a> to get more realtime stats than GA<\/em><\/p>\n I found a blog which is solely about Rails and SEO<\/a> which I thought was very promising but in fact doesn’t have much content. I do found something on how to provide different meta tags in rails<\/a> which I applied right away.<\/p>\n After looking around a bit I also saw some discussion about whether to use www. or not<\/a>. The way to roll with this is: you permanently redirect your www. domain to say http:\/\/wigitize.com. It makes sense, www is old and architecture centric, http:\/\/wigitize.com is less typing and pretty.<\/p>\n On that note, make sure that you always write pretty URL’s by practice. This means thinking them through extra carefully, because changing URL’s is painful after going live.<\/p>\n Wigitize.com was also chosen with SEO in mind. The word is a mis-spelling of the term widgetize and yields 105 Google results (at this moment). Additionally, it is a verb, which lubricates the prettiness of the URLs :]<\/p>\n Near future improvements:<\/p>\n While writing this article – which took quite some time. Wigitize.com is already running and doing it’s job. However, I’m sure there are still some kinks to work out which I will do over the past coming days (eg IE6 support, SEO\/viral tasks).<\/p>\n Also, I didn’t discuss anything about an important aspect: How to make revenue with Wigitize.com? I’m not sure yet, but since I’m solving a problem for myself, I’m sure others out there had it. Besides, the costs are extremely low at this point so I will worry about monetizing later. Although I would like to hear YOUR<\/strong> thoughts about it!<\/p>\n I realize that this is a geeky project and I must say it’s quite different than the web apps I normally work on. It was fun for me however to write down my thought process, especially on the non-tech parts of building which I find increasingly interesting.<\/p>\n","protected":false},"excerpt":{"rendered":" Written by dominiek This is about how I spend 24 concentrated hours spread out over 4 days during Holidays to build the online service Wigitize.com. It is part of my ongoing learning process on how to run a successful web startup. Even though I’m a super pimple-faced code-geek, I strive to be a creative entrepreneur […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts\/257"}],"collection":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":1,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":3327,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts\/257\/revisions\/3327"}],"wp:attachment":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Wigitize.com, A geeky Idea<\/h1>\n
\n
Design Mockup, 3 hours<\/h1>\n
\n
\n
Storing your Files in an online Project Manager, 30 minutes<\/h1>\n
Playing with Rails 2.0, 4 hours<\/h1>\n
\n
\n
Style that HTML! 1 hour<\/h1>\n
\n
Spin it Baby! 2 hours<\/h1>\n
Designing and Coding the Footer, 2 hours<\/h1>\n
Making the JSON Embeddable, 3 hours<\/h1>\n
<p class=\"feed_widget\"> <ul id=\"feed_widget_34\"><\/ul> <script type=\"text\/javascript\" src=\"http:\/\/wigitize.com\/javascripts\/wigitize.js\"><\/script> <script type=\"text\/javascript\" src=\"http:\/\/wigitize.com\/feeds\/34.json\"><\/script> <\/p><\/pre>\n
\n
\n
Making things run in the Background, 3 hours<\/h1>\n
Finishing up the API, 4 hours<\/h1>\n
Domain and Domain Email, 30 minutes<\/h1>\n
Setting up a Production Server, 1 hour<\/h1>\n
Little Pimps and Tweaks, 3 hours<\/h1>\n
Statistics and Search Engine Optimization, 1 hour<\/h1>\n
\n
Let’s throw it out there!<\/h1>\n