Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About tmont

  • Rank

Profile Information

  • Custom Status
    Not going to school today
  • Gender
  • Location
    San Diego

Recent Profile Visitors

7,888 profile views
  1. I was severely disappointed by the lack of Zelda (that would've been my vote), until I read the first post. I vote for Mega Man. Super Mario Bros. 3 is probably one of the best games for any system, but the other two are nothing special, not to mention that SMB2 is just a sprite hack of Doki Doki Panic. Plus, that game is kind of creepy. The Mega Man games were all the same, but they were all the same awesome. And no game had better sprites than Mega Man, or music, or boss names (Wood Man, Hard Man, Elec Man, Bomb Man, Fire Man, Snake Man, the list goes on). And of course, Mega Man's real name is Rockman, and his sister's name is Roll, so that makes them Rock and Roll. You can't make this stuff up.
  2. Contra music is rad. That guy is also rad.
  3. So, at my office, we like to argue about programming concepts. Usually I bring them up as they relate to math, since I know more stupid little things about math than my co-workers, whereas they have a great deal more experience than me in just about everything else since they're all 30ish and have one foot in the grave. Anyway, here's a question (paraphrased) I posed to an interviewee: Sadly, the interviewee was... misfortunate, and couldn't solve this, even though I practically wrote the answer on the white board. An answer (in PHP): function truemod($num, $mod) { $return = $num % $mod; if ($return < 0) { $return += $mod; } return $return; } The follow-up to this (what I thought was a decidedly easy) question was going to be, "now do it without a conditional." An answer (in PHP): function truemod($num, $mod) { return ($mod + ($num % $mod)) % $mod; } We didn't quite get that far, however, since the interviewee gave up instead of translating "-5 + 7" (what I wrote on the board as I was trying to prod him into an answer) into a function. Anyway, I had run into this problem before, mainly when dealing with calendars, and had to hack my way to a solution. I brought it up to my coworkers, and what followed was a heated argument about whether "Tommy is wrong because -5 % 7 in Java is -5" (paraphrased). Since my coworker was slightly belligerent, and I found it kind of insulting, I gave him the mathematical answer, which is correct-ish, since I took group theory two and a half years ago and haven't used it since: However inaccurate that explanation was, they didn't really buy it, but I only wrote it up to be facetious, and wasn't really meant to be taken seriously. We ended up finding "bug" reports for both Java and PHP where people were complaining that the modulus operator wasn't accurate: it was returning negative numbers when that's not possible (for the very reasons that I so eloquently stated above). We eventually discovered the reason: Some languages truncate integer division toward zero, which means that, for example, 15/7 = 2 and -15/7 = -2. Java, PHP, JavaScript, C#, SQL and probably (I don't have a C compiler) C/C++ work this way. These are the languages in which -5 % 7 = -5. Other languages truncate toward negative infinity (i.e. they always take the floor), which means that 15/7 = 2 and -15/7 = -3. Perl, Python, Ruby, Lisp, Haskell and Lua all work this way. These are the languages in which -5 % 7 = 2. In conclusion, it was a stimulating exercise. Can anybody give examples of other languages and their modulus operators? Fun time!! Try it yourself! (No, I don't know Haskell; I learned enough of it in 10 minutes to install a compiler and run one command) PHP: <?php echo -5%7; ?> JavaScript : (why do I need a space there to be able to write "JavaScript" as one word?) alert(-5%7) Java: public class mod { public static void main(String [] args) { System.out.println(-5%7); } } C#: class mod { static void Main(string[] args) { System.Console.WriteLine(-5 % 7); } } SQL: SELECT -5%7 Ruby: puts -5%7 Perl/Python: print -5%7 Lua: io.write(-5%7); Lisp: (mod -5 7) Haskell: -5 `mod` 7
  4. Super Metroid, for the first time. Fun game, but a little disappointingly easy. Finished in 9:20, with 80% collection.
  5. If you're just removing/altering bytes, use a hex editor; my favorite is XVI (for Windows). Also, the music is totally rad. Brings back fond memories! *sniffle*
  6. tmont

    2600 Music Utility

    The sound doesn't work in any browser except IE, because all the other browsers can't handle dynamic sound in an efficient enough manner. Here's an alternate link to a server that's not ridiculously slow: http://tmont.ath.cx:99/projects/2600/ Sweet.
  7. tmont

    2600 Music Utility

    Sure! You can find it here: http://www.tommymontgomery.com/2600/. Although, I haven't looked at this stuff for a long time, and the sound doesn't seem to be working for some reason.
  8. Actually, I was able to hack the Invision form. It doesn't like it if you put a number that's not in the drop down, though. These will work: http://www.atariage.com/forums/index.php?a...;max_results=10 http://www.atariage.com/forums/index.php?a...;max_results=20 http://www.atariage.com/forums/index.php?a...;max_results=30 and these will break (in a rather amusing way, in my opinion): http://www.atariage.com/forums/index.php?a...p;max_results=1 http://www.atariage.com/forums/index.php?a...p;max_results=5 Apparently it just checks for $_REQUEST instead of $_POST (I don't commend that practice, for just this reason, although this is fairly harmless). Of course, you'll have to bookmark these links, as clicking on the "Blogs" link will still just take you to the index with a default of 20.
  9. tmont

    NES vs. 5200

    I tried to think of an example to refute this, but I couldn't think of one. I never realized that before. Interesting.
  10. tmont

    Playing 1942 (NES)

    When I read the topic title, all I thought was "That damn beep!" I'm glad you mentioned it.
  11. This might help: MIDI Parser if you need help with the MIDI file format. It's something I wrote a while ago when I was under the influence of my hex editing obsession.
  12. tmont


    To test stuff, you can do that on your machine, if you have a server (i.e. Apache). It would be fairly ridiculous to ftp stuff to dreamhost just to test a web page. If you're just learning PHP for fun, I'd download something like WAMP or XAMPP (depending on your operating system) to get you going really easily. If you're feeling ambitious, you can compile them all separately and try to get them to talk to each other via the configuration files. It's quite the learning process.
  13. I had almost the same experience, except I don't have any sisters. It was probably either Monkey Island or The Legend of Zelda for NES. I didn't really start beating games until I was in college and had a lot more time on my hands to actually finish games. The first game that I actually remember beating was Pitfall: The Mayan Adventure for Genesis, when I broke my collarbone in 6th grade.
  14. I took a music history class in college, and we had these listening tests where our professor would play 10-20 seconds of some song (usually opera, it was all 17th-18th century music), and we had to write down the composer, the genre, the title (usually Latin or Italian), the year it was composed, and some other stuff I can't remember. Anyway, one of the pieces was Gregorio Allegri's Miserere Mei, Deus, and I fell in love with it. It's purely choral, with a little chant. Anyway, since I now suddenly have a lot of time on my hands, I decided to spend a day or two to arrange this classic piece of Christian choral music for rock stars. Kind of. Mainly I just added counterpoint and drums. Take a listen: My version Original (from my class) It's even on YouTube (with score) My version was created via MIDI, so the voices might sound slightly corny.
  • Create New...