Sunday, July 12, 2009

I did not write this, I took it from a comment on Reddit.

Make yourself do it every day (with occasional days off; sometimes you have to let your brain chemistry balance itself out), have several projects to switch between when you get burned out, and don't program when you should be sleeping.


That's the easy stuff. Here's the real secret:

You know that feeling when your brain hurts because something is "too hard to implement" and/or there's "too much drudgery" to get through? Overcoming that is probably the most important part of becoming a strong programmer.

Many martial arts involve a kind of conditioning which basically involves getting the crap kicked out of you, generally known as "iron body". This is partially for pain tolerance, but the name "iron body" is apt, because it also causes small chips and fractures in the bones, which heal to make the bones stronger and denser.

It is a simple fact with programming that at one point or another, most problems worth solving will hurt your head to think about. It may be the expanse of implementation details you can imagine stretching to the horizon, the abstractness of the problem, the difficulty of wrapping your mind around a particular equation, etc.

You have a choice: reject this idea, and waste a lot of time trying to find the perfect project which will be all fun all the time. You will become frustrated as you give up on every project you start. Or you can accept this simple fact and train yourself to have "iron mind":


  1. Tolerate a little mind pain and work through it. It will be unpleasant, but you should get over it pretty quickly. You can do fun/easy parts too, but try to get an hour or two of unpleasantness in every day.


  2. GOTO 1.


Two main things will happen. The first is that you will learn to deal with mental strain so that it doesn't bother you so much. The second is that you will learn how to divide up and fit problems into your mind so that they don't hurt to think about. The latter part is, I think, really key, because it is not merely a coping mechanism, but a problem solving skill. As time goes on, the definition of "unpleasant" will change; so long as you keep making yourself work through whatever "unpleasant" means, you will keep growing.

At least, this is how it has been for me.

Also: caffeine. Oh, and water. Caffeine without enough water will just make you feel shitty. If you drink tea, you're guaranteed to get enough water. Stay away from caffeine pills.

SDL on Windows.

So I got SDL setup with codeblocks on Windows. It only took a few minutes, and I begin reworking through the sdl tutorials I was working through under Ubuntu. For a small project I can try to get something that can be checked out of SVN and built under Windows and Ubuntu.

With all my work on automating builds, I wonder how you go about automating a dual O/S build. How are tests handled? I would think you would have a main-line build machine (or virtual) for each O/S you plan to distribute for. I may investigate this further at a later time.

Ogre 3D and Code::Blocks

I installed code::blocks on Windows allong with Mingw. I then installed Ogre 3d sdk and tried to get the examples to compile. I'm getting a strange include error that I haven't been able to find any information on. I'm stopping with Ogre for now. I am interested in updating my ubuntu install of code::blocks to the latest release now.

I'm going to try and get some SDL examples compiling on windows & ubuntu. I've been reading "Physics for Game Programmers" and working through things. I haven't been making much time for this though. Neither have I been able to play games much. 

I will report back my luck with SDL and the Physics progress.

Saturday, May 9, 2009

Looking at Project Planet 2

I was kind of excited about looking at the source code for project Planet 2, but it doesn't seem to be available. I registered for the forums in hope that there would be a member only section with some kind of clue, but I found nothing. Maybe I'm missing something.

I found the source, it was linked via a post in their forum. It uses boost, and I'm not in the mood nor do I have time to set that up for right now. So Project Planet 2 is going to go on the back burner, at least I found the source.

Monday, May 4, 2009

Monday night coding

Work on jsBreakout! continues, updated some collision detection, handling losing a life. Still six things to go on the todo list before I'm considering it complete. The collision detection and physics will never be perfect, it just isn't a big enough project. If I do a breakout in SDL then I'll definately have to do something more thorough.

Sunday, May 3, 2009

More game research

So I worked through more of the SDL tutorials, and I've been working on a breakout game in Javascript. It started out as a bit of a tech demo and then just grew from there. I figure it is a good small project that I can actually 'complete'.

Today I've been researching games for linux. Usually ones written in openGL or Java and meant to run everywhere. I've played a few like Warzone 2100 that can be directly installed on Ubuntu. Most I've tried don't run correctly out of the box - which doesn't speak well for the state of linux on the desktop.

This week was another one of those weeks where I did a lot of thinking about my participation in Math and Physics in college. I should have taken both more seriously. I'm going to have to relearn a lot of math and physics, or at least hone up. I was pretty good at math, it was the physics that killed me, and I'll try not to blame the teacher here.

I want to study more source code than just Bomberclone, so I'm trying to pick a few projects and then really work through their source. My top choices are currently Atlassian's JIRA (not a game), the original Sim City (GPL'ed!) and I'm looking at Billiards (http://www.nongnu.org/billiards/) and possibly Project Planet2 (http://planet2.weirdfox.com/pages.php). Feel free to leave a comment if you have a suggestion.

My work on the MUD has come to a complete halt, it's hard to care about. I really wanted people to work with me on it but I'm obviously alone. I really want to work with others. In regards to that, I've begun to start looking at projects to possibly join; and I'd love to find locals with interest.

I've gotten my hands on 'Physics for Game Programmers' and want to begin working through the chapters, possibly making SDL or Java examples as I go.

My current top priority is the Breakout game in Javascript/JQuery. That and finding a community to join, hopefully with a local element.

Sunday, February 15, 2009

Weekend Warrior Log #2

I've been reading the documentation for SDL after looking through Bomberclone's source code. I then began to work on some tutorials found at: http://lazyfoo.net/SDL_tutorials/index.php

I've done the first two and I'm working on the third. I want to get through the first five today; maybe more. At some point, I should look into compiling the examples on windows.

I've put the examples into my projects/sdl/sdl# directory structure.

What I've learned is that I've been avoiding this for too many years. I don't know if it was fear or success or what. I know part of it is my hate for Windows and the way the industry is so owned by Windows (and doesn't seem to mind!) I will
have to see where this takes me. I'm having a lot of fun.

After a long day of Warhammer and some additional chores I'm back and hoping to get at least tutorials 3, 4 and 5 done.
The third is a simple lib include tutorial, it causes me to look at make alternatives because I know that soon I'll want to start scripting the builds.
I found this article: http://freshmeat.net/articles/view/1715/

I've read through lesson 6, I'm going to go a bit further just reading without compiling examples anymore. Each lesson has shown such a small new idea that I'll wait until there is a more complicated example. Having gotten as far as making tetris and pac-man in Java; I understand the concepts going on. SDL seems really nice though!