Posts

Showing posts from January, 2016

ihtfyp | 6.148 (web programming competition)

Image
January 2016 has been a month-long 6.148 hackathon - my friend and I often worked on our web app until 4 am! We're hosting it at ihtfyp.herokuapp.com . Currently, we made the semi-finalist round of the competition! (We'll find out how we did tomorrow!) You should also vote for us for the Webby awards at  http://6.148.scripts.mit.edu/2016/webby/ihtfyp :) :) :) The theme of this year's 6.148 was "remember the future" so we created an app that would be the future "lost and found box" for the MIT community. As of now, if you lose something, it's hard to know what to do: do you dig through physical lost and found boxes around campus? Do you ask your friends on facebook to look out for your lost item? Do you post a wanted poster? We wanted to build a reliable, universal way of matching lost and found items, so we made ihtfyp. (We were in a punny mood when we came up with the name - our team name was MITeam) We learned how to use a lot of ...

My First q Program

I recently wrote my first q program as part of the US Constitution Word Count challenge !  It was cool seeing how much terser the q program was than my Java program that did the same thing. 4 lines and 188 characters of q...  strip:{x except "[]():,;.-0123456789"} us: strip each lower raze " " vs/: read0`:input.txt s: desc count each group us except enlist "" `:solution.txt 0: (key s) ,' "|" ,' (string value s) and 50 lines and 1067 characters of Java... import java.io.*; import java.util.*; public class wordfreq { static class word { String w; int c; public word(String w, int c) { this.w = w; this.c = c; } public String toString() { return w + "|" + c; } } public static void main(String[] args) throws Exception { HashMap<String, Integer> freq = new HashMap<String, Integer>(); Scanner s = new Scanner(new File("input.txt")); while (s.hasNext()){ String str...