Archive for the ‘Code’ Category

Hooray for corrupt reparse points!

The Windows Home Server I’m running suddenly started acting funny a few days ago. Is started noticing it when certain video files would refuse to play. VLC spat back the same errors as if the file never existed.

So I RDC’d into the server and tried playing the files locally from the storage drives themselves, and it worked. It seemed like, for some reason, the server had re-filed the files in a different place, but forgot to update their location.

WHS uses “reparse points” to link the files on the various hard drives to one contiguous “virtual drive” that lists all the data. When a file is opened through the network, the server checks the reparse point and follows it to the location of the actual file. But when those points are corrupted, the files “disappear”.

Thanks to the WHS forums, i was pointed to the whsCleanup tool, that finds the bad reparse points, logs them, then deletes them as soon as you run a cmd file. The only problem was that the solution involved permanently deleting the affected files. Since the files themselves weren’t bad, just the reparse points, I followed the following steps to get everything back online:

  1. Ran whsCleanup
  2. Viewed the cmd file as text, made a note of every affected file
  3. Went into the C:\fs\ folder and manually copied (not move, COPY) each file to be deleted into a new temp directory in D:\shares (the virtual drive)
  4. Run the CMD file to delete the affected reparse points. Ignore the “error: drive not attached” errors.
  5. Move (not copy) the files back into their original folders from D:\shares to D:\shares. Use the virtual drive for this leg of the process.

That took from thursday morning to last night to complete with about 3 TB of data. Thank God for SATA.

Windows Home server forum thread

whsCleanup




Last day with TLC

Yesterday was my last day at the Taxi and Limousine Commission. The majority of the day was filled with minor bug fixes and explaining the applications I created to the people that will be taking care of them from now on.

For lunch, I was invited to a Japanese restaurant called “Megu” with the people I was working for all summer. The restaurant itself seemed like it was pulled straight out of Deus Ex, without any graphics upgrades. The food was pretty good, I had a burger made with Kobe beef and some mystery sauce that tasted like the burgers Cat’s dad usually makes (marinated in butter before being grilled). After lunch, the person who had been supervising me all summer presented me with a very nice “thank you” card, a TLC cap, and a shirt with a New York City taxi medallion on it. It was an unexpected, but greatly appreciated gesture that started to make me realize how much my work was appreciated this summer.

The final realization came around 4 PM, when I was called into the Commissioner’s office to demo the frontend I had coded for the Call Center. I showed him how it was geared towards answering the customer’s questions as quickly as possible, and how easy the interface was to use, and he became very interested and excited about it. It was one of the greatest feelings of accomplishment to see the commissioner of the TLC playing with a system that I made, and describing all the uses it has that I never thought of.

All things considered, this has been one of the best summers of my life. I got to work with a group of intelligent and interesting people, learned about an industry that I never would have thoguht about otherwise, and left them with a useful tool that will hopefully continue to be useful and benefit the TLC, a tool that forced me to learn a whole new language and pushed the limits of my programming ability. And that is something I definitely wouldn’t have gotten out of Bear Stearns.




Rolling out the app

For the last month or so, I’ve been working on an ASP program that displays data from an SQL database that, until now, was done in a command line interface that looked far too confiusing to be functional. However, there were a few barriers to completing this assignment:

  • I’ve never coded ASP before.
  • I’ve never connected to a Microsoft SQL server through a server side app before.
  • I had no idea what the structure of the database was.

So essentially, 50% of my time has been spent learning ASP, 25% figuring out where stuff is in the database, and 23% actually coding the system. A system which went into beta testing this afternoon.

After writing and debugging close to 3,000 lines of code in a language I’ve never seen before, watching as the intended users interact with the system was one of the best feelings of accomplishment I’ve felt. And what’s even better was, except for a few minor feature requests, there wasn’t a single complaint. It seems like everyone naturally figured out how to work the system, and it displayed exactly what they needed. All that’s left is some tweaking next week, writing 2 more pages, and I can hand it off to the local IT department to maintain as I trudge back to Penn State.

5 more days of work, and then I’m free for the rest of the summer (or at least what’s left of it).




ASP, TLC, and HOPE

This entire last week I’ve been trying to learn ASP so i can build a frontend to the database that the call center guys at work use to answer questions. Right now, they’re working directly from the console of what appears to be an old mainframe computer, and I can’t make heads or tails from the display. So I’ve come up with a better way of doing it, started coding in PHP, then realized that I’m in a Windows shop, and started learning ASP. The syntax is similar to PHP, but the finer details are annoying. Like how an ODBC connection has to exist on the server for the page to be able to access the SQL database. Also, as a long-time PHP lover, the lack of a character to note the end of a line is slightly disturbing.

I’ve been rescued from banging my head against the wall a couple times this week. Yesterday, I went out to Woodside to help train the drivers for the accessible dispatch system. The idea is that people in wheelchairs can call 311, then have a yellow taxi dispatched to their location and capable of handling their needs. TLC is using Blackberries with a special Java app to handle the dispatching, and we spent about 4 of the 6 hours of class teaching the cabbies how to use it. Some of the guys got the idea immediately, others took some hand-holding to get the concept, but eventually everyone understood. And while the slower of the group were recieving extra instruction, the others decided it was a good time to vent their frustration with TLC’s rules and taxis in general, complaining about everything from the lack of weight restrictions to the dispatchers at JFK. We told them we’d look into it, but I’m not sure there’s much we can do.

The other interesting thing going on is that the PR department at Penn State has gotten wind of my upcoming HOPE presentation and wants to advertise it on the website and elsewhere. Heung Xu and Gerry Santoro also expressed interest in booking me to do the presentation in their classes this Fall. I’m doing a phone interview with someone on Wednesday, and I sincerely hope I can get the presentation cleared by the end of next week. One week after that I’ll be on stage, and I can’t wait.

Cat and I have reservations at Virgil’s BBQ at 6:30, but otherwise no plans for the 4th.




RepubliStats

A few years back, I wrote a quick little PHP program that displays the relative activity of a phpBB forum both numerically and graphically. It’s quite simple, but so effective that it’s used by the administrators of multiple forums to see what’s going on.

After working with Chris this afternoon to update the code, I just wanted to post it here so that anyone who wants it can find it. Thanks to Sell and Dobbs for the troubleshooting help they gave me with this.

RepubliStats v. 1.1.2

[EDIT] Here’s a link to a working version: http://nafticon.org/antistats/