Jquery click not binding to checkbox (or any other element)

Posted in Geekdom, Programing, Web Development on January 24th, 2014 by Jarred – Comments Off

I am just writing this down for the sake of my own personal sanity. I just spent way too much time trying to trouble shoot why I could not bind a click event to a checkboxes in jquery. This post here gave me a clue what I was doing wrong. If by chance you are having a similar issue make sure that the element you are trying to bind to is already created and part of the DOM or it will not work and you will be left befuddled why exactly nothing is happening (at least I was).

CSS3 Gradient Generator Tool

Posted in Geekdom, Web Development on November 6th, 2013 by Jarred – Comments Off

For my next project I am working on achieving a web 2.0 look/feel and wanted to include shadows and gradients. I came across a css gradient generator tool that I absolutely love and made my life easier so I thought I would post it here really quick. You can find it here: http://www.colorzilla.com/gradient-editor/

No module named lxml.html error on Google App Engine

Posted in All on August 29th, 2013 by Jarred – Comments Off

This morning I decided to do a quick update on my Diablo website. I have not touched the site for a while and thought it would be a painless little update. Problem was I could not get the app to work in my local test environment. The app is hosted on the google app engine and in the GAE SDK I kept on getting this error “”No module named lxml.html”. I fooled around with my app.yaml for a bit trying to see if somehow that was the issue, it wasn’t. I was worried that somehow I corrupted my test environment or something like that because I know I had it working at some time in the past. It was driving me batty.

And once again stack overflow saves the day.

Per this post here: lxml.html error Turns out that the windows distro for python 2.7 does not include the lxml library. I am not sure why my Python installation no longer had the library as it was working in the recent past. I am wondering if with my most recent google app engine SDK update I re-installed Python. Either way, if you are getting a similar error the easy solution suggested by one of the posters in the above stack overflow is to install lxml from the below site.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

Reflections upon my last project

Posted in Entrepreneurship, Programing, Web Development on August 24th, 2013 by Jarred – Comments Off

So, I have come to the realization that I may not have the best ability to pick projects that end up being significant sources of income. In light of this realization, a few months ago I decided it was time to try and to a few “speed” projects rather than invest monumental amounts of time on a single project that more than likely will have lackluster resulted. While in theory this idea seems to make sense, in practice I am afraid once again I fell short of the mark.

 

While trying to find some decent rates for a personal HSA (health savings accounts) accounts, I found that useful online resources were few and far between. I decided that this might be a perfect niche opportunity to not only track and compare the interest rates offered by different custodians (something I was doing anyways), but also hopefully create a quick little site that others would find useful. I imagined the adsense keywords related to a health savings account site would be higher paying and the structure/layout of the site could be extremely simple and easy. All in all I judged it would be a lightning quick sprint of a project that would have some income generating potential.

 

I judged wrong (at least on the “lightning quick sprint of a project “ part). If you like, take a look at it here: While I am extremely happy with the final product, I logged about 66 hours so far getting it up and running. I started out using a Google doc spreadsheet as the database as I believed this would be fairly easy to maintain. Realizing that the maintenance of such a site would be significant, as an afterthought I decided to try and integrate with Amazon Mechanical Turk to try and crowdsource a lot of the nitty gritty upkeep. But I failed to account for how long this integration would take, and then how much I actually would have to pay to get the quality upkeep I was looking for. So, in the end, after taking all the time to integrate, I decided that the original spreadsheet idea was a much better idea and switched back (of course I deleted most of the previous versions so I had to rewrite much of it from scratch again). This took much longer than expected. In short, some of the takeaway lessons from the project are: I need to do a better job planning out my projects from the get go, and also I need to keep all of the past revisions (even if I don’t think I am going to end up re-using them).

 

So despite being disappointed by the much longer than expected time frame, I think the site turned out looking pretty good and could be quite useful for anyone looking to compare rates on HSA account. If by any chance you are looking for for a HSA account check the site out here: HSA Rates  As of yet there is next to no traffic to the site and of course this means as of yet it has not produced any real income. I am hopeful however that as the site gets indexed and gets some backlinks it will help improve income rate and bring me closer to my goal.

The confusing business of rounding individual cell corners within a HTML table

Posted in All on March 24th, 2013 by Jarred – Comments Off

 

 

 

So, I it took me some time figuring this one out and figured would write it down so I won’t forget  For one of my projects I was trying to add rounded corners to individual table cells. However, it was not working as expected and it was not clear to me why. I came across a hint found here in this post: http://stackoverflow.com/questions/10904075/table-header-with-rounded-corners-and-border  Turns out the trick is that you must add: “border-collapse: separate;” to your table or trying to round your individual table cells will not function as expected.

Remove an Element with a Relative Position from the Normal Flow of a Web Page

Posted in Programing, Web Development on March 8th, 2013 by Jarred – Comments Off

Here is a nifty little trick I found on a post from StackOverflow. I usually prefer to “relatively” position elements in my pages so that I can have a more fluid designs. However relatively positioned elements are not taken out of the normal flow of the document and so often I am left with a big ugly blank space where they would normally be found. This can lead to all sorts of issues especially when you try and relatively position every element thereafter to cover the ever growing blank spaces. Here is a novel solution that will create a 0 height 0 width pseudo-relative element to wrap around a absolutely positioned element to give you a relative reference point that will not leave that dreaded big blank space.

<div style=”position: relative; width: 0; height: 0″>
<div style=”position: absolute; left: 100px; top: 100px”>
Hi there, I’m 100px offset from where I ought to be, from the top and left.
</div>
</div>

Taken From: http://stackoverflow.com/questions/6040005/relatively-position-an-element-without-it-taking-up-space-in-document-flow

Time to call it quits with Adbrite and Project Wonderful

Posted in Entrepreneurship on March 6th, 2013 by Jarred – Comments Off

For several months I have been trying out two different small time ad networks to see if they were viable methods to produce extra income. The first one (Adbrite) went out of business after about ($10 of income over about a year). The second one (Project Wonderful) I really did like the idea and service, but after about a year of having their ads run on a few of my sites, my total income from them is around $8. So in the end It looks like they were not even worth the time I spent installing their ads.

Also, just for archival purposes, (as I am not actively tracking the changes in my overall income per hour) currently I estimate I have earned about $0.91 per hour I have invested in this experiment.

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

Posted in Entrepreneurship on March 6th, 2013 by Jarred – Comments Off

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

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

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.