Ahhhhhh
-
Rohde wrote:
looking forward to see how they put threading in there for next C++ coming in 2010.
Intel uses OpenMP, so you already can. One of the difficulties is that you need to LEARN threading techniques. The compiler can't do it all for you. One of my team often said, "just put in a mutex that will fix it." I refused and got the reputation of hating mutexes. I do, in someways, properly written parallel code doesn't need them. I even have parallel versions of some STL containers. Parallel is first and foremost a thought process, not a compiler, or a tool. It's no different than learning C# or C++, it is just hated because the mistakes are almost always memory corruption and coredumps. It's an unforgiving taskmaster, but one very worthwhile learning from.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
Jeffry J. Brickley wrote:
Parallel is first and foremost a thought process, not a compiler, or a tool.
I totally agree. Somehow people think that multithreading will solve their performance issues. Without really understanding what's going on, people will produce bad designs - if designs are made at all - and that will result in a coding nightmare. Not even mentioning that this will even hurt performance. Parallel is more a design concept than a programming thing.
Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
-
I love it when circumstances swing in my favor. I'm coding in unmanaged C++ again, and I feel... liberated. :) And CP wins because I even came up with another article. :)
"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/2001Welcome back. :)
Anna :rose: Linting the day away :cool: Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"
-
John Simmons / outlaw programmer wrote:
- I'm not afraid of a few pointers
But your client is..
John Simmons / outlaw programmer wrote:
- It's in my nature to go against the grain, spit into the wind, take the road less traveled, etc.
Do you advice us to do so too?? :omg:
L.W.C. Nirosh. Colombo, Sri Lanka.
Nirosh wrote:
John Simmons / outlaw programmer wrote: 2) I'm not afraid of a few pointers But your client is..
Shya - right. They think a pointer is one of those laser thingies.
Nirosh wrote:
John Simmons / outlaw programmer wrote: 4) It's in my nature to go against the grain, spit into the wind, take the road less traveled, etc. Do you advice us to do so too??
Of course.
"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 -
Nirosh wrote:
John Simmons / outlaw programmer wrote: 2) I'm not afraid of a few pointers But your client is..
Shya - right. They think a pointer is one of those laser thingies.
Nirosh wrote:
John Simmons / outlaw programmer wrote: 4) It's in my nature to go against the grain, spit into the wind, take the road less traveled, etc. Do you advice us to do so too??
Of course.
"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:
Of course.
Those who have changed the world had always done so.. but according to probability, you should have experienced more failures/ troubles than successes/ comforts by doing so..
L.W.C. Nirosh. Colombo, Sri Lanka.
-
Nirosh wrote:
But your client is..
Not really. Most clients don't know anything about computers.
Jeremy Falcon A multithreaded, OpenGL-enabled application.[^]
-
Marc Clifton wrote:
And frankly, I don't miss header files either, though when I first started using C#, I thought it was disguisting how the class definition and code were the same thing.
Sounds like C# has a lot in common with classic VB. ;P
Jeremy Falcon A multithreaded, OpenGL-enabled application.[^]
Jeremy Falcon wrote:
Sounds like C# has a lot in common with classic VB.
Yeah, it's basically the same thing except for the curly braces vs. "procedure" or "function", IIRC. Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith -
Rohde wrote:
the STL is great but minimal at best
Thought I'd take a shot at answering you. :) I think it depends on what you're doing. (No wait, I KNOW it depends on what you're doing). I did an app that depended heavily on STL, I couldn't imagine doing it with a language that didn't support true and full STL capabilities. And it needed to be heavily optimized--not saying the same code wouldn't run as well in C#, but damn, it was nice being able to actually see the assembly output and be able to play with register keywords and other optimizations. That said, I do NOT miss the memory leak debugging nor the super-consciousness of always having to think "now, where am I deleting that memory allocation?". And frankly, I don't miss header files either, though when I first started using C#, I thought it was disguisting how the class definition and code were the same thing.
Rohde wrote:
because of the huge API you get for free
The API has never been a selling point for me. I hated MFC, I tolerate the .NET framework, and I basically write wrappers as much as possible for both, because they're so lame as it is. OK, not entirely, there's some great things, but they seem to be the more esoteric things for me. Oh wait, yeah, it depends on what you're doing. :) Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh SmithMarc Clifton wrote:
That said, I do NOT miss the memory leak debugging nor the super-consciousness of always having to think "now, where am I deleting that memory allocation?".
You still have to track all the other resources to make sure you call
Dispose
where necessary. You also need to ensure you're not accidentally keeping objects rooted - an application with a lot of static data members can be really bad for this. True, C# offers theusing
block, but C++'s destructors, for stack-based objects, are actually far more effective. Memory leaks actually have little effect on a running Windows program - ultimately you'll run out of virtual address space and allocations will fail; the speed that this occurs depends on how much memory is leaked and how often. By definition, you don't reference a memory leak, so the page containing the leaked memory will eventually be swapped out. The system might need to expand its page file to support this. Resource leaks, on the other hand, normally mean that you can't reopen the resource and you'll get errors from this. Now, finalizers do exist in the .NET Framework, and they will free resources if the garbage collector determines that the objects owning those resources are no longer in use. But you can't predict when this will happen, so you can get errors at some times but not others. This makes it very hard to debug. On top of that, the finalizers only run on a single thread, which is not one of the program threads, so you always have a potential threading problem if an object has affinity with the thread that created it.Stability. What an interesting concept. -- Chris Maunder
-
Jeffry J. Brickley wrote:
welcome back to the fold!
Yeah, I guess we can't pick on John anymore when he's not looking. :rolleyes:
Jeremy Falcon A multithreaded, OpenGL-enabled application.[^]
I'm always watching. :)
"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 -
John Simmons / outlaw programmer wrote:
Of course.
Those who have changed the world had always done so.. but according to probability, you should have experienced more failures/ troubles than successes/ comforts by doing so..
L.W.C. Nirosh. Colombo, Sri Lanka.
I never fail at anything. Sometimes, things don't go exactly as planned, but gaining experience cannot be considered a failure.
"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 -
Jeffry J. Brickley wrote:
I even have parallel versions of some STL containers
Have you got parallel versions of the STL algorithms as well, or does that fall out of your parallelized containers?
Stuart Dootson wrote:
Have you got parallel versions of the STL algorithms as well, or does that fall out of your parallelized containers?
I did an OpenMP version of a couple, but talking my boss into getting the Intel Parallel tools for others. It includes a lot of parallel assisting algorithms. I can't do it all, so I think the best method is to get Intel to help them and me as well through the parallel algorithm tools.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Hey, I'd rather be working for the Evil Empire than for this smelly hippy[^]. ;)
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Have you smelled him? *imagining someone verifying that the hippy is in fact smelly* Hmmm... too much time on yer hands if your going around smelling hippies. Or did I misunderstand and you were just being derogatory with another useless prejudiced stereotype?
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
-
John Simmons / outlaw programmer wrote:
Of course.
Those who have changed the world had always done so.. but according to probability, you should have experienced more failures/ troubles than successes/ comforts by doing so..
L.W.C. Nirosh. Colombo, Sri Lanka.
You learn and grow more from failure than success. Success can actually be a hinderence to progressing.
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
-
I love it when circumstances swing in my favor. I'm coding in unmanaged C++ again, and I feel... liberated. :) And CP wins because I even came up with another article. :)
"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 -
Have you smelled him? *imagining someone verifying that the hippy is in fact smelly* Hmmm... too much time on yer hands if your going around smelling hippies. Or did I misunderstand and you were just being derogatory with another useless prejudiced stereotype?
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
I guess you didn't see the wink smiley. :rolleyes:
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
I never fail at anything. Sometimes, things don't go exactly as planned, but gaining experience cannot be considered a failure.
"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:
I never fail at anything.
Smart.. Ar! also a better way to look at it
John Simmons / outlaw programmer wrote:
Sometimes,
Yes yes
John Simmons / outlaw programmer wrote:
things don't go exactly as planned
That's failure, right?
John Simmons / outlaw programmer wrote:
but gaining experience cannot be considered a failure.
TRUE, as long as you work for you :-D, but FALSE, when you work for a employer who depend on it's customers.. IMHO
L.W.C. Nirosh. Colombo, Sri Lanka.
-
You learn and grow more from failure than success. Success can actually be a hinderence to progressing.
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
-
I guess you didn't see the wink smiley. :rolleyes:
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Damn that smiley!!!! He gets me again. ;) No worries... Jesus was a smelly hippy.
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
-
Damn that smiley!!!! He gets me again. ;) No worries... Jesus was a smelly hippy.
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
Chris S Kaiser wrote:
No worries... Jesus was a smelly hippy.
:laugh: Good point.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Jeffry J. Brickley wrote:
Parallel is first and foremost a thought process, not a compiler, or a tool.
I totally agree. Somehow people think that multithreading will solve their performance issues. Without really understanding what's going on, people will produce bad designs - if designs are made at all - and that will result in a coding nightmare. Not even mentioning that this will even hurt performance. Parallel is more a design concept than a programming thing.
Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
Yeah you're right about that. Half the time multi-threads will make performance worse. One thing it's good for is to keep a user interface alive while you do some processing. I haven't seen too many other places to use it, but then I'm usually doing pretty basic stuff. I'd kill for an interesting, innovative project some days.
"Quality Software since 1983!"
http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps! -
Jeremy Falcon wrote:
Not really. Most clients don't know anything about computers.
TRUE, But most of their technical guys (hired) do know a bit :laugh:
L.W.C. Nirosh. Colombo, Sri Lanka.
Not so sure about that. A web programmer for one of my members called me begging to know the IP address of our web server... it sounded pretty urgent. I might call him back on monday :)
"Quality Software since 1983!"
http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!