How much is C++ used in web development?

Paithar

[H]ard|Gawd
Joined
Jul 17, 2003
Messages
1,049
Ok. I've been a web developer for 16 months now. I develop in PHP, MySQL, HTML and CSS with a little bit of JavaScript. It's all self taught however and I'm finding that since it's all self taught, no other company out there wants to take a chance me (I've actually had one employer tell me that it's nice that I've been able to teach myself PHP and MySQL but it doesn't mean that I know much of anything about them).

So I decided to check into the local community college and see what they offer for actual web development courses. They have a Web Programmer Certificate course that I wouldn't mind taking but the first language you learn is C++. Although I wouldn't mind learning C++ as I only currently have a very basic understanding of it, I have to wonder what they're thinking with putting that into a web development course. I don't recall seeing web development jobs posted that want someone that knows C++ as apposed to C# or Java.

I'll probably take the course if I can work out financing because the second language you get to learn is Java but I'm just wondering what other people think of C++ as far as web development is concerned.
 
You could write some cgi stuff with it for processing forms, but other than that not much. Now I'm all for degree's etc, but I think for your situation a few certifications would suffice. But what do I know. ;o)
 
Last time I checked, c++ is NOT part of usual web development. It's the new introduction gateway language to the programming world. It's similar to Java, and teaches concepts well.

PHP though is similar to c++, so if you don't have a problem with PHP then c++ should e ok.


I would say suck it up, learn a new langauge, and get a cert. Of course I am know to be highly anti-cert, but to each their own.
 
It depends on what you call "web development". Apache and IIS are the two most popular web servers, and they were both written in C/C++.

If you think of "web development" as developing dynamic pages, then it's used frequently in high-end situations, but less in casual situations. You can write pretty interesting systems (such as bulleting boards, and so on) in scripting languages. But when demand gets really high, the applications become very complicated, or the data sets become incredibly large, many sites go to C++ to provide performant implementations. "How much" here is not much at all, compared to how many sites are cobbled together with a scripting language.

If you think of "web development" as strictly developing content, I'd figure it's not at all. You're using HTML and XTML and CSS instead.
 
C++ in not generally used in Web development. Like others have said, it's possible but only in applications where a specialized robust solution is desired.

If you are interested in learning a new language, I would say that Java is a worthwhile language to learn as it will teach you object oriented design and give you a tool that you can build server side solutions with, say on an Apache server. Look into LAMP, struts, and Jboss too.

I you want to gain personal knowledge on a subject like PHP or Java, then dedicate time each day to study the subject, like you have been. Buy books, seek resources online, and stick to your study routine. Over time you will become an expert. If you want to prove to others you posses the skill, you can go for a certification. Certifications exist for every form of Web programming from PHP to .NET. Just google PHP certification. Another way to convince others you really have it, is to build a killer app. You never know, you may be Google's next acquisition. :)
 
I have no problems learning C++. In fact I would love to learn it I was just kind of confused as to why they would have C++ be the first language learned in their Web Programming Certificate course.

C++ would be something great to have on my resume even if my career is in web development. I suppose C++ would be a pretty good jump start on learning Java and C#.

The college's Web Programming Certificate course is pretty small, consisting of only two semesters. The only languages they really go into any depth teaching are C++ and Java however they do have one class in the course that touches on PHP, MySQL, HTML and CSS. I just figure that when I get to that class it'll be a breeze.

Another class in the course that I'm looking forward to is a class that goes into more depth on SQL. All of my current SQL knowledge is self taught and I feel I know it fairly well but then throughout my programming career I must admit that I haven't run into very many situations where I needed to do a lot of left joins and what not so in the past I've had a few times when I needed to set up a complex query and I had to go and read up on left joins and what not to figure out how to do what I wanted to do.

I've talked to my wife about this course and she really wants me to take it so now all I need to do is figure out the best way to pay for it.
 
Not to be "overly blunt", but the "languages on your resume" don't mean anything. Your ability, as a developer, to solve problems using tools in the abstract is what matters most.

You want to hire a mechanic who really knows cars. Maybe he's worked at the Baja 1000 and the 24 Hours of Daytona, and done some consulting with Porsche to solve a fuel delivery problem in the new 998 GT-1. That's the kind of thing I'd want to see, anyway.

