C++ again :-) (Does C# make you dumber?)
-
Just got a 6-month contract with a client. I'll spend the time at their location coding C++... It's good to get my hands on a C++ compiler again, I've spent way too much time in C#. I know it's not popular to say, but I still think C# makes programmers dumber and more lazy, not to mention that it's way more boring than C++ ;) - Anders My new photo website[^]
Anders Molin wrote:
Just got a 6-month contract with a client.
Congrats! Different client, I take it?
Anders Molin wrote:
but I still think C# makes programmers dumber and more lazy
Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):
public bool Foo(string a, string b)
{
bool ret = false;
if (Bar(a) == Fizbin(b))
{
ret = true;
}
return ret;
}Wow. All that to say:
public bool Foo(string a, string b)
{
return Bar(a) == Fizbin(b);
}Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006
-
Anders Molin wrote:
Just got a 6-month contract with a client.
Congrats! Different client, I take it?
Anders Molin wrote:
but I still think C# makes programmers dumber and more lazy
Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):
public bool Foo(string a, string b)
{
bool ret = false;
if (Bar(a) == Fizbin(b))
{
ret = true;
}
return ret;
}Wow. All that to say:
public bool Foo(string a, string b)
{
return Bar(a) == Fizbin(b);
}Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006
Marc Clifton wrote:
public bool Foo(string a, string b) { bool ret = false; if (Bar(a) == Fizbin(b)) { ret = true; } return ret; }
I see this all the time. I am constantly fixing things like this all day long. I agree it does not matter what language people are using, a bad developer is always going to be a bad developer.
-
Anders Molin wrote:
Just got a 6-month contract with a client.
Congrats! Different client, I take it?
Anders Molin wrote:
but I still think C# makes programmers dumber and more lazy
Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):
public bool Foo(string a, string b)
{
bool ret = false;
if (Bar(a) == Fizbin(b))
{
ret = true;
}
return ret;
}Wow. All that to say:
public bool Foo(string a, string b)
{
return Bar(a) == Fizbin(b);
}Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006
Well said, scored a 5. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
-
Anders Molin wrote:
Just got a 6-month contract with a client.
Congrats! Different client, I take it?
Anders Molin wrote:
but I still think C# makes programmers dumber and more lazy
Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):
public bool Foo(string a, string b)
{
bool ret = false;
if (Bar(a) == Fizbin(b))
{
ret = true;
}
return ret;
}Wow. All that to say:
public bool Foo(string a, string b)
{
return Bar(a) == Fizbin(b);
}Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006
Marc Clifton wrote:
You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically.
Actually, this is a perfect example where C++ is easier than C#. Take a look at RAII[^] idiom. All you need to do is to create a local object that takes a lock and releases it automatically when it goes out of scope. Even better - with C++ you can use the same idiom for any resource, not just thread locks.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
My day job was ASP.NET for about the last 4 years, but mostly on one project, so no move to 2.0. I've heard some things about 2.0 that make me think it's a step backwards, such as the recommendation to put code in the aspx file, instead of code behind. Is that true ? I'd love to play with the new features, but I wouldn't say there was anything *broken* about 1.1.
ToddHileHoffer wrote:
On the C++, I've never used it at work and can't imagine having to. It would simply be over kill for business applications.
Sadly, I guess that is true nowadays. I remember when it was the only game in town. I still like it more than C#, a lot of the time. C# has lots of cool stuff in it, but C++ just feels right to me. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Christian Graus wrote:
My day job was ASP.NET for about the last 4 years, but mostly on one project, so no move to 2.0. I've heard some things about 2.0 that make me think it's a step backwards, such as the recommendation to put code in the aspx file, instead of code behind. Is that true ? I'd love to play with the new features, but I wouldn't say there was anything *broken* about 1.1.
1.1 wasn't terrible but the designer messes up your html, I consider that to be broken. As far as code in the Aspx, that is totally false. Infact you can now use the ObjectDataSource to bind data from a separate class(that returns a datatable or dataset) to your datagrid without any code in your page. 2.0 automatically creates an app_code folder and it is recommended to put your code there. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06 -- modified at 8:34 Tuesday 13th June, 2006
-
Well said, scored a 5. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
ToddHileHoffer wrote:
Well said, scored a 5.
Hmmm. Someone rather disagrees! :-D Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
-
Marc Clifton wrote:
You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically.
Actually, this is a perfect example where C++ is easier than C#. Take a look at RAII[^] idiom. All you need to do is to create a local object that takes a lock and releases it automatically when it goes out of scope. Even better - with C++ you can use the same idiom for any resource, not just thread locks.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
Nemanja Trifunovic wrote:
Actually, this is a perfect example where C++ is easier than C#.
That's a good point, and shows the subtle (or not so subtle) differences in language capability. Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
-
I don't now about the rest of you, but I spend significantly more time on new code than I do going back to fix bugs in old code. Maybe Mr. Corinna has found a comfort zone in C# that was unattainable for him in C++. ;P
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
Maybe Mr. Corinna has found a comfort zone in C# that was unattainable for him in C++.
A lovely one, I might add. :-O š Cheers, Vikram.
I don't know and you don't either. Militant Agnostic
-
ToddHileHoffer wrote:
Well said, scored a 5.
Hmmm. Someone rather disagrees! :-D Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
Marc Clifton wrote:
Hmmm. Someone rather disagrees!
Sorry, it was me :-O Your post has this inaccuracy for the lock statement, and I didn't want it to be red to attract too much attention, but instead of voting 3 I accidentally voted 1 and with this weighted votes it went too low.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
Marc Clifton wrote:
Hmmm. Someone rather disagrees!
Sorry, it was me :-O Your post has this inaccuracy for the lock statement, and I didn't want it to be red to attract too much attention, but instead of voting 3 I accidentally voted 1 and with this weighted votes it went too low.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
Nemanja Trifunovic wrote:
but instead of voting 3 I accidentally voted 1 and with this weighted votes it went too low.
:laugh: No problemo! :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
-
Just got a 6-month contract with a client. I'll spend the time at their location coding C++... It's good to get my hands on a C++ compiler again, I've spent way too much time in C#. I know it's not popular to say, but I still think C# makes programmers dumber and more lazy, not to mention that it's way more boring than C++ ;) - Anders My new photo website[^]
First I hated your post. But after much reflection I think you are right. Of course I take a greater pride in it because, as I always said, the really good programer work hard at being lazy! So, shamelessly I agree: I am much lazier than you are :laugh:
-
norm.net wrote:
maybe your right, .net is a waste of time and we should stick with VB6
And when did I say that? All I said is that you should have switched from MFC/ATL/whatever to VB in mid 1990's. You have obviously used C++ for wrong purposes.
norm.net wrote:
VB6 (not that I have or would ever use it
And yet you have a pretty strong opinion on it :)
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
Nemanja Trifunovic wrote:
ll I said is that you should have switched from MFC/ATL/whatever to VB in mid 1990's. You have obviously used C++ for wrong purposes.
Yeah maybe I'll tell the company I worked for that the spreadsheet taxation software (spreadsheet application, similar to excel) written entire from the ground up in C++, should of been done in VB6 - ha:laugh: ha:laugh: I don't think so. Maybe the baggage systems for the airports should of been VB6 - nope not quite:omg:. Ah maybe the flight information systems should be VB6 - dont think so:~ . I use have used C++ for networking/services/serial comms, applications that demand reliable fast software, software that VB6 fails to give. So if C++ is not for these applications then I give in, software engineer isn't for me. BTW: if you're not using VB6, then maybe you should be have using it during the 90's ;P Cools, what ever VB sucks, C++ is cool, but C# rocks - my opinion :rose: Never send a human to do a machine's job Agent Smith
-
I don't now about the rest of you, but I spend significantly more time on new code than I do going back to fix bugs in old code. Maybe Mr. Corinna has found a comfort zone in C# that was unattainable for him in C++. ;P
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Anders Molin wrote:
Does C# make you dum
No it makes me more productive on every aspect of windows programming. Never send a human to do a machine's job Agent Smith
-
Nemanja Trifunovic wrote:
ll I said is that you should have switched from MFC/ATL/whatever to VB in mid 1990's. You have obviously used C++ for wrong purposes.
Yeah maybe I'll tell the company I worked for that the spreadsheet taxation software (spreadsheet application, similar to excel) written entire from the ground up in C++, should of been done in VB6 - ha:laugh: ha:laugh: I don't think so. Maybe the baggage systems for the airports should of been VB6 - nope not quite:omg:. Ah maybe the flight information systems should be VB6 - dont think so:~ . I use have used C++ for networking/services/serial comms, applications that demand reliable fast software, software that VB6 fails to give. So if C++ is not for these applications then I give in, software engineer isn't for me. BTW: if you're not using VB6, then maybe you should be have using it during the 90's ;P Cools, what ever VB sucks, C++ is cool, but C# rocks - my opinion :rose: Never send a human to do a machine's job Agent Smith
norm.net wrote:
Yeah maybe I'll tell the company I worked for that the spreadsheet taxation software (spreadsheet application, similar to excel) written entire from the ground up in C++, should of been done in VB6 - ha ha I don't think so. Maybe the baggage systems for the airports should of been VB6 - nope not quite. Ah maybe the flight information systems should be VB6 - dont think so
What I am trying to say is: in general, C#/.NET is a replacement for VB6, not C++. Most "business" applications that were done with C++ in 90's should have been done with some RAD tool, like VB or even better Delphi instead. If you need high performance/real-time/whatever, .NET is not the solution, just like VB wasn't the solution in 1990's.
norm.net wrote:
if you're not using VB6, then maybe you should be have using it during the 90's
I was using VB 5/6 in 90's on a couple of projects (boring financial desktop forms stuff with lots of SQL and Crystal Reports), and for that matter right now I am using VBScript to automate creating .dot files for MS Word. Nothing wrong with it. However, for anything "long lasting", especially when portability and/or performance is important, I use C++ today as I did then.
norm.net wrote:
Cools, what ever VB sucks, C++ is cool, but C# rocks - my opinion
VB rocks for some purposes. C# rocks for some purposes. C++ rocks for some purposes.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
I don't now about the rest of you, but I spend significantly more time on new code than I do going back to fix bugs in old code. Maybe Mr. Corinna has found a comfort zone in C# that was unattainable for him in C++. ;P
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Just got a 6-month contract with a client. I'll spend the time at their location coding C++... It's good to get my hands on a C++ compiler again, I've spent way too much time in C#. I know it's not popular to say, but I still think C# makes programmers dumber and more lazy, not to mention that it's way more boring than C++ ;) - Anders My new photo website[^]
Like having central heating makes us all dumber and lazier than those with only wood stoves who have to cut their own firewood and keep the stove going? Congrats on finding a backwater place to excercise your increasingly meaningless knowledge of pointers and manual memory management. ;P
-
Anders Molin wrote:
Just got a 6-month contract with a client.
Congrats! Different client, I take it?
Anders Molin wrote:
but I still think C# makes programmers dumber and more lazy
Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):
public bool Foo(string a, string b)
{
bool ret = false;
if (Bar(a) == Fizbin(b))
{
ret = true;
}
return ret;
}Wow. All that to say:
public bool Foo(string a, string b)
{
return Bar(a) == Fizbin(b);
}Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006
Sometimes stuff like that can creep into my code if I forget to remove it. The reason is when debugging you need to see the value as you're stepping through a method before it's returned. Of course it's all much more complex stuff than that but same idea. I wonder if the compiler optimizes that stuff out?
-
norm.net wrote:
Yeah maybe I'll tell the company I worked for that the spreadsheet taxation software (spreadsheet application, similar to excel) written entire from the ground up in C++, should of been done in VB6 - ha ha I don't think so. Maybe the baggage systems for the airports should of been VB6 - nope not quite. Ah maybe the flight information systems should be VB6 - dont think so
What I am trying to say is: in general, C#/.NET is a replacement for VB6, not C++. Most "business" applications that were done with C++ in 90's should have been done with some RAD tool, like VB or even better Delphi instead. If you need high performance/real-time/whatever, .NET is not the solution, just like VB wasn't the solution in 1990's.
norm.net wrote:
if you're not using VB6, then maybe you should be have using it during the 90's
I was using VB 5/6 in 90's on a couple of projects (boring financial desktop forms stuff with lots of SQL and Crystal Reports), and for that matter right now I am using VBScript to automate creating .dot files for MS Word. Nothing wrong with it. However, for anything "long lasting", especially when portability and/or performance is important, I use C++ today as I did then.
norm.net wrote:
Cools, what ever VB sucks, C++ is cool, but C# rocks - my opinion
VB rocks for some purposes. C# rocks for some purposes. C++ rocks for some purposes.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
norm.net wrote:
on every aspect of windows programming
Oh yeah? Write one of the following in C#: Service, device driver, Shell extension, SNMP extension DLL, ISAPI extension, the list goes on. Any software that integrates with the operating system (at least under XP), by definition, can not be implemented in C#, or any other managed language for that matter. The situation may be different under Vista, as MS is moving toward managed interfaces for more OS functionality. C# is not the universal hammer for every nail in the Windows programming world.
Software Zen:
delete this;
Gary R. Wheeler wrote:
ISAPI extension
I guess the big question here is "why would you want to"? With ASP.NET, I have no need of ISAPI extentions. Use to use them to use C++ for websites, now programming is direct. Rocky <>< Latest Post: Visual Studio 2005 Standard, whats missing? Blog: www.RockyMoore.com/TheCoder/[^]