Web development in C: Crazy?
71–80 of 213 posts
Re: Web development in C: Crazy?
#72Earlier quoted context omitted.
Google still does primarily use C++.
Google is so huge now, I'm not sure if that is really something that you can state unequivocally. The search engine and a lot of the plumbing that everything is built on top of is written primarily in C++, but there is a TON of both Java and Python code there (and that's not counting things like Go and specialized languages like the infamous Sawzall). Back in the day (particularly before they started doing ads), almo…
Re: Web development in C: Crazy?
#73It provides an API similar to Node.js using C++11 lambdas.
Re: Web development in C: Crazy?
#74So, 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…
This makes me wonder, are there any decent (military grade?) web frameworks for Ada?
Re: Web development in C: Crazy?
#75Or use a C framework that has secure string handling and others.
Re: Web development in C: Crazy?
#76By way of personal experience, in '99 we had an outstanding developer who was a rock star in C. When he left, I remember sitting in a meeting when an A+ developer (he really was good) was asked by the VP Eng, "Can you support his code". The response, "No". VP Eng: "Why is it not commented?". Response, "It's commented. In fact it's the best code I have ever seen. But I cannot support it, it's amazing, but its way beyond my skill level."
I have never seen a repeat of this experience in a 4th gen language. I'm sure it can/may happen, but have not yet.
Re: Web development in C: Crazy?
#77Earlier quoted context omitted.
I don't see it as a talent filter proxy. More of a "Does this company understand what it is getting into and therefore what it needs" proxy. e.g. You run a skyscraper building company. If you see job ads for competitors with things like "must have excellent woodworking knowledge" you are probably less worried than those with "must have excellent metallurgy knowledge".
> I don't see it as a talent filter proxy. That's fine. I was characterizing how pg was using it. > Does this company understand what it is getting into and therefore what it needs? I think it is actually a much poorer proxy for that. Maybe if they are a small company or don't have any engineers, that would make sense. As a company gets larger, job descriptions start to represent very small, specific parts of what a…
The poly-lingual software related company seems to be a more modern trend IMO. At the time PG is referring to I would have been very surprised to see that going on in the web industry.
Re: Web development in C: Crazy?
#78For regular earthlings, RoR, Py, PHP and alike are still more feasible than C for "getting the job done".
But the article's point of view is a bit shallow in that sense, since it's looking a way of replacing conventional frameworks (RoR etc.) for C. If you gonna develop a high-perf application in C, you probably use more wide variety of specialized libraries for focused tasks(like json processing, I18N, handling SSL, developing nginx/HAproxy modules,extensions for load balancing, etc.) rather than using a single "C framework".
Re: Web development in C: Crazy?
#79I've done a number of projects that were web-oriented in C and C++ over the years, and they are by no means my primary language. It wasn't that bad, especially if you take the time to learn how to do string manipulation properly (which isn't really that hard). Come to think of it, even though we consider C to be "low level", that's really only a temporary problem that solves itself the longer you work with it and the…
It's hard in the way that counts: It's tedious and prone to precisely the kinds of errors humans make when a task is tedious. Worse, string manipulation is precisely where all of the potentially dangerous bugs can live in the average C program, especially if you're accepting data from untrusted sources.
> Come to think of it, even though we consider C to be "low level", that's really only a temporary problem that solves itself the longer you work with it and the more you build with it.
Aside from the fact you can say the same about assembly, this is another reason to disfavor C: Reinventing the wheel. Over and over again.
I say all this as someone who actually likes C, and even somewhat enjoys doing string processing in C. I even know about strstr(3), which never seems to get mentioned. The main thing I know, however, is that it isn't worth it unless you live in a contrived circumstance.
Yes, you can go really fast by strapping yourself to that rocket, and if you remove the helmet you'll reduce your weight and go even faster. Nobody's doubting you. However, very few people want to stand downrange of you.
Re: Web development in C: Crazy?
#80So, 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…
I once wrote a website (a search engine for a specific set of websites) in C. It actually worked, once I spend 20 hours in valgrind. I've grown since then, in two important ways. First, I'd probably do a better job now, and not have to spend any time in valgrind at all (I still use C quite frequently). Second, I'd never, ever, try to pull that stunt again.
Thia is exactly the main problem with C.
You need to rely on tolling outside the language to be able to write safer code.
While languages like Ada and Modula-2 and their descendents, offer the same hardware capabilities as C with stronger type checking.