Slashdot Mirror


User: Smallpond

Smallpond's activity in the archive.

Stories
0
Comments
1,709
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,709

  1. Re:People just doesn't get it on The Scourge of Error Handling · · Score: 1

    I believe the reason for not wanting to throw exceptions unless really needed is that exceptions (and their handling) are relatively expensive and resource intensive operations. Most languages when exceptions are thrown do a lot of runtime stack analysis to, among other things, get a full stack trace. There are many research links on the interweb explaining how expensive it is in whatever language you happen to be using, but here is the first link I found: http://stackoverflow.com/questions/1282252/how-much-more-expensive-is-an-exception-than-a-return-value

    In the case of the .net runtime, throwing an exception was > 1000x as expensive as using a return value, in processing time.

    And why would anyone care? Is there a benchmark somewhere on how many errors per second your program can process? If you unplug the ethernet cable is it important to tell the user that their session is gone in 1 microsecond rather than 10?

  2. Re:Errors on The Scourge of Error Handling · · Score: 1, Insightful

    All code is just assembly language in other clothing.

  3. Re:People just doesn't get it on The Scourge of Error Handling · · Score: 1

    Exceptions should NOT be used for 'normal' errors. They should be used for events that are, well, exceptional. A healthy program should NEVER raise an exception, but may deal with a lot of error conditions.

    [citation needed]

    What is the basis of this strange belief? The non-error case should be simple and readable, not cluttered with tests for seldom-occurring errors. Putting a try-catch block around it pulls the messy error code out of it and is simpler to read and debug than inline code. Never worry about performance of error-handling code.

  4. Re:Errors on The Scourge of Error Handling · · Score: 1

    Yup. Errno has been around as long as UNIX system calls, so there are really 3 common mechanisms, not 2 as the article says.

  5. Re:And a normal locksmith will also charge on Hotel Keycard Lock Hack Gets Real In Texas · · Score: 1

    I believe you, AC. I also believe that video where the woman unlocks the car with a tennis ball.

  6. Re:Sure I will pay.... on Hotel Keycard Lock Hack Gets Real In Texas · · Score: 1

    No. They just need to specify that it only be used in areas with stupid criminals. Then its the hotel's problem for not following directions. Kind of like all electronic products say "not for use in life-support applications" so if anybody gets killed due to the part failing, they can claim it was used improperly.

  7. Re:Keyboards no, $750 RAID cards yes on Ask Slashdot: Old Technology Coexisting With New? · · Score: 1

    Everybody has different kbd likes but I still have my IBM model M. Built like a tank.

    Up in the attic somewhere is a 6802 microprocessor card (similar to the Kim-1) with a Lisp interpreter in PROM.

  8. Re:An idea... on Senators Vow To Renew Bid For State Taxes On Remote Internet Sales · · Score: 1

    Every internet business would buy server space in NH or AK with no sales tax and declare that their headquarters if it was by seller. I think it has to be on the ship-to state. A program for calculating sales tax based on street address would not be very difficult.

  9. Re:If a Medical Doctor was involved in the collect on Who Owns Your Health Data? · · Score: 1

    HIPAA rules apply to "health care providers" which is even more general. It includes doctors, nurses, EMTs and even medical device manufacturers under some circumstances.

  10. Re:1kb roguelikes on How Does a Single Line of BASIC Make an Intricate Maze? · · Score: 1

    Should we tell these people about 1KB Roguelikes which implement an entire adventure game in a single line with 1024 characters? Probably not or they'd have an orgasm.

    Conway's Life used to be popular for writing one-liners, too.

  11. Re:Without the use of a loop!? on How Does a Single Line of BASIC Make an Intricate Maze? · · Score: 1

    Heh. This will use up your whole roll of teletype paper

    10 PRINT "HELLO, WORLD"
    20 GOTO 10

  12. Re:impossible! on 3D Printing of Custom Personal Electronics Arrives · · Score: 1

    And just yesterday (and I mean yesterday), a self-proclaimed smart person was telling me that 3D printers would never be able to make anything useful.

    How about a bikini

  13. Re:Just need a 3-D printer on 3D Printing of Custom Personal Electronics Arrives · · Score: 1

    Cool. I just need to fly to Belgium.

  14. Just need a 3-D printer on 3D Printing of Custom Personal Electronics Arrives · · Score: 1

    When is my local Kinko's or Staples going to have a 3D printer where I can take my USB stick with an Autocad file?

  15. Re:Not again on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    That's why all new transit systems use cards.

  16. Re:Not again on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    The problem is that they can't make them TOO close. I think it was New Jersey that made some tokens that were the same size as New York subway tokens, which cost a lot more. This led to high sales in New Jersey and a loss of revenue in New York until they phased out tokens.

  17. Re:It worked for Canada... on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    The US has been officially metric since 1969. Compliance is of course voluntary.

  18. Re:Long been time. on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    Here's the geekiest solution for that.

  19. Re:pace on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    The second mouse gets the cheese.

  20. Re:Not again on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    I think it was the vending machine lobby that made them continue to print bills. Most won't take $1 coins.

  21. Re:Not yet... on Is It Time For the US To Ditch the Dollar Bill? · · Score: 1

    And it would be confusing to call them fifths.

  22. Re:End fiat currency! End THE FEDERAL RESERVE!!! on Is It Time For the US To Ditch the Dollar Bill? · · Score: 2

    Nothing is stopping you from buying gold.

  23. Re:Apples to oranges on The Coming Wave of In-Dash Auto System Obsolescence · · Score: 1

    Stereo is overrated.

  24. Re:And 2000 model Jaguar S type... on The Coming Wave of In-Dash Auto System Obsolescence · · Score: 2

    My grandmother drove a 60's Oldsmobile. The speedometer indicator changed from green to yellow when you hit dangerous speeds (35 mph). Of course, I never saw that when she was driving. There was a rumor that it also could change to red at even higher speeds.

  25. Re:Apples to oranges on The Coming Wave of In-Dash Auto System Obsolescence · · Score: 4, Funny

    There's a 12AU7 burned out in my radio, so I can't use it for anything right now.