Wednesday Sep 26 2007 5:26 pm by Smokinn

I just finished reading Steve Yegge's latest post and one sentence in particular hit pretty close to home:

"Tech lead" is, sadly, another weasel word if you're applying for an individual contributor position, because it's all too easy for your tech skills to rust into oblivion if you spend long enough as a tech lead without helping with the coding.

My official title at work is "Lead Programmer". Is this a weasely title? There are 3 Lead Programmers here at work. The translation for Lead Programmer is basically guy who can get whatever you want done done. Usually he'll do it himself but occasionally he'll make sure someone else does it if it's a better idea they do it (usually because they're the one that coded whatever's bugging). He's also a programmer that takes responsibility for entire projects or features. Regular or probationary programmers just get assigned work and if it breaks it's the Lead Programmer who assigned it to him's fault.

So again, is this weasely? Obviously the position isn't but the title might be. If it is what would a better title be?

Tuesday Sep 25 2007 6:28 pm by Smokinn

Someone asked me today for a quick way to delete all .svn folders.

FileUtils.rm_r Dir["**/.svn"]

Nice =)

Friday Sep 21 2007 8:19 am by Smokinn

Yesterday I realized that the quickest and most reliable way to get in touch with me is to send me a facebook message.

I got off the rink and as soon as I got to my car I head my cell phone beep. I'd either missed a call or a txt message. It was txt message from facebook so I responded and then drove home.

Given that I have firefox open most of the day with gmail notifier I also see all the emails facebook sends me pretty much immediately. I figure soon enough facebook will offer to triangulate my cell location and will always know where I am. Then they'll start sending wireless signals to control our brains and take over the earth.

Thursday Aug 30 2007 12:20 pm by Smokinn

This is absolutely incredible. It's a demo of a smart image resizing algorithm that will blow you away.

Saturday Aug 25 2007 4:44 pm by Smokinn

Say hello to Max and Misha, two new additions to my apartment. They mostly hide under the bed until feeding time and then insist on being petted for a good 30 mins or so after food. They're pretty big (Max especially) but I think they'll get along fine in their new home.

Misha

misha

Max

max

Both together

max and misha

Tuesday Aug 21 2007 3:41 pm by Smokinn

This afternoon we had a bit of a panic moment at work. The db server was choking hardcore and no one knew why. Our hosting company was scrambling to make sure all the servers were find and nothing was causing network congestion or anything like that at their end and we hadn't changed any of our software but everything was crawling.

After messing around looking at some different stuff I noticed that every pretty much every choke was timed with a "Writing to net" in the mysql process list. So I started looking up what "Writing to net" might mean. I happened upon a forum post by Jeremy Zawodny that said that normally we shouldn't be seeing any writing to nets. That's when I started assuming the problem was on the server end. Wrong.

I clued into what was going on when I noticed that the writing to net messages were all on the same query. I only had the start of the query so I looked it up in our codebase and saw that it was doing a join of 3 tables which would end up with a result set of millions of rows. Luckily it was an obsolete query written quite a while ago so I optimized it into a simple count of a number of rows in a table. After doing this we went from having those queries taking 30-90 seconds (according to the time column of show processlist) to 0. Before, all other queries had to wait until this one was done (yay for table locking!) before they could move, so we would have 30+ second gaps on the sites where it would basically be unresponsive.

I'm still not sure what waiting for net is really all about but if you see it it probably isn't good. Especially if it's causing huge bottlenecks.

Sunday Aug 19 2007 12:34 am by Smokinn

For the non-basketball-fans reading, Wilt Chamberlain still has the NBA's highest single season rebound average. But I'm catching up.

I can't believe how similar it was to last time. Again, right when I thought everything would be ok it all goes to shit. You'd think I would've learned.

Sunday Aug 12 2007 4:51 pm by Smokinn

Some sidekicks are currently cooking on my stove one room over. Nothing that would normally merit a blog post except that this time I used the milk I bought probably sometime in may or june. I finished off a 1 litre carton of Natrel milk that apparently expired june 25th. I just tried some though and it still seems fine. I have no idea how they make it so it lasts so long.

