Slashdot Mirror


User: raymorris

raymorris's activity in the archive.

Stories
0
Comments
10,114
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 10,114

  1. parallelism, for one. Normally a queue. Large data on AP Test's Recursion Examples: An Exercise In Awkwardness · · Score: 1

    >. Why the FUCK would you ever want to keep an explicit stack? Did your language implementers have brain worms? Stack and Heap are the same, it's just RAM

    Granted if you're doing it explicitly you'll more likely use a queue than a stack. But not necessarily. For example, you might process all children in parallel if you're working on a GPU or cluster. The parallelization library will then need an explicit stack.

    Note to "it's just RAM" isn't always true. If you're crawling the web, your list of links to be visited will be in a database, not in RAM.

  2. not quite. ntfs, SOME apis to 32,768. Others 260 on AP Test's Recursion Examples: An Exercise In Awkwardness · · Score: 1

    Not quite. The UNICODE APIs and NTFS support up to 32,768. Other APIs are still limited to 260 at least as of Windows 7. Explorer can't handle larger than 260, or at least recently couldn't. So long as the older APIs remain, the maximum safe length is 260. Longer paths may work sometimes, but behavior is undefined in general.

  3. Windows MAX_PATH, Linux PATH_MAX on AP Test's Recursion Examples: An Exercise In Awkwardness · · Score: 1

    Windows defines MAX_PATH as 0x00000104 I'm sure someone will correct me if I'm remembering incorrectly.

  4. depends, symlinks are a file on AP Test's Recursion Examples: An Exercise In Awkwardness · · Score: 1

    You should of course decide how to handle symlinks. In most cases I've come across, a symlink is just a file - not something to be followed. Rsync's default behavior is an example of this - it by defaults copies the symlink, rather than recursing into wherever the symlink points. As I recall, tar is the same.

    You need to handle symlinks and perhaps bind mounts based of application requirements.

  5. except on Windows, Mac, Linux and FreeBSD on AP Test's Recursion Examples: An Exercise In Awkwardness · · Score: 2, Informative

    > You never know how deep a directory goes.

    On Windows, no more than 130. MAX_PATH is 260, so if directory names are single characters you can have up to 130 of a\b\c\

    On Linux, MAX_PATH is typically 4096, so directories can be 2048 deep.

    If you're using 16 bytes per level, you know your program won't use more than 16X2048 = 32KB. A maximum 32KB of RAM usage is acceptable on any system running any of the major operating systems.

    It wouldn't hurt to check PATH_MAX just to be sure, or put in your own recursion limit of 2048.

  6. directory recursion simple example of WHY and how on AP Test's Recursion Examples: An Exercise In Awkwardness · · Score: 4, Insightful

    Recursing a directory/folder structure would be a much better example of not only HOW to use recursion, but when and why it actually makes sense.

    TFS asks "do you use recursion?". When it makes sense, such a directory or category tree. That is, when the problem is inherently recursive. It's also good to know that all recursive algorithms can be trivially converted to iterative versions with an explicit stack or queue. This is useful for something that could recourse deeply, like following links to spider the web.

  7. let me put it this way on NASA Looking At Nuclear Thermal Rockets To Explore the Solar System · · Score: 1

    Let me put it this way for you.

    Suppose Puke Skyrunner is walking around the starship. He walks over to a rocket-powered X-wing that's parked inside the starship. At what velocity can the X-wing fly away from the starship?

    Here's one answer that's clearly wrong:
    It depends which planet the X-wing was built on.

    That's clearly wrong, agreed? Yet that's actually what you're claiming, as I'll explain.

    Let's have a look at this:
    Suppose that the maximum speed of the X-wing per the gas velocity is Z.
    Skyrunner can fly out and fly away from the starship at Z, right?

    Suppose the starship happens to be flying past earth at 0.8*Z.
    Skyrunner flys the X-wing out of the starship at Z, so people on earth see the X-wing as going 1.8Z.

    Still identical physics:
    Skyrunner fly's the X-wing bdrom earth to the starship, which is still passing earth at 0.8Z.
    The X-wing catches up to the starship and parks inside.
    Two years later, Puke Skyrunner gets in the X-wing.
    Clearly, the velocity Puke can fly doesn't have anything at all to do with the velocity the craft had flown 2 years ago. Rather, it's governed by the exhaust gas velocity.
    Agreed?

    Maybe he can still fly away from the starship at Z?

    The physics of this scenario are identical:
    The X-wing flies from earth to the starship, at 0.8Z
    The X-wing parks NEXT to the starship, rather than IN the starship.
    Puke Skyrunner reaches out the window and touches the starship, then flies away.
    Clearly, the max speed at which he can fly away doesn't depend on how long he spends at the starship.
    Whether he spends 2 years living in the starship, or 2 seconds touching the starship, he can fly away at Z.

    Note that Z (relative to the starship) is still 1.8Z relative to earth. So people on earth still see the X-wing as traveling 1.8Z.

    Still identical physics:
    Skyrunner catches up to the starship, which is going 0.8Z, but doesn't touch it.
    Skyrunner flies away. Still the people in the starship see him fly away at Z.
    People on earth still see that as 1.8Z, nothing has changed.

    Still identical:
    Skyrunner goes 0.8Z to catch up to a starship that he's only imagining, that doesn't exist.
    Skyrunner flies away. Still at Z.
    People on earth still see that as 1.8Z, nothing has changed.

    Still identical:
    Skyrunner doesn't imagine a starship.
    He flies away at Z.
    People on earth still see that as 1.8Z, nothing has changed.

    Why? Because he can always accelerate up to the velocity that the gas is leaving the NOZZLE. The key number is the velocity of the gas AS MEASURED FROM INSIDE THE ROCKET. Whether or not earth happens to be going by at a million miles per hour doesn't matter.

  8. V is relative to the rocket, not an arbitrary plan on NASA Looking At Nuclear Thermal Rockets To Explore the Solar System · · Score: 1

    You may be doing the arithmetic right, but you're starting with the wrong value of V. V is the velocity of the exhaust gas relative to the rocket, not relative to some arbitrarily chosen planet, such as earth.

  9. correct, bulletproof visor would weigh several pou on Swatting 19-Year-Old Arrested in Las Vegas · · Score: 4, Informative

    >. Perhaps I underestimate the power of the average handgun. As for the face, are there no effective bulletproof visors?

    Remember the tip of the bullet is around 2mm or so. Imagine you have a stout nail. You place the nail against a piece of glass and hit it with a hammer, hard. You want glass thick enough to take that without breaking. There's not all that much POWER involved, but it's concentrated in a small area.

    Bullet-resistant Lexan is something like two inches thick, so not only is it heavy but it a curved piece would refract quite a bit. Think "coke bottle glasses" times ten. So you've got a flat piece of material hanging off your face blocking your peripheral vision and it weighs as maybe half as much as a gallon of milk. That's not I what I want to wear in a fight.

    The thing about guns and power levels is that to do their job they have to RELIABLY go through a leather jacket, the clothes underneath, three inches of fat and muscle, then somehow do enough damage to stop someone within seconds. That means that they MIGHT go through all kinds of things and still do enough damage that you die eventually.

  10. good point, mentioned in my other post on How To Hack a BMW: Details On the Security Flaw That Affected 2.2 Million Cars · · Score: 1

    That's a good point, and one that I mentioned in my post which appears just above yours, but not my GP post.

    Depending on the complexity of the project, budget, and impact, it sometimes make sense to engage the expert at three points:
    Early planning (might be a conference call)
    Late planning (to validate the design/architecture prior to much coding)
    Pre-release (to check for any oversights in the actual coding)

  11. interesting experiment on Employees In Swedish Office Complex Volunteer For RFID Implants For Access · · Score: 1

    Since "there are plenty if times", it might be an interesting experiment to touch your work keyfob to the door of your house as you leave each day. Once the habit is engrained, you may never leave the house without your fob again.

  12. s/they're/their/ s/principals/principles/ on The Man Who Invented the Science Fiction Paperback · · Score: 1

    I should use the preview button, or pay attention to what autocorrect is doing.

  13. no, HE thinks/sells that it's broken. Polls and al on The Man Who Invented the Science Fiction Paperback · · Score: 1

    >. And anyways, you're implying the system is broken, otherwise why rebuild it?

    No, Obama said that, so HE thinks, or rather sells, the idea that America is fundamentally broken. What he, Mitt Romney, or Rick Perry actually believes is anyone's guess; they're speeches are driven by polls, not principals.

    On the other hand, Bush Jr would tell you exactly what he thought - no matter how stupid it was. I imagine his PR people were face-palming daily. Then you have Chris Christie, whose PR people are probably all dead from heart attacks now because he sure says whatever the heck he thinks. Which happens to be less stupid than what Bush Jr thought.

  14. "rebuild America's economy, rebuild America period on The Man Who Invented the Science Fiction Paperback · · Score: 1

    >. And over turning our entire economic system is such a popular dream

    It got president elected to two terms.
    "If we're going to rebuild America's economy, then we've got to rebuild America, period" - Barack Obama

    To rebuild something - a carburetor, a car, or a house, you first have to tear it apart, so Obama's done half the job.

  15. exactly, and consulting can be only ~$1,000 IF on How To Hack a BMW: Details On the Security Flaw That Affected 2.2 Million Cars · · Score: 2

    Agreed, 100%. Further, IF you know what to look for when choosing your expert, rather than hiring them through three levels of middlemen, for a relatively small project you can pay him $500 to have a phone call early in the design phase and show up at a later planning meeting to review the design, then $500 more to review the final code and make adjustments that are minor to do, but have major impact. Of course you can also pay HP $10,000 to send him out. HP will pay TCML $3,000, and TCML will pay the expert who does the work $1,200. Guess how I know THIS. Hint - I didn't read it somewhere.

    Also, security isn't just about not getting hacked. Secure systems are systems that continue to operate correctly, even when someone is TRYING to break them. Therefore, the suggestions your security expert makes will improve the reliability of your system in the face of other potential issues, like a flaky cell signal. Making a system keep working even when someone is trying to make it fail means the system is more robust under other circumstances as well.

  16. nods head in approval on The Man Who Invented the Science Fiction Paperback · · Score: 1

    > Sci-fi nerds think they'll ride on a spaceship and live on Mars, and we all sincerely nod our heads in approval.

    > I dream about the leisure society with basic income and healthcare for all

    Nodding my head in approval.

  17. ps more than 20 years experience, still screw up on How To Hack a BMW: Details On the Security Flaw That Affected 2.2 Million Cars · · Score: 2

    PS, though I've been focused on computer security for twenty years, and before that worked as a locksmith and a private investigator, I STILL make mistakes. I STILL looks and things I've done and say "well that was dumb". I'm still learning, even still taking formal classes while I also serve as an expert consultant for build new courses in security.

    My IQ tested as - let's just say "well above average" - so if it were easy you'd think I would have figured it out by now.

  18. touch it to the door on the way out (3rd grade) on Employees In Swedish Office Complex Volunteer For RFID Implants For Access · · Score: 1

    If you're the forgetful type, whatever is critical that you must bring to work, touch it to the door of your house as you leave. It quickly becomes habit - close door, touch badge, lock door, open car. After doing that for ten days straight, it'll become rather difficult to forget.

    This method can be taught to 3rd graders.

  19. they used encryption, hmacs, thought they knew on How To Hack a BMW: Details On the Security Flaw That Affected 2.2 Million Cars · · Score: 5, Informative

    >. Not making complete fucking moron decisions about security is easy, if you hire someone vaguely competent. BMW decided to skip that step to save a few bucks to ensure nice corporate bonuses, and customers suffered.

    Their developers encrypted the relevant text messages and used hmac to ensure their authenticity, so they thought it was reasonably secure. It's not that they were INCOMPETENT developers, the issue that none of them were security experts. Because true security, security that can't be broken fairly easily by an expert who then publishes a tool for script kiddies to use, IS hard. BMW's programmers did as much as I'd expect any application programmer to do. It's then time for the security audit, by a truly qualified security person, to catch the kinds of mistakes that the author caught. I work with some very good programmers. Some of them are really good at UI design, some are good at managing large projects, some are very versatile. It's a really good team of professional programmers. I catch security errors they make all the time because I'm the security guy. On the other hand, they have to fix my GUIs to look nice because I'm not good at designing attractive GUIs.

  20. lanyard, motherfuckers, just wear a lanyard on Employees In Swedish Office Complex Volunteer For RFID Implants For Access · · Score: 2

    This has roughly zero advantage over clipping your ID card (with RFID) to a lanyard you wear at work. I'll leave it to my fellow Slashdotters to list all the disadvantages. So this is just plain stupid and pointless, along with all of the other adjectives others will post.

    I know the new "progressive" thing is that we're all interchangeable cells of out defined group, you're "a black" or "a white" or "the rich" or "the poor", but for myself I like a little personal privacy and individual dignity.

  21. Obama: Christians did it 1,000 years ago, Ferguson on Does Showing a Horrific Video Serve a Legitimate Journalistic Purpose? · · Score: 0, Troll

    Have a look at Obama's press conferences in the last month or so, up until this latest video. He consistently made two main points:

    1. During the crusades, some Christians did violent things, so the Islamic State doesn't have anything to do with Islam. (?!?!?)

    2. Intolerance, like Ferguson and ISIS, is bad.

    Basically, he tried to imply that these terrorists raping kids are pretty much the same as your local PD, and that the proper response is more tolerance. He said "intolerance" a lot, rarely if ever "terrorism" or "radical Islam".

    After the latest video, that position which the president tried to advance rings rather hollow, and indeed cowardly.

  22. Koch might hire you with the new money on GPG Programmer Werner Koch Is Running Out of Money · · Score: 1

    Take another look, knowing that Koch now has funds to pay a decent writer.

  23. Boost Mobile international roaming options page on Verizon Dropping Data Rates, But Current Customers Have To Call · · Score: 1

    You seem to be misinformed. I haven't had any trouble in the 10 years or so I've had Boost, and their web page confirms it:

    http://www.boostmobile.com/sho...

    So now that you know the salesman lied to you and you're paying extra for nothing, are you done wasting your money? Perhaps it's worth it to you to keep paying the extra $40 / month so you can pretend you were right. No skin off my nose either way.

  24. wow $10 less than I pay in the US on Verizon Dropping Data Rates, But Current Customers Have To Call · · Score: 1

    Wow, that's $10 less than I pay in the US. (Sprint network via their Boost Mobile brand).

    If you're paying twice as much for the same service under the Sprint brand, it may be because you effectively choose to get a 30% interest loan to buy an $800 phone, rather the $129 quad-core you could afford without borrowing from Sprint at ridiculous interest rates.

  25. if the national system were sane, yes. Each insura on US Health Insurer Anthem Suffers Massive Data Breach · · Score: 1

    It would be possible to architect a reasonably sane national system, yes. I was speaking from the point of view of one insurance company. They have to provide the various agencies that administer ACA the access that the agencies demand. They can't force HHS or IRS to to use the security hardware that the insurance company a selects.

    Even with a sane national system, a hospital should be able to query certain information from the insurers. That actually means each low-level hospital employee handling claims can query the data. When the hospital employee clicks on Britney spearssextape.mpg.pif ...