Slashdot Mirror


User: bleedingsamurai

bleedingsamurai's activity in the archive.

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

Comments · 51

  1. I guess I'm a masochist on Ask Slashdot: What Distros Have You Used, In What Order? · · Score: 2

    Fedora->Ubuntu->Linux Mint->Fedora->Debian->CentOS->CrunchBang->Debian->Arch->Sabayon->Gentoo

    there is a lot going on there but I've been using Gentoo for the longest period of time and I see myself sticking with it for a very long time to come.

  2. Re:Why not? on Microsoft Engineer Discovers Android Spam Botnet, Google Denies Claim · · Score: 1

    Sounds a lot like applications Microsoft creates...

  3. Re:really?? on Has the Command Line Outstayed Its Welcome? · · Score: 1

    I agree; but the article is making out like the command line is such a prevalent force that simple tasks like editing documents and browsing the web require a command line. This simply isn't true, I know many people who shutter in fear at the thought of having to type commands at a text console, and yet use a Linux distribution with ease and satisfaction each and every day.

  4. Re:really?? on Has the Command Line Outstayed Its Welcome? · · Score: 1

    What twit would attempt to edit a photo with the command line without actually having a good reason?

    Try building software without a command line, sure you could do it...wait no you can't because even with GUI based compilers, buttons are just wrappers around commands.

    The fact is certain tasks are better attacked by a GUI or a CLI, to completely favor one over the other is a mistake.

  5. Re:really?? on Has the Command Line Outstayed Its Welcome? · · Score: 1

    The summery is assuming that to use an operating system built on Linux you have to be a command line wizard. This simply isn't true. I mean, unless you are setting these people up with Gentoo or Linux From Scratch I can't see why anyone would need to look at a command line unless they where doing something particularly technical to began with.

    My mother is a perfect example; completely inept with computers, and yet she browses the web, creates documents, edits photos, makes phone calls, installs software, watches movies, listens to music, does email, shops on line, and a bunch of other stuff from a Linux box. As far as she is concerned, the thing doesn't have a command line.

  6. Re:really?? on Has the Command Line Outstayed Its Welcome? · · Score: 5, Insightful

    Why care about the command line? Because it is a whole lot easier then getting carpal tunnel clicking fifty different things when I could just type a couple commands and get the job done.

    Just because non-technical users are afraid of a particular interface does not mean you rip it out. After all, distros like Ubuntu, Debian, Linux Mint, Fedora, RedHat and I'm sure plenty of others make it very easy for Joe User to get his computing done.

  7. Re: on Has the Command Line Outstayed Its Welcome? · · Score: 1

    I can think of many reasons why the command line is still a very important part of any operating system. If, as a developer, you are worried that Joe User needs access to your tool, then make it easy for them. Rather then have the whole system cater to the computer illiterate.

  8. Re: on Leap Second Bug Causes Crashes · · Score: 1

    Well that explains it. I'm running nothing less then 3.3.8

  9. Re: on Leap Second Bug Causes Crashes · · Score: 2

    Interesting. I wonder what conditions had to have been met for a crash to happen, none of my servers had so much as a hick-up.

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

    See, now you are just twisting the whole "buffer" and "dynamically allocated memory" thing and just using whichever term when it suits you.
    When I pointed out you where going from one to the other it was because you questioned me, asking how I thought printf("hello world\n"); uses any dynamic memory when I never said such a thing, I specifically said "buffer"

    Not necessarily. I agree that simply guessing at the max size of a buffer is incorrect. But I think it is better to start out with a max guess with the option to calculate and adjust as needed. On most platforms it is more expensive to actually allocate new memory then to simply have one big allocated at program start chunk.

    You shouldn't criticize a simple call to exit(), it is impossible to think up every single thing users will throw at your program. I think the best approach is to try and figure out the most common errors and create code that adjusts for them, then a generic handler that either calls exit() or returns and lets the calling function decide what to do based on the return value is a good catch all. Even then you arn't completely covered.
    What about race conditions? Is it really better to try and hide the fact that data was incorrectly processed, or instead, having realized data is incorrect, calling exit() because it wouldn't make any sense to continue. (though we should try to avoid race conditions!)
    What if I run:
    yes $VERY_LONG_STRING | your_program
    It just can't continue calculating the length of the string, at some point it has to say "this is too long" and exit.
    I tend to stick with systems programming, I never got into hardware that much.

    I completely agree with the second and third statement of your closing. However the first one, eh. I just don't see how functions like strncpy() are that big of a difference then how things where done before. It is perfectly possible to write code with strcpy() for example, and not leave openings for buffer overflows. I just feel like they are changing the language for the sake of changing it. And I also feel like the more functions like strncpy() that get pushed into the standard library, the closer we are to taking way the power that C gives you by doing what you asked for.

  11. Re:The road to hell is paved on A New C Standard Is On the Way · · Score: 1

    I can agree with that.

    And that I know of, C is the only language that gives you, low-level manipulation, lots and lots of rope, and is pretty cross-platform.

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

    Once again, only another statement, a call to exit() or return once the if statement decides your destination buffer is too small. We have a grand total of two additional statements.

  13. Re:I don't get it... on A New C Standard Is On the Way · · Score: 2

    It actually predates NeXT as well. XD It was developed by the founders of a company called Stepstone who originally licenced it to the NeXT company, then NeXT bought the rights to Objective-C and then Apple bought NeXT.

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

    Some how you went from "buffer" to "dynamically allocated memory" which although related is not one and the same. I'm sure you can figure out how too look up the definitions of both and see that there is a difference.

    I'll admit I misinterpreted what you wrote.

    But here is the problem with strncpy() and similar functions it only reads so many characters. So if you are in a situation where more is being written into a buffer then is there;
    1) your string isn't actually a string because it isn't null-terminated.
    2) it is actually more work for you to implement the handling of the error, I can't think of too many situations where not having the whole string is useful. By explicitly checking buffer size, I can adjust my destination buffer to include enough space for the whole string and not loose any data OR if it is such a hideous problem I can simply exit() or return right then and there in fewer lines of code that are easier to read. At which point why even bother using strncpy() if I'm already checking buffer size manually?

  15. Re: on A New C Standard Is On the Way · · Score: 0

    If it is such a problem, go use another language. One that does all the thinking for you.

  16. Re: on A New C Standard Is On the Way · · Score: 2, Insightful

    Are you suggesting it is possible to create a program that doesn't involve buffers?
    Even the simplest Hello World program uses buffers. Even fancy languages that have run-times and virtual machines use buffers. Buffers are an integral part of designing software because they are an integral part of how the machine works at the hardware level.

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

    I blame the programmers not the language.

    I don't even have to think about doing it. Often times it is as simple as an additional if statement to check the size of your source and destination buffers. If the destination buffer is smaller, just don't do the copy.

  18. Re:I don't get it... on A New C Standard Is On the Way · · Score: 2

    I see.
    Well, as far as a little OOP in C goes, what I have done is to create structures with whatever member data I need, and within those structures I place function pointers to emulate methods.
    If you see yourself doing a lot of that you can create functions that return pointers to your makeshift structure-class.
    Obviously you don't really get any advanced OOP stuff, but you can get simple inheritance using this method and a whole lot of encapsulation. If I'm not mistaken I think that C-family languages that support OOP actually do something like this behind the scenes.

    I guess I wouldn't mind a smidgen of OOP in C as long as they implement it through a library and not directly into the core language.

  19. Re:I don't get it... on A New C Standard Is On the Way · · Score: 2

    If you want OOP and C go with C++ instead.
    C is supposed to be a high level assembly language, so simplicity and brevity are key.

    I find that Objective-C is pretty nice to. It is a very strict super-set of C that adds some OOP functionality and is no where near as complex as C++, in fact it is just a library or two sitting on top of a C compiler to interpret the OOP syntax. It is a shame that it is so tightly bound to Apple products.

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

    The multi-threaded stuff sounds nice. But bounds checking, really? How difficult is it to check buffer size before copying?

  21. Re:statistics a soft science? on Teaching Natural Sciences To Social Science Students? · · Score: 1

    I don't make the rules. XP

    Apparently there has been some big debate as to whether or not math is a science, for at least a couple hundred years.
    People in favor of considering mathematics a science say that it goes back to the root meaning of "science" as a "field of knowledge". Even in the contemporary sense of the term "science", they argue that there are still instances where you would use experimentation to prove or disprove a hypothesis. Naturally though that only happens if you are developing some new formula or something like that.

    I guess it kind of makes scene. It is just that we have established so much of mathematics already that it doesn't seem like science because there isn't as much experimental stuff going on with it directly.

    There is one thing that invalidates maths that are applied to it, blackholes! XD

    Personally, I don't really see the justification for math being a science either, but I just kind of go with it.

  22. Re:statistics a soft science? on Teaching Natural Sciences To Social Science Students? · · Score: 5, Insightful

    Not to be rude, but reread the post.

    The OP says he normally teaches hard sciences to students with a major in a hard science meaning that they are more likely prepared for the learning of hard sciences. Because of some staffing issues the OP now must teach his hard science classes to students with a major in soft sciences, thus previous classes may not have fully prepared them for a hard science class.
    Because of this the OP is asking how to mold his teaching strategy to better target those soft science majors.

  23. Re:Don't you mean... on Linus Torvalds Awarded the Millenial Technology Prize · · Score: 1

    I believe you have miss-interpreted what I said, but I understand what you mean.

    What I mean is that there are certain expectations a Unix user might have of their user space and how they interact with it. Think of it as a cultural/unwritten standard. Some user space tools like GNU feel more Unixy then a few LEDs and push-buttons. After all, you can't really pipe the output of an LED into a push-button, though I'm sure you could modify the system to pipe the signal going to an LED into whatever the push-button activated some how, but that isn't exactly the same.

    Maybe I'm being a little to philosophical, XP

  24. Re:Windows NT?? Really? It's 2012! on Vulnerable SAP Deployments Make Prime Attack Targets · · Score: 3, Interesting

    Having only grazed over the article, Windows NT is Microsoft's current flagship operating system. Windows NT 6.1 being their latest "stable" release marketed under the names Windows 7 and Windows Server 2008 R2

    But if they really meant "Windows NT" as in Windows NT 4.0, then I agree, that is pretty darn bad

  25. Re:Congratulations Linus on Linus Torvalds Awarded the Millenial Technology Prize · · Score: 2, Funny

    They didn't port Hurd to the Emacs platform yet. That is why it wasn't as successful.