Live data from Hacker News

Command line tools every web dev needs to know

coderholic.com

41–50 of 71 posts

Re: Command line tools every web dev needs to know

#41
post #7

We are interviewing for experienced developers at the moment and the lack of general unix knowledge is really surprising. A little bit of shell scripting goes a long way in automating away dev work.

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.

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.

Re: Command line tools every web dev needs to know

#42
post #26
post #18

> With the following command we test google with 20 concurrent connections for 30 seconds Even though this is Google and they probably don't have a problem with this, I don't think you should benchmark servers that don't belong to you. It's not nice and could be mistaken for a DOS attack.

Google may actually give you a short-term IP ban (a day or so), so spamming their servers with spurious connections may not be in your best interest -- doubly so if you're at a workplace.

However, if I dislike the IT guys, this sounds like an awesome practical joke.

Re: Command line tools every web dev needs to know

#43
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.

This probably matters a lot less than younger people think. If you grew up touch-typing you got used to being able to put data in as fast (or almost as fast) as you could think it. If the input rate is slowed down, you feel like you're going to lose thoughts before they get captured. Folks who did not grow up touch typing, though, simply learned to construct a longer-lasting mental model, which they can then write ou…

Having a slow typing speed still means that one spends a lot of time typing, rather than doing other things, even if one can still accomplish the same mental processes without having to record it "live".

Re: Command line tools every web dev needs to know

#44
post #24
post #15

quite relevant: http://www.commandlinefu.com a great collection of cli uses and abuses one of my favorites is querying dns to get wiki excerpts dig +short txt bmw.wp.dg.cx "(BMW), is an independent German automobile manufacturing company founded in 1916. It also produces motorcycles, is the owner of the MINI brand and is the parent company of Rolls-Royce Motor Cars. http://en.wikipedia.org/wiki/BMW" http://www.comman…

I've got something like this in my .bashrc so I can access commandlinefu from within the shell: cmdfu(){ wget -qO - "http://www.commandlinefu.com/commands/matching/$@/$(echo -n "$@" | openssl base64)/plaintext"; } It's like man but for one-liners.

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.

Re: Command line tools every web dev needs to know

#45

Yesterday I used the ipfw command to run our product in "slow motion" to spot loading order and if animations started at the right places. Discovered alot of stuff that needs fixing. The ipfw command is for trottling bandwidth, and great for product designers like myself :) I'm sure it has other uses as well.

OS X has a useful Network Link Conditioner utility. It has built-in profiles such as lossy 3G connection, average wifi connection, good wifi connection etc.

Re: Command line tools every web dev needs to know

#46
post #43

Earlier quoted context omitted.

This probably matters a lot less than younger people think. If you grew up touch-typing you got used to being able to put data in as fast (or almost as fast) as you could think it. If the input rate is slowed down, you feel like you're going to lose thoughts before they get captured. Folks who did not grow up touch typing, though, simply learned to construct a longer-lasting mental model, which they can then write ou…

Having a slow typing speed still means that one spends a lot of time typing, rather than doing other things, even if one can still accomplish the same mental processes without having to record it "live".

Do you really type at full speed all the time though? Most of my time is spent thinking, and when I do type something it tends to get pipelined with more thinking. Typing faster wouldn't help much.

In fact, I'd wager that if someone is typing constantly at 100+ wpm they're probably writing bad code. Or very simple code, I guess. Or they're just transcribing UML or whatever, but nobody here does that anymore do they?

Re: Command line tools every web dev needs to know

#48
post #23
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…

You can also use the -i option which prints out the headers and the response body (which is perhaps a bit too noisy). curl -i http://news.ycombinator.com

or

    curl -v https://github.com
which dumps everything. Including, handily, the HTTPS handshake.

Re: Command line tools every web dev needs to know

#49
post #26

Earlier quoted context omitted.

Google may actually give you a short-term IP ban (a day or so), so spamming their servers with spurious connections may not be in your best interest -- doubly so if you're at a workplace.

However, if I dislike the IT guys, this sounds like an awesome practical joke.

Ted, is that you?

Re: Command line tools every web dev needs to know

#50
post #24

Earlier quoted context omitted.

I've got something like this in my .bashrc so I can access commandlinefu from within the shell: cmdfu(){ wget -qO - "http://www.commandlinefu.com/commands/matching/$@/$(echo -n "$@" | openssl base64)/plaintext"; } It's like man but for one-liners.

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/special-purpose chars in the URL, but we already have a perfectly good URL-encoding scheme for that.

And requiring both (it doesn't seem to work with only one) is just silly.

Post reply on HN