Live data from Hacker News

Command line tools every web dev needs to know

coderholic.com

21–30 of 71 posts

Re: Command line tools every web dev needs to know

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

Why? What projects have slipped due to programmer's inability to type in all the necessary code on time?

If typing is hard then you're less likely to go back over your code and correct typos and minor errors. At any rate, hunt-and-peck typists tend not to spend time going back over the code and formatting it nicely.

Re: Command line tools every web dev needs to know

#22
post #16

Earlier quoted context omitted.

Why? What projects have slipped due to programmer's inability to type in all the necessary code on time?

I don't know, but typing that slowly means that there is a barrier between the thought and the deed. It like if you wrote a poem, then started speaking the letters one by one in Morse code --- and you refuse to learn Morse code so you have to look up each letter's code as you go.

My former coworker would use the mouse to copy and paste even 3-letter variable names rather than typing them in again. He'd also scroll his terminal window up and copy and paste old commands (again, all with the mouse) rather than using the up arrow, even after I told him about command line history and tab completion in case he didn't know, and would frequently mis-copy and miss the first letter off or have a stray $ at the front, causing him to start his mousing over from scratch rather than using the keyboard to correct it.

I am not the most patient of people and had to bite my tongue a few times when instructing him. I can understand being more comfortable with the mouse than keyboard shortcuts but programming is not the best profession for anyone keyboard-averse to that level.

Of course some people genuinely find the keyboard physically uncomfortable and there's no reason they couldn't still be excellent programmers - but it seems like it would impede the "flow".

Re: Command line tools every web dev needs to know

#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

Re: Command line tools every web dev needs to know

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

Re: Command line tools every web dev needs to know

#25
post #16

Earlier quoted context omitted.

I don't know, but typing that slowly means that there is a barrier between the thought and the deed. It like if you wrote a poem, then started speaking the letters one by one in Morse code --- and you refuse to learn Morse code so you have to look up each letter's code as you go.

My former coworker would use the mouse to copy and paste even 3-letter variable names rather than typing them in again. He'd also scroll his terminal window up and copy and paste old commands (again, all with the mouse) rather than using the up arrow, even after I told him about command line history and tab completion in case he didn't know, and would frequently mis-copy and miss the first letter off or have a stray…

A pointing device is often quicker than the keyboard without sufficient shortcuts, however, and this includes too many IDEs, including, for all practical purposes, every one you rarely use.

Re: Command line tools every web dev needs to know

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

Re: Command line tools every web dev needs to know

#27
post #14

swaks is another very nice tool for email-testing (isn't email also part of the web nowadays)

Cheers for that, will come in handy very soon. For those wondering

Deliver a standard test email, requiring CRAM-MD5 authentication as user me@example.com. An "X-Test" header will be added to the email body. The authentication password will be prompted for.

  swaks --to user@example.com --from me@example.com --auth CRAM-MD5 --auth-user me@example.com --header-X-Test "test email"
http://linux.die.net/man/1/swaks

Re: Command line tools every web dev needs to know

#28
Among (too) many other things, the OpenSSL "openssl" command does Base64 en/decoding, calculates MD5 and SHA* hashes, creates, displays, converts, and verifies certificates, certificate chains, and CRLs, and even works as a convenient "micro-CA" for testing purposes.

Re: Command line tools every web dev needs to know

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

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.
Post reply on HN