Click here to Skip to main content

peterchen - Professional Profile

Summary

35,345
Author
2,776
Authority
94,948
Debator
37
Editor
204
Enquirer
4,040
Organiser
4,690
Participant
Peter is tired of being called "Mr. Chen", even so certain individuals insist on it. No, he's not chinese.
 
Peter has seen lots of boxes you youngsters wouldn't even accept as calculators. He is proud of having visited the insides of a 16 Bit Machine.
 
In his spare time he ponders new ways of turning groceries into biohazards, or tries to coax South American officials to add some stamps to his passport.
 
Beyond these trivialities Peter works for Klippel[^], a small german company that wants to make mankind happier by selling them novel loudspeaker measurement equipment.
 

Where are you from?[^]



Please, if you are using one of my articles for anything, just leave me a comment. Seeing that this stuff is actually useful to someone is what keeps me posting and updating them.
Should you happen to not like it, tell me, too
Member since Thursday, July 6, 2000 (12 years, 10 months)
  • 29 Sep 2004: MFC/C++ Aug 2004

Contributions

Articles 20 (Legend)
Tech Blogs 0
Messages 26,113 (Master)
Q&A Questions 3
Q&A Answers 8
Tips/Tricks 1
Comments 3

Links

Groups

Below is the list of groups in which the member is participating


Soap Box 1.0
United States United States
Member
Social Group
members

This _private_ forum is set up to be a place where political and social issues, including American politics and global warming, can be discussed in a reasonably civil manner. Anyone who has been an active member* of Code Project for six months is welcome to apply for membership but this forum does not tolerate trolling posts, or posters who wish to be disagreeable. Those who choose to become uncivil, insulting, or childish will be warned and, for repeated violations, removed from membership.
 
* That means that you have posted regularly or had at least one article published.

CodeProject Insiders
United States United States
Member
Collaborative Group
members

No Biography provided

Reputation

For more information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege, and the given member types also gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilverAdmin
Store personal files in your account areaplatinumplatinumSitebuilder, Subeditor, Supporter, Editor, Staff
Have live hyperlinks in your biographybronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Edit a Question in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Edit an Answer in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Delete a Question in Q&AYesSubeditor, Protector, Editor, Admin
Delete an Answer in Q&AYesSubeditor, Protector, Editor, Admin
Report an Articlesilversilversilversilver
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubeditor, Mentor, Protector, Editor, Staff, Admin
Edit other members' articlesSubeditor, Protector, Editor, Admin
Create an article without requiring moderationplatinumSubeditor, Mentor, Protector, Editor, Staff, Admin
Report a forum messagesilversilverbronzeProtector, Editor, Admin
Create a new tagsilversilversilversilverAdmin
Modify a tagsilversilversilversilverAdmin

Actions with a green tick can be performed by this member.


 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 18 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid

You must Sign In to use this message board.
Search this forum  
GeneralCPQuote: groupthink Pin
Saturday, April 14, 2007 11:03 AM by peterchen
The Internet, even more than the media, kills intelligent discussion/thought, by creating enclaves where people who are like minded can engage in massive examples of groupthink, where the most stupid things become established fact in the minds of participants, simply because they choose to be around people who reaffirm what they want to believe.
 
Christian Graus
 
Clickety[^]
 


We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
My first real C# project | Linkify!|FoldWithUs! | sighist

GeneralRe: CPQuote: groupthink PinmemberRavel H. Joyce2 Oct '07 - 1:33 
GeneralRe: CPQuote: groupthink Pinmemberpeterchen2 Oct '07 - 9:52 
GeneralRe: CPQuote: groupthink PinmemberRavel H. Joyce2 Oct '07 - 17:23 
 
GeneralJust a test Pin
Saturday, January 14, 2006 1:22 PM by peterchen
She said "It would do you good to go out from time to time, and wake up somewhere else."
I said: "How can I kiss a girl I just met? I don't even know her!"
 


Some of us walk the memory lane, others plummet into them like into a rabbit hole
boost your code || Fold With Us! || sighist
 
GeneralGreat Multithreading article Pin
Saturday, May 21, 2005 10:35 PM by peterchen
http://www.iseran.com/Win32/CodeForSpeed/multithreading.html[^]
 
