Self-hatred

Posts Tagged ‘coding’

Building up mental inertia

I’ve sunk myself into virtual worlds and escapist fantasies since last September. There was World of Warcraft (a lot of it), fantasy, novels, and the Internet as a whole to run off into while I had my breakdown. It was great. Brilliant. I need to stop now, and get back in line with the real [...]

School update

I wrote code for the first time since last summer, and with coding, comes some fairly hard choices what to do with myself after the summer. I’ve burned a lot of bridges over the last year, burned them very well indeed. College, over the past year, has been a complete loss. I’ve been on time [...]

[XNA] Collisions (and a general update)

One of the coolest things in older video games (read: Asteroids) for me was the wrap: The sprite moves off the screen and smoothly appears on the far side. Imagine my crippling disappointment this morning when I started playing around will collision detection and discovered that it is basically eight lines of code: if (rectangle1.X [...]

[XNA] Muzak II

I did some basic soundtrack-handling last night. I ran into problems getting it to run before I discovered that Content.Load(bar) can only be called from the main class. That was a bit of a pisser, and it forced me to rewrite my class. I am defending its existence on the grounds of potential extensibility. class [...]

Problem #19 non-solution

I’ve been having way too much fun with these: using System; public class Nineteen { static void Main() { } // Days in one month. Assumes “1-12″ input. static int daysMonth(int year, int month) { int[] a = new int[13] {0,31,28,31,30,31,30,31,31,30,31,30,31}; int b = 0; if ((leap(year)) && (month == 2)) b = 29; else [...]

Project Euler Problem #9

Okay, this one was tough. Not in the computation – it took me about an hour to refine and submit my solution once I Googled the algorithm; my real problem was in completely understand the requirements of the question, and what it implied. I looked up the Pythagorean triplet, and the history of it. — [...]

Project Euler Problem #8

I started here for clarification on the problem’s requirement. I had more problem correctly parsing the input than I did in crunching the highest product (three hours versus two minutes?). :/ — using System; using System.IO; public class Eight { static void Main() { int[] a = numIn(); int b = 0; int c = [...]