Slashdot Mirror


User: Bill+Dog

Bill+Dog's activity in the archive.

Stories
0
Comments
869
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 869

  1. Re:Also green on How to Keep Your Code From Destroying You · · Score: 1

    You should probably use const's for things where the particular values of the items are important or meaningful. While the values of enumeration constants can be specified, it's not really in the spirit of enums. That is, if you have an enum Color, and constants eRed, eBlue, and eGreen, their usage should not depend on the particular numeric values the compiler or you assign to them. They should be used as the abstraction, not the underlying representation.

    So, if I really needed to iterate over all my fruit:

    enum Fruit
    {
            eBegin,
            eApple = eBegin,
            ePear,
            eOrange,
            eEnd
    };

    for ( Fruit fruit = eBegin; fruit != eEnd; fruit = static_cast< Fruit >( fruit + 1 ) )
    {
    // do something
    }

    The only time I use enums' integer values is when I on occasion use them for bit masks:

    enum FileProperties
    {
            eReadOnly = 1,
            eSystem = 2,
            eHidden = 4,
            eDirectory = 8,
            eSpecial = 16
    };

  2. Re:The whole article is -1 redundant. on How to Keep Your Code From Destroying You · · Score: 1

    ...a muppet with no patience.

    Then again, things don't go so well when muppets have patience. ;-)

  3. Re:Who wrote that article? on How to Keep Your Code From Destroying You · · Score: 1

    That's also been my experience, years ago. Replace all occurences of "VB" with "Java", and you've just described what I'm seeing these days.

  4. Re:Not too bad on Hardware Firewall On a USB Key · · Score: 1

    GP is referring to the "peripheral in front of the computer", the user, as the new last/top-most layer of the "network stack", where probably the greatest number of security vulnerabilities in network applications are based.

  5. Re:i-mate momento on A Digital Picture Frame Without the Lock-In? · · Score: 1

    4x6" landscape style is 6:4. The lowest common denominator of 6/4, 4/3, and 16/9 is 36, giving 54/36, 48/36, and 64/36, respectively. We can now see that 16/9 is 10/36 from 6/4, while 4/3 is 6/36 from 6/4. So a 4:3 screen is closer. And, mathematically at least, a better fit.

    Aesthetically, that's up to you. With, for example, a 4:3 screen that's exactly 6" wide, its height will be 4.5", calling for 0.25" tall black bars top and bottom. With, for example, a 16:9 screen that's exactly 4" tall, its width will be 7.111...", calling for 0.555..." wide black bars on each side. (For a 16:10 screen, of the same height, the bars would be 0.2" wide.)

  6. ROTFLMAO on Study Reveals What Women Want From IT Jobs · · Score: 1

    Ever wonder why there are so few women in the IT workplace? It turns out that the typical recruiters sales pitch, which emphasizing job promotion and security
    Stop it, you're killing me.
  7. Re:Please Sir, on Why Work Is Looking More Like a Video Game · · Score: 1
    Hey, yeah, executives need computer games too. I mean, they sometimes have hard days at work as well, and need something to come home to to blow off some steam. I mean besides beating up their ditzy trophy wives.

    Towards marital bliss between empty-suit control freaks and empty-headed big-boobed women everywhere, and to begin satisfying this vast untapped and heretofore unknown market, I propose as a first entry, "PHB Rampage", a first-person shooter with several modes of gameplay:
    1. Armed with a fearsome-looking bazooka-like pink-slip shooting device, you run around a maze of cubicles "right-sizing" your nemeses.
    2. You're presented with a Risk-like world map view, where you shift jobs overseas as effortlessly as drag-and-drop.
    3. Between rounds of vanquishing technical staff, the rest of the game is spent in a virtual version of the player's ideal environment -- meetings -- where unlike in real life, players possess handy devices such as a Wand of Rebuttal Suppression, allowing the player to say any stupid thing without fear of being made to look the ass that he is. Or an Amulet of Unaccountability. Oh, wait, they already possess that one in real life.
  8. Re:Yup - would you trust a developer to sell? on Why Work Is Looking More Like a Video Game · · Score: 1

    Did you really just criticize something and then defend it, all in the same post? You're apparently resentful of generalizing about executives and salespeople, and then you go and generalize about developers and technical people!

  9. quite a source on Microsoft & SanDisk To Provide Desktop on Thumb Drive · · Score: 0, Offtopic

    Jesus Christ writes
    "An Information Week article reports...


    Does Zonk have a direct line to God?

  10. Re:Backwards compatibility on The Story Behind a Windows Security Patch Recall · · Score: 1

    Threading is used in GUI's so that redraws and responding to the user can still take place while it's processing the user's last command or commands. This is how "incompetent engineers" for the Win32 and Java platforms do it, at least. What pray tell are the "far simpler approaches"?

    And how do you write a program that hosts plug-in executable code, to check whether it will hang its host, without the "unnecessary complication" of another thread of execution, either in the program itself, or in another process, watching it?

  11. Re:Backwards compatibility on The Story Behind a Windows Security Patch Recall · · Score: 2, Insightful

    Using a multi-threaded approach here, when SMP scalability is not an issue, suggests that either their API design is crap, and requires threading, or that their engineers are incompetent and use threads unnecessarily. Threads are never trivial - but what they were trying to do was quite trivial. Its their fault they involved threads in there.

    This is one of the stupidest comments I've read here in a long time. A secondary "watchdog" thread was employed to enforce a time-out on the helper program's sniffing of a given shell extension, so in case the main thread hung trial hosting a faulty shell extension, there would still be another thread of logic outside of the infinite loop that could run and tell Windows Explorer the result.

    If you knew anything about what you're trying to talk about, you'd know that multi-threading is used for these kinds of situations, as well as in GUI programming. And not just "when SMP scalability is an issue". This has nothing to so with the Win32 API design, it just was tackling a very specific problem. It doesn't mean that the Win32 API "requires threading", or that MS's engineers are incompetent, and that they used an additional thread unnecessarily here. Threads can be trivial, and this is I would say actually the most trivial case of their use. It's to their credit that they involved threads here (and might actually have been the only way), and it's to your ignorance that you don't understand any of this and got everything wrong about it.

    The flaw was in doing the WaitForSingleObject() in the DLL's detach process function without specifying a timeout value. Even if you have no reason to think that the thread won't be there to signal you eventually, sometimes the unthinkable occurs.

  12. Re:Damn.... on Buildings Could Save Energy By Spying On Workers · · Score: 1

    Or a face painted on a hand.

  13. Re:Already exists on Buildings Could Save Energy By Spying On Workers · · Score: 1

    I sometimes visit a govt. building, where the timer was brilliantly set to about 10 seconds. So if you've opted for a 44-ouncer with lunch, you'll be finishing your business at the urinal in pitch black darkness. (Of course it's not set sensitive enough to detect just frantic arm waving!)

    Maybe someday we'll have the technology to identify whether someone is going #1 or #2 (without personally identifying them), and adjust the timer accordingly, operate an exhaust fan, etc.

  14. Re:When you step back and consider history on Beginning Ruby · · Score: 1

    But like you said initially, how many different programming tools do we need? Most are already written, and more and more of any new tools will be written in the "SUV languages" themselves. E.g. the Eclipse IDE. Or e.g. Java XML or SOAP libraries, which are written in Java itself.

    Very little demand for the native-code-wrangling capable means colleges won't teach it and kids won't want to learn it, so that tail is essentially going to shrivel and fall off, as the older of its makeup retire, and those with still lots of time left in their working life, like me, switch to "SUV languages" (or go into management) to stay marketable.

    Maybe a bell curve will persist, but with everything shifted to the right, so that while the right tail was once "svelte language" skills, it will become comprised of the advanced users of "SUV languages", like people who know how to tweak their VM (using its "SUV language").

  15. Re:When you step back and consider history on Beginning Ruby · · Score: 1

    Still, I'm wondering, what is the Next Big Thing?

    I don't know, but the Next Big Thing That Really Matters will be some kind of language that brings concurrent programming to the great unwashed masses. Until then there may very well be a few more essentially redundant languages (only minor leaps in productivity, nothing major) that go in and out of vogue.

    will svelte compiled languages recover some of the mindshare lost to these SUV scripting languages?

    No. The days of compiled languages as mainstream are over -- "SUV languages", interpreted, garbage-collected, are here to stay. The programmer base is moving away from having the skills and aptitude to keep their pointers straight, and to be able to debug native code. Just like I never learned how to write large applications solely in asm, "svelte languages" are now the skills of a passing era.

  16. Re:Summary of the Corporate Attitudes on Study Finds Cost Major Factor In Outsourcing Positions · · Score: 1
    ...how is it that Toyota and Honda have profitable factories in America when Detroit is having a tough time...

    Simple:

    For U.S. workers, the prospect of a smaller Big Three and a bigger Toyota means continuing pressure on high-wage jobs with health and retirement benefits, according to Lichtenstein and Chaison. GM, Ford and Chrysler are unionized, but the United Auto Workers has been unable to organize workers at Toyota, Honda and other so-called transplants, which operate mostly in Southern states where there is little union tradition.

    The foreign companies pay comparable if slightly lower wages than the U.S. companies, but they do not have the expensive retiree health and pension benefits that General Motors says add $1,500 to the cost of each U.S.-made car. As the unionized sector of the industry shrinks, labor specialists said, the transplants will be under less pressure to pay wages comparable to those earned by union members.
    Detroit has a labor union legacy of decades of astonishing pay and bennies, Toyota and Honda do not.

    I'd consider a long look at boneheaded moves in the executive suite.

    Well, historically Detroit could afford to give in to pretty much all the union demands, no matter how opulent. But since serious foreign competition arrived, in retrospect it looks boneheaded indeed.
  17. mod parent redundant on Most Impressive Game AI? · · Score: 1

    *WHOOOSH*

  18. Re:how about redundant controls? on Death of the Button? Analog vs. Digital · · Score: 1

    Why would anyone need more than play, stop, and eject on a DVD player? How do you lose a remote?

    What I cannot live without is a VCR without all the controls on the unit as well as the remote. Oftentimes I plan on being on my computer until say 8pm when I want to watch something, but then the time rolls around and I'm engrossed in something and decide to tape it instead. Why should I need to turn my TV on (I'm not going to watch it right then), just to set the timer? So I paid a bit extra for one that could be programmed via on-screen menus or the front panel.

  19. Re:car menu on Death of the Button? Analog vs. Digital · · Score: 1

    Should be like monitor settings:

    Press menu button to display main menu. Use arrow buttons to scroll down to "Speed", and hit menu button again to select this function. Your current speed is displayed. Use the arrow buttons to increase or decrease your speed. Computer will apply gas or brakes accordingly. Hit the menu button again to go back to the main menu. Use the arrow buttons to scroll down to "Steering Angle". If it's not on that page, scroll down to "Menu cont." and hit the menu button to go to the next page. When you get to "Steering Angle", hit menu again to select. Your current steering angle is displayed. Use the arrow buttons to adjust your steering angle. Hit menu button to save these settings, then hit the exit button to close the menu. Else it will go away on its own after 10 seconds.

    Pay a little more for a car and get dedicated Speed and Steering Angle buttons that jump you right to the screen for adjusting these, for an even more responsive driving experience.

  20. music industry going with "temps" on Record Labels Struggle With the Album's Demise · · Score: 2, Insightful

    Bands used to get signed, for example, to a 3-album contract, spanning a few years. But now the music biz wants to/needs to be able to dump artists fast, so now they're switching to contracts for only a couple of songs and a ringtone. I.e. temp workers -- no commitment, no loyalty, no being able to call a company or label your "home". Because no one really wants you, for anything other than just a casual, short-term relationship. Forget "careers" in the recording industry.

  21. Re:Natural Maturation? on How to Stop the Dilbertization of IT? · · Score: 1

    So if What's needed is something genuinely new to go mainstream, for the business world, what would that look like?
    Well, I don't know, else I'd be sailing in my yacht or doing whatever rich people do, instead of posting to Slashdot. Probably definitely something that makes multi-threaded programming easier, something that brings it really in the reach of all developers. If you're old enough to have been in programming when it was just procedural languages being used, before OOP went mainstream, that was a major leap in, well, in a way, how much computer power we could harness, more easily. It enabled us to write more complex, and hence more powerful programs, and still keep it under control. The next new worthwhile language will probably enable much easier use of the 1024-core or whatever systems we have by then.
  22. Re:Reentrant? on Auto-Parallelizing Compiler From Codeplay · · Score: 1

    No, you may still have the convenience, you would just have to use:
    1) A destination container that supported "random-access" writes, to pre-allocated slots, and
    2) An overload of the foreach statement that recognized when you were going to express the body of the loop in an index-based fashion/template.
    For example:

    foreach ( index at list )
    {
            list2[ index ] = list[ index ];
    }

  23. Re:Actually... on The Blackest Material · · Score: 1

    In time-honored Slashdot tradition, I didn't read TFA, but took my cue from the headline, which may be faulty/misleading: "The Blackest Material". (Solid) black material does not transmit light, it absorbs it. The headline was not "The Clearest Material".

  24. Re:Possible uses for the military? on The Blackest Material · · Score: 2, Funny

    The rain would, if it could only see it.

  25. Re:Actually... on The Blackest Material · · Score: 2, Interesting

    By "reflects virtually no light", read "absorbs virtually all light". Hence the applicability, for example, in creating much more efficient solar panels.

    Not to mention moving us one step closer, possibly, to having a real Holodeck!