PHP unexplainable errors on line 1

Posted in Programing, Web Development on September 25th, 2014 by Jarred – Be the first to comment

Just throwing this out there for anyone who might be experiencing some crazy PHP errors that don’t make any sense. I have been away from PHP for a while but started working on little project that requires a php back-end. But, right from the get-go I was getting some really simple errors that I knew could not be the issue (such as “unexpected end of file” or simple syntax errors for unexpected strings etc.) At first I thought it might be that I was just a little rusty on the php syntax, but could not figure out what was going on and could not get anything to work. The files I was working with were extremely small and it was obvious the syntax was correct, but the weird errors were persisting. Thing was they were were all occurring at line 1, which was puzzling at the time, but I didn’t give it much thought (which should have been a huge red flag to me). So, it turns out my editor of choice (Notepad++) was only inserting a CR (carriage return) and not the full CRLF (carriage return line feed) not quite sure why this behavior was happening (or why PHP engine could not figue it out), but as soon as I replaced the CRs with CRLFs everything started working as expected. I did not investigate this all the way, but I am assuming this probably has something to do with how my host has PHP configured or something simple like that, but for the uninitiated this can really perplexing (and incredibly frustrating). So, the take away here is if you are having some unexplainable PHP errors that are all occurring on line one, maybe check out what you are using for your EOL (end of line) characters and see if that is the issue.

Transit – CSS transformations plug-in for jQuery

Posted in Web Development on September 15th, 2014 by Jarred – Comments Off

I came across a little jquery plug-in that I found quite nifty and thought it deserved a shout out. The plug-in is called Transit and can be found here: http://ricostacruz.com/jquery.transit/ The plug-in not only makes css transformations a breeze the end animations produced are incredibly smooth. It is very simple and straightforward to use. Anybody already familiar with jquery .animate() will be able to pick it up with little or no effort. As of version 0.9.12 the minified file is only about 8kb. I built a little game using the plug-in (game to be released publicly in a post to come) and was very pleased with the outcome. I really couldn’t be more happy with the the whole thing with the and figured I would little post it here so A: I can remember it personally and also B: give the project a bit of love so hopefully development will continue.

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.