Embedding

Wednesday, April 11th, 2012

A friend asked me yesterday if he would be able to embed videos in his Posts. I’d already decided that I’d make it possible, so today I set about implementing it.

Turns out that embedding a youtube video is pretty easy, and just a little Regex, or URL parsing (thanks to Stack Overflow) was necessary.

Some people, when confronted with a problem, think
“I know, I’ll use regular expressions.”   Now they have two problems.

Jamie Zawinski

I tried to make Sound Cloud songs embed automatically as well, but the way they process URLs is currently preventing that. Maybe I’ll send ’em an email – their service is pretty good so I assume that they are on the ball.

So now you can just Post a Youtube.com URL (like “http://www.youtube.com/watch?v=QH2-TGUlwu4”) and the video will be posted for you. ᵔᵜᵔ

Pretty neat, eh?

We think it’s Nyantastic!

Advertisements

Making a Motto

Saturday, April 7th, 2012

Google’s unofficial slogan is “Dont Be Evil”

Volkswagen Beetle “Think small”

Nike’s awesome slogan is “Just do it”

PJs.Cat needs an awesome slogan too, and I was thinking of a slogan which communicated the coolness of the site. After much deliberation, we have it. We decided to re-purpose a coloquial expression, hope you like it.

PJs.Cat: “It’s the Bee Knees”

This will form part of our brand identity. It communicates that despite our grassroots beginnings and non corporate nature, we still strive for greatness.

Tool Bar Gradients

Thursday, April 5th, 2012

Okay, so “Tool Bar Gradients” doesn’t sound exciting, but it’s an important concept, which has been grasped and used by a whole bunch of multi billion dollar companies, including Google, Twitter and Facebook.

Facebook:
Google:
Twitter:
By toolbar I mean the little bar used for navigation at the top of the page. And if we look very very closely at these toolbars we can see some reoccurring tricks which the big shots use make their websites look neat, clean and together.
Some extreme toolbar close ups:
Facebook:
Google:
Twitter:
At the bottom of each title bar you’ll notice that there is a dark line which marks the end of the bar. Just underneath this, you can see that a shadow has been drawn on, making the title bar appear distinguished from the rest of the page.
All of the cool kids are doing it. Just take a look at the wordpress toolbar:
Close up:
If you use this $5 trick, it’s a part of making your site look a million bucks.

How Much Social Networking Is Enough?

Wednesday, April 4th, 2012

For me it started with MySpace. Then everyone jumped ship to Facebook. Then we signed up to Twitter. Professionals joined LinkedIn. Middle aged women found cake photos at Pintrest.

Every once in a while I think that Social Networking has had its day. Then another site come along. I wait for a few months. Then another. And another.

Just because I have an account at Facebook, doesn’t mean that I don’t want to show off photos of my cat on Flickr. Or check out the latest popular pics on Mlkshk. Or even make a Post on PJs.Cat.

Quantity not Quality

Tuesday, April 3rd, 2012

Twitter is great. It’s fun, it restricts the number of characters per tweet so much that users only have enough space to express a single interesting idea. And one of my favourite things about twitter is the list of trending tweets.

But instead of promoting the best, most fun, most interesting tweets, it promotes the most recent tweets which have a hashtag which has been tweeted recently in large quantities. This means that instead of promoting quality, twitter promotes quantity.

One move twitter HQ has made which addresses this issue somewhat is to put heavily re-tweeted tweets at the top of the results for a hashtag. But when 99 times out of 100 a tweet will instantly be pushed down the list of trending tweets, the incentive is not to write a high quality tweet but a high quantity of tweets.
Disclaimer:
As we are creating our own microblogging service, we are completely biased.

Replacing HTML With Client Side LOLCODE

Sunday, April 1st, 2012

Something which I have been working on for the past few weeks is how to run LOLCODE as a client side interpreted programming language similar to Javascript or HTML. HTML may not a turing complete programming language, but it’s simple nature make it an easy target for my first attempt.

So far I’ve managed to get a prototype parser / interpreter to parse an adapted version of LOLCODE at runtime to deliver a (semi) valid HTML document.

LOLCODE being used as a markup language for the first time

If you want to check it out, the worlds first client side LOLCODE prototype is at http://pjs.cat, and please be sure to check out the source code.

Automatic Email is Easy!

Friday, March 30th, 2012

Something which has been worrying me with the development of pjs.cat was how do we automatically send users email? When a new user signs up, I may want to send an activation email. When a user loses their password and they need to reset it, we’ve got to send out an email.

But every time I tried sending one, it didn’t work.

I decided to put it to the back of my mind, and sort it out later. I had a hunch, and that hunch was that the emails weren’t sending because the local server on my computer wasn’t fully set up.

Well today I uploaded this really really simple PHP script to my new web server:

And I was rewarded with this message:

It worked! Now I know, it just seems so easy.

For me the magical world of email just got reduced to a few simple lines of code.

My Determination Will Make This Blog Great

Wednesday, March 28th, 2012

Willpower is often understated. People rely on their luck far too much, afraid to push themselves out of their comfort zone.

I’m as guilty of this as anyone, but I do believe in making my own luck. I believe in being the master of my own destiny. Sometimes people become rich or successful overnight, but I think that for most of us it takes time and good old fashioned hard work. This blog is very new, just over one week old, but I have the determination to make it big.

I’ll move mountains if I have to. I’ll move rivers and streams. I’m here for the long haul and I believe that anything is possible if you try hard enough, and that effort will be made. This is the PJs.Cat blog, hear me roar!

What Makes a Good Terms of Service?

Tuesday, March 27th, 2012

Tumblr has recently updated it’s Terms Of Service (TOS), some legal mumbo jumbo to which you must “agree” in order to use it. Gizmodo has recently written an interesting article highlighting jokes which were written into the dense legal text.

What the agreement looks like to most people

I will of course have to write my own TOS for PJs.Cat, in order for everything to be above board.

Googles TOS look like they were written in legaleese and contains SCARY SECTIONS WRITTEN IN ALL CAPS which freaks me out.

The WordPress TOS are logically organised into 19 short segments, and is licenced under a a Creative Commons Sharealike license, meaning that anybody is “more than welcome to steal it”. And I think I shall, thank you very much ᵔᵜᵔ (attribution will, of course be given).

A balance needs to be struck between covering my own ass from the needless litigation of parasitic institutions and reprehensible individuals, and clear, clean, simple guidelines that the actual human beings who use the service can actually read.