I wrote a little tool to flatten directory structures for my needs. If that might be useful to you, the app and the source can be found here.
March 14, 2011
January 6, 2011
Security Questions
The first hurdle of the second new year’s resolution: logging on to Fidelity’s web site and being forced to waste 10 minutes of my time to create idiotic security questions. Wonderful.
The next prompt was to confirm my e-mail address, which was presented in all-caps. Although most e-mail systems aren’t case sensitive, displaying an e-mail in all-caps conveys that you’re a total idiot when it comes to computers.
After that, you have to go through selecting 5 predefined security questions. My favorite: The first name of my grandfather, and you’d understand why if you’re Greek: the first-born child usually bears the name of his grandfather.
Theoretically, these questions are additional passwords. They are very weak passwords, because they consist of answers to stupid questions that can easily be guessed by somebody who knows the slightest thing about you, let alone an ex-girlfriend looking for revenge. Even if they were strong passwords, they’d contribute nothing more to security than a password that meets proper length and complexity requirements. Sadly, I’ve seen a fair share of banking web sites that won’t enforce proper password complexity and length requirements. But they have security questions!
The reasoning for this? A widespread incorrect understanding of multi-factor authentication.
The final prompt in this process was a “thank you for helping us protect your account”! Very funny indeed, but thanks for warning me about your lack of computer security expertise.
January 5, 2011
New Year’s Resolutions
I usually don’t make new year’s resolutions. And when I do make them, I typically don’t share them, mainly because I hate being asked the question. I usually respond by saying something like this.
A good nerd comeback that won’t go away
But this year I am going to do things a little differently. I will take resolutions will share them, and will hold myself accountable to them.
Weight Loss
Just over 4 years ago, I decided to lose all that weight I had. Now many people who didn’t know me back then won’t know that I used to be really really big. So I shed about 100 pounds, in a little less than one year, and kept it off for two years. The problem is that the weight has started to creep up on me again, and it needs to go.
Weight loss is a little tricky, because it doesn’t quite subscribe to the traditional S.M.A.R.T. goals idea – that is, goals that you take should be specific, measurable, achievable, realistic and timely. Setting to lose X amount of pounds by D date isn’t very likely to be a successful goal. Instead people should completely forget about losing weight and instead focus on making the necessary lifestyle changes, and weight loss will come with it. I won’t go into the details in this post, but I’d highly recommend Dr. Phil’s Weight Loss book. I don’t want to give this guy more advertising than he already has, but honestly this is how I got started.
Building My Finances
As an engineer, I have not gotten much exposure to the financial world, but I do know enough about it to notice that it’s pretty hopping! I’m starting to feel increasingly lonely, tapping code on my keyboard, investigating bug reports, and attending meetings, while some others are getting filthy rich on the stock market. Don’t get me wrong, I love my job. It pays very well. I just feel as if I’m staying home on a Saturday night while my neighbors are having a huge party with lots of hot chicks next door!
Enough with the analogies, it’s time to move! I’ve got some tools to get started: a Fidelity account thanks to my employer, and I’ve recently been watching Nightly Business Report religiously.
Yes, just two for now. Let’s see how I do :p
December 22, 2010
2011 Updates!
I took some time to work on my blog before the new year…
- New background image, courtesy of Dotter. Dotter generates a polka dot background picture based on colours you specify.
- New CSS to make things look more web 2.0-ish.
- You need to solve a CAPTCHA to post a comment, so spammers can’t pollute the comment moderation queue.
Let me know what you think of the new design, and most importantly, if you find display bugs.
Happy holidays and happy new year.
Edit: Here’s how the old theme looked like, for archival purposes:
Stripping Commercials Out of Media Center TV Recordings
I loathe being advertised to, and I don’t understand how ads are even effective, since I very rarely ever go buy a product/service based on an ad I’ve seen. When they appear on a DVR recording, I have to manually fast-forward them, and they waste precious space on my hard disks. Fortunately, there are tools that allow you to do that. Unfortunately, they’re generally buggy, don’t come with any documentation, and difficult for one to understand and use.
One such tool is DVRMSToolbox. Unlike other tools, it actually works on Windows 7, but it’s essentially a mish-mash of executables, with documentation for Windows Vista that’s hard to follow and to make matters worse, a web forum with loads of “me too, I can’t get this working either, please help” kind of replies instead of working solutions. I was able to get something working, though I could not figure how on earth to get it to work with .wtv files (it’s built for Vista which uses .dvr-ms files). Another issue I ran into is that it works on the recordings as they come in, which grinds the system down to a halt (even on a quad-core).
Fortunately, I was able to poke around and take a look at the package and figure out what’s going on, and how to write batch scripts to accomplish things, and wrote a nice batch file which I can trigger through the built-in Windows Scheduler at 4 am when I am sleeping and the system is idle:
@echo off set mediafolder=%1 set wtvconverter=%systemdrive%\windows\ehome\wtvconverter.exe set dvrmstool=%systemdrive%\Program Files (x86)\DVRMSToolbox\DVRMStoMPEG.exe echo Usage: runcomskip.cmd [path/to/media/folder] if mediafolder=="" goto:eof for /r %mediafolder% %%a in (*.wtv) do call:do_conversion "%%a" goto:eof :do_conversion rem do conversion here args = %~1 ... set wtvfile=%~1 set dvrmsfile=%wtvfile%.dvr-ms set mpegfile=%dvrmsfile%.mpeg echo *** Begin processing file %~1 *** echo Converting to dvr-ms %dvrmsfile% %wtvconverter% "%wtvfile%" "%dvrmsfile%" echo Running comskip and converting to mpeg %mpegfile% "%dvrmstool%" /if="%dvrmsfile%" /of="%mpegfile%" /p=32 /act="converttompgwocommercials" rem Rename the wtv file so we don't attempt to re-convert it if we run the script again. rem I'll be changing this to delete the file when I'm sure my script works 100% of the time. rename "%wtvfile%" "%wtvfile%.old" echo *** End processing file %~1 *** goto:eof
(to use, copy this into a text file and save it as runcomskip.cmd)
I’m using the WTV to DVR-MS converter that ships with Windows to convert the files to the older DVR-MS format. There are no tools (that I know of) that will work with WTV. Once the file has been converted, DVRMStoMPEG will run Comskip, a freeware tool included with DVRMSToolbox to find commercials in the video, and will output the stripped video to MPEG. I ouptut MPEG since it’s a lot more portable than DVR-MS and WTV, and AFAIK there’s no transcoding involved, all it should be doing is changing the container. I’m a bit wary of deleting the original files just yet. I want to make sure that the tools work right before running it on my recordings. I rename it so that the same files don’t get processed twice. The next step is to find a good batch encoder for archival purposes before my 1 TB DVR disk fills up. Right now I’m thinking of writing a simple cmd line encoder using the Expression SDK.
December 2, 2010
Hello Windows Phone 7!
After much wait, I am now proudly flaunting a Windows Phone 7. Initially, I was planning to get the Dell Venue Pro, but the long wait for the device, and it’s bulkiness steered me towards the HTC HD7, on T-Mobile.
The Device
The HTC HD7 is a nice phone overall. I love the size of the screen on it, and its slimness: it fits better in my pocket than my older, tiny-screen HTC Touch. The 5 MP camera is totally amazing, and the LEDs do a good job as a flash, or even as a flashlight. It would be nice if they’d have a Super AMOLED screen instead of an LCD. A few disappointments, however, it uses a micro-usb instead of a standard mini-usb to sync so I have to buy new cables, and I wish the battery could hold more power.
The Carrier
In the process, I switched from Sprint to T-Mobile because Sprint doesn’t yet have WP7 devices yet, and I’ve really had enough of my HTC Touch. I’m a quite disappointed at the coverage, and the data speed. Indeed, in spite of being practically non-existent outside North America, CDMA is a much, much better cell phone system!
WP7
Finally, let’s get to Windows Phone 7. Overall I think they’ve done a great job, and my assessment is that it’s at least the equivalent, or better than the iPhone, give or take a few features. And if the rumored “January update” is true (I don’t know, I don’t work on the WP7 team), WP7 really can kick some serious iPhone ass! Sure, I think Android is way ahead in the game, but if they keep a fast-paced update release schedule, and does a good job supporting developers as well as device makers, I think WP7 has lots of potential.
- The phone has a new UI. It works great after maybe 1-2 hours at the most of getting used to it. Perhaps a more complete setup wizard that does more than setup Hotmail would be nice.
- I like the way the facebook/outlook/contacts/hotmail/gmail contacts sync together in the people hub. They need to include Twitter, and Ideally have an API that social netwok sites themselves can maintain.
- It would be nice if calendar services like Google Calendar and Facebook’s events could also appear in the phone’s calendar.
- The folder list in Outlook e-mail gets the job done, but looks very, very, very bland.
- The marketplace is getting very crowded. That’s a good thing, but that will require at least organizing alphabetically.
- The lock screen and password input is really nice. If you’ve used Windows Mobile, you know what I mean!
- Internet Explorer sucks, but it’s way better than the one that shipped with Windows Mobile.
- No ability to map the address of a Facebook event, not even on the Facebook application.
- Bing search is quirky. Often, it will say Bing is not available after a long, long wait, even if I have a data and/or WiFi connection going on. If I try it a second later, the search results will show up quickly as expected.
- IE has Google search as default, due to the carrier customizing it. Why the hell do we allow this? BING is the proper search engine now :p
November 7, 2010
Saving Media Center Live TV Pause Buffer Video
I was watching something on TV using Windows 7 Media Center. I wanted to record it, but it started before I had a chance to press record. I figure there’s no problem, I have a pause buffer, right? Unfortunately, there’s no supported way to save the Live TV Pause Buffer. What a BUMMER!
So, I Binged, Googled… nothing. So I started playing around, and I came up with something:
The live TV buffer is stored along with your TV recordings in the Recorded TV folder, which by default should be C:\Users\Public\Recorded TV. In that directory, there’s a hidden folder called TempRec\TempSBE. To see it, you must enable hidden folders. In that folder, there are a bunch of files with weird (GUID) file names with DBF extension. Use the date of the file to figure out which file is the one you want…
Copy that file somewhere else (you don’t want to muck with this folder-it’s probably hidden for a reason). Rename it with a WTV extension. Windows Media Player should be able to play it now. I tried with VLC and MPC, they both won’t play it. Using the built in converter to convert that file to DVRMS will also fail. I suspect this isn’t a true .WTV file and as such isn’t very portable.
Fortunately, you can use Microsoft Expression Encoder to make it into a WMV! Expression Encoder is the former Windows Media Encoder and the free version will do the job just fine. Once it installs, launch it, select “Transcoding Project”. Use File > Import and browse to the WTV file, set the desired WMV settings on the right pane, and when you’re done, select File > Encode.
You should now get the pause buffer in a nice small WMV file
The default output location for Expression Encoder is “Expression\Expression Encoder” in your documents folder.
Again, I found this on my own, so of course this method is probably NOT supported by Microsoft.
February 25, 2010
Biking to work
I finally bought a bicycle last weekend, after roughly a year of thinking about it. Monday was pretty nice here in Seattle, so I bailed out of work early to go ride a bit around Kirkland. Not only did I enjoy the ride, but I ended up doing 10.5 miles going to Juanita and back, then all the way to South Kirkland P&R (see route). So the logical conclusion from that is that I should be able to get through the 6.1 miles to work right? But unfortunately the weather would not cooperate this week, until today.
So here’s the route to work:
So I made it, the only big surprise is how I was exhausted climbing the hill west of 405, and a strong southerly wind, which should both help me on the way back
January 24, 2010
Does Sound Transit police also extort drivers?
I was driving back on the I-90 express lanes on Saturday afternoon (with a friend, so I was there legally), just before the north/south 405 fork, there was this sound transit cop in front of me, and some dude on the left lane. The cop merges left in front of the dude and I attempt the same thing too, to go north on 405. Unfortunately, that idiot would not let me in his lane, so I merged behind him and gave him the finger.
I believe the cop saw that (or maybe he just wasn’t impressed with my loud techno blasting though the sunroof), pulled over to the shoulder and got behind me for like a mile on 405, I didn’t get stopped. Should I actually be looking out for these transit police like I do for the WaSPs?
September 15, 2009
Mounting my LCD TV on the Wall
I ordered the mount from Monoprice, since they are much cheaper than the ones you see in stores. The reviews for Monoprice mounts are good, except for the lag bolts that apparently tend to strip when torqued, but those things are only 50 cents at hardware stores, so that’s not really an issue. The one thing is you gotta be really careful when choosing the mount as to its size. They advertise them by TV size and weight; size being a good indication but not guaranteed to fit, and weight not being an issue most of the time unless you have a gargantuant heavy plasma. What really matters is the VESA specification, which is the distance in millimeters (yay! metric!) between the mount holes on the TV. I’d advise choosing a mount that’s slightly bigger, just in case. For instance, my TV (52″ LG Scarlet LCD) spec is 800×400, meaning that the holes are spaced 800 mm apart horizontally and 400 mm apart vertically. The mount I got is 850×450, but really you’d be pushing it if you needed it 850 mm apart, as in you’d have to screw in the bottom rail lock from inside with a spacious 3″ clearance between the TV and the wall.
After opening it up, I went to ACE to get some lag bolts, spacers, a pilot hole drill bit, and spacers. The lag bolts are to replace the ones supplied because as I said earlier there are lots of reports of people stripping bolt heads. So, I went with ones similar to the ones provided, that is, 5/16″ thick by 3.5″ long. I also got some washers to match, since they’re so cheap. To drill the pilot holes, some online research shows that the recommended size of a pilot hole on soft wood is 3/4 of the bolt’s diameter. So that makes it 15/64″. I got plastic spacers because the ones supplied with the mount were a bit big and the bolt wouldn’t go in deep enough for comfort, and you want things to be tight, otherwise you can damage the threads. I also got rubber flanges to protect the swanky red finish on the back of the TV.
The next part is finding the studs, and yes, you absolutely have to mount it on studs. Drywall is extremely brittle and won’t hold a TV. For that you’ll need a stud finder and a laser level. So, locate and mark the center and edges of studs on the wall with the stud finder. Normally they’re 16″ on center apart, but don’t count on that, some contractors like to improvise. Now comes time to decide where you want the TV, both vertically or horizontally. For that I placed the bracket on the TV and took a few measurements to find out where the TV would end up based on the pilot holes. Horizontally the leeway you have is the holes on the wall plate. You do want the TV to be more or less centered on the mount. Vertically, although aesthetically it might look better on the center of the wall or on top of a fireplace, it’s recommended to have the center of the TV at eye level when sitting down, which is roughly 40-45 inches off the ground. And I would avoid putting it above a fireplace, as it can get quite hot up there, and sooty if it’s a wood-burning fireplace. Find a nice painting to decorate the mantle instead of putting at TV!
So, once you figure out where the mount should be, go ahead and mark the location of the lag bolts using the mount. As an extra check, I drove a small nail horizontally at 1/4 intervals to figure out where the edges of the studs were, just to be sure, as hitting the edge of a stud will cause it to crack. After that, I screwed in the mount on the wall with drywall screws, to make things a bit easier. I also marked the opening I’d poke to pass the wiring through the wall. Next I took out the mount to cut out a rectangle with an exacto knife (use a drywall saw if you have one). I made another such opening on the botton, where the wires would come out. I then installed a low voltage flange you can find at a hardware store and a nose plate which you can find at Monoprice or Fry’s.
Next I passed the wires. I decided to get wires for all the ports my TV has, with the exception of the side ports and optical audio out. So that makes for a VGA+audio cable, coax, digital audio out, 3x HDMI and 2x component. Get lengths of at least 12ft, otherwise they may be too short.
Once that’s done, it’s time to have a good friend help you out to take out the TV pedestal, scew in the mounting brackets and ceremoniously hook the TV on the wall.
And for the final touch, I’ve added some low voltage LED bars from Ikea
unhandledexception.net 



