It is a bit dated (some of the information may be incorrect for 64-Bit systems), but a good read nonetheless
 

Pandoras Gift #44: Hope. The one that keeps you on suffering.
aber.. "Wie gesagt, der Scheiss is' Therapie"
boost your code || Fold With Us! || sighist | doxygen

 
GeneralMy inofficial CP FAQ Pin
Thursday, November 11, 2004 8:49 AM by peterchen
disclaimer: this is my own personal view on frequent questions about CP. They do not constitute an official statement on behalf of CodeProject, my Employer, or the Kirgisian governmet
 
Q: How does the voting work? I thought it is the average, but...
A: It is a weighted average. Votes by new members weight less than votes by contributors.
Membership levels range from bronze to platinum. a platinum vote has the same effect as 5 bronze votes.
 
Q: How about a CD/DVD with CodeProject articles?
A: It would certainly be nice to have an offline collection of articles to browse. However, there are a points against it
(1) Legal: unlike other sites, CodeProject leaves the copyright with the author, and allows code to be published under a wide variety of licences. This is nice, but also means collecting all articles on a CD is a legal mine field. At least each author would have to be contacted for written consent to agree with his articles being included.
(2) Up-to-date articles: "do you want your old, buggy articles floating around on the web?" You can update your articles on CP, but you can't on a CD.
(3) Money. Running a site with even a few full-time employees is expensive, Bandwidth being only a part of it. CP is paid for mostly by advertisement, and maybe you noticed that CP ads are always on topic, and never intrusive. CP needs people visiting the site.
(4) Community. CP would be a cold and barren place without the community. And the community needs people visiting CP.
 

 
to be continued...
 

we are here to help each other get through this thing, whatever it is Vonnegut jr.
Fold With Us! ||

GeneralQ: Why don't CPians joint to run (OpenSource) projects? Pinmemberpeterchen21 Nov '04 - 23:35 
GeneralDoes the article rating suck? [modified] Pinmemberpeterchen24 May '06 - 6:59 
GeneralUnder what licence code and articles are published on codeproject? Pinmemberpeterchen23 Jul '07 - 13:31 
The licence is chosen by the author of the article.
 
For authors that means they keep the full right to their work. Yay! They can republish it on another web site, sell it, put it into a book, no problem.
 
If you want to use code from the article, you(!) must(!) check the licence yourself. There should be one included in the download, or mentioned in the article, or at least in the message board.
 
If you can't find a licence, you should contact the author. If you post a question in the article's message board, the author gets notified, and can reply.
 
Sometimes, you can't find the author. With no licence, and no word from the author, you need to assume the worst: the copyright owner does not allow you to use or reproduce the code or other material. I know how bad this can be, but you are taking a definite risk here.
 
