-- A Programming Blog

WoobyCTF, The Visibility Grid

February 19, 2012 19:56

As graduation with my undergraduate degree looms increasingly closer, it seems that, even though I'm taking a relatively small number of credit hours, classes have begun to get extremely difficult and time consuming. Nevertheless, I have found time here and there to continue work on my game as well as on this website. While I'm not able to make leaps and bounds of progress every week, I'm happy to continue making even a little progress every week.

I acutally spent a big chunk of time this past couple of weeks with the back-end of this website. Like I've mentioned in other posts, I decided to stay away from tools like wordpress or other blogging utilities and instead build up my own. While it's not perfect, it has been quite enjoyable to build it up from scratch. The process of modifying the backend of this site included a number of things. First, I completely redid the schema of my database. I originally built it up before I had any real knowledge of databases. Since then, I have operated in environments of over 1000 tables and have taken a databases class.

Full Post

WoobyCTF, The Beginning

February 3, 2012 23:30

Every time I've put together a larger program for my own enjoyment, it's always been in either C# or c++. For some reason I've always avoided Java as a reasonable language for large-scale projects. After having played minecraft and peeking around the source code for it, it seems like I just have to try it out. Additionally, whenever I have wrote in Java in the past, I have always used simple text editors to do so such as gedit or Kate in linux. This time around, I've decided to to the development in Windows in Eclipse. It will be an entirely new experience for me as I've never used this particular IDE for a personal project before but I really am looking forward to the experience.

My goal with this post and forthcoming posts is to keep me moving forward on this project. Whenever I have to write about my experiences and problems with anything, it keeps be accountable and motivated. Plus, I've always enjoyed web programming so it also gives me an excuse to develop the back end for this site.

Full Post

The Harmonic Series

February 17, 2011 12:00

All of my posts up to this point have been directly programming related, but I thought I'd take a little deviation from those posts and propose a bit of a different topic for this post. Why not move out of the realm of implementation and just discuss ideas?

I am currently taking an algorithm analysis class in which we discuss current algorithms, discuss their implementations, and analyze algorithms' time-efficiency. While on the subject of graphs, we began talking about Dijkstra's algorithm which calculates the shortest path between vertices in a graph. While already being very familiar with the idea, I started to do a little thinking of my own and ended up with a problem which entertained me for quite awhile. Let's take a look at it.

Full Post

The Convex Hull Problem

February 2, 2011 12:00

If you are unfamiliar with the convex hull problem, take a gander.

Recently I was tasked with writing a divide-and-conquer convex hull algorithm. Despite there being several algorithms that already exist, I decided to take the task into my own hands and develop my own algorithm for solving the problem. After some effort on my own part, I was able to develop an algorithm that solves the convex hull problem in Big-O nlogn time in the average case. In very rare occasions, the algorithm can degenerate into Big-O n^2 time (when points are distributed evenly in a circle), but for nearly all other situations, the algorithm solves large data sets in a very short amount of time. I ran a series of tests on my small netbook with a single 2 GHz processor and was able to generate a solution to a data set of 1,000,000 points in just under two seconds. So, let's get to it, shall we?

Full Post

Splitting Strings in C++

November 13, 2010 12:00

I can't tell you how many times I've come across problems with splitting strings in various languages. Whether it be splitting a string on all white space and getting only text, splitting a string on commas and periods or breaking up a string by line breaks, I've done it all. Sometimes there's an easy way to perform what I need to do in the language I'm working in, but often there's not. I end up hacking together something that will work in my particular situation and being satisfied enough to move on.

This has happened so many times that I finally decided to put together a simple method that does it all. It reads in a string and returns an array created by splitting that string based on an array of delimiters the user provides. I haven't done any testing against possible algorithms that already exist to see if my solution is slower and by how much, but I'll get to that at another time. Onto the solution:

Full Post