Tag Archives: .net

Devil’s Canyon 4790k Benchmark

Happy New Year!

I’ve had the same desktop hardware for over 5~ years. I recently upgraded my motherboard and CPU, redid the whole build. Pictures will come soon once I tidy things up. But for now, lets see the 4790k benchmark and tests perform! Also, overclocking goodness.

Was it worth the $350?

Continue reading

“Bunduru” Chess AI

For Marist Artificial Intelligence, my buddy Phil and I had to make a Chess AI. The professor hosted a server that would manage teams and a 2D display of games. AIs had to manage gamestates and submit moves to the server, as well as receive new moves when it wasn’t the AI’s turn. The server managed whether moves were valid or not and would update the 2D display when the AIs submitted their turn. After several weeks of development, all the teams competed their AIs against each other.

And we won!

Read on to learn about our AI.

Continue reading

Today I Learned: Never Rely On Memory – Let The Code Do It For You [If You Can]

So this is something I’ve seen two large camps pitted against each other for. Programmers should always be responsible for the code they write and should always be actively trying to write responsible code in itself. I think everyone can get behind that without much quarrel. But! One camp tends to argue that the programmer should ensure there is ~absolutely~ no way for things to blow up while the other camp argues that the programmer should place ‘checks’ in the code in the possibility that it does.

Hopefully the issue is clear.

Should a programmer place checks in their code to not only protect users in the future, but also themselves? “Why wouldn’t you?” your reaction may be. Well, you might have a complex piece of code that would take a lot of resources to constantly check will work properly. The goal is to make sure your code is exception-safe as much as possible, but there is always someone out there who will holler out “at what cost?!” If something is expected to work one way, that should be the ~only~ way it will ever work they argue!

It boils down to a kind of elite purist paradigm vs a human-error safe paradigm. Both have merit!

I made a pretty timely and amateur mistake today because I was running the purist paradigm. I’ll talk about how I should have placed checks to save myself and evidently my boss about 2 hours of time. But at the same time the issue could’ve been easily avoided and no check at all would’ve been needed if I didn’t rely on my faulty memory.

Continue reading

Today I Learned: WPF Templates

Ugh XAML. Functional its really nice, and with Windows Presentation Foundation, it makes for some really awesome GUIs. You can do all kinds of cool data binding and automatically display information. A few projects about a year or so back using WPF XAML and C# is what reinvigorated my love for programming, which admittedly was looking down for awhile. But damn is it messy. Quick example: You can make an excel grid automatically display the data members in your class. If you had a class of Customers, with all kinds of Customer info, you can bind the grid to a list/array or collection of Customer and have it automatically display this info. So awesome! But, what if you wanted a specific kind of grid with specific properties? Continue reading