Archive for January, 2008

Published by nick on 25 Jan 2008

Pretty cables

Royal Pingdom has assembled this collection of photos of very well done cables. Here’s one sample:

See the complete gallery

I appreciate someone who takes their work this seriously. I also wonder how much time this takes over doing it the easy way. And then I cringe at the thought of one of them having to be pulled out. Shouldn’t function be considered as well?

Oh well. They are still neat to look at.

Published by nick on 21 Jan 2008

Yahoo layoffs coming?

Rumor mills are circulating that there are major layoffs coming soon. Since I work at Yahoo! (YHOO), I’ll document some thoughts.

I think a layoff at Yahoo! would be a good thing.

  1. Cut some fat - The company has a bunch of smart people, amongst the brightest I’ve ever worked with, but there are so many of us that most projects are overstaffed. How can something be overstaffed? As the number of people working on a project increases, so does communication expense. Everyone spends all of their time talking to each other and getting each other "on the same page". If you haven’t read the Mythical Man Month, I encourage you to do so. This concept is covered in detail.
  2. Hunker down - Yahoo! should also prepare properly for the upcoming recession, brought on by the Subprime Lending crisis and 8 years of leadership by the worst president in history. Now is a good time to trim expenses and have more cash laying around.
  3. An Answer Wall Street’s calls for major change - Heads rolling is often symbolic of a company that "means business" and is willing to take serious action for change. Having a big layoff will stop everyone from saying that Yahoo! Management isn’t doing enough.

Wait a minute! I work there. What about me? I feel pretty safe. I was recently promoted, I work on the companies current #1 top-secret initiative, of which I am an architect for an essential piece of it, and I just booked a trip to England to get to know the rest of my team better.

But even if I get the axe? I’d enjoy a nice severance package and the opportunity to look around at all the exciting opportunities in the Silicon Valley, like wikinvest.com, wikia’s new search, and other startups. I get 5-10 job solicitations a month — so the problem won’t be finding a new job, but deciding which opportunity is the best vehicle for my talents.

Published by nick on 09 Jan 2008

Checking for connection speed in Linux

Sure, you have a Gigabit card, but how can you check to see what speed you are running at in Linux? All your networking equipment must be Gigabit for it to work. There are two tools to do this, /usr/sbin/ethtool and /sbin/mii-tool

sudo /usr/sbin/ethtool eth0
Password:
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0×000000ff (255)
Link detected: yes

Enjoy.

Published by nick on 04 Jan 2008

Ultimate Squid Init Script for Stop Start Restart

 I took some time to improve upon someone else’s squid init script for Linux. I’m sharing it here:

    http://www.techyouruniverse.com/squid-init-script/

   Notable improvements: 

  • Added clearcache method for clearing the squid cache. Surprisingly, this isn’t built into squid, and when you restart squid, you only clear the cache that is in memory. This clears the cache that is on disk too. Usage:
    /etc/rc.d/init.d/squid clearcache      

  • Added configtest method for checking syntax of config file, just like the one for httpd.
  • Optimized restart/stop for minimum downtime. Notably, the stop was set to allow http connections to die gracefully. I wasn’t happy with this because it caused 10 - 15 seconds of downtime whenever squid was restarted. Changed to use squid -k shutdown instead of squid -k interrupt, which closes the connections immediately instead of waiting for them to finish. Shut down takes 1-2 seconds now instead of 10-15.
  • Cleaned up config variables
  • Cleaned up formatting of output

This script has been used in production for a while, but if you find any issues, please leave a comment so that I can address them. Other comments/ suggestions appreciated. By the way, if you are the original author of the script, I’ll gladly give credit, leave a comment.

Optimize your ads with Liftium.com