Quickly navigate your filesystem from the command line - <AUTHOR> http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html <comment><USER2> I had to modify Jeroen's code to get the `marks` shortcut working under Mac OS 10.8:

        export MARKPATH=$HOME/.marks
        function jump {
            cd -P $MARKPATH/$1 2> /dev/null || echo "No such mark: $1"
        }
        function mark {
            mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
        }
        function unmark {
            rm -i $MARKPATH/$1
        }
        function marks {
            ls -l $MARKPATH | sed 's/  / /g' | cut -d' ' -f9- && echo
        }

<comment><USER3> Here is another version of 'marks' for Mac OS that aligns the arrows. It also works when 'ls' is aliased.

        function marks {
            \ls -l $MARKPATH | tail -n +2 | sed 's/  / /g' | cut -d' ' -f9- | awk -F ' -> ' '{printf "%-10s -> %s\n", $1, $2}'
        }

<comment><USER4> If you are on a system with BSD stat like OS X you can get the same with

      function marks {
        (cd $MARKPATH && stat -f"%-10SN%SY" *)
      }

Even better with column

      (t="$(printf "\t")"; cd $MARKPATH && stat -f"%N$t%SY" * | column -ts"$t")

</comment></comment></comment><comment><USER5> I set my version up with a -f on the unmark rm so that I don't need to be prompted to remove it. Also added some basic completion for both jump and unmark

      export MARKPATH=$HOME/.marks
      function jump {
          cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
      }
      function mark {
          mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
      }
      function unmark {
          rm -if $MARKPATH/$1
      }
      function marks {
          ls -l $MARKPATH | sed 's/  / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
      }

      _completemarks() {
          local curw=${COMP_WORDS[COMP_CWORD]}
          local wordlist=$(find $MARKPATH -type l -printf "%f\n")
          COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw"))
          return 0
      }

      complete -F _completemarks jump unmark

<comment><USER6> The purpose of the -i flag is to prompt the user before deleting. Mixing the -i and -f flags is a little moot.

Try removing the -i option to obtain what you want.

<comment><USER5> Didn't catch that, it was a quick hack of an edit, thanks.

</comment></comment></comment><comment><USER7> To have completion with bash you can use this:

      function _jump {
          local cur=${COMP_WORDS[COMP_CWORD]}
          local marks=$(find $MARKPATH -type l -printf "%f\n")
          COMPREPLY=($(compgen -W '${marks[@]}' -- "$cur"))
          return 0
      }
      complete -o default -o nospace -F _jump jump

Bash completion really needs better docs :-|

<comment><USER8> Hmmm, this doesn't seem to work in `zsh`. Typing `jump <tab>` suggests everything in the current directory (folders and files).

Does anyone here know offhand how autocompletion in `zsh` works?

