Profilo di BenNo Brain, No PainFotoBlogElenchiAltro Strumenti Guida

Blog


16 gennaio

Just trying to jinx the Jetta

I'm throwing caution completely into the wind and telling everyone:  If I can make it another month, the Jetta will have gone an entire year without a check engine light!!!!!
 
That's not to say the Jetta has been trouble-free in the last year; rather:
 
  • the driver-side door lock module broke
  • the front swaybar had to be disassembled and lubricated
  • the passenger seat heater broke (which is one of the reasons I bought the Jetta in the first place, my wife likes seat heaters!!!)

But considering the car has never gone more than 5-6 months before that stupid light came on in the last 5 years, I think I have officially made a breakthrough!!!

Of course, it still has to go another month ;-)

Ben

Why are two musical instruments always louder than one?

Yeah, this is another of my "I can't believe he's asking such a dumb question" questions:
 
Say we have a stringed instrument playing an 440Hz tone (e.g. A over middle C in standard tuning).  If another person comes along with another instrument and starts playing a 440Hz tone, the amplitude of the sound always becomes louder.  Duh, eh???  :D
 
But here's what I don't understand:  If the 2nd player started playing the 440Hz note exactly 1.137 milliseconds after the first person started playing the note, the sounds waves emanating from the two instruments should be 180 degrees out of phase, cancel each other, and you should hear nothing but silence.
 
Obviously, this never occurs.  Why?  Do excited strings naturually fall into phase with one another?  Is there something odd with sound waves that prevents this from happening?  If so, then how do the Bose noise-cancelling headphones work?
 
G'luck!
 
Ben
12 gennaio

Ben's 2008 F1 Predicitions

Every year I make F1 predictions and almost always, the events unfold throughout the year to prove me wrong ;-)  Actually, my kids are starting to use my flawed predictions to their advantage; for example, when I pick a line at the grocery store, it's always the one where the people ahead of us have items not in the price database, arguing about the price items ring up as, writing checks without an ID, blah blah blah.  So, being brighter than myself, they go into the line I *don't* pick.  So far, it's been working pretty well.
 
Anyway, I think the 2008 season is going to be fantastic, with more twists, turns, and drama than 2007.  Here's the main lines I think we'l see:
 
  • Kimi continues his momentum from last year, builds a comfortable lead in the Championship and maintains it through the year, never really being challenged.
  • Massa gets a couple wins but as the season progresses, he starts falling further and further back as he comes to the realization that Kimi's faster than he is, and his chances for a World Championship are only a dream
  • Hamilton has a bit of a "sophmore slump" and only gets 2-3 wins and scores less podiums than his frankly incredible 2007 season.  Nonetheless in the grand scheme of things, it's still a unbelieveable result for a driver in his 2nd year, and he continues to have as much desire as ever.
  • Heikki scores no wins, but has several solid podium performances, with at least one 2nd place.  Even though he doesn't do fare as well as Hamilton, the dream of a World Championship is untarnished.
  • Renault struggles a bit early in the season, but makes steady progress throughout the year to the point that Alonso is regularly on the podium in the 2nd half of the season, and he wins 2 of the last 3 races.
  • Piquet... no clue, but I liked his dad!
  • With Hamilton and Alonso not scoring quite as many wins and podiums as last year, BMW steps up and scores several podiums through the year, including a somewhat unlikely win in a race with some unusual twists.
  • Williams does better than last year, with Rosberg scoring a couple of podiums.  But he starts getting restless watching his contemporaries (Hamlilton, Heikki) pulling away from him.
  • Honda improves a fair amount, but remains far behind BMW and Renault.  Barrichello becomes even more Zen-like,  uttering phrases like, "the race, it was."  Button soldiers on but begins to realize that he will inevitably end up with Panis and Alesi--outstanding drivers with, sadly, only one win to their credit.
  • Toyota holds station, but Glock is a bit of a relevation in that he consistently beats Trulli.
  • Red Bull also holds station, with a season earily simiar to 2007--surprising speed with bad reliability.  Webber starts getting flaky at the end of the season, as he comes to the realization that bad luck and bad timing is going to trump his talent, and prevent him from ever seeing a win.
  • Torro Roso:  Oh boy...  I think Bourdais is a remarkable talent, but the car holds him back.  But Vettal's excellent, too.  One of them gets a surprise podium during the year.
  • Force India:  I'll be honest, I *love* teams with national pride, like Ligier and Prost.  But Mallya's no dummy, and by mid-season he'll realize that he's dumping tens of millions of dollars into a project with no chance of being anything but a backmarker.  By the time the season is 3/4 complete, rumors will run rampant that he's trying to sell the team, and at the end of the season they will announce the team will be sold...  back to Eddie Jordan!!!

