Slashdot Mirror


User: JustNiz

JustNiz's activity in the archive.

Stories
0
Comments
6,109
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 6,109

  1. Re:as of about a year ago, I started defensive cod on The Leap Second Is Here! Are Your Systems Ready? · · Score: 4, Funny

    Our servers run on octal, you insensitive clod.

  2. Re:my experiences on Torvalds Slams NVIDIA's Linux Support · · Score: 1

    Yeah kinda, except not so bad. With winomodems, the CPU was doing all the work because the winmodem was little more than a D-to-A and A-to-D converter.

    GPUs are basically just parallel processors. THe scenario is not so bad as the winmodem fiasco because at least GPU hardware actually does the heavy lifting, but I suspect the driver does a significant amount too... stuff like preprocessing of data, programming of shaders and other management such as scheduling to make sure the card is kept fed and running optimally (i.e. each processor on the GPU is optimally loaded). There's plenty of scope for proprietary tech to be in the driver.

  3. Sorry but.. on The Long Death of Fat Clients · · Score: 1

    Sorry but bandwidth will never be a good substitute for local processing power. Thats all there is to it.

  4. Re: on A New C Standard Is On the Way · · Score: 1

    >> But I think it is better to start out with a max guess with the option to calculate and adjust as needed.

    Not at all. You should NEVER guess first then readjust. ugh that idea sucks balls.

    I agree you may need to define a practical limit but you should use the same limit in both the buffer size calculation and the read operation (or whatever) that fills it (which is where and why functions like stricpy() and strncpy() have value over strcpy() ). That way you don't need to ever worry about crashing the buffer or dynamically resizing it. You also need to share any limitation as a design constraint with the users/callers of your code.

    >> You shouldn't criticize a simple call to exit(),
    I will when the need for it to even exist is retarded, as it is simply being used to handle failures caused by bad programming approach rather than a lack or failure of system resources.

    >> What about race conditions? Is it really better to try and hide the fact that data was incorrectly processed,

    OK what race condition are you expecting in hello world?
    You're just trying to muddy the water by bringing in multi-threaded or multi-process issues, but to answer it anyway, if the environment is multi-threaded you should be using the appropriate locking or synchronisation mechanism (e.g. semaphores, mutexes, critical sections, events etc) around the shared resource to completely prevent race conditions.

  5. Re:There fixed it. on A New C Standard Is On the Way · · Score: 1

    Why wouldn't you check the return value?
    Anyone who ignores status return values and just assumes every function call worked is going to quickly learn why they need to adjust their approach. That's a good thing.

    I don't think its appropriate for languages to even try and second-guess or otherwise work around lazy/sloppy programming. Its the programmers job to improve, not to botch the system so they can stay crappy.

  6. Re: on A New C Standard Is On the Way · · Score: 1

    You're right in that strlcpy() may be better, however only if you fail to check return values, in which case you're already a lost cause.
    It also doesn't excuse you for being rude and insulting.

  7. Re: on A New C Standard Is On the Way · · Score: 2

    >> Some how you went from "buffer" to "dynamically allocated memory"

    Yes because if you need a buffer of a length only known at runtime you should be using dynamic memory rather than statically define an array of some guessed length.

    >> 1) your string isn't actually a string because it isn't null-terminated.

    This is only true if you were stupid enough to make your buffer too small, which usually happens because junior or hacky programmers are often inexperienced or hacky enough to incorrectly think guessing a maximum length rather than calculating it is robust.

    >> 2) it is actually more work for you to implement the handling of the error,
    As opposed to what? allowing it to (possibly silently) corrupt memory?

    >> I can't think of too many situations where not having the whole string is useful.
    Nor can I thats why you dynamically create a buffer of suitable length.

    >> By explicitly checking buffer size, I can adjust my destination buffer to include enough space

    Ahh so now we are using dynamic memory?

    >> if it is such a hideous problem I can simply exit() or return

    Wow that must look great to the user. I hope you never write control or embedded software.

    >> At which point why even bother using strncpy() if I'm already checking buffer size manually?

    Both because its safer and can make your code more concise, and because the idea is that if you have a small buffer you should only read as much as you can buffer. The C and C++ language gives you exactly what you asked for. It does not generally coddle ignorant programmers by trying to second-guess everything. I personally love that, as I want a scalpel not plastic scissors.

  8. There fixed it. on A New C Standard Is On the Way · · Score: 1

    Just use snprintf instead of sprintf.

  9. Re: on A New C Standard Is On the Way · · Score: 1

    I'm not saying that at all. All potential buffer overflows are just a result of sloppy coding.

    Even in languages with no built-in protection like C you can easily and elegantly architect your code such that crashing buffers is impossible.

    People need to stop expecting languages to make up for their own lack of skill and/or attention to detail.

  10. Re: on A New C Standard Is On the Way · · Score: 2

    I'm not sure how you think printf"(hello world\n"); uses any dynamic (i.e. user-created/maintained )memory but never mind thats not my point here.

    What I am saying is that you write your code such that once you created a buffer, your program knows its length and is written in such a way that it isn't possible to crash it.

    For example, only use bounded functions like strncpy() rather than unbounded ones like strcpy().

  11. Re: on A New C Standard Is On the Way · · Score: 1

    Why do you need to explicitly check the buffer size at all?
    A well-designed program ensures you can't crash the buffer to start with.

  12. Jeezus christ on A New C Standard Is On the Way · · Score: 5, Funny

    If I wanted plastic scissors I'd use Java. Give me my scalpel back.

  13. Re:Slow Adoption of Current Standards on A New C Standard Is On the Way · · Score: 4, Informative

    Blame Microsoft, not the standards committee.
    GCC had it ahead of time.

  14. the day after election day on U.S. Gas Prices Continue To Fall · · Score: 1, Insightful

    No matter who wins, the day after election day it will go right back up again and then some.

  15. Re:B.S. on Kaspersky Says Lack of Digital Voting Will Be Democracy's Downfall · · Score: 1

    Wow. I wonder if Apple foot the bill for the difference, otherwise what is their motivation to sell iphones rather than androids?

  16. Re:B.S. on Kaspersky Says Lack of Digital Voting Will Be Democracy's Downfall · · Score: 0

    What carrier are you with? They charge more for service depending on what phone you have? Sheesh.

  17. Re:are young people really that lazy and stupid? on Kaspersky Says Lack of Digital Voting Will Be Democracy's Downfall · · Score: 2

    VHS? you were lucky.
    We were so poor our entire family lived in a brown paper bag in the middle of the road. All 58 of us. We used to eat coal for breakfast and work 28 hour days, as well as do a 50 mile delivery round every morning in bare feet because we couldnt afford shoes. But we were happy. I miss the good old days.

  18. I'd suggest on Ask Slashdot: Best Science-Fiction/Fantasy For Kids? · · Score: 1

    When I was about that age, The Tripods Trilogy by John Carpenter and the Edgar Rice Burroughs Barsoom series dominated my reading universe.
    They are readable even for a younger kid, and theres also a lot of them.
    You might also try the Discworld series by Terry Pratchett, although they're more fantasy than sci-fi, they're great stories for all ages and have a wonderful sense of humour.

  19. Re:Example #1 - Teaching on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 0

    Thats incredibly sad.
    Whats worse is the number of manginas here that are blindly defending the feminist propaganda state and just dont get it.

  20. Re:Why is this even an issue? on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 1

    I'm totally missing your point. So are you claiming most uni students don't get to choose their subject? its decided for them somehow? if you are, I call baloney.

  21. Re:Why is this even an issue? on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 1

    Your argument is based on the assertion that we are somehow discouraging women from entering CS, which according to my experinces is complete baloney.
    At my Uni female CS applicants got preferential placing just because of gender, and every company I've ever worked at has always actively encouraged women employees and made sure that they get paid at least the same as men.
    I'd suggest it has more to do with CS itself. Most women automatically think more based on emotion while men generally use more logic. Consequently women tend to shy away from subjects that require rigorous or analytical thought. Perhaps its cultural but I'd suggest its more fundamental than that. Men and women ARE biologically (including psychologically) different, just accept it. There always will be less women applying for CS than men because of it, but its not an inherently bad thing. Its their choice at the end of the day.

  22. Re:Why is this even an issue? on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 1

    >> As well, it also reflects that many women don't care to be the breadwinner of the household, and are only interested in taking jobs with flexible schedules. The why of that should be fairly obvious.

    Jeez if only guys had that option. And nope the why of that is not obvious at all, other than women want an easy life and many guys are stupid enough to put up with working all day to support them while they kick back at home.
    Women say they want equality but they actually mean favoritism. They generally ignore both sides of the equality equation, mostly because guys let them get away with doing so. No woman I know would happily work a 9-5 to support a guy staying at home, kids or not, regardless of the fact that dads are equally good and just as needed parents.

    >> there may be an overall societal discrimination against women going into math and engineering fields

    Have you any proof of that? Every hi tech company I've ever worked for has actively encouraged women and otherwise treats them identically to men, pay included.

  23. Re:Why is this even an issue? on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 1

    Wait what?
    I advocate total equality of opportunity and merit-based hiring then you accuse me of dickswinging whatever?
    How does that work again?
    You sound like one of those radical feminists that wants the 'pick and choose' style of equality.
    BTW I have a 7yr old kid myself.

  24. Re:Why is this even an issue? on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 1

    Well done for a complete fail on about 90% or your assumptions about me and your lame attempt to present a well-reasoned argument.

  25. Re:Why is this even an issue? on Women's Enrollment In Computer Science Correlates Negatively With Net Access · · Score: 3, Funny

    As a guy I'd have gone into nursing but those little dresses and stockings make my butt look big.