Archive for the The Site Category

Speed is good!

Posted in Code, The Site with tags , , , , , , , , on March 21, 2008 by Sean Colombo

Most of the work that has been done on this new trip to doItLater has been just refactoring the original code.  I’ve done a lot of interesting things since back then, learned a lot more, and the first time I threw it together it was a complete side-project with a short-term goal, so I didn’t spend any time deleting unneeded functions or making things really solid.

I’ve been cleaning up that mess for a little bit now.  It’s not a hard mess to clean up at all… there is a lot of quickly-written stuff and old code that isn’t needed, but at least it was very well organized.

The most recent releases of doItLater that I pushed out to the site included a profiler which lets me see what parts of the code are being slow, and a new way to connect to the database only once per page instead of nearly once per function as was being done before.

The speed improvemens have been significant.  Getting rid of multiple connections is a great way to get a huge gain across the whole site.  On top of that, the main page has been just embarassingly slow for a while.  I thought it might have had something to do with being on a super-inexpensive web-host (DreamHost), but that turned out not to be the main problem.  Since the profiler was out there, I ran it on the main page, and sure enough, the script was executing for 15 seconds, and almost all of that time was spent generating the “Random Stuff” thumbnails which shows any random content.

After looking at the query, it really is an inherently slow process.  To get around this, I now cache those results for 15 minutes (so it’ll only be slow for 4 people per hour).  I had to write a caching class which was a mix of some caching used on Pedlr and LyricWiki, then with some new stuff too.  I’m really excited to have the profiler and the “Cache” class around.  I probably won’t have to do much more performance work for a while (since it’s running fairly fast now), but it’s good to know that once we need to scale – these tools already exist.  When you need to scale an app, you’re generally in a panic because traffic is growing and everything is slow or breaking and you’re losing people.  That’s not the kind of time when you get to casually sit back and make some really shweet tools to help yourself along.

Anyway… the site is fast now.  Enjoy 🙂

doItLater.com is Open Source… check out our statz on Ohloh!

Posted in Behind-the-scenes, Code, The Site with tags , , , , , , , on March 21, 2008 by Sean Colombo

Recently, when I decided to rewrite doItLater into something else (totally new functionality), I also chose to make the project become a portable engine that would allow similar sites to be built almost instantly.  The concept here is that doItLater can have a niche (internet memes), then others can build similar niche sites using this code.  One site may decide to have all of their pictures related to a certain “football” (soccer) team in the UK, another may decide to become the source for Star Wars fan-art.  Whatever floats your boat.

As an added bonus, open source projects can have their code analyzed by Ohloh.net to calculate the number of lines, comments, etc. and estimate how much the system would cost if you hired developers to write it for you.  The engine just topped $100,000 in the last update. 🙂

If you want to see more details, browse through doItLater’s stats.  If you see a little “Ohloh” badge on the site, those are the stats that it will be summarizing.

When the engine actually does what it’s supposed to (for now it’s mostly a cleaned up version of the old doItLater) I’ll make sure to post more info on where to get the code and how to use it.  My goal is to make it so easy that anyone can run it even without knowing PHP.

What do you think of the Open Sourcing of this project and what is your impression on the stats… leave comments!

The doItLater “dil” handsign

Posted in Content, The Site with tags , , , , , , , on March 16, 2008 by Sean Colombo

I thought I’d take a minute to explain the doItLater handsign for those who are confused by it.

On doItLater.com,  the main logo is a hand-sign and so is the favicon (little picture next to the web address in your browser).  Some people just thought it was the “perfect” symbol.  Now, while they are correct in assuming that the site is, in fact, perfect – that’s not the meaning of our particular logo.

It’s not ASL or anything fancy like that… turns out it’s actually pretty simple: the fingers spell out “dil”: an abbreviation for “do it later”.  If the letters don’t jump out at you right away, it’s probably just easier to show you than to try to describe it… check it out:

doItLater handsigndoItLater handsign with lettersdoItLater handsign just letters

Pretty shnazzy, huh?

A meme of its own

The dil handsign has started popping up in pictures.  I have a feeling it will be in a larger and larger number of the images that people submit to the site.  To keep an eye on this budding internet meme, check out the items tagged with “dil”.  If you’re out and about and you see something cool and want to take a picture with it, throwing out a “dil” sign is about the best way to make sure that your picture gets some attention on the site.

But it’s backwards!

We hear this one a lot.  It’s apparently really confusing for some people to remember their lefts and rights when it comes to the dil handsign.  Heck, I even have to double-check myself and I’m pretty sure that’s my hand in the logo (but I don’t remember, it could have been the Graphic Designer‘s hand).  Nonetheless, we like to make fun of people when they screw up and make them think that they’re the only one on the planet with trouble figuring this one out.  When you do the sign backwards it would spell “lib”, so we also have a “lib” tag with which to ridicule the unfortunate submitters who don’t remember to flip their picture before submitting it if they messed up in the wild.  As I’m writing this we don’t have any “lib” items yet, but I’m sure we’ll get plenty over time.