I don't want to hire a mechanic who says "I know how to use screw drivers, and I specialize in SnapOn screw drivers!"

If you interview with me and your resume says that you know C++, I'm going to ask you to solve a tricky problem in C++. You should know C++ as well as you know your native spoken language; you should be focused on the tricky problem.
 
I have mainly seen C/C++ used as CGI, but it is definitely not as widely used as scripting languages these days unless you need something higher performing or in remote special cases. I remember an ex-forum member writing his own BBS software in C++ (with boost-libs?), of course I don't know how that went.

mikeblas said:
If you interview with me and your resume says that you know C++, I'm going to ask you to solve a tricky problem in C++. You should know C++ as well as you know your native spoken language; you should be focused on the tricky problem.

So here's a hypothetical for you, mikeblas. Say a person shows up with a resume that doesn't tout any languages. Would you ask him the tricky problem, just without the language bit?
 
BillLeeLee said:
I have mainly seen C/C++ used as CGI,
On Windows, it's commonly used for ISAPI extensions and filters.

BillLeeLee said:
So here's a hypothetical for you, mikeblas. Say a person shows up with a resume that doesn't tout any languages. Would you ask him the tricky problem, just without the language bit?
It depends. What job are they interviewing for? If they want to be a developer or an architect, then I'd ask them an abstract question and expect a good converation about tradeoffs, design, and so on. I might also ask them what their favorite language is and why. Or, ask about my problem -- but instaed of asking for a solution, ask 'em how they would choose a language to implement a solution.

What else is on their resume? If Charles Turing interviewed, I suppose he might not have a language listed on his resume. But he might have lots of other interesting things to spark conversations, right?

Or are they interviewing for some other role?

Who do "web developers" idolize? That Zen Garden guy, maybe? What languages does he have on his resume? Does he list some certifications? Which ones?
 
I initially had a resume (about 10 years ago) that didn't list any of the languages I learned in the school I went to before. After my first couple of jobs with my resume that way, a potential employer suggested that I add a section to my resume detailing what languages I know. He said that it would provide a nice and quick summary of that info for the employer. An employer could quickly look at that section and see if the rest of the resume might even be somewhat worth looking at. If the programmer doesn't have the needed languages then there's no reason to look any farther.

Since then I have done exactly that on my resume and been given praise by a lot of potential employers, some of which hired me and some of which did not. So that's why I think it would be good to have C++ on my resume. I wasn't saying that just by putting it there I know it good enough to do the job. I would simply suggest that I at the very least have an understanding of it and the employer can then question me on it.

I also do not list languages that I either do not have actual experience on or do not have formal education in. I never listed PHP on my resume until I got this job because all of my PHP knowledge is self taught but until I got my current job I did not have any formal education or experience with it. That of course did not stop me from trying to get PHP jobs before but my current employer was the only one that has given me the chance to prove myself.
 
It's a bit tricky having the right resume. If you're applying at a major firm like Meryl Lynch, your college education and language knowledge may weigh more since their HR department looks at your resume first before it ever reaches their IT department. HR knows nothing about the complexity of anything you have ever developed and they only know to go for candidates that fit within a specific criteria. Hence why it's a good idea to list languages and college experience.
 
C++ is very rarely used in web development. You'll want to look at these for your backend languages:

PHP
PERL
ASP.NET
Java/JSP
Python
Ruby
 
Here's a c++ cgi example just in case you were wondering what it looks like.

Code:
#include <iostream>
#include <cstdlib>
#include <cstring>
using namespace std;

int main() {
    cout << "Content-type: text/plain; charset=utf-8\n\n";
    char* ua = getenv("HTTP_USER_AGENT");
    if (ua) {
        cout << ua << endl;
    } else {
        cout << "No UserAgent data" << endl;
    }
    char* method = getenv("REQUEST_METHOD");
    char* qs = getenv("QUERY_STRING");
    if (method && strcmp(method, "GET") == 0 && qs && strlen(qs) > 0) {
        cout << qs << endl;
    } else {
        cout << "No QueryString data" << endl;
    }
}
// g++ -Wall -Wextra -ansi -pedantic cgitest.cpp -o cgitest.cgi -O3 -s
// cgitest.cgi?test=test
(tested that on a local install of apache)

