Slashdot Mirror


Blame Bad Security on Sloppy Programming

CowboyRobot writes "ACM Queue has an article that blames security flaws on poor programming, rather than any inherent problems with particular languages. From the article: 'Remember Ada? ... we tried getting everyone to switch to a 'sandboxed' environment with Java in the late 1990s... Java worked so well, Microsoft responded with ActiveX, which bypasses security entirely by making it easy to blame the user for authorizing bad code to execute.'"

592 comments

  1. Uhh.. by cbrocious · · Score: 5, Insightful

    Does anyone feel that this is just publicizing what every GOOD developer has been saying for the last 10-15 years?

    --
    Disconnect and self-destruct, one bullet at a time.
    1. Re:Uhh.. by strictnein · · Score: 5, Insightful

      Yeah, no shit... This is news? Bad programming = security issues. Wow... we learn something new every day on slashdot.

      Here's a tip editor boys: if group A says statement A and you post it as a news item, great. But when group B, C, D, E, F, G, and H all say the same statement A, it's not news. It's redundant (remember that modifier you put in? -1 Redundant? That's what it is).

    2. Re:Uhh.. by codergeek42 · · Score: 0, Redundant

      Good point.

    3. Re:Uhh.. by Short+Circuit · · Score: 5, Insightful

      Unfortunately, unless someone as big as Microsoft (ha!) or IBM gets behind the message, you're not going to see much come of it.

      It's too cheap to quickly pump out code, then run it by QA. You don't even need a shoddy programmer to do it...just pile too many high-priority near-deadline tasks on a good programmer. (Which is all too likely...if you build a reputation for getting things done, you'll get landed with a workload that would put a tech-support guy in a funny farm.)

    4. Re:Uhh.. by doinky · · Score: 2, Insightful

      If Microsoft hadn't killed OS competiton, IBM _would_ be doing this today. OS/2 had a far more secure infrastructure than did Windows (at the time, of course, the main concern was the ability of a bad app to screw with the system; but one could easily imagine today's OS/2 doing a better job against things like internet exploits).

    5. Re:Uhh.. by Cruciform · · Score: 3, Insightful

      Redundant it may be, but how many people were going to read the article or those like it before it got put on Slashdot.

      Now that it's up there, reporters cruising for an easy story for one of the big news providers will take that story, turn it into something at a 5th grade reading level (that's the bar for tabloid news, I shit you not) and turn it into something that the average consumer may read and understand (albeit poorly, because the meaning will get twisted along the way).

      But if it gets more uninformed consumers to say "Hey, why are we paying for poorly designed crap?" then it's done its job, and you're out nothing but the time it took to reply to the parent.

    6. Re:Uhh.. by kfg · · Score: 5, Insightful

      Don't play with matches. Dont' run with scissors. If you push it hard enough it will fall over.

      Some things you just have to keep saying over and over. People are dense, and by the time one group gets it there's a whole new litter coming up from behind.

      You, for instance, who thinks we've only been saying that for 10-15 years, wheras, in reality, 10-15 years ago you heard that from someone who'd already been saying it for 10-15 years.

      Now it's your turn to smack your forhead and say "Oy".

      KFG

    7. Re:Uhh.. by Anonymous Coward · · Score: 1

      It's

      1) bad requirements,
      2) bad design,
      3) bad implementation,
      4) bad review process, and
      5) bad motives.

      Next subject, please.

    8. Re:Uhh.. by Anonymous Coward · · Score: 0
      ...turn it into something at a 5th grade reading level (that's the bar for tabloid news, I shit you not)...

      Gee whiz, Marcel Proust -- with prose like "I shit you not", I can see why the print media aren't up to your lofty standard of eloquence.

    9. Re:Uhh.. by aardvarkjoe · · Score: 4, Funny
      Redundant it may be, but how many people were going to read the article or those like it before it got put on Slashdot.
      Are you implying that anyone's going to read it now that it's been posted on Slashdot?
      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
    10. Re:Uhh.. by C.Batt · · Score: 5, Insightful

      As one of those "good" programmers with a reputation for getting things done, I must concur with your statement. In fact I've observed that the first thing cut from most project budgets, if it's even included in the first place, seems to be adequate technical QA. There's lots of emphasis on meeting business requirements/application feature goals, but very little on engineering quality under the hood.

      Part of the problem is that enforcing best practices and doing techincal QA is both time consuming, and expensive, not to mention boring as all heck. So there isn't much motivation to do it. Bad, bad attitude and we're paying the price.

      --
      -- All views expressed in this post are mine and do not
      -- reflect those of my employer or their clients
    11. Re:Uhh.. by Anonymous Coward · · Score: 0
      Maybe so, but that fact has been lost on the Slash Team, since they wouldn't know a good programmer were one to hit them upside the head. Oh Wait - those 500 errors are the USER's fault, right?!

      Wait for the bitchslap... wait...

    12. Re:Uhh.. by ackthpt · · Score: 5, Insightful
      Yeah, no shit... This is news? Bad programming = security issues. Wow... we learn something new every day on slashdot.

      Here's a tip editor boys: if group A says statement A and you post it as a news item, great. But when group B, C, D, E, F, G, and H all say the same statement A, it's not news. It's redundant (remember that modifier you put in? -1 Redundant? That's what it is).

      Here's a clue: Not everyone started programming at the same time, back in the enlightened age of limited resources and cautious programming. When I saw some jerk writing login spoofs on a PDP 11, back in the early 80's I worked out a few ways to spot these running and suspend them. (Also pass information on to Campus Police to have the perpetrator evicted from the grounds.) People are still learning to program and it's not uncommon for them to take idiot-proofing for granted, unless one of two things took place: 1) They had a good instructor who warned them of the consequences untrapped errors 2) There's a directive where they work which they must follow. I expect even Microsoft must be able to backtrack to the person who wrote leaky code. Problem also is two or more departments whose products must interface, but pass the buck on who is responsible for trapping errors, etc. That role should be filled by a management group responsible for the work between groups.

      Microsoft responded with ActiveX, which bypasses security entirely by making it easy to blame the user for authorizing bad code to execute.'"

      When's the tenth anniversary of the Win95 bug which allowed people to hack Quicken?

      --

      A feeling of having made the same mistake before: Deja Foobar
    13. Re:Uhh.. by Unnngh! · · Score: 4, Insightful
      Yep. In my experience, the good developers get way more work and their quality goes to sh*t b/c they're under pressure and generally unhappy with their jobs at that point. The poor develpers get lower-priortity tasks to work on.

      Being in QA, however, I can honestly say that all the testing you can do on a poorly developed product results only in a poorly developed product with fewer bugs. There is just no way to catch all the bugs in a really POS piece of software when the entire framework is jacked. Not that you can ever catch *all* the bugs, but there's a point at which everyone pretty much agrees that something is good to ship...this usually never happens with crap; crap just ships.

    14. Re:Uhh.. by Cyris · · Score: 1

      Well, since the site has been slashdotted... I would say that quite a few people read the article.

      --Cyris

    15. Re:Uhh.. by timeOday · · Score: 1
      Does anyone feel that this is just publicizing what every GOOD developer has been saying for the last 10-15 years?
      That still doesn't make it true.

      The fact is that ALL developers make mistakes - even really fabulous ones like me and you. In an unsafe language, those mistakes are less likely to be detected, and the consequences are higher. It's that simple.

      As for ActiveX, it's a poster-boy for safe languages.

    16. Re:Uhh.. by jadenyk · · Score: 1

      If a news source gets their stories from /. and prints them in a way that would change uninformed consumers decisions, this world is in deep shit.

    17. Re:Uhh.. by bay43270 · · Score: 4, Insightful

      First of all, if it weren't worth talking about, there wouldn't be so many comments here.

      Although I can't read the article (/.ed already), I won't let that stop me from disagreeing with the premise. While ignorant developers may have directly caused more individual security problems, the long-term solution isn't to blame the programmers and consider the issue solved. It's a lot more realistic and efficient to fix the programming tools than the programmers (even if the tools can already be used securely).

      Saying that security issues will go away by educating developers is like saying America's obesity problems will be solved by telling all fat people to work out. Its just not practical or constructive on a large scale. (On a small scale, of course, a developer can educate himself just as an obese person can loose weight - with hard work and dedication).

      So rather than criticizing our co-workers (who probably don't care what we think anyway), why don't we identify ways to isolate these people from situations where they could cause harm?

    18. Re:Uhh.. by gfody · · Score: 0, Troll

      insightful? you know microsoft developed os/2 for ibm, about the same time they were making windows actually.

      --

      bite my glorious golden ass.
    19. Re:Uhh.. by Anonymous Coward · · Score: 0

      > OS/2 had a far more secure infrastructure than did Windows

      This is bullshit. OS/2 had no security infrastructure at all! It didn't even have basic features like user account separation or file permissions. Maybe nobody uses this stuff in Windows, but at least it's there.

      If you want to propose some alternative universe, at least make it one where we switched to something good, like UnixWare for example, rather than "better than Windows 3.1" poop like OS/2.

    20. Re:Uhh.. by e2d2 · · Score: 3, Insightful

      Of course you should try to learn how to write the most secure code possible but the developer is only a link in the chain of quality and security. It comes from the top by management demanding higher quality AND at the same time giving the developers and testers the proper time and tools to succeed in that mission. The market told them that mediocre was acceptable and this lesson has been hard to unlearn. Only when the market demands it will it change. Until then we will continue to see bugs and it's inherit bad security.

    21. Re:Uhh.. by claar · · Score: 1

      Although I can't [or "haven't", or "don't want to" -- ed] read the article . . ., I won't let that stop me from . . .

      You don't have to actually state that here, it's already implied for you.

      --
      I'd give my right arm to be ambidextrous...
    22. Re:Uhh.. by Anonymous Coward · · Score: 0
      You don't even need a shoddy programmer to do it...just pile too many high-priority near-deadline tasks on a good programmer.

      No. Good programmers do NOT let quality go down in areas where it truly matters, say, by introducing trivial exploits. They may choose to scope down features (with managers, QA, customers); or maybe (secondary choive) extend deadlines. Lowering quality should be and is a big no no for actual professionals.

      Yours is an excuse used by below-average developers who never truly learnt their craft AND do not have enough self-esteem to stand up to unreasonable requests but instead choose to "cheat" by using bad program code. They naively assume that it's ok to sweep garbage under the carpet; that no one finds out about bad implementation... and that oftentimes bites them in their asses.

    23. Re:Uhh.. by NaugaHunter · · Score: 1

      Problem also is two or more departments whose products must interface, but pass the buck on who is responsible for trapping errors, etc.

      No need to attribute it to active malice on either part - most often it is simply differing assumptions. Especially when the programmers are sufficiently divorced from the designers. If the design document says your code will be passed certain information and makes no allusion to checking it for validity or for passing back if it is invalid then where does that leave you? Are you going to question the design? Spend extra time writing error checking code that will put you over the alloted schedule and possibly lead to discipline? Or do EXACTLY what the document calls for?

      Frankly, the answer isn't cut and dried - it depends both on the environment and how well acquainted you are with it. However, programmers at the bottom of the pole are safest remembering that: "It's the quacking duck that gets shot."

      For myself, I've generally been in a position to question the design. Most of the time that's as far as it got though, so I would do my best to prevent hard errors (e.g. surrounding division with zero checks - yeah, they say they'll never pass one, but why chance it?). And more then once something has been found where my code worked oddly without error and I'd trace it to the passed parameters did NOT match the design, a possibility I could document as NEVER would happen.

      --
      R: That voice. Where have I heard that voice before? B: In about 365 other episodes. But I don't know who it is either.
    24. Re:Uhh.. by mattyrobinson69 · · Score: 1

      win95 bugs are no longer a problem for almost everybody, activeX still exists in windows XPsp1 - its bugs might not be there anymore but its still an inherantly bad idea

    25. Re:Uhh.. by mattyrobinson69 · · Score: 2, Informative

      no.

      IBM and Microsoft were working on an operating system together- they had a lovers tiff and Microsoft took their code from the project and made Windows NT, IBM took their code and make OS/2

    26. Re:Uhh.. by Anonymous Coward · · Score: 0

      get out your shovel.

    27. Re:Uhh.. by Anonymous Coward · · Score: 0

      "IBM and Microsoft were working on an operating system together" is code for "IBM was paying Microsoft to write an operating system". You don't really disagree with the parent.

    28. Re:Uhh.. by dasmegabyte · · Score: 1

      Somebody as bit as Microsoft *IS* getting behind it. Specifically, Microsoft themselves. They're slowly rebuilding the OS and their applications in .NET, using managed code and protected memory and forcing others to do the same.

      --
      Hey freaks: now you're ju
    29. Re:Uhh.. by __aagmrb7289 · · Score: 2, Funny

      Fact is, if it's an operating system written by anyone but Microsoft, it's more secure than Microsoft's. If you are bored, we can make up some reasons as to why this is so. (sarcasm implied, but hell, I know ya'all will miss it)

    30. Re:Uhh.. by doinky · · Score: 2, Informative

      I worked on OS/2 at the time, son. Microsoft was an impediment to security and stability - and none of the WNT code (except for a few chunks here and there) came from OS/2; their code was inspired by VMS if anything.

    31. Re:Uhh.. by doinky · · Score: 1

      No, but you disagreed with the parent - MS wrote parts of OS/2 1.x, IBM wrote parts. MS even arguably wrote a few chunks of OS/2 2.x. But anybody who thinks it could be paraphrased as "IBM paid MS to write an operating system" is a complete moron. IBM wrote a hell of a lot more of it than did MS.

    32. Re:Uhh.. by Anonymous Coward · · Score: 1, Informative

      Actually, a lot of what the article suggests IS fixing the tools. Making compile/link warnings into errors, putting security checks into the program at compile time like optimizations, etc.

    33. Re:Uhh.. by FlopEJoe · · Score: 1

      Yeah! Get back to the reverse graffiti and gift-card expiration stories! That's the news that matters to nerds.

    34. Re:Uhh.. by Anonymous Coward · · Score: 0

      google news sucks in slashdot, would you say noone reads google news too?

      Sometimes, slashdot is just a foot in the door for technology news, usually for academia that is unreadable as-is for press agencies.

    35. Re:Uhh.. by doinky · · Score: 1
      Dude, if you missed the "at the time" necessary implication when comparing OS/2 to Windows, I can't do a lot for you.

      At that point in time, neither OS/2 nor Windows had the concept of users; at least, in the basic client. Both had some degree of it in their somewhat-partially-separated LAN client add-ons.

      The comparison I made was between the security issues of that time - which were largely linked to bad apps crashing the O/S.

    36. Re:Uhh.. by Baby+Duck · · Score: 2, Insightful

      I agree whole-heartedly.

      However, I find it even more astonishing that the paying customer will find the Crap perfectly acceptable!

      If customers started rejecting the crappy deliverables, the bad behavior of the software managers would never be rewarded. Adapt or die.

      Customers rather have Crap sooner, than Quality later. Often, they have to have the software in place to meet some external requirement placed on them. Like doing the exact minimum amount of effort possible to comply with some law like HIPAA.

      For example, if a business has the most Craptastic online presence ever conceived, well then, technically, they still do HAVE an online presence. So the PR department can start pumping out those brochures proudly proclaiming "Hey! You can do business with us online!" It doesn't matter if it's bug-ridden or virtually unusuable. The point is it's there and the brochure literature is legally sound.

      The customer doesn't care. So the software provider doesn't care. And the deadlines given to the Good Programmer makes him unable to produce Quality, even if he DOES care!

      --

      "Love heals scars love left." -- Henry Rollins

    37. Re:Uhh.. by Anonymous Coward · · Score: 0

      turn it into something at a 5th grade reading level (that's the bar for tabloid news, I shit you not)

      I was under the impression that most people read those magazines for the pictures.

    38. Re:Uhh.. by bay43270 · · Score: 1

      In that case I agree with the article (and disagree with the /. summary). Martin Fowler summarizes the differences in attitudes here. I personally prefer a directing attitude, and think it's the best way for the industry to proceed. I can understand how people might prefer using enabling tools, but for every person who can handle the responsibility, there are five others who can't (and we can't just leave them behind).

    39. Re:Uhh.. by Short+Circuit · · Score: 1

      Um...I don't think it's possible to build an X86 OS to operate from within a VM. Even .NET.

      Microsoft isn't shouting that shoddy programming practices cause security flaws...for them, that would be a really bad PR move.

    40. Re:Uhh.. by perlchild · · Score: 1

      You'll also notice a tend about spending far more time checking how you met the requirements of the clientm than following the rules of your "domain". That's because the general assumption that

      1) developer knows about the software development field, and the best methods to be had there
      2) developer could use the best methods to make a quality product, provided client is willing to pay for that quality product
      3) developer doesn't know about client's "domain", and that needs to be emphasised in the documentation, simply because if you don't know that your galvanic bath contains acid, you might try to buy cheap zinc beaters to mix it... (gratituous example taken from non-related field)

      The problem is that the documentation is the bible of the project, so very few things outside it get done, at least, get done with sustained effort.

      Software security is a sustained effort, which at some point, requires even end user cooperation AND discomfort(yes, if you think your users can be comfy and secure, think again, when they are comfy, they aren't aware, hence they are insecure, and it makes them uncomfy to be aware about security matters, because they feel it's not their job. Security is however, everyone's job, weakest link and all that...)

      So not only do you clearly point out that programmers find it a hassle, but doing it right means they have to be hassled, and then they have to hassle other people in turn, to make them aware. To use another unrelated analogy, not only do the developers have to go to the dentist for a root canal, they have to make sure J.Random.Users can't use the system before their root canals too...

      Now add to that that engineering quality and elegance is something we all want to give(if only for the bragging rights) in our products, but there is a lot of aspects of the software business which is undiscovered country: how many clients run different versions of OSes, different platform versions, slightly incompatible hardware, special applications for special needs? A lot of them, because the real word isn't very tolerant of monocultures. But unfortunately, pre-qualifying for true compatibility before getting software development work done is something that's very rarely done.

      So you have "chaos" on one hand, and discomfort on the other, and a schedule in the middle, and you cannot be surprised the match isn't made in heaven...

    41. Re:Uhh.. by Anonymous Coward · · Score: 0

      Windows NT shipped only a year after OS/2 2.x, and had similar pricing and hardware requirements, so it's a fairer comparision than Win3.1.

    42. Re:Uhh.. by Cecil · · Score: 1

      Yours is an excuse used by below-average developers who never truly learnt their craft AND do not have enough self-esteem to stand up to unreasonable requests

      It only takes the latter. The former is pretty much irrelevant in this case. If you're being asked to do much in too little time (high-priority, near-deadline) but can't lessen the requirements, then good programmer or shitty programmer, you're going to end up with numerous shitty products and that's all there is to it.

    43. Re:Uhh.. by jc42 · · Score: 4, Insightful

      Of course you should try to learn how to write the most secure code possible ...

      This sounds nice, but there's a serious problem: There is a widespread attitude in the security community that the details of security holes should be kept secret from programmers. They're worried about those evil hackers exploiting the holes, and there is reason to worry. But when they keep such things secret, the major effect is to keep programmers ignorant of how they might be making mistakes.

      If you combine this "keep the programmers ignorant of the details" practice with the widespread "don't bother the readers with nerdy stuff that'll be over their heads", the result is the security disaster we now have in some parts of the industry.

      As a programmer, I'd like to learn how to write the most secure code possible. But when I try to read about it, I usually find myself reading text that is frustratingly vague on exactly how something might go wrong. If I could learn the details, I could usually write (meta-)code that would check my own code for those problems. But I can't do that if all I have is a vague "don't do things wrong" sort of statement.

      So, yes, sloppy programming is part of the problem. But keeping your programmers ignorant is also a major part of the problem. Don't feed us vague, feel-good commands to write secure code. Tell us exactly how things have been screwed up in the past. Then maybe we can figure out how not to do it again in the future.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    44. Re:Uhh.. by jc42 · · Score: 1

      Heh. Yeah, self-deprecating humor is always popular in nerd/geek circles.

      But I've seen slashdot referenced in a lot of other news sites. This place it getting noticed by lots of non-nerds. In particular, media peoplea re learning that this is a good site to visit for leads to breaking stories. Along with news.google.com, of course.

      Now back to the humorous comments ...

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    45. Re:Uhh.. by fatphil · · Score: 5, Funny

      I'm sure I'm not the only one who's learnt that:

      Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

      is indicative of bad programming. Thanks ACM Queue for an enlightening 2-line article!

      FP.

      --
      Also FatPhil on SoylentNews, id 863
    46. Re:Uhh.. by 4of12 · · Score: 1

      Hey!

      You reading /.!

      Get back to work! You know we've got to ship version 2.0 by the end of next week come hell or high water!

      --
      "Provided by the management for your protection."
    47. Re:Uhh.. by dasmegabyte · · Score: 1

      These guys, among others, would be shocked to hear that it's impossible to build an x86 OS based on a VM.

      --
      Hey freaks: now you're ju
    48. Re:Uhh.. by Anonymous Coward · · Score: 0

      No, I think it's someone trying to peddle an expensive solution to the problem. Almost the first thing the author does is dismiss Java precisely because it IS secure. The least someone with an agenda could have done is sniped about Java performance.

      But then somebody might drag out a recent set of Java-vs-C/C++ benchmarks...

    49. Re:Uhh.. by OwnedByTwoCats · · Score: 1

      I'm not so sure that security must necessarily inconvenience users. Security done poorly, with one user needing N different passwords (or User ID/password pairs) to access N-1 different systems strikes me as a bad design, and what "single sign-on" systems were supposed to fix. User credentials stored securly, and passed out to applications when they ask.

    50. Re:Uhh.. by llefler · · Score: 3, Insightful

      This sounds nice, but there's a serious problem: There is a widespread attitude in the security community that the details of security holes should be kept secret from programmers. They're worried about those evil hackers exploiting the holes, and there is reason to worry. But when they keep such things secret, the major effect is to keep programmers ignorant of how they might be making mistakes.

      You shouldn't need the security community to tell you about the issues addressed in this article. Basically all he is saying is have the compiler give warning messages for all unsafe practices. (learn to keep your arrays safe, there are no exploits for the security community to find) And there is no such thing as an OK warning. Just look at his gets/fgets example.

      Personally I'd like to see people keep writing these kinds of articles until everyone gets it; because a lot of programmers don't.

      BTW, I read the summary and was all ready to disagree with the premise that it's lazy programmers and not a language issue. Then he explained that programmers are lazy because we haven't fixed the compilers so that we don't have to worry about these problems. But I'm still leaning towards 'C is evil'.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    51. Re:Uhh.. by llefler · · Score: 1

      Get back to work! You know we've got to ship version 2.0 by the end of next week come hell or high water!

      That's Ok, we can release it now and patch it later.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    52. Re:Uhh.. by MirgNave · · Score: 1
      This study was also recently published in the prestigious technology journal:

      Duh Weekly.

    53. Re:Uhh.. by Anonymous Coward · · Score: 0

      Saying that security issues will go away by educating developers is like saying America's obesity problems will be solved by telling all fat people to work out.

      Not so: You can't (in general) fire someone for being fat, you can fire someone for being a bad coder. It relates directly to their job performance.

      So rather than criticizing our co-workers (who probably don't care what we think anyway)

      I don't care what they care about, I care what their boss cares about. Because they aren't my co-workers, they're filling jobs that I want, that I can do better.

    54. Re:Uhh.. by fiftyfly · · Score: 1
      Does anyone feel that this is just publicizing what every GOOD developer has been saying for the last 10-15 years?

      Or more: "That's the thing about people who think they hate computers. What they really hate is lousy programmers" - Larry Niven and Jerry Pournelle, "Oath of Fealty"

      --
      "Sanity is not statistical", George Orwell, "1984"
    55. Re:Uhh.. by Anonymous Coward · · Score: 0
      I don't think you understand the consept of an analogy:

      http://dictionary.reference.com/search?q=analogy &r=67

    56. Re:Uhh.. by Anonymous Coward · · Score: 0

      Not just security issues. All sorts of issues. There has always been a shortage of coders. That means there's an even greater shortage of better coders. I've said it before and I'll say it again: 95% (or more) of the people in this industry don't belong in it. OJT (On-the-Job Training) runs rampant; this can be from 0% knowledge or enough knowledge to get the job. Remember, an extremely large percentage of the businesses in this country have fewer than fifty employees. Q: How many of those work without PCs? And where do they get the person(s) who deal with it? Who does the technical interview for them to insure they've someone good enough [but not too good as they'll get bored]? I've done that for companies just to make sure they don't get the dry ream.

      Code Review: Someone turns in sh%tty code. Do you make them go back and fix it to pass another round? Most do not. Have you ever had to follow behind - especially when they're still at the same company - and deal with their code? It's like chewing crushed glass on the ride side of your mouth and dog sh%t on the right side of your mouth. You feel it would be better to start it over, but you have no such ability, even if you were to do so on your own time.

      Back to the 95%. 95+% don't belong. They think it makes them look smart, they like doing it, and they think they are good at it. If you were to walk into a room of randomly selected people in various roles and told everyone who is good to go to one side of the room and those who is bad to go the the other side of the room. Think who is going to go which side of the room.

      summary: you don't have to be good, just good enough. alas, that's just not good enough.

    57. Re:Uhh.. by Master+of+Transhuman · · Score: 1

      "turn it into something at a 5th grade reading level (that's the bar for tabloid news, I shit you not)"

      You mean, like, oh wow, it's not the bar for /.? /.'s bar is actually LOWER?

      Like, oh wow, man.

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    58. Re:Uhh.. by TastyWords · · Score: 1

      Something else to note is what Micro$oft does after they work with someone else. Two quick examples:
      1. Micro$oft's fun with IBM. The split occurs and what does Microsoft do?
      2. Micro$oft worked in a consulting|advisory stint with Compu$erve - as many predicted, it helped them either confirm what they suspected or provide them with knowledge to see how things have to work behind the scenes. - all for an online serviece or ISP.

    59. Re:Uhh.. by TastyWords · · Score: 1

      I don't think you understand the consept of an analogy:

      I don't think you understand the concept of spelling correctly

    60. Re:Uhh.. by jc42 · · Score: 2, Insightful

      Oh, c'mon; I haven't written a call of gets() in years. That doesn't mean my code doesn't have security holes. If gets() were the only security issue, even Microsoft would have solved the problem a decade back.

      Attributing all security problems to things like buffer overflows shows an incredibly shallow understanding of the issue. Most of the potential security holes can't be caught by a compiler (or linker) at all.

      For example, most of the unix part of the industry has abandoned telnet and ftp in favor of ssh and scp. The problems with telnet and ftp have nothing to do with simple coding errors like buffer overflows. They are caused by sending information (such as passwords) across the Net in the clear. No compiler is going to correctly diagnose this sort of problem. And solving them isn't trivial; it requires an in-depth knowledge of the nuts and bolts of encryption.

      We really need good information that goes a lot deeper than the current discussion. Unfortunately, most of the security advice for public consumption really is this shallow.

      No wonder we have such problems.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    61. Re:Uhh.. by mvpll · · Score: 1

      Computers are brainless, this is why they can be cracked.

      Using compilers to catch common programming errors is a good idea, but this will just see serious crackers targeting flaws not caught in current compilers.

      Leading to new compilers ... leading to new cracks ... etc

      If the only security guidance a programmer gets is from the programming language itself and it's compiler, then you have the brainless in charge of security...

      Of course, there are also such things as OK warnings too, eg:

      #include <stdio.h>

      int main (int argc,char **argv)
      {
      int some_val;

      if (argc > 1)
      some_val = argc;
      else
      {
      /* do something */
      }

      if (argc > 2)
      printf("Number of arguments passed in: %d\n",some_val);

      return 0;
      }

      compiles as such:

      gcc -O2 -W -o test1 test1.c
      test1.c: In function `main':
      test1.c:5: warning: `some_val' might be used uninitialized in this function

      As two is always larger then one, I feel secure in ignoring that warning.

      Hmm, the ECODE tag seems to ignore leading whitespace, I bet the Python programmers are over-joyed about that. (There should be indentation on the lines following an if statement)

    62. Re:Uhh.. by tommywho70x · · Score: 1

      Oh my gracious! Somebody noticed after all these years! My founding partners/software engineers warned me about the Bill Gates/Paul Allen fudge factory sex-cure-a-tee heap bignums wince once and discover auto-collapsing stacks and buffered up ringworms in 1985. WAD's this? A Histo-crypt?

      It is my humble, knuckleheaded self who has postulated the yet-to-be-disproven 13th Corollary to Murphy's Law: The chance of failure of a Microsoft Software Product increases exponentially with the number of Microsoft Certified Software Engineers assigned to the project development team and approaches 100% every April 15th.

      Just say Swiss Cheese, please! Double-U Double-U Double-U How fast can you say i am a company name dot commmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm/?
      if it takes you more than 20 ms to decide you must go back 3 space bars and sign-in as anyuser@msn.com[0]Document Done[1]Who is me? Ask my dumb-ass-key#84at at at at at at at at at mo sphere[IBM]ogee, wiz, blew it again! fine farts and sparkie textures. dbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdb dbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdb

    63. Re:Uhh.. by Moraelin · · Score: 1

      Sorry, there is no silver bullet that will make it impossible to write insecure code. There will never be. Much as it's every PHBs pipe dream to buy some magical +5 Cloak of Security that will allow them to make secure programs with clueless monkeys instead of programmers, it's just that: a pipe dream.

      You know why? Because the compiler can't know what you're trying to do with that data.

      No, I'm not only talking about array index bounds checking, and other easy stuff. That's the easy part. If that's what your +5 Magical Cloak of Security solves, no offense, but you don't even _start_ to have an idea about security.

      Most real security decisions have to do with _what_ kind of data you're handling. (No, not just data type, but for example is it a user ID? A password? Etc.) And _how_ could that be mis-used or attacked, in the very speciffic context of your program? (E.g., can I just edit my ID to that of another user, without knowing their password?)

      E.g., a mistake I've seen here involved just passing the (sequentially generated) user ID around in the URL after login. The result? Anyone could edit that ID and pretend to be another user. User 0 was predictably the super-user, so anyone editting their ID to that would have absolute power over that site.

      E.g., in the same program each user should have only been able to see the records they "own". (Like in a web-email program you should only see your own emails, either received or sent, but not those from other users' inboxes.) What did those morons do? They checked ownership only when generating the list of links to the records. But not when displaying or editting the actual data. So if you editted the URL instead of only clicking on the supplied links, you could see and edit _any_ user's data. (Including the super-user's password, among other things, as if impersonating him via the ID wasn't enough.)

      E.g., a more insidious mistake was failing to even think about accountability and non-repudiation. A user cancelling their account would cause a cascaded delete of any records related to them in any way. A user could do any crap, delete their account, and... he had never existed, according to the system. Every single trace of them had been erased.

      Etc. I could go on and fill a tome with such mistakes that had nothing to do with buffer overflows or pointers. They're _conceptual_ problems. They're a problem of the very _design_.

      Those are things no compiler or other tool will ever automatically solve for you. Again, because no compiler will ever know the _semantics_ of that data. What does it mean, in which ways is it used, what are the risks associated with it? No compiler can answer that for you.

      There is no buying magical talisman and getting an easy way out. The _only_ real way out is to stop hiring only the cheapest monkeys, and actually bring someone who has a clue. It may not fit your ideal of practicality, but it's the _only_ way out nevertheless.

      --
      A polar bear is a cartesian bear after a coordinate transform.
    64. Re:Uhh.. by llefler · · Score: 1

      No, there is no such thing as an Ok warning. Trust me, I have a lot of experience with this from the production side. The problem is they get ignored; they're ok, right? But the more noise you create during compile and execution, the more likely a bad warning will get missed.

      I have been programming for over 20 years, and I have yet to find a warning I couldn't get rid of. And I personally will not put ANY program into production that doesn't compile clean.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    65. Re:Uhh.. by LifesABeach · · Score: 0

      Well, acutally it goes back to the beginings of software developement. The lesson is:

      1. First build the application so that it runs to requested specifications, ( development work ).

      2. Get paid for doing what was asked for, ( project feedback ).

      3. Adjust the coding so that unkown errors that are now known are removed, ( maintanence work ).

      4. Get paid for doing what was asked for, ( project feedback ).

      5. Go to step 3.

      Adminstrative Note:
      Corperate goals affect the speed of the above presented model when applied to the consumer model.

    66. Re:Uhh.. by Red+Angel · · Score: 1

      Problem is: Good programmers are becoming fewer and farther between. Good programmers are becoming an endangered species because they just don't get along well with CEOs. This is because the CEO is all about deadlines, and will invariably cross swords with a good programmer, who insists on taking however long it takes to write the program propperly.

    67. Re:Uhh.. by llefler · · Score: 1

      Oh, c'mon; I haven't written a call of gets() in years.

      You do realize, gets() is just one example? How about this one, it's one that your compiler should either catch, or the runtime environment should handle:

      void SimpleFunction(char str[])
      {
      char str2[20];

      strcpy(str2, str);
      }

      int main()
      {
      char str1[25];

      SimpleFunction(str1);
      return 0;
      }

      There is a good chance you're going to overflow the array and C/C++ doesn't check. A smart compiler would give you a warning about the size mismatch. An Ok compiler will insert runtime code to at least truncate the str value being put in str2.

      Attributing all security problems to things like buffer overflows shows an incredibly shallow understanding of the issue.

      Really... hmm, let's examine that:

      Phatbot trojan - exploited a core dll buffer overflow (probably ntdll.dll), RPC buffer overflow, Workstation buffer overflow.
      Code Red and variants - ntdll.dll buffer overflow
      WebDAV - ntdll.dll buffer overflow
      SQL Slammer - buffer overflow in SQL server resolution service.
      There has been an MDAC buffer overflow
      Windows SNMP - ASN buffer overflow

      Bind - buffer overflow
      OpenSSL - buffer overflow
      Apache - mod_ssl - open ssl buffer overflow
      Sendmail - buffer overflow
      Unix SNMP - buffer overflow(s)
      OpenSSH - buffer overflow(s)
      NIS/NFS - buffer overflow(s)

      Granted, there have been other security issues. Social engineering is a big one. People still click on attachments. People still give strangers their passwords.

      Buffer overflows are so serious that Microsoft has finally given up on backward compatibility and turned on bounds checking for XP SP2.

      Protocols that are old and use cleartext are things we know about. They are readily documented. Cleartext wasn't a design concern when they were created, it is now so there are alternatives.

      Encryption? Why do average programmers need to know the nuts and bolts of encryption? That's what libraries are for. Let the people who specialize in encryption routines handle that and the average programmer can concentrate on putting out quality code. But if you really need the details, I hear there is something called Open Source out there somewhere. I don't write drivers, I don't write graphic engines, I write applications and leave specialization to people who have the interest and the time to do them right.

      And quite frankly, if you can't find information on software vulnerabilities, you haven't learned how to use google. Take a look at CERT, take a look at SANS. There are books available. There was just an article on a school in California that was teaching an 'ethical hacker' course.

      Oddly enough, those insigificant buffer overflows and e-mail trojans are what give business managers heartburn. They might have 1 FTP server and web server. They have thousands of desktops and hundreds of file and app servers. The unlucky (not real bright) ones still see their networks fall over when a new one is found. And the prepared ones spends days every month updating their virus signatures as well as testing and installing patches. I have seen the cost of buffer overflows. I have seen ONE FTP server rooted, and guess what, it was a buffer overflow in wuarchive ftp server.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    68. Re:Uhh.. by Anonymous Coward · · Score: 0

      doesn't compile clean.

      "cleanly".

    69. Re:Uhh.. by Anonymous Coward · · Score: 0

      While I agree with you in principle, when writing free software this is often difficult to do. Because you need to assume that people are going to compile your program on lots of different hardware, with different compilers, with different C libraries, and on different OSs. If you have access to every permutation of every one of these, and have the time to test and remove the warnings for all of them, good for you. Your code may just end up being a horrible mess of #ifdefs and such.

      Or you could write code that compiles cleanly on common architectures and that conforms to standards, and accept that maybe on OpenVMS on Alpha running using a proprietary compiler written by the King of Fiji in his spare time, you might have a warning or two.

      Of course if you're writing proprietary software whose source will not be distributed and whose target configuration is acceptably narrow, why not get rid of all the warnings.

    70. Re:Uhh.. by jrockway · · Score: 1

      Self-deprecating eh. Buy me version 2.0! 1.0 is deprecated!

      --
      My other car is first.
  2. ActiveX a response to Java? by SilentChris · · Score: 5, Insightful

    "Microsoft responded with ActiveX, which bypasses security entirely by making it easy to blame the user for authorizing bad code to execute"

    Uh, not quite. ActiveX was more a response to JavaScript/Flash/et al. Anything that created a lightweight web app. .NET is their response to Java (and, for all intents and purposes, .NET is miles ahead of anything MS has ever created in terms of security).

    1. Re:ActiveX a response to Java? by tcopeland · · Score: 5, Insightful

      > ActiveX was more a response
      > to JavaScript/Flash/et al.

      Right on... I thought the "ActiveX was a response to Java" was a bit of a stretch too. Also, the author says

      > "everyone complained about wanting to
      > bypass the "sandbox" to get file-level
      > access to the local host.".

      I'm not sure that was why applets were not a big hit... I'd blame the slow JVM startup time for that one.

    2. Re:ActiveX a response to Java? by StephenLegge · · Score: 5, Interesting

      I think the writer meant ActiveX was Microsoft's response to Java *Applets*.

      Java Applets had a well-defined and flexible security API that provided fine-grained set of privaleges for what an Applet could do on the user's system.

      To combat Applets, Microsoft implemented ActiveX with brain-dead all-or-nothing approach that is still used today ("Do you want to trust whoever wrote this to do anything they want to your system? Yes / No"). Then Microsoft forced Java Applets to work the same brain-dead all-or-nothing way in IE.

      SLL

    3. Re:ActiveX a response to Java? by jeffy124 · · Score: 3, Interesting

      .NET is miles ahead of anything MS has ever created in terms of security

      I'm a little hesitant at that. About a year ago plus (when I was still in college), a MS guy came to campus to give a demo on .NET, and that included a survey of the security features. A classic MS fallicy has happened here too: The Feature Creep. It is so overloaded with features I felt it made the thing unusable and difficult to understand.

      My suspicions were confirmed when the guy couldn't get a Demo to work correctly. His demo program, written in C# and provided to him by MS, was supposed to deny him access in scenario #1, and it worked correctly. But he couldn't retool the program to get scenario #2 right, where access was to be granted. No matter what the guy did, he kept getting denied access. Makes me wonder whether scenario #1 was actually correct or provided the expected denial for a different reason than intended. Oddly enough, the same guy had it working at a conference of local ACM chapters a week earlier.

      My take on something like this: Yeah, you could get the configuration right when setting up your security model. But if it's this easy to get it wrong such that the program is unusable, then it's just as easy to get it wrong while still being usable.

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    4. Re:ActiveX a response to Java? by Tassach · · Score: 3, Informative
      Almost, but not quite

      ActiveX was MS's answer to Java Applets. Flash is another applet alternative.
      .Net is MS's answer to J2EE.

      J2EE and Java Applets, despite being written in the same langage, have very little to do with one another.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    5. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      Mod up. This guy is correct.

    6. Re:ActiveX a response to Java? by localman · · Score: 1

      I'd blame the slow JVM startup time for that one.

      And the fact that less than half of the time I let the JVM start up, the applet just crashed or behaved erratically anyways.

      I'm not down on Java. I even made a goofy Java game. But regardlesss of whose fault it was, I think "Java" and "Browser lockup" became nearly synonymous.

      Cheers.

    7. Re:ActiveX a response to Java? by tcopeland · · Score: 1

      > I think "Java" and "Browser lockup"
      > became nearly synonymous.

      So true. That's why I went with JNLP for my tetris clone. Of course, JNLP has got its own problems... argh.

    8. Re:ActiveX a response to Java? by swb · · Score: 1

      Wasn't part of the "attraction" of ActiveX that it gave applets a "normal" Windows user interface, and not the relatively crippled UI that people were experiencing around that time with Java applets?

    9. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      I think you are missing the point. The author is saying that ActiveX is a response to the limitations inherent in how Java applets are sandboxed(eg they can't save work to disk). ActiveX allows access to the operating system over the web which allows for much greater utility, but much less security. The sandboxed Java applet allows for great security, but little utility. There is some other Java technology I don't recall the specifics of at the moment that prompts the user every time the program tries to access local resources. This provides good utility and security, but poor usability.

    10. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      I like to keep up to date on the latest and greatest coming out of Microsoft. A while back I had the opportunity to play with some Alpha releases of Whidbey. Although it was fun to get an early look at some of the stuff coming out in the next release I felt that from now on I would wait until at least Beta 1. This probably puts me a little further back in regards to getting a hand on feel for all the cool stuff coming, but I don't have much other choice. I spend a lot of my "free" time doing side projects for all sorts of different clients. Most of the projects are pretty small but they do allow me to bring in a little bit of extra cash flow which never hurts. Since I certainly can't use an Alpha for these side projects it's extremely difficult for me to spend much time mucking around with all the new features. Needless to say I'm looking forward to a Beta that has a Go Live license so I can start using Generics and all the other cool features in Whidbey. Since Beta 1 is closer to that all important go live license I might be able to justify a little time playing. Either that or I need to figure out how to get on the team Craig is on for the MSDN "project."

    11. Re:ActiveX a response to Java? by reallocate · · Score: 1

      MS cranked up the PR machine when Java hit the street, but I'm pretty sure ActiveX predates Java, at least in implementation if not name.

      --
      -- Slashdot: When Public Access TV Says "No"
    12. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      Java Applets in IE are actually implemented using ActiveX.

      The root post is correct -- the technologies aren't comparable. However StephenLegge is also right in that MS Marketing confused the two.

    13. Re:ActiveX a response to Java? by DunbarTheInept · · Score: 1


      I'd blame the slow JVM startup time for that one.

      Buggy JVM's were a bigger problem. Turning off Java in your browser was often necessary to keep the browser from crashing, or orphaning memory.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    14. Re:ActiveX a response to Java? by jfengel · · Score: 1

      The intent of the sandbox was not to make it impossible for Java applets to do work, but rather to limit their capabilities at a fine granularity.

      ActiveX has an all-or-nothing security model because it's written in native code. Very fast, low overhead, incredibly dangerous.

      A Java security policy can say, "Applications signed by this signer can write files into directory foo, and access the internet but not the printer."

      There's a lot of overhead, and I never saw a way to make it easy. You can do it by modifying config files, and I'm sure there's a GUI out there somewhere for the config files, but it's still pretty inconvenient. Convenience and security are frequently at odds.

      There should have been a good compromise, but Sun seems to have largely abandonded the applet in favor of server-side work (and to a lesser degree, non-applet applications work). They're gradually making it better with Java Web Start, but I haven't seen it used very much, since applets got themselves such a bad name at the start.

      (And with good reason. I adore Java on the server side, and find it easier than C++ on the client side, but never liked applets.)

    15. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      Boy, that's a great story. Doesn't have fuck all to do with anything unless you have an example to point at, but it's a nice story.

      Seriously, this would be great feedback, if you actually had data about what doesn't work. Instead, you have impressions based on your own personal biases and a bad demo. How is that relevant?

    16. Re:ActiveX a response to Java? by StephenLegge · · Score: 1
      True that since ActiveX controls were developed the same way as Windows apps, developers had access to all the neat GUI widgets Windows development tools provided. (I remember building ActiveX controls in Delphi way back when.) However, ActiveX was Windows-specific so it would *only* work in IE. This pretty much made it a non-starter technology in the days when Netscape had more than 50% of the browser market.

      But you could make powerful GUI apps with Java AWT (check out games.yahoo.com for some great examples of AWT applets). With Java 2 came Swing with more GUI widgets. But by that time the Microsoft machine had done too effective job confusing perception of Java and Applet technology, and doing their best to make sure Windows users weren't going to easily get themselves a Java 2 VM for their browser.

      It's clear that Microsoft's ActiveX strategy was to kill Applets which threatened the dominance of the Windows platform. Creating the perception of Applets as "insecure" by constraining them to ActiveX's brain-dead security model was just one battle in their little war.

      SLL

    17. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      ActiveX has an all-or-nothing security model because it's written in native code. Very fast, low overhead, incredibly dangerous.
      A Java security policy can say, "Applications signed by this signer can write files into directory foo, and access the internet but not the printer."


      Er... sorry?

      There is absolutely no technical reason why a native code application should not be given exactly as finely tuned security model as you describe for Java. All it requires is for the OS to support it. Windows doesn't, but you can't say that therefore native code is inherently less secure than bytecode, any more than you can claim that computers which store data on hard disks are less secure than computers which use punched tape (hey, how many ENIAC viruses are there? It must be better than Windows then!)

    18. Re:ActiveX a response to Java? by jrumney · · Score: 1
      MS cranked up the PR machine when Java hit the street, but I'm pretty sure ActiveX predates Java, at least in implementation if not name.

      Certainly not. COM might have been, but COM is only a part of ActiveX. The on-demand install and signing aspect of it (which is where it "competes" with Java) came long after Java applets first came out.

    19. Re:ActiveX a response to Java? by Tim+Browse · · Score: 1

      Yes, ActiveX controls are OCX controls, which arrived on the OLE 2 boat, which was a year or two before Java, I think.

      You remember the raging success of OLE 2, surely? :-)

    20. Re:ActiveX a response to Java? by Grey+Ninja · · Score: 1

      Sorry to be nitpicky, but isn't Flash on Internet Explorer an ActiveX Object?

    21. Re:ActiveX a response to Java? by Decaff · · Score: 4, Informative

      Uh, not quite. ActiveX was more a response to JavaScript/Flash/et al. Anything that created a lightweight web app.

      Uh, yes quite! ActiveX was exactly and precisely a response to Java - Java Applets that is. The idea was to run embedded binaries in a web browser. ActiveX components would run only on Windows, so they could use the Windows APIs, and so not require a plug-in or pre-installed VM, like Java Applet. ActiveX 'security' was by digital authentication, as against Java's sandbox. ActiveX is not related at all to client-side scripting, as with JavaScript. Microsoft's response to JavaScript was - to support JavaScript. .NET is their response to Java (and, for all intents and purposes, .NET is miles ahead of anything MS has ever created in terms of security). .Net is what MS developed when they decided not to support Java client-side. Its pretty good in terms of security, but still has weaknesses when compared to Java.

    22. Re:ActiveX a response to Java? by Brandybuck · · Score: 1

      How is that relevant?

      It's just as relevent as all the .NET advocacy impressions from the other side.

      --
      Don't blame me, I didn't vote for either of them!
    23. Re:ActiveX a response to Java? by Anonymous+Writer · · Score: 1

      Was ActiveX a response to OpenDoc? I forget which came first- CyberDog or Java.

    24. Re:ActiveX a response to Java? by jfengel · · Score: 1

      It's true: in theory an OS could be written to support application-level fine-grained security models. Some operating systems do.

      It's harder to do it in a component fashion. An ActiveX program runs in the same space as Internet Explorer, and in theory could even modify IE's own program code in memory. It would be possible to write an OS which segmented parts of a process' memory space, but I'm not aware of any which does so. Such an operation would involve some performance overhead.

      At a purely theoretic level, the JVM and Windows are just Turing machines and are equivalent in expressive power. But there's a difference between the theoretical and the feasible. It is more convenient for a bytecode-driven application to check the memory accesses than for a native code one (using existing native code sets).

    25. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      OpenDoc was a response to OLE (later renamed to ActiveX later renamed to COM).

      CyberDog was interesting, but it never shipped 1.0, and there never was anything really useful done with it, unlike Java/ActiveX.

    26. Re:ActiveX a response to Java? by SilentChris · · Score: 1

      ".Net is MS's answer to J2EE."

      I would say .NET Compact Framework is much closer to J2EE than .NET is.

    27. Re:ActiveX a response to Java? by SilentChris · · Score: 1

      "Its pretty good in terms of security, but still has weaknesses when compared to Java."

      Such as? Curious to hear this. Most people I've talked to say the two are about neck and neck.

    28. Re:ActiveX a response to Java? by Decaff · · Score: 3, Insightful

      Such as? Curious to hear this. Most people I've talked to say the two are about neck and neck.

      For example, you are allowed an 'unsafe context' in .Net, so you are back to using raw pointers as in C - same security and crash problems.

      Secondly, you can use the Win32 API directly - same crash possibilities.

      You can do unsafe stuff in Java, but only if you write a C library and access it using JNI. By default, there is no 'unsafe' equivalent in Java, which allows things like different apps to share the same VM safely.

    29. Re:ActiveX a response to Java? by reallocate · · Score: 1

      I stand corrected. Memory is a strange thing.

      --
      -- Slashdot: When Public Access TV Says "No"
    30. Re:ActiveX a response to Java? by kaffiene · · Score: 1

      Sepak for yourself. I hate C#, whereas I like Java for most programming (drivers and kernel modules excluded)

      This is due to buggy tools and a crap API mainly. But there are some ***stupid*** things in C# which it got from it's Delphi inheirtence - like properties. E.g.: this won't work in C# if b and c are properties:

      a.b.c = xyz;

      But it will if they're ordinary members.

      That's just one example, I have lots of other bugbears about that steaming pile of shit (security, language 'features'), but suffice to say, Java and C# are anything but 'neck and neck'.

    31. Re:ActiveX a response to Java? by Anonymous+Writer · · Score: 1

      I thought it was the other way around- I thought OLE was a response to OpenDoc.

    32. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      Not even close. OLE2 shipped with Office 4 in 1994. OpenDoc didn't ship until 1996 or so.

      http://en.wikipedia.org/wiki/OpenDoc

    33. Re:ActiveX a response to Java? by Anonymous Coward · · Score: 0

      I think that ActiveX controls have been around since the early versions of VB. That has to be way earlier than when Joy though about putting a runtime in a toaster. When run in the browser they can be signed to grant fine grained privileges. The uninformed wannabe intellectual technology bigots on this site really make me wonder some times. Open source apparently does not equal an open mind. Anyone who is 100 percent sure of there opinions is probably not near 100 percent correct. Note to the webmasters, there are not enough mod points to clear out the morons on this board, especially if you give the mod points to the morons. It is like bullets in the guns of children.

    34. Re:ActiveX a response to Java? by jrumney · · Score: 1

      After a bit of research, I stand corrected too. I thought the timespan was much longer, but Java did not come out until Feb 1996, with development tools for ActiveX following in around May, and IE 3.0 with ActiveX support in October of the same year. So "long after" is a bit of an exageration, though things were changing a lot faster back then so it seemed like a long time.

  3. The human factor by SIGALRM · · Score: 5, Insightful

    Anything we do to improve software security must work without the programmer having to switch languages

    I agree; it's not so much the language--or the tools--each developer on a project must be personally aware of vulnerabilities and exploits. Using "managed code" does not "secure" your projects. These days, a C programmer ignoring the dangers of gets(), for example, is incompetent and should not be trusted. It's not, as the article reads, "sloppy"... it's ignorance pure and simple.

    Also, relying on tools like an updated gcc, gprof, or splint--helpful as they are--without experience and education in writing secure code... is asking for trouble also.

    --
    Sigs cause cancer.
    1. Re:The human factor by Short+Circuit · · Score: 5, Insightful

      ...it's ignorance pure and simple.

      No, it's not. You try being a programmer with a six-digit salary, a mortage, and a workload Hercules couldn't metaphorically shoulder.

      Fast, good, cheap. Companies have chosen to drop "good" in favor of fitting more products through the pipeline.

    2. Re:The human factor by surreal-maitland · · Score: 3, Insightful
      absolutely.

      i think a major part of the problem is that security is not an idea which is ingrained in young programmers from the start. i believe this is because teachers don't want to overwhelm students who are learning a whole new set of ideas already, but it's critical that security be something that is kept in mind at all times when programming. i mean, nobody ever *means* to introduce security bugs. there are a few simple techniques which take only a little more time and can save you a lot of heartache later on. for example, *checking* for buffer overflow. most of the time you won't need to, but if it's a part of your style, you'll never have to worry about it.

      --
      -ninjaneer
    3. Re:The human factor by Timber_Z · · Score: 1

      And where do you get the training to write secure code?

      College only thought me how to get something down. Not the right way.

      Books teach the easy way to get something down.

      Most of the security I've picked up has been from web forumns or personal experience. The rest has been the small tidbits that my books have provided. And these are mostly O'Reilly books.

    4. Re:The human factor by Anonymous Coward · · Score: 1, Funny

      and a workload Hercules couldn't metaphorically shoulder.

      You've got the wrong job. Try flipping burgers.

    5. Re:The human factor by msobkow · · Score: 1

      In all fairness, the APIs needed to ensure buffer checking is done have been available for quite some years now. It really is long past due for the maintainers and vendors to start pruning the old, vulnerable API's so people can't use them any more.

      As you've mentioned, functions like gets() are a vulnerability. That being the case, why leave it in the API set when there are safe alternatives?

      --
      I do not fail; I succeed at finding out what does not work.
    6. Re:The human factor by Anonymous Coward · · Score: 0

      You try being a programmer with a six-digit salary

      What do you expect? Seven digits for programming computers? I suggest you wake up from your dream, the dot com days are over. And even then programmers didn't make that much.

    7. Re:The human factor by surreal-maitland · · Score: 3, Insightful
      you could argue, though, that 'good' saves you time in the long run because you don't have to patch and patch and patch and eventually scrap it and redesign.

      ignorance isn't always the fault of the programmer, but if he doesn't have the knowledge, ignorance is still the problem.

      --
      -ninjaneer
    8. Re:The human factor by Short+Circuit · · Score: 1

      Program for twenty years. Get a good local reputation. Then get hired away into such a job. Don't expect to get up to that kind of money from raises alone.

    9. Re:The human factor by Anonymous Coward · · Score: 0

      with a six digit salary I wouldn't give a damn about a mortgage, it would be easily covered, even in the low end of the 5 digit salaries. you get paid 6 figures you bloody well should have a huge workload.

    10. Re:The human factor by Anonymous Coward · · Score: 0
      College only thought me how to get something down. Not the right way.

      Ah, truer words were never spoken.

    11. Re:The human factor by feed_those_kitties · · Score: 0, Flamebait

      Oh you poor thing... A six-digit salary? How do you survive?
      Try being a programmer making half what he was two years ago, (well under six-digits, for sure!) a mortgage and that same workload.

    12. Re:The human factor by leerpm · · Score: 5, Insightful

      you could argue, though, that 'good' saves you time in the long run because you don't have to patch and patch and patch and eventually scrap it and redesign.

      Try arguing that to the CEO, who is seeing his marketshare drop by 25% to his competitors, because his development team needs 2 extra months to ensure the security is top-notch. The reality is until the market and customer start demanding that security be a priority, there isn't going to much of a change from the status quo.

      That is part of the reason why Microsoft is so successful, they listen to what the customers want. Up until now their customers wanted features, features, and more features. Now their customers have started to realize that security can have a significant impact on their bottom line. So they are wising up to the situation and demanding that software vendors (not just Microsoft) start making security a priority too.

    13. Re:The human factor by Anonymous Coward · · Score: 0

      College only thought me how to get something down.

      In college, you would have been taught how to get your homework done.

    14. Re:The human factor by Anonymous Coward · · Score: 0

      And (probably) the wrong demigod. Hercules did shoulder the world briefly, but it's primarily Atlas' job.

    15. Re:The human factor by Anonymous Coward · · Score: 0

      You're NEVER going to make a million per year just by programming. You'd have to be some kind of god to earn that much.

    16. Re:The human factor by javajedi · · Score: 1

      Just because you have a hard time keeping up with your workload doesn't change the fact that it's still ignorance.

    17. Re:The human factor by Short+Circuit · · Score: 1

      Not me, actually. My dad. He's got thirty years's experience as an electrical and software engineer, plus time in the navy. (He tested out of the electronics classes, and served as teacher's assistant.)

    18. Re:The human factor by saintp · · Score: 1
      Bingo. Bingo bingo bingo.

      Although I only had a minor in CS, I can safely say that we learned nothing (as in nada) about security; it just wasn't taught. They've already got to teach data structures and algorithms and OOP and multi-processor programming and so on and so forth that security gets lost underfoot.

      Consequently, when I worked as a PHP programmer for several years, I got to teach myself about security.

      Of course, I don't expect teachers to go over every little security hole; they can't possibly do that, any more than they can teach you every language, or even all of C. But if they teach students to think primarily of security, then they'll be able to identify potential problems given their specific language/platform/implementation/whatever. It's the same idea as teaching algorithms and letting students figure out GTK or DirectX or whatever on their own.

      Give me a foundation in security at least!

    19. Re:The human factor by Surt · · Score: 1

      Maybe by 6 digit salary he meant to imply that he's high on the get fired soon list because he's overpaid for what he's doing. Therefore the pressure of his deadlines seem all the more weighty, because any failure on his part will be all the excuse they need to fire him?

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    20. Re:The human factor by Anonymous Coward · · Score: 0

      SIX digits. not SEVEN.
      1,000,000
      1,234,567

    21. Re:The human factor by Anonymous Coward · · Score: 0

      He was COMPLAINING about six digits. He obviously thinks he SHOULD BE GETTING seven.

    22. Re:The human factor by dcsmith · · Score: 1
      Oh you poor thing... A six-digit salary? How do you survive?

      Lighten up - hes earning less than minimum wage. Assuming he FT, minimum wage is just over $10K annually. He wasn't specific, but at six figures he can't be earning more than $9,999.99.

      --
      This has been a test. If this had been an actual Sig, you would have been amused.
    23. Re:The human factor by Anonymous Coward · · Score: 0

      Something down? Really, how did you make it through college with that spelling? Evolution should have sorted you out long ago.

    24. Re:The human factor by Anonymous Coward · · Score: 0

      Translation: You try being a programmer with a six-digit salary, a [house] (this implies a loving family), and a [job].

      aww you poor baby! Want to trade?

    25. Re:The human factor by Paladine97 · · Score: 2, Funny

      I think I see your problem. You should become Atlas instead of Hercules! I hear he can bear more on his shoulders...

    26. Re:The human factor by Tassach · · Score: 1
      'good' saves you time in the long run
      The problem is, the vast majority of managers don't think in the long run. You're lucky if you can get them to think as far ahead as the next fiscal year.

      In their defense, however, sometimes it is the correct business decision to sacrifice quality for delivery time. Managers have to consider many factors besides the purely technical aspects of the project. Writing the perfect program does you no good if the company folds because it wasn't ready when they needed it.

      There are often contractual or market-based factors which dictate that you release on a given day whether the software ready or not. If you're counting on selling your product during the Christmas rush, then it's got to be on the shelves for "Black Friday" come hell or high water. There are many situations when "buggy, but on time and under budget" beats "good, but late over budget". Having the time and money to do it right the first time is a luxury many companies just don't have.

      As an engineer, you have to do the best job you can do with the resources you have to work with, and to communicate to management the trade-offs you have to make in order to stay within the constraints you have been given.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    27. Re:The human factor by stevey · · Score: 2, Insightful

      Secure Programming for Linux and Unix HOWTO is one attempt to correct this.

      I agree though, most books are filled with examples and have merely a warning in the introduction "To reduce the size of code listings all error checking has been removed from our examples".

      I wish more people read documents like that I linked to above, but people can get suprisingly far into their careers before this becomes obvious to them.

    28. Re:The human factor by Anonymous Coward · · Score: 0

      "Get X down" is an idiom for writing the idea out (usually on paper). What the hell does "sorted out" mean? Is this like a fire drill in elementary school, where they order the class by height on the theory that tall people burn slower?

    29. Re:The human factor by Anonymous Coward · · Score: 0

      Wow, that's a horrible life you have there... I'm unemployed with no romantic prospects, a ruptured disc in my back, and medical bills to pay.

      But ya know, I'm damn happy and praise the Lord every day because I can walk (more like hobble) around the block again and am starting to get a hint of what it might feel like to not be in pain every waking moment of every single day, after months.

    30. Re:The human factor by Sabaki · · Score: 1

      This may be what the author meant, but it's not what is traditionally considered "six figures". Usually that would mean dollars, not cents, so a six figure salary would be $100k ($100,000) and above.

    31. Re:The human factor by PhxBlue · · Score: 1

      Try arguing that to the CEO, who is seeing his marketshare drop by 25% to his competitors, because his development team needs 2 extra months to ensure the security is top-notch.

      Easy. "Sir, we can spend two months making sure this product is secure when it ships, or we can spend two months and millions of dollars in losses when the flaws we haven't had time to locate make our software unusable for 30% of the PCs on the market."

      --
      !#@%*)anks for hanging up the phone, dear.
    32. Re:The human factor by Tassach · · Score: 2, Insightful
      Using "managed code" does not "secure" your projects.
      No, and it's not supposed to. What it does do is make it EASIER to write secure code by eliminating a very common source of security bugs. This allows you to concentrate on the big picture rather than having to waste time micromanaging the code.
      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    33. Re:The human factor by Anonymous Coward · · Score: 0

      So college THOUGHT him (?) to write out ideas. But not in the right way. Sure. Get a clue.

    34. Re:The human factor by Anonymous Coward · · Score: 0

      CEO: So, what's the chance for someone discovering the security flaws in our product?

      YOU: Well, there's a somewhat high chance.

      CEO: How high exactly?

      YOU: Uhhhh... maybe about 70%?

      CEO: So, what's the chance of someone discovering the flaws before we have service pack 1 out?

      YOU: Uhhhh... maybe about 30%?

      CEO: Great! We'll risk it!

    35. Re:The human factor by Anonymous Coward · · Score: 0

      That being the case, why leave it in the API set when there are safe alternatives

      Every language has its deprecated methods--there for backward-compatibility but unwise to use.

    36. Re:The human factor by PhxBlue · · Score: 1

      That's all good. . . it's his company, and there's only so much a subordinate can do. If he's that determined to walk into a proverbial minefield, he can't say no one warned him.

      --
      !#@%*)anks for hanging up the phone, dear.
    37. Re:The human factor by jilles · · Score: 1

      The reason gets continues to be used is because it is in many textbooks and by default none of the IDEs, compilers, etc. seem to warn against its usage. Any security measure that requires education in order to work is fatally flawed. Security should be fool proof. Tools are your first line of defense and in many programming languages the only line of defense. If GCC doesn't tell you the code is flawed, in many cases you will never find out until it crashes.

      Code that utilizes gets or similarly flawed legacy parts of C libraries should simply not compile without using a --insecure flag or something. If you want potentially insecure code to compile at least it should be a conscious choice. Of course gets isn't really the problem anymore (at least I'm sure that somebody has grepped sourcecode of e.g. sendmail for occurences of gets and buffer overflows continue to be a problem there).

      Personally I find it amazing that buffer overflows still are an issue. The technology to prevent them has been around for decades. I never experience buffer overflows in Java. I do run into bugs in the JVM on very rare occasions (which is written in C). Also sometimes I discover memory or resource leaks in Java software (which eventually prevent continued operation of the software). Java is not immune to that sort of problems but buffer overflows are simply not an issue.

      Considering that buffer overflows are the #1 security problem today, there is something to say for managed code environments. Personally, I believe that running non managed code on a server is irresponsible. The one certainty you have about software packages like sendmail, apache, IIS oracle, mysql, postgresql, openssh, etc. is that the latest buffer overflow won't be the last one to be found.

      --

      Jilles
    38. Re:The human factor by Short+Circuit · · Score: 1

      Well, it's more of, "I'd better not get fired, 'cause I've got a mortage to cover."

      And he's paid appropriately. If the code isn't ready to ship by the deadline, he flies to Korea or China (or wherever the machine is) to get it up and running on site.

    39. Re:The human factor by johnnyb · · Score: 1

      No, the parent is right, we won't have good security until the _users_ require it.

      The fact that you'd have to spend the time anyway doesn't matter when trying to get a product to market. You can lose your whole business fixing security holes while your competitors are shipping new features.

      The keys I've found are:

      1) start with a good architecture

      2) use a good language

      3) don't make it overly complicated

      If you do preventative maintenance, you can get most of the mileage without endangering the customers.

    40. Re:The human factor by Fulcrum+of+Evil · · Score: 1

      That being the case, why leave it in the API set when there are safe alternatives?

      So you don't break existing code. Also, gets() is part of the standard API - if you left it out, your customers will complain that you aren't adhering to the standard API.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    41. Re:The human factor by jc42 · · Score: 1

      You've gotta include gets(), because without it, you can't claim POSIX compliance. Without that, you'll lose most of your contracts. Unless we can get gets() removed from the official standard, we have to provide it, no matter how bad an idea it turned out to be.

      Of course, you can always use the GNU approach, of having tools (the linker in this case) give a loud warning when you use such dangerous tools. But you can't just delete them, not if you're selling in a market that requires compliance with standards.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    42. Re:The human factor by Timber_Z · · Score: 1

      Emergency project this weekend, had to come in on two hours sleep, and I'm still all screwed up from it.

    43. Re:The human factor by Anonymous Coward · · Score: 0

      The reality is until the market and customer start demanding that security be a priority, there isn't going to much of a change from the status quo.

      It's obvious that they are demanding that and, in fact, have been demanding it for quite a while now! But there still isn't much change from the status quo, is there? Face it, Microsoft wouldn't be giving so much lip service to their Security Initiative or bragging about how secure their products are (whether they are or not) unless they perceive a very real desire on the part of the customer. But they are not delivering.

      So where is your change to the status quo? Customers are demanding better security. Microsoft, arguably the biggest force in software today, quite obviously hears it, why hasn't it changed?

      That is part of the reason why Microsoft is so successful, they listen to what the customers want. Up until now their customers wanted features, features, and more features.

      This is the Microsoft party line and has been repeated so often that it is taken as truth.

      Fact: the one time I ever actually attended a meeting with Microsoft and the company I worked for at the time was asked "Well, what features would you like to see in the next version?" their response was: "It does pretty much everything we want; could you just fix all the niggling little bugs that waste our time every day?"

      In the end, Microsoft couldn't or wouldn't hear that and, rather than wasting the opportunity to talk directly to Microsoft, the company ended up meeting until late that night to dream up new features for them to take back to home base.

      Do you understand the difference here? The marketers from Microsoft were not sent out to find out what customers wanted; the marketers were sent out to find out what new features the customers wanted. There is an implicit assumption that all customers want is new features and, when that's all you are sent out to gather, that is all you are coming back with.

      So, I submit to you: is it really that Microsoft gives the customer what they want, or just that their customers must take whatever they are given? This applies to both security and more features/more bugs.

    44. Re:The human factor by Anonymous Coward · · Score: 0

      Bull.

      I could get shipped off to Pakastan to make stuff work. Whether or not it's my fault, and I don't make anywhere near 6 figures.

    45. Re:The human factor by Anonymous Coward · · Score: 0

      > Easy. "Sir, we can spend two months making sure this product is secure when it ships, or we can spend two months and millions of dollars in losses when the flaws we haven't had time to locate make our software unusable for 30% of the PCs on the market."

      Easier reply from the rep from Marketing sitting in at that same meeting: "UH, sir, if we don't ship on schedule, like we've been promising in the trade press and shows for the last N months,, we'll lose those millions of dollars to our competitors, and our former customers will NOT look back - customers may scream to High Heaven about various kinds of software failures but they do not switch back once they've made a choice. The product must ship as scheduled, or let's not even bother."

    46. Re:The human factor by msobkow · · Score: 1

      True enough, but standards can be changed, and have in the past. It's called "deprecation".

      As to existing code, there are safe alternatives. Functionality is not being removed, therefore the code could be corrected.

      Any product manufacturer who cares about their code quality and system security should have made plans to clean up those problems regardless of whether it's a "standard" API. Those who aren't doing so are foolishly leaving their applications vulnerable to security problems, and I'd expect their customers to hold them liable for the resulting problems.

      Open source in particular has no excuse for continuing to use such APIs.

      The poster below you mentioned having the compiler flag such security risks -- I don't leave warnings in my code. Having the compiler flag them is an excellant way of locating the problems so they can be fixed. The only warnings code should produce are very specific type casting issues under controlled conditions (e.g. numeric objects that are expected to truncate values that exceed the storage size.) Anything more is a sign of issues that can cause unexpected behavior on some platforms.

      --
      I do not fail; I succeed at finding out what does not work.
    47. Re:The human factor by leerpm · · Score: 1

      No users have not been demanding it for a long time. Up until a year or two ago, a lot of organizations did not even bother patching their computers frequently. It has only come in the last year or so that people have started to take this serious. Of course people have wanted some sort of security all along, but they were not willing to pay extra for it, and the almighty buck is what rules the day everytime.

      Since you seem so fixated on using Microsoft as an example for this, I'd like to point out there has been a change too. Windows 2003 is not having the same amount of serious flaws found as its earlier counterpart, Windows 2000. Future releases from Microsoft are going to have even more code written in managed code. This is a good for security because it means no more buffer overflows.

      Microsoft listens to their customers, but not all of their customers want the same thing or have the same priorities. They cannot please all of them, so they have to make a choice.

    48. Re:The human factor by CodeMonkey4Hire · · Score: 1

      Hell, I make $hit for a programmer and my new house is going to be dependent on me continuing to make $hit or better. I'm sure as h3ll hoping that I don't ever lose my job [again]. It took long enough trying to recover from a year of unemployment/underemployment.

      Btw, even $hit for a programmer beats the h3ll out of minimum wage and close. I had a hard enough time holding onto my engagement/marriage and apartment with unemployement + low wage.

      And the company I'm at now.... You ever have a president/salespeople that loves to make impossible promises about your product and then you have to squeeze half-assed features in with no time in the budget. AND we're programming in VB6! We adhere to fast and cheap. *Good* is not in our dictionary.

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
    49. Re:The human factor by k12linux · · Score: 1

      And the CEO will think to himself... if we beat our competitor to market, I'll be able to job-hop to a company willing to pay me big bucks. By the time security concerns arise I'll be gone. The great thing is it doesn't matter since the programmers will get the blame and it won't follow me around. Then he'll look in the eye and say, "Do what you need to do to meet the deadline."

  4. Java worked well? by Anonymous Coward · · Score: 1, Interesting

    If Java worked well, it wouldn't be one of the languages that a ton of people hate to work with because of how annoying it is... granted, that is due to the poor VM rather then the problems within the language itself...

    I guess I should be an anonymous coward right now as I'm sure all the people who think Java is 31337 and open source will come and mod me down

    1. Re:Java worked well? by Cryect · · Score: 1
      Hehe, yeah as open source in the future when Sun is about to die for real and they finally decide to keep that promise they have made so many times ;)

      From what I understand the VM has been fixed up. But, many programmers like me already have a bad taste in our mouth from Java. Also IBM's VM I hear is really good except you have to license it, but hey hehe they have some idea of you being able to use it eventually on their super computers potentially.

    2. Re:Java worked well? by cynic10508 · · Score: 3, Insightful

      If Java worked well, it wouldn't be one of the languages that a ton of people hate to work with because of how annoying it is... granted, that is due to the poor VM rather then the problems within the language itself...

      Your argument is attempting to prove that Java does not, in fact, work well. What you're saying goes something like this:

      1. Java doesn't work well.
      2. Therefore Java is annoying.
      3. Therefore a ton of people hate to work with it.

      You can't assume that point #1 is correct because you can never assume that which you are trying to prove. The only proof (albeit subjective proof) you offer is that "tons of people hate to work with it." But if we grant that to you then you're affirming the consequent. Again, something you can not do. This argument doesn't work.

    3. Re:Java worked well? by Anonymous Coward · · Score: 0

      Most Java applications still don't feel native on any OS. I can easily spot a java-gnome application from a mile away. Thats what is keeping me away from Java...

    4. Re:Java worked well? by Anonymous Coward · · Score: 0

      Everything you say is correct - Java is still a Sun promoted item that nobody wanted.
      Java, the language of college-weenies to lazy to learn anything else.

    5. Re:Java worked well? by CarrionBird · · Score: 1
      I don't know how fixed up it is. Since java was introduced I have had faster and faster computers, yet java doesn't run any faster than it used to.

      Java apps still take twice the ram and run slower than native apps.

      It seems to "scale" (bloat to match the hardware) as much as every other category of program does.
      --
      Free Mac Mini Yeah, it's
    6. Re:Java worked well? by cynic10508 · · Score: 1

      Everything you say is correct

      Why thank you.

      - Java is still a Sun promoted item that nobody wanted.

      Now that, I didn't say.

      Java, the language of college-weenies to lazy to learn anything else.

      Not too lazy to learn the difference between "to", "two", and "too" though.

    7. Re:Java worked well? by i_r_sensitive · · Score: 1
      Pray tell, what exactly was use of your little exercise there?

      Other than exercising an odious habit, I mean.

      Are you a grammar Nazi as well as a logic Nazi?

      At least the grammar nazi supplies the correct form as part and parcel of his/her odious habit. You have done nothing of the kind.

      So how, pray tell is someone to learn from your criticism? In other words, can you take your post and make it constructive criticism?

      As it stands, your post is worse than useless. Simply pointing out errors does little, particularly when you cite things like affirming the consequent to someone who you have good reason to believe has no training in these concepts...

      If you want to feel superior with your ability to think logically, fine, well and good. But I'll suggest that the warm and fuzzy feeling from feeling superior is a pale shadow of the warm and fuzzies from teaching others...

      After all, let's take a page out of the grammar Nazi's book, they engage in their odious habit generally because poor grammar drives them up the wall. At least providing the correct grammar has some chance of ameliorating the trigger condition. On the other hand, if you fail to teach the "right way" then the situation never improves, which tends to make one suspicious of why you even bother in the first place...

      Yeah, it's a troll, but no less a troll than logic nazism for it's own sake.

      --
      "Talk minus action equals nothing" - Joey Shithead, D.O.A.
      "Talk minus action equals /." -
    8. Re:Java worked well? by cynic10508 · · Score: 1

      If you want to feel superior with your ability to think logically, fine, well and good. But I'll suggest that the warm and fuzzy feeling from feeling superior is a pale shadow of the warm and fuzzies from teaching others...

      Teaching via brow-beating isn't very convincing either. I don't recall that my explanation of the hole in the argument belittled the poster or otherwise patronized him/her by name calling.

      Are you a grammar Nazi as well as a logic Nazi?

      From A Rulebook for Arguments, 3rd ed., by Anthony Weston: "Do not make your argument look good by mocking or distorting the other side. Generally, people advocate a position for serious and sincere reasons." (Chapter 1, section 5, pp. 6-7).

    9. Re:Java worked well? by kaffiene · · Score: 1

      As someone who has coded in C and C++ for decades, as well as Java and Lisp for a long time, recently Delphi and C#, I really can't understand the /. mentality regarding Java.

      IMO for 99% of large programming tasks, Java is the best bet. It is well designed, secure, quick to develop with and runs fast. For small programming tasks, Python is probably a better options, but I usally program 'in the large' - systems which are highly complex and which benefit from Java's strictness regarding types and exception checking.

    10. Re:Java worked well? by LoztInSpace · · Score: 1
      Since java was introduced I have had faster and faster computers, yet java doesn't run any faster than it used to.
      That may be true, but speed isn't the only measurement of a "good" system. Ease of development & maintenance, lack of buffer overflows, security, reasonably standard APIs, quantity of available developers, platform independence are all legitimate requirements.
      As for scalability, I have issues about using app servers & J2EE where a decent database will generally suffice, but that's beyond the language.
    11. Re:Java worked well? by MrResistor · · Score: 1

      Ease of development & maintenance, lack of buffer overflows, security, reasonably standard APIs, quantity of available developers, platform independence are all legitimate requirements.

      I agree that these are legitimate requirements, but for most applications they are, at best, secondary to the user experience, of which speed is often a critical component. After all, if the user doesn't like using your app, and chooses a competitor which offers a "better" user experience, then all the rest amounts to little more than a waste of time and money.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
    12. Re:Java worked well? by MrResistor · · Score: 1

      From A Rulebook for Arguments, 3rd ed., by Anthony Weston: "Do not make your argument look good by mocking or distorting the other side. Generally, people advocate a position for serious and sincere reasons." (Chapter 1, section 5, pp. 6-7).

      So, in other words, you should counter the CONTENT of their arguement rather than mocking the STYLE with which it was presented. Maybe you should try actually following these rules before you start quoting them.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
  5. "Why fix broken code... by tcopeland · · Score: 4, Funny

    > ...if you can just shoot the message?"

    So true. Thus the logo for PMD, a Java static analysis tool - "don't shoot the messenger".

    1. Re:"Why fix broken code... by Anonymous Coward · · Score: 0

      Are you sure the lead deveolper just isn't a Sopranos fan?

    2. Re:"Why fix broken code... by tcopeland · · Score: 1

      > the lead deveolper just isn't a Sopranos fan?

      Heh, no, but the guy who did the logo is.

  6. ActiveX? by Cryect · · Score: 1
    Ummm gosh, the only ActiveX applets I ever saw was right after it was released. Heh, I often say Java is dead on the web (though I know it isn't completely) but now ActiveX is entirely dead except for like the applet on Windows Update :-P

    Java's main problems with being taken up I don't think had a thing to do with Microsoft, but more with the lack of Sun wanting to open up Java more to make it a free standard. Instead, Sun wanted to license it.

    1. Re:ActiveX? by agclark · · Score: 2, Informative

      There are ActiveX applets all over the place---and not just those with a spyware payload. Think Macromedia Flash/Shockwave, Apple QuickTime, Real Network's player, Microsoft Windows Media Player, etc. You find these apps embedded on countless websites, particularly Flash.

    2. Re:ActiveX? by Cryect · · Score: 1

      Hmm for some reason I didn't think of flash being ActiveX(guess thats correct just one of those instances where I think of it as flash). And those other ones, yeah.... I don't use those and considering you don't have to use the applet HTML markup for them I figured they don't use ActiveX and just hook into the browser a different way.

    3. Re:ActiveX? by rebelcool · · Score: 1

      You're pretty wrong on both counts. Maybe you're thinking of "obvious" applets. ActiveX applets and scripting are everywhere - try setting IE to "prompt" on them and many, many websites will generate the annoying "Do you want to run this?" boxes.

      Same goes for java applets. They're usually small and well embedded in a page's content so you don't notice them loading.

      Rarely will you see either in a page as a "must have" for functionality as activeX is becoming a dirty word, and since MS stopped shipping IE with java.

      --

      -

    4. Re:ActiveX? by CarrionBird · · Score: 1

      Maybe, but all those things will still work without activex. I very rarely run across a site that won't work with mozilla.

      --
      Free Mac Mini Yeah, it's
    5. Re:ActiveX? by Anonymous Coward · · Score: 0

      ActiveX isn't dead, it is used in products like Mercury Interactive's Test Director. Which makes Test Director not a web application as it is touted by Mercury, but a web-delivered Windows app. Although it works under Mozilla if you have the ActiveX plugin installed, it won't work on IE on the Mac or Mozilla on any non-Windows platform, at least not without 3rd party add-ons. I can't say from experience whether Crossover, for example will let the Mozilla Windows ActiveX plugin work enough for Test Director to run on Linux.

    6. Re:ActiveX? by TheRaven64 · · Score: 2, Interesting

      I wonder if you've heard of a site called Slashdot? They have a facility for contacting members by ICQ. It uses ActiveX.

      --
      I am TheRaven on Soylent News
    7. Re:ActiveX? by TheRaven64 · · Score: 1

      Those things are not really using ActiveX. They are using embedded media and IE is using ActiveX to play them. The ActiveX control is not being downloaded from the web site containing the content, it must be preinstalled on the user's system. I can view Flash, QuickTime, Real etc. content on Safari, which has no ActiveX support, without any problems.

      --
      I am TheRaven on Soylent News
    8. Re:ActiveX? by Anonymous Coward · · Score: 0

      Actually they are. If there's a new Flash Player, a small amount of HTML causes IE to prompt the user to download & install the new version from Macromedia.

      The Mac uses "Netscape Plugins" where the user would manually need to go to the Macromedia site in order to download and run the installer.

    9. Re:ActiveX? by Anonymous+Writer · · Score: 1

      I haven't tried out that feature on Slashdot, and I can't find anything in the FAQ on it. ICQ is also available on the Mac- does this mean that it can't do the same thing on a Mac through Safari? I haven't tried it so I don't know.

    10. Re:ActiveX? by Anonymous Coward · · Score: 0

      They will, just not with IE on Windows. IE 5.5SP2 and higher canned the Netscape style plug-ins which is the only other browser plug-in standard out there (with any significant following). Microsoft used this to put the final nail in Netscape's coffin / browser on Windows.

      BC

  7. Blame the Programmer? by stinkyfingers · · Score: 1, Funny

    I resemble that remark!

  8. sometimes too much? by kisrael · · Score: 0

    Like with perl, I'm not always wanting to use strict and warn; I like not having to predeclare all my variables, for one thing...(and sometimes I'd have to lookup how to predeclare some kinds of hashes and arrays...)

    --
    SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
  9. personally... by Anonymous Coward · · Score: 3, Funny

    I blame bad security on the Speak'n'Spell keyboards we have to use in this office.

    1. Re:personally... by MrResistor · · Score: 1

      Heh, I just had an image of a guy in a suit, sitting at a desk in a cubicle, pressing really hard on his crappy, worn out, Speak'n'Spell keyboard, trying to log on to the network, wincing and looking around nervously as it broadcasts every character of his password in its distorted mechanical voice.

      I think I'll be chuckling about that all day.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
  10. The bad ol' days... by mratitude · · Score: 5, Insightful

    I remember the bad ol' days when security was a matter of what you did or didn't do rather than what you didn't know was occurring without your knowledge!

    Abstracting the user from programmatic events wasn't supposed to make your use of the computer a crap-shoot.

    --


    Mod me troll, if you must, I can't help it.
    1. Re:The bad ol' days... by Anonymous Coward · · Score: 0

      Really, your, what? 72 years old?

  11. It is time by roman_mir · · Score: 4, Interesting

    It is time to create an official Engineering Certification for software designers/developers, the certified Engineer will have to be financially responsible (insurance etc.) for their creations.

    I would like to see that happen, anyone else?

    1. Re:It is time by Anonymous Coward · · Score: 0

      I think this is long overdue, and should be a requirement for anyone who claims to be a "software engineer".

      On a personal note, I've been spending time on my own teaching myself how to be a more disciplined developer and write more secure code. Having a certification or other training would be a good start.

    2. Re:It is time by stinkyfingers · · Score: 2, Funny

      More methods to make lawyers rich? I'm torn.

    3. Re:It is time by gront · · Score: 3, Informative
      They already have that, its the whole FE/EIT/PE type deal.


      Not real popular with EEs, unless you are in power systems. I've never heard of a software engineer with a PE stamp, but the system is in place.



      http://www.ncees.org/licensure/licensure_for_eng in eers/

    4. Re:It is time by enjo13 · · Score: 2, Insightful

      Yes, that would be great. Open source would cease to exist overnight for one.

      We could all be just like doctors, and spend half of our salaries paying for malpratice insurance. That's AWESOME.

      --
      Turn s60 photos into awesome videos with mScrapbook for all S60 3rd edition phones!
    5. Re:It is time by alex_tibbles · · Score: 2, Insightful

      here in the UK the BCS in conjunction with the Engineering Council do accreditation for Chartered Engineer (CEng) status, and the new Chartered IT Professional (CITP) too.

    6. Re:It is time by Anonymous Coward · · Score: 0

      Chemistry and fluid dynamics are complete wastes of time for 95% of programmers, and the "Computers" section of the FE exam dates to circa 1960. "Flowcharts"? Where's the UML, the state machines, the O(n), the Liskov substitutability?

    7. Re:It is time by Anonymous Coward · · Score: 0

      No.
      They have that for some P.E. (Professional Engineer) licenses and I think it's a terrible idea. An engineer can lose his house and or his license because of one little mistake. Current programmers can and should do better but I don't want to lose my life's work because I used a instead of a = in a for loop in an anti-virus program.

    8. Re:It is time by primus_sucks · · Score: 1

      Yes, but our salaries would rise dramatically, since you would have to employ 10X as many programmers to make sure software was 100% bug free.

    9. Re:It is time by Anonymous Coward · · Score: 0

      So anyone who wants to code should have to go through a layer of government red tape before they can legally sit down at a computer and use a compiler?

      Hell no.

      If you want to drive more jobs overseas to India, this is the way to go.

    10. Re:It is time by roman_mir · · Score: 1

      Why are you putting words in my mouth? See my replies to the other participants in the conversation.

      I did not say you have to be a certified engineer to code, I said that there should be a clear way for companies to attain professionalism in project development by signing a contract with one or more engineers or development companies.

      Engineer Certification will be necessary for you to sign such a contract with a company.

    11. Re:It is time by Anonymous Coward · · Score: 0

      Oh yeah, I totally agree. Software is too cheap, we need to make it 10 times more expensive by making it mandatory for all programmers to carry liability insurance.

      Let's start bankrupting software companies because someone made a tiny mistake in their code.

      Let's destroy the very foundation of our current economy, by making it so expensive and scary for anyone to start up a technology company, that all innovation in IT comes to a grinding halt and all future productivity gains from it are lost..

    12. Re:It is time by roman_mir · · Score: 1

      Not true at all. Again, what I said does not imply that everyone will have to be a Certified Engineer.

      In fact most companies will not even want to build their projects in a formal way.

      What I mean is that Engineer Certification will provide companies with yet another way of developing software - a formal way.

    13. Re:It is time by roman_mir · · Score: 1

      Right, so you did not read my other four responses before posting yours.

      I did not say Engineer Certification must be mandatory.

      I mean there should be an option for a company to sign a contract with a Certified Software Engineer or with a software shop and do things in a formal way.

    14. Re:It is time by Anonymous Coward · · Score: 0

      There already certifications for software engineering. Guess what? No one cares about them when buying software. And if you are going to start making vendors liable for all defects in their software, it will become so expensive to develop software hardly anyone will want to do it anymore.

    15. Re:It is time by Grishnakh · · Score: 1

      No, you'd be fired because the companies would instead hire teams in India and China to do the programming, since they can hire 10 developers there for the cost of 1 here.

    16. Re:It is time by JGski · · Score: 1
      Licensing only works for slowly changing profession fields. Licensing is a government/quasi-government (profession org) administered system which necessarily lags the rate of technological change by years if not decades. Government == slow. That's good for democracy because it tempers the evil temper of the majority but it would be the kiss of death to technological progress. That's sounds like Microsoft PR-crap but Microsoft is starting to get what's coming to them now through economic and public opinion feedback.

      This time-constant mismatch is why PE certs for EEs have never taken off - the business and state-of-the-art changes too quickly. If you've ever taken the EIT or the PE you can see it instantly: the test questions cover things that are many years out of date. When I took the EIT in California in the mid-80s there were still questions about biasing vaccuum tubes, about Hoover dam-style generator maintenance and no questions at all covering my field of study: IC design. The test had a 1975 copyright date on it. I'd been doing electronics as a hobby in 1975 and vacuum tubes should not have been such an exam even then!

      Power engineering in EE has certs only because power is also goverment regulated so innovation rates conveniently match certs exam update rates (try getting a solar/battery/invertor system signed off some time with the power company - it takes years though technologically it should be a 1 week thing with off-the-shelf products already available on the market).

      If such certification were mandatory we'd see the field slow to something like the power industry - namely glacial. I, for one, don't want to live in a world that progresses that slowly. I'll leave the US first, despite being 4th generation, born & raised here in the US.

      If certification were an entirely optional thing like the useless but optional MSCE or something, maybe. That could be done now and we'd let the market decide how useful it really is. I'd put money on such a cert being about as useful as MSCEs - essentially uncorrelated with any meaningful measure of delivered employee value.

    17. Re:It is time by Tenareth · · Score: 1

      Why, you can't read? You need someone to spoon-feed information into your brain?

      You want to learn, talk to people that have succeeded, they won't be in college. The exception might be community night school, where you can actually find teachers that work for a living, therefore give you real information not just "theories" that don't work in Real Life.

      --
      This sig is the express property of someone.
    18. Re:It is time by roman_mir · · Score: 1

      Disagree. In the industry where I have been working for the past 4 years (insurance, banks, mutual funds,) the software is made in-house and the vendor is the user so quality matters and software costs millions to develop.

    19. Re:It is time by roman_mir · · Score: 1

      I did not imply mandatory certifications, but I really mean that if one is a Certified Software Engineer and a company signs a contract with this person (or a shop) to do things in a forma way, then this person (shop) must be personally responsible for the project. Of-course if the engineer says that something has to be done one way and the company does is in a different way, the engineer must not aprove of that and is no longer responsible for the project.

      In the software field things change fast but it does not mean that the basics of good design and development change at all.

      Formal design phase, unit testing, integration testing, functional testing, performance testing - these are some of the basic concepts that will do as good as possible at assuring that your software is as good as it can be.

    20. Re:It is time by Anonymous Coward · · Score: 0
      "Yes, but our salaries would rise dramatically, since you would have to employ 10X as many programmers to make sure software was 100% bug free."

      This would make the salaries of each individual programmer drop 10X, no go up.

      Surely companies wouldn't let the total cost go up, so if you need 10X as many, they'd farm the work out to somewhere 10X as cheap - poorer parts of China.

    21. Re:It is time by Anonymous Coward · · Score: 0

      Do you work for the insurance industry?

      The biggest problem is that there would need to be a best practices guide. And there is no such thing. For the life of me I do not see anyone agreeing on that for many reasons, most notably because there is not one accepted general pragramming practice. There is a whole list of what not to do.

      Actually I think the system we currently have is pretty good. Individual companies are responsible and they are rewarded or punished based upon the code they develop.

    22. Re:It is time by roman_mir · · Score: 1
      I did a project for a life insurance company 3.5 years ago, why?

      The best practice guide? That's not a problem. W3C sets standards, this would not have to be different. They would have to come up with a list, maybe something like this:
      • Requirements gathering phase. Check.
      • Sign off on specs. Check. Here there is a problem, a general software problem, the requirements are not understood until the end of the project. But this is only a problem because there should be another step that preceeds the sign-off:
      • Functional prototype with user feed-back. Check.
      • Design phase. (details by W3C here please.) Check.
      • Complete unit testing for every function. Check.
      • Integration testing. Check.
      • System testing. (deployment, installation, network administration security principles.) Check.
      • Performance testing. Check.
      • If anything in the requirements changes, or the code has to be changed due to insufficient performance, repeat steps as necessary.

      - something like this.

      Note that eXtreme Programming has no place in real engineering world.

    23. Re:It is time by misleb · · Score: 1

      Umm, the engineers don't own the code. The corporation does. You need to hold the company responsible. They can reprimand their engineers as they see fit. But yeah, I'm all for corporate responsibility.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    24. Re:It is time by Anonymous Coward · · Score: 0

      Go work for the DoD, and you can have all of this in spades.

    25. Re:It is time by qtp · · Score: 1

      I would like to see that happen, anyone else?

      Of course, you are assuming that this would enable you to garner higher wages due to the smaller feild of competition. Look how nicely this theory works for MSCE's.

      The other nicety of your proposal is that it would effectively protect the vendors from responsibility. The engineer would be responsible for the flaws, but would still be required to program what and how he is told to by his employer. Otherwise the employer would simply get another engineer who was willing to follow instructions. I'm not saying that this does not occur today, but at least the employee is not held responsible when he implements that Bad Idea exactly as was requested by an ignoramous "project manager" (Marketing droid who knows a little java).

      --
      Read, L
    26. Re:It is time by BoneFlower · · Score: 1

      If the project is an integrated hardware/software solution, where there is one team with control over all aspects of each side of that, with narrowly defined operating parameters, then, maybe some sort of liability makes sense.

      But, lets take a typical Windows app here(you can insert any other general purpose OS and the point is still valid). I'm writing a text editor for Windows in Visual Basic .NET. Should I be responsible for it crashing or blowing up your OS? Even if the bug is technically in the code I wrote, perhaps its only a bug because the .NET framework didn't check some input properly? Or because the third party component I used accessed an "internal use only" part of the Win32 API. Or maybe the specific operations I used tripped up an obscure CPU bug under certain conditions.

      Are these my fault for not writing code properly for that platform, or are they the other persons fault?

      Software liability for general purpose computer systems simply will not work. For special purpose computers with the entire system under the control of a single agency, maybe.

    27. Re:It is time by roman_mir · · Score: 1

      Of course, you are assuming that this would enable you to garner higher wages due to the smaller feild of competition. Look how nicely this theory works for MSCE's. - that was not my primary motive in suggesting this solution. My point is that a real engineering certification is much more than what MCSE is, and a real engineer is responsible for his/her creations if there is a contract that requires this responsibility. Of-course this costs more, remember: Cheap, Fast, Good - pick two.

  12. J++ a response to Java by Cryect · · Score: 1
    Hehe though I would say Microsoft's first response to Java would more likely be J++.

    ActiveX definately seemed made to to make web applications before Microsoft realized that might not be a good idea. Hence DHTML has practically died with IE having no real updates since IE4.

    1. Re:J++ a response to Java by Anonymous Coward · · Score: 1, Informative

      BS. There was a bunch of (proprietary) DHTML stuff added through IE6. Based on a pure feature list, IE's DHTML is a lot more advanced than Mozilla's (who tends to stick to barebones W3C stuff).

    2. Re:J++ a response to Java by Anonymous Coward · · Score: 0

      No, .NET is Microsoft's answer to Java.

      Microsoft got sued by Sun for creating a proprietary version of Java that only ran on Windows.

      When they lost that battle, Microsoft promptly took their toys and claimed they would make their own Java.

      And .NET was born. A Java clone that only runs on Windows.

      What I think is really funny is that Mono actually thinks it has a future. I mean, Microsoft spent a ton of money creating a technology that would only run on Windows.

      Do you honestly think they'll let Mono live very long? Once Mono becomes useful for cross-platform development it's going to be buried in patent lawsuits from MS.

      I find what IBM is doing to Java much more interesting than .NOT or even Sun's plans for Java.

    3. Re:J++ a response to Java by Cryect · · Score: 1
      "Microsoft got sued by Sun for creating a proprietary version of Java that only ran on Windows. When they lost that battle, Microsoft promptly took their toys and claimed they would make their own Java. And .NET was born. A Java clone that only runs on Windows"
      But I was just saying J++ was the first response to Java, which you kinda agree with? I'm not disagreeing that .Net was a response to Java at first though. I doubt they are really worrying much about Java anymore though.

      "I find what IBM is doing to Java much more interesting than .NOT or even Sun's plans for Java."
      Agreed, I find what IBM is doing with Java quite interesting.

    4. Re:J++ a response to Java by AKAImBatman · · Score: 2, Insightful

      The original poster was correct. Java's main use back in the 1.0 and 1.1 days was webpage Applets. Microsoft took a two pronged approach to this threat:

      1. Microsoft released J++ as a "better" Java. (It actually was at the time. Took me quite a while before I switched back to Sun's JVM.)

      2. Microsoft came up with a new type of embeddable COM object known as "ActiveX". Microsoft was trying to outdo Java by offering the full power of the Windows platform inside webpages. Somehow we were all supposed to be happy that we could write these object in C/C++, and that they could take over your system at a whim.

      It wasn't until after a judge told Microsoft that they couldn't ship Java, that Microsoft started their "COOL" project. The "COOL" project was widely considered a Bad Idea (TM) (much like digital watches) and was widely derided as a adolescent move by Microsoft. Sadly, Microsoft foisted its COOL platform on the world anyway, and now we have .NET.

    5. Re:J++ a response to Java by Cryect · · Score: 1
      Heh sorry I've not fully checked it out. Was kinda basing it on statements like this from other pages.

      "Which means, suddenly, Microsoft's API doesn't matter so much. Web applications don't require Windows.

      It's not that Microsoft didn't notice this was happening. Of course they did, and when the implications became clear, they slammed on the brakes. Promising new technologies like HTAs and DHTML were stopped in their tracks. The Internet Explorer team seems to have disappeared; they have been completely missing in action for several years. There's no way Microsoft is going to allow DHTML to get any better than it already is: it's just too dangerous to their core business, the rich client. The big meme at Microsoft these days is: "Microsoft is betting the company on the rich client." You'll see that somewhere in every slide presentation about Longhorn. Joe Beda, from the Avalon team, says that "Avalon, and Longhorn in general, is Microsoft's stake in the ground, saying that we believe power on your desktop, locally sitting there doing cool stuff, is here to stay. We're investing on the desktop, we think it's a good place to be, and we hope we're going to start a wave of excitement..."

      The trouble is: it's too late."

      http://www.joelonsoftware.com/articles/APIWar.html

      And I guess in part this also agrees with what you said since by having proprietary items they are trying to ensure items work on Windows only.

    6. Re:J++ a response to Java by Anonymous Coward · · Score: 0

      Now that I think about it, you're correct in a different sense. (IMO)

      I think Microsoft felt J++ was more of an addition to Java, where .NET is basically a full rewrite; free of IP issues.

  13. Well duh/ by grub · · Score: 5, Insightful


    That's why OpenBSD's continuous code auditing makes for good security. Everything but the kitchen sink != better.
    That all said, a sandbox environment allows the developer to make sloppy mistakes, not program better.

    --
    Trolling is a art,
    1. Re:Well duh/ by hackstraw · · Score: 1

      Being that I don't know the competency of every coder that writes every line of code of all the software that I use, a little sandboxing is nice every now and then. For example, protected memory by an OS is a good thing(tm).

      Oh, and I applaud OpenBSD's continuous code auditing, but when is going to make any kind of presence anywhere? I've never seen or heard of anyone running OpenBSD. It seems as though there are other things besides code review and security that gets products in use.

    2. Re:Well duh/ by hchaos · · Score: 3, Insightful
      That all said, a sandbox environment allows the developer to make sloppy mistakes, not program better.
      The point isn't to allow anyone to program better, but to protect the user from the sloppy mistakes that already happen regardless of the programming environment.
    3. Re:Well duh/ by stevey · · Score: 1

      Why not help me audit Debian then? (And give me a job ;)

      There are other groups focussed upon auditing work, and security changes but most people seem to regard convienence and ease of use as more attractive. (Maybe Microsoft got it right ;)

      I think it's nice to see a popular distribution like Fedora moving towards using the SELinux kernel, and I hope this helps others move in a similar direction.

      I've also heard of the Hardened Gentoo distribution, and the Adamantix distribution (based on Debian). I think these two projects help show that people are slowly moving in the "right" direction.

    4. Re:Well duh/ by Anonymous Coward · · Score: 0

      Yes, OpenBSD proves that someone can ship an OS that's been nearly static for 15 years and have it be marginally more secure than OSes that actually add new features.

    5. Re:Well duh/ by ninjaz · · Score: 1
      Being that I don't know the competency of every coder that writes every line of code of all the software that I use, a little sandboxing is nice every now and then. For example, protected memory by an OS is a good thing(tm).

      Agreed, anything that depends on humans being perfect is flawed from the start. Luckily, code auditing is only part of OpenBSD's overall approach to security.

      On the topic of protected memory by the OS, the OpenBSD team was right on top of W^X, and hounded Sun to get specs on their UltraSparc III processor to that end. Sun didn't co-operate, so they chose AMD64 as their platform of choice as it's also 64 bit and has W^X protection (including specs of how to use it, and is faster and cheaper than Sun gear!)

      Since then, they've also come up with a way to get i386's memory protection (basically: don't execute anything above this address) to do something useful. The OpenBSD linker re-arranges code and data, so the code comes first followed by the data. That way, the execution boundary can be set at the end of the code. Oppose how other operating systems handle i386 - code and data are mixed together, so the i386 memory protection is useless.

      Other niceties are propolice, a stack protection tool being enabled by default. Shared libraries being shuffled by the linker so an attacker that depends on a specific memory address for a library, or a chain of libraries will have a much harder time. Privilege separation is pervasive throughout the OS (both dropping to a non-root user to perform tasks which don't require root and chrooting - eg, there is a _tcpdump user for processing packets once the steps requiring root have been done)

      Oh, and I applaud OpenBSD's continuous code auditing, but when is going to make any kind of presence anywhere? I've never seen or heard of anyone running OpenBSD. It seems as though there are other things besides code review and security that gets products in use.

      I feel this pain, too. For me, the problem has been with hardware support for SCSI/RAID controllers. That was some time ago, though and that particular item looks like it's mostly addressed provided careful selection of components. In any case, I still am able to benefit by using OpenBSD to do firewalling and DNS.

      However, most of the techniques I mentioned are relatively low-hanging fruit other operating systems could easily pick were they interested. After all, the hard part of developing the techniques and getting them working has already been done. Now there is a working example to study, and most of the code is BSD licensed.

  14. Especially True in PHP by Dozix007 · · Score: 5, Informative

    The same is especially true in PHP. The short learning curve for getting started in the language allows for a great deal of insecure coding on the internet. I run a site that promotes secure programming, and is running a security challenge for writing scripts as well. The URL is http://www.uberhacker.com

    1. Re:Especially True in PHP by tekiegreg · · Score: 2, Informative

      I'd have to agree and throw a language into the mix, ColdFusion is traditionally regarded as a language where newbies start their web programming (usually Macromedia Flash people who need a little more power from the server, so we have artists learning how to program). Consequentially ColdFusion has a bad reputation as being an insecure language. While IMHO (I'm Macromedia Certified in ColdFusion so I know my stuff) it is as secure as any other programming language, it's the programmers, not the language people...

      --
      ...in bed
    2. Re:Especially True in PHP by Pirow · · Score: 1
      Lately I've seen some terrible examples of insecure PHP scripting, the 2 most recent ones that I've come across are as follows;
      include_once($_GET["page"]);
      and
      system("whois -h whois.opensrs.net ".$_POST['host']);
      People really need to learn to never trust the user when it comes to entering valid data.
  15. Well, duh! by dacarr · · Score: 2, Insightful

    Figure this - code is only as good as the coder.

    --
    This sig no verb.
  16. No. by Tarantolato · · Score: 4, Insightful

    Okay, it's the happy-fun Slashdot thing to talk about how retraded 'lusers' are. Almost as hi-larious as jokes about Clippy and rebooting Windoze machines.

    But you know what?

    Most developers are retraded too.

    This probably includes you, my friend, as you read it in your grease-stained Manga t-shirt. This is not a problem that will be solved by yelling at people about bad code - they're going to produce it anyways, and in droves. The solution to dumb users is good UI design and a sensible permissions architecture. Similarly, the only workable solution to this problem is architectural.

    1. Re:No. by Apocalypse111 · · Score: 1

      This is not a problem that will be solved by yelling at people about bad code

      You are correct - you need to threaten them as well as yell. That way, they have incentive to not make bad code, and thus the bad code problem takes care of itself.

      --
      There is no mod option "-1: Disagree" for a reason. "Overrated" is not an acceptable substitute. Post something instead.
    2. Re:No. by Anonymous Coward · · Score: 0

      I agree.
      But cut the flaming. And learn to spell "retarded".

    3. Re:No. by cynic10508 · · Score: 1

      Most developers are retraded too.

      Does that include Greg Maddux? He did, after all, get retraded to the Cubs.

  17. Inherent in the system? by Metallic+Matty · · Score: 1

    I'm not really a code guru, just some scripts, and the few programming courses I took in college. But I think this falls under the same category as the various anti-copy technologies. Where there's a (malicious) will, there's a way. I mean, certainly, the tighter and more secure your code is, the harder it will be to find a way to exploit it, but really, those wishing to do bad things always find a way.

    (Note: I'm against anti-copy technology, just using it as an example.)

    1. Re:Inherent in the system? by Pinky · · Score: 1

      There is no remote exploit to a machine that is not connected to any network, likewise the only security holes you have are the ones you make.

      This is in contrast to anti-copy technology where some third party is giving you information but doesn't want you to copy it. If you can read the information, you must be able to copy it. Anti-copy techology usually relies on trying to break the reader in certain controlled ways by taking advantage of common limitations of the perticular reader or device.. There's also the use of encryption, which tends not to work since you need to load the decryptor program to be able to read the data and you have access to programs that have been loaded into RAM by using debuggers..

      Really copy-techology is trying to make using the information you have difficult whereas security technology is trying to preserve the-lack-of-ability you had to begin with. Basically trying to root out un-intened concequences... aka bugs that give the persone on the other end of the connection more capabilities then ou thought..

  18. It Rolls Downhill? by stinkyfingers · · Score: 4, Interesting
    There's the old maxim that "shit rolls down hill". Let's change it to "shit stays at the lowest part of the valley".

    When will we see "ACM Queue has an article that blames security flaws on HR departments and middle management?"

  19. Developing for a prototype by prostoalex · · Score: 5, Insightful
    A lot of the production code that gets written nowadays is created by college graduates who have learned to develop in a quick-and-dirty way to roll out the prototype for their home assignment as soon as possible.

    When you're in college, the graders are not trying to break into your application, they're just evaluating the source code and give you points for correct stack and linked list implementation. Thus giving a false assurance that the real-world development is pretty much the same - friendly and non-threatening environment, no need to check and validate input, no need to resort to minimum security permissions and so on.

    I think Caustictech said it better than I can:

    PrototypeProductionMan come to the ObjectFools team after successful stints at the Unemployment Office and the basement in his parents home. PrototypeProductionMan's talent is making sure that barely functional prototype mockups get rolled out into production. Exception management, security, separation of concerns between business logic and UI code, thread safety, resource management...these are all things you could say good-bye to with PrototypeProductionMan on site! With a mentality like that, it's no surprise that every production deployment ObjectFools has been involved with has turned into a completely fucking unmitigated disaster! At the end of the day, our clients should really thank PrototypeProductionMan as the reason we need to charge them a fucking arm and leg for post-rollout support and maintenance.
    1. Re:Developing for a prototype by asrb · · Score: 1

      When you're in college, the graders are not trying to break into your application, they're just evaluating the source code and give you points for correct stack and linked list implementation. This certainly was not the case when I was in school. They definitely started checking nasty edge cases in intro CS courses, which was frequently automated, and it got worse from there. I remember my Operating Systems TAs being particularly evil testers. Maybe it's the case that most universities don't do this? That's a scary thought.

    2. Re:Developing for a prototype by _14k4 · · Score: 1

      I wish this could be modded to higher than +5.. Because it's 200% true. Having friends who leave college as programmers, and myself having been working in the programming field since highschool.. I can certainly see differences in the way things are written, designed, and implemented.

    3. Re:Developing for a prototype by comedian23 · · Score: 1

      >Maybe it's the case that most universities don't do this?

      Mine certainly didn't. We were taught to check our input vars, but that's about it. The rest we were expected to learn in the field after graduation or on our own. The school I went to focused on CS theory more than practical solutions. Of course we didn't have automated homework checking or TAs either so it sounds like our schools were pretty different.

    4. Re:Developing for a prototype by chaos_echo · · Score: 1
      This certainly was not the case when I was in school. They definitely started checking nasty edge cases in intro CS courses, which was frequently automated, and it got worse from there. I remember my Operating Systems TAs being particularly evil testers. Maybe it's the case that most universities don't do this? That's a scary thought.

      My experience was that most instructors tried to impress upon students the importance of correct code, and the TAs tested for it. But soon after the marks came back there was a chorus of complaints in the newsgroups "You never said we had to handle that condition", or "I didn't understand the specification ", and unfortunately the instructors caved in many occasions.

      That's not to say that nobody came out of the classes with the ability and desire to write code well, but the ones who slid by on complaints and shoddy programs came out as well.

    5. Re:Developing for a prototype by DunbarTheInept · · Score: 1


      When you're in college, the graders are not trying to break into your application, they're just evaluating the source code and give you points for correct stack and linked list implementation.

      Part of the definition of "correct stack and linked list implementation" *includes* handling the tough cases that are likely to break the implementation. If they aren't checking that, then they aren't actually checking for correct implemention. What happens when you keep deleting and re-adding the same node over and over? What happens when you empty the structure altogether and rebuild it. Inserting at the start, middle, and end - how do those hold up? Can it do tens of thousands of inserts, then tens of thousands of deletes, and not end up orphaning memory? When I was in college, these were the kinds of things the test data the graders used would cover.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    6. Re:Developing for a prototype by DunbarTheInept · · Score: 1

      In the case of a school course, it *is* a valid complaint to point out that a stated given was a lie, and that's why the program doesn't work. If the givens say your program has to take a list of up to 1000 items, and the test data contains 2000 items, then that is a legitimate reason for the student to complain. Also, if the code was supposed to handle an unusually large amount of data, and making the structure efficient is a requirement, then there must be stated goals to shoot for since every machine differs. (i.e. your program must be able to handle up to 500,000 rows of data, and run in less than 30 meg of RAM.)

      Given how much work typically goes into making code able to robustly handle every single type of user input, it is unreasonable to expect students to finish five or six such programs during a three credit course while also doing other classwork, *especially* when code is typically supposed NOT re-used between assignments. To say otherwise is to make the student spend 95% of his time on something that has nothing to do with the lessons, and is the *same* thing over and over in every class. The reason they use givens that let students get away with less than robust programs is for the same reason that they let students use calculators in higher level math classes - It relieves drudgery and gets down to the point being studied.

      Any school curriculum worth anything will *also* have one course in which you learn nothing new, theory-wise, and instead concentrate the whole semester on working as a team on a project and dealing with all the real-world problems you tend to gloss over the rest of the time in other classes - things like how you test, how you make specifications, how you break the task into parts, and all of that. It's often called "Software Engineering", but I hate that title. It's actually software management.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    7. Re:Developing for a prototype by chaos_echo · · Score: 1
      In the case of a school course, it *is* a valid complaint to point out that a stated given was a lie, and that's why the program doesn't work. If the givens say your program has to take a list of up to 1000 items, and the test data contains 2000 items, then that is a legitimate reason for the student to complain.

      I'm not talking about valid complaints here, though the example whining I gave didn't really make that clear. The best example I can think of was an assignment (I forget exactly what it was now) that was reading some sort of data from a file. The specifications explicitly said that the programs should handle incorrect input, but many students still complained afterwards about the use of an empty file as a test case.

      I don't think that students should have to above and beyond the project specification, and I know all about time constraints since I had a heavier class load then most of the students in those classes. But to actually complain because you didn't add the three extra lines it would take to handle an empty file, and for the professor to accept such complaints, seems to encourage programmers that do the absolute minimum specified to get the job done.

    8. Re:Developing for a prototype by mdarksbane · · Score: 1

      Guess it depends on your TA's.

      The ones in my last class were fat, evil bastards who stayed up late at night thinking of ways to break our project. But it held. By God, it held.

      Still, their nastiness made me create some of the best-written code I'd ever done.

  20. As the saying goes... by fiannaFailMan · · Score: 5, Insightful

    a bad workman always blames his tools.

    --
    Drill baby drill - on Mars
    1. Re:As the saying goes... by jedidiah · · Score: 1

      A good workman can make and improve his own tools.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    2. Re:As the saying goes... by Cryect · · Score: 1

      Heh so true, and I also agree with the other poster to the parent on improving one's tools (or writing new ones).

    3. Re:As the saying goes... by Anonymous Coward · · Score: 0

      "As the saying goes... 'a bad workman always blames his tools.'"

      Well duh, a good workman gets good tools. So you could rewrite that as "someone with bad tools always blames their tools".

    4. Re:As the saying goes... by Anonymous Coward · · Score: 0

      A good workman can make and improve his own tools.

      So by extension, anyone working with Windows isn't a good workman? :o) /me ducks

    5. Re:As the saying goes... by DunbarTheInept · · Score: 4, Insightful

      People who repeat that phrase are typically trying to imply the converse, that anyone blaming his tools must be doing so because he is a bad workman. This is only true in the case where the workman got to pick his tools himself. The whole point of the expression, when it was originally coined, was that picking good tools to use is still part of the responsibility of the good workman, so he's got no right to complain about having bad tools - even if he has bad tools it's still his fault anyway. The problem is that ignoramuses keep trying to use this expression to refer to the software industry while ignoring the fact that in the software industry, the "workman" that they are referring to rarely gets to pick his own tools, and so the analogy completely fails on that point.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    6. Re:As the saying goes... by npsimons · · Score: 1

      a bad workman always blames his tools.

      . . . but even a master carpenter cannot build a house out of rotten wood.
    7. Re:As the saying goes... by Fulcrum+of+Evil · · Score: 1

      A good workman can make and improve his own tools.

      Pedant: I'd like to see a carpenter that makes his own saws.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    8. Re:As the saying goes... by The+Meshback · · Score: 1

      a bad workman always blames his tools.

      Man, don't ever blame the 'jewels'. That's just asking the family for troub...

      Oh, you said tools, not jewels. Sorry. Carry on.

    9. Re:As the saying goes... by kaffiene · · Score: 1

      I prefer "pick the right tool for the job"

      Java solves these problems and is the right tool for many large software projects. C/C++ is the right tool for drivers, kernel modules and CLI binaries which need swift execution (where JVM start up time is not acceptable)

    10. Re:As the saying goes... by ehiris · · Score: 1

      I like this better:

      An idiot with a tool is still an idiot.

    11. Re:As the saying goes... by ehiris · · Score: 1

      I take that back.

      It's a fool with a tool is still a fool.

      And to the point of where you don't get the right tools because you don't pick them, if you can't get the tool you need, you aren't asking enough.

    12. Re:As the saying goes... by syousef · · Score: 1

      a bad workman always blames his tools.

      I HATE that saying. A good workman never attempts the job with tools he knows can't get the job done. If you give any workman inappropriate tools and force them to do work with those tools you're asking for trouble.

      Examples:
      "Here's a hammer and a toilet brush. Please clean my camera CCD."

      "Here's a tooth pick and a cigar. Please make me a boat."

      Likewise:
      "Here's an archaic programming language without automatic memory management, bounds checking etc. Please build me a business app".

      --
      These posts express my own personal views, not those of my employer
    13. Re:As the saying goes... by MrResistor · · Score: 1

      It's actually very rare that a workman in any industry gets to pick his tools. Construction is the only industry I've worked in where that's even close to true, and even then there are plenty of times when you just have to use what's provided. After all, most people don't own their own jackhammer, for example, not even the guys who use them every day.

      Additionally, they are usually limited to certain materials. Most houses are built with pine studs and fiberglass insulation, even though structural foam is stronger, more bug resistant, more fire resistant, and provides better insulation. Despite these limitations, good workmen are still able to build good houses that people are happy to live in for decades.

      A good workman is aware of the limitations of the tools and materials they have at hand and is able to compensate for them. That's what makes them good. If you can't do that than you are merely a mediocre workman.

      The software industry is not somehow magically different. The analogy is apt. Stop making excuses.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
  21. C / C++ by Brandon+Glass · · Score: 3, Interesting

    A lot of problems result from the C and C-like languages' inherent faultiness. The language is a great way of writing "portable assembly language", but makes for sloppy code a lot of the time, even from relatively experienced programmers. It's mainly due to the "New Jersey" approach to development.

    C++ and C are very popular and widely used, and will probably never fade completely as they are too entrenched, however, there are a lot of languages these days with compilers which can produce code as tight and fast as C/C++, but without the mess. This is one example, there are many others.

    1. Re:C / C++ by jedidiah · · Score: 4, Insightful

      C++ should not be so casually lumped together with C. While C provides virtually zero (if any) facilities to automate better practices, C++ does. The two are NOT equivalent.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    2. Re:C / C++ by Anonymous Coward · · Score: 0


      It has long been said that a skilled programmer can write fortran in any language. I have no doubt that the same is true for C.

    3. Re:C / C++ by Anonymous Coward · · Score: 0

      Actually, since you can write a C compiler in C++ or a C++ compiler in C, they are equivalent. Same is true of COBOL for that matter.

    4. Re:C / C++ by DunbarTheInept · · Score: 2, Insightful

      But the problem is that since C++ programs can also make calls to the C library, programmers often end up doing that instead of using the C++ features, *especially* with regards to string manipulations. While this might seem like the fault of bad programmers, keep in mind that the string manipulation abilities of C, while insecure, are very, very powerful. Also, for the longest time, the output formatting abilities of C++ were horrible. Even today, while they can do everything that the stdio libraries can do, they still take five times as much verbiage to do it. There's something to be said for: printf( "%12.2lf", balance );

      If the makers of C++ had wanted to get rid of the unsafe use of null-terminated strings, they should have included a FULLY FEATURED string manipulation and string output facility that was just as easy if not easier to use than the one that you could use in old-fashioned C. Because they didn't (at first), they created a dis-incentive for dropping c-style strings.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    5. Re:C / C++ by HuguesT · · Score: 1

      You are 100% correct. Even today the ISO C++ library uses char* almost everywhere instead of std::strings. You have to use char* to open file streams for example.

  22. Fuck no. by Mongoose+Disciple · · Score: 5, Insightful

    Are you crazy?

    Anyone who's worked on a software project of any size (especially in terms of number of people on the project) can tell you that the person who takes the official blame for a development flaw is almost never the person actually responsible for it.

    Maybe if we had a programmers union and I could strike if I was ever asked to implement bad design or put out someone else's fire... maybe. But as things stand? You'd drive a lot of good developers out of the field because they're not skilled enough at office politicking to avoid being made scapegoats for the messes of others, and can't afford to bear the direct financial burden of it.

    1. Re:Fuck no. by roman_mir · · Score: 1

      I respectfully disagree with some of your comment, but not with all of it.

      It is true that as it stands currently in most companies the designers/developers do not have the voice to veto certain design/development decisions for reasons that have nothing to do with technology.

      On the other hand I do not propose that on all projects the Certified Engineer has to be fiscally responsible.

      I see it this way: when a company is interested it may sign a contract with a Certified Software Engineer or with a development group to use all the necessary tools and approaches to develop the product in a way that will (to the best of their knowledge) be as 'good' (as architecturally and developmentally sound) as possible.

      However it is a much more expensive approach than what most companies do today.

      I did not say that all software developers have to be Engineers (in the full sence of that word,) what I want to say is that if a company wishes to do the things right, it should have a clear way to do it and today there is no clear way of doing it - there are brilliant programmers and there are just average programmers but with Engineering it is very different. I am sure that there are brilliant engineers and average engineers but it does not matter, if you are an engineer and you are given a task as an engineer you will have the power and responsibility.

    2. Re:Fuck no. by Anonymous Coward · · Score: 0

      That's fine... it would clear up the job market for those of us that could hack it. /tongue firmly in cheek

    3. Re:Fuck no. by Grishnakh · · Score: 1

      Sorry, this is crap.

      If a company wants to develop a software product to be as architecturally and developmentally sound as possible, they do not need licensed engineers to do so. NASA, aerospace companies, etc. produce tons of mission-critical software today; they don't need licensed professional engineers to do this. All they need is the desire to put quality ahead of cost or schedules, and management that can run the project properly.

      You said it yourself: making quality software is much more expensive than what most companies do today. Why would companies want to spend more money to make software? They don't care about quality; they only care about making money as fast as possible, which usually means adding as many features as possible, and getting the product out the door as fast as possible so they can win marketshare faster than their competitors. Quality is not a concern here, nor should it be as long as stupid consumers don't demand it.

      What the hell does making engineers personally responsible gain anyone?

    4. Re:Fuck no. by roman_mir · · Score: 1

      What the hell does making engineers personally responsible gain anyone? - since this is the only relevant question in your comment I will answer to the best of my abilities:
      If you are a Certified Engineer and you are fiscally responsible for the product you are building you will have all the incentives in the world to be as diligent as possible. You will have more responsibilities but you will have control. If you do not approve of something in the project because you know it can/will cause faulty software you will not approve of that and thus if the project is still released without your approval you will not be responsible.

      The actual problems is that people do not realize that CEs have control over project and they hold the seal of approval. If they do not approve but the company proceeds nevertheless, it is no longer the Engineer's responsibility.

    5. Re:Fuck no. by Anonymous Coward · · Score: 0

      If you do not approve of something in the project because you know it can/will cause faulty software you will not approve of that and thus if the project is still released without your approval you will not be responsible.

      Then what is your motivation (as a Certified Engineer) to sign off on something? You can A) Sign off on it, and potentially be held liable or B) Don't sign off on it, and take the significant other out to dinner on the money you STILL made on the project.
      Unless however, you are implying that if the Certified Engineer doesn't sign off on it then s/he will not get paid. Then, the engineer is forced to agree with shotty code in order to feed his/her children.

      I think you just jumped the gun without actually thinking the implications through.

    6. Re:Fuck no. by roman_mir · · Score: 1

      So according to your logic all of the Certified Engineers in various other fields like the Civil, Electrical, Manufacturing, Materials do not get paid?

      Interesting.

    7. Re:Fuck no. by Mongoose+Disciple · · Score: 1

      Software really isn't the same thing as any of those fields. You can pretend it is, but it just isn't.

      For example: it's easy for non-technical people involved in a civil engineering project to understand the dangers of bad design. If a civil engineer says: "Uh, I could build the bridge that way, but it's going to fall down and kill a ton of people", chances are good, their management will listen to them. They probably are not going to pressure a civil engineer to sign off on the bridge that will kill commuters.

      On the other hand, software design flaws are much more poorly understood by most software management, and those flaws are seen as significantly less important. Obviously mission critical software that can actually kill people, as noted by someone above, is going to be an exception.

      I'm working on a software project today involving trying to make the (very badly designed, and not by me) piece of software in question do something it's just not meant to do. Now, were I an architect of houses, when the client came to me and demanded I dig them a basement for their house and imply that I'm some sort of mental retard for not digging it the way they want, I could point out that their choice to live in a houseboat six months ago has made the prospect of basement digging chancy at best. But I don't, and though what management is demanding is at least that bad, it's difficult to make them understand it.

      There's a passage in Fight Club where the narrator discusses the way major car companies won't do a recall unless the flaw in their cars will kill enough people and cause enough lawsuits to have a greater monetary cost than the cost of a recall. Apply that principle to software and you see the problem: Sloppy programming in a piece of software will not, in most cases, kill people, and in many cases will not be seen in any way by 99% of the customers for that software. The cost of doing it right is much higher, and so, in most cases, business isn't interested.

    8. Re:Fuck no. by roman_mir · · Score: 1

      The cost of doing it right is much higher, and so, in most cases, business isn't interested. - a very lengthy post, but this is the point, your last sentence. Those who are not interested will not care to sign a contract with an Engineering firm, they do not care from the beginning.

      My point is that if a company is interested to do a project right, in today's world they will have hard time trying to even start doing it right. If CSEs existed the company would only have to hire them for this work.

      We don't actually contradict each-others statements.

    9. Re:Fuck no. by Grishnakh · · Score: 1

      My point is that if a company is interested to do a project right, in today's world they will have hard time trying to even start doing it right. If CSEs existed the company would only have to hire them for this work.

      And here's the whole problem with your idea:
      There is NO DEMAND for this. No one wants quality software, so there is simply no reason for anyone to become a licensed software engineer. There is mission-critical software, however, created by NASA, Boeing, etc., and they don't seem to be complaining about a lack of licensed software engineers. Why is this? Probably because these organizations have already set up the proper management framework so that their mission-critical software is engineered properly, with all the required testing etc., making it so that there is no need for a single engineer to be personally liable for the entire project.

      Again, it all boils down to the fact that there simply is no reason to implement what you've been suggesting.

    10. Re:Fuck no. by roman_mir · · Score: 1

      Disagree.
      Since I did a lot of work for financial industry (three major Canadian banks, two mutual fund companies, and a check/statement printer) I saw demand for quality software and real demand for people who know how to build quality software. In many cases managers find themselves with this problem: a project needs to be done in a way that will not jeopardize the company's image, so the software must be near perfect on the other hand the managers have no idea who to trust with their project.

      So I DO SEE a real need for this, I didn't just come up with this an hour ago.

    11. Re:Fuck no. by Tenareth · · Score: 1

      And the license proves what again?

      There are areas where quality software is needed, and they get quality people... licensing doesn't suddenly make you smarter or more qualified. Since the vast majority of software doesn't need to be mission critical, and that's where most of the money is, why would I bother getting licensed?

      --
      This sig is the express property of someone.
    12. Re:Fuck no. by misleb · · Score: 1
      Since I did a lot of work for financial industry (three major Canadian banks, two mutual fund companies, and a check/statement printer) I saw demand for quality software and real demand for people who know how to build quality software. In many cases managers find themselves with this problem: a project needs to be done in a way that will not jeopardize the company's image, so the software must be near perfect on the other hand the managers have no idea who to trust with their project.

      Your solution doesn't solve this problem. It merely defines a scapegoat for when the software turns out to be less than perfect.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    13. Re:Fuck no. by roman_mir · · Score: 1

      why would I bother getting licensed? - noone has to get licensed. But if you do, the company that will want to follow standard engineering practices will talk to you and not someone who is not licensed. Not many companies would want to do this either, since they don't want to spend the money, but at least a company who wants to spend the money will have some way of assuring that someone is responsible for the quality of their software, that someone actually cares. And if you are licensed and contracted as an Engineer, you will care.

    14. Re:Fuck no. by roman_mir · · Score: 1

      Your solution doesn't solve this problem. It merely defines a scapegoat for when the software turns out to be less than perfect. Disagree. I know too many people who do not bother to go the extra step to make sure that the stuff they write is any good.

      I know some people who always bother to go that extra step and if they don't, it is because they did not have the time due to whatever corporate agenda.

      My point is this: if a company wants someone who will care, that company should set an example of caring by paying for an appropriate solution.

    15. Re:Fuck no. by roman_mir · · Score: 1

      The cost of doing it right is much higher, and so, in most cases, business isn't interested. - a very lengthy post, but this is the point, your last sentence. Those who are not interested will not care to sign a contract with an Engineering firm, they do not care from the beginning.

      My point is that if a company is interested to do a project right, in today's world they will have hard time trying to even start doing it right. If CSEs existed the company would only have to hire them for this work.

      We don't actually contradict each-others statements.

    16. Re:Fuck no. by Anonymous Coward · · Score: 0

      >My point is this: if a company wants someone who will care, that company should set an example of caring by paying for an appropriate solution.

      But Companies DONT want someone who cares, they want to push software out as fast as possible

  23. about time by Deadbolt · · Score: 4, Insightful

    I'm glad someone other than me (who can get published on a site slashdot will link to) said it:

    Compilers shouldn't generate warnings, they should generate errors.

    It's time to stop holding the programmer's hand. If I write a C program that makes 5 malloc() and 4 free(), the compiler should notice that and say, "Gee, you have a memory leak here" and refuse to compile. It should NOT say, "Well, what you're doing is provably unsafe and probably not what you want, but yes sir Mr. Developer, I'll happily crash the system for you!" It is NEVER correct to write unsafe code.

    I understand that there is a certain laxness built into C to make it easy to port to multiple platforms, etc., but these were compromises made in the early 70s, ffs. How long must we live with choices made under circumstances that became outdated 20 years ago?

    --
    "Honey, it's not working out; I think we should make our relationship open-source."
    1. Re:about time by tcopeland · · Score: 2, Insightful

      > If I write a C program that makes 5 malloc()
      > and 4 free(), the compiler should notice
      > that and say, "Gee, you have a
      > memory leak here"

      That's a tricky tradeoff, though... the more stuff the compiler checks, the longer a compile takes.

      Some things couldn't be caught at compile-time, too. I mean, the compiler would have to actually run the program to ensure it correctly allocated and deallocated memory. That's what stuff like Valgrind is for...

    2. Re:about time by Anonymous Coward · · Score: 4, Insightful

      I know you are trying to be helpful but static analysis of code like you are suggesting is usually pretty worthless. Consider:

      int somefunc()
      {
      if (somecondition)
      z = malloc(100);
      else
      z = malloc(200);

      [... some operation on z ...]

      free(z);
      return 0;
      }

      You could argue that the contrived example code is poorly written (which it is) but I merely wanted to demonstrate how easily it is to produce code which breaks your suggestion of counting mallocs/frees.

    3. Re:about time by doinky · · Score: 1
      Good idea, bad example. I can think of a few ways just in ten seconds why a compiler could never match numbers of mallocs/frees successfully.

      Java does something like this to prevent an app from dereferencing a null pointer - but it only works in local scope (no way to tell if an object passed in via a paramter is null at compile-time).

    4. Re:about time by zairius · · Score: 1

      >It's time to stop holding the programmer's hand. If I write a C program that makes 5 malloc() and 4 free(), the compiler should notice that and say, "Gee, you have a memory leak here" and refuse to compile.

      But i've written code with a lot fewer free()'s then mallocs and had no leaks. Not necessarily a one-to-one correlation.

    5. Re:about time by dknight · · Score: 1, Insightful

      I have to disagree with you partially here. There are some things that SHOULD be warnings.

      For example, say you have an if-else statement and a variable that you did not assign a value to. You give it a value in the if statement. You give it a different value in the else statement.

      Java wont compile because you MIGHT NOT have ever given it a value, when you did, just within the if-else.

      That should be a warning, not an error.

      I dont like a programing language that assumes I dont know what I'm doing.

    6. Re:about time by speedplane · · Score: 1
      It's time to stop holding the programmer's hand. If I write a C program that makes 5 malloc() and 4 free(), the compiler should notice that and say, "Gee, you have a memory leak here" and refuse to compile. It should NOT say, "Well, what you're doing is provably unsafe and probably not what you want, but yes sir Mr. Developer, I'll happily crash the system for you!" It is NEVER correct to write unsafe code.
      5 mallocs and 4 frees...
      void someFunction(){
      int i;
      int * blah[5];
      blah[0]=malloc(1);
      blah[1]=malloc(1);
      blah[2]=malloc(1);
      blah[3]=malloc(1);
      blah[4]=malloc(1);
      free(blah[0]);
      free(blah[1]);
      free(blah[2]);
      for(i=3; i<=5; i+=1)
      free(blah[i]);
      }
      --
      Fast Federal Court and I.T.C. updates
    7. Re:about time by Liquid-Gecka · · Score: 0

      While I agree with you on some counts you are missing it on a bigger scale. If I write a program that may be used on many different platforms, including a 16 bit, 32 bit, and 64 bit platform, I might write a check in to see that an integer never gets to large.

      if (i > 65535)
      bla;

      This will generate a warning on the 16 bit system that we can safley ignore. (It doesn't know if we are aware of the always false property of that statement. I might also have 5 malloc() calls and one free(). Reason? Its all the same data. I wrote a program that was allocating data based on another fixed field in a structure. malloc() changed bassed of lots of different variables, but free() remained the same regardless. Should the program not compile? Should I have to add several free() lines in order to get the program to "work?"

      Warnings are warnings and not errors for a reason. They may or may not be a problem. Its best to not have them, but there are many times where they are not an issue.

    8. Re:about time by alex_tibbles · · Score: 1

      Those 5 malloc()s and 4 free()s may well match up at runtime to be 20 of each, or they may make 5 and 4, respectively. The compiler can only tell in certain very trivial cases.
      Dynamic memory management is not very susceptible to static (i.e. compile-time for C) analysis. Try valgrind.

    9. Re:about time by caerwyn · · Score: 2, Insightful

      Say this again when you can create a compiler that can, at compile time, actually determine if memory will be leaked in all cases in a modern application. If all you're doing is allocating memory and then promptly free()'ing it at the end of a function, great. But in a multithreaded environment with the tossing of objects all over the place to exchange data, the compiler simply isn't going to be able to do that sort of job, at least not anytime soon.

      The problem with your "solution" is that as soon as one of these edge cases- where the programmer *is* correct and the compiler is not- occurs, the programmer will find the way to turn off all of these warnings/errors, thereby removing any gain that might have happened.

      --
      The ringing of the division bell has begun... -PF
    10. Re:about time by tuffy · · Score: 1
      That's a tricky tradeoff, though... the more stuff the compiler checks, the longer a compile takes.

      Some things couldn't be caught at compile-time, too. I mean, the compiler would have to actually run the program to ensure it correctly allocated and deallocated memory. That's what stuff like Valgrind is for...

      In general, a program can be expected to be run a lot more often than it is compiled. So while keeping a compiler in anal-retentive mode might be time-consuming for the programmer, it's all worth it if it leads to a better and more stable program for the user.

      But in this particular case, I think it's provably impossible for the compiler to tell if there's memory leaks in a program. Even Valgrind will only catch them for a particular run, rather than any possible memory leak. So, it'll be up to the programmers to do the best they can (or, in the case of automated memory management, offload the task to the programmers maintaining that automation).

      --

      Ita erat quando hic adveni.

    11. Re:about time by Xiver · · Score: 2, Insightful

      Yes, because under no circumstances would a programmer ever want to allocate memory and pass it out of a program's scope.

      </sarcasm>

      Oh and by the way warnings as errors is an option for most compilers AND it is almost NEVER correct to use the word NEVER.

      </rant>

      --
      10: PRINT "Everything old is new again."
      20: GOTO 10
    12. Re:about time by tcopeland · · Score: 1
      > it only works in local scope

      Hm, that's interesting! It catches this:
      [tom@hal tmp]$ cat Test.java
      public class Test {
      int foo() {
      return null.length();
      }
      }
      [tom@hal tmp]$ javac Test.java
      Test.java:3: <nulltype> cannot be dereferenced
      return null.length();
      ^
      1 error
      [tom@hal tmp]$
      but not this:
      [tom@hal tmp]$ cat Test.java
      public class Test {
      int foo() {
      String bar = null;
      return bar.length();
      }
      }
      [tom@hal tmp]$ javac Test.java
      [tom@hal tmp]$
      Still, that's a step in the right direction. It'd be great if javac had a "-dfa" flag or something to enable some data flow analysis checks like that one...
    13. Re:about time by Silvertre · · Score: 2, Funny

      ...and while you're at it, why not solve the halting problem as well.

    14. Re:about time by tcopeland · · Score: 1

      > it leads to a better and more stable program

      Yup, true, as long as the programmer doesn't go nuts waiting for the compiler :-)

      > it's provably impossible for the compiler
      > to tell if there's memory leaks

      Yup. Sometime I feel that some folks who don't do much programming have the feeling that "oh those lazy programmers, they're just not working hard enough". What they don't realize is that good programming is hard to do, and it's not as much as an exact science as they might think...

    15. Re:about time by Anonymous Coward · · Score: 0

      Shouldnt that be i5, otherwise youve got a free of blah[5] which was never malloced

    16. Re:about time by spakka · · Score: 1

      Java compiles code such as you describe without warnings. Try it.

    17. Re:about time by Surt · · Score: 1

      Actually that's a compiler bug. There was no possibility you didn't assign that variable. The compiler was incorrect in its assessment that you might not have assigned to that variable. That should be neither a warning nor an error.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    18. Re:about time by 91degrees · · Score: 1

      For example, say you have an if-else statement and a variable that you did not assign a value to. You give it a value in the if statement. You give it a different value in the else statement.

      This is detectable. I'm sure MS Visual C++ spots this one and compiles without a warning.

      But you're right. There are a lot of low level warnings such as unused command line parameters.

    19. Re:about time by mean+pun · · Score: 1
      Good idea, bad example. I can think of a few ways just in ten seconds why a compiler could never match numbers of mallocs/frees successfully.

      Agreed. This is fundamentally impossible at compile-time.

      Java does something like this [compile-time checking] to prevent an app from dereferencing a null pointer - but it only works in local scope.

      No it doesn't. This is just as impossible as the malloc check you reject! You are proably confusing a number of Java features.

      Java has strict runtime checking of null pointers dereferences and array bound violations. Also, it has compile-time checks to prevent the use of un-initialized variables.

    20. Re:about time by cuffsofgb · · Score: 1

      I agree that the compiler should not allow as many of the potential problems through, but memory management stuff really has to be checked at runtime using a program like Purify. This type of analysis should be part of just about every test plan and I find it to be severely overlooked.

    21. Re:about time by doinky · · Score: 1

      True, what I meant was that java catches possible dereferences of uninitialized variables (which, in java's case, ends up catching a lot of null-pointer exceptions in local scope, but NOT, ironically, the case where you explicitly set x=null).

    22. Re:about time by doinky · · Score: 1
      The specific case I was talking about:
      public class Test {
      int foo() {
      String s;
      ...
      return s.length();
      }
      }
      will be flagged. It's one small case, but it's something.
    23. Re:about time by tcopeland · · Score: 1

      > will be flagged

      Hm, cool, yup, it's flagged with a "variable x might not have been initialized". Odd that an assignment to null couldn't have been caught as well.

      Ah well, as you say, it's something, at least.

    24. Re:about time by Just+Some+Guy · · Score: 1
      So while keeping a compiler in anal-retentive mode might be time-consuming for the programmer

      I disagree with that premise. I always enable all of the warning, assertions, and other compile-time verbosity that a language offers. It's a lot easier to find would-be errors when you get messages like Name "main::baz" used only once: possible typo at /tmp/foo.pl line 4. than when all you know is that a particular printf causes output corruption.

      Warnings tell you about dumb mistakes that are likely to bite you in the butt if you don't fix them. My programs aren't done until they compile and run without them, and I think my overall productivity is much higher with those messages enabled throughout the entire development cycle.

      --
      Dewey, what part of this looks like authorities should be involved?
    25. Re:about time by shish · · Score: 1
      Some of my standard makefile template :)

      CFLAGS = -ansi -Wall -pedantic -pedantic-errors -ggdb -fstack-protector

      check:
      splint -strict -strict-lib *.c

      all: check [progname]

      It's a bitch to get anything to compile, but IIRC there's some prize for the first big project that passes "splint -strict" on every file :)

      --
      I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    26. Re:about time by digital+bath · · Score: 1

      ouch, you just free'd un-malloc'ed memory. good job.

      --
      find / -name "*.sig" | xargs rm
    27. Re:about time by Anonymous Coward · · Score: 0

      I challenge the assumption that unmatched malloc()/free() is a bug. If I happen to forget to free() everything before I call exit(), on most UNIX systems I've worked on that is not a big deal.

      Memory management at the system/kernel interface is done via brk() or sbrk(), which monotonically increases the highest address available to a running process. malloc() and free() occasionally call brk() or sbrk(), but most of the time they get a decent number of pages with one call to brk() or sbrk() and then perform their own heap management out of that area. At exit(), the kernel tears down the address space of the process, including any memory space allocated via brk() and sbrk().

      For most programs, there is never any need to use free() at all. For a lot of server applications, it would make much more sense to use malloc() without any calls to free() and include a built-in request limit into each server instance. That way each instance would use a finite amount of memory; upon termination the kernel would tear down all the address space used by the process. Not only that, but with a well-written management program, your server stays up indefinitely even in the face of funny requests that crash a server instance.

      Don't think that's a good idea? Do a man inetd.

    28. Re:about time by Tassach · · Score: 1
      Compilers shouldn't generate warnings, they should generate errors.
      That's a valid point of view. However it is not the ONLY valid point of view. C is built on the equally-valid point of view that the compiler should do EXACTLY what you tell it to do -- even if you to do something which violates some arbitrary standard of "good programming". This is not necessarily a bad thing -- you may have a very sound engineering reason why you want to allow a memory leak or have an unhandled exception. If you want or need additional hand-holding, you can pass the appropriate switch to your compiler to tell it that all warnings are fatal, like gcc's -pedantic-errors switch. If you need even more protection, you set up your makefiles to run lint or some other source-code analyzer.

      The C compiler follows the Unix design philosophy, where a program does a single job. The C compiler's job is to turn source code into executable code, and nothing else. It's not the compiler's job to enforce coding standards; if you need something to do that you pick the appropriate tool and run it on your code before you invoke the compiler.

      Just because you can cut your finger off with a power saw, doesn't make it a bad tool. You just need to be aware of the potential dangers, work carefully, and adopt the appropriate safeguards.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    29. Re:about time by Anonymous Coward · · Score: 0

      int somefunc()
      {
      if (somecondition)
      z = malloc(100);
      else
      z = malloc(200);

      [... some operation on z ...]

      free(z);
      return 0;
      }

      You could argue that the contrived example code is poorly written (which it is)...


      No, it isn't. It's much like a factory, which is a fairly common design pattern. The truth is that static analysis would not work for almost any program that does a reasonable amount of dynamic allocation.

    30. Re:about time by jsight · · Score: 1

      An assignment to null in Java is used to indicate a manual override of the null checking. This is to make complex cases work, such as:

      String s;
      if (someConditionWhichMightBeTrue) {
      s = "blah";
      } ...
      if (someConditionWhichMightBeTrue) {
      s.length();
      }

      That will through a compiler error if you do not at explicitly indicate that you know what you are doing by declaing:
      String s = null;

    31. Re:about time by tcopeland · · Score: 1

      > a manual override of the null checking

      Thanks for making me look this up :-)

      You're right, chapter 16 of the JLS says that a compiler "must carry out a specific conservative flow analysis" to make sure local variables are assigned before being accessed.

      > That will through a compiler error

      Yup. Good fodder for a more thorough data flow analysis tool to chew on...

    32. Re:about time by DunbarTheInept · · Score: 1


      If I write a C program that makes 5 malloc() and 4 free(), the compiler should notice that

      That's NOT possible in the slightest. If it was that simple. programmers would be able to avoid memory leaks with ease. Consider that you often malloc in a loop, and free in a loop. Now, how does your compiler detect that the mallocing loop will run 5 times while the freeing loop will only run 4 times? There are proofs in computer science that essentially end up saying that the only way a program can read another program's code and find out how many times a loop will run, is to actually end up becoming an interpreter itself, and actually RUN that code as it is written.

      The fact that you can't solve the halting problem at compile time also means you can't solve the memory orphaning problem at compile time. The only way to match up the number of mallocs to the number of frees is to do it at runtime, which is why garbage collecting languages were invented.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    33. Re:about time by DunbarTheInept · · Score: 3, Insightful
      Your sentiment is correct, but that's a poor example, that doesn't really demonstrate the problem. A compiler could still follow your if/else ladder and detect that no matter what the condition is, exactly one instance of the malloc call will be made, and thus the one free call is correct. Consider - this is kind of what happens when a compiler complains that a line can be reached while a variable is uninitialized.

      A better example is this. Consider the following code:
      int x;
      int i;
      char **strings;

      x = 5;
      strings = calloc( x, sizeof(char*) );
      // Make some 100-character strings:
      for( i = 0 ; i < x ; i++ )
      { strings[i] = calloc( 100, sizeof(char) ) );
      }

      // do some stuff with the strings (not shown)

      // commented-out line:
      // x = x - 1;

      // Free the strings:
      for( i = 0 ; i < x ; i++ )
      { free( strings[i] );
      }
      free( strings );
      That code works without orphaning memory.

      But now, consider modifying the above example so that the 'x = x - 1' line is uncommented. Then what would happen. Then there'd be 5 allocations, but only 4 frees.

      Trying to write a compiler that can detect the difference between those two cases, with regard to counting the allocs and frees, is essentially a restatement of the halting problem, and cannot be done. The only way to detect that the change to the x variable is important to the orphaning of memory, is for the compiler to go through and examine every statemnt of the code and think "hypothetically, what would happen if I ran this statement?", and at that point the compiler ceases to be a compiler and becomes an interpreter, and thus has the same memory orphaning problem that the code itself has.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    34. Re:about time by DunbarTheInept · · Score: 1
      Actually, it's only supposed to issue you that warning if there really does exist a scenario where you are trying to use that variable after the if/else, and in that case, it really *IS* a problem. Consider:
      // This function should compile okay without error:
      void someFunc(void) {
      int x,i;

      if( foo ) {
      x = 5;
      }
      else {
      return;
      }
      for( i = 0 ; i < x ; i++ ) {
      // do something
      }
      }
      // This version of the function should give an uninitialization error:
      void someFuncOops(void) {
      int x,i;

      if( foo ) {
      x = 5;
      }
      else {
      // nothing - forgot the 'return'.
      }
      // the next line is an error. 'i < x' is testing against an
      // uninitialized 'x' if the 'else' was used above.
      for( i = 0 ; i < x ; i++ ) {
      // do something
      }
      }
      The error you get from this is NOT supposed to be on the if/else lines. It's on the 'for' line. It's telling you the compiler found a path through the code where it *could* reach that attempt to use the variable and it hasn't been initialized yet.

      If the condition you are referring to does happen, then it means your compiler is broken. It shouldn't even be issuing a warning either.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    35. Re:about time by Anonymous Coward · · Score: 0

      All you would need is to replace my simple if test with a multi switch case statement to achieve the same effect. However, your example is much better. :)

    36. Re:about time by DunbarTheInept · · Score: 1


      All you would need is to replace my simple if test with a multi switch case statement to achieve the same effect.

      No, that is still the same problem. If each case has exactly one malloc, the compiler can still detect that. To make the compiler unable to count the mallocs without running the code "in it's head", you need something where the malloc could be run N times, where N is determined at runtime. A multi switch case statement is still just another way of writing an if-else ladder - it always jumps forward, never backward, and there are a finite number of countable passes through each section, either zero passes, or one pass.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    37. Re:about time by HuguesT · · Score: 1

      It is possible to prove mathematically that what you are trying to describe is simply impossible at compile time. It is equivalent to the stopping problem, demonstrated to be unsolvable in 1936 by Alan Turing.

      The only way to reliably detect leaks and other memory-related problems is at run time by running the program in a controlled environment. This is why VM can do it (java, C#, most script languages) and not native code compilers. For C/C++ programs you have to use a tool like valgrind or purify.

      And even then, you can only detect the leaks that happen to be generated by a particular run of the program. There is no way to statically check a program for leaks and be assured that you've found them all.

      Sorry.

  24. Mozilla by IntlHarvester · · Score: 4, Informative

    While it's easy to rip on the idea behind ActiveX, Mozilla.org thought it was a good enough idea to copy it as XPI*.

    The basic idea is that plugins and toolbars should be easy to install, and due to the nature of these things, they often can not be "sandboxed" or run in a Java VM. One of the big complaints about Mozilla is that people find it difficult to install the Flash/Java/Real plug-ins. If vendors supported XPI, this would be mostly resolved.

    The real security problems with IE are not directly related to ActiveX, but instead the holey and flawed "zone" system. There's also some operational annoyances with ActiveX (like throwing up dialogs even though ActiveX is disabled and the lack of an easy way to whitelist), but it sounds like XP SP2 is going to try to fix some of those things.

    * ? Apologies if I'm confused about the moz alphabet soup.

    --
    Business. Numbers. Money. People. Computer World.
    1. Re:Mozilla by 1010011010 · · Score: 4, Insightful


      It's not just that. They integrated web browsing into the file manager -- which is different than merely integrating html viewing. They designed the entire Windows UI Shell to be, basically, remotely exploitable.

      There's no good reason to confound the local file manager with a networked program.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    2. Re:Mozilla by IntlHarvester · · Score: 1

      I would instead say that "They integrated File Management and Control Panels into the Web Browser". Same bad result though.

      This would have worked OK if their sandbox system was worth a damn, but the "zone" system is just too easily confused. Somehow Mozilla and even Netscape 4 can reliably distingish between local trusted components and remote stuff -- Microsoft should have never done the "integration" until they had the security air tight.

      At this point the only real fix probably would be to make a new IE binary that's designed explicity for Internet browsing, while leaving the existing holey IE stuff in the shell.

      I'm also curious how well Konquerer will handle close scrutiny. On the surface, it seems they copied Microsoft's design wholesale.

      --
      Business. Numbers. Money. People. Computer World.
    3. Re:Mozilla by 1010011010 · · Score: 1

      I'm also curious how well Konquerer will handle close scrutiny. On the surface, it seems they copied Microsoft's design wholesale.

      Unfortunately, I have the same fear. The Nautilus crew eschewed browser integration with their file manager, and I think that was the right choice. Apple did the same -- two completely different applications, one for managing files and the other for viewing web pages.

      I don't recall anyone complaining about Finder's lack of Safari integration. Some people have tried to integrate Mozilla and/or GtkHTML with Nautilus, but those attempts have been rebuffed.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    4. Re:Mozilla by molarmass192 · · Score: 2, Informative

      XPI is not exactly the same as ActiveX. It's only used to install packages for the browser, it's not a format for web applications like Applets, Flash, etc. That said, you're right, you can install malicious code via XPI just like you can via ActiveX. However, *most* browser extensions are written using XUL and JavaScript in Mozilla which is sandboxed ... and cross platform too!

      --

      Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws-Plato
    5. Re:Mozilla by IntlHarvester · · Score: 1

      It's only used to install packages for the browser

      I don't think so -- some of the realworld XPI stuff is just ordinary spyware EXE files packaged up.

      Also, I thought the point of XUL is that it was NOT sandboxed -- that you could write any sort of local application with it. It certainly has access to Mozilla internals.

      I suspect that some of this stuff was added back when Mozilla was being targetted as a base for the AOL Client, and not because there a big developer demand for it.

      --
      Business. Numbers. Money. People. Computer World.
  25. Bad programming, huh? by Anonymous Coward · · Score: 1, Funny

    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

  26. Give Developers Actual Time by Cryect · · Score: 2, Insightful
    Currently a big issue with developing code leading to security issues is rushed schedules. Microsoft has pioneered this and showed its the way to beat your competitors by ensuring you have a new product out right after the fiscal year has turned and IT departments are looking for new software. They might have always been more buggy but they always had a new program out to beat WordPerfect(or WordStar).

    I doubt outsourcing all of our coding to India is really going to help make more secure programs either.

  27. I BLAME MANAGEMENT by harumscarum · · Score: 0

    I only wrote it because that is what was in the requirements.

  28. Asprin by Asprin · · Score: 1


    Eventually all of this will be irrelevant because HW will have so far outstripped the requirements of software that we'll just run all of our programs on emulators on the hardware. That will fix not only the security problems, but it has the added bonus that since you'll be able to get all emulators for all platforms, there won't be any compatability issues -- everything will be truly platform independent.

    --
    "Lawyers are for sucks."
    - Doug McKenzie
    1. Re:Asprin by TEMM · · Score: 1

      A) Software is becoming more complex, just as hardware is becoming more complex. There will always be bottlenecks, and running bleeding edge software on emulated hardware wont offer the performance of running directly on the hardware. B) The emulators would have to be written by someone with security in mind, and strict security on the emulators would stifle development. the SOFTWARE needs to be secure, not the platform... the platform is the coders canvas. Imagine if painters had to paint on canvasses that restricted where and how they could paint... C) Java Virtual Machine is an emulator... a virtual machine is an emulator, and it hasnt solved security problems...

    2. Re:Asprin by Defiler · · Score: 1

      If every app on your system runs in a separate emulator, then any message-passing between applications (an important feature, to be sure) would be subject to the same sorts of security problems we are now facing.

      If everything runs inside one big emulator, then the persistence of that emulator has value to you. Do you want to be forced to close your instant messenger just because you closed your word processor?

      As soon as the state of your emulator is something you want to protect, it is no longer disposable, and therefore needs security protection.

    3. Re:Asprin by Anonymous Coward · · Score: 0

      Boy that soudns nice, but will we ever have all emulators for all platforms that will run on all hardware?

  29. It's spelled 'retarded'... by Anonymous Coward · · Score: 0

    ... not 'retraded'

    1. Re:It's spelled 'retarded'... by Anonymous Coward · · Score: 0

      I believe it's now spelled "differently abled" or even "handi-capable".

  30. YOU SPELLED RETARDED WRONG! by IshanCaspian · · Score: 0, Offtopic

    Wow, that's priceless. Here you are complaining about how retarded developers are, and you spelled retarded wrong. "retraded" my ass.

    --

    But there is another kind of evil that we must fear most... and that is the indifference of good men.
  31. Warnings by dekashizl · · Score: 5, Insightful
    The final and main point the author makes in the article is to suggest that compilers start getting smarter and generate warnings for security problems (such as the "gets()" warnings put in many compilers not too long ago. But:
    These tools have existed for years but are not popular. Why? Because they generate a lot of warnings, and, as countless software engineers have pointed out, it's time-consuming to sift through the spurious warnings looking for the ones that really matter. I've got news for them: there is no such thing as a warning that doesn't matter. That's why it warns you.
    I can't agree more. Almost every large project I've worked on with multiple programmers has tons of warnings throughout development. I mean BOTH compiler warnings AND runtime warnings in the log files. Sometimes you can track one down and find out "I forgot to tell you that you need to change XXX in your config file", but most of the time you don't even see the new warnings amid a sea of "acceptable" ones, and the rest of the time, it's more of a "I don't know why that's happening, but it seems to work anyway" type of response.

    If you see a warning, get rid of it right away! Once you slack off a bit, it becomes like dirty dishes piling up in the kitchen sink. Nobody wants to touch them, and everybody feels like most of them are the other roommate's anyway.

    1. Re:Warnings by tcopeland · · Score: 1

      > If you see a warning, get rid of it right
      > away! Once you slack off a bit, it becomes
      > like dirty dishes piling up in the kitchen
      > sink. Nobody wants to touch them, and
      > everybody feels like most of them are the
      > other roommate's anyway.

      So true! This kind of goes back to the article the other day about having a public daily build. Checking code quality regularly can help keep things under control.

    2. Re:Warnings by Anonymous Coward · · Score: 0

      > If you see a warning, get rid of it right away!
      > Once you slack off a bit, it becomes like dirty
      > dishes piling up in the kitchen sink. Nobody
      > wants to touch them, and everybody feels like
      > most of them are the other roommate's anyway.

      This is often something which needs to be anticipated in the project management. Cross platform projects often have the problem that developer A doesn't see any warnings in their code on their operating system, and neither does developer B on their operating system, but when the two code bases are compiled, they both see warnings in the other's code.

      Fixing these isn't always simple enough to do without consulting the other developer, or possibly having each developer use each platform for the project. So it needs to be anticipated and budgeted for by whoever is managing the project.

    3. Re:Warnings by Tenareth · · Score: 1

      If it won't compile clean under -Wall -ansi -pedantic, fix it. :) When I forced all the developers I worked with to always use those options, and compile clean, half their problems went away.

      --
      This sig is the express property of someone.
    4. Re:Warnings by cbowland · · Score: 2, Informative
      Check out the Pragmatic Programmers for their 'broken window' theory, which they use as an analogy for software development.

      In inner cities, some buildings are beautiful and clean, while others are rotting hulks. Why? Researchers in the field of crime and urban decay discovered a fascinating trigger mechanism, one that very quickly turns a clean, intact, inhabited building into a smashed and abandoned derelict .

      A broken window.

      One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment---a sense that the powers that be don't care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner's desire to fix it, and the sense of abandonment becomes reality.

      You can follow the link above to see how they connect crime to poor coding.

      --

      Give a man a fish and he will eat for a day.
      Teach him to eat and he will fish forever.

    5. Re:Warnings by Anonymous Coward · · Score: 1, Insightful
      Almost every large project I've worked on with multiple programmers has tons of warnings throughout development.

      True enough, unfortunately. Easy to avoid, if you start right and get the first few warnings out of the way. But once a project has got to the point that people accept a pile of warnings, it is a hell to clean up, and even worse hell to get the management to accept the time spent doing it. From there it can only go downhill...

    6. Re:Warnings by DunbarTheInept · · Score: 2, Interesting

      What about the situation where you build under multiple compilers and they can't agree on things? Sometimes it's literally impossible to get rid of all the warnings.

      Besides, the habit of ignoring warnings often dates back to the days when the compiler was dumber than it is today and would complain about things that were 100% correct, like thinking you need to cast when
      comparing a typed pointer to a void pointer in C (they whole fscking reason void pointers were invented was precisely for situations in which you *don't* have to care what the type is. That's what they're FOR. Then dumb compilers kept yelling at you for not casting void pointers, leading to such uglifications as this:
      if( a_string != (char*)NULL ) ...

      Or, when a function is declared to take a void pointer, like:
      free( void *m );
      and the compiler would sometimes complain and bitch about not casting pointers when calling it.

      This led to a practice that was even WORSE than leaving the warnings in place: Programmers being in the habit of casting *everywhere*, unthinkingly, to get the compiler to shut up. I even worked one place where this was the mandatory standard. I tried pointing out how bad a practice this is, because then the compiler will never tell you about actual ERRORS in mismatched types either - every time you use the wrong type of pointer, the compiler will assume you know about it and are doing it on purpose, because that's what you're trying to tell it by casting the pointer, so it won't raise an error.

      This might sound like ancient history, like it doesn't matter, but often it's the case that this kind of thing is the reason many warnings are still there in old code, and new projects still use an awful lot of old code in them.

      Sometimes the only response to a warning that works is to say, "Yes, I know what you're trying to tell me mister compiler, but in this case, you're wrong. No, that variable isn't uninitialized, it's just getting initialized somewhere you aren't noticing it. Yes, I know that variable is unused, but that's only because there's a section that only compiles when DEBUG is ifdef'ed on, and that's the section that still uses it.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    7. Re:Warnings by Anonymous Coward · · Score: 0

      I don't agree with the quote, and I'm not sure from your reply that you do either. I do agree with what you said -- letting warnings persist is bad. But the quote seems to be suggesting that there's no such thing as a frivilous warning, and that any warning indicates a problem in the code.

      Well, that's not true (as anyone who's used splint will tell you). Warnings are frequently frivilous, and "fixing" them in the code often results in worse code. My favorite example of this is warnings about signed-unsigned comparisons. I'm perfectly aware of the possible problems, and I only use such a comparison when I know it's safe. Then the compiler warns about it -- now what do I do? Sorry, but I'm not going to add a cast that could hide an error later on just to make my correct code compile cleanly. I could add an extra variable, but that also makes the code worse.

      Thankfully, gcc lets you selectively disable warnings, and that's exactly what I do. In other compilers I bump down the warning level or live with the warning (neither of which are good solutions).

    8. Re:Warnings by asrb · · Score: 1
      What about the situation where you build under multiple compilers and they can't agree on things? Sometimes it's literally impossible to get rid of all the warnings.....Sometimes the only response to a warning that works is to say, "Yes, I know what you're trying to tell me mister compiler, but in this case, you're wrong.

      When I worked in the C/C++ word, my solution to this was to explicitly document this in the code. In addition, we used code analysis tools that would allow selective disabling for blocks of code, something like:

      #disble_error('EVIL')
      // Yes, this is evil, but neccessary because....
      #end_disable

      This & other structured comments made it straightforward to separate the wheat from the chaff with Perl.

      The products we wrote were only of moderate size, but algorithmically complex with very high reliability requirements, so doing this sort of thing was both neccessary & unburdensome. I imagine if it were a huge code base, doing this would be more burdnesome. I'd still think, however, that it's less burdensome than thinking 'Crap. What the &$$!! does this warning mean? Damn, no line comment. I hope it isn't important.' , then likely having an evil bug slip though that actually showed up in the copious undocumented warnings.

    9. Re:Warnings by Anonymous Coward · · Score: 0
      I agree that "-Wall" is nice, but I think "-ansi" and "-pedantic" are huge waste. The latter won't let you use single line comments (yeah, I know they're C++, but they can be useful, and they're easier to type than multiline comments.) And they won't let you use the 64 bit integers on a 32 bit machine:
      warning: ISO C90 does not support `long long'
      warning: ISO C90 does not support the `ll' printf length modifier
      Or use odd-sized bitfields...
      warning: bit-field `foo' type invalid in ISO C
      Also, it ends up telling you symbols declared in standard header files haven't been defined, despite the fact that "-Wall" would complain if that were actually true. gcc -E reveals that they're actually defined, and linker has no problem finding the symbols. Oh yeah, and then there's the worst:
      warning: ISO C89 forbids mixed declarations and code
      This isn't the 1960s. I prefer to assign a variable with its declaration.
  32. Ahh, the irony... by Anonymous Coward · · Score: 0

    This is what I saw instead of the article:

    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

  33. Including PHP by Anonymous Coward · · Score: 0, Redundant

    From my load of page 2:

    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

    Physician, heal thyself...

  34. I blame poor authors... by Anonymous Coward · · Score: 0

    ...for spurious conclusions and poor research. Note: I haven't read the article, but the whole Java begat ActiveX is so off base, I suspect I'm not missing anything.

  35. Ada's strengths, Ada's problems by Anonymous Coward · · Score: 5, Interesting
    Ada as a language roughly equivalent to C++ in form and expressiveness. Ada goes beyond C++ in that it allows one to more tightly specify constraints on data and to have these constraints automatically checked and enforced. That is the basic strength of Ada.

    The weakness of Ada is its woefully outdated standard libraries which are more oriented to a 1960s mainframe view of the world. There are no containers, no STL, no general algorithms. That is the weakness of Ada.

    If Ada had the powerful standard libraries which C++ has, that combined the safety of Ada would make it a first choice for many programming tasks. Ada can still deliver on bug free programming. But it lacks the scaffolding needed for 21st century projects.

    1. Re:Ada's strengths, Ada's problems by Theovon · · Score: 1

      Languages that don't have variable length strings make me choke.

      (When I say variable length, I mean some way to to have a value whose length is less than the allocated size of the character array.)

    2. Re:Ada's strengths, Ada's problems by Anonymous Coward · · Score: 0

      One of the things that really killed Ada though, was its wretched Algol/Pascal-ish syntax and its overbloatedness. People complain about C/C++ syntax being cryptic, which perhaps it is for newbies. On the other hand it is simple, flexible, expressive and terse enough you can write it quickly. Verbosity is for comments, in my opinion. Well, maybe variable and function names too. But I hate 'BEGIN' 'END' where { and } will do.

    3. Re: Ada's strengths, Ada's problems by Black+Parrot · · Score: 2, Informative


      > Languages that don't have variable length strings make me choke.

      Ada does support variable-length strings, as well as fixed-length and bounded-length strings.

      --
      Sheesh, evil *and* a jerk. -- Jade
    4. Re:Ada's strengths, Ada's problems by ReconRich · · Score: 1

      Languages that don't have variable length strings make me choke.

      Ada-95 has variable length strings.
      The standard package Ada.Strings.Unbounded is chock full of them. OTOH, the standard Ada library is seriously lacking in containers.

      -- Rich

      --
      Free your mind and your Ass will follow -- George Clinton
    5. Re: Ada's strengths, Ada's problems by Black+Parrot · · Score: 3, Insightful


      > But I hate 'BEGIN' 'END' where { and } will do.

      And some hate {} where indentation will do...

      When people have holy wars over whether { should go on the same line or at the start of a new one, that should be a hint that the character really isn't all that important to program semantics.

      At any rate, minimizing the number of keystrokes required to write a program should be fairly low on your list of what makes a good programming language, unless you're a hunt-and-peck typist. In general, readability is more important than writeability, if the program is going to have to be maintained.

      --
      Sheesh, evil *and* a jerk. -- Jade
    6. Re:Ada's strengths, Ada's problems by Anonymous Coward · · Score: 0

      The next revision of Ada due in 2005 will have an STL-like container library.

    7. Re:Ada's strengths, Ada's problems by Anonymous Coward · · Score: 0

      Programmming languages should be reader-friendly (like Ada) as opposed to writer-friendly (like C/C++) because a program is usually written once and read many times.

    8. Re:Ada's strengths, Ada's problems by EdF · · Score: 1

      Ada 2005 has a STL inspired standard collection library. - Ed

    9. Re:Ada's strengths, Ada's problems by Col+Bat+Guano · · Score: 2, Informative
      I still program in Ada, and like the if/elsif/else/end if (what? - you have to type "else" in C++!!!), loop/end loop syntax. Having a loop with loop/end loop and an "exit when boolcondition;" is pretty neat.

      I've seen lots of people who do...

      while (..) {
      ...
      ..
      } //while
      which to me seems not much different to "end loop".
      The single character {, } certainly makes it easier to see where control structures end at a glance so that's a Good Thing (tm).

      I find that my fingers can type begin/end quicker than {} (no shift key), but I suspect it's just a matter of habit. When I switch from Java to Ada, or Ada to Java, I often get the comment symbols wrong (-- vs //). Most of the typing issues are pretty much irrelavent once you've done a small amount of programming in a language (IMHO).

    10. Re:Ada's strengths, Ada's problems by kaffiene · · Score: 1

      Ada's other very big problem IMO was that as a language it was just too large. I always thought it had too many ways of doing the same thing - I prefer simplicity, which is why C and Java are my two favourite languages (and maybe Scheme).

    11. Re:Ada's strengths, Ada's problems by Anonymous Coward · · Score: 0

      I hate 'BEGIN' 'END' where { and } will do.
      And I prefer begin/end. Maybe you are using a qwerty keyboard. Most of the programming languages designers were too. They used the keys they had just under their fingers. On a qwerty keyboard, the backslash for example is directly accessible but on an azerty keyboard you must type RightAlt+8, for { that's RightAlt+=. OI find it easier to type more letters than to do some stange key combination.

  36. ACM Programming Contest by Cryect · · Score: 1
    Hell, now if I read what you say it sounds like you want things more like the ACM Programming Contest. Heh, where speed and ensuring you pass all the tests meant to break your program are most important. Unfortunately it churns out programs that no one but the guy who coded it can read either :-p Unless developer time is allowed to increased to ensure correct implementation instead of just quick and dirty prototyping.

    I know though that really wasn't you were implying just kinda reminded of the ACM Programming Contest (so if you need programs coded quickly and pass all tests call up the St. Petersburg Team).

    1. Re:ACM Programming Contest by Sique · · Score: 1

      Ironically it has been proven that contests like the ACM programming contest teach people to code better and with less errors. Why? Debugging takes time.
      So a good strategy to come up fast with a good enough solution is to introduce less errors from the beginning.

      The security flaws are programming errors like any other error too. They just don't get that easily detected, because in a closed environment there are no malicious intend or out of control running computers firing incorrect messages. If you want your programmers to come up with less security flaws, teach them to get it right the first time. And you teach it, if you have them do little program jobs in very short time.

      Unfortunately in a commercial environment you don't have lots of little jobs, you have large projects with complex interdependencies. So you can't train them on the job. You have to have workshops where they can excercise with those little jobs to increase their ability to fastly recognize the pattern of the job, find the correct solution and see the potential flaws and avoid them.

      --
      .sig: Sique *sigh*
  37. Blame the Specs and Time. by jellomizer · · Score: 4, Insightful

    Most security issues are a combination of Bad Specs and Limited Time (where Time==Money) That truely make a program insecure.
    Companies are afraid to make the Specs simple they want the program integrated, customizable and expandable. And all that other good stuff so programmers are forced to make their application very dynamic which makes the program more complex and open for security issues. But combined with these specs they are not willing to pay the programmer for all the time is needed and they get very annoyed when the programer is over budget. So the programmer in order to keep his job will find short cuts to make the programming time faster (Hoping the product will be used in a well protected network. But of course once the program is completed they decide to use it outside the normal specs and put it on a hostile network.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:Blame the Specs and Time. by Anonymous Coward · · Score: 3, Insightful

      Specs? They gave you specs? Man, where I work, they give you vague instructions, then you go through several successive iterations of "you're getting warmer... now your getting colder" until they finally run out time and ship whatever you last checked in...

    2. Re:Blame the Specs and Time. by Anonymous Coward · · Score: 0

      bah. my first day of work out of college a few years ago, they gave me a 37 boxes of punch cards and said they need this rewritten in Java.

    3. Re:Blame the Specs and Time. by Cecil · · Score: 3, Funny

      Oh look! A co-worker! How's it going?

  38. Not News by bubba_ry · · Score: 2, Insightful

    I hardly find this news on Slashdot.

    Many of us ./ers program in some capacity and have varying experience. However, it should be understood that a language is not inherently secure (neither is an OS!). It may have features that make is appear more security conscious, but it does not make the code impregnable.

    A car has seat belts and air bags, but that won't prevent an accident or serious bodily injury. It definitely won't prevent someone else from slamming into you.

    Good programming starts in the design. Careful attention to the UI is a must as well (think Driver's Ed!).

    Oh! And check those buffers!!!

    1. Re:Not News by Anonymous Coward · · Score: 0

      Oh! And check those buffers!!!

      Or just write code in a language where you don't have to write code for memory management.

    2. Re:Not News by PylonHead · · Score: 1

      Oh! And check those buffers!!!

      Or use a language that has a seat belt and air bags. I personally wouldn't buy a car without them.

      I can't get to the article, I don't understand the responses that say, "Garbage collection and type safety won't stop all security holes, so let's keep programming in C".

      Why not use good design *and* program in a language that is going to automatically eliminate 50% of your possible mistakes.

      --
      # (/.);;
      - : float -> float -> float =
  39. .NET Security? by TubeSteak · · Score: 2, Insightful

    Not that i really know anything about .NET, but i recall reading articles which mention that .NET allows you to call on undocumented API's. They might not create direct threats, but we've seen hacks that utilize two or three exploits at the same time. I could be wrong, so feel free to follow up with why.

    --
    [Fuck Beta]
    o0t!
    1. Re:.NET Security? by e2d2 · · Score: 1

      .Net apps are only as safe as the developer makes them. They certainly have the capabilities to leave large gaps in security using unmanaged code but overall the level of security in .Net is impressive.

      But if the user is downloading software, installing, and running it well.. shit happens.

      Now that being said I think this article is kind of unfair. NO ONE writes flawless code, it can't be done without proper QA, plain and simple. So go bitch to management because the market is telling them that mediocre is ok. Until software purchasers demand higher security this will still be the case. You don't get NASA level quality on a Fred Flinstone budget.

    2. Re:.NET Security? by Anonymous Coward · · Score: 0

      Your post is fine, but I question the moderation when you didn't provide any references.

      One issue that someone can change NET code at runtime and perhaps bypass application-level security. But the same thing can be done with VB, C, C++, etc.

    3. Re:.NET Security? by TubeSteak · · Score: 1
      Apparently you don't get NASA level quality on Microsoft's budget either. I do agree that purchasers need to demand higher security, but MS froze their code writing for (?) months to vet for bugs and we still have critical flaws showing up left and right.

      What the article was really saying is that it's not just the programmers' fault for ignoring things like bounds checking or warnings from the compiler, it's also the compiler (and other code writing tools) that's to blame for compiling code that won't work properly.

      I don't think you RTFA

      --
      [Fuck Beta]
      o0t!
    4. Re:.NET Security? by Anonymous Coward · · Score: 0

      Apparently you don't get NASA level quality on Microsoft's budget either.

      You don't get NASA level of quality on NASA's budget...

  40. ACM Queue web server has mod_murphy's_law... by MadRocketScientist · · Score: 4, Funny

    Didn't even finish reading the article before:
    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88

  41. Boost is working on a replacement for C strings by Animats · · Score: 5, Interesting
    Over in the Boost sandbox, some of us are working on C++ classes to replace C strings in existing code. The usual C string operations (sprintf, strcat) work, but they're all protected against overflow. The idea is that you replace just the declarations, and the code either becomes safe or won't compile. So
    • char s1[80];
      ...
      void foo(char* out, char* in)
      { sprintf(s,"In = %s\n",in); }
    which has a risk of buffer overflow, becomes
    • char_string<80> s1;
      ...
      void foo(char_string_base& s)
      { sprintf(s,"In = %s\n",in); }
    which will truncate the string at the specified length. Note that the "sprintf" line hasn't changed. So you don't have to rewrite complex formatting code. Changing the declarations does the job.

    The new "sprintf" is actually an overload on fixed_string.

    1. Re:Boost is working on a replacement for C strings by happyfrogcow · · Score: 2, Informative

      Why not simply use a less retarded language?

      Troll-like as you are, i'll respond. First of all, what you said is what they are doing. Replacing C with C++ (let the flames begin)

      Second, if you can reduce security flaws in legacy C code by simply replacing the variable definition and recompiling with a C++ compiler, that is a good thing. it can probably be automated so you don't have to sift through millions of lines of code looking for C style string declarations.

    2. Re:Boost is working on a replacement for C strings by Anonymous Coward · · Score: 0

      Why don't you be a less retarded person?

      Oh, that's all you know and don't want to develop interpersonal skills? Please resume your suffering, I won't bother you anymore.

    3. Re:Boost is working on a replacement for C strings by HuguesT · · Score: 1

      Yes, and let's rewrite all the known O/S kernels in C# or Java. What a great idea!

  42. From the all-your-fault dept. by jeffy210 · · Score: 1

    Gah, you know you've been brainwashed by a phrase when you see all-your-fault
    and you immediately complete it with "are belong to us."

    --
    ------
    "And may your days be long upon the earth."
  43. It's a little of both by Tassach · · Score: 4, Insightful
    Good security requires that you understand the principles of what makes a program secure as well as knowing the exploitable weaknesses of the language in which you are developing the software. Using a "more secure" language will not improve your security if your system architure is not built with security in mind. A securely implemented system is rendered insecure if it isn't administred intelligently.

    The security advantage of some langages is that it makes it EASIER to write secure code, not that they make it impossible to write insecure code. There's a difference between protecting you from accidentially shooting yourself in the foot and preventing you from intentionally aiming at your foot and pulling the trigger.

    It is possible to write secure code in C or C++ -- but it takes a whole lot more effort and talent to get it right than it would to do so in a language which does automatic bounds checking and runs in a sandbox. Unfortunately, history has shown us that it's extremely difficult to write secure C/C++ code -- only a handful of programmers are able to consistently get it right, and even the best of the best still make basic mistakes.

    --
    Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  44. Any security model that assumes... by Anonymous Coward · · Score: 0

    ...this business will be populated exclusively by highly-competent professionals WILL NEVER BE SECURE. Security must be enforced automagically. If we depend on those writing code, we will never have security.

  45. Engineering standards by Raul654 · · Score: 4, Interesting

    Speaking as a computer engineer who passed the FE (on my first try) - the FE is most definitely biased in favor of civil and mechanical engineers, and against electrical and chemical. That being said, there's really very little incentive for EEs to take it. The only things you need it for are government work or testifying in court.

    However, it really gets under my skin when people call themselves "engineers" and they have *no clue* about engineering in general. In texas, they had a school collapse and kill 100 children because the guy who designed it wasn't a real engineer. As a result, they passed the toughest engineering-standards legislation in the country - if you call yourself an engineer and you are not certified (that is, you have not passed the PE) then you go to jail.

    --


    To make laws that man cannot, and will not obey, serves to bring all law into contempt.
    --E.C. Stanton
    1. Re:Engineering standards by chaos_echo · · Score: 1
      Speaking as a computer engineer who passed the FE (on my first try) - the FE is most definitely biased in favor of civil and mechanical engineers, and against electrical and chemical. That being said, there's really very little incentive for EEs to take it. The only things you need it for are government work or testifying in court.

      The requirements to be an Engineer vary from place to place as well. In Canada there is a national organization that sets out an approved curriculum including some basic education in all fields of engineering. This curriculum is then used by the provincial associations (which were created by legislation to prevent untrained people from practicing engineering) as criteria for membership (there is also an exam based route for those who didn't attend a Canadian university).

      I'm a Canadian computer engineer who took the NCEES FE exam just in case I move to the US. I passed on my first try as well and found that the material was pretty representative of the material covered in the courses I took.

      However, it really gets under my skin when people call themselves "engineers" and they have *no clue* about engineering in general.

      I strongly agree. There is a strong emphasis on responsibility and correctness in the Engineering profession that isn't adhered to by many people who call themselves engineers

  46. Better link by Brandon+Glass · · Score: 1

    Here is the English version of the above link.

  47. Speaking of errors... by mratitude · · Score: 1

    It might be the effects of /. but while I was trying to re-link the url I get this...

    Fatal error: Call to undefined function: message_die in /var/www/acmqueue.com/htdocs/db/db.php on line 88 ;-)

    --


    Mod me troll, if you must, I can't help it.
  48. Great article by sql*kitten · · Score: 4, Funny
    Fatal error: Call to undefined function: message_die() in /var/www/acmqueue.com/htdocs/db/db.php on line 88
    Seems some folk ought to practice what they preach, eh?
  49. Hold onto this article for future reference by PingXao · · Score: 1

    The next time there's a debate in the government (at any level) as regards Microsoft or their products I'm going to drag this article out and quickly follow with a list of security holes and patches that have cost businesses and consumers untold millions and billions of dollars in lost time and productivity. The syllogism here is that if sloppy code is to blame for bad security, and Microsoft has bad security then Microsoft must have sloppy coders.

    To be fair I've seen some truly horrendous code from other places, including OSS and Free Software, but there's something to be said for MS software as a result of the sloppy-code bad-security angle because they charge so much for it. So much for the old adage You Get What You Pay For. With most Microsoft products you actually get considerably less.

  50. Bad code is horrible online by Anonymous Coward · · Score: 0

    I have to browse the web on a non-developer computer because I get code errors asking if I want to debug on almost every page. I can't believe that so many well known pages allow so many problems in their code...

  51. Actually if you'd read the fucking article by BoomerSooner · · Score: 3, Informative

    Which is now /.'ed you would know the author was arguing the point against the hardware people putting buffer overflow checks in hardware for essentially a software design problem.

    He was saying that warnings, etc. need to require the programmer to fix errored code (ie, gets() vs fgets()). Like code optimization, security needs to be a low level function of a runtime/compiler.

    It is a different take on an old problem. If you don't like it simply don't read it. However, since you waste time posting redundant posts about redundant articles I figured it was right up your alley.

    1. Re:Actually if you'd read the fucking article by dasmegabyte · · Score: 3, Insightful

      And it's a great idea, too! Let's extrapolate it, and have gun manufacturers asking gun owners to get safeties for their fingers. After all, it's not the gun's problem if you've got shaky hands! It's not the car's problem if the road is icy and people don't know how to pump the brakes...let's get rid of ABS!

      Seriously...if after soo many years and soo many exploits programmers still haven't got it, they probably never will -- they'll just ignore the warning or throw in lip service methods (the way some Java developers perform exception handling by declaring all methods throws Exception). I've even heard people use the automatic bounds checking in C# or Java as an argument against them. Never mind that bounds checking is optimized to be predictive by the JIT, so it is rarely the cause of a bottleneck. When developers are so stupid that they consider essential security a bottleneck -- and the feature is trivial to add in hardware without slowing down I/O -- add the failsafe and be done with it. At worst, the bounds get checked twice, and that's not a bad thing.

      --
      Hey freaks: now you're ju
    2. Re:Actually if you'd read the fucking article by bee-yotch · · Score: 3, Interesting

      Let's extrapolate it, and have gun manufacturers asking gun owners to get safeties for their fingers.

      Actually, it would be more like gun manufacturers telling bullet manufacturers not to make defective bullets that will blow up in the gun so that the gun manufacturers don't have to add safety against defective bullets.

      they'll just ignore the warning or throw in lip service methods

      At least they'll get a warning.

    3. Re:Actually if you'd read the fucking article by Anonymous Coward · · Score: 0

      Actually, it would be more like gun manufacturers telling bullet manufacturers not to make defective bullets that will blow up in the gun so that the gun manufacturers don't have to add safety against defective bullets.

      Wow - an insightful gun analogy on Slashdot?! Whatever next?

      Seriously, this is the first gun analogy I've ever seen which helped me to understand the issue, instead of firing my automatic gun-control-troll reflex. That has to be worth a bit of karma - any moderators around?

    4. Re:Actually if you'd read the fucking article by Anonymous Coward · · Score: 0

      if after soo many years and soo many exploits programmers still haven't got it, they probably never will

      He says this in the article, too.

      Bounds checking languages aren't new. Pascal did this and everyone complained that it was slow. So we ended up with the strcat, strcpy, stroverflowmybuffer calls in C. Hardware is proposed as a solution because history suggests that people won't put up with the software solutions.

    5. Re:Actually if you'd read the fucking article by dvdeug · · Score: 1

      Actually, it would be more like gun manufacturers telling bullet manufacturers not to make defective bullets that will blow up in the gun so that the gun manufacturers don't have to add safety against defective bullets.

      If fourty years later they're still producing bullets that blow up, it's about time the gun manufacturers start building guns that actually work in the real world.

      Assigning blame is stupid; solve the problem.

    6. Re:Actually if you'd read the fucking article by Tukla · · Score: 1

      One thing the author suggests is that warnings should prevent the code from compiling, so it would be difficult to ignore them. IOW, there are no more warnings, just a broader range of compilation errors.

    7. Re:Actually if you'd read the fucking article by Tukla · · Score: 1
      they'll just ignore the warning or throw in lip service methods

      Ranum admits that there isn't much the runtime can do if developers deliberately bypass built-in safety checks. His idea is that the runtime should handle more of the gruntwork so that it's less work to use the safety checks than it is to bypass them. Right now it's the other way around, and that's why so many programmers take the insecure route.

  52. Sloppy programming or Sloppy language design? by an0nymous · · Score: 0

    I always suspected that buffer-overflowing, a possible security threat, is the result of a backdoor by design. That is not to say that binary-correctable!-code is a bad thing, but I wonder if Ritchie realized the many different ways his wonderful Pandora box will be used.

  53. Java was meant to create lightweight web apps. by autopr0n · · Score: 1

    It would have been pretty impressive if Java on the web had taken off the way sun envisioned. Flash was pretty new when ActiveX was announced, and it mostly compared to java, in that you could do 'anything' (which unlike java, let you overwrite the hard drive with zeros if the coder wanted).

    Honestly, I can't imagine what Microsoft was thinking with that one. ActiveX is used mostly these days as 1) a simpler way to install plugins, or 2) to infect people's machines with spy ware.

    Java applets, on the other hand, seem to be limited to interactive scientific demos, these days :P

    --
    autopr0n is like, down and stuff.
  54. Clickable Link by Anonymous Coward · · Score: 0
  55. Not Black and White by Doesn't_Comment_Code · · Score: 4, Funny

    Depending on how skeptical you are today, you might think:

    Really bad/inexperienced users write insecure code.

    Good programmers write good,secure code.

    Excellent programmers that work for companies that make a lot of money from support and updates write insecure code that is easy to fix.

    --

    Slashdot Syndrome: the sudden, extreme urge to correct someone in order to validate one's self.
    1. Re:Not Black and White by sipy · · Score: 1

      Like most things in life, (but not in news-grabbing headlines), the "truth" here lies somewhere inbetween the various extremes. We need to get "our side" - the Programmer's side - of this story out there.

      Programmers, like any other special-interest group, should band together to advertise our side of this story. Just like the healthcare industry is trying to PR it's way out of denying Mr. Jones his tripple-bypass surgery: blaming the tobacco industry on his failed health - and blaming McDonalds for clogging his arteries - they are putting their spin on the situation to get their side of the story out there into the public discourse, and (hopefully) influence those that are imposing laws and responsibilities onto their group.

      Programmers should band together, get a P.R. machine, and tell everyone - "HEY!!! Programming computers is hard! Computers may be everywhere, but that doesn't mean that they're easy to program. It just means that there are thousands and thousands of very skilled and highly intelligent people out there, making sure they work correctly. And, oh, by the way - outsourcing to India is "bad". Lowering our salaries is "bad". Microsoft's way of doing everything is "bad"." (It is, isn't it? ;) )

      Only once we band together, get our own B.S. salesmen (oops, I mean P.R. campaign representatives) and put "our side" of the story out there are we going to get our perspective into the public discourse, and start to influence business decisions that directly impact not only our jobs (or lack thereof), but the methods and processes of how we perform our actual work.

      Until then, companies will feel no remorse in kissin' your 401(k)-trackin', healthcare-wantin', starbucks-lovin', vacation-takin', SUV-drivin', come-in-at-10-o'clock'n' butt goodbye - You're being "outsourced" due to the "down/rightsizing" of the corporation, to help align resources with business initiatives, and produce results accretive to the bottom line. (Do you remember when they used to just say that you're FIRED cuz' they found a cheaper alternative, and the owner is using the extra profits to buy his mistress a condo on the beach?!.)

      (Oh, and while you're out,... can you get me a double-bacon-cheeseburger and a pack of Marlboro Lite's?... I'll pay you back... Thanks!)

  56. I Disagree by RAMMS+EIN · · Score: 4, Insightful

    I don't agree. Yes, if programmers wrote perfect code, there would not be vulnerabilities. But programmers are people, and people make mistakes. This is a given.

    For the solution, I think we must look not to the programmers, not to the languages per se, but to their standard libraries. C's pointer arithmetic and unchecked array bounds allow for a variety of mistakes, but also for great efficiency. It's the standard functions like gets, scanf, sprintf, even printf that make C unsafe. Sure, the programmer can be blamed for writing unsafe code, but if these functions were removed and replaced by safer ones, there would be that many fewer mistakes to make.

    Pointer arithmetic is mostly evil and should be avoided. As for bounds checking, I would think that with all the constant propagation modern optimizing compilers do, it would be easy enough to determine which accesses are guaranteed to not go out of bounds, and do bounds checking for the rest. Exceptions help, too. If something goes wrong that the programmer didn't account for, the program stops. In the best case, that means no harm done. In the worst case, the system is DoSed, a situation which is so undesirable from a productivity point of view that it's going to be fixed, whether or not the parties involved care about security.

    Comparing a language that follows all the guidelines set out here to one that doesn't (e.g. Java to C) will quickly reveal the truth: there are far fewer vulnerabilities in safer languages than in unsafer languages.

    Of course, mentality plays a role, too. With the industry having mainly focused on features and quantity, I am not surprised that software is so insecure, and I think businesses depending on this model are getting what they asked for.

    --
    Please correct me if I got my facts wrong.
    1. Re:I Disagree by DunbarTheInept · · Score: 1

      The lesson people need to learn is that with any large project you should identify *where* security is more important than speed, and in those places use the languages that sacrifice speed for security, but in other places, still leave open the ability to use the faster language. Your comments about pointer arithmetic being evil, and arrays without bounds checking being evil, are true when avoiding overflows is the most important thing. But they're not true when speed is the most important thing. If you're developing a web application that does a lot of math on big in-memory structures, for example, and you notice that it's running slow, then keep the input parsing part in Java, and after security checking the input, pass the input off to a C program to do the actual work, and use the Java program to pick up the results of the C program and show them back to the user.

      Basicly, any time you are taking user input or showing user output, security is so important that the efficiency or speed can be completely ignored. Generally, those aren't the areas where the speed bottleneck is anyway, so it doesn't matter if they are slow.

      But don't throw out the baby with the bathwater. Speed does have it's uses. The problem with array bounds checking is that, when the program is working right, it serves no purpose but to waste time. It's there precisely to catch the case where the code is broken, but it "penalizes" all code all the time, even the non-broken code.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

    2. Re:I Disagree by RAMMS+EIN · · Score: 1

      I wasn't suggesting to do checks anywhere and everywhere. Instead, I argued that compilers are smart enough to analyze the code and find out which places need bounds checks etc, and optimize away the checks in places where they are superfluous. This puts checks where you need them, which, with user input being the only variable, is around anything supplied by the user.

      --
      Please correct me if I got my facts wrong.
    3. Re:I Disagree by DunbarTheInept · · Score: 1


      I argued that compilers are smart enough to analyze the code and find out which places need bounds checks etc

      No, they're not that smart. About the only case they can drop the checks for is the case where you are using a literal as the array index.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  57. case in point...... by Anonymous Coward · · Score: 0

    No.
    They have that for some P.E. (Professional Engineer) licenses and I think it's a terrible idea. An engineer can lose his house and or his license because of one little mistake. Current programmers can and should do better but I don't want to lose my life's work because I used a == instead of a != in a for loop in an anti-virus program.

    1. Re:case in point...... by roman_mir · · Score: 1

      Read my reply to Mongoose Disciple. As I said most software developers will probably will not require this and will never be asked to do things this way, but there should, no, I correct myself. There must be a way for a company to get the job done at the level of professionalism required from real Certified Engineers. And by this I mean people who will have enough knowledge and power to do things their way. You cannot ask an Engineer to do something that will geopardize the project. If you do, the Engineer must not do it. Try taking that to court.

      BTW. If your application is not fully tested (as in unit testing, integration testing, performance testing) then it is not properly engineered.

  58. Re:Feeble minded weaklings by stanmann · · Score: 0, Offtopic
    I love the president.
    That's your problem. Here's some advice: when Bush starts talking about freedom, stop listening; that's not why we're there. That's just the excuse that is being given.
    That's your problem. Here's some advice: when your history book starts talking about freeing the slaves, stop listening; that's not why the civil war was fought. That's just the excuse that is being given.

    Nobody ever gives all the reasons for fighting a war, just the popular ones. Deal with it! Just because an impact is secondary or peripheral, doesn't mean it isn't part of the justification.

    THere are lots of reasons why we are in Iraq, freedom is one of them, national security is another, WMDs are part of that, So is the fact that it was time to finish a 15 year war, and Bush had the political capital to spend getting it done. 12 years ago his father used up his political capital freeing kuwait and had none left to finish the job.

    Aprove or not, This was the best time to finish the job.
    --
    Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
  59. The author simply doesn't get it by javajedi · · Score: 5, Interesting

    "We need to be realistic in recognizing that we're stuck with a set of languages and environments that are not susceptible to a massive change."
    This is a huge cop-out. Buffer overflows simply can not happen in Java. The same goes for almost all of the security problems that are turned into exploits these days. Instead of applying patches to compilers and yelling at ignorant developers, how about just switching to a development language and runtime environment (e.g. Java and its Virtual Machine) that simply doesn't allow these kinds of mistakes to be made?

    1. Re:The author simply doesn't get it by mslinux · · Score: 1

      This is so true... the same can be said for Python... no buffer overflows there either. It's simply not possible. Qmail (the world's most secure MTA) was written in Python.

    2. Re:The author simply doesn't get it by jrl · · Score: 1

      Taken from Reflections on Trusting Trust - Quoting Ken Thompson:

      "Moral
      The moral is obvious. You can't trust code that you did not totally create yourself. (Especially code from companies that employ people like me.) No amount of source-level verification or scrutiny will protect you from using untrusted code. In demonstrating the possibility of this kind of attack, I picked on the C compiler. I could have picked on any program-handling program such as an assembler, a loader, or even hardware microcode. As the level of program gets lower, these bugs will be harder and harder to detect. A well installed microcode bug will be almost impossible to detect."

      Basically, the higher of a language you use, the less secure you can possibly be because of all of the implications of trusting trust. If you can't audit it, you can't trust it. End of discussion.

    3. Re:The author simply doesn't get it by javajedi · · Score: 1

      "Basically, the higher of a language you use, the less secure you can possibly be because of all of the implications of trusting trust. If you can't audit it, you can't trust it. End of discussion."

      Good point, but not quite the end of discussion. The corollary to this is that the lower the level of the language you use, the less secure you are LIKELY to be because of the fewer number of checks in the platform that you aren't doing something stupid.

    4. Re:The author simply doesn't get it by kaffiene · · Score: 1

      Agreed. IMO Python / Java make a great pair of programming languages. Java's strictness is a boon in large scale programs and Python's flexibility makes it very powerful for scripting / glue / small programs

    5. Re:The author simply doesn't get it by kaffiene · · Score: 1
      Basically, the higher of a language you use, the less secure you can possibly be because of all of the implications of trusting trust. If you can't audit it, you can't trust it. End of discussion.

      This simply is not true. There are many more security flaws in code written in C and C++ than Java, and this is a fact. If the quote was correct, the opposite would be the case. But it is not.

    6. Re:The author simply doesn't get it by groomed · · Score: 2, Insightful

      Arguably the two biggest problems today are spam and trojans. Both of these stem from what is essentially a security failure, namely the abuse of authority. In the case of spam, the spammer is erroneously granted the authority to send out millions of emails. In the case of trojans, a piece of code fools the user into granting it the authority to run.

      Neither of these problems is solved by using managed code environments.

      Yes, Java solves a number of annoying problems. But it does so at significant expense, and the problems it solves are exactly those problems that are trivial to fix when found. It does not, and can not, fix the much more prevalent and potentially much more disruptive problems that occur at the human level.

      Only unrelenting vigilance and diligence during development and deployment can ever hope to solve those problems.

  60. er, nevermind. I r teh ratrad. by autopr0n · · Score: 0, Offtopic

    I thought the misspelling was intentional, but rereading the post I think, uh, it wasn't.

    --
    autopr0n is like, down and stuff.
    1. Re:er, nevermind. I r teh ratrad. by Tarantolato · · Score: 0

      It was.

  61. They have by bonch · · Score: 3, Informative

    Unfortunately, unless someone as big as Microsoft (ha!) or IBM gets behind the message, you're not going to see much come of it.

    They have--see C# and .NET. Longhorn will be entirely .NET-based.

    1. Re:They have by rgmoore · · Score: 3, Insightful
      They have--see C# and .NET. Longhorn will be entirely .NET-based.

      Which doesn't really address the underlying issue. Yes, managed languages like C# and .NET are essentially immune to some classes of exploits that cause problems in C and C++. That doesn't mean that they're completely secure, though; there are still plenty of classes of security holes that apply to managed languages. You can bet that bad programmers will find plenty of them.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    2. Re:They have by GCP · · Score: 3, Insightful

      Yes, it DOES address the underlying issue. Just because part of the problem remains doesn't mean that the problem hasn't been addressed at all.

      If you stop using C/C++ by default and use safer languages such as Java or C#, your code will become more secure. The fact that it still isn't 100% secure doesn't mean you've made no progress. And with fewer vulnerabilities, you can pay more attention to the types of vulnerabilities that remain.

      --
      "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
    3. Re:They have by 0BoDy · · Score: 1

      As I recall, Lognhorn won't support .NAT at all. M$ is abondoning the technology altogether.

      --
      Can I be a Luddite too?
    4. Re:They have by johnnyb · · Score: 5, Informative

      Actually, you can continue to use C/C++ and just use a garbage collector with them. I don't know why more people don't do this. You don't even need to change your code, as Boehm's garbage collector translates malloc() to it's own allocation routine, and free() does nothing.

      In fact, even better, if you have Boehm GC installed anywhere on your system you can do this for already compiled programs using LD_PRELOAD.

      Just do:

      export LD_PRELOAD=/path/to/libgc.so
      /path/to/program

      and I'm automagically using a garbage-collected runtime for the program, even if it was compiled to use the standard malloc()/free() calls.

    5. Re:They have by bonch · · Score: 1

      On the same token, you can continue to use C and C++ to create managed code and communicate with the .NET framework. But it would be rather silly to do, as often 50-line tasks in C++ can be reduced to 5 or 10 in C#. It's not just the garbage collector that raises the security of C#/.NET above C/C++, but it is certainly a factor.

    6. Re:They have by johnnyb · · Score: 1

      They can often be converted to even less in Perl :) I learn new time-saving Perl features almost every day. Recently learned the wonders of the flip-flop operator - very cool.

    7. Re:They have by burcarpat · · Score: 1


      > "If you stop using C/C++ by default and use safer languages such as Java or C#, your code will become more secure. The fact that it still isn't 100% secure doesn't mean you've made no progress. And with fewer vulnerabilities, you can pay more attention to the types of vulnerabilities that remain."

      actually, if you stop referring to c++ as "c/c++" and understand that c++ is a separate language and treat it that way, may be you won't need to use java or c# to start with

      the problem with c++ is this: even the 'experienced' c++ programmers out there still think of it as a 'better' c and they use it that way. they insist on using pointers everywhere; they insist on avoiding stl; they insist on not learning what a smart pointer is, etc. java or c#, on the other hand, force the programmer to a single paradigm and thus solve the problem that way

      it has also something to do with libraries you might wanna use during development. with java and c#, you have sun and microsoft to dictate such libraries. with c++, you are clueless, though. there are excellent libraries out there such as boost and ace but people don't know about them that much. thus, they keep reinventing the wheel, and in a much less secure way, i might add

      so, it's not c++ itself but the circumstances surrounding it. people who just can't let go off their c habits and lack of standardized apis make the life of an average c++ programmer much harder. yet, if you educate yourself, then the work you need to do in c++ to achieve security is going to be roughly the same as java or c#

      -- ba

    8. Re:They have by OeLeWaPpErKe · · Score: 1

      This is (obviously) not equivalent to using something like java.

      Read a bit about the java security architecture before you state something like this.

      E.g. in java it is IMPOSSIBLE to call private members of a class. In c++ you can do something like (*(c+2))(5) (granted it'll also need a cast but you hopefully see what this code does). This is not possible in java.

      In java security is closed (except for bugs in the jvm implementation). In java you can just load a binary from the internet and execute it, without fearing for security violations.

    9. Re:They have by johnnyb · · Score: 1

      "This is (obviously) not equivalent to using something like java."

      I never said it was. However, a lot of the Java stuff is actually more of a hack around problems in the operating system which have nothing to do with the language. Privileges, like those implemented in Java, are more of the role of operating systems than languages.

      "In java security is closed (except for bugs in the jvm implementation). In java you can just load a binary from the internet and execute it, without fearing for security violations."

      But there is nothing that says this needs to be on the language level on not on the operating system level.

    10. Re:They have by Anonymous Coward · · Score: 0

      it's own allocation routine

      "its".
      No apostrophe.

    11. Re:They have by gdchinacat · · Score: 1

      The java.lang.reflect.AccessibleObject.setAccessible() method may allow you to invoke private methods you wouldn't otherwise have access to in Java. Of course, you still need the security managers permission to do this, so it is still more restricted than C++.

  62. Wrono by autopr0n · · Score: 1

    Not everyone has been saying 'bad programmers cause security holes, not languages.' In fact, quite a few people have been saying that choice of programming language can affect things greatly, particularly people with 'safe' programming languages. This is certainly the case with respect to ye olde buffer overflow.

    --
    autopr0n is like, down and stuff.
  63. Java Applets Fiasco by RAMMS+EIN · · Score: 2, Insightful

    ``I'm not sure that was why applets were not a big hit... I'd blame the slow JVM startup time for that one.''

    There is that, and there are the various incompatibilities. Microsoft's VM is not going to run your code, unless you specifically write it to work on it. For other code, you'll typically need a fairly recent VM, which means a hefty download if yours is not up to date. Many users are not willing to invest so much time just to see your sucky applet - and most of them are sucky, compared to real native applications.

    --
    Please correct me if I got my facts wrong.
    1. Re:Java Applets Fiasco by Tim+Browse · · Score: 1
      Microsoft's VM is not going to run your code, unless you specifically write it to work on it.

      That's a fairly broad assertion...is the MS JVM that different, that code just won't run on it?

      My rusty memory tells me it's a few library calls that are different, and a lot of moaning about MS adding their own native C interface (which if you then used, then sure, it wouldn't run on other JVMs), but I'm willing to be corrected...this was a long time ago :-)

    2. Re:Java Applets Fiasco by RAMMS+EIN · · Score: 1

      The main problem with MS's VM is that it misses lots of features. Last I worked with it, it implemented a subset 1.1, while the rest of the world was already at 1.3. It's perfectly possible to write code that works perfectly on Sun's JVM, but not on MS's.

      --
      Please correct me if I got my facts wrong.
    3. Re:Java Applets Fiasco by Anonymous Coward · · Score: 0

      Awhile ago I was just goofing around writing a Java applet. It works fine in mozilla and a few Mac browsers, but it won't load at all in MSIE. It says the applet is not found.

      I had a tag like:

      <applet codebase="/" code="MyApplet.class" "applet.jar">
      </applet>

      And MSIE wouldn't load it. What does it take to convince IE to load MyApplet.class from /applet.jar?

      I heard that you had to put all your classes in a CAB file and then add a "CABBASE" parameter, but I tried that and it didn't work.

    4. Re:Java Applets Fiasco by Anonymous Coward · · Score: 0

      Excuse me, that tag should read:

      <applet codebase="/" code="MyApplet.class" archive="applet.jar">

      Forgot to type "archive="

    5. Re:Java Applets Fiasco by ehiris · · Score: 1

      What is a real native application? Are you talking about client server or legacy applications?

  64. Where in the world is my ActiveX? by hummassa · · Score: 5, Funny

    Ummm gosh, the only ActiveX applets I ever saw was right after it was released. Heh, I often say Java is dead on the web (though I know it isn't completely) but now ActiveX is entirely dead except for like the applet on Windows Update :-P

    You are a Holy Person, sir/madam.

    Go find some pr0n and you'll see a lot of activeX thingies trying to install. Lucky me I use Moz.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    1. Re:Where in the world is my ActiveX? by Anonymous Coward · · Score: 0

      Go find some pr0n and you'll see a lot of activeX thingies trying to install. Lucky me I use Moz.

      Moz does not use active X? Can you spell exactly the URL of this prOn site? I have tried moz.org, moz.com etc, unfortunately neither was a prOn one...

    2. Re:Where in the world is my ActiveX? by tasinet · · Score: 1

      I had to read it at least 20 times and I still can't tell if you're joking B I G _ T I M E or if you're just from another planet, probably looking for earth pr0N.

    3. Re:Where in the world is my ActiveX? by hummassa · · Score: 1

      I think he got you. Either it's a joke, or he is from outside Federation space.

      --
      It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  65. THIS JUST IN by Anonymous Coward · · Score: 0

    In other news, Blame bad diseases on sloppy sex. Blame 5 on 2 and 3. Blame the retard next door on his mom and dad. Blame engineering excellence on Apple.

    Get a room.

  66. It doesn't? by bonch · · Score: 1

    Using "managed code" does not "secure" your projects.

    It sure helps. Type-safe, garbage-collected code running sandboxed as opposed to native Win32 junk?

    Even DirectX has a Managed API now (and apparently offers 95%-99% performance of equivalent native code...we'll see once somebody actually codes a real engine in C#).

  67. Where do you live? by Smeagel · · Score: 1

    Trying covering a mortgage with a 5 digit salary in Silicon Valley, or anywhere else where development boomed in California.

    In Pleasanton, a place where many IT companies are based, the average house sold was over 700,000 last month.

    Try covering that with anything less than TWO people making a 6 digit salary... This entire nation isn't as cheap as the midwest (or wherever you live where you think 5 digits pays a mortgage with ease).

    1. Re:Where do you live? by ThosLives · · Score: 2, Insightful
      Sounds to me like the supply and demand thing is broken; if people don't like paying $0.7 M for houses then they shouldn't make offers for that much...

      Sure, part of it is spatial inflation, but much of it is people not willing to stand pat and say, "woah now, that's just too much for product X". I know it's difficult when it's something like a house, but you can always choose to live in an area with a much lower cost of living. There are places other than Silicon Valley (increasingly in the Midwest and Southeast) with good "IT jobs" where you can make "a pittance" and live like a monarch - you'd be surprised how much house $120k will buy you in the Southeast!

      Rather than whining that 6 digits isn't enough due to cost of living, be the smart shopper and say, "I'm gonna stop supporting this crap and move." If, however, the cost of moving (including non-monetary things like family strife or whatever) is more than what you save by moving, then you have no right to complain, because you're complaining about your own choices.

      It's not like anyone's forcing you to stay in a place where your income to expenses ratio, regardless of what the actual numerical value happens to be, is not what you want. And if they *are* forcing you, well, that's another issue entirely...

      --
      "There are a dozen opinions on a matter until you know the truth. Then there is only one." - CS Lewis (paraprhase)
    2. Re:Where do you live? by Anonymous Coward · · Score: 0

      your own damn fault for living somewhere as shitty as california.

  68. Or... by bonch · · Score: 2, Insightful

    Maybe he's not trying to "prove" anything but merely state his opinion that Java is annoying and that people hate it.

    Not everything has to be a thesis here, y'know. I don't get why people only ever demand proof for an opinion when it's an opinion that goes against the majority.

    1. Re:Or... by cynic10508 · · Score: 1

      Not everything has to be a thesis here, y'know. I don't get why people only ever demand proof for an opinion when it's an opinion that goes against the majority.

      Yet an opinion has to be either true or false. It doesn't matter which one. However, what I said was that his argument is indeterminate, and therefore can't be a valid opinion.

    2. Re:Or... by bonch · · Score: 1

      The truth of an opinion is subjective. It's impossible for you to declare an opinion to be "indeterminate" because that is your own subjective opinion on his opinion.

      Instead of referencing dictionaries and attempting anal retentive debate tactics, how about taking a deep breath and realizing people have differing perspectives on things?

    3. Re:Or... by cynic10508 · · Score: 1

      The truth of an opinion is subjective. It's impossible for you to declare an opinion to be "indeterminate" because that is your own subjective opinion on his opinion.

      Well, yes and no. You're correct when you say an opinion is subjective. But the truth of an opinion is not subjective. Having an opinion means it may be impossible to gather the evidence to prove your case. For instance, it is my opinion that NP-complete problems are intractable. We don't know if that's true or false, and I may not be able to prove it.

      Indeterminism is almost like a trinary system of logic, although that's an over-simplification. So long as an opinion is true or false, but not indeterminate, it's a valid opinion to hold.

      Instead of referencing dictionaries and attempting anal retentive debate tactics, how about taking a deep breath and realizing people have differing perspectives on things?

      Because I'm appealing to a higher, more abstract layer than just opinions; a common, objective system of logic.

      And, yes, of course we all have different perspectives. But perception alone isn't everything. The mere fact that we're both relying on a shared system to state our arguments hints at a common, shared universal experience external to our perceptions, stymieing any meta-physical argument for radical skepticism.

    4. Re:Or... by Anonymous Coward · · Score: 0

      YHBT. YHL. HAND.

      Love,
      bonch (aka Overly Critical Guy)

  69. C is lousy but everything else is worse. by xyote · · Score: 1
    C is especially bad with multi-threading. It doesn't help that the ANSI C and Posix thread committees refuse to acknowledge each other's existence.

    Java has a cleaner thread model but is not as extendable as C. In Java you find that what you want to extend is either not an abstraction point or somebody arbitrarily specified the final keyword to stroke his ego.

    So basically, you will never get rid of C unitl you replace it with something as easy to extend as C.

  70. Define secure. by bs_02_06_02 · · Score: 4, Interesting

    Define secure.

    I can guarantee that a developer and a customer will have two different definitions of secure. And, the cost will be more than the customer will want to pay.

    How many customers can write a scope of work, send it off to a developer, and get a proper quote for a project that includes adequate security? How many customers actually remember to ask for security? Or if they do, do they put enough priority on security?

    I bet the answer is very few. I know from past experience that most customers take the cheapest bid. The cheapest bid is usually the one that is skipping something, and the easiest thing to skip is security. If the customer didn't ask for it, is the developer responsible? Is Micro$haft reponsible? Nope. Security is not in their project. They want speed. So, there's always a niche for ActiveX. Microsoft knows they can undercut someone's cost because security isn't an issue.

    And everyone complains about Microsoft's future security ideas. Well, what do people really want? Security? Or no security?

    --
    -- No sig for you!
    1. Re:Define secure. by TiggsPanther · · Score: 1
      And everyone complains about Microsoft's future security ideas. Well, what do people really want? Security? Or no security?

      Depends who you ask. Developers, sysadmins, and geeks want security.
      Average users would like security, but want easy to use stuff (Often meaning "not secure"). They don't always realise that what they're using isn't secure. Granted we geek-types don't always educate them, but when we do the alternatives aren't always what they want. (Either not-easy, or not-cheap.
      Companies (well Managers, especially of the PHB persuasion) want cheap. OK, they want secure too, but when alternatives are suggested they often go for the option that is "secure enough" (which sometimes isn't), as it's the less costly.

      What people really want is secure without having to pay for it. (Whether in money, in time/speed, or in learning-curve)
      Sadly this isn't possible, as there's always a trade-off somewhere.

      Tiggs
      --
      Tiggs
      "120 chars should be enough for everyone..."
  71. The bad, good, great and expert by 192939495969798999 · · Score: 2, Insightful

    1. the bad programmer can't fix it, but says they can, tries anyways and makes it worse.

    2. the good programmer can't design it, but says they can, tries anyways and makes it ok.

    3. the great programmer invents something like the blinking cursor, which makes life better.

    3. the expert is on an island living off of the revenue generated by their two great ideas, one was to hire the good and the bad programmer for peanuts, since the economy sucks, and two was score clients using the great programmer's invention of the blinking cursor.

    --
    stuff |
  72. true in web apps in general by rebelcool · · Score: 1

    The problem with web apps tends to be security design problems, as opposed to security by technical (ie buffer overflows).

    For example, not checking for validity of POST data being sent. I can think of several holes I'd found on some webstore software that would allow a user to enter just about any price they wanted for products, because the store software didn't have a sanity check on incoming price fields.

    --

    -

  73. Brings up a good point... by gillbates · · Score: 3, Insightful

    Good security is more a matter of developer foresight than anything else. Almost all of the security flaws known to date hinge on two factors:

    1. The developer failed to foresee the manner in which his code could be used for malicious purposes.
    2. The developer failed to build a security implementation that was practical for his intended users.

    The first point applies to a lot of Microsoft software; the second, to a lot of software across the board. The fact that a sysadmin blames compromises on easily-guessed passwords is no solution at all - yes, the user is at fault, but the user wouldn't have chosen a bad password if the system of username/password wasn't broken in the first place. It seems that sysadmins and developers alike forget that ordinary people have to remember things far more important than the dozen or so username/password combinations that it takes to live in today's society...

    --
    The society for a thought-free internet welcomes you.
    1. Re:Brings up a good point... by TiggsPanther · · Score: 1
      It seems that sysadmins and developers alike forget that ordinary people have to remember things far more important than the dozen or so username/password combinations that it takes to live in today's society...

      Yeah, and an additional problem is that many people (and I fully include myself in this group) are a little lacking in the "memory for details" department. People are used to either reducing things to the easily remembered/guessed, or writing things down. (Although not for passwords, I try to always write things down when they really matter, because I know I won't remember them otherwise.)

      Passwords shouldn't be easy or written down because they're important. But that is counter to the usual attitude you need to take to important things when you're prone to forgetting things - in that nromally the more important something is the more important it is to have a memory-aid knocking about somewhere.

      I think that any kind of challenge-response authentication system is going to run into problems simply because of this. I don't know what the answer is, if indeed there is one. I think we're always going to have the conflict in that the more that something has to be harder for the wrong people to get at, the more the right people are going to want to get to it easily. And it's hard to know where to draw the line. ("Err on the side of caution" is all well and good, but make the User jump through too many hoops and he'll either abandon your product, or write the passwords on the Post-It on his monitor)

      Tiggs
      --
      Tiggs
      "120 chars should be enough for everyone..."
  74. Code Sample by cynic10508 · · Score: 1

    I don't understand why people hate Java so much...

    public class SomeCode { public static void main(String[] args) { Buffer.overflow(new Rootkit("31337 3y3 0wN j00z")); } }
  75. Make it hard to fail by mcrbids · · Score: 4, Informative

    Bugs should not result in security issues.

    I repeat: Bugs should not result in security issues!

    A properly designed application will have multiple layers of error detection and security checking. As you write your software, abstract things like security checks and database access into an API, and then do insane amounts of input validation behind that API!

    In my home turf language, PHP, one of the biggest common problems in applications is the dreaded SQL-Insertion bug.

    The pat, standard answer is to validate-validate-validate!

    But, I'm human. I *WILL* make mistakes. It's only a question of when, not if.

    Ask yourself: How can I structure my application so that mistakes in this regard do not result in an immediate, full compromise?

    I bury database access behind an API that forces me to identify the data being passed to the database, and then trap errors from the database so it doesn't show anything to the web client.

    Example:

    <?
    $sql="INSERT INTO logindata (login, password) VALUES ('[login]', '[password]')";

    $todb=array('login'=>$login, 'password'=>$password);

    if (!$DB->SafeQuery($sql, $todb))
    Error($DB->Error());

    ?>

    What happened here? The SQL statement does not contain any data - instead I'm passing a template for the query, and the data array to parse into the query. The function SafeQuery() does a pattern match to get the names of the fields (in the square brackets) and then does the requisite addslashes(), as well as checking the number of fields to ensure that everything matches up, before actually dumping this statement over to the database.

    Errors get trapped within the object, and are accessed through function Error(). This prevents any sensitive information being sent to the browser, and the global Error() function simply displays an "Sorry but an error occured" webpage while logging the text of the error message, and quits.

    Now, none of this negates the need to do input validation - but this makes a very bad threat for PHP application all but disappear!

    As you develop your applications, structure them as much as possible such that bugs and errors do not result in security breaches.

    Use constraints and triggers in your databases to kick out data that can't be demonstrated as good. Use APIs and functions to interface with areas (such as the shell/CGI interface) so that common security mistakes (such as not escaping a shell argument) simply can't happen.

    Repeat after me: Bugs should not result in security issues!

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:Make it hard to fail by Anonymous Coward · · Score: 0

      The problem with this approach is that the PHP programmer still has to ensure that "SafeQuery()" is correct. (I've seen some really braindead input checking from PHP guys)

      A better approach would be to build in SQL Parametrization into the environment and have that deal with the escaping issues. See ADO/ADO.NET/JDBC/etc.

    2. Re:Make it hard to fail by Anonymous Coward · · Score: 0

      As an aside, that is waaaaay overkill. See PEAR::DB and DB::quote for all user data passed into an SQL query.

      Hint: in MySQL you can quote every single data type passed to it via SQL (including integers and floats) and it automatically converts them to the correct type, so calling DB::quote blindly for all user data is hunky dory.

      It makes more sense to use GRANT/REVOKE than templating SQL queries, usually. Privilege separation and access control lists can do a lot more for you to save your code than templating, usually (e.g.: using a quick effective database 'sudo' request in a sandbox to update a customer's shopping cart with the proper prices & totals from a website).

    3. Re:Make it hard to fail by mcrbids · · Score: 1

      As an aside, that is waaaaay overkill. See PEAR::DB and DB::quote for all user data passed into an SQL query.

      Hint: in MySQL you can quote every single data type passed to it via SQL (including integers and floats) and it automatically converts them to the correct type, so calling DB::quote blindly for all user data is hunky dory.

      It makes more sense to use GRANT/REVOKE than templating SQL queries, usually. Privilege separation and access control lists can do a lot more for you to save your code than templating, usually (e.g.: using a quick effective database 'sudo' request in a sandbox to update a customer's shopping cart with the proper prices & totals from a website).


      I don't think you understood what was said, at all.

      We're not talking about typing - how is MySQL's dynamic typing going to catch a non-escaped quote in the statement?

      Also, why would you assume I'm talking about MySQL? (I use PostgreSQL, which also has dynamic typing, but still...)

      Even with GRANT/REVOKE, all you're doing is limiting the damage from an sql-injection error, not preventing it from happening in the first place.

      Remember, a properly called, malicious sql-injection error does not result in errors that can be rolled back with a transaction!

      ACLs and Priv Sep are just another layer of security that yet again underscore my primary point:

      Bugs should not result in security issues!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    4. Re:Make it hard to fail by mcrbids · · Score: 2, Informative

      The problem with this approach is that the PHP programmer still has to ensure that "SafeQuery()" is correct. (I've seen some really braindead input checking from PHP guys)

      The point of this function is that no input validation is needed whatsoever to prevent an sql-injection error.

      I'm not trying to say that you don't need to do input validation - there are still plenty of logic errors and the like that are not prevented from using this tool.

      But given the severity of sql-injection vulnerabilities, wouldn't it be smart to stop them dead in their tracks?

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    5. Re:Make it hard to fail by 12357bd · · Score: 1

      Bugs should not result in security issues.

      True, deadly true, but the point of the article stills holds, tools/environments should be better and facilate exactly your point: Bugs should not result in security issues.

      --
      What's in a sig?
    6. Re:Make it hard to fail by Anonymous Coward · · Score: 1, Insightful
      I think you missed the point is that SQL Injection should be prevented in the database layer. PHP Developers such as yourself push "Worst Practices" by telling developers to tack SQL strings together and roll their own potentially buggy SafeQuery thing.

      for example, in c#:
      string sql = "INSERT INTO logindata (login, password) VALUES (@login, @password)";
      SqlCommand cmd = new SqlCommand(sql, conn);
      cmd.Parameters.Add("@login", SqlDbType.VarChar, 50).Value = login;
      cmd.Parameters.Add("@password", SqlDbType.VarChar, 50).Value = password;
      Notice that the developer has no worries about SQL quoting or escaping - it's all handled by the database layer.
    7. Re:Make it hard to fail by 12357bd · · Score: 1

      not only in sql, a tipical way to filter/validate a string against a grammar or format is to use an 'object metaphor'; you parse the nonvalidated input string (no structure) and creates an 'object' (fixed/controled layout) modifying obhject properties acording to parsed values, then you convert that 'object' to a sintacticaly 'always correct' string, that represents the 'view' of the input string by the parser.
      The idea is simple, don't let strings (or parts of) to pass from user to inner layers.

      --
      What's in a sig?
    8. Re:Make it hard to fail by maximilln · · Score: 1

      Bugs should not result in security issues.

      I repeat: Bugs should not result in security issues!


      You are so absolutely right. They shouldn't. The fact is that many many many programmers do not hold themselves to the same standards that you do. In the proprietary community, as many have pointed out, this is often overlooked if the end product can still be shipped to the client. In the open source community this is more often caught and fixed with a bug report.

      It used to be that a bug caused the compiler to choke or the application to exit abnormally. As things got larger and more complex bugs allow programs to skip routines, traverse code, or even modify memory or files that they shouldn't. For many years now I've tried to get more people to take up the motto: "Every bug is an exploitable bug."

      --
      +++ATHZ 99:5:80
  76. Well no Sh!* ! by mysterious_mark · · Score: 4, Insightful

    This is exactly what those of us in the trenches coding have been saying for many years. The current abysmal state of poor software performance seems directly correlated to the race to the bottom in 'cutting' develoment cost. The solution to producing secure reliable code is to hire experienced competent programmers who understand security issues, and have a vested and sincere interest in producing reliable secure code. This generally means a long term relationship and with and understanding of the clients's needs and business perspectives, as well as the technical competence and willingness to put forth the efffort required to produce quality code. This is necessarily the oppossite of the current trend towards going with the lowest bidder, outsourcing, H1-B's, and throwing large numbers of low skilled developers at a project rather than using a small group of highly skilled developers. Fortunatley for me however my current client regognizes this and only retains a couple of long term highly skilled developers, they do have a number of very nice, secure and relaible applications to show for this, absent the usual bloated development team. This however may be the exception in the industry. Hopefully the corporate types will eventually figure out that throwing large numbers of low skilled developers at a project will not produce relaible secure code. This issue been well documented obstensibly in works such as 'Mythical Man Month" and "The Pragmatic Programmer" however it seems most corporate manager types have yet to acquire this wisdom. Mark

    1. Re:Well no Sh!* ! by doinky · · Score: 4, Interesting
      The "lesson" most CEOs learn from an unsuccessful software project which failed due to one or more of the reasons you cite is:

      "software people are worthless".

      except he'd insert "shit" for "worthless". In this country (USA), the people responsible for the failures of these types of projects are never held accountable in a way that makes it possible to the next executive to learn from their mistakes.

      Some days working in this industry feels like the story of Sisyphus

  77. OT: Sig Comment by RAMMS+EIN · · Score: 0, Offtopic

    ``10 out of 10 Terrorists agree - Anybody but Bush in 2004''

    Also read this.

    I don't agree with your sig though - without an enemy they actually have a good reason to fight, terrorists would lose a lot of the support they are getting. They are only so powerful, because many agree with their cause.

    --
    Please correct me if I got my facts wrong.
  78. Re:Feeble minded weaklings by Limburgher · · Score: 1
    >>Approve or not, This was the best time to finish the job.

    Possibly, yes, but still doesn't necessarily mean it was a good idea.

    --

    You are not the customer.

  79. BINGO! by sterno · · Score: 3, Insightful

    The problem is that QA and development of good specifications prior to a project have a huge impact on the quality of the product that results. Having said that, QA and specifications are never seen directly by the outside world.

    Most programmers I know WANT to write good code but have the odds stacked against them. They aren't given the time and resources to do the job well. When it's crunch time, security and quality are the first things to go because they are less likely to get canned over a bug than over a completely missing feature.

    --
    This sig has been temporarily disconnected or is no longer in service
    1. Re:BINGO! by GCP · · Score: 4, Insightful

      That's where I think the author completely failed to make his case for changing programming languages not being a solution.

      People who program in C/C++ are vulnerable to all of the security risks Java and C# programmers are vulnerable to, plus quite a few more that Java and C# programmers are NOT vulnerable to.

      So, if you have a program that could reasonably be written in either Java or C++, and you choose C++, you've just increased the number of security vulnerabilities you'll have to check for. Given the same development deadlines, but with more areas to check, you're going to be handicapped from a security perspective if you choose C++.

      Then add to that the fact that almost everybody with equivalent experience is more productive at implementing a feature in Java or C# vs. in C++, with the same deadline pressures you have even less time available for security checking on top of more things to check if you work in C++.

      Of course there are some tasks for which C or C++ are the still best choice for other reasons, so I still use both frequently and applaud any attempt at adding better security scanning to the compiler.

      I can't help thinking, though, that even in those cases a language with the granularity of C but with built-in strings (UTF-8), arrays that are checked by default but with an override, with fixed built in data types (e.g., a 'byte' type that isn't signed in some places and unsigned in others), and yet without all of the massive baggage of C++, would go a long way to improving C's bug proneness without removing its power.

      Unfortunately, most developers value such things as security, globalization and, frankly, reliability so little, resist change so much, and are so arrogant about their l33t ski11z that would only be impeded by "guard rails", that a language that offered only these improvements on top of C would never put a dent in C's popularity.

      And to that extent only I agree with his thesis that bad programmers are the root of the problem.

      --
      "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
    2. Re:BINGO! by Anonymous Coward · · Score: 0
      >QA and specifications are never seen directly by the outside world

      Hmm, maybe that could change. If in addition to marketing hype, customers expected access to the QA plan and an audited result, then they could judge. It would be a little like requiring the Nutrition Information on a food label -- if the information is there, then the consumer can better judge whether his money is being well spent.

    3. Re:BINGO! by Anonymous Coward · · Score: 0

      People who program in C/C++ are vulnerable to all of the security risks Java and C# programmers are vulnerable to

      Except those imposed by the RE, or techniques used by the RE. (eg, if there was an inherent security flaw in GC)

      plus quite a few more that Java and C# programmers are NOT vulnerable to.

      Depending on coding style.

      but with built-in strings (UTF-8)

      Why UTF-8? UTF-16 is far easier to code with, and even more compact in some (human) languages. It really seems inconsistent, to me, to favor languages like Java and C# and then promote a more difficult character encoding.

    4. Re:BINGO! by Anonymous Coward · · Score: 0

      How is UTF-16 any simpler? Characters are still variable length (any code point above U+FFFF requires four octets, not two) and you've added byte ordering as something else that can go wrong.

    5. Re:BINGO! by sparre · · Score: 1
      Of course there are some tasks for which C or C++ are the still best choice for other reasons, so I still use both frequently and applaud any attempt at adding better security scanning to the compiler.

      It would probably be stupid to disagree completely with that, so I will just disagree a little bit. One of the arguments I have heard most often for using C or C++ instead of Java (my acquaintances don't seem to be interested in C#) is that they gives you better access to the hardware. While that's correct, I like to use Ada, where I both get a fair deal of checking done by the compiler and reasonably easy access to the raw hardware.

      I can't help thinking, though, that even in those cases a language with the granularity of C but with built-in strings (UTF-8), arrays that are checked by default but with an override, with fixed built in data types (e.g., a 'byte' type that isn't signed in some places and unsigned in others), and yet without all of the massive baggage of C++, would go a long way to improving C's bug proneness without removing its power.

      I am not sure I understand you completely (exactly what do you mean by "with the granularity of C"? that everything doesn't have to be a class?), but I think you might appreciate languages like Ada and Eiffel (although none of them have UTF-8 encoded strings built in AFAIK).

      </ada-propaganda> :-)

      --
      "There is nothing worse than having only one drunk head."
    6. Re:BINGO! by GCP · · Score: 1

      I am not sure I understand you completely (exactly what do you mean by "with the granularity of C"? that everything doesn't have to be a class?)

      That's right. Although I enjoy strong OO languages such as Java, C#, Ruby, or Eiffel, that nicely abstract away the machine details such as memory addresses and replace them with conceptual data types (instances of nifty classes), sometimes one needs to program a little "closer to the metal" for optimization of some sort (size of executable, memory usage, execution speed, or whatever.)

      For these tasks, I'd be interested in having a language that's just a little higher-level (of abstraction) than C. The idea would be to use the non-linearity of costs/benefits ("80/20 rule") to try to gain as much convenience and reliability as possible in exchange for giving up as little of the advantages of C as possible.

      I don't have much experience with Ada. I've done more with Eiffel, but nothing commercial for the practical reasons that hamper all non-mainstream languages. I like it, though, and wish that the really good "melting ICE" stuff were free, because nobody is going to buy non-mainstream tools for me. Unfortunately, Eiffel's time has passed, I'm afraid. I suspect the same is true of Ada, but I don't follow it enough to know.

      --
      "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
    7. Re:BINGO! by Anonymous Coward · · Score: 0

      I urge you to look into Ada 95. Not only does it have classes, generics, and threads, but you can declare a type and then use pragmata to specify exactly how it should be laid out in memory (unlike C, where you just have to assume your compiler does it reasonably and consistently). And the GNAT GCC-based implementation is Free Software and quite faithful.

  80. "Sloppy" needs clarification by Junks+Jerzey · · Score: 4, Informative

    The first image conjured up by "sloppy" is someone using sprintf in production code (much buffer overrun potential), raw pointers unnecessarily, ad-hoc string manipulation code, and so on. But it's much deeper than that.

    Consider something as simple as BMP file format decoder. Writing a decoder is easy. It takes about 30 minutes tops to write one for a subset of the format. But writing a safe version is much more difficult. First, you have to validate all fields. Easy enough. Then you have to handle attempts to crash an application by passing in really huge values, like 10,000,000 pixels in each dimension. That's a bit trickier, because you have to figure out what you should allow and what you shouldn't. Then you have to deal with intentionally malformed images, where the RLE information doesn't add up to the total image size. Depending on how the code is written, this can cause you to chew through memory past the end of the image. To fix this, you have to put some checks into your inner decoding loop. The temptation to avoid doing this is strong, especially among "performance" oriented coders.

    So, yes, you can blame this on poorly written code. But had this been written in a checked language, like Lisp or Python or any similarly safe language, then some of the problems go away immediately. Not all of them but some.

    1. Re:"Sloppy" needs clarification by TheSunborn · · Score: 2, Informative

      Here is a better solution. Write the decoder in c++ using Vector insted of arrays, and use at(pos) insted of []. That way the worst thing that can happend is an exception which is not a security risk.

      (This solution still have the problem that there might be input which causes it to block forever, thus allowing a dos attack, so if you really want security you need to validate the header anyway).

      Martin

  81. I will almost completely agree with you. by khasim · · Score: 3, Insightful

    It isn't the coders.

    I believe it is management's fault for insisting on designs that are unsecure (like ActiveX).

    You can have coders who KNOW the correct way.

    You can give them tools that help them secure their code.

    But those only work if management focuses on secure code instead of "user friendly" features.

    And management will only focus on security when the buyers focus on security.

    I think we're seeing that now. More people are accepting that Linux is more secure than Windows, so Microsoft has to start focusing on security in an attempt to narrow that perception.

  82. References by TubeSteak · · Score: 1
    --
    [Fuck Beta]
    o0t!
    1. Re:References by Anonymous Coward · · Score: 0

      Wow, a lot of random crap that doesn't even relate to security. Thanks for nothing.

  83. NO! by Ninja+Programmer · · Score: 1

    His point is that: why doesn't the compiler/linker/environment help find the errors that programmers make?

    He questions why gcc only issues warnings in cases where the generated code can't possibly be right. He goes a little too far by suggesting that we should just plug a GC wrapper into malloc/free (this changes the memory footprint of the program) but his ideas are sound.

    Very few programmers have been railing about the inherent danger of the programming environment, and the total lack of help from the compiler. Of course *I* was one of them:

    http://bstring.sf.net/

    (The bsafe module overrides the most unsafe string function calls, thus forcing the developer to use the safe alternatives.)

    http://www.pobox.com/~qed/userInput.html

    (A way of using strong typing as a mechanism for duplicating the functionality of "tainting".)

  84. New Memory by thbigr · · Score: 1

    I'm amazed that someone hasn't come up with the idea yet of making malloc() and free() stub-calls into a generic garbage-collected memory allocator and doing away with C memory management altogether.

    My gawd, I have writen these kind of systems MANY times when do C and C++. I don't trust this guys skill at all, this is a COMMON work around. I have worked for 3 companies and they have had these kind of things in thier own libraries. Who is this guy?

    --
    Come the revolution, the Bourgeois, Capitalistic, "A PARKING STICKER HOLDERS", will be first against the wall!
  85. But the sandbox has holes too by Len · · Score: 1
    Java code is only safe if there are no security holes in the runtime sandbox that's supposed to prevent rogue Java code from harming the system. A number of such security holes have turned up, in both the Sun and Microsoft VMs.

    You can get info about these problems by searching for "java" at cert.org. The most recent one I found was patched last month.

    1. Re:But the sandbox has holes too by javajedi · · Score: 1

      Sure they have, but that's because the JVM is written in C++. :) There will always be the possiblity of security holes in the JVM because of this, but those are just a few holes in _the JVM_ not thousands of holes in the endless Java applications written _on top of the JVM_. See the difference?

  86. Too much to do by Sun+Nori · · Score: 2, Informative

    I'm a VB 6, ASP, and VB .NET developer and to put it from my viewpoint. I really don't think has anything to do with the language, compiler, or development environment; but more to do with everything else.

    On an average day I deal with patching of our IIS web servers, Administrate 2 MS-SQL servers. In addition to the ENTIRE software development life cycle: from Analysis to maintenance. All the while dealing with 4 to 5 major projects.

    If I release bad code it's because someone didn't give me ample time to verify/think about what I'm writing. The people who tend to cause these errors also tend to cause this other problems:

    • No comments
    • Poor structure
    • Do not declare variables

    So, do I believe that different languages are inherently better for security? No, but I do believe that some programmers are inherently better for security.

    --
    "640 K ought to be enough for anybody." -- Bill Gates, 1981
  87. I only read the first page... by zogger · · Score: 5, Insightful

    ..and there he said it was (paraphrasing here) common for programmers to sorta ignore error flags and just code out the warnings about memory leaks and arcane whatnot like that, like that made the problem "fixed". No warnings-no problems! On to the next project.....

    probably more stuff too, that's all I read though.....

    Not a coder here, so I have *no* idea if this is common or not, or true or not, but I *have* noticed on slashdot NO ONE writes bad code,or has written bad code, or thought about bad code, and *everyone* has personally corrected every other coder they ever met on their code, and no one has ever had a boss who knew what he was doing or could read so much as a grocery list without speaking the big words out loud, and only the *other guys* someplace else write bad code, and they always use the wrong language and editor to boot, like on bizarro dotslash forum or something. It's ALL "their" fault that there's ANY of this alleged "bad code" that causes buffer overflows and like acne and flat tires and girls who say no.. Them dang guys "over there", buncha no-good slackers....let's hang 'em!

    1. Re:I only read the first page... by clamatius · · Score: 4, Funny

      Ok, it's time for me to own up. I'm the one creating all the bugs you're talking about.

      Acne? Bug in face.cpp.
      Flat tires? You guessed it, tire.cpp, line 5572.
      Girls who say no? That's not a bug, it's a feature.

    2. Re:I only read the first page... by I8TheWorm · · Score: 4, Interesting

      Being a coder, I'll own up to having written bad code in the past. I even tried justifying it at times with "but I had a deadline" or "I tried to plead my case but management wouldn't listen" or other drabble.

      These days, I simply won't take work from people who demand I write code their way, or impose unreasonable deadlines. Even in the programming decline since 2001 (it's bounced back well this year) I refuse to compromise my work because of someone elses ideas/deadlines/etc... because the end result is a reflection on me.

      I like to think most programmers, early on at least, went through the same thing, but I could be wrong. It had nothing at all to do with having to build experience before I knew anything about the necessity of writing apps with security in mind. Rather, it had to do with needing work and compromising my own principles to gain employment.

      --
      Saying Android is a family of phones is akin to saying Linux is a family of PCs.
    3. Re:I only read the first page... by DuckDodgers · · Score: 1

      I've written hundreds of lines of code in the past year, code that has been deployed to devices used by tens of thousands of customers.

      The compiled software was tested, but _nobody_ other than me has read the code. Oh, it's written in black and white that such reviews are required, but we are understaffed and consistently behind schedule, so it doesn't happen.

      I'd like to think I write secure software, but since nobody at my place of employment checks my stuff and I'm legally barred from posting it on the web for comments, I have no idea.

      I don't mean to pass the buck here, but I believe in many cases the problem is just the unrealistic deadlines programmers are given.

    4. Re:I only read the first page... by zogger · · Score: 1

      oh most likely what you said happens a lot, and what the other guys said, like I said though I gots no idea. I was really going for a -3, semi funny when I wrote that, but it's TRUE, too. heh heh he he read slashdot dev channel one day is all it takes to see that B true!

      I think the software industry got TWO CHANCES left to "fix" all this insecure stuff.

      1- get a national IT union so you got support to make good code and get them bozos off your back, as opposed to fast code that gets shoved out the door to support all the extra VP's they got hanging around. Unions are good for WAY more stuff then just setting pay rates.

      choice deux = eventually the gubbermint is gonna pass a warranty law on code,same as every other product out there, and this EULA get outta jail free card gonna be re-voked with extreme prjudice. This will happen when something like two senators and a supreme court judge get nailed with a porn dialer hack and their old, old ladies walk in and catch them with 18 windows open with goatse and sex with a mare and teenage eskimo transgendered cheerleaders and stuff like that on the screen. ain't gonna be no lobbying effort bribe their way outta that one then.

      normal EULA like we see now = biggest excuse to write/sell/distribute bad code out there, bar none

    5. Re:I only read the first page... by Anonymous Coward · · Score: 0

      But isn't that the original point made on /.

      If you can be reasonably sure no one will review your code, unit test your code, do automated code analysis on your code. You need to write it in a language where you can be pretty sure if it compiles and passes your own limited testing it probably does more or less what you want, and doesn't do something weird?

      I've written (and debugged) a lot of bad code, I'm under no illusions I'm no guru programmer, but the Java I wrote was a damn sight more robust than any of the other bad code I wrote because it was Java code, and not bad Fortran77/C/C++/Perl/VB.... It was type safe, and I caught my exceptions, even if a lot of the time I just recorded an appropriate error message and passed the exception up the line, that is a damn sight more than was done in most of the other languages - where if something was "never going to arise" or "if that fails there is no hope anyway" and time/laziness meant the weird error conditions are never tested because you don't have to in this language.

      Ultimately if we are to build big complex systems - we need more solid foundations than we've had historically.

      What hideous sentence structures I have used.

    6. Re:I only read the first page... by josh3736 · · Score: 1
      Girls who say no? That's not a bug, it's a feature.

      Then may I be the first to say, "burn in hell, you bastard!"

      My right hand thanks you.

    7. Re:I only read the first page... by DuckDodgers · · Score: 1

      Well, I appreciate that you were trying to be funny, but whether you meant it or not you did raise a very good point.

      Unions... that's an ugly issue. I've worked at union shops, and it's pathetic. People who don't do a damn thing all day but can't get fired; promotion and pay raise by seniority and not effort, skill, or dedication; actually getting yelled at by other workers if I tried to get my job done before deadline.

      I have friends who worked at non union shops, and they were abused by management.

      I wish there was some reasonable medium. If IT workers organized, unless the union was radically different from the ones I've encountered I would switch industries.

    8. Re:I only read the first page... by zogger · · Score: 2, Insightful

      me too, been in bad unions. UAW for one. You get a non working boss class that becomes hereditary,. corruption becomes just as bad as in management and in government. Not paying attention to reality and only fiocusing on pay raises. I remember back in the late 60's I would be saying 'waitaminnit guys, the japanese are gonna come in here and grab our work, look at the cars they are starting to build, fuel efficient, work well, inexpensive" I got laughed at. I wanted to have it that we always negotiated from a standpoint that we NEEDED the company to make quality products at reasonable prices over ANYTHING else. actually dictate some things to management. As in "pay your engineers more than a first year carlot salesman", and make sure they produced, etc.

      Any new union can NOT become aligned with any political party and it CAN'T have full time union only employees besides some accountants, etc to handle the drone paperwork. Every union officer has to be a production worker all the time. Along those lines. A couple of terms in office then they have to step down, term limits are a GOOD thing. It has to be established open, free, transparent, honest, non aligned, etc, upfront, or it won't work it'll just be yet another bogus attempt.

    9. Re:I only read the first page... by Tukla · · Score: 1
      I *have* noticed on slashdot NO ONE writes bad code

      Hell, I just wrote a buffer overflow earlier this morning. In effin' COBOL, no less. Spent three hours debugging it.

    10. Re:I only read the first page... by DuckDodgers · · Score: 1

      I read somewhere that GM's labor cost per car produced is $1000 more than Toyota's.. and that's for production facilities inside the US!

      GM sold 270,000 Impala's last year, which means that on that model alone they spent $270 million more on labor. Then people wonder why Toyota is rolling in dough while the Big Three struggle to maintain market share. It's because the Big Three are spending billions of dollar more per year on workers.

      Don't get me wrong, auto industry executives - like executives from just about every other industry in the US - are overpaid for what they do. But the UAW hasn't done anything to fix the overpaid corporate execs, they've just spread the problem out.

    11. Re:I only read the first page... by zogger · · Score: 1

      it's a lot of money. Back in the 60's I was making 300-600$/week with over-time, then there was bennies. Frankly, I thought that was *plenty* of money for what I was doing(wish I was making that now actually), seeing as how my previous job paid about 110$. I didn't stay in long though, the plant where I worked was 99.99% rednecks and I was the lone hipster. And then I moved out of state away from the easy money factories. Had to do some dancing with a tire iron in my hands a few times to get the drunk doofus machine heads to leave me alone, then it was dealing with drunk doofus cops all the time, mean suckers, so I said "buh bye michigan, cya later". I don't know about now, but I live in georgia and it is less redneck here than what I remember it was up there. Ann Arbor was about the only place I felt comfortable at back then.

      Ya, drunk/stoned rank and file, drunk/stoned management = not so hot quality products and a lot of bad business decisions back then. They COULD make the horsepower though, and some of the designs were sharp looking. It's probably changed now, maybe more professionally run, etc, though but they still got to stay on top of it. At least they are starting to release some hybrid vehicles, I was just looking at the new ford escape at some website, looks fine, price seems fair.

    12. Re:I only read the first page... by zogger · · Score: 1

      You didn't write it on purpose though, and you are fixing it. There's the big difference I think with the dismal stuff that is out there that was released too soon.

  88. C Security by 12357bd · · Score: 1

    Tha author is right, and his ideas while not exactly news are good enough to be remarcable.

    1-Modify standard C/C++ libraries internals -- good.
    2-Create 'hardenning' post-executables .. good.
    3-Improve tools.. good.

    But I don't agree on:

    1-Nonexecutable hardware flag page is not innecesary, merging data and stack has been always (+20 years) a WRONG idea. Data should not be allowed to be executed without explicit permsission, if we have page faults it's not so extrange to have execution faults.
    2-The author seems to ignore or undervalueate moderns unix IDE's as Kdevelop.

    --
    What's in a sig?
  89. Hardware to the rescue (again?) by PetoskeyGuy · · Score: 1

    I think one way to sum it up is to say that errors occur when you force the progammer to think about what the computer should do, instead of what they want done. Why should the programmer have to think about memory allocation, garbage collection, pointers, etc?

    Still someone has to do it. Every new device out there needs drivers, bios, etc and when you write those things. The operating system has to deal with mouse input, interrupts, and everything else.

    With all the talk of pointers and memory access, I'm surprised that he didn't mention the newer processors and their ability to mark certain portions of memory as execute or non-execute. It won't fix buggy programming, but it would stop those bug leaks from causing a buffer exploit if used correctly. Still it was an interesting read if something of a rant.

  90. There are benefits by Smeagel · · Score: 2, Insightful

    First of all, it's hard to argue that any other area in the country has more tech involvement than the bay area. Next it's hard to match the niceties of the location. Winter low of barely below 60 degrees is nice. Then you add in culture, and on top of that all within 30 points of a central point you have San Francisco, Berkeley, Oakland, and development employment area's (like pleasanton, etc).

    I'm not complaining about the costs, but I am saying that yes, you MUST make more here to make up for the more expensive living costs. Anybody who thinks that making 6 digits anywhere in the country guarantees an easy mortgage payment is a fool (as the AC displayed in his response about California being "shitty"). And it's not just California, check out Boston or NYC. There are tons of places in this country where the luxury and lifestyles of the location drive up costs.

    And by the way, supply and demand aren't broken, supply and demand are what is MAKING these houses cost so much. So many wealthy people want to live here it drives up the cost. Supply and demand is broken in places that have rent ceilings (which cause housing shortages).

    Everyone who lives in the midwest should be thankful of the expensive california area's. The fact that everyone here makes more, means that everyone here pays a greater ratio of federal taxes. Without California federal taxes in the entire nation would have to be significantly higher.

    And lastly before you assume that I'm an uneducated California dolt, I grew up 18 years in Ohio, have spent 3 years in Indiana going to school, and will return to Indiana from my summer internship this fall. I understand perfectly the economics of both California and the midwest. I'll take California's in a second. But on the same note, when somebody says that 6 digits is enough to pay any mortgage easily, it just shows their ignorance to our nation IMO.

    1. Re:There are benefits by ThosLives · · Score: 1
      I agree - if you notice I never once said that you didn't need a high paycheck to pay for high cost of living (and more luxury, etc.) You do bring up the opposite side of my argument in that the fact that costs are high is because supply and demand is working as you note - the prices are high because people are willing to pay that much. Prices will fall (or, more likely, just stagnate) when people are no longer willing to pay more for them.

      You do bring up an interesting point about the non-uniform burden of tax revenue though. I do have to say though that if CA didn't pay so many taxes that only implies that taxes for everyone would be higher if we expected the same "services" from the government. It could be the case that we accept a reduced level of "service" for the same taxes. More likely than that, though, is we'd eat it as a larger deficit.

      All in all, I'd have to agree that just saying "your dumb if you can't afford a house if you make six figures" is naive at best. The number of factors involved, are, well, quite daunting; most folks aren't willing to think about that though.

      --
      "There are a dozen opinions on a matter until you know the truth. Then there is only one." - CS Lewis (paraprhase)
  91. Java Smava by DerFeuervogel · · Score: 0, Troll

    Lets see you write a graphics intensive 3D package that needs to render
    _allot_ of polygons in real time in Java. Something like a 3D Data viewer in
    OpenGL. Everybody moving to the "safe" languages won't work.

    1. Re:Java Smava by edrain · · Score: 1

      from the gp:
      Of course there are some tasks for which C or C++ are the still best choice for other reasons

    2. Re:Java Smava by Anonymous Coward · · Score: 0

      Anything that used OpenGL extensively would probably run at roughly the same speed in Java, since all the heavy lifting would be done with a C library. Java isn't all that much slower than C for raw numerical stuff, anyway (maybe 3-4x sometimes, but that's not going to be too significant if the bottleneck's with OpenGL and the graphics card).

    3. Re:Java Smava by kaffiene · · Score: 2, Informative

      Here's one:

      http://www.tribaltrouble.com/

      Here's another:

      http://www.wurmonline.com/

      Troll elsewhere.

  92. The problem with secure code: by earthforce_1 · · Score: 2, Insightful

    #1: Difficulty: It is harder to write, although having an inherently secure language such as Java or Ada helps. You not only have to think about your algorithm performing correctly, you have have a "hacker's eye" to make sure it cannot be used to compromise the O/S.

    #2: Performance: (This is a biggie) Checking parameters and disallowing certain programming techniques that could be misused to compromise the underlying system will have a performance impact. It also makes for fatter code, if you ever tried to decompile Ada. The performance loss may or may not be significant, depending on the algorithm. But for something like direct X that provides a thin software layer for high performance graphics, I suspect the performance hit would be unacceptable. This is probably true for other high performance apps as well. That is why 99.99% of all software comes with a "caveat emptor" EULA. (Imagine if they built airplanes, cars, and buildings like that?)

    Safety and life critical application will of course always be coded using "tinfoil hat" secure languages and operating systems. They also cost 100x as much to do the same job, and require more powerful hardware to do the job.

    #3: Complexity: The more complex a given system is, the harder it is to secure it. The more complex the system, the more places for flaws to hide.

    --
    My rights don't need management.
  93. Hardware vs. Software. by Demon-Xanth · · Score: 1

    Software has millions of lines of code, and each can contain an error. Trying to get 100% working isn't possible! 99.99% is good enough.

    IMO, this is the mindset of the typical programmer. Now consider the hardware side:
    42M transistors in a P4 (the earlier ones, this number has gone up)
    135M transistors in a Radeon 8500
    Atleast a few million in the chipsets.
    Depending on how much RAM you have, could be billions of transistors there. ...yet the errata on the hardware often fits in a single page. It's NOT simple to reproduce.

    You don't know what the user is going to do!

    So? Take your USB port that shines from the front of the PC. Nice and inviting, provides a few W of power and a pair of data lines... now jam your finger in it. Can't do it, can you? What happens if you short out the power lines? There's a fuse on the motherboard. What happens if a device isn't wired up correctly? The OS doesn't even get a chance to see it.

    Why do I think hardware has less errors than software? Because hardware errors are expensive. Consider the millions Intel went through on the MTH problem. They recalled motherboards and replaced them with different ones, having to give away RAM in the process. Now consider MS on the (one of the?) RPC vulnerabilities, they put up a patch. That's it. Job's done.

    Software engineers think of themselves too much like artists, and not enough like scientists. Don't do something in a way that looks good because it looks good. Do something in a way that works well because you need it to work well.

    --
    If you think education is expensive, you should try ignorance -- Derek Bok, president of Harvard
    1. Re:Hardware vs. Software. by Fulcrum+of+Evil · · Score: 2, Insightful

      o? Take your USB port that shines from the front of the PC. Nice and inviting, provides a few W of power and a pair of data lines... now jam your finger in it. Can't do it, can you? What happens if you short out the power lines? There's a fuse on the motherboard. What happens if a device isn't wired up correctly? The OS doesn't even get a chance to see it.

      Now treat it like software: hang a space heater off of it and complain that it doesn't work. Allocate 3 weeks for design and implementation. Testing is for the weak. Add a SOAP interface (don't change the deadline). Oh, did we mention that motherboard X doesn't want to use our pinout? Make it work somehow.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    2. Re:Hardware vs. Software. by UncleFluffy · · Score: 1

      Why do I think hardware has less errors than software? Because hardware errors are expensive.

      In a previous job, we had a sign on the wall that read: "Software would be as reliable as hardware if it took 6 months and $500,000 to compile."

      One thing I've noticed about developing software on faster machines is that it's far far easier to just tweak something, recompile, see if that fixes the problem, repeat. When it took 30 minutes (or even 8 hours as with one large AI project I worked on in the late 80s) to compile the app you were working on, it was far preferable, and far quicker, to stop, sit down with pencil and paper and actually understand the problem you were trying to solve. The "beat it with a stick until it works" development pattern is way too easy to fall into (I find myself doing it all the time but fortunately most of the stuff I work on nowadays is scaffolding and interim tools).

      --

      What would Lemmy do?

  94. From the "At least we know the bugs in C dept" by jrl · · Score: 2, Informative

    Here is my general view of the "secure programming" world. It goes out to all developers.

    Know your tools. Choose them wisely -
    Low level languages are not the problem; they are the most widely understood. Security is a process not a language. When your code inherits features and functionality that you did not intend, bad things can happen. Sure, we may not have buffer overflows, but if your RPC function allows me to execute any code that I want without overflowing buffers, who cares? Also, with these super portable "sand box" languages, I get to find one hole and exploit it everywhere. If you think Java is the answer, please tell me what language you think Java was written in? Also, please read "Reflections on Trusting Trust" by Ken Thompson.

    Seeing the big picture -
    Peer review is part of the security process; your attackers are becoming very skilled at finding exploitable software bugs using automated tools to help them. Everyone in the development process needs to know the type of application they are developing and the sensitivity levels of the information they are protecting.

    Rule of Simplicity -
    Design for simplicity; add complexity only where you must. Default to Deny, compartmentalization of code is good for more than just limiting security bugs.

    Sweat the small stuff -
    Just because certain attack vectors are obscure does not negate their effectiveness; writing good clean code is safer and more sane than allowing a program to "protect" bad coding practices at execution time. We have seen many examples of how this other type of protection fails.

    Don't use your customers as your Q/A staff -
    The Microsoft Software Release cycle is destroying security from the users and programmers perspective; it causes users to not want to upgrade, and it causes programmers to not want to fix security problems.

    Don't build a $100,000 fence for a $1,000 horse -
    All data is not created equal, don't treat it as such. Let the protection be commensurate with the asset.

    Audit trails -
    Trust with accountability. Every significant access, whether denied or permitted must maintain an audit trail.

    1. Re:From the "At least we know the bugs in C dept" by kaffiene · · Score: 1
      Also, with these super portable "sand box" languages, I get to find one hole and exploit it everywhere.


      Really? Name a single exploit that you can execute on every JVM.
  95. question... from the article. by perlchild · · Score: 1
    from the article:
    We need to put security on the to-do list for the companies that are building those environments, so it's just another embedded feature.

    Since when is security "just another feature". I think we're already aiming too low. Security is a lot closer to the first feature you should get right than anything else. Putting security as "just a feature" means if you have several features, and you have to choose, you can pick features, and not pick security. Isn't that much where we are now? Except that the IDE developers he mentions aren't involved? Getting the IDE environment developers to focus a bit more on security is certainly not a deterrent to security itself, but it means security-as-a-feature-of-ides will only work if:

    1) you can't turn off the ide's security features
    2) you can turn them off, but they are zero-cost, you never turn them off.

    1) Could work if it didn't hamper backwards compatibility, which it will. Notice how much more code with bugs is tied to old ways of doing things, as opposed to redesigns. (Yes you can introduce new bugs with a new approach, but if you're using a new approach, you aren't likely to misunderstand the approach as much as someone else's old approach, when he isn't there to explain anymore)

    2) Is laughable, there is no perpetual movement machine, there are no environments where adding checking and validation to all data structures and exchanges will be a zero sum, and count on the unvalidated, unchecked structures to be the sources of bugs. Will developers check as much if they feel it's the compiler's job? How many will understand enough about the compiler to back-check the compiler, and verify that whatever isn't self-validating is being validated?

    Making security a less painful option for developers is a good idea, and getting the people who make our tools consider it as important to write tools that write secure code as we consider it important to write secure code is a good step.

    But, when was the last time you pushed back a release date a week for security testing? I don't mean you know there's a bug, and you need time to write a fix. I mean you know of a bug, you have the fix, but you wrote it "Today" as in the day you were supposed to hand in the released software. Would whoever you released it to understand?

    Of course they should, but they don't, and we don't educate them about it either. Do we really care that much about security? I have my doubts.
  96. How about we bust up some monopolies instead by michaelmalak · · Score: 1
    Indeed, one of the biggest security problems hitting end users these days is spyware; and indeed, the article author is correct in identifying the switch from Applets to ActiveX as a major cause. It's not an exclusive clause, because streaming media needs ActiveX, but, please, fly-out menus do not (and it's the proliferation of such menus necessary for navigation on many websites that cause users to give their browsers a blank check for ActiveX).

    However, it's not programmer laziness that prompted the switch to ActiveX -- it was that Microsoft never included a JVM beyond 1.0. And this was for monopolistic reasons. While quality code may be necessary for secure code, the same can be said for a non-monopolistic market (and of course neither is sufficient by itself).

    It's just another example of how academic researchers are out of touch with reality -- in this case, it's so extreme, that the researcher ignored The Microsoft Problem.

  97. Less security more money for MS by Anonymous Coward · · Score: 0

    Microsoft have a revenue stream based on bad security - Its all just revenue based management and nothing more.

  98. Author is fabulously uninformed by dr2chase · · Score: 3, Interesting
    As others have noted, there is Java. And (at minimum) Python. His I-wonder-if supposition about a malloc that is backed up by GC is old news; the Boehm-Demers-Weiser collector was used exactly like that 15 years ago (for example, in the first Modula-3 runtime system, and a friend at HP linked it into an X server). Ben Zorn used it in much the same way to take (now dated) measurements of the time and space costs of garbage collection (executive summary -- the cost is mostly a space cost).

    I worked, at CenterLine, on a follow-on for CodeCenter that used compiled-in checks to get similar checking at a higher speed than the intepreter. It was a wonderful accomplishment, but it was still vastly slower than a good Java or Modula-3 implementation. Use a safe language, end of stupid security bugs, and you can spend more time worrying about the subtle ones.

    One more thing to note, if you take the draconian view that warnings are for wimps: I found one real program, in all that I tried as tests, that did not generate a single warning during its execution, and that was gzip. One of the emacses was our error-filtering test case; running to the "dump" step, it generated over one million diagnostics, which we managed to automatically filter down to one thousand.

    I really have to wonder about the author's background. He claims to care about this, yet has apparently never used Java outside of a browser, nor played with the BDW-GC for as a leak backstop. I sure do wish the ACM editors were a little more clueful.

  99. Getting the wrongness wrong by tz · · Score: 3, Insightful

    Starting with the last - He praises M$ development environments. OK, what was the last major Bug that even made the Drudge Report. An IIS and IE combo - why are IIS sites defaced more since it is the minority and even CERT is saying to switch browsers (how do I load Firefox or Apache into Visual.net?).

    He complains about C malloc/free (ever heard of electric fence?). C++ (wasn't OOP the magic bullet?) gave us new and delete and some garbage collection and more memory leaks (but he says we shouldn't use Java which actually gets the conceptual model right). Oh, and every makefile I have has -Wall, and running them produces no warnings (at least when I'm through changing things algorithmically). And I'll have to look again for a good opensource lint. I used commercial products for a while.

    Since I'm often doing embedded, I have to be careful and have space and timing requirements (and in many cases NO debug facilities) few others have to deal with.

    The article is probably worth reading, but won't be very helpful. A lot of people don't understand the art of programming even if they make their living that way. The people doing the hiring either want the buzzword checklist, or don't care if the result is brittle (at least not when the project starts).

    His solution is more "magic bullets". Everyone I know (even many I would not let write a simple sort routine) was horrified by ActiveX (v.s. Java). How do you make that secure? You can't.

    A security shell inserter like pixie? Maybe it would be a source of exploits (basically it is a manual virus - if you can alter an EXE to add a security shell...). And an IDE can be a great tool (Emacs works for me) but also can make one lazy - I assume IE and IIS with all their holes are developed on the same praised IDEs.

    There is an art to programming and it often takes 5 years and is a way of thinking, not a "method". I do Java and C++, but I don't do them differently than I do C. But much education (and investment) seems to be toward finding a product or method to replace process.

    As often has been said: Security is a process not a product.

    My own saying: I don't write complex programs, I simplify and reduce complex tasks into simple programs.

    Good Cheap Quick, pick 2.

    1. Re:Getting the wrongness wrong by jschrod · · Score: 2, Informative
      Marcus Ranum's advice is never to believe for a magic bullet. He's too long in the business, longer than you by a probability of \approx 1.

      You don't seem to recognize the name of the person who wrote the world's first firewall (fwtk) and who is one of the most outspoken security gurus, do you?

      One might not agree with his opinion (I do not in many points), but to reduce his arguments (that most development tools give no support for security properties of software systems, but should) to some rambling about "M$" just shows your unprofessionality.

      --

      Joachim

      People don't write Manifestos any more -- what's going on in this world? [Frank Zappa]

  100. Forget programming language and practice -- by Anonymous Coward · · Score: 0

    -- the problem is the OS security model. If I cannot run a program and not know, with a guaranteed certainty, what it can and cannot do to the rest of my system, then it's a matter of trust and faith, which is where it all goes downhill.

    In another few decades, the quaint notion of all security capabilities being tied up with a user will be gone. Thought will actually have to be had for each and every program / module: what *exactly* does this need to be able to do?

    And, since security and reliability go hand in hand, we'll actually be getting somewhere in this IT world!

    Mark

  101. Why? by bonch · · Score: 1

    Um...I don't think it's possible to build an X86 OS to operate from within a VM. Even .NET.

    Why? Or are you talking about the kernel? Obviously the kernel won't be running in a VM, but the rest of the operating system will. Remember, the operating system is more than just the kernel. explorer.exe is already running as managed code in the current Longhorn builds.

    Microsoft isn't shouting that shoddy programming practices cause security flaws...for them, that would be a really bad PR move.

    You're lying out of your teeth. They've been very vocal about this, even if you haven't read about it on Slashdot. They're completely replacing Win32 with .NET. Hate them if you want, but don't say they haven't tried because they have.

    1. Re:Why? by Short+Circuit · · Score: 1

      Or are you talking about the kernel?

      Yah...mix-up on my part. Forgive me...I stopped using Windows on my machines back with WinME, when there wasn't much of a difference between the authority of the two.

      You're lying out of your teeth. They've been very vocal about this, even if you haven't read about it on Slashdot. They're completely replacing Win32 with .NET. Hate them if you want, but don't say they haven't tried because they have.

      Replacing native code with code run in a secure environment isn't even close to the same thing as promoting the safe usage of native code. You're not cleaning up the quality of your code, you're making it so shoddy workmanship doesn't matter as much.

    2. Re:Why? by bonch · · Score: 1

      Replacing native code with code run in a secure environment isn't even close to the same thing as promoting the safe usage of native code.

      Obviously, because it's not native code anymore.

      Do you even have a single clue about what managed code actually means?

    3. Re:Why? by Short+Circuit · · Score: 1

      Do you even have a single clue about what managed code actually means?

      I think so. But that's irrelevant.

      My point was (and is), Microsoft's efforts aren't on promoting proper programming practice, they're focused on moving toward moving bad coders away from where they'll do damage. Which doesn't do any good for training them for, as an example, low-budget embedded programming.

    4. Re:Why? by Anonymous Coward · · Score: 0

      YHBT. YHL. HAND.

      Love,
      bonch (aka Overly Critical Guy)

  102. Bad Programming? by oliverthered · · Score: 1

    More like bad mangement:
    Poor requirements, with new features getting added too near relese.
    Well it looks like it works fine so lets release it.
    Make sure the product performs well, don't bother with the checking everything(not that you can't have performance and security)
    Poor recruiting by HR.

    --
    thank God the internet isn't a human right.
    1. Re:Bad Programming? by daem0n1x · · Score: 1

      it's clear to me that the winners in the software game will be the ones who can write more, better code faster. They won't be purists and they won't care if they lose a few CPU ticks on garbage collection and runtime security if it means they win the development contract and deliver on time.

      Every new project, I warn about security issues. They says I'm being picky. I say "This is going to haunt us later". They answer "This must be delivered really fast. If we care about security, we won't be able to do it. Nobody will try to break it, relax".

      It always comes back to haunt us.

      Besides, doing a good job in security won't give you any credit. Bosses and customers don't know whether you are writing safe code, they are only concerned if it works and will be delivered on schedule. And your coworker that writes unsafe code is better regarded by everyone because "This boy can really get the work done". Security is invisible, and the lack of it will only be noticed, if ever, much later.

      Blaming it on the programmer is easy. But the programmer does what he is told, and the winning strategy is "screw security".

  103. B if A. by Anonymous Coward · · Score: 0

    And with fewer vulnerabilities, you can pay more attention to the types of vulnerabilities that remain.

    Remember, what you are making here is a conditional statement of the form "B if A". If A is false, nothing is known about the value of B. Sadly, many people use the silver bullets of better tools and instead of concentrating on security where the effort is actually needed, they behave as if the tool does it all. Of course, C# code written by an expert who does take security seriously will be at least as good as either and probably better. Now if we can put it on an OS that doesn't crash.

    C code written by an expert who knows the vulnerabilities of C and uses other tools to check it such as lint is going to be more secure than C# code written by an inexperienced programmer who never gave any thought to security. It will have different kinds of vulnerabilities.

  104. A correction to the article ... use "Cyclone" by pikine · · Score: 3, Informative

    On the topic where memory management related security issue is blamed on reluctance to switch away from C...

    Of course, most of our programming is still being done in C/C++--languages that force programmers to manually mate up a free() with each malloc(). I'm amazed that someone hasn't come up with the idea yet of making malloc() and free() stub-calls into a generic garbage-collected memory allocator and doing away with C memory management altogether.

    This is not true. Cyclone does exactly that, and more. Cyclone is a dialect of C. In fact, a lot of C code can be ported to Cyclone with little to no modification. It has garbage collection for stub malloc/free code, and optionally region memory management where you can dictate when some collection of objects are deallocated all at once.

    --
    I once had a signature.
  105. Holey Code, Batman! by Anonymous Coward · · Score: 0

    I've been programming for 20 years now, and I have to say that I still make mistakes. Sometimes I will create a proof of concept code, and when it works, implement it into an app, but forget to properly exception handle, or any not spot a possible buffer overflow code segment.

    I won't get into which language is best/most secure/holds my hands the most - it's up to us to code, and being human we make mistakes, no matter what language is used.

    One of the problems is the deadline pressure in closed source shops. In the rush to market, it is very easy to cut corners and leave holes. That is the project managers error, not taking proper QC time into account.

    Without the open peer revue, code like

    char inputbuffer[100];
    sscanf( inputbuffer, "%s" );

    may make it into the production code. With open source, I can almost guarantee I'll get an email like:

    Hey moron! You left a hole I could drive a mack truck through in some_code.c at line 57.

    The problem is that in many shops, programmers are not allowed to write good code, only fast production code.

  106. 1 point... by gillbates · · Score: 2, Informative
    checks into your inner decoding loop. The temptation to avoid doing this is strong, especially among "performance" oriented coders.

    A good "performance oriented" coder would know better than to choose an algorithm whose safety depended on doing a test in an inner loop. He's probably used a series of bitmasks, AND's, and shifts to ensure that even if the values were out of range that they didn't cause problems.

    As an assembly programmer, I've learned two very helpful techniques to avoid overwriting memory:

    1. There is never good justification for checking array indexes. It's simply idiocy - array indexes can be safeguarded by simply taking the modulus of the index and the array size. By doing this, it is mathematically impossible to generate an out-of-bounds index. Why bother checking for something that can be handled automatically by the processor?
    2. An even quicker method involves bitshifting or using the AND and negation operators. For example, if you know that you'll never render more than 1 Meg of memory, you can shift your index (32 bit) left 12 and right 12 and never ever write beyond the 1 MB boundary.

    Performance programming is not simply leaving out vital checks. Rather, it is designing algorithms in such a manner that the checks are unnecessary, or performed at a level where they are easily handled. Even a good C++ programmer wouldn't think of starting to render a BMP before having validated all of his fields.

    --
    The society for a thought-free internet welcomes you.
    1. Re:1 point... by Anonymous Coward · · Score: 0

      > shift your index (32 bit) left 12 and right 12

      And the overzeleous compilier optimises it out.....

  107. whatever by dekeji · · Score: 1

    After more than 20 years of C programming, I must still be too stupid to avoid pointer errors. So, stupid people like myself can use languages other than C, and positively brilliant people like him can stick with C. But who the hell is writing all the applications, then, that keep crashing and that keep getting broken into?

  108. so YOU'RE the dude.... by zogger · · Score: 1

    ... who did it! Naughty naughty.. but hey, I feel bad now. I mean, now you got the lynchmob heading your way and all, I feel sorta sorry fer ya... tell ya whut... just betwixt you n me... I got a buddy, a good frined, well, he's a bigshot over in boogorrillaville, he's their vice minister of procurement. WELL, he sorta got himself into a fix. And it's all because of BAD CODE YOU WROTE, so you can do pennace now and fix this up. He found out that at the end of last quarter that something happned to the accounts from that buggy software they got, and it seems that 83 million drachmadinars seem to be outstanding and left in the budget unspent. whoops! It was earmarked for genetic research on advanced all wheel drive camels, but yu know those eggheads, couldn't find their trousers with a GPS and a map.. anyway,they diodn't spend it and seemed to have forgotten about it,and if he doesn't get rid of all this money and leave not a trace of it, his patooty is grass, and the project will get cancelled, and his nephew runs the largest camel herd breeding operation over there. SO, he approached me using his phreaked cell phone he snagged from a tourist, knowing I am a famous internet browser user so I know all about coding and and money laundering and banking and such like, and asked for my help. Lucky me through my skills at typed "stress and duress" internet posting I was able to flush you out and make you see the error of your ways. No harm nor foul, you can make amends and we will help you get the funds you need to staert your own ethical softweare company, maybe..say...25% of the take? Sounds good? Good! so this is what you do. First, we need a totally obscure bank account to transfer the funds through, after first establishing a shell corporation in the turks and caicos. I can't use my name or account to do this because his government monitors his email so they know to watch me close. And ,well, I got this hassle with interpol and all, but that'll work out. We will first have you transfer your small account in the US over to the new dummy corporations account, just to get it setup and legit looking, then......

    whoops, this is in public! We better discuss this someplace else. To continue, send me an email at my secure addy islandking@margarita.td.con

    1. Re:so YOU'RE the dude.... by Master+of+Transhuman · · Score: 1

      Too late.

      I got that email this morning - via SBC Yahoo email who claims they spam and virus filter.

      By God, their programmers - or the ones who wrote the stuff they bought to run on their servers - sure know how to code.

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
  109. that's a shame by zogger · · Score: 1

    SUCKS being forced to be bogus just to hang on to a job. I been there, I can relate. I had to quit a few jobs over bad management. One time it was a contractor, I was watching him build, what he was telling me to do, it was AWFUL skanky construction. I lasted a coupla days and just never went back. I mean, this guy was cheap, and just didn't care. Selling these big expensive houses, he'd go "all you need is ONE nail in that stud", stuff like that, were normally you would shoot two. Not caring about plumb. Just skanky stuff. Say the saw guy cut a piece short. Normally you'd set it aside, save it to cut shorter pieces out of it. Not this boss though, if you could hold it in place and a shot nail would bridge the gap, it passed.

    ya, I seen stuff like that. Sucks. Hard and expensive to start your own business, hard to know much about the company and boss you are going to work for until after you get hired and start work. In the mean time, that "bill" jerk keeps showing up in the mailbox no matter what else is going on.Sucks.

    Well, I hope you got a better place to code at now.

    1. Re:that's a shame by I8TheWorm · · Score: 1

      I've learned that if you tell it like it is, the shady ones will run screaming, and the shops where they want quality work will line up and wait for you... seriously. I've got more work in the Houston area than I know what to do with, and am contemplating starting my own business to handle it all.

      --
      Saying Android is a family of phones is akin to saying Linux is a family of PCs.
    2. Re:that's a shame by zogger · · Score: 1

      good for you! go for it! I bet you can get all the good help you need right off of slashdot here, certainly enough unemployed and underemployed coders around these parts. You tell em upfront, we gonna write the BEST dang code in the world. That should work. Mercedes is in no danger of going outta business.

  110. Where do we go? HA by SnprBoB86 · · Score: 2, Interesting

    We have already GONE there. Java, .NET, fancy smancy libraries for C and C++ all exist and are all far far safer than the old stuff lieing around. Microsoft has taken notice of the security trends are and introducing many backwards compatability breaking changes into XP SP2. When Microsoft *knowingly* breaks backwards compatability, you know they mean business (see this article, even tho I agree with the "MSDN Camp": http://www.joelonsoftware.com/articles/APIWar.html ). Even tho everyone on /. hates them, you can't deny that when Microsoft starts a "bet the company" style trend, that the rest of the tech world doesn't play along.

    --
    http://brandonbloom.name
  111. Poor Java! by shadow_slicer · · Score: 1
    There are many more security flaws in code written in C and C++ than Java

    You're right! We'll have to do something about that: this calls for a shell script!
    #!/bin/bash
    t=$RANDOM;
    while true; do
    super_pass="company${RANDOM}roxors";
    echo "import java.io.*;

    public class buggy_prog_$t
    {

    static int passhash = -59271345;

    public static void main (String args[])
    {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String pass;
    boolean superoverride = false;
    try {
    pass = reader.readLine();
    }
    catch (Throwable ignored)
    {
    return;
    };

    if (pass.equals(\"$super_pass\"))
    {
    superoverride = true;
    }

    if ((passhash == pass.hashCode()) || superoverride)
    System.out.println(\"Yah~\");
    else
    System.out.println(\"Boo~\");

    }
    }" > buggy_prog_$t.java;
    javac buggy_prog_$t.java;
    perl -we 'while (<>) { if (/(company.*roxors)/) {print $1} }' -- buggy_prog_$t.class | java buggy_prog_$t
    t=$(($t+1));
    done;
    There, everybody run that for a few hours(months?!?) and Java will have finally caught up with the rest of us.

    Oh, and Please use fewer 'junk' characters. =P

  112. Re:Some code relies on bugs. by Anonymous Coward · · Score: 0

    And how about code that exploits those unsafe functions? One example is 32 bit flat real mode used by Ultima 7. The other is a trick that uses MapLS/UnmapLS to modify the LDT base address so it can create it's own threads in the virtual memory manager bypassing the kernel (Bleem, works on Windows 9x only). Some apps may rely on the ability to (locally) exploit a buffer overrun to bypass the slow dynamic linker. There are many other cases of apps exploiting bugs to increase performace, that is one of the reasons the wine project has had so much trouble.

  113. Bzzt. Wrongo by Tangurena · · Score: 1
    IBM licensed OLE to MS. You remember Object Linking and Enabling? The fine successor to DDE? The license was about to expire and MS said that they were not going to renew it. So they renamed it ActiveX and dared IBM to sue. IBM blinked (they were still twitching after the OS/2 war).

    ActiveX was never meant to be secure, nor for sandboxing code. It was meant to be the replacement for embedding Excel spreadsheets into Word docs. Then they added stuff to try to make it into a Netscape killer by bribing developers to use it as a feature on their websites. ActiveX is a kludge, it keeps getting new warts and features to make it seem New and Improved!

    How do you mark an ActiveX control safe for scripting? There is a magic value you place in the registry. Yep, that's right, the author of the control is trusted to claim that it is safe. It is as safe as asking folks getting on a plane if they have any guns. How many airlines settle for merely asking their customers vs how many run their customers through metal detectors?

  114. Blame Bad Security on Sloppy Programming by Anonymous Coward · · Score: 0

    Blame Sloppy Programming on bad security in programming tools.

  115. Not quite a space heater... by Demon-Xanth · · Score: 2, Insightful

    How's a coffee cup warmer?
    http://www.sunbeamtech.com/new/products/a ccessory/ accessory%20series-USB%20Coffer%20Warmer.htm

    Motherboard didn't always have a standard USB pinout. (if they do now). Think hardware plans don't go through the same time restraints? If you do, lay off the crack. Consider that EVERY YEAR new videocard chipsets come out, and half way through usually get a revamp. Think you can design and test an all new design in a single year? Get that nice fat 14 layer board right the first time? Hardware has the advantage of they make STANDARDS for interfaces (Hear that MS? An agreed upon industry standard!). And transfer to production isn't just making disks, you have to setup numerous processes and accumulate the materials used. That stuff doesn't come at a short time frame.

    Hardware can do it, why can't software?

    --
    If you think education is expensive, you should try ignorance -- Derek Bok, president of Harvard
  116. re: authors views on engineering secure software by zebracrossing · · Score: 1

    The quality of code written by windows developers using Visual Tools and what have you
    is actually quite pathetic to say the least (I am talking from real life 50K+ source code audits).
    When the exe crashes the great windows engineer, just right clicks on the exe and changes the stack size to 1Mb. The manager sees the demo working and is gratified with the progress.

    The author's whatever experience takes a beating, if he hasn't seen the situation above and which is a garden variety bad software engineering using visual tools.

    There are plenty of '.TAB' technology coders sitting out there using visual tools, who
    keep searching for 'the method' by scrolling through the popup pane. What productivity
    or insight is achieved by that ?

    If the visual tools were so great and so effective and really 21st century, most of the windows supportive security companies (including TruSecure) would not have existed!

    The author's assertion that open source tools have hurt us more than helped us, is neither factually correct nor logically defensible. If he has learnt a bit or two of programming and
    practices, it is primarily because of the open source tools.

    Sure, open source tools are not meant to fund your next great car or your divorce suit!
    They exist with a purpose and that is to write great software by the real software artisans.

    It is fashionable to talk of 'garbage collection' in almost any forum, by authors of 0 - n years of experience. This article is no different.
    'garbage collection' exists with a specific purpose. However, it still cannot address your morning nature's call. So much for
    making sweeping statements about applicability of garbage collection, with 15 years of experience.

    Perhaps ACM Queue should ponder that publishing articles which are little more than mental regurgitations, will neither help the cause nor
    the subscription numbers. The readers will continue to be in the queue for enlightenment!

  117. unitialised warnings by oo_waratah · · Score: 1

    For the record

    int i;
    if( a )
    i = 0;
    else
    i = 1;

    Will NOT generate a warning under gcc 3.3 (-Wall with optimisation). This will:

    int i;
    if( a )
    i = 0;
    else if( b )
    i = 1;

    Compilers can be smarter and help us poor mortals along. There is code that will give warnings that are not strictly correct (other logic ensure that the unitialised variable is never referenced like a boolean guard value) but it is simple enough to code in a reasonable default in case some idiot does a poor change later on.

    Ignoring the warning on the other hand will lead to program crashes in obscure ways. It works on Solaris and Windows but not on Linux. I am currently working through OpenOffice.org removing unitialised variables, costs a little effort and potentially a good pay back on my time in program stability. It may not correct all the bugs but it should make the problems repeatable because it starts from a known value.

  118. Garbage collection is free by Mybrid · · Score: 1
    Now we can pretty much treat garbage collection as "free" and recognize that a programmer's time is too valuable to spend worrying about memory allocation.

    As a systems programmer, I say "go ahead and keep on living in that fantasy world and then pay me the big bucks when you run into problems".

    Java is such a farce. Java has the "great elbow" in every performance curve I've ever seen. Once the garbage collection kicks in just watch preformance drop through the floor. I've never seen it do anything less even in the latest JDKs. Whenever I tell them "buy more machines" my management gets pissed off because GC is suppose to be as fast as non-GC code. A GC machine is only as fast as a non-GC machine when its under a partial load, ideally around 50%. We have non-GC production machines running at near capacity (100% VM and 80% CPU) with uptimes of six-months or longer. Management wants to know why they can't load Java machines up to capacity the way their other servers not running Java are loaded.

    Java is NOT a systems programming language and GC is not for systems programs, period.

    And don't get me going on memory leaks. We've been running our JVM logging on "verbose" logging mode for three years running because developers continually allocate buffers for PDFs and other large files in ways that defeat garbage collection. They inerrantly allocate memory faster than GC can collect. THIS HAPPENS every production release. Tell a developer they can be sloppy and they will.

  119. Legacy Code by Mybrid · · Score: 1
    Who, on this God's green earth doesn't interface with legacy code?

    Millions of lines of legacy code?

    His solution of turning warnings into errors is a pipe dream only realizable in world where companies are going to discard existing software.

    As a consultant doing contract work I've seen what happens when large corporations try to use lint, splint or other tools on new code that compiles against old code. It's not pretty.

    Security, as it goes, needs to be applied to legacy code being compiled into new code. He completely fails to mention legacy code and the cost of bringing it up to date.

    Who's going to pay for it?

  120. In other news... by BoneFlower · · Score: 1

    White is colored white, black is colored black, chartreuse is colored chartreuse...

  121. KISS + PEBKAC = secure programming.... by iamcf13 · · Score: 1

    I kid you not. Keeping the programs as simple as possible combined with input validation of all user input would solve a lot of problems involved with writing 'secure programs'.

  122. NASA's Code Expectations by TastyWords · · Score: 3, Interesting

    This'll end up on the fourth screen of threads, but it's worth reading for those who find it. It's over seven years old, but essentially everything in it holds true today. (worth reading on various lists I don't have it bookmarked - I knew where it was.

    "They Write The Right Stuff". I'm not even going to provide a summary of everything which is listed in the article. There are a lot of good lessons in well organized, well thought out explanations as to why the software doesn't shut down but how few errors are found.
    There is a difference between a shuttle crew and standard users. 1) A shuttle crew is a smaller user body. 2) They're more likely to follow instructions ala "what happens if I hit this button?"

    I've never sent a note to the author, but I think it would be a book as important as Writing Solid Code (is that the right one? (I've been up a little too long without a syringe.)

  123. They're not mutually exclusive by Moraelin · · Score: 1

    You can have a userfriendly program which is also designed, coded and reviewed with security in mind, you know. Or you can have a totally unusable mess which also is buggy and exploitable.

    --
    A polar bear is a cartesian bear after a coordinate transform.
    1. Re:They're not mutually exclusive by Tukla · · Score: 1
      You can have a userfriendly program....

      Of course. But that takes longer to develop, which is a Bad Thing in the commercial world.

  124. loose? by Anonymous Coward · · Score: 0

    I'm not normally a spelling or grammar nazi, but lose spelt l-o-o-s-e irritates the fuck out of me. It's a common, simple, four letter word. This is not like misspelling "psilocybin" or something. I would expect a five year old child to know the difference between "lose" and "loose".

    And before some whining bitch bleats about language evolving, this part of it hasn't evolved. Check in a dictionary - it's wrong. "Loose" is taken. It already means something.

    Back before dictionaries you could spell words how you liked, and that was how spelling evolved. Nowadays, you spell like the rest of us, or people will think - rightly or wrongly - that you're an idiot.

    1. Re:loose? by bay43270 · · Score: 0, Offtopic

      Back before dictionaries you could spell words how you liked, and that was how spelling evolved. Nowadays, you spell like the rest of us, or people will think - rightly or wrongly - that you're an idiot.

      You're right. People must think I'm an idiot. That's why the post was rated '+5 Insightful'. Thanks for the stunningly ironic post about how to not look like an idiot.

  125. Ada 2005 by krischik · · Score: 1

    Well next year there is a Language revision - with containers. Besides, before you claim there are no Container Libs for Ada you might at least try the simplest Google: http://directory.google.com/Top/Computers/Programm ing/Languages/Ada/Bindings_and_Libraries/ Ada actualy has container libaries which can store polymorfic objects - something neither C++ nor Java can. They can only store pointers to polymorfic abjects. Martin

  126. To many ways? by krischik · · Score: 1

    As a matter of fact:

    ISO/IEC 9899 Programing Language C : 538 pages
    ISO/IEC 8652 Ada Reference Manual : 560 pages
    ISO/IEC 14882 Programing Language C++ : 757 pages

    I have got them all. I read them all.

    So you are telling me that 22 pages less makes C a slim language compared to Ada?

    And I wonder who truely has to many ways to do the same thing:

    i = i + 1;
    i += 1;
    i++;
    ++i;

    In Ada there is only one way:

    i := i + 1;

    Ada has a lot features - true - but they aren't duplicates. They are all usefull features.

    Martin

    1. Re:To many ways? by kaffiene · · Score: 1

      Oh come on, K&R is the standard C reference and it;s barely enough to fan yourself with.

      I don't doubt that Ada's many features are useful, but I lean toward languages which have a smaller basic set of features.

      Your example showed that C has a lot of different types of OPERATORS, but it doesn't show a lot of different types of THINGS. C has primitives, structs, functions, operators, includes and source files and thats about it. Ada has a MUCH larger collection of objects to know about.

    2. Re:To many ways? by krischik · · Score: 1

      If you compare with K&R then you should do so with Ada 83. They are of equal age.

      Besides. I think that C is like an iceberg. On the first glace there is little but then under the waterline lurks desaster.

      If you are a serious C programmers you have spend th $18 to get the official C standart.

      So then compare your average C Tutorial with the Standart on "implicid type convertion".

      Tutorial: compatible types are converted.

      C Standart: about 3 pages which you need to read at least 3 times to understand them.

      To return On-Topic: Without understanding those 3 pages - perfectly - you can't do secure programming in C.

      Ok, you could use splint as well.

      Martin

    3. Re:To many ways? by kaffiene · · Score: 1

      I fully agree that C is not a great language to write secure code in - neither is C++. I do think that C's simplicty is a fact, however, and was a major reason why it was so popular and why Ada never was.

      I notice a lot of discontent with C++ too, and I think that a lot of that is to do with complexity. It makes it very easy to write bad C++.

  127. Round Trip by krischik · · Score: 1

    And the funny thing is that the STL was inspired by an much older library written in Ada.

  128. What about more then allocated? by krischik · · Score: 1

    Because what ready makes the end-user choke is when you store string longer then the allocated space.

    And the end-user is more important then us programers.

    Beside, if you allow for Libraries then there is:

    Ada.Strings.Fixed_Strings
    Ada.Strings.Bounded_S trings
    Ada.Strings.Unbounded_Strings

    Martin

  129. Parent is a crap comment by Anonymous Coward · · Score: 0

    Look, I know you have problems with comprehension, so I'll take this slowly for you.

    Whether you like it or not, opinions can be either based on fact or not and as such can be proven to be true or false. An example:

    "I am of the opinion that the world is flat."

    Note that while it is an opinion, it is also entirely provable as to truth or falsity. So while you may hold an opinion and demand that nobody scrutinize it because, "Hey, it's just *my* opinion," you're living in a fantasy world.

    Opinions can and usually do have an element that can be either proven true or false. Sorry if you don't like it, but that's the way it is. And if your "opinion" is based on falsehood, don't expect anyone to take you seriously.

    Sheesh. How this kind of garbage gets modded up as insightful is beyond me.

    1. Re:Parent is a crap comment by bonch · · Score: 1

      Sheesh. How this kind of garbage gets modded up as insightful is beyond me.

      Can you prove my post is garbage? Can you disprove someone's opinion that my post is insightful?

      I'll let you think about it.

    2. Re:Parent is a crap comment by Anonymous Coward · · Score: 0
      Can you prove my post is garbage?
      I thought the OP did just that. But I guess you're too stupid to figure that out.
      Can you disprove someone's opinion that my post is insightful?
      Of course you can disprove someone's opinion that your post is insightful, very easily--if it isn't insightful, their opinion is wrong. For example, if your so-called insightful opinion is "George W. Bush is a Republlican!" it's very plain to see that your opinion is not insightful.

      I let you think about that.
  130. english keybords by krischik · · Score: 1

    Funny as you say that you type end faster then }.

    Have you ever seen a non english keyboard and where they hide the { } there.

    On a german keyboard it is 3rd function 7 and 0.

    That's 3rd function not just shift :-(.

  131. Do as you are told by krischik · · Score: 1

    The Problem with C is that the default is unsave and you have to go out of your way to make it save.

    There are programming where it is the other way round. Ada for example is often described as the "save language" yet it does have all the "unsave" features as well.

    Unchecked_Convertion will convert everything as long as the size is the same.

    "for X'Address use Y'Address" will convert even when the size does not fit. And it is faster - no data copied.

    Yes you have to type more - but even when most of you never did any Ada you will all know what "for X'Address use Y'Address" means and that it is indeed a nasty hack.

    But I give it to the C comunity: Sometimes you need nasty hacks. But do nasty hacks need to be the standart behavior of the language?

  132. You think to C-isch by krischik · · Score: 1

    The only time a bound need to be checked is when a type is converted. As long as you are within one type no checks are needed since the bound are already garaneed.

    With there are some many type convertions that indeed checks would be needed left right and center.

    say for example:

    auto char X[10] = "123456789";
    auto char Y[20] = "1234567890123456789";

    x = y;

    C's problem is that the arrays y and y are convertet to char* and then assigned. Hence the bounds are lost.

    Calling strcpy would make things even worse!

    In Ada, Modula-2 and Pascal the arrays are not converted and the compiler will be able to check the bound at compiler time and will isue an error - since X is not large enough to hold the value.

    Other example:

    typedef char T[10];

    f (T X, T Y)
    {
    strcpy (x, y);
    }

    Again C converts the arrays into char* and looses the bounds. You can pass to many chars into the function and compiler says nothing:

    f ("1234567890123", "123456789012345");

    Again in Ada this would not happen. And again no bound check would happen. The compiler knows from the used type that both strings are 10 characters and can be assiged savely.

    This is called "design by contract". And with "design by contract" the compiler will be able to optimize away most bound checks. Or even do them at runtime.

    There is actualy a language call "SPARC" which will evaluate all contracts at compile time ensuring that no contract will be broken at runtime.

    Programming SPARC is hard - but if you do the fly by wire of an Boing 777 any broken contract will meen 600 people drown in the atlantic ocean.

    The problem with C is that you can write a contract down:

    typedef char T[10];

    But the compiler ignores the contract afterwards.

    Martin

    1. Re:You think to C-isch by DunbarTheInept · · Score: 1


      The only time a bound need to be checked is when a type is converted. As long as you are within one type no checks are needed since the bound are already garaneed.

      And exactly *how* is it that the bound is guaranteed in what you are talking about? Oh, that's right - by checking it every time, just like I SAID. It doesn't happen by magic pixies.

      Consider your: auto char x[10];

      Now, I try to say:

      int a = 5
      int i = 2*a + 1; // i now is 11
      x[i] = 'Z'; // attempt to set the 11th char of x, which is out of bounds.

      To keep that from screwing up, there needs to be bounds check, right there, and it needs to be done at RUNTIME. No conversion is being done.

      So when you claim that in strongly typed languages that the bounds checks on arrays are only done when converting types, you are 100% wrong. The bounds checks have to happen EVERY time you use a variable for an array index.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  133. Valgrind recommended with C/C++ by Explo · · Score: 1

    While it's not a magic bullet, Valgrind can help a lot to find otherwise difficult to spot memory handling errors during code development. And quite easy to use / requires quite little additional effort. In addition to memory use debugging it also offers features such as cache profiling.

    Its downside is that with computation/memory intensive programs its overhead can be quite noticeable; don't expect e.g. Mozilla to be a speed demon when run with Valgrind. And oh, it's mostly x86 - only, although an experimental PPC version seems to exist these days as well.

    --
    Everyone who makes generalizations should be shot.
  134. You underestimate what a modern compilers can do. by krischik · · Score: 1

    You example will be the following in Ada:

    procedure Test
    is
    A : Integer := 5;
    B : Integer := 2 * A + 1;
    X : String (1 .. 10);
    begin
    X (B) := 'Z';
    end Test;

    and when you compile that with the gnu compiler collection:

    >gcc -x ada -gnatwa -c test.adb
    test.adb:3:04: warning: "A" is not modified, could be declared constant
    test.adb:4:04: warning: "B" is not modified, could be declared constant
    test.adb:7:07: warning: value not in range of subtype of "Standard.Integer" defined at line 5
    test.adb:7:07: warning: "Constraint_Error" will be raised at run time

    And you are wrong when you think there is no type convertion in your example. You see in a strictly types language

    X : String (1 .. 10);
    is a shorthand for:

    subtype X_Range is Natural range 1 .. 10;
    subtype X_String is String (X_Range);

    X : X_String;

    Now B, beeing an Integer, is converted into the type of X'Range. I can make this clear by exanding the code:

    procedure Test
    is
    subtype X_Range is Natural range 1 .. 10;
    subtype X_String is String (X_Range);

    A : constant Integer := 5;
    B : constant Integer := 2 * A + 1;
    X : X_String;
    begin
    X (B) := 'Z';
    end Test;

    if you compile that:

    >gcc -x ada -gnatwa -c test.adb
    test.adb:10:07: warning: value not in range of type "X_Range" defined at line 3
    test.adb:10:07: warning: "Constraint_Error" will be raised at run time

    Integer and the range of the X are different types and need to be converted. Most C programmers just don't know how often type are convertet. Try http://www.splint.org and see how often a type is converted in your programs. Of course, strictly typed languages help the programmer avoid type convertions. for excample in a loop:

    for I in X'Range loop

    No bound checks needed in that loop. I will iterate over every element of X - no more no less.

    The usual Ada programmer spends only 1/10 of the time debugging when compared to a C programmer. He does spend a lot more time typing and analysing compiler output - But that is less painfull then debugging.

    With Regards

    Martin

    Sorry for the bad formating: /. forced me to make paragraphs longer then I wanted to

  135. Re:You underestimate what a modern compilers can d by DunbarTheInept · · Score: 1

    You are still operating under the delusion that range checks only occur when converting types. They don't, not even in your precious Ada. I don't know Ada much beyond one semester of it back in college, but I do know that it's a computer language, and must therefore run on an actual CPU at some point. And that's enough to tell what's wrong with your claim.

    Running on an actual CPU means there's no such thing as a data type that stores numbers from 1 to 10 and is unable to store anything else. Not on a computer made up of binary numbers. a 3 bit number can store from 0 to 7, a 4 bit number from 0 to 15. There cannot be any such thing as a type that stores a number from 1 to 10. What actually exists when you have that type is a larger integer of some sort, maybe an 8-bit integer, maybe a 32 bit integer - maybe even a tiny 4-bit integer, but the point is that there's no such thing as a 3.3219-bit number, and that means the only way to ensure it will never have a number larger than 10 is to check for it at runtime. So you are still doing a lot of bounds checking, only you are doing the checks every time the range variable changes instead of doing it every time the range variable is used in an array reference. You have successfully removed the check from the array reference merely by putting it somewhere else instead, not by actually getting rid of it or it's overhead.

    That guarantee that the index variable is in the range of 1..10 didn't come for free without the cpu doing runtime checks. It happened at exactly the same expense as bounds checking the array - it just happened a bit earlier in the process.

    Oh, and by the way, I'm sick of you talking about how "C programers" think. I'm a programmer. Period. C is just one of many languages I use.

    --

    Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  136. Types and Converting them by krischik · · Score: 1

    Since you have done some Ada I can remind you of one important thing:

    For every type T there is T'Base. The 'Base type is the type used by a given CPU you where talking about. The type of X_Range'Base was of course Standard.Natural. Standard.Natural'Base is Standart'Integer and that was 32 bit with the give compiler.

    If you say:

    A : X_Range := 12;

    Then the the Standart'Integer 12 is converted into X_Range. That will fail. And since it allways fails the compiler will warn you. If you prefer to get a compile time error you could have written:

    A : X_Range := X_Range'(12);

    Remember: X_Range'(12) means Interpret the literal 12 as X_Range. 12 is not a valid X_Range - the program will not compiler. But since this will only work with literals it is beside the point. But it will alow me to show you an example where there is no bound check at all:

    A : X_Range := X_Range'(10);
    B : X_Range := A;

    In assignment of A line 10 is interpreted as an X_Range. The compiler will check at compile time that it is valid. Now A is a 32 bit number with a guarantee to be in the range of 1 to 10. When assigning to B the compiler will accept the guarantee and not check A again.

    This is, of course not interesting. The following is:

    procedure F (A : in X_Range)
    is
    B : X_Range := A;
    begin
    end F;

    A is still guaranteed to be between 1 and 10. No additional check needed when assigning B. And coming back to an Array:

    procedure Z (
    A : in X_Range;
    B : in X_Range;
    X : in out X_String)
    is
    begin
    for I in X_Range range A .. B loop
    X (I) := Z;
    end Z;

    No bound check needed here. A and B is guarantee to be in range 1..10. X is guaranteed to have an array element for each position in the range if 1 .. 10. Each possible value of I is guaranteed to be a propper subscript for the array
    X. No types converted (A, B and I are 32 bit) no bounds checked (all bounds are guaranteed).

    When I first read about Eiffel I was wondering why the contracts are checked outside the function and not inside. At first I considered it an enormous waste.

    But then I began tho see that the contract can cascade upwards and only need to checked at the top level of the program.

    Of corse there at the top level all bounds do indeed need to be checked. And when you choose your types unwise. i.E: just use the standart types:

    procedure Z (
    A : in Integer;
    B : in Integer;
    X : in out String)
    is
    begin
    for I in Natural range A .. B loop
    X (I) := Z;
    end Z;

    will have tons of checks. X is an indefinite and carries two hidden extra parameters X'First and X'Last to make bound checks possible. A and B can be negative but all indices of X must be positive. etc. pp.

    It all depends on how wise you choose your contracts if the cascading effect will happen or not.

    With Regards

    Martin

    1. Re:Types and Converting them by DunbarTheInept · · Score: 1

      Your examples all make the assumption that you are going to iterate over a predefined range that is known at compile time. This is not the case in a typical real-world program, where you make an array that grows dynmaically as large as it needs to be based on the data it sees.

      If you make an example where it's an array of 1..N items, with N to be determined by a parameter at runtime, then those range guarantees at compile-time can't happen.

      --

      Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.