Authors: For bobs sake, add a licence to your article and your code! (and please don't slap a GPL on it because "it makes the code free to use")
 


We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
My first real C# project | Linkify!|FoldWithUs! | sighist

 
GeneralIntrinsic Interlocked functions Pin
Saturday, October 2, 2004 9:53 AM by peterchen
extern "C" _InterlockedIncrement(LPLONG lpAddend);
extern "C" _InterlockedDecrement(LPLONG lpAddend);
 
#pragma intrinsic(_InterlockedIncrement, _InterlockedDecrement)
 
Documented for VC7, works wiht VC6
 

we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist Fold With Us! || Agile Programming | doxygen

 
GeneralFold with us Pin
Tuesday, September 7, 2004 8:14 PM by peterchen
Folding at home - Distributed research for a Cure for Cancer.
Team Code Project[^]
Download[^] and install the client. Enter your team number: 11561 in the settings, and let it run. It eats unused CPU time, an internet connection to get new jobs from time to time, and if you let it run unattended your power bill will be a bit higher. Results of research go into public domain. It makes decent screen saver, too.
 
I don't believe we can make it a better world. Maybe the little extra on the power bill would be more effective donated directly. Maybe all of this effort is in vain for a bug, a lawyer or a more clever approach. I don't get ego fuzzies looking at the screen. "Fold faster than the other guys" is fun, but only for a while. My computer won't beep with a "peterchens completes 'Cure for Cancer'" messagebox - it takes much more than 600 shields. We won't make a drug and distribute it freely among everybody who is struck with the plague of the industrialized world. There's only so much we do, and "folding at home" is not more than reusing your grocery bags because the Amazonian woods are burning down.
 
Today, a friend of mine goes into hospital. The lump grew a quite bit in the last month, and now presses against her air tube. They say it's no problem, but they said it wouldn't grow half a year before, too. They'll slice her open, cut it out, close her, and life goes on. That's what she says. That's what she thinks. She doesn't take the liberty to think about other possibilities. I cannot do anything. I can't hold her hand. I can't count the instruments they take out, and compare to the number they put in. I can't even visit her while she recovers. I can't talk with her about my fear. I can't do anything.
 
I fold.
 

we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist || Agile Programming | doxygen

GeneralRe: Fold with us Pinmemberbrahmma27 Feb '07 - 21:22 
GeneralRe: Fold with us Pinmemberpeterchen28 Feb '07 - 10:34 
GeneralRe: Fold with us Pinmemberbrahmma6 Mar '07 - 21:35 
GeneralRe: Fold with us Pinmemberpeterchen7 Mar '07 - 10:01 
GeneralRe: Fold with us PinmemberMike Hankey17 Apr '08 - 13:27 
GeneralRe: Fold with us PinmemberNelek1 Jun '08 - 6:22 
GeneralRe: Fold with us Pinmemberpeterchen2 Jun '08 - 8:01 
 
GeneralHow to become a C++ Pro Pin
Tuesday, August 17, 2004 11:51 AM by peterchen

As response to a question how to learn C++ and become a "pro", "not only using DOS commands, but also MFC"

The following is a roadmap to "Mastering C++" - how I would teach it.
Some people might want to reorder the list which is fine with me - it all
depends on the teacher and the tools.

Chapter (I) Learning the language

  1. basic language: type system, control structures, functions, scope.
  2. basic concepts: programming style, structuring your program using
    functions, the difference between contract, declaration and implementation
  3. language: pointers.

    pointer arithmetic, referencing, dereferencing, pointers vs. references,
    pointer to pointer, adress of pointer, allocating raw memory, etc.

    If you didn't succeed with (3): learn pointers

    If you don't get it the third time, give up. Really. I am serious.*
  4. debugging. assert, trace, using a debugger, distrusting yourself,
    acquiring some programming style.
  5. language: Function overloading.
  6. language: classes. Member functions, constructor, destructor
  7. concepts: encapsulation, simple object design, encapsulating state
  8. lanuage: learn exceptions **
  9. repeat concepts: good programming style, contract vs. declaration
    vs. implementation
  10. concepts: inheritance, polymorphy
  11. concepts: "enhanced" object design with the new knowledge
    (exceptions and polymorphy)
  12. language: some refined points

    const-correctness, default constructor, copy constructor vs. assignment
    operator, how to make a class behave like a built in type (but skip operator
    overloading)
  13. language: templates: function templates, class templates, template
    specialization,
  14. get an introduction on the STL (standard template library, which
    makes the biggest part of the C++ run time library)
  15. language: ok, now, just as sugar, operator overloading, and how to
    make types truly act like built-ins
  16. libraries: refine your knowledge on the STL

     

NOW you are ready to leave the console window

 

Chapter (II) ...but also MFC

  1. Windows API basics: This helps understanding some of the
    mumbo-jumbo and awkwardnesses in the MFC much better

    Event Driven Programming, Windows, Window Handles, Window Messages

    (you can omit *creating* windows here, since this is a painful task made much
    easier by frameworks - but the rest is important to understand and makes
    working with the MFC easier).

    GDI, standard controls etc.
  2. Do the MFC "Scribble" tutorial, just following the main path (up to
    "printing" or so). Don't try to understand everything, just get a feeling for
    the "flow".
  3. Do the "Scribble" tutorial again, this time exploring the background
    explanations etc.

     

Chapter (II) Become a Pro

  1. Notice that, once you are here, you are the last remaining person on earth
    doing MFC Wink | ;)
  2. Learn enhanced concepts: Exception Safety, Patterns etc. and all the fine
    parts I have forgotten above
  3. Learn "Industry Power" stuff: Automated Tests, Version Control,
    Finalizing, and everything that belongs to running a larger project.
 

 

