?

Log in

Previous Entry | Next Entry

Right is right and wrong is wrong!

Do only what only you can do.
    -E. W. Dijkstra

taiji_jian is going to laugh at me for still harping on this, but 99% of you haven't heard it, so here goes:

When you want to look up an IP by hostname (e.g., fingolfin.user.cis.ksu.edu, www.kddresearch.org, etc.), what program do you use?

I use nslookup. gondhir revealed the other day that he uses ping, to which I took exception because:

  • 1. Its specification does not (to my knowledge) guarantee that it prints an IP address; this is a side effect of certain implementations, whereas the primary purpose of nslookup is to map names to and from IP addresses.

  • 2. It uses active sensing when the ("non-authoritative") answer may be readily available on the local domain name server without recourse to going out into the great wide Internet.

  • 3. It is interactive. Some versions of it print continuously to standard output, and some stop after a default maximum of 4 pings (the Windows version, for example).


gondhir made sarcastic light of my aversion to hitting Ctrl-C when I shouldn't have had to, which earned him a pedantic little rant about streams, OS specificity, program control flow (Ctrl-C being a BREAK mechanism), and interactivity being taken for granted by punk kids today, with their hair and their clothes. :-D

Mon 24 Oct 2005:


[20:43:11] banazir: In any case, my point was
[20:43:32] banazir: that ping has a specific function - to actually signal the host computer using TCP/IP and see if it gets a response
[20:43:33] * sui_degeneris isn't afwaid of ^c
[20:43:39] banazir: Well
[20:43:49] banazir: I'm not afraid of giving broken URLs, Denise
[20:43:54] banazir: But wrong is wrong.
...
[20:44:33] gondhir: "Yew must noly use programs for the purpose they were designed for!"
[20:44:39] taiji_jian: (Bill is, in fact, correct. But it's more fun to needle him. :)
...
[20:56:18] gondhir: yer trying to hold me bax, OB1!
[20:56:21] taiji_jian: IOW
[20:56:21] gondhir: I *HATE* YEW!
[20:56:24] taiji_jian: Ping is easy and sloppy
[20:56:26] taiji_jian: ROFL
[20:56:30] banazir: lolol
[20:56:35] banazir: Yes!
[20:56:36] banazir: Quicker
[20:56:37] banazir: Easier
[20:56:39] *** taiji_jian has changed the topic on channel #teunc to Graham hat of Bill know no limit!.
[20:56:39] banazir: More SEDUCTIVE


Laugh it up, fuzzball!
It's still the case that only a Sith deals in infinite loops!

Case in point: the late E. W. Dijkstra is famously said to have once visited a CS department where someone let him run a demo program. It went into an infinite loop, and the authors said, "just hit ^C". Dijkstra allegedly asked, "What's ^C"?

--
Banazir

Comments

( 18 comments — Leave a comment )
twinofhugin
Oct. 27th, 2005 02:23 am (UTC)
I use 'host' for this purpose.
banazir
Oct. 27th, 2005 02:30 am (UTC)
host
[bhsu@fingolfin]% man host

HOST(1) HOST(1)

NAME
host - DNS lookup utility


You'd be correct, then.

--
Banazir
scottharmon
Oct. 27th, 2005 03:59 am (UTC)
Ditto
banazir
Oct. 27th, 2005 04:03 am (UTC)
So noted
I've switched to using it. I stand by my comment about ping, though. ;-)

--
Banazir
crypthanatopsis
Oct. 27th, 2005 07:39 am (UTC)
Same here.
yahvah
Oct. 27th, 2005 02:30 am (UTC)
The fewer keystrokes, the lesser the chance of carpal tunnel syndrome or repetitive motion syndrome.
banazir
Oct. 27th, 2005 02:35 am (UTC)
Laziness of the body versus laziness of the spirit
<PREACHER_BILL>
Hark, my brothers and sisters!

yahvah is right! Typing too much, be it IMs, or IRC, or Nanowrimo, can cause RSI. But when it comes to good usage, there are no corners cut!

The Book of Life has its own optimal block coding, and it is self-extracting!

Open your hearts and minds and put a short alias for YHWH in the .bashrc of your souls!
</PREACHER_BILL>

--
Banazir
taiji_jian
Oct. 27th, 2005 02:30 am (UTC)
LOL! You're right!

I saw the subject and figured "Oh geez, there goes Bill on morality again." And then it was ping! I guffawed.
banazir
Oct. 27th, 2005 02:51 am (UTC)
MENE MENE PING UPHARSIN
"You have been pinged and your resolv.conf found wanting."
Laziness brings on deep sleep,
and the shiftless man goes hungry.

    Proverbs 15:19

--
Banazir
(Deleted comment)
banazir
Oct. 27th, 2005 03:52 am (UTC)
Hrm
Well, I'll use host, then. Still makes more sense than ping!

Thanks for the info.

--
Banazir
(Deleted comment)
banazir
Oct. 28th, 2005 12:37 am (UTC)
Yes, exactly
I'll still tell Joe or Jane Windows User for use nslookup, as installing network services isn't part of the average user's job description.

--
Banazir
dorukai
Oct. 27th, 2005 07:41 am (UTC)
This is one thing I love about doing unix work on my mac.
Command+C is copy, Control+C is break. Woohoo! The desktop OS AND the server OS peacefully coexisting, will wonders never cease?

I use nslookup, but isn't that deprecated now? dig might be a better alternative these days.

Sorry about the anonymous one, forgot I wasn't logged in :)
gondhir
Oct. 27th, 2005 08:05 am (UTC)
I didn't know about host or dig but, if you'll recall, my original comment was about in Windows which has neither and only pings 4 times by default.

1) Who cares if it's in the "specification" or not if it works?

2) Are you saying that ping ignores the local DNS server (not in my experience)? Or that, having resolved it, it then commences to ping the target?

3) Like I said, the original comment was in the context of Windows, which only pings 4 times by default, negating the necessity for ^C. Also, don't try to blame ME for people who write infinitely looping programs. And if the authors of the ping program didn't want it to be ended with ^C, they shouldn't have made it run an infinite loop by default.

I still think it's silly to not use a program because it wasn't "intended for that use" (which was your original and main complaint) even if it works.
prolog
Oct. 27th, 2005 03:01 pm (UTC)
nslookup, generally.
banazir
Oct. 28th, 2005 12:35 am (UTC)
nslookup
I'll still recommend it to people with the caveat that it's deprecated, and that host is the thing to use if you're on *nix. Reason: Windows 2000 and XP have nslookup, which makes it significantly more general/portable.

--
Banazir
idigital
Oct. 27th, 2005 04:35 pm (UTC)
I use host or dig, dependant on my mood.
banazir
Oct. 28th, 2005 12:36 am (UTC)
host and dig
As shall I, but see my reply to prolog above.

--
Banazir
gregbo
Oct. 28th, 2005 01:25 am (UTC)
I use dig pretty regularly now (part of my job). I used to use nslookup regularly, and I sometimes use it out of habit.
( 18 comments — Leave a comment )

Latest Month

December 2008
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031   

KSU Genetic and Evolutionary Computation (GEC) Lab

Teunciness

Breakfast

Science, Technology, Engineering, Math (STEM) Communities

Fresh Pages

Tags

Powered by LiveJournal.com
Designed by Naoto Kishi