5

My Notes On Learning Python Coming From Perl


Posted by Artem Russakovskii on October 9th, 2008 in Programming

Updated: January 2nd, 2017

image

I’m learning Python. Since I’m currently primarily a Perl coder, I decided it’d be a good idea to post and keep track of my experiences coming from heavy Perl. I have a few reasons for learning Python, which are:

  • to see what else is out there and broaden my horizons.
  • to keep my brain active by feeding it new tasty information every day.
  • to become a more valuable employee and potential future candidate.
  • to learn a new language, especially one used by giants like Google.
  • to learn a new OO language, as I’m tired of Perl’s hacky OO.
  • to build GUI applications. GUI in Perl is a big pain. I’ll see about Python.

So, without further ado, here are the …

Read the rest of this article »

0

A Chilling Sight – We Are All Doomed


Posted by Artem Russakovskii on October 9th, 2008 in Stuff

Updated: October 15th, 2008

Worst thing I’ve ever seen…

image

image

 

 

Edit: Oh, and this just knocked the wind out of me: this is the rate of return in my 401K account this year:

image

Edit #2: nope, that wasn’t the worst. Today (Oct 15, 2008) beats them all:

image

image

Read the rest of this article »

14

MySQL Slave Lag (Delay) Explained And 7 Ways To Battle It


Posted by Artem Russakovskii on September 5th, 2008 in Databases, Programming

Updated: September 16th, 2012

