Live data from Hacker News

Command line tools every web dev needs to know

coderholic.com

61–70 of 71 posts

Re: Command line tools every web dev needs to know

#61
post #9
post #5

$ curl -I news.ycombinator.com HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Cache-Control: private Connection: close Keep in mind that this will fire a HEAD request to the server which, depending on web server you use in development, may not return the exact header you'd get with GET (IIRC, Jetty used to do this). I like to use something like this in such situation: $ curl -s -D /dev/stderr news.ycombinator…

I rarely find I use curl's -s without its -S, e.g. -sS. It seems curl's design is flawed in its definition of -s; perhaps it's historic and it was too late to change it.

The junk goes to stderr, so it won't impact anything but your screen when used from the command line. And sometimes (large transfers) you want that information. I think the default is sane. When you're using curl in a script you use -s, when you're using it interactively you want the diagnostics.

Re: Command line tools every web dev needs to know

#62
post #50

Earlier quoted context omitted.

Interesting. Can you explain how the command works? I did look at the commandlinefu API page but didn't get it. I know UNIX and also specifically what "$@" means in UNIX but didn't get the meaning of the two uses of it in the commandlinefu URL you show, nor what the openssl part does.

It seems that the API bizarrely expects: [URL]/matching/ssh/c3No - Search results for the query 'ssh' (note that the final segment is a base64-encoding of the search query) So it's passing the command args through 'openssl base64' to encode them as required by the api. $ echo -n ssh | openssl base64 c3No It's not immediately clear to me why they require both - base64 encoding might be useful to allow non-printable/sp…

Thanks to all who answered.

Re: Command line tools every web dev needs to know

#63
post #7

Earlier quoted context omitted.

Also, typing. I am frequently amazed to see professional software developers with years of experience in the field, who only type using their two index fingers. You probably do not need to type 120 WPM to be an amazing programmer, but typing without looking at the keyboard is absolutely essential.

I used to be one of those. Until one day a colleague noticed and made a remark. Then I looked at other colleagues and realized my problem. I used http://www.gnu.org/software/gtypist/ to fix it.

I used to go to http://keybr.com/ but having a cli program is great. Thanks

Re: Command line tools every web dev needs to know

#65
post #61
post #9

Earlier quoted context omitted.

I rarely find I use curl's -s without its -S, e.g. -sS. It seems curl's design is flawed in its definition of -s; perhaps it's historic and it was too late to change it.

The junk goes to stderr, so it won't impact anything but your screen when used from the command line. And sometimes (large transfers) you want that information. I think the default is sane. When you're using curl in a script you use -s, when you're using it interactively you want the diagnostics.

Yes, sometimes when it's a particularly large transfer I want a progress meter but I normally don't so it's in the way; perhaps when we all had modems. And from a script I'd still want to use -sS instead of -s because although the script is obviously checking curl's exit value the user wants to see curl's specific complaint before the script's own knock-on diagnostic.

    $ curl -s does.not.exist; echo $?
    6
    $ curl -sS does.not.exist; echo $?
    curl: (6) Couldn't resolve host 'does.not.exist'
    6
    $

Re: Command line tools every web dev needs to know

#67
post #59
post #41

Earlier quoted context omitted.

It's perhaps one of the effective filters while hiring. Not just the typing speed, but the general use of command line tools and keyboard shortcuts. Most good developers that I know are masters of the keyboard. They rarely ever touch the mouse.

Do you allow them to install their favorite editor? If someone watched me on Visual Studio without letting me install Viemu first, I'd look like an idiot.

Yep. Whatever editor/IDE they wanna use.

Re: Command line tools every web dev needs to know

#69
post #33

Earlier quoted context omitted.

I used to be one of those. Until one day a colleague noticed and made a remark. Then I looked at other colleagues and realized my problem. I used http://www.gnu.org/software/gtypist/ to fix it.

I'm still trying, but it's demanding more discipline from me than I thought I'd need at first. It's hard to get rid of bad habits when they've already become muscle memory.

I found http://play.typeracer.com/ a fun way to get my typing speed up. I originally just went there to play around with my shiny new mechanical keyboard (which turned out to be very nice to use) and then it replaced minesweeper for short mental breaks.

Admittedly, I was typing pretty fast before I started--I think I went from something like 80 wpm to 110. But it was certainly fun!

As an aside, I've found short mental breaks like that really help when I get stuck on some little issue or bug and am not making any progress. It also keeps me from getting too frustrated!

I'm in college taking some CS classes and the actual material is great, but the framework code they give us for projects is really poorly written Python. I've spent more time grappling with Python and their code than I have with AI or compiler concepts! Taking a break whenever I encountered yet another stupid bug helped me avoid spending hours going in circles.

Post reply on HN