10K Apart

Jim R. Wilson Avatar

10k personal search engine

by Jim R. Wilson

A personal search engine in 10k. Use the 'add' bookmarklet to add pages to your index, then use the 'search' tab to find them. src = http://github.com/jimbojw/10k/ Hackers welcome. :)

Comments (12 ) Leave a comment

Jim R. Wilson

Jim R. Wilson

I've wanted to make this app for a long, long time. Finally got down to it. Thanks in advance for your consideration!

Alex Le

Alex Le

Great job! The bookmarklet stuff is cool, but in Chrome there's no feedback whether the page has been added to the index or not, so as a user I was a bit confused. I checked out the code, and you have everything organized really neatly. My own 10K project is quite a mess compared to your repo: http://sr3d.github.com/GithubFinder/?user_id=sr3d&repo=GithubFinder Good luck! I've learned a thing or two from looking at your code already.

Jim R. Wilson

Jim R. Wilson

Thanks Alex! Good point about the feedback. I had considered two routes: one was a simple alert(), the other was an in-page popup form. With the alert(), I'd need an option in preferences to turn it off. This I could have probably fit in my 300 remaining bytes - in retrospect, I should have added it. With the form, I really wanted to give options like "select an image" or "select important text". I really just ran out of space. I also wanted to migrate the indexing code into a Web Worker, but since IE 9 doesn't have support, I'd still need a fallback implementation - which means more code :/ In any case, I value your feedback - my plan is to continue to develop this app. There are definitely more features it needs (such as an export/backup feature, better feedback, asynchronous indexing, support for screenshots, etc). Thanks again!

antimatter15

antimatter15

Very cool, but I don't think your localStorage index is very efficient. It probably wouldn't be long before it hits the 5MB limit from most browsers.

Jim R. Wilson

Jim R. Wilson

Hi antimatter15, Thanks for taking the time to comment! That's certainly a fair point. Given the contest constraints, and knowing that browser storage allocations can generally be increased via a user setting, I optimized my app principally for search speed and secondarily for indexing speed. Compressing the values pushed into localStorage could certainly help given the highly repetitive nature of the content. Thanks again!

Mitch

Mitch

Pretty awesome

Eric Redmond

Eric Redmond

This app is amazing. Not only does it have real world use, it is novel, uses more html5 than just "canvas", is brilliantly compressed into 10k, and is not another game! Great work.

Jim R. Wilson

Jim R. Wilson

@anthony - Thanks! I hope you find the source useful. I only tested the build system on my ubuntu machine, but feel free to use what you like. @eric - Thanks! I worked pretty hard on it :)

FataL

FataL

Cool idea, wish this can be integrated in browser... BTW, this app doesn't work in Opera, after clicking on bookmarklet nothing is added.

Jim R. Wilson

Jim R. Wilson

Thanks FataL! I didn't bother testing in Opera since it's not on the required browser list for the contest - but thanks for the data point! I plan to continue development after the contest, so hopefully I can figure out what's tripping up Opera.

thatcher

thatcher

Great app, I'm definitely going to dig into how you approached this under the hood. I had a lot of unresponsive script warnings, but it did work well. 5 star app and 10 star concept

Jim R. Wilson

Jim R. Wilson

Thanks thatcher! Yeah, sorry about the unresponsive script. Interestingly, the bottleneck in indexing a page is inserting all the data into localStorage. Both Chrome and IE 8+ do this well, but Firefox slogs through it. I considered using a web worker to make this process asynchronous so browsing wouldn't suffer, but IE doesn't implement web workers - so I'd still have to have a fallback mechanism. It certainly can be done, and I could probably have gotten it all under 10k, especially if I did away with the favicon (~500 bytes), I really just ran out of steam. I plan to continue to develop the app after the contest though, and instrumenting web workers is at the top of my improvements list. Thanks!

Flyingdome

What could you build with only 10 kilobytes of code?

That’s the concept behind this here 10K Apart contest, the love child of MIX Online and An Event Apart.