Click here to Skip to main content

Wong Shao Voon - Professional Profile

Summary

39,793
Author
624
Authority
1,213
Debator
399
Editor
8
Enquirer
326
Organiser
1,952
Participant
Rather than to write an accolade of skills which I currently possess, these are the technologies, I am currently exploring:
 
  • 3D Graphics(Lighting and Shadow)
  • ASP.NET MVC 4
  • C++14
  • Garbage Collection
  • GPU Computing
  • H.264 video
  • HTML5 and CSS3
  • iOS
  • SQL Server 2012
Member since Monday, November 25, 2002 (10 years, 5 months)
  • 30 Mar 2012: Best C++ article of February 2012
  • 26 Oct 2009: Best C++/MFC article of Sep 2009

Contributions

Articles 22 (Legend)
Tech Blogs 0
Messages 456 (Regular)
Q&A Questions 0
Q&A Answers 1
Tips/Tricks 5
Comments 4

Links

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.


 
You must Sign In to use this message board.
Search this forum  
General[coderant] Zero warnings : An ideal? Pin
Sunday, March 16, 2008 11:15 PM by CBasicNet
Some coding books advocate zero warnings at the highest warnings level setting. Is this possible? I think not. I have seen some people resolved “conversion from 'double' to 'float'” warning by doing a float cast. They could have solve this problem by using all floats or all doubles, however we do use libraries, we do not have control over some libraries, especially third party libraries. For example,
 
float m_f;
m_f = (float *)a_double;
 
The problem is by doing a cast, you are silenting the compiler by saying, “yes I know it is wrong but I am very sure a_double's value will not exceed a float's value.” On closer examining the class and library it is using, it only has 2 float member variables and all the casting from double are to be assigned to these 2 member variables. What I seen to be the more correct way to solve this problem, other than casting, is make these 2 variables to be doubles type. Anyway, converting 2 floats(32 bits type) into 2 doubles(64 bits type), you only increase the memory requirement by 8 bytes. It is also much simpler than adding all the castings which need to be there.
 
So the correct way of solving the “conversion from double to float”, “conversion from int to short” and “< : signed/unsigned mismatch” is to change the type of variable to match the other type, ie if that is possible. For example,
 
// Wrong way
for( int i=0; i<(int)vec.size(); ++i ) {
....
}
 
// Correct way: size_t is the same unsigned type as vec.size() returns
for( size_t i=0; i<vec.size(); ++i ) {
....
}
 
If you use casting to resolve these type mismatch warning, you might as well use pragmas to silent the warnings, that is what pragmas are used for! When something has gone wrong and you cannot figure it out why, you can remove the pragmas and re-enable the warnings back. With casting, you can't!
 
Zero warnings to me, is an “hard to achieve” ideal because things are not always clear cut. I will always try my best to reduce warnings to the minimum, but I would rather leave some unresolvable warnings there, so that I know where to look if something goes wrong.
 
<div class="ForumMod">modified on Monday, March 30, 2009 5:52 AM</div>
GeneralRe: [coderant] Zero warnings : An ideal? Pinmember Vasudevan Deepak K17 Mar '08 - 0:36 

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


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