Slashdot Mirror


User: rs79

rs79's activity in the archive.

Stories
0
Comments
2,997
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,997

  1. Garbage in garbage out on Randal Schwartz's Perls of Wisdom · · Score: 1

    "Why of course! It worked for Bill Gates, it can work for you too!

    "The best way to prepare [to be a programmer] is to write programs, and to study great programs that other people have written. In my case, I went to the garbage cans at the Computer Science Center and fished out listings of their operating system."
    "

    This explains nearly everything. Code reuse is a good thing but...

    Dear Bill;
    That code was in the garbage can for a reason. The good stuff was in nice binders neatly placed on peoples shelves.

  2. Re:Perl and work on Randal Schwartz's Perls of Wisdom · · Score: 1

    "Secondly the prior application used a "ping" to test if the interface was up. Again the original C programmer spent over 100 lines of code dropping down to do socket connections using select etc. I used Net::Ping and two lines and was done. Could the guy have used a C ping library? Maybe i don't know, but I spent no more than 10 minutes researching, installing and implementing the Net::Ping code with no prior experience or knowledge of the module."

    An easy way to do that in C is to shell out to ping and check the return value. That 3 lines of code shouldn't even take 10 minutes and you aren't relying on some unknown code you grabbed from someplace that may or may not have, um, undesirable side effects or create dependancy problems when it or Perl changes.

  3. Re:Perl and work on Randal Schwartz's Perls of Wisdom · · Score: 2, Funny

    "Care to explain this?"

    Easily. A young white male who had taken too much caffeine smoked a joint at 4 am to calm down at on a project that was way overdue and underfunded had to add several things to his code to make it work by trying them at random; eventually it worked but he can't explain why.

    How'd you get access to the MX missile codebase just out of curiosity?

  4. Re:Explicit programming is often better on Randal Schwartz's Perls of Wisdom · · Score: 1

    "Sometimes I even wish C would use different operators for signed, unsigned and floating-point multiplication (among others). In reality I have to use many typecasts to tell the language what I really mean, which is unclear and error-prone"

    What you want is called FORTRAN. Never loose sight of the fact C was, is and will always be a shorthand for Assembly. Even Dennis Ritchie has said he'd used FORTRAN for matrix inversion or dealing with 80 column card images. Don't laugh these data structures still exist even if the cards no longer do.

  5. huh? on Randal Schwartz's Perls of Wisdom · · Score: 1

    Forget Perl, I can't even understand your presumably English language posting.

    Forget to close a tag did we?

    (insert cheap shot about "typical Perl programmers lack of ability to write anything coherantly.")

  6. Re:Tip #1... on Randal Schwartz's Perls of Wisdom · · Score: 1

    "Well, he ran crack on one machine, then USED at least one cracked account to get on another machine to do the same thing. Very very egregiously bad and wrong. Still, I think pressing charges was going too far."

    Maybe, maybe not. There's two sides to every story and I don't know both sides to this one.

    If he was there to fix the accounting system I'd have had him killed, not sued.

    Id he was there to beef up security then they fired the wrong person - maybe. Senior management seldom takes kindsly to the idea some programmer just founf a way to read their email.

    There are two ways he could have handled this better 1) get some really nasty dirt on all the senior management from their emial, ala Simon BOFH, or 2) (and this assumes security is in scope of his gig) tell the CEO (Mr. "My door is always open here at Intel) what the problem is and what you'd like to do. If he says it's ok and you got it in writing, not email then go ahead and so it.

    You can't help somebody that doesn't want yor help.

  7. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 1

    "I started getting into Perl about 5 yrs ago and subscribed to comp.lang.perl.misc

    I have never come across a newsgroup inhabited by so many arseholes.
    "

    Try getting more than two newsgroups then. or you must be getting an NNTP feed from an interdimensional gateway. Here on earth most of them are filled with beings only slightly more advanced than plasmodium.

  8. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 2, Interesting

    "...Mark Jason Dominus..."

    Oh shit now I know I'm old. I see that name and "Perl" dosn't even come to mine. talk.bizarre does.

  9. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 1

    "Perl's ability to be terse can be nice in certain situations,"

    Like what? Your floppy disk is almost full?

  10. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 1

    " whenever I write a non-CGI script, I feel like it's a rushed job because it's very difficult to take care of unexpected input as gracefully as you can in other languages. Thus, unless it involves parsing, I typically redo my scripts in C sooner or later."

    You might end up as I have with a set of precanned library routines you've written that take care of any input that's thrown at you. If you get a new input format, you modify an existing library routine or just write a new one.

    If I have an input field that's a dollat amount and may or may not have a dollar sign and can't have any non-numeric except possibly a decimal point which may be omitted and I need the result as either an integer in number of cents or a sting, with two decimal places and nodollar sign, well, I have a routine that does that (now). I don't even think twice about sich things any more. Granted it's a bitch starting from scratch.

    C doen't even have any I/O in the language, unlike say, PL/I It all takes place in the libraries. So you end up writing your own to supplant, not replace stdlib.

    The error checking is everything. I have nothing but disdain for programmers that leave one out. Everytime I use a piece of software, whether it's industrial grade unix code or some windows hack and I get an "undocumented program execution" (bug) I curse the prick that didn't check for this. I know it's painful and I can't count the number of nights I've been sitting here ar 4 am still handling error conditions for some feature I tried to implement at 11 pm... but you have to, no two ways about it.

    I think I write ok C code, but IMO if you want to look at how C code should be written look at Dan Bernstin's stuff (cr.yp.to). It's so beautiful it makes me cry. And noboy has get found a bug he offers a decently sized cash reward for finding.

  11. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 1

    "I more or less learned perl and C cotemporaneously, so I see where you're coming from. But really, once you get over the idea of no real data types, and learn a couple of the tricks perl does in order to drop extra variables, it's not a big deal, and I think it's time well spent learning."

    Back in the bad old days when dinosaurs roamed the streets and computers had switches and pretty blinky blinky lights all was FORTRAN and/or Assembler or diety-forbid RPG, COBOL or DIBOL. I used Assembly almsot exclusively (the alternative was clearly, suicide or plumbing) and C, when and where I could, that is to say "not much". This was the mid to late 1970s. Over the years the ratio of C to Assembly inverted and I haven't written an Assembler instruction in over a decade. But, as anybody who writes in Assembler knows there are no data types, just arbitrary bytes and word in memory. So that's no great hurdle to get over.

    Perhaps I'm drain bamaged, or maybe I have a mental block, I don't know. It's not like I haven't tried to figure Perl out but I'm incapable of even getting to first base, while I feel any idiot can add a print statement ("printf ("got here.");") to a C program.

    I wouldn't say C encourages readability, bit it doesn't make it impossible, unlike, IMO, Perl.

  12. Re:forbes on Forbes Lists Top Corporate Hate Web Sites · · Score: 1

    Jaime and Ralph (Nader) wanted the .sucks top level domain but some lady from NANOG beat them to the punch and set it up first. Available at better root zones everywhere.

  13. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 1

    That's probably true to some extent but it does not explain why I took to, say, Forth and Postscript easily.

    Even good Perl looks to me like somebody rolled their head on the kayboard.

  14. Re:Next title in this series on Randal Schwartz's Perls of Wisdom · · Score: 1

    "If one can write a book about good Perl style,
    I expect to see next:

    "Portrait Painting With Dog Vomit"


    I guess one mans flamebait is anothers +5 insightful...

  15. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 2, Insightful
    Warning: I'm grouchy. A CPU fan failed and let the smoke out of a new chip. I also discovered by accident Windows has a (320x240) television mode; it took me hours to unfuck somebody's PC.

    "And I would not include C in a list of languages for writing readable code in."

    I can understand how you can feel that way after looking at some of the C code that's out there. But you have to go out of your way to obfuscate C. There's a reason there's no obfuscated Perl contest: "everybody's a winner!".

    It's possible to write readable code in C. Not many people do it, I'll agree but this does not mean it cannot be done and you learn for your own beenfit, in time, to write very clear, lots of whitespace, one idea per line code. DMR's "one true brace style" is as much to blame for the obfuscation and unreadability IMO, as anything, and while he and I disagree on this, our understanding we've agreed to is as long as you can read and write both, that's ok. Keep in mind his justification is based on physical limitations of 24 line 80 column crts.
    if (thing == that){
    pritnf ("This sucks, Dennis.");
    }
    or
    if (thing == that)
    {
    printf ("My kids can understand this.");
    }
    C is a simple langauge with not that many operators, but it requires discilpine to write code you can go back to in 6 months or a year and still tell at a glance what it's doing.

    I also do not buy the "perl has more features" argument. If you need to do something often enough you write yourself a set of routines and use them as a black box library. My "web" one is 10 yrs old. Prior to that I carried around the same one for decades and with slight modes it worked from (real) Unix to CP/M to MS-DOS. Things got a bit fuzzy around the edges with Amiga and Windows GUI code, but they did not last long in my world. My one Windows gig was my last, it was too revoting to take seriously; I'm not into masochism.

    I would encourage aybody whose written a quick Perl hack to write it again in C as much for the learning experince as for the benefit of crusty farts like me who are sick of 7 levels of dependancies. Grabbing "the needed library" seems to be a recursive loop without end and I've given up many times trying to run some perl thing and found in most cases it's easier just to write it in C, which, once you're used to it you can do very very quickly. I will grant that it take a fair amount of time to overcome the learning curve but IMO it's absolutely worth it.

    To address the original point I have no problem with APL, Forth or Poscript. While they take a day to get used to, they're simple, fun and elegant. Parl just makes me hurt all over.

    At the risk of being permanently banned fom slashhdot forever I believe 1) Linux is more popular than BSD not because it's better in any sense, but because it's easier to install, and 2) Perl, similarly so, provides an instant gratification at a penalty of readability and to some extent, performance. I prefer "short term pain for long term gain" and shortcuts are just that. My grandmother said it best: "quality is the only economy".

  16. Re:Reading Perl code? on Randal Schwartz's Perls of Wisdom · · Score: 1

    "The myth that all Perl code is unreadable is preposterous.

    Nobody claimed that in this thread.
    "

    I will. I've used C sinxe 1976 and perhaps I'm just used to it. I know three dozen computer langaugaes and prefer assembly.

    My opinion is in the gourmet world of C, Perl is nasty fast food; it may solve some short term problem but it's nasty stuff that doesn't do anybody any good long term.

    The first time I saw Java course each line made sense to me and I had a more or less instant comprehension of it. Perl just terrifies me. Each time I try to make some sense out of and modity one small part of this incomprehensible gibberish sparks fly out the back of my compter.

  17. Re:Clearly doesn't understand IT costs on Would You Pay 5 Cents For a Song? · · Score: 1

    "all of this... for $0.02 per song?!?"

    Absolutely. There exist today popular internet services where you can see the number of people currently online and some of these number in the millions of currently online active users.

    If half of them sent me a penny you wouldn't see me sitting here typing this. I hear Bora Bora is really nice this time of year.

    There's an economy of scale to very large bandwidth; "hi, I'm Apple. Wanna peer with us? Here's what it'll cost you. We'll just drop a box into your place ok?"

    Google has I think shows that for very large scale services, cost of disk space and computing infrastructure is essentially meaningless when everybody is giving you a few cents or even nothing each time they use you.

  18. Re:You can forget the "stealing tax" on Would You Pay 5 Cents For a Song? · · Score: 1

    No, kidding; the plan is sound up until the 1% tax on computers and internet services. That's dangerous lunacy.

    I'm not a big music listener; there's a small number of things I listen to on the rare occasion I listen to music. In my life I've bought some titles 5 times - 3 albums that became unplayable, 1 stolen tape and a busted CD. I've paid big for these and don't have the music I paid (dearly) for. Do I feel remorse I downloaded a replacement song (or had somebody do it I have no clue how to do this) ? No. As far as I'm concerned the record companies owe me compensation. Needless to say my 300+ records are unusable to me right now. Tapes (spit) were all stolen. I have about 75% of the CD's I ever bought since 1984 left that are still playable and not lost or stolen.

    I do DNS and web/db/cgi stuff. Charging 1% more plus the accounting and administration of any non-zero tax is utterly inappropriate although the five cent idea is, I think, brilliant. This might actually rekindle my interest in collecting music again, having been burned so terribly badly on physical media over 3 decades.

    Asking senior citizens on a fixed income who buy 2 CD's of classical music a year (I'm thinking of my parnts here) to subsidize their children and gandchildrens downloading habit that exists soley because record companies have not kept up with digital distribution is about the worst idea I've heard in ages.

  19. nah on Is Blogging Journalism? · · Score: 1

    I used to get into trade shows free by making up press credentials and once used "Roul Duke, writer for Bitter Reality Magazine, a Thompson-Hunter publication". The gate-guy at NCGA '90 didn't even blink and when I asked him if that was the weirdest one they had here today he said, "no, the writer for ``cruise ship cuisine'' is"; I picked up my badge and my 3 boxes of free conference proceesings, "A $1500 value". I was too late for the press breakfast. (I am a programmer, voss is mit morning schtuph?) I still have the badge.

    Try that by saying you write for a blog. I don't think it counts any more than saying you write for usenet, that is to say: "no".

    I have no idea what "journalism" is or how it's qualified, but IMO, bloggers aint jouranlists, they're just people that keep their diaries online.

    Maybe in ten years it will be. But the acid test now, as then still seems to be "show me your name in a print publication or a letter from your editor (which is obvioulsly easy to laserprint).

  20. Re:Got a pipe wrench? on Best Degree to Pair w/ a B.Sc. in Computer Science? · · Score: 1

    "Urban mythology also says Canada is desperate for plumbers and electricians as immigrants. They've had endless scientists, engineers and academics import themselves, none of whom are capable of doing real work."

    I live in a very rural part of Ontario. Within a 30 mile radiuns of here there's two doctors, a dentist and two plumbers. My house is ok. The MD/Dentists houses are nice. The two plumbers houses are new palatial estates.

  21. Re:Just don't read emails from the bank-Digital Fa on Phishers Build Deceptive Links with DNS Wildcards · · Score: 4, Funny

    "How do you tell bad bits of html from good bits?"

    Check the evil bit in the TCP/IP header.

  22. Re:Spoofstick on Phishers Build Deceptive Links with DNS Wildcards · · Score: 1

    That's great if your bank never has to change its IP address...

    Of if a phisher gets the banks old IP...

    In that sense it is more harmful that if it didn't exist. You're trusting the phisher, whose identity your scheme just confirmed the authenticty of.

  23. Re:Passwords should work both ways on Phishers Build Deceptive Links with DNS Wildcards · · Score: 1

    "Banks should issue their own (self-signed) certificates. When you open a bank account, you are supplied with the SHA1 and MD5 hashes of the certificate that the bank uses; the first time you visit the bank's web site, your browser throws up the "unidentified certificate" warning. You then eyeball the certificate, note that the hashes match those you have been provided with, and import the certificate into a store for future use."

    That's pretty good. I'm not sure my elderly mother is gonna grok this though. Strike that, she will, but my dad... (rolls eyes).

    "Maybe after a few thousand people get ripped off by identity thieves, people will start caring."

    It's already happened. And yet I know geeks that have been ripped off by ebay phishing scams.

    A less kind view would have it that it's a stupidity tax.

  24. Re:The ambiguities of trust on Phishers Build Deceptive Links with DNS Wildcards · · Score: 1

    " The bank verifies itself via a certificate issued by a third party (such as Verisign) that your web browser's distributor has decided to trust."

    If you knew how lax gui browsers really are with certs you'd shit yourself.

  25. Re:Fair is fair. on Canadian Government Going Big Brother? · · Score: 1

    No kidding. Don't you love the name? "Lawful access". That means if anybody but the government did this it would be illegal as hell.