Recently I have been reflecting a lot on how criticism influences and should influence my life. What should we criticize? What is the best approach between motivating people and expressing serious, honest feedback. Which responsibilities are there? How can we achieve actual value even though negative feedback is given because the others got it wrong?! This is the foundation of the toughest challenge in life, I want to explicitly state here:
What is the correct amount of feedback appropriate to support or express discomfort with an approach or opinion?
This question is heavily biased on variables such as culture, societal expectations, language, personal experiences and motivation. If you answer that question wrong, you can destroy ambitions in other people or lose your reputation. If you get it right, you can be part of something which shapes technology, culture and society in the future.
The BOM indicates programs that a given text file is encoded in some Unicode encoding like UTF-32 or UTF-8. The BOM is represented in UTF-8 as sequence 0xEF,0xBB,0xBF and shall be put at the very beginning of a text file.
Thomas Aglassinger pointed out in his Unicode talk at pygraz on Tuesday that wrong str.encode can cause headache with the BOM, if you combine two strings which have been encoded as UTF-8 just previously (what a stupid idea, but might happen). This snippet illustrates the effect and the BOM is represented in a red box:
What happens here is that the BOM is printed twice, because the BOM is prepended on every encode operation. To fix this you should use ('a' + 'b').encode('utf-32') instead.
My question now is: How does python3 react to some text which contains the BOM twice?
If you run this program the first time, it creates a bom_test file.