<comment><USER9> see my comment at the bottom [https://news.ycombinator.com/item?id=6229468](https://news.ycombinator.com/item?id=6229468)

</comment></comment></comment><comment><USER10> Reminds me of z, which I use all the time. Anyone else use z? If you have not heard of it, get it now [https://github.com/rupa/z](https://github.com/rupa/z).

z is a wonderful complement to cd. After cd into a folders with z set up, a file stores all folders navigated to sorted by frecency, then simply jump to a folder with z [foldernameregex].

<comment><USER11> z is absolutely wonderful. Even my boss has become a convert, and he's been hacking unix since the 1970s, when he worked at AT&T, and is very set in his ways.

[Disclaimer: rupa's a good friend of mine]

<comment><USER12> I've converted a few people to the z side. And yes, it is wonderful.

[Disclaimer: rupa is a good friend of mine, as well]

<comment><USER13> I was pretty excited about original link in this HN submission, but now I'm roughly twice as excited to learn about z. Love it.

[Disclaimer: I don't know rupa at all]

<comment><USER14> I have developed a very similar scheme for myself independently (haven't heard of z before, but thanks). A further idea is another command e, which is used like: e reg1 reg2..., and it will query z's database to see if there is a file in z's directory which matches the regs, and if found, open that file in Emacs. A similar command f will only print the path, so that firefox $(f reg1 reg2) will open the found file using firefox.

</comment></comment></comment></comment></comment><comment><USER15> For Windows users I have a closely related shameless plug:

 _cdhere_ navigates your cmd.exe to wherever the current topmost Explorer window is pointed at.

It's not the same as the OP's trick, of course, but since you're voluntarily using Windows, I'm going to assume you "live" on the command line less than the average UNIX user, and more on GUI tools such as good old Explorer.

[https://github.com/eteeselink/cdhere](https://github.com/eteeselink/cdhere)

<comment><USER16> What many people don't seem to know is that the location bar in Explorer (at least on Windows 8) can act as a run dialog, and it supplies the launched program with the current folder as a parameter. So simply hit Ctrl+L and type "cmd" or "powershell" or whatever command from your PATH and hit enter.

<comment><USER17> Amazing tip!

FYI: On Windows 7, you need to press Alt+D to get to the location bar. (I believe that's the case for XP as well.) Ctrl+L doesn't seem to do anything.

<comment><USER15> Alt+D is my preferred shortcut anyway, since it has the same effect in e.g. fullscreen IE10. Consistency is nice.

<comment><USER17> Totally. Also works in Chrome and Firefox.

</comment></comment></comment></comment></comment><comment><USER18> You can also use ranger [1] to change directories, especially if you want to explore the directory tree quickly when you don't know exactly where to jump to. Install it and add the following to ~/.bashrc:

         function ranger-cd {
           tempfile='/tmp/chosendir'
           /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
           test -f "$tempfile" &&
           if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
             cd -- "$(cat "$tempfile")"
           fi
           rm -f -- "$tempfile"
         }

         # This binds Ctrl-O to ranger-cd:
         bind '"\C-o":"ranger-cd\C-m"'

(This script comes from the man page for ranger(1).)

Edit: Modified the above script for use with zsh (and multiple users):

         ranger-cd() {
           tempfile=$(mktemp)
           ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY
           test -f "$tempfile" &&
           if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
             cd -- "$(cat "$tempfile")"
           fi
           rm -f -- "$tempfile"
         }

         # This binds Ctrl-O to ranger-cd:
         zle -N ranger-cd
         bindkey '^o' ranger-cd

[1] [http://ranger.nongnu.org/](http://ranger.nongnu.org/).

<comment><USER19> thanks! I tried: apt-get install ranger

it says it's not available. any idea why ranger is not longer available in package manager?

<comment><USER18> What is your distribution? I've just tried it and it's available in both Ubuntu 12.04 and Debian 7. The launchpad page says that it should be in later Ubuntu releases, too. Enable the "universe" repository then run apt-get update and see if it fixes the problem.

<comment><USER19> Debian "Squeeze" 6.0.7 x32

<comment><USER18> Looks like it simply never was in Squeeze. Install python2.6 and get the latest stable release from [http://nongnu.org/ranger/ranger- stable.tar.gz](http://nongnu.org/ranger/ranger-stable.tar.gz) instead.

</comment></comment></comment></comment></comment><comment><USER20> You might want to check out z: [https://github.com/rupa/z](https://github.com/rupa/z)

<comment><USER21> [https://github.com/clvv/fasd](https://github.com/clvv/fasd)

I used to use z, but I've since switched to fasd. It's much like z, but also so much better. In addition to being able to do "z <part of directory>" you can do "f <part of file>". So, for example, if I've got a rails project I've worked on a lot recently I know its config.ru is high on frecency, so I'll just do "vim `f config`" to edit that file. If I want a file that's not so recent I can always do "vim `f -i config`" to pick from a list of files.

fasd is leaps and bounds above z in functionality, and I've thoroughly enjoyed using it.

<comment><USER22> I put z and fasd through their paces, and out of the box z works very intuitively. I like it. fasd takes a little more to get used to, but I'm going to put it through a full try out. Let's see if the additional features make it worth the while. In either case, thanks all for a great thread.

<comment><USER22> fasd is z on steroids. Fantastic tool.

</comment></comment></comment></comment><comment><USER23> I found this is a useful addition to his scripts... I can't live without my tab completion!

        _jump()
        {
            local cur=${COMP_WORDS[COMP_CWORD]}
            COMPREPLY=( $(compgen -W "$( ls $MARKPATH )" -- $cur) )
        }
        complete -F _jump jump

<comment><USER24> Cleaner than the other variants here that use "find".

</comment></comment><comment><USER25> I've been using Bashmarks ([https://github.com/huyng/bashmarks](https://github.com/huyng/bashmarks)) for years, which appears to be basically the same thing but with a less verbose interface.

<comment><USER26> And poshmarks for those on Windows - [https://github.com/manojlds/poshmarks](https://github.com/manojlds/poshmarks)

</comment></comment><comment><USER27> Here is a fully functional (albeit minimal) Windows version: [http://appleseedhq.net/stuff/marks-v1.zip](http://appleseedhq.net/stuff/marks-v1.zip). Tested on Windows 7 (does not require PowerShell).

GitHub: [https://github.com/dictoon/marks](https://github.com/dictoon/marks)

Edit: to install, unzip anywhere and add to your path. Then:

      C:\Windows> mark win

      C:\Windows> marks
      win => C:\Windows

      C:\Windows> cd ..

      C:\> jump win

      C:\Windows>

Marks will be stored in a marks\ subdirectory (relatively to the mark.bat file).

<comment><USER28> Great! It's a smart idea just to store locations in simple text files. Thank you.

</comment></comment><comment><USER29> Clever!

With fish 2.0, the shell stores a list of "cd" commands issued from a specific directory, so mostly just typing "cd" yields an auto-completion hint out of the box.

</comment><comment><USER30> cool! I'm a command-line junkie as well. So, I've been doing something similar for quite a while.

Here's what I have done :

        function ccb ()
        {
            FOO=`pwd`;
            echo >> ~/shortcuts.sh;
            echo alias $1=\'pushd $FOO\' >> ~/shortcuts.sh;
            echo >> ~/shortcuts.sh;
            . ~/shortcuts.sh
        }

simple but quite effective.

Now, all I have to do is type ccb and give a shortcut name to register a shortcut. Then whenever i want to jump to that directory, I just have to type the shortcut.

Eg :

        foo@bar deeply-nested-dir# ccb deepd
        foo@bar deeply-nested-dir# cd
        foo@bar ~# deepd
        foo@bar deeply-nested-dir#

My method lacks the a) delete shortcut and b) list shortcut features that the above solution gives, though.

<comment><USER31> HN uses markdown, stick 4 spaces before each line in your code blocks to get them to indent properly, and drop the

        function ccb ()
        {
            FOO=`pwd`;
            echo >> ~/shortcuts.sh;
            echo alias $1=\'pushd $FOO\' >> ~/shortcuts.sh;
            echo >> ~/shortcuts.sh;
            . ~/shortcuts.sh
        }

<comment><USER30> thanks for letting me know -- I've edited my comment.

</comment></comment></comment><comment><USER32> This is really neat. I have added it to alias.sh for easy inclusion: [http://alias.sh/filesystem-markers-jump](http://alias.sh/filesystem-markers- jump)

</comment><comment><USER33> Here's a `fish 2` shell version, that works on the Mac. You can add it as `~/.config/fish/functions/mark.fish`:

        set MARKPATH $HOME/.marks
        function jump
          cd $MARKPATH/$argv; or echo "No such mark: $argv"
        end
        function mark
          mkdir -p $MARKPATH; and ln -s (pwd) $MARKPATH/$argv
        end
        function unmark
          rm -i $MARKPATH/$argv
        end
        function marks
          ls -l $MARKPATH | cut -d' ' -f12-; and echo
        end

<comment><USER34> -f9- for me in cut, but otherwise it works :). Thanks!

</comment></comment><comment><USER9> Cool, simple but very useful!

Bonus: if you want autocompletion for the jump and unmark commands, just add the following lines (in zsh):

        function _marks {
          reply=($(ls $MARKPATH))
        }
        compctl -K _marks jump
        compctl -K _marks unmark

</comment><comment> m-r-r I don't understand the advantage of using handwritten function instead of the shell builtins. The `mark` function could be replaced by `alias -g`, `jump` could be replaced by `cd` and `unmark` could be replaced by `unalias` :

        % cd ~/Dev/W3/m-r-r.github.io
        % alias -g :blog="$PWD"
        % jekyll build -d /tmp/out/ && cd /tmp/out
        % ./index.html
        % cd :blog
        % pwd
        /home/m-r-r/Dev/W3/m-r-r.github.io
        % alias -g
        :blog='/home/m-r-r/Dev/W3/m-r-r.github.io'
        :dev='/home/m-r-r/Dev'
        :c='/home/m-r-r/Dev/C'
        :python='/home/m-r-r/Dev/Python'
        :vim='/home/m-r-r/.vim'

In addition, this method works with any shell command:

        % pwd
        /tmp/out
        % make -C :blog publish
        % git clone git://git.complang.org/ragel.git `echo :c`/ragel
        % vim `echo :vim`/templates/\*.rl

On the other side, the aliases are not saved at exit unless you write a function to do it:

        % tail -n 15 ~/.zshrc
        function aliases {
            (
                alias -L -r
                alias -L -g
                alias -L -s
            ) | uniq
        }

        function save-aliases {
            aliases > ~/.zsh_aliases
        }

        if [ -f ~/.zsh_aliases ]; then
            . ~/.zsh_aliases
        fi

</comment><comment><USER35> I also do something similar but slightly different: [https://github.com/roobert/dotfiles/blob/master/.zsh/robs/fu...](https://github.com/roobert/dotfiles/blob/master/.zsh/robs/functions/bookmarks.zsh)

my method involves storing the bookmarks in a file but loading them into zshs directory hash. This means the directories are tab completable and if you have AUTO_CD set then you can change directory with simply: ~dir_name, otherwise: cd ~dir_name.

<comment><USER36> And with CDABLE_VARS set, you can simply do: dir_name In fact, you don't even have to use the directory hash for this, you just do, e.g.: MY_DIR=/path/to/dir; MY_DIR

Frankly, this is far superior to the linked method.

<comment><USER35> Except tab completion is annoying since zsh will include commands and environment variables in its guesses. The linked method simply provides a way to store the directory hash across sessions.

</comment></comment></comment><comment><USER37> I've been using the following in some form for over 3 decades! (now in zsh)

        alias   .=cd

In /bin/sh "." sources a script. While this can be common in a script, one rarely does this interactively so I usurped . for the most common operation!

        alias   ,=pushd
        alias   ,,=popd
        alias   ,.=dirs

Think of cd as a goto, pushd as a call, popd as a return and dirs as a stack trace!

        ..() { cd ../$* }
        cdpath=(. .. ~/src ~)

Use of cdpath can be confusing so it is best to show part of $PWD in the prompt:

        PS1="%* %5. %h%(#.#.:) "

This ends the prompt with a # if you are running as superuser.

These aliases/functions are enabled in .zshrc ( _only_ if run interactively -- that is, they are included below the following test):

        if [[ ! -o interactive ]] ; then return; fi

The "benefit" of Jeroen's mark/unmark is that these paths persist (and can be used from any window running a shell. I have not found much need for that + I can have different $dirs in different windows. Also, given that my shell windows (under screen) persist for a very long time, I don't need symlink's persistence!

Alternatively I define "." to be a function that does arg specific operation (cd if a dir, acroread if .pdf, vi if text etc.).

</comment><comment><USER38> This is great, but I don't see why this is better than autojump.

* Autojump automatically saves marks,

<comment> cd Downloads # And you are done. <comment>

* You don't have to think about mark names,

<comment> cd Projects/Python # It will be called `python`. <comment>

* You don't need to remember mark names,

<comment> j haskell # If you want `Projects/Haskell`, odds are the mark is auto- named `haskell`. <comment>

* You can specify only some part of mark name;

<comment> j bar # And you are in `Stuff/foobar`. <comment>

Other than that, this is, as I said before, great! Looking forward to go through the source code to learn more about Bash.

<comment><USER39> Why on Earth would you want to save every directory you change to?!

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER40> I noticed that 'mark' doesn't work if you have spaces in a directory name which you can't avoid on the Mac (I tried to mark an interior folder inside the iPhone Simulator which is inside "~/Library/Application Support/iPhone Simulator/". Wrapping in quotes seems to do the trick:

      function mark {
           mkdir -p $MARKPATH; ln -s "$(pwd)" $MARKPATH/$1
      }

</comment><comment><USER41> Cool!, I usually want to open a new terminal window and move to the same directory I am working in, I use these handy aliases :

alias here='pwd | pbcopy'

alias there='cd $(pbpaste)'

So now type `here` in current terminal window and type `there` in new terminal window to move to same directory!

[This works on Mac on other OS you could use xcopy or equivalent clipboard copy program]

</comment><comment><USER42> This is a very informative thread for people trying to streamline their daily shell experience. I'm looking forward to experimenting with the utilities mentioned here. I spend a significant amount of time in, and moving between CVS sandboxes. All my sandboxes have the same internal directory structure, but the root of the path changes. To speed up navigation time I created a tool to replace directory names with aliases. The aliases are persistent. They can also be "stacked", which allows you to specify a sandbox as an alias, then reuse your existing aliases to navigate within the sandbox. Auto-completion in the shell is an excellent companion as well. More information on "stacked.aliases", as well as the source can be found here: [https://github.com/ttomaino/stacked_aliases/wiki](https://github.com/ttomaino/stacked_aliases/wiki). I include one example to illustrate:

As an example, the following two sandboxes contain the Broadcom Ethernet driver:

/build/username/sandbox_a/software/vendors/linux/linux-126.96.36.199/drivers/ethernet/broadcom /build/username/sandbox_b/software/vendors/linux/linux-126.96.36.199/drivers/ethernet/broadcom

Use the add alias command aa <alias name> <directory> to create aliases for the sandboxes:

aa a /build/username/sandbox_a aa b /build/username/sandbox_b

Then create an alias for the Broadcom directory:

aa brcm software/vendors/linux/linux-184.108.40.206/drivers/ethernet/broadcom

To change to the Broadcom directory in sandbox_a, just stack the appropriate aliases using the ua command. Stacking is done by stringing the aliases together with a period delimiter:

ua a.brcm

To change to the Broadcom directory in sandbox_b:

ua b.brcm

</comment><comment><USER43> Great idea!

I don't want symlinks to be resolved (/var/www becomes /private/var/www on os x) so I modified it to store the path in the file:

      export MARKPATH=$HOME/.marks

      function jump {
        mark=$(head -n 1 "$MARKPATH/$1" 2>/dev/null)

        if [[ $mark != '' ]]; then
          cd $mark
        else
          echo "No such mark: $1"
        fi
      }

      function mark {
        mkdir -p "$MARKPATH"; echo "$(pwd)" > "$MARKPATH/$1"
      }

      function unmark {
        rm -i "$MARKPATH/$1"
      }

      function marks {

        find "$MARKPATH" -type f | while read filename
        do
          printf "%-12s -> %s\n" $(basename ${filename}) $(head -n 1 ${filename})
        done
      }

I think the if syntax is zsh so probably won't work with bash.

</comment><comment><USER44> I just do this (in zsh):

        setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups

Which automatically pushes (unique) directories I've visted into $dirstack.

Then I have an alias:

        d () {
                local dir
                select dir in $dirstack
                        echo $dir
                        break
                done
                test "x$dir" != x && cd $dir
        }

That gives me a list of directories to jump to in my history:

        ~/src/git/emacs-prelude $ d
        1) /home/kelvie/tmp/typhoon          3) /home/kelvie/src/git
        2) /home/kelvie/tmp                  4) /home/kelvie
        ?#

So I just type 1-4 to go back to a directory I've previously been in.

</comment><comment><USER45> I'm too lazy to type "jump" so I've modified it to automatically add a Bash alias for each one as well.

[https://github.com/davejamesmiller/dotfiles/blob/master/.bas...](https://github.com/davejamesmiller/dotfiles/blob/master/.bash/mark.bash)

<comment><USER7> Unless I'm missing something you also need a function to create all aliases when the shell session starts?

<comment><USER45> That's what the for loop at the bottom does.

<comment><USER7> doh!

</comment></comment></comment></comment><comment><USER46> I have no idea if anyone else does this, but I use tmux a lot for different projects. I usually have vim in one tab, logs in another, and tests in another. However, each tab I open I need to cd into the same directory. As such I came up with this helper for zsh. Every time I change a directory it records it. When I start a new session (new tmux or iTerm tab) it goes straight to that directory:

        # record directory in ~/.lastpwd
        record_pwd() {
          pwd > ~/.lastpwd
        }
        chpwd_functions=(record_pwd)

        # go to last directory when opening a new shell
        if [[ -d `cat ~/.lastpwd` ]]; then
          cd `cat ~/.lastpwd`
        fi

For other shells that don't have something like chpwd_functions you could just alias cd.

<comment><USER47> > However, each tab I open I need to cd into the same directory.

As of tmux 1.7, this should be unnecessary. Every tab and split will open in the working directory of the current pane, and the behavior can be changed with the `default-path` option.

</comment></comment><comment><USER48> A handy alias I use:

        alias ..='cd ..'

Moving up the file tree has never been easier!

<comment><USER49> Put the following in your .bashrc instead:

        shopt -s autocd

If you type a directory in the command-line, it'll cd into it, e.g.:

        $ ..   # cd ..
        $ ~    # cd ~
        $ foo  # cd foo

I can't live without this.

<comment><USER48> Very cool, thanks! Although:

On OS X: "-bash: shopt: autocd: invalid shell option name"

Apple and their outdated tools... It gets annoying after a while.

<comment><USER50> Install new bash using brew :-) (1) [http://apple.stackexchange.com/questions/55412/cd-to-a- direc...](http://apple.stackexchange.com/questions/55412/cd-to-a-directory-by- typing-its-name)

</comment></comment></comment></comment><comment><AUTHOR> Thank you all for your kind words and helpful suggestions! I shall adapt both the post and the code accordingly.

Jeroen

<comment><AUTHOR> I have just added (1) quotes to the code, (2) a section about tab completion, and (3) a note for Mac OS X users. Many thanks again; HN is a great community!

Jeroen

</comment></comment><comment><USER51> I've been doing a very similar thing for a few years: [https://chris- lamb.co.uk/posts/optimising-directory-navigati...](https://chris- lamb.co.uk/posts/optimising-directory-navigation-multiple-terminals)

</comment><comment><USER52> Interesting idea. I've the bash built-in "pushd" and "popd" for a long time for similar reasons, but those effectively limit you to treating the history as a stack rather than an arbitrary list.

<comment><USER53> yeah, it can be annoying that the directory stack sequence keeps changing, which means that sometimes you can't easily re-run commands from your history if you've pushd since you last ran the command

e.g., a command like "tar cfz bak.tgz ~3 ~2/subdirectory ~1" would mean something else once you've "pushd +3".

I always find it hard to undo my sequence changes to get the stack in the same order as before, so usually end up typing "dirs -v" a lot (or its alias) and renumbering my ~N references.

<comment><USER54> I frequent systems where tcsh, for historical reasons, is the default shell, and for all its faults it does have some nice pushd settings that make directory browsing with 'cd +<number>' and 'dirs' very convenient.

I have ported this functionality to Bash: [http://thrysoee.dk/pushd/](http://thrysoee.dk/pushd/)

</comment></comment></comment><comment><USER55> This reminds me of NCD (Norton Change Directory) which then went on to inspire many tools, like the excellent KCD and WCD. These tools index rather than create symlinks, though.

</comment><comment><USER56> "Like many others, I spend most of my day behind a computer."

I tend to spend my time in front of one. Is there an advantage to being behind it?

But jokes aside, I added this to my bashrc, looks useful.

</comment><comment><USER57> I use CDargs [http://www.skamphausen.de/cgi- bin/ska/CDargs](http://www.skamphausen.de/cgi-bin/ska/CDargs)

</comment><comment><USER58> Not sure if the author knows or not, but there exists a BASH environment variable called CDPATH which does the same thing, and is a lot easier to use.

<comment><USER59> [http://hints.macworld.com/article.php?story=2005031814311425](http://hints.macworld.com/article.php?story=2005031814311425)

</comment></comment><comment><USER60> Watching all the comments, I think the author should create a repo so people can fork or contribute instead of comment different versions :p

</comment><comment><USER61> This is how I know I am old I create a symlinks in my home directory to oft used locations and get there with cd ~/linkname Has the added bonus of making my short path be ~/linkname rather than ~/some/very/deep/pocket/in/some/git/repo

</comment><comment><USER62> Nice idea, reminds me of ncd from a far away, foggy past. I suggest some escaping on the directory name parameter though. If you're not careful, you're going to run into trouble with paths that have spaces or risk some nasty security issues with embedded special characters.

</comment><comment><USER7> That looks clever and useful, I wasn't expecting that. I do maintain a few aliases to jump around, but this looks more efficient. Not sure though if I'll like "jump foo" better than simply "foo" that I use now, but maintaining those aliases is a pita.

</comment><comment><USER63> I've add a new bash version based on Jeroen's code, it's more easier to use in a Bash environment.

Welcome to use, thanks for Jeroen's smart work.

[https://github.com/dangoakachan/mark- directory](https://github.com/dangoakachan/mark-directory)

</comment><comment><USER64> I have a similar tool but it also manages shell environment variables, allowing you to jump around and/or switch working projects. You can check it out at: [http://github.com/timtadh/swork](http://github.com/timtadh/swork)

<comment><USER65> Without having me dig through the code, could you tell me in a few lines how it works? (not usage, but how internally you managed to handle shell environment vars, "clean after" finishing/switching, etc)

</comment></comment><comment><USER66> I used some of this code to implement a more orthodox utility using flags instead of different syntax for different commands.

[https://github.com/parski/Wormhole](https://github.com/parski/Wormhole)

It works great! Great blog post.

</comment><comment><USER67> My Z-Shell predicts and auto-completes everything I do often perfectly, thus typing 2-3chars not only get's me deep into directories, but also do actions I need. But maybe the idea of folder bookmarks can still be useful, idk.

</comment><comment><USER68> I usually just alias directories I frequent in .bashrc... Easy enough, I guess.

<comment><USER69> I'll do it all the time in my local shell session, along the following:

      # I make a point to always have the trailing slash,
      # it makes life easier.
      # Also, tab-complete works with this in Zsh.
      a=/some/really/long/path/that/I/dont/like/typing/
      b=/some/other/really/long/path/too/
      cd $a
      # ... do stuff ...
      cp one two three $b
      cd $b
      # ... do more stuff ...
      cp four five six $a
      cd $b/even/longer/path

And so forth. Since it is a normal variable, you can use it anywhere you need the path.

</comment></comment><comment><USER70> I've updated the completion code to work on ubuntu and os x:

[http://neil.grogan.ie/2013/08/quickly- navigate.html](http://neil.grogan.ie/2013/08/quickly-navigate.html)

</comment><comment><USER71> [http://code.google.com/p/go- tool/wiki/GettingStarted](http://code.google.com/p/go- tool/wiki/GettingStarted) Works on all OSes.

</comment><comment><USER72> Here is one that works with zsh: [https://github.com/bufordtaylor/swiftcommandline](https://github.com/bufordtaylor/swiftcommandline)

</comment><comment><USER73> This does look very similar to the setup I am using ([https://github.com/huyng/bashmarks](https://github.com/huyng/bashmarks))

</comment><comment><USER74> Or you might just use ZSH (particularly in combination with oh-my-zsh), keep the marks around as zsh vars and skip all the symbolic linkage.

<comment><USER9> this way they would all be lost at the end of each session, and would not be shared across concurrent sessions, no?

</comment></comment><comment><USER75> Caps insensitive auto-complete is pretty handy. Add 'set completion-ignore- case on' to '/etc/inputrc'.

</comment><comment><USER76> Try using [https://github.com/rupa/z](https://github.com/rupa/z)

</comment><comment><USER77> I've been looking for a way to make this less annoying, hanks!

</comment><comment><USER78> I use powershell aliases for this. Works great.

</comment><comment><USER79> happy guaranteed [https://github.com/clvv/fasd](https://github.com/clvv/fasd)

</comment><comment><USER80>
        brew install fasd

Thank me later

</comment><comment><USER63> when mark name contains space, the auto complete doesn't work, anyone have solutions?</comment>


Is the economy suffering from the crisis of attention? - <AUTHOR> https://bankunderground.co.uk/2017/11/24/is-the-economy-suffering-from-the-crisis-of-attention/ <comment><USER2> Calling it the memetastic phrase "crisis of attention" (whatever that means) is itself a way to get your attention by the "attention industry".

They're trying to sell the solution to a problem that they're trying to create in your mind.</comment>


IE9, standards, and why Acid3 isn't the priority - <AUTHOR> http://arstechnica.com/microsoft/news/2010/03/ie9-standards-and-why-acid3-isnt-the-priority.ars?utm_source=rss&utm_medium=rss&utm_campaign=rss <comment><USER2> Although I understand their reasons on why Acid3 isn't a priority, it doesn't change the fact that they are late in everything that defines a modern browser ... CSS support, JS performance, HTML5, SVG, browser plugins, you name it.

So to get over my disappointment with them, personally I'm looking for more than a half-assed attempt ... like they did with IE7 and IE8 (although the interface changes were interesting, but that's not what people craved for).

This article seems like it's a PR piece.

</comment><comment><USER3> Weird article. Some random bits of text thrown in, seemingly without understanding even what Acid3 is. HTML5 has little to do with it, and rounded corners even less so.

<comment><USER4> It read fine to me. It wasn't specifically about Acid3 so much as Microsofts approach to testing their standard compliance.

Summary: We don't believe Acid3 and Sunspider actually test the things browsers get used for in the real world so we are developing our test suite instead.

Cynical view: We want our own test suites so that we can pass them and show how everyone else sucks compared to us

Non Cynical view: Maybe they are right and a better suite of tests is needed to truly drive standardization for HTML5

Whichever camp you fall in the article didn't seem all that disconnected to me.

[edit]: added missing words. sometimes I type faster than I think.

<comment><USER5> I think the cynical view is actually that they want to hold the web back, and have been doing so quite successfully for many years.

Saying they're only going to implement the stuff that is used on popular sites is entirely circular because the only stuff that gets used on popular sites is the stuff that works on IE6.

Microsoft have no incentive to advance the state of the art in browsers because it just makes it easier for people to not use Windows and Office, their only money makers.

For whatever reason people don't like to take the wider, business view of things and imagine "browser wars" as some kind of sporting competition.

In the real world Microsoft won by not playing, now Google's explicit strategy is to move the state of the browser art so far forward that Microsoft has to move forward even if it plans to remain the anchor holding the web back. Seems to be working.</comment></comment></comment>


Hosting Jupyter Notebooks for 100k Users [video] - <AUTHOR> https://www.youtube.com/watch?v=omxY1YsPGUc <comment><USER2> Speaker here. If you want to follow along with the slides from the talk, you can find them at [https://speakerdeck.com/ssanderson/hosting-notebooks- for-100...](https://speakerdeck.com/ssanderson/hosting-notebooks- for-100-000-users).

Also, happy to answer any questions that people might have.

<comment><USER3> I'm working on building an educational environment with Jupyter, and I'm interested in the multiple hubs.

A few basic questions: Why multiple hubs? (was there some point of scale where you needed this) Did multiple hubs allow you to have better migrations? (where you drain one and move it over to the other)

Totally agree that state is the enemy of scale, so having a separate service backing your storage independent of what hub you're on seems like a big win.

Thanks for the great talk!

<comment><USER2> > Why multiple hubs?

A few reasons for this, most of which are related to points you mentioned:

1\. Having multiple hubs makes it much easier to do zero-downtime deploys.

2\. Having multiple hubs makes us more resilient to transient machine failures.

3\. We were worried that having a single proxy for all our notebook traffic might become a system-wide bottleneck. Notebooks with a lot of images can get pretty large, and at the time we were rolling this out JupyterHub was pretty new. We weren't sure how well it was going to scale (the target audience for the JupyterHub team at the time was small labs and research teams), so it seemed safest to aim for horizontal scalability from the start. The JupyterHub team has since done a lot of awesome performance work to support the huge data science classes being taught at UC Berkeley, so it's possible that a single hub with the kubernetes spawner could handle our traffic today, but given points (1) and (2) plus the fact that we already have a working system, I don't have much incentive to find out :).

<comment><USER3> That's great, thanks! I was also curious if you hit scale issues on just one hub. I agree, it's best practice to not have all your eggs in one basket. I'd love to see an HA hub where this would be all taken care of for me, but hopefully by the time we go live we'll have this.

</comment></comment></comment></comment><comment><USER4> there is Dash ([https://plot.ly/products/dash/](https://plot.ly/products/dash/)) and there is Jupyter.

I wish there was some abstraction to generate a Dash like output from Jupyter. There are a lot of people who would pay serious money for that.

Even Airbnb built a framework to extract code from Jupyter notebooks and push them into a machine learning pipeline ([https://medium.com/airbnb- engineering/using-machine-learning...](https://medium.com/airbnb- engineering/using-machine-learning-to-predict-value-of-homes-on- airbnb-9272d3d4739d)).

Jupyter can be so much more by going closer to how it fits within a production pipeline versus just competing against Rstudio.

<comment><USER5> Also I always thought notebooks would be a great devops tool, kind of like a super command line that has easily observable steps grouped in chunks and graphical feedback. No one else seems to think so though so maybe I'm wrong.

<comment><USER6> As disclaimer/context, am a dev on the Azure hosted Jupyter Notebooks product,

You're not wrong! (Or at the least, it's a topic that has come across our ears before, and is something I certainly agree with) Obviously I probably shouldn't go off spouting all the pipe dreams I have in this space, but given that I got my start doing Ops work and tried to keep an eye for things I might have liked back then, I can assure you there you're not alone.

I always saw the similarity foremost as a direct upgrade to the "runbooks"/"firefighting/deploy checklists" that crop up all too often.

<comment><USER7> Another Azure dev checking in :)

Have you seen Application Insights Workbooks [0]? Basically you can have interactive notebooks and run analytics queries against your telemetry, generate charts, add text cells, etc. It's picking up usage for investigating outages, e.g., have a Workbook with a query that looks at your dependency calls and determine what service is failing + produce a visualization.

Workbooks don't actually execute any external actions, though. It's solely an analysis tool. Runbooks skew the other direction, they are for executing scripts (more or less).

Jupyter/python seems to fit in a nice gap where this could be bridged, especially with the level of existing python support from azure sdk + cli.

PS: a dev from Workbooks has seen Azure Notebooks, and was curious a while back about how he could integrate the functionality [1]

[0]: [https://docs.microsoft.com/en-us/azure/application- insights/...](https://docs.microsoft.com/en-us/azure/application-insights/app- insights-usage-workbooks) [1]: [http://blog.my-is300.com/2017/06/what-i-work- on-application-...](http://blog.my-is300.com/2017/06/what-i-work-on- application-insights-workbooks/)

<comment><USER8> wow, a link to my blog (that second link) made hackernews? that's exciting!

Anyway, yeah, workbooks in appinsights is almost like notebooks for non- programmers? kinda? you string together markdown, parameters, and analytics queries (and very soon metrics across more of azure) into reports. But the parameters stuff lets you do more interactive things to hide/show sections now. i really need to do a new blog post about all the new stuff that's in there that wasn't last june!

i've prototyped some stuff to export an AI workbook to an azure/jupyter notebook, as there's some support for querying analytics already from a python package. there just hasn't been enough demand for it so far (not as much as we expected, anyway?)</comment></comment></comment></comment></comment>


The Cathedral and the Bazaar - <AUTHOR> https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar

<comment><USER2> I'm likely missing something, but why did this get upvoted to HN front page? Any relevant piece of news that propelled this here?</comment>


Fuse.js - lightweight JavaScript fuzzy search tool - <AUTHOR> http://erjjones.github.com/projects/fuse.html <comment><USER2> Very interesting...only if the link worked :P

<comment><AUTHOR> Dammit. The link is supposed to be: <http://kiro.me/projects/fuse.html></comment></comment>


Go Daddy down, Disney Next - <AUTHOR>

Disney has turned to the dark side. They want to criminalize kids so they can make obscene profits. If a day of bad publicity can change GoDaddy, a week or month of bad publicity will change Disney. One company at a time.  Explain to friends, family, children, google+, facebook and twitter that Disney has gone bad. <comment><USER2> Disney is the same company who didn't like video because people could watch it more than once without paying each time, and because one person could buy[1] a video but more than one person could watch it, and Disney would only get the one fee.

Disney has worked hard at single use technology; from video tapes that needed to be rewound by special machine to DVDs that degrade within 48 hours when exposed to air.

Nothing, nothing, will persuade Disney that SOPA is a bad idea.

<comment><USER3> You're missing a footnote, and I'm not sure what you mean by "video" in the first paragraph.

<comment><USER2> Disney didn't like video tape.

[1] buy / "buy a licence to view"

Also, Disney is one of the worst companies for using the forced / unskippable viewing of trailers and ads before the movie on DVD / Blu Ray.</comment></comment></comment>


TLS Web Tool: Generate Key and CSR - <AUTHOR> https://tls.zone/ <comment><USER2> Doesn't properly quote shell metacharacters. but at least it is a website for generating an 'openssl req' command, not a site which generates key/csr files!

Edited to add: The best way to quote shell characters for any POSIX shell is to:

\- optionally, if all characters in the string are in a whitelist of shell safe characters (ASCII letters, digits, dot, underscore, hyphen, maybe a few others), pass it through as is. Otherwise,

\- Replace each single-quote character (') with the sequence '\'', and then surround the string with single quotes

I learned this from the git community.

<comment><USER3> Ideally you avoid the need for escaping at all. That's easy to do as long as you have access to the execve family of routines, avoid eval inside the shell script, and don't need to parse strings from external sources. If the shell variable $V contains a string with metacharacters, then

      X="$V"
      /bin/foo "$V"

is perfectly safe.[1]

That's very much like the proper approach to preventing SQL injection exploits --focus on using parameterized interfaces rather than figuring out where, how, and which metacharacters to escape. And it's consistent with the rule for secure programming more generally, which is to avoid mixing code and data.

[1] You still usually want to quote variables when passing them, but that's to avoid field splitting and pathname expansion, not because you're at risk of an argument accidentally being evaluated as code. Section 2.1 Shell Introduction and section 2.6 Word Expansions of the Shell Command Language volume of POSIX explain this concisely. Even if you only ever program in Bash, having the POSIX standard handy is immensely useful because it explains these things in a more concise and structured manner than Bash's manual page. I usually stick to POSIX constructs in my shell scripts because it's just easier to be confident about their correctness. If I find myself pining for a Bash-ism that's a strong hint I should be using a more powerful language family altogether. Nonetheless, Bash adheres to the mechanics of word expansion as described by POSIX. The biggest deviation is pathname expansion, which is easily avoided.</comment></comment>


Identicons - <AUTHOR> https://github.com/blog/1586-identicons <comment><USER2> It would be nice if rather than using the hash (which you have no control over), the algorithm looked at the distribution of languages I program in and used that to pick the colors. That would be a better representation of my programming identity and is in line up with what github already does for repos.

<comment><USER3> A lot of people may know already that PHP is purple, Python is blue and JavaScript is orange. Or at least GitHub has chosen those colors to represent languages on their site.

So I would like that my avatar is more blue'ish because I focus on Python. :)

</comment></comment><comment><USER4> i spent some time working on something like this - i wanted something that could carry as much information as a typical cryptographic hash, but be memorable to a human.

it turns out that it's quite hard to make that much information memorable :o) (it's even harder to measure whether something is memorable, or even "different" \- i ended up getting sidetracked into extreme value statistics, and then giving up)

but one important trick was to make the pattern symmetric in some way, which seems to be also used here. although it halves the amount of data (assuming other parameters constant) it makes it much, much easier to remember.

anyway, these look good (for this use case).

</comment><comment><USER5> Pointless estimation:

There are, say, around 10x2^(5x3) = Identicons assuming about 10 color shades can be told apart easily. That's ~300,000 different combinations. You need ~650 people contributing to a repo in order to get a 50% chance of collision.

So, while there are almost certainly collisions across all Github users, you're pretty unlikely to see one in any thread you'll participate in.

Especially since so many Githubbers actually do have Gravatars.

</comment><comment><USER6> I found an identicon onomatopoeia: [https://identicons.github.com/mask.png](https://identicons.github.com/mask.png)

<comment><USER7> [https://identicons.github.com/elephant.png](https://identicons.github.com/elephant.png)

<comment><USER6> [https://identicons.github.com/mouse.png](https://identicons.github.com/mouse.png)

</comment></comment></comment><comment><USER8> What problem do these solve? Serious question.

<comment><USER9> This will be very useful if it makes it into GitHub Enterprise - our IT won't let us use Gravatar, so comment threads/issues are harder to follow.

<comment><USER10> If you're running a recent version of GitHub Enterprise, the avatar base URL can be configured today. It's possible to run an internal, secure server that responds to Gravatar's URL scheme.

</comment></comment></comment><comment><USER11> Mine is pretty unexciting: [https://identicons.github.com/mwylde.png](https://identicons.github.com/mwylde.png).

It would be nice if the algorithm took interest (probably defined as a ratio close to 50/50 white/black cells) into account to prevent mostly black or mostly white avatars.

<comment><USER12> I think thats a really good one. Its s.ymmetrical and has a cool minimalism.

Edit: ok actually they're all symmetrical ..

</comment></comment><comment><USER13> Religious symbol or two hands holding a pea? Or if you stretch the imagination really hard, a top down view of a TIE/IN ? :-)

[https://identicons.github.com/JohnHammersley.png](https://identicons.github.com/JohnHammersley.png)

</comment><comment><USER14> I wish Gravatar themselves would add more options for fallback images. All the ones they have are pretty obtrusive. Ex: nicer looking identicons, someones initials (Trello style), or even just the ability to pass a URL that has a querystring as a fallback image.

They do have a "identicon" already. I wonder why GitHub didn't use it -- probably just didn't like the way they looked.

[https://secure.gravatar.com/site/implement/images/#default-i...](https://secure.gravatar.com/site/implement/images/#default- image)

</comment><comment><USER15> I could not have chosen a better one: [https://identicons.github.com/jemfinch.png](https://identicons.github.com/jemfinch.png)

<comment><USER16> Pardon my ignorance, but why is that one so fitting?

</comment></comment><comment><USER17> Mine looks weird, to say the least: [https://identicons.github.com/ssilva.png](https://identicons.github.com/ssilva.png)

<comment><USER18> Yeah...I unfortunately ended up with the same general shape: [https://identicons.github.com/jerluc.png](https://identicons.github.com/jerluc.png)

</comment></comment><comment><USER19> Mine is pretty boring...

[https://identicons.github.com/eberfreitas.png](https://identicons.github.com/eberfreitas.png)

But overall, it looks really cool :)

<comment><USER20> Mine: [https://identicons.github.com/masonhensley.png](https://identicons.github.com/masonhensley.png)

</comment></comment><comment><USER21> I got an evil alien:

[https://identicons.github.com/andrewf.png](https://identicons.github.com/andrewf.png)

<comment><USER22> Mine looks like an anchor:

[https://identicons.github.com/aquageek.png](https://identicons.github.com/aquageek.png)

<comment><USER23> Bane:

[https://identicons.github.com/zachrose.png](https://identicons.github.com/zachrose.png)

</comment></comment></comment><comment><USER24> Mine is sad!

[https://identicons.github.com/chasing.png](https://identicons.github.com/chasing.png)

<comment><USER25> I can't tell if mine is also sad or just sporting a killer moustache [https://identicons.github.com/thoradam.png](https://identicons.github.com/thoradam.png)

<comment><USER24> I'd call it somewhere between sad and pissed off. Not an identicon you want to fuck around with, at any rate.

</comment></comment></comment><comment><USER26> I realise it's completely childish but I was amused by [https://identicons.github.com/hate.png](https://identicons.github.com/hate.png) looking like a smiley face.

Also [https://identicons.github.com/balls.png](https://identicons.github.com/balls.png)

</comment><comment><USER24> Reminds me of Jared Tarbell's "Invader Fractal:"

[http://www.complexification.net/gallery/machines/invaderfrac...](http://www.complexification.net/gallery/machines/invaderfractal/)

(Jared also happens to be one of Etsy's co-founders...)

</comment><comment><USER27> I really like mine! It's about as minimal as can be, only two pixels with different color.

[https://identicons.github.com/tlongren.png](https://identicons.github.com/tlongren.png)

</comment><comment><USER28> [https://identicons.github.com/jhorvat.png](https://identicons.github.com/jhorvat.png) I like how mine looks like an H (my last initial)

</comment><comment><USER29> Mine is the anonymous/guy fawkes face: [https://identicons.github.com/pathikrit.png](https://identicons.github.com/pathikrit.png)

</comment><comment><USER30> mine is... borderline offensive?

[https://identicons.github.com/ultimatedelman.png](https://identicons.github.com/ultimatedelman.png)

or a racecar. not sure which.

</comment><comment><USER31> I like their small file size, around 200 to 300 bytes. Though that's arguably large to store a 5x5 bitmap + one RGB color, which would fit comfortably in 7 bytes.

</comment><comment><USER32> Mine looks like a human: [https://identicons.github.com/samanbarghi.png](https://identicons.github.com/samanbarghi.png)

</comment><comment><USER33> Great update. I never cared to sign up for Gravatar as it's now owned by WordPress, but it was a minor annoyance that I was not identifiable by my avatar.

<comment><USER34> You could run your own with libravatar: [https://www.libravatar.org/](https://www.libravatar.org/)

</comment></comment><comment><USER35> "Huge number of unique identicons"? Since they all seem to be symmetric, there's only N * 2^15 = N * 32768 of them (N = number of colors).

<comment><USER36> FWIW, there are 360 possible hues, 20 possible saturation values, and 20 possible luminosity values.

<comment><USER6> So, 1000 times more possible identicons than users. 360 * 20 * 20 * 32768 = 4,718,592,000. Github users: ~4m.

</comment></comment></comment><comment><USER37> I like this! Now I'll use it for other things too.

</comment><comment><USER38> I found a blank one: [https://identicons.github.com/lessons.png](https://identicons.github.com/lessons.png)

<comment><USER39> It only generates identicons for real GitHub accounts.

</comment></comment><comment><USER5> Mine's mousey [https://identicons.github.com/tel.png](https://identicons.github.com/tel.png)

</comment><comment><USER40> mine looks upside-down [https://identicons.github.com/gingerlime.png](https://identicons.github.com/gingerlime.png)

but I LOVE this idea and execution. Considering turning off my gravatar.</comment>


US has 501,000 fewer jobs than first reported - <AUTHOR> https://apnews.com/bac6a76b8c0d4f8897d2c8612d2b5bfd <comment><USER2> Can anyone comment as to how this might have occurred? Was it a mistake or just late data? At the time I read the article, it didn't have these details.

<comment><USER3> The agency was recently moved and lost a huge part of their staff, they're not going to be as competent as they used to be. The same things is happening to the USDA.

<comment><USER4> I was going to cite the USDA as my primary example. I have been hearing a lot of this from ARS, FSA and NRRL, and although their specific problems are different there is a definitely a common theme. The USDA NRRL type culture collection is currently slated to be autoclaved and shut down, which would destroy the only known publically available reference samples of many industrially and medically important microorganisms, including many that are critical to food safety testing and the original source of antibiotic compounds (the original source of pennicillin is in that collection).

<comment><USER5> That sounds insane.

<comment><USER4> This collection has been in place since before World War II. As soon as the freezers are unplugged, there is no going back.

<comment><USER5> > Insanity is the wrong term, because it would imply repeating something that > has already failed.

However popular that aphorism is, it isn't actually the definition of insanity.

<comment><USER6> Dogs are mammals. Mammals aren't dogs.

<comment><USER7> 'Dog' and 'mammal' are two distinct terms, 'insanity' and 'insanity' are not.

<comment><USER6> "Doing the same thing over and over again, but expecting different results" and "insanity" are also different.

The former might be a form of the latter, but you can certainly be insane in other ways.

<comment><USER7> Sure, but that wasn't what the OP said. They said:

> _Insanity is the wrong term, because it would imply repeating something that > has already failed._

ie suggesting the opposite of your point; that the term "insanity" is more narrowly defined rather than broadly defined.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I've noticed these revisions from time to time. Is there anywhere that tracks them? I'd be curious to know how often positive figures are not so positive?

<comment><AUTHOR> I don't know if these numbers and their subsequent revisions are always available in a table. I did find something that looks like the source of this article, and the website seems to have some mention of having data publicly available [0]. Maybe the past press releases/statements are also archived?

It'd be a useful side project in my opinion.

[0] [https://www.bls.gov/web/empsit/cesprelbmk.htm](https://www.bls.gov/web/empsit/cesprelbmk.htm)

</comment></comment><comment><USER9> They discover it now and will update the numbers in 6 months? Why?

<comment><USER10> To give the party in power 6 months to come up with a plan to blame this on the other party, just in time for the 2020 election heating up.

</comment></comment><comment><USER11> Where do these figures come from in the first place? Are they based on W-2 filings? Who notifies the federal government when I leave my job? How can anyone independently verify these figures are accurate?

Edit: This seems to go into many of these details: [https://www.bls.gov/web/empsit/cestn.htm](https://www.bls.gov/web/empsit/cestn.htm)

<comment><USER12> For those who aren't familiar and haven't read the link, most initial BLS data is derived from surveys, not from W2 + 1099 filings. As such, it's an indicator, not the whole truth.

</comment></comment><comment><USER13> > This was the sharpest downward revision in jobs totals since 2009, when the > economy was just starting to emerge from the Great Recession.

It's not clear what number the article is talking about. Assuming nonfarm payroll, the BLS has this data set of revisions going back to 1979:

[https://www.bls.gov/web/empsit/cesnaicsrev.htm](https://www.bls.gov/web/empsit/cesnaicsrev.htm)

Assuming these figures report thousands, nothing really jumps out as being >500, expansion year or not - 2009 included.

Edit:

I suspect the article is reporting total jobs, not jobs change, but I'm not sure. The BLS link appears to be reporting change in nonfarm employment. Surprisingly poor labeling of data sets in both cases.

<comment><USER14> This is the annual benchmarking adjustment not the monthly revisions.</comment></comment>


Building a web startup for less than $150 - <AUTHOR> https://medium.com/@AliKAfridi/how-much-does-it-really-cost-to-build-a-web-startup-f07ddb875ea0

<comment><USER2> Thanks for sharing this! I wrote a similar post recently: [https://medium.com/@morphmail/the-first-300-a-startup- launch...](https://medium.com/@morphmail/the-first-300-a-startup-launch- tale-f074d957da4e)</comment>


Show HN: Hacker Notes chrome extension  - <AUTHOR>

https://github.com/butu5/hackernotes
This is a simple chrome extension.
While reading any article, I prefer to select few lines of text and want to add some of my comments. So that I can access it later.
It does this much only. It is in pre-alpha stage :)
Find the notes in
http://codesnipr.com/notes <comment><USER2> >>I prefer to select few lines of text and want to add some of my comments

Is this common? Genuinely asking.

<comment><USER3> I think you just did it. But normally the quotes are from the linked page.

Or it means you want to save snippets from the page for the future. I'm not sure.</comment></comment>


Ask HN: Do you experience much "flow" running a startup? - <AUTHOR> For those of you doing startups, do you experience much of a sense of flow in your day to day work or is it more of just a grind? I'm referring to the mental state called flow (https://en.m.wikipedia.org/wiki/Flow_(psychology)), of which I'm sure many of you are familiar. For those who aren't, you might refer to it as being "in the zone". It's basically that state when you're working at your peak ability and are totally absorbed in the task you're doing. <comment><USER2> Yes, artificially, by using Dexedrine (basically the same as Adderall).</comment>


Why do old statues have such small penises? - <AUTHOR> https://howtotalkaboutarthistory.wordpress.com/2015/08/30/why-do-all-old-statues-have-such-small-penises/ <comment><USER2> They don't - they're about average.

 __ __ __Following links are NSFW! __ __ __

*[https://qph.is.quoracdn.net/main-qimg-83057b24725b6e813a747a...](https://qph.is.quoracdn.net/main-qimg-83057b24725b6e813a747aae8f741087)

* [https://qph.is.quoracdn.net/main-qimg-0f7e6c4cf3094a8d60b824...](https://qph.is.quoracdn.net/main-qimg-0f7e6c4cf3094a8d60b824eec99910a0)

Taken from Quora answer - [https://www.quora.com/Why-do-ancient-Greek- sculptures-and-st...](https://www.quora.com/Why-do-ancient-Greek-sculptures- and-statues-all-feature-small-penises)

<comment><USER3> Key quote from the Quora link:

> (1) Long, thick penises were considered--at least in the highbrow view-- > grotesque, comic, or both and were usually found on fertility gods, half- > animal critters such as satyrs, ugly old men, and barbarians. A circumcised > penis was particularly gross. (2) The ideal penis was small, thin, and > covered with a long, tapered foreskin.

This is in conflict with your idea that they are just 'average', rather than idealized.

<comment><USER4> No, the average penis size is pretty small... it's the idea of the larger penis that's idealized in modern society

<comment><USER3> Maybe so, but the two explanations are at odds in any case.

<comment><USER5> Not really? Considering deviations from the average grotesque/unaesthetic and idealizing averages (see also, Norma sculpture) fits together rather well.

<comment><USER3> They are distinct explanations, though. I suppose you can idealize what's average, technically.

<comment><USER5> Is it that incomprehensible that something as subjective as aesthetics is too complicated to be reduced to a single explanation?

> I suppose you can idealize what's average, technically.

Not just technically, it happened in a few well-documented cases, like the Norma craze I mentioned: [https://www.thestar.com/news/insight/2016/01/16/when-us- air-...](https://www.thestar.com/news/insight/2016/01/16/when-us-air-force- discovered-the-flaw-of-averages.html)

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> _Firstly, they're flaccid. If you compare their size to most flaccid male penises, they are actually not significantly smaller than real-life penises tend to be._

So... they're not small. I guess most people haven't seen many average, flaccid ones. If most of your exposure to penises is hardcore pornography and Mapplethorpe that confusion is understandable.

<comment><USER7> My very good friend has the rare distinction of being a medical scrotum model. This was a paid position (behind white curtains etc) of being an anatomical model for the male scrotum for medical education purposes.

He read, and studied, many text books that described and illustrated the average, flaccid penis in order to mentally handle this job without emotional damage.

He was the first person to bring to my attention the argument over statue penis size vs. perceived real penis size and I'm surprised to see that the debate continues! He had many references to studies done in this field (it's surprisingly popular!)

Despite the continuing debate, my friend has a unique set of skills on his CV.

<comment><USER8> _He read, and studied, many text books that described and illustrated the average, flaccid penis in order to mentally handle this job without emotional damage._

What sort of emotional damage did he think would result from being a medical scrotum model? What did the job entail actually? I would assume he would let students see his penis or have it photographed for anatomy books, or something similar? Or were the students allowed to touch it, or something?

<comment><USER9> > Or were the students allowed to touch it, or something?

Well, at some point there will be a need for hands-on practice. I don't know if the friend is providing that, but I hope somebody is.

I assume there's a certain amount of verbal discussion, also.

</comment></comment></comment></comment><comment><USER10> The author mentions that David looks afraid from the front, but doesn't provide a photo, so I went looking: [http://i.imgur.com/OVJdNac.jpg](http://i.imgur.com/OVJdNac.jpg)

He definitely doesn't look afraid from below. He always looked bored to me, but looking him in the eyes, he definitely looks concerned.

<comment><USER11> Wow, I can't believe we don't see that angle more often, it adds so much to the statue.

<comment><USER10> I wonder how many other works of art are poorly displayed.

<comment><USER12> Interesting you mention the fact about it being poorly displayed. I would say it is, but not because you don't often see this frontal view. As you may or may not know, the sculpture was originally meant to be displayed on the roof of the Duomo. Michaelangelo altered the proportions slightly so that it would appear to be correct when viewed from an extreme low angle.

<comment><USER13> Is _that_ why his right hand seems extremely elongated? I've always wondered. Viewed from a steep angle, I imagine it would look quite normal.

</comment></comment></comment></comment></comment><comment><USER14> From a friend who studied "classics" as a degree, the Greeks thought massive schlongs were comical and bestial, as well as stole focus from the musculature and overall balance of the art.

Rome on the other hand considered itself a masculine nation, who's roads were broad and straight, never turning for nature.

Not that the Greeks couldn't have fun, they used statues with erect penises as road signs in Athens, famously knocked off by Alcibiades (in fact he was framed by a rival ) the night before the invasion of Sicily.

The David is a statue of a 14 year old, in addition to the reasons given in the article.

<comment><USER15> Also in classical times the 'seat of power' for men was not the penis but the testicles.

Today we equate masculinity and virility with a large penis, but to the Greeks and Romans a large penis had no such connotation.

When you think about it, it makes sense from a biochemical perspective. Without the male testes a man can not produce testosterone which is the key hormone that regulates growth, muscle mass, aggressiveness, competitiveness, vitality, etc.

So it is understandable to think that a larger pair of testes would make you 'more' of a man and a smaller set, less.

Not sure when exactly this change occurred in Western culture but it would be the more interesting question to try to answer.

</comment></comment><comment><USER16> I have an alternative theory: the extremities of the statue are more delicate and the most likely parts to get knocked off over time. The size of the penis is probably proportional to the chance of it being knocked off, so we see fewer surviving examples of more endowed statuary. This theory doesn't necessarily compete with the one in the article; canny sculptors may have gone for smaller dimensions to make their statues more robust as well as aesthetics.

<comment><USER17> > canny sculptors may have gone for smaller dimensions to make their statues > more robust as well as aesthetics.

I think that's one step to far. It's a better (at least 'cleverer'?) argument if you just leave it at "it's survivor bias."

</comment></comment><comment><USER18> semi offtopic because my anectdote is more about the compactness of the genitals than their size:

i used to live in firenze and there is a statue of neptune(o) in the palazzo vecchio

once i was walking past it with a friend and i told her it was one of my favourite statues in the city

and she surprisingly responded, 'of course it is'

i asked why it was so obvious and she said, 'well, look at his balls'

"what about his balls?"

'that's an old man with the balls of a prepubescent boy'

now, you could make an argument about the models used or some social aspect of the times or artist but i loved where she went from there

"interesting, go on"

'it's a clear fetishising of immortality, to think you can be old with such a tight young body is the pure representation of a god, the immortal'

wisdom of experience, strength of youth

(o) [https://en.wikipedia.org/wiki/Fountain_of_Neptune,_Florence](https://en.wikipedia.org/wiki/Fountain_of_Neptune,_Florence)

</comment><comment><USER19> Not going to translate (this is Italian -and in particular Sicilian) and there are two sculptors arguing with the local priest about the size of the dong.

[https://www.youtube.com/watch?v=0WKAjQKTz3w](https://www.youtube.com/watch?v=0WKAjQKTz3w)

<comment><USER20> I speak Italian, and even I am grateful for the subtitles. I'm as far away from Sicilian as possible.

Many of the great classic Italian movies are in (Southern) dialect, so I tend to watch them with subtitles. Need to watch this movie.

</comment></comment><comment><USER21> I haven't seen this (my) theory mentioned but it's worth thinking about- sculptors of fine art were keen to differentiate themselves from poor cheap carvings that you can still get to this day in cheap markets in rural towns on the european continent. Go through stalls in Spanish seaside towns and you'll immediately find lewd phalic sculptures. They are made to shock the person receiving the gift. Proper artists wanted to go in the other direction, reducing the size of the genitalia so it's not a focus of the work.

</comment><comment><USER22> Has anyone considered the possibility that the statues were in the pool? [0]

[0]: [https://www.youtube.com/watch?v=ldUZvxjKMGs#t=1m18s](https://www.youtube.com/watch?v=ldUZvxjKMGs#t=1m18s)

</comment><comment><USER23> Women breasts are also small in old statues.

Maybe we can infer that sculptors didn't want erogenous zones to become too relevant and overshadow the statue as a whole.

<comment><USER24> Part of the reason for this is that many of the models for Renaissance artists' sculptures of women were actually men.

</comment></comment><comment><USER25> I suspect large dicks and boobs are a recent evolutionary development, but not that recent. You just cant run down dinner or walk that efficiently with all that junk flopping around. Many joggers probably have experimented once either in a college bare run or in the wilderness and found it tough :-)

Lice genetics suggests clothing is at least 80K years old even though the oldest needles are less than half that age. So people may have been engineering "support" to decrease the disadvantages of size. Nearly all the near naked jungle tribes seem to have support. I am suggesting size increased long before 2000 years ago, but not the entire history of the human race.

</comment><comment><USER26> Before searching the internet for the answer a couple years ago, my speculation used to be that artists were afraid to make well endowed statues because some wife or concubine of the emperor might make an unflattering comparison, and it was never a good idea in those days to get an emperor pissed off at you.

</comment><comment><USER27> Food for thoughts: When you fight naked or pantless against men with sharp sticks, you don't want a long penis that is easy to hit.

<comment><USER28> If I'm fighting you with a sharp stick I will not aim at your penis. Don't worry about that my friend!

Your crotch is the least interesting part to hit.

<comment><USER27> Talhoffer's fencing manuals are full of groin stabs and I've seen it in a few others.

[http://suptg.thisisnotatrueending.com/archive/17516250/image...](http://suptg.thisisnotatrueending.com/archive/17516250/images/1326462501450.jpg)

<comment><USER28> I don't know the first thing about fencing. But that image doesn't look like a stab to me. It doesn't look like it's aimed at the penis in particular either. (But again I know nothing of the sport.) (Edit: I agree that if I had a sword, the crotch could be considered for an attack, but I'd go for the hip joints mostly.)

What I do know is that if I have a sharp stick, I will not aim it at your penis. The main goal in a fight is to incapacitate. So an attack on the penis even if successful would be rather wasted. Bleeding from the crotch doesn't make you any less dangerous in the short term.

<comment><USER27> You will die from bleeding from the groin. This also makes it so your opponent cannot reproduce.

The pain alone from a hit to the groin is also enough to make somebody vomit or straight out pass out. I'm not certain if that effect is the same with cutting as it is with punches and kicks...

<comment><USER28> We're in a fight with sharp sticks and you're concerned with reproduction?! You should review your romantic ideas about violence.

<comment><USER27> I think the main point is the fact that your opponent bleed out, vomit and pass out.

<comment><USER28> Yes they might do so after the fight. During the fight you don't really know how they will react to it. In a lot of cases they will not notice the injury and continue to fight you.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER29> I was hoping that this was sort of reflecting the norm :S

</comment><comment><USER29> Since the sculptors in those days were mostly men, a better question might be why the female statues have such small breasts :)

<comment><USER30> Er, the breasts are about average?

</comment></comment><comment><USER31> Look, it's stone. It was carved with a hammer and chisel. There is no "undo" and you don't even know if there might be a hidden defect in the stone until it snaps. You can't glue a broken penis back on. If you break it, you keep it, unless you can find a buyer for a stone penis and the corresponding emasculated statue.

Some of these statues probably started off with huge penises. The stone broke, and thus the statues got downsized. It's that or lug a new boulder back to the workshop.

Statue buyers must have had a say as well, and vandalism is not a recent invention. People have been snapping parts off of art since before recorded history. If you were an ancient statue buyer, would you choose a design that will easily suffer damage at the hands of a 12-year-old kid? No way. Short is best. It's probably cheaper too.

</comment><comment><USER32> I've seen this question answered before and the explanation was that small flaccid penises imply a proportionally large change when they become erect. While an already large but flaccid penis would proportionally not change so much.

Greeks considered the difference between the size of a flaccid vs erect penis a sign of masculinity, and therefore tended to use small penises.

What's more glorious than knowing that the flaccid retracted penis of an amazing athlete will grow 4x when required (which is plausible). A larger non retracted penis wouldn't grow so much proportionally.

</comment><comment><USER33> Maybe the ones with big ones were vandalised?

<comment><USER34> but why would they be?

<comment><USER35> It was actually very common for statues from ancient Mediterranean civilisations to have their genitalia knocked off by later, more conservative peoples. There are many in museums today which have been defaced by order of Pope Pius IX and other 16/17/18th century leaders.

<comment><USER36> "Are you anti-Catholic?"

"No, I'm anti-vandalism."

</comment></comment></comment></comment><comment><USER37> Guess this begs the question of how "big is better" in pop-culture.

Anyone know?

</comment><comment><USER38> They could have been cold. If you have a penis and scrotum, you know what happens to them when you are cold. That picture of the statue of Laocoön battling snakes with his sons in the article, they were probably battling the snakes in some dank, cold cistern right above the gates to Hades.

</comment><comment><USER39> I'd venture another explanation. When I compare myself to those "normal" statue, I don't feel inferior :-) The fat is that a statue is an idealization; so being the same as the idealized stuff is a warm comforting feeling...

</comment><comment><USER40> Am I the only one who misread this as "statuses" and thought it was about the Twitter 140 character limit?

</comment><comment><USER41> There should be scientific studies telling us the average size of penises.

</comment><comment><USER42> The linked article's title is "Why do all old statues have such small penises?". Why was the word "penises" censored on HN?

Edit: It's now been changed. It used to say "male genitalia" instead of "penises".

<comment><USER7> Guessing that [https://news.ycombinator.com/user?id=okket](https://news.ycombinator.com/user?id=okket) self-censored due to perceived American "sensibilities". Those of us who aren't from the USA never really understand what causes insult or not. (no joke, and no snark, it's absolutely true that this causes confusion to Australians, and I assume it does to a whole bunch of people from other nationalities!)

EDIT: Title has been changed. Good for whoever changed it!

<comment><USER34> Where America has a huge hardcore pornography industry, common nudity on major motion pictures and award winning TV shows, nudists, hippy communes and sex cults in the country, Burning Man and San Francisco, it also has a strong protestant conservative prudishness. It's very confusing to a European.

<comment><USER43> The American sexual liberation movement started in the 1960's, and centered on the west coast/San Francisco specifically.

Before that America was literally founded (in the north at least) by religious conservatives who were too prudish for Europe. In fact the early US Quaker movement banned sex all together.

<comment><USER44> You're probably thinking of the Shakers, compared to other non-conformist sects, the Quakers had relatively few hangups about sex.

<comment><USER45> That being said, I can attest to at least the Shaker melody (well known from Copland's "Appalachian Spring") as a touchstone of American culture. It's pretty good.

</comment></comment></comment></comment></comment></comment><comment><USER46> Who are all you people? What happened to HN?

<comment><USER47> What are you talking about?

<comment><USER46> You haven't noticed a serious decline in the quality of comments and posts? This site used to be much more startup and programmer focused. Now we have posts about the penis size of statues. :/

edit: What would you know about that? You joined less than a year ago.

<comment><USER48> I don't think you are correct, there is a very broad variety of interesting topics that come across HN daily... I find it interesting the stories around hardware hacking in the 60-80's that come up at times... Others include RF/Radio... There's also a touch of art and politics.

Just because _you_ may not find everything interesting doesn't mean a significant portion of the members of this site won't. I started out doing art work, I shifted to programming by chance because I had a talent for it, and it paid well. I enjoy it, but it's never been my first choice of careers.

<comment><USER46> Yeah. I get it. But a lot of us are moving to lobste.rs. You can stay here and enjoy your interesting HN posts. I'm done.

<comment><USER49> Your most recent page of comments includes this thread, a thread about illegal immigration, and one about suicide rate. You've also commented about Earl Grey tea and HBO in the past -- back in the years when HN was supposedly more about technology. You've never submitted a story, tech or otherwise. Yet you've suddenly become a startups-and-code purist?

FWIW I like lobste.rs -- but there aren't "a lot of us" moving; the front page has one article with 60 comments, one with 28, one with 13, and the rest are in the single digits. The highest upvote total is 37. (Which you may view as a good thing, if you want a more focused / restricted site than HN.)

<comment><USER46> Some people, whom I have a great deal of respect for, have moved to lobste.rs And I do view the more focused / restricted aspect as a good thing. You've highlighted how some of my more recent posts on HN make it clear how far I've strayed from code / startups. So I'm making an effort not to get sucked into the frivolity. Thanks.

</comment></comment></comment></comment></comment></comment></comment><comment><USER50> Well done, HN. You upvoted it. Now let's see you discuss it.

<comment> drunken-serval I found the article interesting but I don't know how much there is to discuss. The article asks the question and answers it. In a neat little package. (Pun intended... I couldn't stop myself.)

</comment></comment><comment><USER51> it was cold when they were modelling

</comment><comment><USER52> I think this is important in the penis enlargement era. Now I will sleep better.

</comment><comment><USER53> > _... his small penis allowed him to remain coolly logical_

This suggests an important new brogrammer interview question

</comment><comment><USER54> we need NSFW tag!

</comment><comment><USER55> Clearly David was just a grower, rather than a show-er. Also, he is in what any athlete will recognize as "sports mode". Also, it looks bigger in person. Nuff said

</comment><comment><USER56> Is this a worthy HN topic?

<comment><USER57> Enough people found it interesting, so yes.

<comment><USER58> well... HN does kinda have a start-up/tech focus. It'd make sense to moderate in a way that kept people "on topic". If you want general discussion there are better places for that.

<comment><USER57> Yes, but the guidelines explicitly say "anything that gratifies one's intellectual curiosity". I'm okay with that, I'm here for both things, tech- related or otherwise, as long as it's interesting.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

<comment><USER58> Oh that explains it... I've been drifting to lobste.rs a lot more lately anyway.. too bad I don't have an invite =(

</comment></comment></comment></comment></comment><comment><USER59> What this thread needs is a reference to the bitcoin blocksize debate.

</comment><comment><USER60> Not a lot of insight in this article. Is it on the front page for the giggles?

</comment><comment> saiya-jin well obviously ladies didn't define aesthetic norms back in those days...

fiancee had the same question this weekend after visiting Louvre's antic section - the stuff is just too small given proportions of statues. i am a +-regular gym goer, so even if i don't want i see all the stuff in locker rooms/shared showers, and albeit some of it is this small (and smaller), most is bigger.</comment>