Memoirs on a project that took too long (way too long)

Posted in Entrepreneurship on March 6th, 2013 by Jarred – Comments Off on Memoirs on a project that took too long (way too long)

So, I have finally completed my upgrade of my Diablo 3 Calculator site. I am very happy with how the final product turned out I feel like I greatly improved the tool. On the outset I thought that since this site was my most successful project to date that it would be worth it to polish the whole thing into a even better, bigger, badder tool. However, I am afraid that from a economical perspective and in regards to my ultimate goals, I think I made some pretty significant errors. I would like to get down on paper what I feel I did wrong so I can hopefully be more efficient in the future.

First: I spent too much time on the project. Way too much. It took me like 5 months or so. I probably put in a good 300 – 400 hours or so to polish everything up. Since I am still new to the world of web entrepreneurship I think this is the equivalent of putting all my eggs in one basket. I could have done 3 or 4 smaller projects and maybe could have come up with something that was even more successful, but instead, about half a year later I have pretty much the same in terms of income producing web property as I did before.

Second: I don’t know if I an going to see any extra return on my time invested. The site was already reasonably successful in the first place and ranking well. While I know I greatly improved the tool, I don’t know if from an economic standpoint I will make any more money from the site than before. So far I have seen little change in the adsense income coming in and it seems unlikely that will change. I probably should have never started the project upgrade in the first place. I think before starting future projects (or improving existing ones), I should take the time to try to judge if the potential increase in income can justify the time I will invest in the project.

Third: My Market/Niche I feel was a really poor choice. Diablo 3 has been a fairly unpopular game. I doubt it will maintain a very large player base for very long. I knew all this before I started the upgrade. I want to build things that will be viable for years to come. I think it would be far better for me to focus on markets niches that will hopefully be profitable for decades or more.

Fourth: The keywords for this site are low paying. This directly translates to lower income potential. I should probably spend some time before starting a project to research out if it is a higher paying market and how much competition there is in the market. Hopefully in the end this will translate into more profitable sites with higher paying keywords.

Fifth: I think a very useful skill to develop is the ability to correctly estimate how long a project is going to take. So far I have been incredibly poor at trying to gauge the time involved in completing stuff. Instead, up till now I just get a idea and then just throw myself at it assuming that it wont take long. If I could get a more accurate reading on how long something will take, I could better judge if it might be worth my time to try.

Sixth: I am always trying to learn new stuff. Pretty much everything I have done up till now I have been trying a new technology, different language, or some framework or something. While this is for sure a good thing as I have greatly expanded my skill set, I think it might be about time to start trying to cash in on what I already know rather than trying something new each time.

So, I guess ultimately what I am trying to say is I really need to start valuing my time more. I need to take the time to plan the whole thing out and try to see if the proposed endeavor might be worth my efforts. If I am ever going to get to $1000/month I need to more strategic with my time and not so willy-nilly.

Getting the back button to work with Backbone and jquery mobile

Posted in Programing, Web Development on January 3rd, 2013 by Jarred – Comments Off on Getting the back button to work with Backbone and jquery mobile

I was getting some strange errors in my app when trying to get the back button to work with the pushState history provided by Backbone.js. I was getting this error: Uncaught TypeError: Cannot call method ‘replace’ of undefined jquery.mobile-1.2.0.min.js:2 I suspected it was a conflict between the “routing” systems provided by jquery mobile and the backbone frameworks. In my search to figure out how to make it work I came across this post here http://coenraets.org/blog/2012/03/using-backbone-js-with-jquery-mobile/ The solution presented in the article however did not work for my as apparently (unknown to me) I was using some of the features that were being disabled. To solve my issues I pared down what the article suggested I disable and then just inserted the code into script tags right after I loaded all the frameworks. I now have a functioning back button in my hybrid jquery mobile/backbone app.

$.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false;

Combining JSON objects from the google datastore problems

Posted in Geekdom, Programing on December 10th, 2012 by Jarred – Comments Off on Combining JSON objects from the google datastore problems

So, here is the story: I have two different JSON objects stored as strings in the google app engine datastore. I have been trying to fetch both of the two JSON object in a single ajax call in an attempt to reduce the number of request made to the server which hopefully will make my application more efficient/quick. However It took me a great deal of time to figure out exactly how to merge / combine the two different JSON objects into a single object server side for ajax transfer over to the client. I kept on getting JSON validation errors even though the code looked perfectly good to me. Even worse the online JSON validators would tell me that there was an unexpected character, but they would either not tell me where it was, or the location they specified was perfectly valid JSON. So, eventually I figured out my problem (at least one of them); I was encoding (unwittingly) the objects in the datastore as UTF-8 with the “byte order mark” which was causing validation errors when I tried to merge the two object. Once I encoded the files that were creating my datastore object without the byte order mark, they successfully merged into a unified JSON object that I was able to pass via ajax and successfully parse.