The problem is, unless you can find a c++ cgi library that has features like those that you use in PHP for example, you're going to have to do everything from scratch even just for basic things.

If you want keywords and their values, you'll need to grab the query string and parse it into a multimap. If you want to handle post data, you'll have to write a function to grab it from stdin yourself. If you want to encode or decode something, you'll need to make functions to do that yourself. If you want it to download a file somewhere, you'll need to create the code to fetch it.

Also, everytime you change something, you'll need to recompile.

It's also not like php where you can mix data and code inside php tags together, but there are some c++ cgi interpreters that allow you to do stuff like that.

Something like this cgi library might help.
 
A lot of people "know" mysql and php. Very few people (in comparison) know php and mysql.

As I have recently found out while interviewing new hires, it is very apparent that most of those who are self taught write more spaghetti code and those who have had some sort of training write less spaghetti code.

It really comes down this. A lot of people understand how to do something, very few understand why. Please I beg of you, for the sake of all future employers, learn to understand why.

I say take the course. C++ isn't going to hold your hand and still give you icecream when you've been bad the way php does.

Anyway, good luck with your future. From the sounds of things you have the passion required to never work a day in your life. :)
 
modi123 said:
PHP though is similar to c++, so if you don't have a problem with PHP then c++ should e ok.
PHP's syntax is a lot more flexible/less strict (for web development) than that of C++. Just looking at variable declaration. Of course, for anything other than web development, C++ is a lot more powerful than PHP.
 
I've always wanted to learn C++ anyway just never really had an opportunity to do much with it on my own or for any previous employers. Same with Java for that matter. With my current employer there will be the opportunity to use Java which is actually one of the main reasons I decided to look into an actual course.

Although I wouldn't mind taking an actual two year degree course that will teach me the same languages at the local community college I find that if I really want to learn Java and start putting it to use in my current job, I need to learn it faster than what I would with the two year degree option. So then, after looking through the community colleges course offerings, I find the Web Programmer Certificate course. It teaches C++ first and then Java. Whether I will actually use C++ ever in my career or not, I consider having actual classes on it icing on the cake so to speak.

As for writing spaghetti code I don't believe I fall in to that category even though I'm self taught with PHP. Before my current job I was a Tandem systems programmer for about 10 years. I like really well structured code. In fact, I've had previous employers reprimand me because I would be tasked with just making a change to some code that had been in use at the company for years but it was all spaghetti code so I would completely rewrite half the program just to make it easier for me to figure out where my change needed to go. I was a contractor at one place where my supervisor there actually asked me to leave before my contract was finished because I rewrote three different programs just because they were littered with things like GOTO statements (this is in COBOL by the way). One of the programs I rewrote I actually ended up fixing a long standing bug but they didn't care about that.

I will admit that some people that are self taught tend to go with spaghetti code because that's the way that one of the websites I maintain at my present job is. The guy that wrote it didn't even really want to be doing it but they needed the website and tasked him to do it. So he taught himself just enough to write the website and that was it. Whenever I make changes to this website I try to break things out into functions and what not. I haven't quite fully learned the object oriented side of PHP yet but I'm working on it.


Xenarcy, I'm not exactly sure how to take the statement you made about having the passion required to never work a day in my life. So I'll take it as a joke!
 
Paithar said:
Xenarcy, I'm not exactly sure how to take the statement you made about having the passion required to never work a day in my life. So I'll take it as a joke!


My apologies for that misunderstanding. What I meant by that was it sounds like you are passionate enough about the topic that work will never feel like work. Work will be fun.
 
If you're passionate, then it's exciting. And if it's exciting enough, it ain't work.
 
mikeblas said:
Not to be "overly blunt", but the "languages on your resume" don't mean anything. Your ability, as a developer, to solve problems using tools in the abstract is what matters most.

You want to hire a mechanic who really knows cars. Maybe he's worked at the Baja 1000 and the 24 Hours of Daytona, and done some consulting with Porsche to solve a fuel delivery problem in the new 998 GT-1. That's the kind of thing I'd want to see, anyway.

I don't want to hire a mechanic who says "I know how to use screw drivers, and I specialize in SnapOn screw drivers!"

If you interview with me and your resume says that you know C++, I'm going to ask you to solve a tricky problem in C++. You should know C++ as well as you know your native spoken language; you should be focused on the tricky problem.

