| from David Bolton With my Mac Mini due back any day I can continue working on the first iPhone development tutorial. There aren't that many C tutorials left to do (Lots of C++ and C#), though I do want to do several on GCC C/C++ programming and Linux programming. Many people do not appreciate just how much of an impact C has had and continues to have, so I will still cover it here. Have a Great Week! | ![]() | In the Spotlight | SFML - Alternative to SDL? The great thing with open source (though sometimes also confusing) is the number of different ways the same things get implemented. There is usually one system that everyone knows like SDL but then alternatives such as Allegro and SFML turn up. If you are learning media development, the smaller packages can be easier to get started with. SFML is a smaller lighter alternative to SDL for Windows and Linux that provides eay to use windowing, graphics, audio and networking as well as accurate time measurement. It's a collection of easy to use classes. #include <SFML/Audio.hpp> #include <SFML/Graphics.hpp> int main() { // Create the main window sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window") ; // Load a sprite to display sf::Image Image; if (!Image.LoadFromFile("cute_image.jpg")) return EXIT_FAILURE; sf::Sprite Sprite(Image) ; // Create a graphical string to display sf::Font Arial; if (!Arial.LoadFromFile("arial.ttf")) return EXIT_FAILURE; sf::String Text("Hello SFML", Arial, 50) ; ... } That's a small part of this example that shows how easy it is to get started with. | | Some General Development Tips Here are a few tips of mine for general programming, Probably most of them I've picked up and practised in the last 8 years. - Get a teddy. When a piece of code is not doing what it should, explain it to anyone, or even a Teddy Bear you have handy. Sure your colleagues will think you are nuts but trust me, this really works. Just describe what the code should do, talk out loud to your colleague, Teddy etc and what it's doing instead. You'll realize the problem and find the bug pretty quickly.
- If you're working on a project and feel you aren't making any progress or you waste time thinking about it and not doing it, then every day do a little, just to advance the project a small way. it's one of the tents of GTD (Getting Things Done) by David Allen.
- Use a Version Control System. It's not just about keeping your code safe, but being able to go back to earlier versions and looking at the differences to see how you managed to totally destroy everything with just one line changed!
| Tiniest C Sort I saw a listing from this page where a developer had tried to sort a array of ints in as small a source program as possible. Keen developers will notice that it's recursive. s(int*a,int*b){int t=*a;if(b>++a) if(s(a,b),t>*a)a[-1]=*a,*a=t,s(a,b);} So the question is, can you improve on it? | Sponsored Links | ![]() |  | | C / C++ / C# Ads Advertisement |  |
No comments:
Post a Comment