Know about this?
x = [i * 2 for i in [1, 2, 3, 4]]
Be careful. The scope of “i” is not limited to the expression it is used in.
Developing for iPhone with some C++ code? Suddenly getting this error after installing a beta SDK?
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:65:0 Bits/c++config.h: No such file or directory in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h
Note the bolded folder. Change into it and make a symlink from arm-apple-darwin9 to arm-apple-darwin10. Please note that Apple has fixed this already at one upgrade of beta SDK (I had this error before too, but I still didn’t get 4.0 beta 2 so I didn’t check) so it’s reasonable to assume they will do this again.
cd Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/include/c++/4.2.1/
ln -s arm-apple-darwin9 arm-apple-darwin10
PS I don’t think posting this violates any NDA. Especially since origin for this solution is also public.
I’ve recently had two instances of studying some innocent looking code, only to realize it’s riddled with something you are ordinarily actually recommended to do. “If a function is too long, separate blocks of code into separate functions!”
Yes, that’s all nice. This rule rocks, but not when you go and insanely apply it to rather short functions.
Remember: most IDEs don’t allow easy browser-style navigation: click on a symbol name, read, then go back. This means reading complex code, spread over several functions spanning hundreds of lines of code if you look from top to the bottom… this is horrifying, and studying that code is near impossible.
If goto is considered harmful, don’t ignore the fact that function call is a hidden goto; in some cases, a wolf in sheep’s clothing.
Now, if I tell you one of the instances was some (supposedly relatively simple) sample code by a well known software company…
Image source: xkcd
Everyone who had the chance, but did not listen to almost entire spectrum at the IT Showoff conference, should be very very sorry. Most informational. Very satisfied.
One speech was too self-promotional and over-valuing the product presented, but most others in the “branch” of the schedule I followed were cool.
Anyone familiar with GL knows about http://nehe.gamedev.net/ but there is precious little information and tutorials with regard to SDL. Which is sad, considering that once you get to know the little beast, you start to like it.
But what about SDL?
Apart from Googling, I’m suggesting these below:
* http://sites.google.com/site/sdlgamer/
* http://sol.gfxile.net/gp/index.html
Bottom one is the one I visited several years ago, and it doesn’t seem to work anymore. Try the internet archive wayback machine.