Quick tutorial: if you want to use your left hand, point your palm towards the other person/camera.   If you want to use your right hand, just throw the sign across your chest so the outside of your hand is showing.  Check out this excelent example from a clearly-intelligent, strapping young lad.  Two years from now he’ll be bragging that he had the first dil-sign picture on doItLater.com and nobody will believe him.  So sad.

One final thought on the sign being backwards: maybe it’s not the sign that’s backwards… maybe your hand isn’t screwed on right.  Adjust accordingly.

doItLater.com – New skin!

Posted in Code, The Site with tags , , , , , , on March 9, 2008 by Sean Colombo

In the wee-hours of the morning, I released the new skin for doItLater.com.  There are a lot more changes under the hood, but the visible parts are that the top looks a little better now, there are tabs for the different sections of the site, and the page will automatically resize based on your screen resolution from between 800×600 and 1024×768.  If your resolution is bigger, the area will just stay centered.

Feel free to leave comments with your opinions (if you have one of those).

The new layout was tested in FireFox and IE 7, and the general outline of the page is pretty valid XHTML, but when I uploaded it to the live server (which has actual content in it) I found that there are still some standards things to iron out.  That’ll happen soon.

Yo!

Posted in Code, Me, The Site with tags , , , , , , on March 5, 2008 by Sean Colombo

This is a blog related to doItLater.com. It will talk about the development of the site, highlight interesting content on the site, and just generally drone on about my experiences related to the site.

Background

I first put the site up about 2.5 years ago (fall of 2005). It occurred to me that it’d be easy to make a college-humor-like site, just with better content (CH is mostly just attention-craving college girls’ boobs with “CollegeHumor” written on them mixed with some occasional shamings/chiefings with people standing around giving “the shocker” symbol with their hands). Don’t get me wrong, I have a lot of respect for CH. There are a ton of similar sites, and theirs was coded better & promoted better so they triumphed in the end. I just think there’s also room for other sites. In fact, Jacob Lodwick who wrote the site went to the same school as I did (RIT) but I think he left right before I came in.

Now that you know my motivation, the details are just that I cobbled together the code as a side-project based on the framework of another site I was doing. I got a semi-decent amount of content up there and just kind of let it stew. In keeping with the name, I indefinitely procrastinated on all of the development tasks I should have been doing on doItLater.

My little brother liked looking over my shoulder at this stuff, but most of it (and most of the internet in general) was out of his age-bracket, so for his birthday, I whipped up an age-appropriate skin and implanted some age-management code throughout the site. My brother’s site, ConnorRocks.com, actually computes his age dynamically and only shows content that is appropriate for his age. I really enjoy that sanitary version of the site, but my brother keeps getting older! At some point, I’m probably going to make a version with a pegged age-limit just so that there is always an innocent safe-for-work version of the site.

Revamp underway!

Given the nature of the site (basically devoted to procrastination) I’m probably never going to finish the revamp, but I’m giving it a shot. Since it was written really hackishly based on code for another site, there is a bunch of unneeded stuff which reaks of my three-years-ago coding style (before the web-standards gestapo got to me and the APC op-code cacher restored my faith in Object-Oriented PHP as a feasibly-fast tool).

The decision to re-write the site was partially based on the fact that the site still gets a few thousand page views per day and it’s just completely neglected. On top of that, I had some ideas for a media site and I decided to just start with what I already had. The final kicker is that life kind of sucks for me right now, and I need a creative outlet again. Coding kills the pain.

Although there is no real reason to, I’ve made the code Open Source. Honestly, I think the primary reason this ended up being my choice is that I love Ohloh to pieces, it makes coding even more fun (everyone loves stats, end of story) and I wanted an excuse to use it. For those unfamiliar, Ohloh is a site/tool which you give access to a public SVN (or CVS, etc.) repository and it looks at your code, counts the lines in each language, number of comments, number of commits, etc.; calculates the financial value of your code, and gives you all kinds of sweet graphs. I check my page like 5 times a day even though it only updates about once every three-to-five days.

During this revamp, I have a lot of cool features I plan to add, but first I’m removing the suck from the existing code. I’m putting in some object-oriented code where it’s useful, and overall just making it way better. Currently I’ve refactored a bunch of the code, and I’m getting close to releasing it, I just have to iron out some IE7 display issues (what else is new?).

The main philosophy of the new site is that although I have a little time now to blow on this thing while I heal, I can’t be maintaining this thing forever. So I’m going to write it to be such sweet code that the site (and its users) can run the whole thing. If something is totally automated and it works, then that’s some good code!

The Future

You’ll have to see! When the site changes its look, you’ll know I deployed the new code. It won’t do much that’s different from your point of view at that first moment, but the code will be in a nice state where everything can be written much more easily from then on. There will be small perks like the ability to use 800×600 resolution fine while still expanding for larger monitors automatically (currently it’s just squeezed down for 800×600), but the big stuff will come later.

Keep your eyes open, and please if you think of anything, just email me at “submit” at the domain name of the site I’m talking about. I actually will read your email and I actually will respond to it. Crazy concept, huh?