Slashdot Mirror


User: Surt

Surt's activity in the archive.

Stories
0
Comments
8,792
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 8,792

  1. Re:How & Whys on Successful Strategies for Commenting Your Code · · Score: 1

    There's a corollary to this that says:

    If you write code where the how is tricky, comment it very clearly.

  2. disagreed on a number of points on Successful Strategies for Commenting Your Code · · Score: 1

    Since I can't post on his site, here are a few interesting ones:

    I'll throw in some disagreement about a couple of things. Code commenting has one purpose: to communicate to a developer at some time in the future how some code works, so that he can adapt/fix it. There is also interface documentation (ie javadoc) but I consider that an essentially solved and separate issue.

    Hungarian notation is bad because it discourages descriptive naming. By forcing you to add extra characters to a name indicating type, you decrease the likelyhood that you'll use a long descriptive name, and you don't add any information: type information is already available in the variable declaration. Worse, if you do change types, and don't change the variable signature, then you're potentially introducing misleading information.

    Likewise, end of function tags are bad because they can be misleading, and they don't add information that is not available from brace structure (and in any reasonable modern editor, you can easily reformat all text to correct brace indentation).

    Similarly, excessive inline commenting can lead to readability problems: if you have too many comments, how do you tell when the author is trying to communicate something important? For example I consider: // Continue original attack if still alive
            if(isAlive) {
                    isAlive = attacker.attack(defender);
            }

    A bad comment. It's essentially documenting the usage of the if conditional. The if conditional is self explicit. If there is something interesting about the logic of doing this, perhaps it ought to be code explicit instead:

            if(isAlive) {
                    isAlive = attacker.continueAttack(defender);
            }

    Also, for your header comments, you'd be very smart to adopt javadoc compatibility, even for c/c++ code. There are lots of tools that make that a smart move.

  3. Re:Don't let the state nany, take some responsibil on Senator Carper Calls for Tax on Online Porn · · Score: 3, Interesting

    There's actually little evidence to support that position. All evidence seems to suggest that people who have 'poorer' social outcomes are more likely to have children. Look at the number of children those living in poverty in this country have, versus the number of children the average phd has.

  4. Re:Oh dear... on 'Design Patterns' Receives ACM SIGPLAN Award · · Score: 0, Flamebait

    CS snobs just get worked up easily since 9 out of 10 computer related jobs are for engineers rather than CS snobs. In my opinion, really, you should want to learn enough to know both, and to know that no matter how much you read, you'll know less than 1% of what there is to know about computers.

  5. Re:Assembly is not slower.... on Choice of Language for Large-Scale Web Apps? · · Score: 1

    That's pretty much my point exactly though ... those who are both knowledgeable and good at assembly are few and far between. It would be a challenge to hire enough well skilled assembly programmers to write a whole application that would outperform the c version.

  6. Re:Compiler on Choice of Language for Large-Scale Web Apps? · · Score: 1

    That doesn't sound much like mainstream web backend development to me. Most of that work is done on one well known architecture.

    I'm sure there are many platforms for which no compiler whatsoever is available, and I'm guessing people outperform the compiler on those too.

  7. Re:Not all true (imo) on Choice of Language for Large-Scale Web Apps? · · Score: 1

    I think the biggest advantage to IDEA is the amount of stuff you can automate. Between the macros/refactoring/intellisense type stuff, there's a significant productivity gap vs eclipse. Eclipse can do a lot of the same things, but not as fast, and what I want in an IDE is something that will help me churn out code faster. I think about things pretty quickly and when I go to code them I'm looking for a tool that will help me produce what i'm thinking about very quickly. vc/eclipse are better than notepad for that reason, but don't measure up to the speed you can get out of idea. I can't think of a specific feature that I think particularly wins in idea, it's just that everything works together just that much better. And in fairness to eclipse, i've not yet tried out 3.1 to see how much they've caught up yet. I'll probably have to evaluate 3.1 vs idea 5 later this year.

  8. Re:Java Java Java! on Choice of Language for Large-Scale Web Apps? · · Score: 1

    Well, out optimizing gcc isn't hard, but try out optimizing the intel compiler, which is what anyone who cares enough about performance is using.

  9. Re:Java Java Java! on Choice of Language for Large-Scale Web Apps? · · Score: 2, Insightful

    The problem is, if you're 'just' writing sse/sse2 etc, you're missing out on potential parallelism. You want to deliver some of your work to the sse, some to the main adders, etc. I've done some of this, and it is fairly complicated work. Again ... I think this is sufficiently complicated that trying to find well qualified people to do it is going to be pretty challenging. And we started out with the premise that we were writing a whole program in assembler, rather than say just optimizing in a narrow area, where you can probably afford to try a large number of different possibilities and actually benchmark the different options to prove whether or not you've succeeded.

  10. Re:Hmmmm on Choice of Language for Large-Scale Web Apps? · · Score: 1

    We use a lot of english where I work, but the main problem is that we have to hire so many expensive people just to get the darn thing to compile. Those MWM people really need to work on their toolset.

  11. Re:Java Java Java! on Choice of Language for Large-Scale Web Apps? · · Score: 1

    I hope it didn't take a week to master assembler back then. It wasn't all that complicated. More like going from a couple of days to 7-8 years to really master assembler work today.

  12. Re:Cisco is not a business of social activism. on Shareholders Squeeze Cisco on Human Rights · · Score: 1

    Tell that to the companies which have lost billions due to being held accountable for among other things: cigarette sales and helping the nazis kill jews. Maximizing shareholder value doesn't mean only making as much profit as possible, but also being careful to avoid the possibility of lawsuits rendering those profits moot in the long term. Violating human rights is a good way to get yourself sued in the long term. In this case, potentially by a class action lawsuit involving over a billion chinese.

  13. Re:Not all true (imo) on Choice of Language for Large-Scale Web Apps? · · Score: 1

    I've use vs, eclipse, idea for over a year each. I think eclipse is a bit ahead of vs. It maybe depends on what features are most important to you. VS has some nice team stuff going for it, while eclipse to me seems better from the individual developer perspective (which is more important to me). But it certainly could be a toss up. IDEA, though, is definitely a step ahead of both.

  14. Re:Java Java Java! on Choice of Language for Large-Scale Web Apps? · · Score: 4, Insightful

    Actually, if your hand written assembly doesn't look like compiler generated assembly, you're probably missing out on things like multi-functional unit parallel scheduling etc. The number of people who can code in a way that will feed instructions to a modern cpu successfully is very small.

    Writing efficient assembly code today is at least 3 or 4 orders of magnitude harder work than it was in the 60s or 70s, and there are far fewer experts available to hire today than there were back then. There are maybe 3 or 4 major computer game developers still doing hand assembly optimization these days, and those guys would be extremely hard to hire away from their current jobs. Most games are just developed in c, and are bound by the performance on the video card anyway, so that optimization on the CPU just isn't that important any more.

  15. Re:Java Java Java! on Choice of Language for Large-Scale Web Apps? · · Score: 1

    What you're talking about is much more front end development. Java is not well suited to that task. For back end database apps, it's hard to get php to scale to hundreds much less thousands of threads. It's in this area where J2EE is the dominant platform, and where factors like group development capabilities become really important.

  16. Re:Java Java Java! on Choice of Language for Large-Scale Web Apps? · · Score: 4, Insightful

    Actually, odds are that hand written assembly will underperform compiled c these days. Hiring or training people that can write better assembler than a modern compiler is very very difficult.

    But for web development, Java is generally the right choice for the backend. Lots of competent people available who will require no learning curve. The support tools available for java on the backend are also clearly the best right now, as you pointed out (hibernate etc.). The tools for working in java are also a step ahead of anything else right now (idea and even its slightly retarded younger brother eclipse are both way ahead of the tools for any other language).

  17. Re:When can I move there? on Ice Lake on Mars · · Score: 1

    People can live on mars right now. It's just a challenge to get there. Of course you probably wouldn't live very long, but in geologic terms, you won't live very long here either.

    To live a happy life on mars will be centuries from now, barring major surprises in technology. Given a major surprise in technology, it could be next week.

  18. Re:Colonies? on Ice Lake on Mars · · Score: 1

    Not in the long term, no. In the short term, they were already possible before this discovery. In the medium term, this might make it somewhat easier.

  19. Re:contract enforced... on Ex-Microsoft Exec Barred From Google Job · · Score: 1

    Not all contracts are legally binding. Try selling yourself into slavery by contract.

  20. Re:Republicans sponsored the bill & you blame on Hillary, GTA, and High School Football · · Score: 1

    If you know a girl well enough to know that she knows that poem by heart, you're way outside the slashdot mainstream.

  21. Re:Water on Intel On A Building Spree · · Score: 1

    The key is to remember not to give away water for free. Then no matter how much a plant like this uses, you can always go buy more from another source.

  22. Re:Uh huh on Intel On A Building Spree · · Score: 1

    By definition!

  23. Re:Very Nice Article on Hillary, GTA, and High School Football · · Score: 2, Informative

    It was rated mature, not adult. The difference is 17 vs 18 years old, and being stocked in thousands of stores (walmart won't stock adult rated titles). If it had been rated adult, the sales would probably have been lower by half or worse, which is why everyone works so hard to go no higher than mature.

  24. Re:Very Nice Article on Hillary, GTA, and High School Football · · Score: 1

    You're thinking of the cathartic effect, which has pretty much been disproven in the psych literature.

    See
    http://scholar.google.com/url?sa=U&q=http://gip.un iovi.es/docume/pro_vs/liter_emp_vv.pdf

    for a good review of the subject overall, including references to the cathartic effect and aggression.

  25. Re:How about parts? on Possession of Cantenna Now Illegal? · · Score: 2, Interesting

    It becomes illegal magically when used in the commission of a crime. The same way a kitchen knife becomes possession of a deadly weapon as a lesser included offense after you stab someone with it.