In case anyone is wondering (or I have to figure out how to do it again), here is the way I combined the two python JSON objects server-side:

combinedObject = { 'obj1' : dataObj1, 'obj2' : dataObj2 }

However, for some reason (as of yet I do not fully understand) I have to call the JSON.parse on both the parent object and then child objects in order to get the objects correctly parsed into javascript.

EDIT: Another note regarding unexpected character errors when trying to parse JSON: I was pasting in formatted and what I thought was validated data from one of the many online tools, however I think I was also inadvertently pasting in hidden characters which was causing all sorts of confusion and problems. Another thing you might want to check this if you are having parsing errors.

How not to set Backbone model properties

Posted in Geekdom, Programing on November 29th, 2012 by Jarred – Comments Off on How not to set Backbone model properties

So here is another backbone.js tidbit that took me a while to figure out/understand. This may be fairly straight forward to seasoned programmers, but it really through me for a loop. If you try and set initial model (or view) properties outside of the “defaults” method you can not retrieve them using model.get(‘propertyName’). This was a point of confusion because sometimes it was working like i though it should and sometimes it did not. To further complicate things I was trying to set properties by passing them when I was instantiating the object. It took me a while to figure out what I was doing wrong.

So this is incorrect even though you can still access the object properties.


ExampleModel = Backbone.Model.extend({
propertyName: 'Some Value',
})
exampleModel = new ExampleModel ({propertyName: 'Updated Value'});
exampleModel.propertyName// 'Some Value' not 'Updated Value'

From what I understand this is the correct way to do it


ExampleModel = Backbone.Model.extend({
defaults: {
propertyName: 'Some Value',
},
})
exampleModel = new ExampleModel ({propertyName: 'Updated Value'});
exampleModel.get('propertyName') //'Updated Value'

Now that I understand the concept the documentation makes this very clear to correctly set default model properties using the defaults method.

Problems with binding events on subview in backbone.js

Posted in Programing on November 23rd, 2012 by Jarred – Comments Off on Problems with binding events on subview in backbone.js

I am working on learning backbone.js and well it has been a bumpy road. Along the way I have come across several hiccups, but this one was a doozy and caused me all sorts of frustration. I was trying to to bind a change event to a select menu in one of my subviews. For the life of me I could not get the event to fire correctly. If I copied the exact same event to the parent view it worked just fine. This lead me to believe that I was experience a scope issue. There is lots of information on the web about breaking the scope of “this” in backbone.js which further lead me to believe this was the problem. But turns out that was not the problem at all. After a whole lot of confusion I lucky stumbled upon this post on stackoverflow

Unfortunately it looks like it was not the answer to the original posters problem, but it solved my issue.

According to the post, events in backbone.js are not actually bound to the changing element but rather the root element of the view and then delegated to the children from there. This is important if you are not actually inserting your the root element of your subview into the DOM, because then your events will not fire (which is exactly what I was doing).

So, this render function simply inserts the rendered template html into the DOM which fails to actually insert the views el into the DOM.

render: function() {
$('#anchorDiv').append( this.template(this) );
},

Something like this however will actually insert the view’s root element into the DOM which will (at least in my case) solved all my event issues.
render: function() {
$(this.el).html( this.template(this) );
$('#anchorDiv').append( this.template(this) );
},

I am really liking backbone.js as I think it is helping me better structure my applications. That being said, it has been tough to really learn and grasp how everything is supposed to work. This issue was not straight forward to me at all and hopefully might help somebody out there figure out why their events are not working like they thing they should.

And a few months later…

Posted in Entrepreneurship on November 9th, 2012 by Jarred – Comments Off on And a few months later…

Well, I have not really worked on any of my online project for a few months as my day job (the one that pays better than $1/hour) has been really busy theses past few months. I have not had much time and not really done much in the way of progressing towards my goal. However there are a few noteworthy items to mention. I did spend some time back in Aug. working on the next revision of my Diablo 3 site. So far this site has by far brought in the most income and I think updating it and making it better should be the top priority. As of then my updated version of the site has been sandboxed and is only about half way done. I am trying to figure out how to put the next revision (and final revision) it on google app engine, so that is greatly increasing the time it is taking as I have had to learn how to program in python and learn all sorts of new stuff to get it working.

