Slashdot Mirror


User: chachacha

chachacha's activity in the archive.

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

Comments · 35

  1. Re:Comments on What Workplace Coding Practices Do You Use? · · Score: 4, Interesting
    But even that can be rewritten as
    const int SCREEN_WIDTH = 456;
    if (SCREEN_WIDTH == xCoordinate) { ...
    Using the constant on the left hand side of an equality test such as this will cause a compile-time error if you accidentally type
    const int SCREEN_WIDTH = 456;
    if (SCREEN_WIDTH = xCoordinate) { ...
    Come on, we've all done it. ;)
  2. Re:Comments on What Workplace Coding Practices Do You Use? · · Score: 5, Insightful
    Agreed.

    People forget that code itself is a language. And usually a much more clear and logical one than English. Requirements docs are for explaining complex business processes and code itself explains most of what is going on. That is not to say that comments are not important, but when they exist I want them to be there for a reason. Anyone reading your code is assumed to be conversive, if not fluent in the code language, so comments should explain things such as:

    • strange idioms (ie. select((select(FH), $|++)[0]); // autoflush FH)
    • reasons for non-obvious choices of algorithms (ie. // we're not using an FFT here because ...)
    • intended input/output (a "comment preamble" to a method such as generated by VisualStudio. This is extremely useful for someone following a stack trace.)
    • candidates for refactoring (ie. // this method can now be collapsed/condensed ...)
    • pitfalls that are likely to trip up an intermediate developer
    • (many other valid reasons exist)


    Comments that merely "translate" basic code language into english are at the very least useless and often harmful: they bloat the filesize, obfuscate executable lines (I have deleted blocks of apparent comments only to find that unit tests are subsequently failing - the reason? - a single line of executable was buried between 2 dozen lines of commented out code), increase the burden on the maintainer and/or reader who must sort out the important details from the quotes laid down by Capt. Obvious.
  3. Re:Misleading headline on Acetylene Based Life on Titan? · · Score: 1

    They say you are what you eat ;)

  4. Encrypted KDE Wallet Manager on Writing Down Passwords? · · Score: 1

    One of the best pieces of usability software ever.

    I use a naming scheme for all my passwords whereby a passphrase is constructed from the "name of the site"|"name of activity" a non-alpha character and a constant string that I use for every password in my life. I simply can't forget my password - it's encoded in the context of whatever activity requires it.

  5. Microsoft philosophy being handcuffed on 'Lower Rights' IE 7.0 Coming · · Score: 1

    When I ask Windows desktop users they won't try Linux instead of upgrading to the next version of Windows, they often reply that they are happy how things just "work" out of the box. Of course what they are talking about is the relatively 'trusted' state that the system defaults to. That is, they don't have to know how to enable features, the users work on the presumption that while things may be insecure and spyware may embed itself in their system, the chances that something will go wrong enough to warrant their having to 'do' something about it are relatively low. You and I know that's a cop out by someone who fears technology, but I think it's the way they really see the situation.

    It's the difference between a reactionary vs. premeditative viewpoint. It will be interesting to see how these users react when they are forced to actually take measures towards enabling certain features into their own hands, or they simply offload that burden onto their local SysAdmin.

    At that point I'll ask them to justify the licensing fees that Microsoft is charging them once more...

  6. Just rotate a 2d image. on Perspecta Walk Around 3D Display · · Score: 1
    Sorry for being dense, but can anyone explain why this is so much better than just rotating the image in 2d space to see the back end of the object? Seems like you're just introducing a whole lot of other variables that could contribute to failure, like how long will the motor that spins the thing last? That fact (coupled with the likely non-replaceability of the hardware) would lead me to think it has no business in mission critical dispay.

    Also, where would a company put such a thing? It certainly wouldn't do any good sitting on my desk - you'd have to have a dedicated 'analysis' room with this thing sitting on a little desk all by it's lonesome.

  7. Re:I agree on Vigilante Hackers use Old West Tactics for Justice · · Score: 1

    > There is a big legal difference between a crime of violence and a crime against property.

    In your opinion. What's worse - stealing $100,000 from a family's college saving's account or spanking your kid too hard for running with a gang? It's just never that cut and dry.

  8. Re:justice on Vigilante Hackers use Old West Tactics for Justice · · Score: 1

    You mean you often wich this sort of justice were legal if you were the only one carrying it out. How is this any different (except in scope) from religious zealots bombing abortion clinics? They are standing up for what they as the individual believe and taking the law into their own hands... The problem, as always, with this kind of thinking is that you invariably lose majority consensus and society decomposes into anarchy of the worst kind.

  9. Watch out for that tree! on Stanford and Volkswagen Create Autonomous Vehicle · · Score: 1

    It would be kinda' ironic if it crashed into a tall tree, then got broken into by a bear during it's journey.

  10. Google / Stanford team too? on Stanford and Volkswagen Create Autonomous Vehicle · · Score: 4, Interesting

    I was driving through campus near the Stanford Golf Course the other day and saw a robotic solar vehicle emblazoned with the Google and Stanford logos. There was a large van outfitted with all sorts of sensors and gadgets on the roof and hood. Has anyone heard of Stanford attempting to build a robotic solar-powered car too?