I disagree. I've been a php/mysql/html/flash developer for years(mostly php/mysql) and most applications and projects I get do not require complex or tricky problems.
I'm be more interested in them knowing basic mySQL queries in PHP and some of the advanced onces(right joins, inner joins, left joins) and I'd ask them to design a simple layout for me in HTML. I'd also like to see that they know some basic PHP functions and how to use them like string parsing and stuff. To me, your actualy ability to program everyday applications far outweights your theoretical knowledge of computer science.


BTW: I haven't really seen much of a point to OO php. Functions are nice though.
 
Tricky problems aren't about a theoretical knowledge of computer science.
 
Archbob said:
I disagree. I've been a php/mysql/html/flash developer for years(mostly php/mysql) and most applications and projects I get do not require complex or tricky problems.
I'm be more interested in them knowing basic mySQL queries in PHP and some of the advanced onces(right joins, inner joins, left joins) and I'd ask them to design a simple layout for me in HTML. I'd also like to see that they know some basic PHP functions and how to use them like string parsing and stuff. To me, your actualy ability to program everyday applications far outweights your theoretical knowledge of computer science.


BTW: I haven't really seen much of a point to OO php. Functions are nice though.

If you are a web designer or webmaster sure. But I think we are talking about the programming/engineering side of things.
 
I have a day job at a software development company and so does my dad(different companies). There are not that many 'tricky' problems. For me is basic database access stuff with a specialized database system used by health care and know some ways to format and display data. For my dad, its mainly basic and advanced java functions.

We hardly use any of that stuff taught in CS classes in college. I've hardly ever had to work with search or sorting algorithems. You just need a firm understanding of the languages your programming in. You don't need to be that great in complex things like tree transveral, searching, sorting, etc.

In a practical software development job(unless your doing game engine programming or something), is basic language functions. Your ability to program basic everyday applications far outweighs your knowledge of algorithems and things you learned in college. Those really aren't that useful.
 
I don't think I'd classify tree traversal as "complex". I think we're about to talk about the difference between a programmer and a software engineer.
 
I can't comment about C++ in web development - I'm not a web developer. But I say get the certificate even if it's just to improve your chances with employers. Having it can't hurt.

Besides, you'll learn some new things along the way. Even if you never use C++ again in your career, just having a broader knowledge base can help. There have been several times I've been trying to solve a problem in one language and I found the solution by thinking about how I'd solve it in another.


Archbob said:
There are not that many 'tricky' problems.
Maybe not at your job. But don't think that means others don't have interesting, sticky, fun problems to solve. I'd get bored and quit my job if it wasn't challenging.
 
Archbob said:
We hardly use any of that stuff taught in CS classes in college. I've hardly ever had to work with search or sorting algorithems. You just need a firm understanding of the languages your programming in. You don't need to be that great in complex things like tree transveral, searching, sorting, etc.

I spent about 5 years doing various PHP related web development as both a contractor and a salaried developer. Many of the people I worked with had a very similar opinion to yours. They never "needed" tree traversal, or search or a custom sort or anything like that. But when I went back to troubleshoot an issue, or add a new feature, and re-implemented their 300 lines of mess, into a couple of functions and a nice tree, or a prioritized sort, or even a more performant search, I was always glad to know "the complex things". You can absolutely "get by" without knowing them, but man did it make THEIR job harder.
 
I know most of those things, but generally, I've never actually had to use them. Because in reality, you don't ue them 99% of the time. Knowing that stuff does not make my job easier.

I find most of the things other people consider "fun and interesting" problems are mostly trivial things that can be solved in about an hour. Not the research-based problems that are actually hard. Most of the times, these "problems" don't require complex algorithems or anything, just a broad knowledge of the language and how to use the correct functions in the right places.
 
Archbob said:
I know most of those things, but generally, I've never actually had to use them. Because in reality, you don't ue them 99% of the time. Knowing that stuff does not make my job easier.

I find most of the things other people consider "fun and interesting" problems are mostly trivial things that can be solved in about an hour. Not the research-based problems that are actually hard. Most of the times, these "problems" don't require complex algorithems or anything, just a broad knowledge of the language and how to use the correct functions in the right places.

You've already said you don't like OO so we know you don't follow MVC or any other popular design pattern.

