6 ms·
Instagram Engineer Challenge solved with Javascript
Image processing challenge solved using javascript and HTML5 canvas.
- cleverjake 15y agoReally impressive work, great job.
- Timothee 15y agoNote that image 3 and 5 are slightly NSFW.
- magicalhobo 15y agoThe source code is also NSFW: "_analizeColumn"
- verroq 15y agoThat's probably a mispelling of _analyseColumn.
- codingsolo 15y ago5 depends on where you work :)
- eridius 15y agoVery neat. Makes me kind of embarrassed that I never got around to actually solving this challenge. I've had the web page open on my laptop since it first showed up on HN.
- ronilan 15y agoMine from the weekend here: http://ronilan.com/instagram-unshredder/ http://ronilan.com/instagram-unshredder/
- coreyrecvlohe 15y agoGreat job! Excellent coding style btw.
- Mgccl 15y agoThis challenge is the first real life program I wrote with Haskell. https://github.com/Mgccl/mgccl-haskell/blob/master/random/unshredder.hs https://github.com/Mgccl/mgccl-haskell/blob/master/random/un... (so it seems I don't like to specify the type of my functions...) Explanation is here: http://chaoxuprime.com/2011/11/a-solution-to-Instagram-engineering-challenge-the-unshredder-in-haskell http://chaoxuprime.com/2011/11/a-solution-to-Instagram-engin...
- tikhonj 15y agoHeh, I did the same thing. It took me much too long to figure out that I needed to call ilInit...
- nandemo 15y agoVery nice. Care for some unsolicited hlint-like suggestions? Why not simply this: img <- readImage "file.png" -- instead of this? t <- readImage "file.png" let img = t Why not this: map (y!!) x foldr ((:).(y!!)) [] x -- instead of this? Note that a way of reading fold g [] is that replaces the list constructor (:) (aka cons) with g. So (:) as argument of fold is probably not idiomatic, since foldr (:) [] is the same as id.
- Mgccl 15y agoThanks. hlint-like suggestions are always welcome. I have no idea what was in my mind when I wrote foldr ((:).(y!!)) [] x
- ricardobeat 15y agoI (kind of) solved it with CoffeeScript but thought it wasn't a good idea to publish… if you do it's not a challenge anymore, is it? https://github.com/ricardobeat/instagram-challenge https://github.com/ricardobeat/instagram-challenge
- ggwicz 15y agoNice work!
- touchcream 15y agoI solved it in ocaml, I only had this development environment this week end but it was fun. I didn't posted it on my blog but if someone wants it, just ask ;)
- carnevalem 15y agoYou might also be interested in DARPA's similar challenge: http://www.shredderchallenge.com/ http://www.shredderchallenge.com/
- espes 15y agoOr for a similar, easier task, problem 3 "life" from this year's FARIO: http://orac.amt.edu.au/fario/11/problems_en.pdf http://orac.amt.edu.au/fario/11/problems_en.pdf Here's case 8 to give you an idea: http://i.imgur.com/1fFzO.png http://i.imgur.com/1fFzO.png :P Test data here: http://dl.dropbox.com/u/76985/life-all-linux.zip http://dl.dropbox.com/u/76985/life-all-linux.zip
- swang 15y agoSo is this challenge over? I submitted an entry using Canvas as well but allowed users to drop image in from their desktop (only works in Chrome/Firefox though). Haven't heard from anyone at Instagram.
- rjenkins 15y agofunny, that's exactly how mine works. Haven't heard anything either
- rjenkins 15y agoHere's mine https://github.com/rjenkins/instagram-html5-unshredder https://github.com/rjenkins/instagram-html5-unshredder demo here http://memoization.com/unshred.html http://memoization.com/unshred.html
- asdfqwer1234 15y agoso can someone actually explain how this works?
- the-cakeboss 15y agoWhile I didn't look at how he did it, if I were to write something to do this, I would first locate each slice of the image. This could be accomplished using a rudimentary edge detection algorithm ( ie starting from the left, compare each column of pixels with the next, any large differences of course means an edge ). After that I might assign a weighted value to each edge of a slice, and then sort based upon those values.
- HeyImAlex 15y agoMe too, and no response. I really wanted that T-Shirt... http://www.solesavoria.com/instagram/v2/ http://www.solesavoria.com/instagram/v2/
- vidoss 15y agoAnother one http://vidoss.github.com/ http://vidoss.github.com/