My income/month has greatly diminished over the past few months and It is mostly because of the diablo 3 site project receiving half as much traffic as it was previously. I think this has a lot to do with the game loosing a lot of its player base (it turns out it was not all that popular of a game for very long). Also, the calculator suffers from inaccuracy issues which might also be causing some of my visitors to not return. While I can not do anything about the game players loosing interest in the game, I can address the accuracy issues in the next version which will hopefully help retain some of my traffic. I would imagine that in the future updates of Diablo 3 game itself (i.e. the inclusion of PVP play) I will see spikes in my traffic which hopefully result in spikes of income.

Income from HTML5 Game portal has slowly been increasing and that gives me a lot of hope that the site will eventually become a good source of revenue. However I am realizing now that fundamentally it requires too much effort to maintain and keep updated. As of now I have to manually review and update each additional game I put on the site and this can be quite time consuming.

I am still hopeful and optimistic about this whole experiment. I have put in a lot of time and effort and I am finally starting to see some results (small). It feels pretty good to know I have not really done anything for the past few months and have still been receiving a few checks in the mail. It feels like “passive” income, even though I know it is an illusion as I have already work for the money. I guess in 10 yrs if the sites are still making money and I have paid myself back for all the time I have spent then I can finally consider it to be truly “passive.”

A small victory

Posted in Entrepreneurship on August 2nd, 2012 by Jarred – Comments Off on A small victory

After more than a year of dinking around I have finally caught a gimps of success (a small glimps that is). But hey, you gotta celebrate your small victories. My diablo 3 calculator project really has taken off and is starting to generate some significant traffic and I am actually making a little income. Up to this point my estimated income per hour has been down there at around 10 to 20 cents, but now it is showing all the way up there at 60 cents an hour. Yeah, with an income like that I wont be quitting my other jobs anytime soon, but who cares, this whole experiment just may work(just might take me another decade to up my income up to $10/hour). I think the idea of “passive” online income may be a myth. This is all taking and incredible amount of time and effort.

Google Chart Tools

Posted in Web Development on August 2nd, 2012 by Jarred – Comments Off on Google Chart Tools

So, I have been using the Highcharts JavaScript API to draw the income charts on this site. I spent a lot of time figuring them out and I really really liked how the high-charts looked on my site. However, the free version just did not offer very good ways to display really dense data sets. My experiment has been going on long enough that the charts were getting unreadable and cluttered and so I went searching for free alternative charting API that had scroll bars and could better handle dense data. I found out about Google Chart Tools and really liked them. They are the charts you can currently find on my site are the ones documented here. It did take me several hours to figure everything out but all in all I highly recommend them if you are looking for a free charting API and need to display dense data.

Pinterest Board to Promote a Site Experiment

Posted in All on May 24th, 2012 by Jarred – Comments Off on Pinterest Board to Promote a Site Experiment

It kinda seems to me that Pinterest is the new up and coming social media site. It offers a really convenient way to keep track of and share images. You are also able to share and keep track of links to websites which is what I am interested. Currently the main demographic that is using the site seems to be primarily females in their 20-30’s . In a way it almost seems like a reddit but for girls. However, having said all that I am predicting that the site will eventually expand and all the guys will start joining as well.

What got me started on pinterest is I noticed that the search engine results for a keyword I am targeting for my html5 game site had a pinterest board ranked well ahead of my site in the results. So, natural I created my own board to try and help promote my site. Check it out here http://pinterest.com/HTML5GamerNet/html5-games/ . If you do a search for pinterest to promote your site or something like that you will find all sorts of blogs and experts telling you how important it is, but I am still not convinced it will really do all that much good. But, since it was a pretty small time investment I figured to try it out anyways. If by any chance I notice any significant benefit I will either update this post or create another one.

Adding php to and HTML page: application/x-httpd-php5 vs application/x-httpd-php

Posted in All on May 6th, 2012 by Jarred – Comments Off on Adding php to and HTML page: application/x-httpd-php5 vs application/x-httpd-php

Yes there is a difference. I was trying to parse php code in a file with a .html extension. So I do what I always to and look to the web for the syntax on how to edit my .htaccess file. However, pretty much every website will tell you to add one of the following lines:

AddHandler application/x-httpd-php .html .htm

or

AddType application/x-httpd-php .html .htm

However some web-hosts (including mine) require you to define specifically  that you are using php5. So instead of the above lines of code you have to include one of the following

AddHandler application/x-httpd-php5 .html .htm

or

AddType application/x-httpd-php5 .html .htm

 

If you don’t include the php5 (for my host at least), it will not work. It is an incredibly frustrating nuance that not many posts and forums do not cover. So, if you are trying to execute php inside of a html page using your .htaccess file and are having problems you might try adding the 5 to the end of php. Funny thing is I am pretty sure I had the same problem a while back but forgot the solution.

A great post which goes into detail regarding which code you should be using can be found here
http://www.velvetblues.com/web-development-blog/how-to-parse-html-files-as-php/