So what happens when you want to upgrade that code base?
How do you grow with your client?
How do you change presentation tiers? How do you change data tiers?
Do you force them to start all over from scratch or do you add on to the heap of "correct functions in the right places"?
 
I said I don't really bother with OO in php. In other languages, I fully embrace OO. With the database design element in PHP, I just haven't seen the value of using classes over functions. That and the fact that most hosts still run PHP4 and not PHP5. Personally I'm waiting for 6 to come out.

As long as you design your function, you can just expand them in PHP. Now in java and C++, its really not possible to do that, but in most cases of web development in PHP, functions suffice.

Besides, using OO doesn't involve knowing any complex algorithems or anything, OO is just a basic part of the language your familiar. Programming OO isn't any different from programming other code. Your just putting it inside classes, the basic operations are the same and there's really no more complexity involved. Sure, you have to think about modular and class design, but there no complex algorithems and searches involved most of the time.

By the ways, there's no point in writing most searches and sorts, they are already there in some library or class, you just have to know how to use them. When you have to use them(which is not very often), you don't need to know it inside and out, you just need a basic understand enough to modify them to suit your needs.


I've programmed in C++, java, and some C# and other OO languages before, its not that different from non-OO that much. I still do some development with OO, its really not all that hard.

That being said, my main day job is programming this langauge called M where classes don't exist. Its a really ancient fortran-like language and I don't personally like. You want to see hard-to-read code, there's no way around it in a language like this. But it works faster and better than any high-level language and SQL database.

Just a side note: In web development, I'd say knowing regular expressions and different ways to splice and piece together strings in probably more important than knowing how to solve other "tricky" problems.
 
Thanks for all the replies everyone. I appreciate them. Just as soon as I figure out how to finance it I'm going to sign up for that certificate program. I've always wanted to learn both C++ and Java anyway and I agree that it doesn't hurt me to know a language that I may never really use.

I also agree that if you enjoy your job then it's not really work. I tell my oldest boy that a career is something you enjoy doing and if you enjoy it then it doesn't really seem like work but a job is something you do just to get by and pay the bills. I'm trying to get my son interested in thinking about a career rather than just a job so that he can get by from day to day.
 
mikeblas said:
Not to be "overly blunt", but the "languages on your resume" don't mean anything. Your ability, as a developer, to solve problems using tools in the abstract is what matters most.

You want to hire a mechanic who really knows cars. Maybe he's worked at the Baja 1000 and the 24 Hours of Daytona, and done some consulting with Porsche to solve a fuel delivery problem in the new 998 GT-1. That's the kind of thing I'd want to see, anyway.

While I wish there were more hiring managers out there with this attitude, you're sadly in the minority. I just went through the whole job hunting game, and it's all about keywords these days. Most places wont even give your resume a second look if you don't have the exact languages and libraries they're looking for.
 
Paithar said:
Thanks for all the replies everyone. I appreciate them. Just as soon as I figure out how to finance it I'm going to sign up for that certificate program. I've always wanted to learn both C++ and Java anyway and I agree that it doesn't hurt me to know a language that I may never really use.

I also agree that if you enjoy your job then it's not really work. I tell my oldest boy that a career is something you enjoy doing and if you enjoy it then it doesn't really seem like work but a job is something you do just to get by and pay the bills. I'm trying to get my son interested in thinking about a career rather than just a job so that he can get by from day to day.


My dad did it the cheapest way, bought visual studio(you can pull off an academic edition somehow), bought some books. studied by himself and got a vB certification. That was 6-7 years ago, now he's a senior software engineer at Southwestern Bell. You don't have to take classes, just code, study, and pass exams.

I've done PHP/MYSQL development(as well as other language development) for years, haven't bothered with the Zend cert and did pretty well as a freelancer before getting my current job.

Languages are more or less portable, if you know one language, you can code in just about any other because most of the operations work the same. After 1+1 is 2 whether your coding C++ or PHP.
 
CSIXTY4 said:
While I wish there were more hiring managers out there with this attitude, you're sadly in the minority. I just went through the whole job hunting game, and it's all about keywords these days. Most places wont even give your resume a second look if you don't have the exact languages and libraries they're looking for.
Sounds like you're interviewing at the wrong places.
 
Back
Top