[{"data":1,"prerenderedAt":304},["ShallowReactive",2],{"project-7130928":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":18,"aspects":34,"strip":42,"post_text":45,"what":46,"said":73,"maker_in_thread":177,"shape":184,"grid":188,"attempts":265,"same_week":266,"maker_shows":41,"maker_hidden":296,"reader_version":297,"card":298},"7130928","Beautify-with-words","Beautify-with-words unminifies JS with unique words for variable names","title","Show HN: Beautify-with-words unminifies JS with unique words for variable names","https:\u002F\u002Fgithub.com\u002Fzertosh\u002Fbeautify-with-words","github.com","zertosh",1390838104,2014,67,34,472,2272,21,"notable","dev_tools","javascript unminifier","cli",[24,25,26,27],"javascript unminify","beautify javascript","minified code","variable renaming","debated",0.086,{"positive":31,"neutral":32,"mixed":33,"critical":31},6,9,0,{"design":35,"execution":38,"docs":39,"idea":40},{"positive":36,"critical":37},1,4,{"positive":36,"critical":33},{"positive":33,"critical":33},{"positive":37,"critical":41},2,[36,33,36,43,43,43,33,33,44,36,36,44,33,43,33,43,43,43,44,33,43,33,33,33,44,44,33,44,36,36,33,33,33,43],3,5,null,{"problem":47,"audience":45,"pricing":45,"motivation":57,"time_to_build":45,"stack":62,"openness":71,"stage":72,"team_size":72},{"value":48,"source":49,"evidence":50},"Minified JavaScript has single-letter variable names that are hard to track across scopes.","maker",[51,54],{"id":52,"by":11,"text":53},"7131648","I'm the author. Since \"a\", \"b\", \"c\" get recycled by different scopes, it makes it really hard to figure out which \"a\" you're looking that. By having unique names, you can easily…",{"id":55,"by":11,"text":56},"7131614","I'm the author. Search-and-replace is the main problem this solves. Another neat effect is that if you use something like Sublime Text, you can highlight a word (variable), and…",{"value":58,"source":49,"evidence":59},"Minified code's reused single letters are hard to follow, so unique names make variables easy to spot and search-and-replace.",[60,61],{"id":52,"by":11,"text":53},{"id":55,"by":11,"text":56},[63],{"value":64,"source":65,"evidence":66},"JavaScript","inferred",[67],{"id":68,"by":69,"text":70},"7132036","billyhoffman","Why don't you prefix variables based on their usage in the code? function(a,b,c) -> function(arg1_cat, arg2_tree, arg3_carrot) for(i=0; i\u003C 10; i++) -> for(counter1=0; counter1 \u003C…","open_source","unknown",{"praise":74,"objections":98,"requests":118,"questions":150,"alternatives":158},[75,87],{"value":76,"source":77,"evidence":78},"Search-and-replace and grep make unique names easier to work with","commenter",[79,83],{"id":80,"by":81,"text":82},"7133913","lanna","It is a lot easier once you've figured out what a particular variable stands for to do a global search and replace for \"vublu\" than \"a\".",{"id":84,"by":85,"text":86},"7134069","thatthatis","That actually makes sense, it is more \"grepable\" even if it is less easy to reason about. I find it a lot easier to reason about \"a\" because my brain doesn't try to reason by…",{"value":88,"source":77,"evidence":89},"Useful for debugging code without original sources, such as Google Analytics",[90,94],{"id":91,"by":92,"text":93},"7132601","yahelc","Neat. More useful for projects without unminified sources, like Google Analytics. Here's the output for ga.js: https:\u002F\u002Fgist.github.com\u002Fyahelc\u002F00299f2e4a3c07cafa1a",{"id":95,"by":96,"text":97},"7132428","marquis","Often with AngularJS, after minification, you find you've not properly injected a service or something and looking for a missing 'a' is near impossible. This would be really…",[99,107],{"value":100,"source":77,"evidence":101},"Made-up words are hard to remember and mean nothing, unlike a, b, c",[102,106],{"id":103,"by":104,"text":105},"7131596","shawabawa3","While it's a good idea, I feel like it should rename with real words, or not rename at all. From the example: ``` function(bedad, latay, vublu) { if (!adag(this, \"on\", bedad, […",{"id":84,"by":85,"text":86},{"value":108,"source":77,"evidence":109},"Random words may be foreign or offensive; a dictionary of real words is suggested",[110,114],{"id":111,"by":112,"text":113},"7131963","nathan_long",">> I didn't want the tool to be language specific or run into unsavory words Good thoughts. However, \"beedip\" is foreign to everyone, whereas if you pick a language, it's at…",{"id":115,"by":116,"text":117},"7134362","cynwoody","You could use first names as your dictionary. The US Census Bureau has lists† (in the form of frequency tables) of male and female given names.…",[119,128,139],{"value":120,"source":77,"evidence":121},"Use real words or prefixed names based on usage",[122,123,124],{"id":103,"by":104,"text":105},{"id":68,"by":69,"text":70},{"id":125,"by":126,"text":127},"7132063","joshklein","Or perhaps a consistent \"namespace\", e.g. with a standard prefix prepended to a simple noun.",{"value":129,"source":77,"evidence":130},"Standalone website or browser extension",[131,135],{"id":132,"by":133,"text":134},"7131719","crazygringo","Very cool. Nice work. I think it would be even cooler as a Firefox extension -- open up a .min.js file in one tab, hit your button, and get a new tab with the beautified js. I…",{"id":136,"by":137,"text":138},"7134003","jaredsohn","I think the way to go would be to create a standalone site and then have a bookmarklet that opens the existing page on that site. Edit: If you want to use your own bookmarklet,…",{"value":140,"source":77,"evidence":141},"Option to pass a partial mapping or custom word list",[142,146],{"id":143,"by":144,"text":145},"7131832","ajanuary","Feature suggestion: An optional variable prefix\u002Fsuffix to make them stand out, making it easier to replace variable names as you read through the code and see what you've chosen…",{"id":147,"by":148,"text":149},"7133330","ryanpetrich","Wow, this is amazing. Wanted something like this for so long. Forked to support passing in a list of pre-canned words to use: https:\u002F\u002Fgithub.com\u002Frpetrich\u002Fbeautify-with-words",[151],{"value":152,"source":77,"evidence":153},"Are longer made-up names better than short names?",[154],{"id":155,"by":156,"text":157},"7131565","slg","I really like the idea behind this. Anyone have any experience using something similar? My specific question would be whether using longer gibberish variable names is any more…",[159,166,173],{"value":160,"source":77,"evidence":161},"Source maps",[162],{"id":163,"by":164,"text":165},"7133139","catshirt","source maps seem more suitable for the job",{"value":167,"source":77,"evidence":168},"ngmin",[169],{"id":170,"by":171,"text":172},"7133166","joshuacc","You might find ngmin[1] helpful for that. Then you can use the shorter injection syntax and have it expanded via a compilation step. Since you mentioned Grunt, you'd probably…",{"value":174,"source":77,"evidence":175},"jsbeautifier.org",[176],{"id":136,"by":137,"text":138},{"comments":37,"answered":36,"key":178},[179,180,181],{"id":52,"text":53},{"id":55,"text":56},{"id":182,"text":183},"7131927","I'm the author. I've made extensions for Chrome before (https:\u002F\u002Fgithub.com\u002Fzertosh\u002Fjquery-audit) and I don't think I can incorporate this in a nice way. I'll look into FF. As for…",{"commenters":185,"max_depth":37,"maker_replies":37,"first_comment_mins":186,"lifespan_hours":187},28,80,23,[189,191,193,194,196,197,198,202,205,209,212,215,217,218,219,221,224,228,229,231,233,234,238,241,244,245,247,249,251,253,254,256,258,261],[103,33,36,190,104,33],"project\u002Fcritical\u002Fdesign",[52,33,33,192,11,36],"maker\u002Fneutral\u002Fidea",[111,33,36,190,112,33],[68,33,43,195,69,33],"project\u002Fneutral\u002Fdesign",[125,33,43,195,126,33],[115,33,43,195,116,33],[199,33,33,200,201,33],"7131655","commenter\u002Fneutral\u002Fnone","prezjordan",[203,33,33,200,204,33],"7131671","zellyn",[206,33,44,207,208,33],"7132165","project\u002Fpositive\u002Fdesign","anorwell",[210,33,36,190,211,33],"7134063","angersock",[213,33,36,190,214,33],"7134124","michaelmior",[80,33,44,216,81,33],"project\u002Fpositive\u002Fexecution",[84,33,33,200,85,33],[155,36,43,195,156,33],[55,36,33,220,11,36],"maker\u002Fneutral\u002Fexecution",[222,36,43,223,156,33],"7131669","project\u002Fneutral\u002Fdocs",[225,41,43,226,227,33],"7131555","project\u002Fneutral\u002Fidea","ape4",[143,43,43,195,144,33],[132,37,44,230,133,33],"project\u002Fpositive\u002Fidea",[182,37,33,232,11,36],"maker\u002Fneutral\u002Fnone",[136,37,43,226,137,33],[235,44,33,236,237,33],"7131741","other\u002Fneutral\u002Fnone","chrishenn",[239,44,33,236,240,33],"7131896","spoiler",[242,44,33,236,243,33],"7134166","camus2",[147,31,44,230,148,33],[91,246,44,230,92,33],7,[248,246,33,232,11,36],"7132624",[95,250,44,230,96,33],8,[163,250,36,252,164,33],"project\u002Fcritical\u002Fidea",[170,250,36,252,171,33],[255,250,33,200,96,33],"7133198",[257,250,33,200,171,33],"7137216",[259,32,33,236,260,33],"7136216","CmonDev",[262,263,43,195,264,33],"7133863",10,"allochthon",[],[267,272,277,282,287,292],{"id":268,"name":269,"points":270,"category":271},"7116042","Mondrian",644,"creative",{"id":273,"name":274,"points":275,"category":276},"7144815","Product Hunt",360,"productivity",{"id":278,"name":279,"points":280,"category":281},"7130192","Random Street View",356,"consumer_social",{"id":283,"name":284,"points":285,"category":286},"7125153","linux-dash",175,"infrastructure",{"id":288,"name":289,"points":290,"category":291},"7145961","Dictionary Domains",128,"web_saas",{"id":293,"name":294,"points":295,"category":291},"7134354","Taplytics",73,false,"v2",{"id":299,"name":5,"line":6,"ai":296,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":300,"top":18,"kw":301,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":302,"url":9,"mix":303,"praise":76,"objection":100,"sub":21},7130928,0.09,[24,25,26,27],"1013330051150303335030005505110003",[31,32,33,31],1793990902325]