Live data from Hacker News

Command line tools every web dev needs to know

coderholic.com

51–60 of 71 posts

Re: Command line tools every web dev needs to know

#51
post #43

Earlier quoted context omitted.

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?

How many lines of code per day do you actually write? 10? 100? 1000?

If we assume something like 30 characters per line, and maybe five characters to a word, you'd be writing 600 "words" in a day where you'd write 100 lines, and as many as 6000 "words" in a 1000 loc day.

100 wpm for 600 words means you're saving 6 minutes per day over the 50 wpm guy. Not much, I doubt anyone would care about 6 mins one way or the other. 100 wpm for 6000 words means you're saving an hour over the 50 wpm guy. It's rare you write 1000 loc. I don't know if I've ever done it, myself.

But that's just code. How often do you write non-code related work? Documentation, email, notes, comments, spec, etc. 6000 words per day is probably not uncommon for a developer when you include the noncode writing a dev will do during a day, and when a 100 wpm guy gets done a whole hour before the 50 wpm guy, that's an undeniable advantage.

Re: Command line tools every web dev needs to know

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

If you have two candidates who you're certain are equally good developers, then obviously the one who types faster will be more marginally more productive. But I wouldn't assume typing speed or style is an accurate proxy for programming ability.

Re: Command line tools every web dev needs to know

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

The openssl part is just using openssl to base64-encode "$@":

  $ echo 'test' | openssl base64
  dGVzdAo=
Which is the same as:

  $ echo 'test' | base64
  dGVzdAo=
The URL is the same as:

  args="$@"
  b64=$(echo -n "$@" | openssl base64)
  url="http://www.commandlinefu.com/commands/matching/$args/$b64/plaintext"
For these purposes though, "$@" could probably be replaced with "$*". Technically the URL is invalid since "$@" could introduce non-escaped spaces into the URL.

Re: Command line tools every web dev needs to know

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

Well, I only copied it myself, but it's not that complicated. From the API docs we learn that we need our search terms both in verbatim and base64 encoded. The first $@ is the verbatim part, and the second one is the one involved in the base64 part.

$() gets replaced by the output of , in our case that means the output of the openssl base64 call, which takes stdin, applies the base64 encoding and prints it out on stdout. echo -n $@ just serves to translate our parameters into something the openssl base64 call can work with (-n means it won't introduce a superfluous newline). I'm not sure why the script uses openssl base64 instead of just base64 (a GNU coreutils utility).

I agree with the sibling that the API requirement to include both verbatim and base64-encoded search terms are fairly bizarre.

Re: Command line tools every web dev needs to know

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

Cool, where is it?

Re: Command line tools every web dev needs to know

#56
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…

We must have worked with the same guy! This is a guy would literally right-click -> copy, right-click -> paste everything. It was so frustrating watching him do even the simplest of tasks.

Then there was the day when he had to merge a huge branch back in TFS. I try not to speak much of that day...

Re: Command line tools every web dev needs to know

#57
post #45

Earlier quoted context omitted.

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.

Cool, where is it?

You have to have Developer Tools installed. I am at work right now, not on a mac, but I will try from memory. I believe you get it from Xcode > Developer tools > Get more tools. I don't recall the exact menu tree but I am sure you can google it.

After that, it's integrated into the System Preferences panel. You simply pick which network conditions you want to simulate.

I think it's also possible to launch it from the xcode Utilities folder w/o installation. Sorry I can't be more coherent w/o my machine in front of me.

Re: Command line tools every web dev needs to know

#58
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…

commandlinefu.com author here. Agreed, the API is odd and needs rewriting - I was trying to work around the idiosyncrasies of CodeIgniter which didn't support query parameters (hilarious) at the time of writing. The first segment (eg 'ssh' in /matching/ssh/c3No') isn't actually used - it's just there for SEO. You can insert junk there if you want - both aren't required. I'll update the docs to make this clearer.

There is a Django-rewrite of commandlinefu on the way including a saner API.

Re: Command line tools every web dev needs to know

#59
post #41
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.

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.

Re: Command line tools every web dev needs to know

#60
post #43

Earlier quoted context omitted.

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

If you have two candidates who you're certain are equally good developers, then obviously the one who types faster will be more marginally more productive. But I wouldn't assume typing speed or style is an accurate proxy for programming ability.

I think it's rather a proxy of how long the person spends writing on a computer. For a programmer more time spent writing generally means more time programming, which means more experience.

I don't think time gains because of faster typing don't even factor into a decision, but broader knowledge/experience does.

Post reply on HN