http://forge.mysql.com/w/images/1/1e/Dolphin_Laptop_cropped-386x222.jpgSlave delay can be a nightmare. I battle it every day and know plenty of people who curse the serialization problem of replication. For those who are not familiar with it, replication on MySQL slaves runs commands in series – one by one, while the master may run them in parallel. This fact usually causes bottlenecks. Consider these 2 examples:

  • Between 1 and 100 UPDATE queries are constantly running on the master in parallel. If the slave IO is only fast enough to handle 50 of them without lagging, as soon as 51 start running, the slaves starts to lag.
  • A more common problem is when one query takes an hour to run (let's say, it's an UPDATE with a
  • Read the rest of this article »

27

Thoughts on Google Chrome


Posted by Artem Russakovskii on September 3rd, 2008 in Technology

Updated: September 5th, 2008

So Google Chrome – Google's attempt at an open source browser, came out yesterday and I took it out for a spin. At its heart is the Webkit engine (also open source) and Google Gears, powered by SQLite (can MySQL rival SQLite in applications like this?). Here are my thoughts.

image

  • Fast – Chrome loads extremely fast, blazing even. Granted, my Firefox would probably load fast if I didn't have any addons as well. Sites like Amazon or Digg load very fast. New tabs open instantly.
  • Slow – http://www.blinkx.com/videos/channel:itn, seems like the combination of flash and html (or JS) on one page makes scrolling and redrawing quite slow.
  • Very fluid design – I love how the tabs flow around
  • Read the rest of this article »

8

Hug A Developer Day


Posted by Artem Russakovskii on September 1st, 2008 in Programming

Man, this video hits too close to home. Developers all over the world are in pain, so go ahead – hug one right now! Dedicated to all developers at blinkx, MySQL, and beyond.

Read the rest of this article »

10

Moving From Perl 5 to Perl 6 – What's New, Tutorial Style


Posted by Artem Russakovskii on August 22nd, 2008 in Programming

Updated: August 28th, 2008

imageNewsflash: Perl 6 is not dead (in case you thought it was)!

I stumbled upon this most excellent series of posts by Moritz Lenz of perlgeek.de that describe the differences between Perl 5 and the upcoming Perl 6 (thanks to Andy Lester for the link). The posts are done in the form of tutorials, which helps comprehension. Simply awesome, Moritz.

It seems like Perl 6 is going to be a lot more object oriented, but such orientation is optional and not forced upon programmers, like in, say, Java. It warms my heart that I will be able to do this (you did see the new "say" function in Perl 5.10, right?):

1
2
3
my Num $x = 3.4;

Read the rest of this article »

1

Debugging Weird sshd Connection Problems + What Happens When You Stop sshd


Posted by Artem Russakovskii on August 15th, 2008 in Linux

So the other day I was setting up public key authentication for one of my users, which is usually very straightforward: generate a private/public key pair, stick the private key into user's .ssh dir, set dir permissions to 0700, private key permissions to 0600, stick the public key into the authorized_keys file on the server, and the job's done. However, this time, no matter what I was doing, the public key was being rejected or ignored and the system was moving on to the keyboard-interactive authentication.

Debugging on the client side with -v didn't help much:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
artem@DeathStar:~/svn/b2/Fetch/LinkChecker> ssh -v 

Read the rest of this article »

1. I want to download and play FLVs on my computer.

2. I don't want to use some crappy FLV player that only plays FLVs and has an interface from either 1995 or 2034 – I want to use my favorite player, like Media Player Classic.

3. Yes, VLC plays FLVs but it can't fast forward or rewind them. Yes, mplayer plays FLVs but I want a GUI. Yes, mplayer supports GUIs but they all pretty much suck. I don't particularly like VLC's or mplayer's interface – want to fight about it?

Enter the latest version of ffdshow. ffdshow is a decoding filter – think of it as a set of codecs for your media players. It supports …

Read the rest of this article »

13

How To Find Out The Number Of Videos On Youtube


Posted by Artem Russakovskii on August 14th, 2008 in Technology

Updated: September 16th, 2012

image According to Wikipedia, in April 2008, the number of videos on Youtube was 83.4 million (ref: http://en.wikipedia.org/wiki/YouTube#cite_note-5). However, the link in the cite note now displays “*” video results 1 – 20 of millions, without showing the real count.

Here's one way I found to get an estimated, but relatively accurate, number of videos on the popular video sharing site Youtube. The idea is simple. Get this feed: http://gdata.youtube.com/feeds/api/videos/-/* and parse out the number inside the <opensearch:totalresults> tag.

So here it is: the number of videos on Youtube is currently fluctuating between about 141 million and 144 million. The number goes up and down, which points to the fact that these are estimates.

That's a whole boatload …

Read the rest of this article »

Apache stopped starting today for no apparent reason.

1
2
3
4
5
6
7
rcapache2 restart                            
/usr/sbin/httpd2-prefork: symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init
Starting httpd2 (prefork) /usr/sbin/httpd2-prefork: symbol lookup error: /usr/sbin/httpd2-prefork: undefined symbol: apr_ldap_ssl_init
 
The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
                                                                      failed

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
failed

So I tried reinstalling libapr and apache2-utils related stuff with no luck. ldconfig didn't help either. It's not until I looked at /usr/lib and relinked a few things that it started working. What the hell, SUSE?

8

Google PageRank Update Happening Now


Posted by Artem Russakovskii on July 26th, 2008 in Beer Planet

Google PageRank As Matt Cutts (Google's SEO and search quality expert) wrote in his blog entry a few days ago, Google PageRank updates are underway. Google updates PR (Page Rank) quite rarely – every three months or so, and it's the most important thing a website operator should be concerned with when it comes to site promotion and popularity.

I'm happy to report that Beer Planet's PR went up yet again on this update, from 3 to 4 and my buddy Thaya's PR went up from 2 to 3. He's been blogging a lot more about WordPress, and I think he'll surpass me very soon, thanks to his ingenious plugins.

Is it time to check your site's PR? You …

Read the rest of this article »

3

How To Check If The Local SVN Revision Is Up-To-Date


Posted by Artem Russakovskii on July 23rd, 2008 in Linux, Programming

I've encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn't have a dry-run option, so I had to find another solution.

I came up with 2, depending on how detailed the information needs to be, which I'm about to share in this post.

1. If you want exact file and directory names, you can run:

svn status -u

If any files need updating, you will see a * before the file name.

svn status wc
M     wc/bar.c
A  +   wc/qax.c

svn status -u wc
M            965    wc/bar.c
       *     

Read the rest of this article »

I just saw this on TV and had to look it up and post. The guy that looks like a tank made out of meat is Brock Lesnar. In his first UFC match, he's fighting the former UFC champion of the world, Frank Mir. At first it seems the outcome is clear but the fight surprisingly ends in mere one and a half minutes. Here's the replay: …

Read the rest of this article »

If you are experiencing a weird feeling in your pants, it's normal. Here's to hoping they won't fuck it up. http://www.imdb.com/title/tt0409459/

Read the rest of this article »

6

Jason Bourne 4 is a Go, To Be Released in 2010


Posted by Artem Russakovskii on June 27th, 2008 in Beer Planet

Updated: July 26th, 2008

image One of my most favorite movie series is not over yet. This is excellent news!

Producer Frank Marshall revealed plans to begin shooting a fourth Jason Bourne movie next Summer, for release in 2010. Universal announced the project back in February, with director Paul Greengrass and star Matt Damon set to return. Marshall also confirmed that they will probably be creating an original story for the fourth film.

read more

Read the rest of this article »