Web development in C: Crazy?
161–170 of 213 posts
Re: Web development in C: Crazy?
#162So, people can't hardly write safe web apps in PHP without spraying XSS and auth bypasses and arbitrary shell executions and arbitrary SQL injections everywhere, and you also want to hand the attackers the ability to segfault your server or possibly even straight-up run arbitrary code? Anyone smart enough to truly safely code a website in C is smart enough to learn a language to create that website which doesn't get…
> If you aren't smart enough [to safely code a website in C...] the first clue that you aren't is that you think that you are Gee, isn't that epistemology at its finest. Personally I've never met anyone who programmed in C because they were too dumb to learn anything else, but who knows. You may however be aware that, before an HTTP packet even makes it to your shiny, scripty web page, it's often processed by a succe…
I have.
They were too dumb to understand that they were writing unsafe C code because they weren't skilled enough to write safe C code. So it never occurred to them that they had a problem that would be solved by writing part of their system in Python or Ruby or Java.
it's often processed by a succession of "segfault-y" and "arbitrary-code-running" software such w Apache and Linux
The vast majority of C programmers are much less skilled than Apache and Linux developers.
Re: Web development in C: Crazy?
#163So, people can't hardly write safe web apps in PHP without spraying XSS and auth bypasses and arbitrary shell executions and arbitrary SQL injections everywhere, and you also want to hand the attackers the ability to segfault your server or possibly even straight-up run arbitrary code? Anyone smart enough to truly safely code a website in C is smart enough to learn a language to create that website which doesn't get…
Re: Web development in C: Crazy?
#164Doug Crockford at the TC-39 panel last night talked about how one of the most exciting things about JavaScript is that its a wildly successful general-purpose programming language that "doesn't have to look like C to be successful." His point was that we used to live in a software ecosystem where the conventional wisdom was that if a programming language didn't look like C, it wasn't going to take off. JavaScript (an…
Also, in some of his earlier talks he said that it looks familiar to C or Java developers (because it's a C-like language) and that this perceived familiarity is the reason why most people don't bother learning the language.
Re: Web development in C: Crazy?
#165WHYYYYYYYYY No, seriously, why ? As far as I can tell, his entire argument is "web development in C is terrible and limiting, but not as quite as terrible and limiting as you might think." I guess that's good news if terrorists are forcing you to write websites in C, but I don't see even an attempt at explaining why you would choose to do this.
Of course it's usually easier and safer to just throw more CPU at it, but at a certain scale that might get too expensive...
Re: Web development in C: Crazy?
#166Re: Web development in C: Crazy?
#167So, people can't hardly write safe web apps in PHP without spraying XSS and auth bypasses and arbitrary shell executions and arbitrary SQL injections everywhere, and you also want to hand the attackers the ability to segfault your server or possibly even straight-up run arbitrary code? Anyone smart enough to truly safely code a website in C is smart enough to learn a language to create that website which doesn't get…
> If you aren't smart enough [to safely code a website in C...] the first clue that you aren't is that you think that you are Gee, isn't that epistemology at its finest. Personally I've never met anyone who programmed in C because they were too dumb to learn anything else, but who knows. You may however be aware that, before an HTTP packet even makes it to your shiny, scripty web page, it's often processed by a succe…
If your web code has ~20 years of security audits and fixes it's probably perfectly safe to use it. If you're adding large new features under tight deadlines I don't recommend it.
Re: Web development in C: Crazy?
#168Earlier quoted context omitted.
We use C# which allows you to write safe code. However, people still manage to fuck it up at an implementation level often enough for it to cause high risk problems.
I do mostly JVM and .NET based development nowadays, in consulting projects. Sometimes I wish to be part of a C or C++ based project, then I try to imagine how the quality of our offshore guys would map to those languages and realize how lucky I am not to be part of such projects.
(Disclaimer: Don't get my tone wrong please, I'm asking not suggesting, thus I respect your experience.)
Re: Web development in C: Crazy?
#169Earlier quoted context omitted.
If you have not already and can do so, I highly recommend adding Dtrace to your C development toolkit. Dtrace, Valgrind, and GDB make rooting out C runtime issues a lot more pleasant and complement one another well.
Indeed. It's a pity DTrace is not available in Linux (there are two ports, none work for real work). It's also a pity DTrace in OS X is starting to bit rot.
Re: Web development in C: Crazy?
#170Earlier quoted context omitted.
Using that same logic we shouldn't use C for anything, because we might make a mistake . I wouldn't use this not because of possible mistakes leaking in, but because the higher-level languages have already solved some of the problems you would have to solve yourself, such as handling unicode. There are C frameworks you could use but my point is that you would come across problems that have already been solved, and yo…
And we shouldn't use C for anything, if it can at all be avoided, because the likelihood and aftermath of mistakes are enormous.