Posts  >  OneK - A challenge to create a webapp in under 1,000 Bytes of data

OneK - A challenge to create a webapp in under 1,000 Bytes of data

Earlier this week I saw a post on Reddit about onekb.net where you can "Get one KiloByte of free webspace for just 0.00000001 bitcoin per hour!" The goal of the post was to see what you could create in under 1 KB of data. I came up with the idea of making a Reddit RSS reader (unoriginal idea, I know).

After I finished a version to host I realized that I cannot use any PHP in the site, just JS/HTML. I plan on making a version in JS in the future but right now it is in either PHP/XSL or just PHP. The latest version is being hosted on my site at addison.im/oneK/ and I also have reddit.onekb.net/ for another couple of hours.

Once on the site you can search by subreddit but just adding it on like it is another directory. For example to list only posts in /r/webdev/ you would write /oneK/webdev/

The site pulls in content from the RSS feed at http://reddit.com/.rss using a combination of PHP and XSLT (Extensible Stylesheet Language Transformations). The website I help develop at work uses RSS feeds to pass content around the site since WordPress automatically generates them for posts. At work today for some reason RSS feeds were not working inside of the building's network. When I noticed my site wasn't working I thought there was an issue with the XML to XSLT transformation so I rewrote the site to only use PHP (I actually prefer using just PHP to parse XML feeds but I thought using XSLT would be more concise, which I was wrong about), but the error persisted.

Here is the github repo for the site. The live version is way over the 1,000 Byte limit since I chose to add the subreddit feature. I plan on having a new version, under 1 KB in just PHP/CSS up soon as well as adding some more styles to the current version like a header/menu with subreddits.

Comments