Seriously, though, I think this will be the best season since the early 90's, and I chalk it all up to Michael Schumacher:  I think we're currently seeing the strength of the drivers who grew up during his dominence:  Hamilton, Kovalainen, Rosberg and most of all Alonso, who went head to head with Michael--and beat him.  They saw his speed, his commitment to win--always.  And it raised their game far beyond where they would be, had he not been on the scene.

Cheers!

Ben

05 gennaio

Real-world examples of bad developer habits

This blog is a lot like the band Spinal Tap: its audience is pretty, umm, "selective."  But that's been changing over the last month, as I see a steady stream of visitors who can't get Ventrilo 3.0.x to work and are looking for solutions.
 
So since it's obvious that lots of people are still having problems with Ventrilo, I went to the Ventrilo web site to see if they had an updated version of the client, or at least some information on what exactly was happening.  Instead, I found this explanation of the problem which actually irked me a bit, as they're making some classic developer mistakes that I've seen occur time and time again over the years.  Here's some excerpts:
This is accomplished by letting an application on the internal network send requests to any machine on the outside network either via UDP or TCP and any replies from that specific IP/Port will be allowed to come back into the local network and routed to specific machine that sent the initial request.
Bad assumption.  While this is certainly expected functionality for TCP connections, it's not true for UDP; compare the UDP RFC and TCP RFC for a more detailed explanation.  But that's the whole point of UDP:  it's a minimal, stateless protocol with doesn't impose any rules as to how to use it.  The downside of this is that there's no guarantees as to what a firewall or router will do once they see an outbound UDP packet.
If you are using an SPI based router then you should not be having any problems what so ever unless you have turned on some kind of option that tells your router to block all inbound traffic except for certain ports like HTTP, POP3, SMTP, FTP, etc.
Another bad assumption.  Yes, it's very common that by default, SPI routers and firewalls will start listening for incoming UDP packets once they see an outbound packet.  But ISA 2006 is an SPI router/firewall, and it doesn't do this by default.  And based on the number of people having Ventrilo connectivity issues, ISA 2006 isn't the only exception to this "rule".
The Ventrilo software was developed behind an SPI router and tested by many people using different types of SPI based routers.
This one actually made me cringe a bit, only because I've seen this happen so many times before.  Usually it's in the form of the following exchange:

QA: Hey...
Developer:  What's up?
QA: That new feature you built is crashing the program.
Developer:  Hmm.  It works fine on my machine.

I can't count the number of times I've seen developers dismiss bugs and errors as some bizarre, "one-in-a-million" aberration that in an miraculous Act of God, somehow occurred on the computer down the hall.  The truth is that if you're seeing a problem on one or two QA boxes, you're going to see it on many more machines once the code goes into production.

What the developer should do is beef up the error handling code in order to pinpoint what's occuring, and then fix the code.  For what it's worth, typically when I see this interaction between development and QA, it's a sign of non-robust code.

Since I'm a believer in not bringing up a problem unless you have a potential solution, here's what I'd suggest to the Ventrilo development crew:

  1. Establish the initial connection to the server via TCP, not UDP.  Since TCP is so well defined, you're much more likely to be able to establish a TCP connection than getting two-way UDP to work.  Also, since the Ventrilo devs seem a bit paranoid about network admins blocking ports, establish the first connection on port 80.
  2. Once that connection is established, send a UDP packet to the server and see if you can get a reply.
  3. If you receive a UDP packet, start using UDP communications and all the features/advantages that come with it
  4. Conversely, if you didn't receive a UDP response after sending out the UDP packet, stick with the TCP connection like the v2.3 client did

Looks like a win-win to me, people who can support UDP communications get the advantages that UDP can bring, but if someone's network doesn't support UDP as Ventrilo needs it to, they still get the functionality of the old Ventrilo client.

Ben