Slashdot Mirror


User: rjstanford

rjstanford's activity in the archive.

Stories
0
Comments
2,632
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,632

  1. Re:Date & intials in comment on How to Write Comments · · Score: 1

    Have you ever worked on a large, legacy project when something suddenly starts going wrong? Don't you love spotting a line of code in the offending module with last week's date? Don't you appreciate having a chat with the perpetrator?

    Oh, gosh yes. Its wonderful in isolation. However, for many years I was the tech lead for a good sized enterprise package - 3+ million LOC, and I'd guess 500+ man-years of development over 15 calendar-years. There were people who extoled that format of comment there, as well, except that who the fuck cares that JGQ (whoever that was, he left a decade ago) modified a line of code seven years ago?

    Now think about the number of times important files would have been changed (hint: thousands over a decade and a half) and add 2-3 "# JTW 02/21/87 Start cd mod 582J7" (and the matching end line - most of the time) type lines to it. Its a cute idea, but its totally non-scalable.

    The one place where it does make sense, IMO, is if you plan on taking a complex software package and making a very few customizations to it. Even then you're not saving a whole lot of time vs. digging into your source-code-control-system, but I can see the utility especially if you have relatively unskilled developers working on the project. But that's about it.

  2. Re:Check out Rob Pike's thoughts on code commentin on How to Write Comments · · Score: 1

    There's a convention in C code, especially old C code, to make your function names as concise and non-literal as possible, that is a flaw (not in the language, but in the culture) and should be avoided. setWindowString is a much better name than waddstr.

    Actually, it is a flaw in the language - or at least it was. For some time, there was no requirement for C compilers to treat anything more than the first n bytes of the function name as significant. At first I think it was platform-dependent, then "at least 8", and it grew over time. If you tried to have setWindowString and setWindowOnFire both, you could have a namespace collision. This influnced the standard libraries extensively, which in turn influenced most other C code for many years.

  3. Re:Q. Why should you never play hockey with a lepe on First Face Transplant · · Score: 1

    A. They always win the face-off!

    (I did try to put "(ice-)" before "hockey" in the title, but the damn' character limit got me...)


    Well, ice- sure beats tonsil- given the circumstances.

  4. Re:I'm confused.. on First Face Transplant · · Score: 1

    Grandparent: "I am a psychologist, I chair an ethics committtee..."

    Parent: "I took a Bioethics course my senior year,"

    While your comments may be well-founded, and you provide an amusing anecdote (with no regard as to its prevelance), you've got to admit that at first blush y'all don't have quite the same standing :)

  5. Re:Comment Judiciously on How to Write Comments · · Score: 1

    In the vast majority of circumstances, the only effect that a comment can have is detrimental. That is, it is wrong, saying one thing when the code does another. That situation is V Bad.

    And 87% of the time, if the code doesn't match the comment, they're both wrong.

  6. Re:The why not the how on How to Write Comments · · Score: 5, Informative

    Sorry, but you happened to hit on one of my pet-peeves with non-self-descriptive code. I do agree with your suggestions, mind you, but I see it all the time: functions describing how they work, not what they do. Sorry to pick on you, but in this case why not take:

    public bool CheckSmsValue(Account smsAccount)
    {

    And instead say:

    public bool isSmsValueAccurate(Account smsAccount)
    {

    That way, anyone who glances at the call will know what the function does. In fact, the first one could be checking for existance, non-existance, accuracy, threshold, who knows? Heck, its exactly the kind of function that I could see being called in many different places by people expecting it to be checking different things. Or coder1 adds it in expecting it to check for "positive" as well as whatever else, months later coder2 realizes that it doesn't and adds the "extra check" into it - its a check function, after all, right? And then coder3's code in some far-away place suddenly starts failing because he didn't want that check in the function.

    A good name should be an implict contract. The function above should, by that definition, return "true" if it did at least "check" the SmsValue, and "false" if it didn't bother to... not quite what the original intent was. Probably.

    Phew. Sorry for the long-windedness.

  7. Re:Make EVERYTHING Pay Per View on FCC Report Supports a la Carte TV Pricing · · Score: 1

    Wouldn't YOU pay extra for for Celebrity Fear Factor xTreme reruns where they eat rotten horse balls?

    Hmm. Possibly, depending on the celebrity, if I could do it anonymously :) Except that I'd miss it and hear about it 4 days later, just like now, and soon not even bother to think about watching it. Just like now.

  8. Re:Infrant on The Yellow Machine in Review · · Score: 4, Funny

    It's also nice to buy the machine with no drives and upgrade that when you can afford it.

    Wouldn't it be smarter to wait until you could afford both the machine and, oh, at least one drive?

  9. Re:Thermodynamics trumps Genes any day on Born with Couch Potato Genes? · · Score: 1

    I don't see what percieved normality has to do with it. It's obvious by looking in a mirror if you have any extraneous fat.

    To you, sure. To me, these days, yes. To a lot of people, no. Folk really do believe that they're "5 lbs overweight," when they're more like 50. I've seen it happen. Heck, I've lived it. Going back to the grandparent poster, who from his use of quotation marks obviously thinks that a 36" waist and 200lb weight is normal:

    At 6' and 200lbs., I am "overweight" according to BMI charts, but with a 44" chest and a 36" waist, I certainly don't have a belly to speak of,

    Again, many many people don't have enough of a reference point to make it "obvious." Now, I don't know the guy I just quoted - he may be in great shape. Chances are, probably not, and he's probably carrying more weight than he realizes. Like I said, I felt exactly the same way that he did about halfway through my 75lb weight loss. In fact, there were many points when I thought I had "5, maybe 10," lbs to lose. That's where numbers like BMI can help, if we're willing to give them a chance.

  10. Re:Same genes as before on Born with Couch Potato Genes? · · Score: 1

    No, the average weight of adult males in this country is up 25-30 pounds since the '50s. That's what I'm talking about. Its a sad but true commentary on our times, along with practices like "vanity sizing" (ie: a 'size 10' dress today is bigger than a 'size 10' dress was, by several inches). And yet we're even increasing the most common sizes. Shudder...

  11. Re:Thermodynamics trumps Genes any day on Born with Couch Potato Genes? · · Score: 1

    Back to the BMI, I think it's worthless for an individual. It's useful if you're trying to get data over a large population. But the BMI is just a ratio of height and weight - you can do this mentally by just looking in the mirror, which also has more information than a simple ratio.

    I wish I could agree with you here - and in principal I do. However, I believe that by far the majority of people in the US (less so in other countries) overestimate their condition. Looking in the mirror is a great way of comparing yourself to what is "normal," not what is "healthy." If, as most surveys say, there are (remembering, probably wrong) ~30% obese people and around 40% "just" overweight in this country, then you can easily be in "better than average" shape and still overweight. That's where things like BMI come in. And no, I'm not saying that you should apply it to bodybuilders, pro-atheletes, etc ... but those people really don't need it. If you're not working out 5+ hours a week, its probably a reasonable number at least to start with, and using it helps to avoid the original post comment about 20% bodyfat and a 36" waist as great. I agree that eyeballing bodyfat is inaccurate, but I'd offer a theory that 8/10 people would underestimate it rather than overestimating it. Something to consider.

  12. Re:correct me if i'm wrong........ on Born with Couch Potato Genes? · · Score: 1

    I have no credible source beyond talking with a friend of mine, but he said that big people were the most likely to survive a nuclear strike. I don't know if its from radiation insulation, cold insulation, more efficient metabolism or whatever. But he was pretty certain that the bigger the better in that situation.

    Interesting. My completely unscientific and unresearched first thought though was that even if there was a 100% difference, we'd be talking about survival probabilities of .00001 vs. .00002. Although if fat would absorb just enough radiation, you'd probably have to be very careful never to lose weight (at least naturally - lipo might work, although cosmetic surgery facilities would likely be pretty scarce).

  13. Re:Thermodynamics trumps Genes any day on Born with Couch Potato Genes? · · Score: 2, Interesting

    I would agree that its not as useful for anyone who does a lot of strength training. Generally, though, I think that the vast majority of people are well-served by it. If you work out all the time, have very little body fat, etc, then its not for you. The GP was talking about being "fit" with 20% bodyfat and a 36 inch waist...

    I think that one issue is that rather than being "fit" we think of ourselves as "normal." 20% bodyfat is probably below-normal in this country for an adult male ... but its not exactly ideal. Heck, even with a 32" waist I have a hard time finding pants in some stores (seriously) - they're usually 36-40. A quick visit to most overseas countries, even somewhere stereotypically overweight like Germany, will show you just how skewed our standards have become. FWIW, clothing stores over there generally started about a 28" waist in the adult section...

  14. Re:correct me if i'm wrong........ on Born with Couch Potato Genes? · · Score: 1

    OK, lets get that athletic person in the middle of an ice age with little food and a big person and see who lasts longer.

    Hmm. One fit, athletic, strong person... and one large local source of calories who isn't in terribly good shape and probably wouldn't be able to defend themselves as well. What was that you were saying about "little food?"

  15. Same genes as before on Born with Couch Potato Genes? · · Score: 2, Insightful

    Americans are disgustingly obese (as a group). This isn't true of all the others who live in rich modern societies. E.g. Japan, Germany, Switzerland, Liechtenstein, Austria. I don't think Americans are the fattest: rich Africans and Arabs tend to be terribly fat.

    Some suspect America has more "fat genes" because the people who left for the New World starved through more famines than the more prosperous folks who stayed in the Old World.


    We weren't fat in the '50s. Not like we are today. Have we all experienced some massive genetic mutation in the last 50 years? Or could it be a lifestyle change instead? Hmm?

  16. Re:Thermodynamics trumps Genes any day on Born with Couch Potato Genes? · · Score: 2

    At 6' and 200lbs., I am "overweight" according to BMI charts, but with a 44" chest and a 36" waist, I certainly don't have a belly to speak of, and my arms and legs are pretty solidly muscled, with perhaps 20% body fat. Is it remotely possible that "over-weight" is not something that can be determined by two or three factors alone?

    You know, I used to think this too, when I hit 200. I had been up around 240 with a 38" waist, and 200 felt really good. Maybe a couple extra pounds, but surely not overweight, right? I could have easily written your above post at that time.

    Well, now I'm still 6' tall (as you mentioned also), but I weigh 165. I'm fitter, stonger, and I have a 32" waist, something I thought was "impossible," even "unrealistic," for me to ever have again. I've got a little excess fat - no six-pack abs here - but I'm in much better condition and, maybe not so coincidentally, right in the middle of the BMI "healthy weight" scale.

    So... while you may not think you're overweight, take it from someone who was in exactly your position a couple of years ago, you might be surprised.

  17. More to the point on Born with Couch Potato Genes? · · Score: 2, Insightful

    The best summary I ever heard of the whole, "Genetics make me fat," argument, is this one:

    We have the same genes, by and large, that we had 50 years ago.

    This rapid rise in obesity is very, very recent. Yes, change can be difficult, but its not that difficult - this coming from someone who lost 80lbs and went from a couch potato to a long distance runner the "easy" way, by eating less and doing more. No pills/shakes/meetings, just good ol' fashioned exercise. Heck, I don't even eat terribly healthily - just less than I did before. Try it, it works.

  18. Re:Significant energy savings from point of heatin on Company Develops Microwave-powered Water Heater · · Score: 1

    I've always liked the pointsource water heaters and, in fact, in the next house we build I'm planning on doing inline ones just as you described. There will also be a cost savings because you're only using half the plumbing. FWIW, quiet a few office buildings use this method as well, since they need rapid-flowing hot water but cannot predict usage - and would need a huge tank for peak times like after lunch, which would be wasted most of the day.

  19. LSpace on Top 20 Geek Novels · · Score: 2, Informative

    And if you like pTerry, but you're pretty sure you're not getting all of the jokes (or, better yet, if you actually think you are), you have to check out LSpace (ie: Library Space) and read the annotations. Woefully out of date, they're worth spending a couple of hours on in no uncertain terms.

  20. Re:Why would it be a democracy? on GPL 3.0 Rewrite Drive Is No Democracy · · Score: 1

    But you are free to vote. Simply become a US citizen (which you are free to do), else go vote in your own country. Me thinks you want to eat your cake

    Hey, I wasn't complaining, merely clarifying a misconception. I do, after all, pay US taxes. And your comment, while true, was along the same lines as saying, "Well, its easy for everyone to go to Washington DC, just get a car and drive it (or walk for a while) and you're there." Completely true, but not the whole story.

  21. Re:Why would it be a democracy? on GPL 3.0 Rewrite Drive Is No Democracy · · Score: 1

    the constitution strictly disallows us to prevent them (taxpayers)from voting

    Er, no it doesn't. Someone else posted the revelant sections, but let me add a personal note - I'm not a US citizen, but I live in the US (and have for about 20 years now, I am a permanent resident). I don't get to vote. I can guarantee you that I have to pay taxes.

  22. Re:Move along, move along ... on Oracle To Offer A Free Database · · Score: 1

    I have once developed a workshift-tracking application for a company with around 200 employees. A couple of years later, the total data takes 17MB. Why would you use Oracle if MySQL works faster and takes 1% of the resources? A minimal installation of Oracle 10g takes ~800MB of memory, and will take over ten hours to install on a machine with 512MB ram, on the other hand, on my firewall (486, 32MB ram) MySQL can handle Apache logs (only about 200k hits, though) taking a split second for any reasonable query.

    Oh, come on. We all run Oracle on our development machines, and on many of our servers (Windows and Linux both). Configured to provide "adequate" performance for OLTP on ~10G of data, it takes about 256M of RAM (some swapped out, of course). I could probably get that lower, but it hasn't been a priority (a ton of settings are left at their defaults). Installation takes about an hour on each platform - too long, I agree, but not the all day affair you make it out to be.

    I don't personally like using it because of the lack of standard tools, but hey, I'm an old school Informix guy myself. Still, its readily available, it works well, and once you master a few ideosyncracies its not that hard to deal with. So lay of the FUD a little, would ya, or at least come back with some more belivable numbers. I'm not disagreeing with you that MySQL could work fine, note, just that there's no need to exaggerate its benefits like that.

  23. Re:His words seem genuine on Speaker of the House Starts Blogging · · Score: 1, Insightful

    What I want politicians to do is listen to a small, trusted set of smart people and do the "right thing", regardless of whether it's popular or not

    This was the whole rationale behind the British House of Lords - and the original inspiration for the US Senate. Its purpose is also served somewhat by traditional monarchies operating under otherwise democratic systems. This is because you need someone (or some people, or both) who are taking the long view of what's good for the country. Without it, you get bread and circuses, followed by revolution. Happens every time (or, at least, it has so far).

  24. Re:Powerbook Screen on Apple Unveils New Pro Products · · Score: 1

    Using a 17" powerbook right now, I don't really want things much smaller. Sure, I probably wouldn't care if my menubar got a little smaller, but the 9pt type I use in my editor is about the limit of what I can comfortably work with.

    So use a 12pt font, keep the same number of letters-per-inch, and get text that's that much smoother than you're used to - with the added bonus of being able to drop down if you need more space and still keep legible text. Works for me...

  25. Re:Powerbook Resolution on Apple Unveils New Pro Products · · Score: 1

    Funny, I find that enjoy using screens around 125dpi on laptops. Somewhat less is fine for my desktop LCDs, simply because they're further away from my eyes (in general). I have several years of practice travelling with a ~125dpi screen (14" 1400x1050). I'd like a smaller form-factor machine, that's the main interest I have in the 12" box in fact, so jumping up to the 15" isn't really a useful suggestion. And I'm not wanting the same number of pixels as my old laptop, just a comparable dot pitch. But thanks for telling me what I do and do not like, I'll be sure to keep that in mind in the future.