Beautify-with-words

Dev tools

javascript unminifier

SHOW HN2014

67points
34comments
#472of 2,272 in 2014
Top 21%of 2014 by points

How HN took it

DebatedReal support and real criticism

6 positive, 9 neutral or asking, 0 mixed, 6 critical, out of 21 comments about the project. Thread score +0.09.

Idea: 4 for, 2 againstDesign: 1 for, 4 againstExecution: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Search-and-replace and grep make unique names easier to work with

    From 2 comments
    • 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".
      lanna on HN
    • 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…
      thatthatis on HN
  • Useful for debugging code without original sources, such as Google Analytics

    From 2 comments
    • Neat. More useful for projects without unminified sources, like Google Analytics. Here's the output for ga.js: https://gist.github.com/yahelc/00299f2e4a3c07cafa1a
      yahelc on HN
    • 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…
      marquis on HN

Objections

  • Made-up words are hard to remember and mean nothing, unlike a, b, c

    From 2 comments
    • 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, […
      shawabawa3 on HN
    • 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…
      thatthatis on HN
  • Random words may be foreign or offensive; a dictionary of real words is suggested

    From 2 comments
    • >> 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…
      nathan_long on HN
    • 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.…
      cynwoody on HN

Requests

  • Use real words or prefixed names based on usage

    From 3 comments
    • 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, […
      shawabawa3 on HN
    • 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< 10; i++) -> for(counter1=0; counter1 <…
      billyhoffman on HN
    • Or perhaps a consistent "namespace", e.g. with a standard prefix prepended to a simple noun.
      joshklein on HN
  • Standalone website or browser extension

    From 2 comments
    • 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…
      crazygringo on HN
    • 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,…
      jaredsohn on HN
  • Option to pass a partial mapping or custom word list

    From 2 comments
    • Feature suggestion: An optional variable prefix/suffix to make them stand out, making it easier to replace variable names as you read through the code and see what you've chosen…
      ajanuary on HN
    • 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://github.com/rpetrich/beautify-with-words
      ryanpetrich on HN

Questions

  • Are longer made-up names better than short names?

    From 1 comment
    • 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…
      slg on HN

Alternatives named

  • Source maps

    From 1 comment
  • ngmin

    From 1 comment
    • 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…
      joshuacc on HN
  • jsbeautifier.org

    From 1 comment
    • 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,…
      jaredsohn on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/7130928)