Ugh. It frustrates me how some companies can leave out even the most basic of functionality, like disabling the editing engine so you can edit XML straight like the following shows:
My senior project involves the study of highly extendible systems for the internet, mainly content management systems/solutions. I am building mine in ASP.NET 3.5 on WS2008, SQL2008 and .NET 3.5 (which includes WCF). The goal is to build a system that has plug-and-play services and is both quick and easy to use. Today I got the very first part of this system up and running and can be reached at jsedlak.homedns.org.
There is a lot of work to be done, but the base code (being built into FGF) is coming along very nicely. Once I can figure out security, the project should simply expand exponentially provided I have the time (ugh!). The two main [sub]projects here are FGDN (Focused Games Developer Network) and a simple CMS similar to that of WordPress, SharePoint, et al. The first is designed to allow users to submit bugs, feature requests, etc. easily much like Microsoft’s Connect. The latter is pretty self explanatory.
Because I am building this all as one interconnected solution, I have also started working on the idea that users that exist in Vodka [may] have access to many other parts of Focused Games. Primarily this means FGDN but also the SVN repositories. A user (you) can apply for access to one or more of the repositories I currently use for my source code. Once you are accepted, you are also connected to any other Vodka service I create. Pretty nifty, eh?
One feature that is missing in WordPress is a decent way to filter out comments by IP Address. I decided to tackle that today. First I will do it via a quick hack and then expand it to more tightly integrate with the backend. If someone would like to figure out how to make it a plugin, that would be awesome.
1 2 3 4 5 6 7 | global $wpdb; $testIp = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); $ipResults = $wpdb->get_results("SELECT * FROM wp_banned WHERE IpAddress = '".$testIp."'"); if(count($ipResults) > 0) return -1; |
Now I just need to figure out how to add some nice buttons to the comment page to “Ban and Spam” comments…
I hit 1 000 miles of riding this season. I actually hit it sometime last week, but was too lazy to post anything about it. This is by far the most miles I have done in any year of biking and the year is not over yet! I attribute a lot of those miles (682 to be exact) to the fact that I got a new bike that is just such a tremendous joy to ride.
Today’s ride was a 21 mile loop that I did pretty hard. I came in at 1 hour and 12 minutes, a 17.x mile per hour average. While this speed not what I will need to compete in TTs next year, my loops include a few hills (TTs around here are mostly flat) including one I can only go up at about 8mph. In the flat sections I am consistently above 21mph and on descents I stay at around 30mph just to be safe. So if I can get a trainer for the winter and work on my aero form I should be in top form for next season.
I was pushing Galactic Defense to the Zune today to do some minor version testing (I develop on the PC and then push to Zune for platform specific tests) and ran into some major problems. The GC was collecting about once an update which was slowing the game down tremendously. So I dug in and started searching my code.
One of the best ways to figure out where you are creating garbage (when no tool can do it for you) is just to start commenting things out. For starters, I commented out the draw code for my map. This worked, but not enough. I ended up adding a line that removed the InputManager from the component collection (effectively commenting out its update code) and I had it: 0 allocations per update.
So I looked at the draw code again and realized (with the help from guys in #xna) that I was using an enumeration in a Dictionary. A big no no since the framework allocates every time you do a lookup. A quick switch to ints (cast all lookups to integers) fixed that problem. Now onto the InputManager.
To make a long story short, I followed the trail and cornered this line of code:
1 | if(!repeatKeys.Contains(button)) |
It is this line of code that actively makes sure that I have all the buttons in the repeatKey list so I can check and update the repeated keys later on. I removed this line of code and added the following:
1 2 3 4 5 6 7 8 9 10 11 12 | bool found = false; for (int i = 0; i < repeatKeys.Count; i++) { if (repeatKeys[i] == button) { found = true; break; } } if (!found) repeatKeys.Add(button); |
And now I am back to a normal amount of allocations (some for strings) per update. I wonder why Contains is causing an allocation. I am too lazy to figure that one out right now…
Today I went on my first group ride. It was a fairly quick and simple 20 mile loop from the local bike shop. There were about 15 of us with many different bikes. I had lots of fun chatting, riding, drafting, et cetera. I will definately be doing it again. Tomorrow is a 50 mile ride to some place that should have some good food. I really need to get a small digital camera to take some pictures on the rides…
I am totally committed to entering a time trial next cycling season. I decided this past week that with a little more training I could definately do it. So next year I am going to start with some 20-35km time trials. After speaking briefly with some of the guys at my LBS (local bike shop you n00bs) it seems that around here the TTs are all kept very flat which will be extremely beneficial to a big guy like me.
I am extremely excited about this, of course, and am going to be modifying my training as well as turning it up a notch. Tomorrow will start a series of sessions devoted to flatland riding. I have a perfect road that is essentially flat that I can just tear up and down. I will do this, pushing my bike as fast as I can for as long as I can (or until the road ends). Much like hill workouts for XC (cross country, come on try and keep up) where you sprint up steep hills, these should help me get better situated on the bike in an aero position and help me get some better straight line speed.
I co-authored a book (Building Xna 2.0 Games) with James Silva. It is totally FTW and you should buy it. It is about creating a game with Microsoft XNA as a one man team. It essentially guides the reader through the process of creating a game similar to James Silva’s award winning Dishwasher.
Been upping my miles recently to start training for some time trials and road races next season. I’ve decided I will take the plunge and start my racing career (or hobby) next season since the last TT in my area takes place this Sunday and I am not ready.
This is the first YouTube video I have actually laughed at in a long time…
Maybe it is just me, but I am getting into Japanese films more and more, especially the older ones. I recently rented Seven Samurai, a great movie about seven samurai who defend a town against bandits for no pay. I am currently watching Shinsengumi: Assassins of Honor and will be watching many more. I find the films amazing for some odd reason, and I can’t explain it.