Links for May 17, 2010

From my Google Reader shares

Iron Man 2 Review

The quick rundown is I liked it. Wasn’t horrible wasn’t the greatest super hero movie ever but worth my 7 bucks or whatever movies are now. I think there are maybe 2 types of people who won’t like this flick, people who are super hardcore Iron Man fans and people who are super movie aficionados.

Spoilers Below

They do kind of have a lot of stuff going on in this movie but I only actually think one thing was  unnecessary. The part where he’s being poisoned by the arc reactor seemed like a way just to pull in random elements and it was resolved in such a quick manner it seems to almost downplay how severe that condition actually was.

Stories they played:

  • Arc reactor poisoning
  • Russian guy hatred
  • Hammer hatred
  • CEO change
  • Father hates me
  • Building War Machine
  • Scarlett Johansson spy
  • US wants Iron Man
  • S.H.I.E.L.D. recruitement

A lot of those things are linked together but I guess the overall feeling after watching it is that the pacing is so fast and the story is only weakly held together that it feels like you’re just running from scene to scene. The bit with recruiting for S.H.I.E.L.D. and the Avengers is so weird since Iron Man is a part of that team and it doesn’t seem like he’s reluctant to join in the continuities I’ve read/watched. The post credits part wasn’t as big as a reveal or teaser as much as I would have liked though.

Ok anyway, that’s the bad stuff. It had great action scenes. The racetrack at Monaco was incredible. Rhode vs Stark was cool, Black Widow infiltrating Hammer Industries was totally great and the final action sequence was also very cool. The final battle was short but at the same time an event happens where you think “He should have done that first” and then the final battle pops up and it resolves rapidly so you think “Oh well ok I was hoping for more action but then again I just said he should have done this thing first to end it fast so I guess I see what happens when I get what I ask for.”

I hear Iron Man 3 might have Mandarin in it which might be really wild since he’s basically a crazy Chinese guy with 10 rings from an alien race that grant him totally incredible powers practically through magic. So I’m not so sure how they’ll make it more believable for live action. Hopefully IM3 is a much more focused story keeping all the action from IM2.

Links for May 14, 2010

From my Google Reader shares

Links for May 13, 2010

From my Google Reader shares

Links for May 12, 2010

From my Google Reader shares

Links for May 11, 2010

From my Google Reader shares

Spring Semester Projects

Obviously I’m lazy with the site but this has been one of my much busier semesters. My class list was

  • Introduction to Artificial Intelligence
  • Operating Systems
  • Numerical Analysis
  • Physics of Sound and Music

Notably my plan was to be able to build world dominating robots after this semester but unbelievably that wasn’t covered in AI. I think we ran out of time or something which sucked. My project list this semester was fairly interesting though.

Numerical Analysis Project: Integration through Trapezoid/Simpson Method

This project demonstrates how precisely computers can do integration by fine tuning the resolution of the given function. The functions are hard coded into the program so if you want to toy around with it you’ll have to manually change the functions. Calling the functions is straightforward, you call which method you want to use and pass in the function to evaluate, the starting point of integration a, the ending point of integration b, and the resolution which defines how much you’re cutting up the curve. Higher resolution is more accurate integration.

I originally coded this project in C++ but I ported it over to Python 2.4.4. Download link (right click and save as): trapsimp.py

Numerical Analysis Project: Runge-Kutta

Runge-Kutta is a method which allows you to solve initial value problems. Wiki explains it in detail. The function we’re solving doesn’t have a t term so the implementation isn’t exact. The function yPrime can be modified to accept a t term and one would have to change up the function appropriately since in this program it specifically evaluates y^2. Additionally, it’s hard coded to evaluate the 100th term so if you need any specific term it could be changed up easily enough.

This project is written in C++ for Windows. Download link (right click and save as): rungekutta.cpp

Operating Systems Project: AT

There is a command in Unix called “at”. What happens is you can call “at” to schedule a command for execution at a later date. So we were tasked to develop a very similar program with a strict set of command sequences. This program was interesting to develop and helped to solidify reading in command line arguments. The initial set of comments should help you get going.

This project was developed in C for (very old) Unix based systems. Download link (right click and save as): at.c

Operating Systems Project: Virtual Memory Management

A very roundabout project, we were tasked with taking a text document and inserting blank pages into it based on how the user executes this program. The command string is something like “program inputfilename X X X X X” where the X’s are numbers denoting how many pages to skip before writing in a blank page. We were not allowed to just manipulate the file directly though, we were to map the file into virtual memory and manipulate it entirely in memory before syncing it back to the drive.

This particular program was so procedural that instead of my usual commenting style, I simply numbered what I had to do and wrote the program out step by step. I think you can remove the math.h include, I forget why I had it.

This project was developed in C for (very old) Unix based systems. Download link (right click and save as): vmemory.c

Artificial Intelligence Project: 8 Puzzle

So if you remember being a kid and having those little sliding puzzles that either had numbers or pictures on them, that’s what 8 puzzle is. Our job was to simply be able to read in a text file that had the current state of the puzzle and the state you want to go to and then generate the set of actions that would make the first puzzle look like the second puzzle saved to a file.

The assignment was to write this project in either C++ for Unix or Java (platform independent). I sort of dreaded this since I’m very rusty with my C++ data structures (needed to use tree and vectors) so I initially thought I’d use my sister for guidance since she’s much more proficient in Java. We hashed out the reading of the file and the heuristics over Spring Break. Those things were the easy part for sure though and as the deadline approached I decided to try a crazy idea. Over the past few months I’ve been urged to learn Python and as such I’ve even bought a few books on Python. I haven’t had a chance to read them yet. But I figured I could ask the professor to see if I could use Python instead. He agreed as long as I had a detailed report on my exact implementation. This is the reason the code I’m posting has little/no comments because I moved them out to a report.

Anyway, the partial Java program was around 100 lines and all it did was read the file and apply heuristics to board states. My finished Python project was around 100 lines and did (nearly) everything. Uncommonly, we had to present our projects to either the professor or the TA. It was a particularly strange event. I sat down with the TA and he asked why I used Python and I explained I used this as an excuse to learn the language. The program itself was to be hard coded to read a very specific file and he asked me why I didn’t just allow user input pick which file to open. This was odd to me because I’m very strict about how the guidelines are written for programs now after other classes which have nitpicked me about going too far above and beyond what I’m supposed to do. Also I assume it’s simply easier on the teacher to grade when they all perform uniformly.

8 puzzle I feel is slightly unfinished but I’m posting it anyway. I’m not sure if I’ll go back and make these changes but if I were to make changes they would be:

  • Allow user to choose the file to inspect
  • Alternately allow the user to simply type in board states and go with default goal state

I do have one other problem with this project which is that there are placement schemes that are basically unsolvable and my program will just churn forever on those. So I should probably also address that.

This project was developed in Python 2.4.4. Download link (right click and save as): 8puz.py

So combining my projects I’d only have a robot that could do your calculus homework and solve sliding puzzles which you could schedule for later execution. I guess that’s alright.

Links for May 10, 2010

From my Google Reader shares

Links for May 9, 2010

From my Google Reader shares

Links for May 8, 2010

From my Google Reader shares