Wednesday, February 10, 2010

Verizon FiOS Remote Codes for Xbox 360

I found this to be useful. I didn't feel like shelling out a bunch of dough for the Microsoft brand remote when I already had the universal remote that came with my Verizon FiOS. They use a Phillips brand RC144 5302 remote (I've read the older one is 5301 and this code might work there as well). You can find the model number on a sticker in the battery compartment. Anyway, the remote code doc says to use code 0549 on the DVD setting. While my remote happily accepts that code on that device, it does not appear to control my Xbox 360 at all. Maybe that's for older Xbox 360 revision as my unit is only a year old as of this writing.

So I went to the user manual at http://onlinehelp.verizon.net/consumer/bin/pdf/Philips RC1445302 User Guide.pdf and noticed a peculiar device under Video-VCR that was branded Microsoft. I didn't know they made VCRs. I also saw Media Center PC under the Video - DVD section. They both had code 1999. In fact there was at least one other vendor with that code at a quick glance. So I programmed the remote:
  1. Hold down the DVD button for 2 seconds
  2. While still holding the DVD button, press OK. All the device lights should light up.
  3. Enter 1-9-9-9 on the number pad. The DVD light should blink after a moment. If all the devices light up once for a longer time, then it did not accept the code. I don't know what to tell you other than try again in case you fat fingered it, verify the remote control model on the label, or try that 0549 code which didn't work for me.
  4. Test it out!
Notes:
  • This may work on the AUX device slot as well, I did not try it. However, I do know that some codes are not accepted on some device slots (that 0549 code entered correctly on DVD but not AUX, and it didn't work anyway but that's besides the point).
  • The universal remote control's Power button turns on/off the xbox immediately. That is, there is no menu as when you hold the big Xbox Logo button on a wireless controller.
  • The arrow buttons map to the D-Pad (or perhaps the stick) and function intuitively.
  • The OK button seems to map to the Xbox A button, or at least the Xbox dashboard handles it in an intuitive fashion. I am not sure what the correct button is that maps to Xbox B button but Menu seems to kick you out of a movie you are viewing and puts you back at the Netflix menu.
  • The Info button toggles the time display overlay at the top of the screen on Netflix.
  • I have not tested the color buttons (the ones that Blu-ray devices seem to use) to see if they map to other Xbox buttons, but that would be icing since they are not really needed to watch movies.
  • If you find any other useful buttons feel free to post them in the comments. Also if you have another model remote control from Verizon and found another code or that this code works too, please share.
Enjoy!

Tuesday, January 19, 2010

Why .NET Heralds the End of Intelligent Software Developers

These are sentiments I have felt for quite sometime, but have never written down, at least not in such length or breadth.

I believe that exclusive use of .NET is really causing the dumbing down of programmers. It's astounding how few people recently finishing their undergraduate degree know nothing at all about what is going on inside a computer or how their poor code or sloppy algorithms are thrashing the TLB, or D-cache, or harddisk or even have the slightest clue how to implement some code ouside of .NET. Don't even bother them with any kind of pointer math, algorithms, or data structures. I also feel that Microsoft's flagship language for the CLR, C#, is just a copy of Java that came 5 or 6 years later. Just compare the language rules, package framework, garbage collection, dynamic recompilation and bytecode (not exactly unique to Java either), and syntax of C# 1.0 and Java. It was basically Java with C++'s ":" operator for inheritance instead of Java's extends/implements keywords. Also, Generics were added in C# 2.0 which are just a rip-off, both syntactically and conceptually, of C++ templates except not as powerful (template methods and partial specialization not supported in 2.0 as far as I know for starters) and again 15+ years late to the game.

What do you get for all of the complexity? The most common pro I hear for C# v. C++ is garbage collection... if that's what you're looking for use RAII and stack allocated wrappers to clean up for you (e.g. auto_ptr, boost::shared_ptr, etc...). Have you ever seen a correctly written C# or for that matter Java loop exhaust the memory? Do you hate inserting artificial scopes (is that even possible in C#) or slow function calls in a loop to work around these issues? Don't you wish you could manage the allocation yourself sometimes? Too bad. The second most common is that you don't end up with NULL pointer dereferences... well you still end up with a similar number of "reference not set to instance of an object" errors which are exactly congruent and harder to guard against. In fact it's probably even worse because you cant check for equality with NULL first before dereferencing, except for the rarely-used "nullable types" which can then have the NULL pointer dereference issue again.

To draw an analogy, the creation of C# is kind of like the automatic transmission: most real auto racing is still done with some variant of a clutched manual transmission (except for some drag racing where shifting has to be really fast). Also I find that driving a manual transmission makes me more attentive, have more control over the vehicle, have a safer and easier merge onto the freeway (since I can choose when my transmission downshifts), and have a better chance and more responsiveness in the case of a crisis. In fact, if I had access to some accident statistics, we might find that drivers of manual transmission cars have fewer at-fault accidents per-capita (just speculating here, but would not be surprised). Thus, it's my personal experience that many more people knew at least something about cars and how they work in the past, versus now. In fact, if that manual shifting behavior was undesirable, you wouldn't see so many Manumatic systems in AT cars. You can argue that the car is "more accessible" now, but I argue that it is less flexible and it's users more lethargic or ignorant. That might boost sales, but I wager there would be few people still riding a horse if there were only MTs or if ATs were a special order options for those with a physical handicap preventing the use of MTs. Sorry to take so long to draw a parallel, but I think this is directly analogous to .NET. It's "a way" to do things, but it should not be "the way", is seldom if ever "the right way", and often is not even "a good way".

If you think that my disdain for .NET is an indication that I am some bitter old engineer from the '60s or '70s, I am actually in my 20s and thankfully just missed the fine line between when they stopped teaching "real" programming in school. And by the way, I used to work at Microsoft (full disclosure) and I left of my own accord, but not because of .NET :)

I originally posted this here, but I thought that I liked the response enough to post it on my personal blog.