Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _____________________________________________________________________
- PPT - pro programing tips
- DEFAULT BEHAVIOR IS THE WORST POSSIBLE
- Always assume that the default unconfigured behavior of anything is the worst possible. So always configure everything the best way you can.
- (The default behavior might change, or none paid attention to it.)
- MAKING ANY PROGRAM
- Must be controllable only by keyboard, and also only by mouse
- Viviem--it web browser addon is good example, press f, all clickables are assigned letter combinations
- USE CASE TEST SCENARIOS
- You need use case test scenarios for everything you want to support. Because if you don't you willl inevitably break it some day without even knowing it. Which will make everyone angry.
- (Arma 3, addon added amphibious tracked vehicles can't move in water, because there is no vanilla amphibious tracked vehicles, so BIS can not even test it)
- // http://feedback.arma3.com/view.php?id=19911
- AMPHIBIOUS FEATURES
- Two ways to do one thing, people will forget the least used one. Introduces bugs and confusion.
- (php: "text\n" and 'text\n' \n gets interpreted only inside "")
- TAKE CARE WHEN USING ROUND,CEIL,FLOOR
- ceil(_x/_maxX*4) this will be 1,2,3,4
- ceil(_x/_maxX)*4 this will be 4 always
- C# GET SET
- The only difference is the first letter, i once wrote a SETer function in GET block.
- Infinite recursion, crashed so many times, couldn't find the bug,
- SIMILAR NUMBERS FOR TESTING
- Have A and B, now in your code you use A/2 and B alot, in case A == B*2 you might switch A/2 and B.
- It will still work for these particular numbers but if you change them, everything breaks.
- SOME CHARACTERS LOOK LIKE NUMBERS
- I wanted to use "i" letter variable for indexing, but i have instead had number "1" there.
- Small laptop monitor is partially to blame.
- CLEAR CACHE
- Could not find bug in new code, since I was using data (stored in cache) created with the old bugged code.
- VARIABLE NAMES PREFIX
- I thought the variable name was correct since at first glance it looked correct.
- It was "ray", but it should have been "rayReflected", do not use only prefix alone.
- IT IS NOT POSSIBLE
- You are probably in wrong place, it might look similar, but it's wrong file.
- BIT SHIFTING
- Take extra care when using >> or <<. I had written 1>>4 which is 0 but I wanted it to be 2^4. The correct was 1<<4.
- _____________________________________________________________________
Add Comment
Please, Sign In to add comment