Erik McClure
ID picture
Age/Gender: 20, Male
Location: Washington, USA
Position: Lead Programmer
Lead Composer
Web Developer
Projects: Axion

The world depends on unreasonable people, for they are the only ones crazy enough to change it.
Username: Blackhole
E-mail: erik2003{a t}gmail{d o t}com
Send a Personal Message
Membergroups: Administrator, Black Sphere Studios, Axion Developer
Posts: 80
Projects: Axion

[more]Most Recent Favorites
July 13, 2009 [16:50:30 PDT]
Blog: Stupid Features
Episode 1: Predicates [C#]
One would think that figuring out whether or not type T exists in an array of type T would be a fairly straightforward thing to do. But wait, C# manages to make it completely fucking ridiculous!. If you want to see if something exists in an array, you need a predicate function - something that returns true or false to help the poor, stupid function know if its hit the right value. But then, if you wanted check if a specific string value exists, that would mean you'd have to make a function specifically for that string!. Obviously if your iterating through a bunch of them, creating a function for every single goddamn string is completely ridiculous. It turns out that there is a way to do this:

Array.Exists<string>(allfiles, s => s.ToLower().Contains(allrecentfiles[i]));


The weird '=>' in that turns out to be a lambda expression, which means this is basically shorthand for doing the exact same thing that I was trying to avoid - It's generating a function for each and every single string that you have to compare. What the fuck?!

This is why I hate the .net framework. 700 megabytes of code, and I can't even search a fucking array for a string without using lambda expressions In the amount of time it took me to go on google and find the answer, I could have coded my own in C++ from scratch. That's completely fucking ridiculous. [more]
Website Coding
July 09, 2009
4th of July
July 09, 2009

Erik McClure
[icon] is Offline
[more]Most Recent Music
[more]Most Recent Programs
For Windows XP/Vista/7
This is a lightweight, plugin-based encryption program that lets you save and open encrypted text files. The project comes standard with the award-winning rijndael encryption plugin, but supports additional algorithms. The program also lets you assoc
For Windows XP/Vista/7Requires .Net Framework
A .net Framework 2.0 C# console application that, given an input image, splits it up into a series of tiles based on the given dimension. Only splits images into squares. Not intended for website use, but rather for splitting up abnormally large imag
For Windows XP/Vista/7
This program automates the process of combining an image file and a zip file, a technique used to hide files inside of image files.
For Windows XP/Vista/7
Searches all of the files in whatever directory its located and replaces a phrase in the file names with a different phrase. For example, it could replace all the .cool phrases in a series of pic_0037.cool.jpg pictures with _cool so all the files rea