Category

Computers & Programming

Computers & Programming

Maintaining Old Code

Maintaining old code is what I do at work most of the time. If there is a new feature to be added to the product, there will still be a large amount of existing code that needs to be waded through to get to the places where the…

Continue reading
Computers & Programming

GDI, GDI+, and GLUT

I’ve been messing around with that evolution simulation code. There’s a few things in the code that I don’t yet understand but that’s common when trying to understand the inner workings of code you didn’t write. For instance, some values related to behavior rules are initialized using random…

Continue reading
Computers & Programming

Evolution Simulation

Thanks to Andrej Karpathy, I have code that simulates evolution. He wrote code that has a population of herbivores and carnivores and they have inputs and behaviors that are complex and can evolve. The physical attributes cannot evolve and each creature is fixed with sign and hearing and…

Continue reading
Computers & Programming

Ribbon Bar Fun

The ribbon bar code that comes with MFC in Visual Studio 2010 doesn’t work right. Well, it certainly isn’t exactly the same as the ribbon bar that is part of office 2010. Maybe that’s how Microsoft wants it but I can’t find any way to get it to…

Continue reading
Computers & Programming

On Interface and Software Design

First, designing a user interface has almost nothing to do with writing software. There are software limitations that affect the design but other than that, the underlying code and data structures should not be considered until after the user interface is fully designed. I ran into this issue…

Continue reading
Computers & Programming

Who writes code like this?

This is some Microsoft code in an example program: CMFCRibbonColorButton* pBtn1 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_1, _T(“&Simple”), TRUE, 0, 0); pBtn1->SetAlwaysLargeImage(); pBtn1->SetDefaultCommand(FALSE); pPanel1->Add(pBtn1); CMFCRibbonColorButton* pBtn2 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_2, _T(“Simple with Options”), TRUE, 1, 1); pBtn2->SetAlwaysLargeImage(); pBtn2->SetDefaultCommand(FALSE); pBtn2->EnableAutomaticButton(_T(“&Automatic”), RGB(0, 0, 0)); pBtn2->EnableOtherButton(_T(“&More Colors…”), _T(“More Colors”)); pPanel1->Add(pBtn2); CMFCRibbonColorButton* pBtn3 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_3,…

Continue reading