If I die tomorrow I have no regrets.

Update: Still alive

Friday Aug 10 2007 9:13 am by Smokinn

Ok, well if you look on the right of this blog, you'll see a pandora bar. I usually find those plugin bars really tacky but pandora is great so I put it anyway.

As any of you who use (or used) pandora probably already know, pandora blocks ips outside the US. At first I tried getting around it by using open proxies but finding one with decent bandwidth off google is next to impossible. So now I have a better solution: Tor. Basically Tor is an anonymizer that bounces your request through a few other computers so that it's probably almost impossible to tell where it's really coming from.

What you need to do is quite simple. First, install Tor. If you're on Windows (like I am at work), I recommend Vidalia for a nice painless install. Then, you'll have to bounce around servers finding one that has decent bandwidth and is based in the US. There are a few but for some reason something like half the time I end up routed through Germany. Anyway, just request new identities until you find one that works. To check if it's based in the US keep refreshing this page. Once you're coming out of the US, check to see if the bandwidth is ok by loading up Pandora. If it is, jot down the nickname found on the torcheck page, you'll need it later. I recommend you find 2-3 servers you can connect to well.

Once you have your nicknames close down vidalia and tor, you don't need them anymore. Start tor from the command line with this command: tor.exe --NewCircuitPeriod 999999999 -ExitNodes [nicknames you jotted down, comma seperated] -StrictExitNodes 1

Now you're permanently connected to US proxies that can stream pandora for you. Woot!

Sunday Jul 8 2007 12:15 pm by Smokinn

Good luck.

After some pretty extensive playing around with ffmpeg I've reached 2 conclusions.

First, ffmpeg's wmv support is shaky at best. You *can* get it to make good wmv files, but it's hard. The only way I managed to make undamaged wmv files is from an uncompressed raw source. Which, for a full video, means the source file was over 50GB. Ouch. Any compression at all in the source, be it mpeg4, mpeg1, even wmv! meant that the output file would have problems.

Another problem I ran into was that making clips from a video is hit and miss. I needed to take a full video and make 1 min clips of the whole thing. With a compressed source the audio would sometimes end up out of sync with the video. I'm not sure but I'm reasonably certain that it was because if you tell ffmpeg you want -t 60 -ss 60 (60 seconds starting 60 seconds into the source), the audio starts exactly at 60 but the video starts at the closest (or next, not sure) keyframe. The solution for this is the same as for the wmv, you need to start with an uncompressed raw file.

The problem with the uncompressed raw file (other than space which wasn't really a problem since I had a couple of TB available) is that you run into a Shlemiel the painter's algorithm problem. It's super quick (well as quick as video conversion can be since I was running my jobs threaded on a dual dual core server) to make the first few clips but as you get further and further into the video, each time it starts from the beginning and seeks to where you want to be. And in an uncompressed video it takes a long time to seek. My program became hopelessly IO bound so the threading wasn't helping that much anymore and it would take 7 hours to make all the conversions and clips I needed to.

So we gave up on ffmpeg. Sort of. Instead I use a combination of windows tools and we're going to buy a windows server. I start with an mpeg source that I cut up with mpgtx, then I convert all those to wmv with Windows Media Encoder 9 and finally convert them all to flv and mp4 with ffmpeg. All this takes about 2 1/2 hours to run on my desktop and the vast majority of the time being spent doing the wmv conversion. The only reason we have to buy a windows server is because of wmv. Boo.

If anyone has had success converting to wmv with ffmpeg I'd really like to hear it.

Note: I tried mencoder as well but it has an entirely different set of problems with wmv (which is bizarre considering they're supposedly from the same code base!).

About the Site:

I might update. Don't hold your breath though.

About Me:

Name: Guillaume Theoret

Age: 804666127 seconds

Job: Mostly web dev

Some Friends:
Search:

RSS Feeds:

RSS