<b>Warning:</b> this course is a pain. In the ass, in the back, in your
fingers, everywhere. Yet, it's IMO one of the shorter routes to a pro. To be
true, you could start with th MFC stuff pretty much after (I)-(j), but this
makes you only half-a-programmer, and you might acquire some misfeats that are
hard to get rid of later.



The order of the list itself clearly shows some drawbacks of the C++ language,
namely, the position of exceptions, and especially the STLBoth are standard
tools that should be introduced much earlier, but require good understanding of
the basic language features.





*) I pretty much agree with the thought that understanding pointers
needs a certain "wiring" of the brain. All other stuff in C++ can be learned
by a decently intelligent person. Pointers are different, you either get them,
or you don't. If you can't do pointers, C++ will be a pain all the
time.



**) that's really late, to late. They are an important tool for error
handling - and people should learn it as early as possible. However, it
doesn't make much sense wihtout a good grasp on scope and code flow. I would
do exceptions right after (b), but books/courses don't do it without classes.


 

we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist || Agile Programming | doxygen

GeneralRe: How to become a C++ Pro Pinmembercall_me_Cincin_please29 Mar '10 - 23:19 
 
GeneralThe Kid Sister rule Pin
Saturday, July 31, 2004 9:00 AM by peterchen
Imagine you are on the holiday trip of your life - south italy, just across Sicily. Your'e in a bar, there's this incredible girl with piercing black eyes, and you don't know if she just smiles at your veiled attempts to explain the bartender what you'd like to drink, or just smiles at you.
 
To break the ice, you scratch together your last italian, and say something to her.
 
In that moment, the whole bustling location freezes. Eyes either turn to you, or away. The bartender slowly puts down the bottle of whatever you did not want to order, but finally agreed on. A young italian boy, slender, moving like quicksilver, dark, angry eyes, turns around and asks you (in unintelligible italian, of course):
 
"What did you just say to my little kid sister?"
 
THIS is the kid sister rule.

 

we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist || Agile Programming | doxygen

GeneralRe: The Kid Sister rule PinmemberS Douglas30 Apr '06 - 19:53 
 
GeneralUsing CString outside of MFC Pin
Sunday, July 4, 2004 12:44 AM by peterchen
Since it crops up frequently:
a) VC7 : makes the CStringT template available for both ATL and MFC projects
b) WTL (clickety[^]) : provides a 1:1 CString clone for ATL/WTL projects under VC6. The ATL/WTL framework emphasizes "link on demand", so you could basically create a raw Win32 application/library with CString
c) On Codeguru you'll find a macro that extracts the CString sources from your MFC library, so oyu can add them to any other project
d) there are some CString clones[^]. However, with the availability of WTL, there's rarely a need, unless you need to be portable
e) finally, you can "rip out" the WTL CString class. All that CString needs from the framework is the Ressource HINSTANCE for implementing LoadString and similar functions. (IIRC there are some more system-dependent elements, which can be easily replaced)
 

we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist || Agile Programming | doxygen

 
GeneralThat guy Pin
Sunday, June 27, 2004 2:08 PM by peterchen
"Have you tried Jesus?"
"Jesus? Oh, that guy. Tried to take the load of others, and couldn't even carry his own. He lived a life of agony and pain, and he died a horrible death. Now how can I load my own pain on the back of this guy!
Do you really think he was happy here? Look around. People are a pain. Everybody has one or two or a dozen who make all this bearable, but the rest - not that I dislike them, but I would miss their number, not them individually. Now imagine you walk around to get them all smiling, at once. And everytime five or six of them do, someone behind your back breaks into a curse.
I bet he found peace and his daddy only when sitting under an olive tree, watching an ant, and a stone, just be. This is where all that salvation and better afterlife comes from: HE just couldn't bear this life. If we wouldn't have killed him, he would have probably done this himself.
Do you know the scene, where Judas doubts his own plan, and doesn't want to go to Kaiphas? Jesus sees this and tells him his, Judas', task is harder than his own: carrying the burden of the traitor, rather than die for your fight. But to find an end, we need the traitor as much as the redeemer.
Who am I to burden this man with the dirt of my own? We went a few miles of our road together, but where he goes I cannot follow."

 

we are here to help each other get through this thing, whatever it is Vonnegut jr.

sighist || Agile Programming | doxygen