image The Problem

I use a lot of extensions. A LOT. They slow down my Firefox while giving something useful in return. Most of them are harmless and do not affect the speed too much but there are select few that are just CPU, memory, and performance hogs.

Until Firefox gets an extension manager that can show what the impact from each extension on time/CPU/memory is, one can resort to guessing, disabling, testing, and looking for clues to find these conniving little bastards.

Anyway, so where was I? Recently, my Firefox became increasingly unresponsive, especially when switching tabs. After some time, it was a pain to switch tabs altogether, so I had to resort to restarting the browser, only to …

Introduction

A question I recently saw on Stack Overflow titled Faster way to delete matching [database] rows? prompted me to organize my thoughts and observations on the subject and quickly jot them down here.

Here is the brief description of the task: say, you have 2 MySQL tables a and b. The tables contain the same type of data, for example log entries. Now you want to delete all or a subset of the entries in table a that exist in table b.

Solutions Suggested By Others

DELETE FROM a WHERE EXISTS (SELECT b.id FROM b WHERE b.id = a.id);
DELETE a FROM a INNER JOIN b on a.id=b.id;
DELETE FROM a WHERE id IN (SELECT id FROM 

Updated: June 10th, 2009

Introduction

In this article I’m going to discuss a number of useful Firefox extensions and tips. This list is not a “COMPLETE GUIDE TO FIREFOX!!!111!” but a collection of some, albeit many, extensions and techniques I find useful, with detailed descriptions and illustrations. I try to make my reviews as personal as possible and express my own points of view, so I will not be using any boring official descriptions altogether. Short, concise, and useful – that is my goal.

Right now I use 53 extensions in total. If you think that’s a lot, you might be right. However, because Firefox is so mature and new extensions come out every day, it is not as crazy of a number …

7

The Real Reasons To Use Twitter (Get Over Your Prejudice Already)


Posted by Artem Russakovskii on April 9th, 2009 in Technology, Twitter

Updated: May 22nd, 2009

http://www.fly4change.com/wp-content/uploads/2009/02/twitter.jpg

Introduction

Let’s face it – the majority of the population doesn’t understand twitter. They don’t get its true value – all they see is an obnoxious social network full of exhibitionists tweeting about millions of mundane things of every minute of their lives.

Except, twitter is much, much more than that. In addition to all the wankers talking about themselves 24/7, of course. Twitter is what you make it to be. You can follow boring, uninteresting people with interests in growing cactuses (cacti?) and collecting fur balls. But you can also follow people sharing piles of interesting and useful information (see bullet points below). Just do me one favor and repeat after me: twitter is not only for publishing your …

2

[Perl] Finding Files, The Fun And Elegant Way


Posted by Artem Russakovskii on April 8th, 2009 in Awesomeness, Linux, Perl, Programming, Tutorials

Updated: October 6th, 2009

No matter what programming language you use, there comes a time when you need to search for a file somewhere on the file system. Here, I want to talk about accomplishing this task in Perl. There are many ways of doing so, most of them boring, but I want to discuss the fun and elegant way – using File::Find::Rule.

Let me briefly discuss some of the other methods first.

Limited

Using glob() (or <>, TODO verify) you can find files in a single directory, using only the limited shell wildcard support. For example,

1
my @files = glob("tmp*");

I prefer glob() to <> because glob()'s parameters can be more than just text (for ex functions) while <> treats everything

Updated: June 9th, 2009

Introduction

If you, like me, are building or thinking of implementing a MySQL-powered application that has any need for prioritizing selecting certain data over other data, this article is for you.

Example

As a real world example, consider a queue-like video processing system. Your application receives new videos and processes them. The volume of incoming videos can at times be higher than the processing rate because the process is CPU bound, so occasionally a pretty long queue may form. You will try to process them as fast as you can but…

Note that I am using a queue here, so the the next item to be processed is a result of sorting by some sort of field in a ascending

Updated: September 16th, 2012

Recently I read an article on the Six Revisions blog that discussed 10 seemingly simple improvements to the twitter interface. They included such things as nick autocomplete, mentions, groups, and more.

You could only dream about such twitter improvements… that is until you use the Troys Twitter script. Just perform the following steps and you will have the features I describe in this article. Here we go:

  1. Install Firefox (you already have that, right?)
  2. Install the Firefox greasemonkey extension
  3. Install the Troys Twitter script

Greasemonkey is the most versatile extension available for Firefox, as it’s essentially a whole framework for scripts that can manipulate any aspect of any page. Head over to userscripts.org and take a look at the myriads

Updated: March 10th, 2009

image I could not be more excited about the upcoming Starcraft 2. Announced in 2008, a whopping 10 years after the first Starcraft release, the news sent shockwaves through millions of Starcraft fans, myself included.

I’ve been watching and anxiously awaiting the release and, while the final release date is unknown at this point (I'll update the post when it is announced), I’ve assembled a list of current Starcraft 2 facts, summarized as bullet points.

But before I get into that, here’s the most important part you need to know to be able to get your hands on the game right after it’s released and play online ($49):

Updated: June 9th, 2009

Problem

While writing a 1093985th Perl script the other day I was facing the following dilemma:

  • Let’s say there is a local library, called TheUberLib.pm. It is so uber that most of my scripts, located all over the machine, include it.
  • Now, let’s also say that there’s an even more uberly important binary called run_me_now_or_you_will_die but the only way to find it is by using a relative path to the aforementioned TheUberLib.pm, for example ../bin (RELATIVE TO TheUberLib.pm).
  • I don’t want to hardcode the path to run_me_now_or_you_will_die because it can be different on multiple machines and the code wouldn’t be robust enough – all I know is that the path is relative to an included library.

So …

2

IntenseDebate Introduces Plugins


Posted by Artem Russakovskii on March 5th, 2009 in Wordpress

image IntenseDebate, a popular WordPress comment enhancer recently acquired by Automattic (the creator of WP), just announced plugin support. It’s a nice touch to the already useful commenting system that allows threading, easier comment moderation, reputation, voting, etc.

Let’s have a look at some of the announced plugins. Here’s what the comment block looks like with plugins enabled:

image

PollDaddy

This plugins allows you to add a poll to your comment. By the way, PollDaddy is also an Automattic brand.

image

Seesmic

Seesmic enables video comments that you can record right off your webcam.

image 

YouTube

I think this one is self-explanatory – you can easily insert youtube videos into your comments.

image

Smileys

Adds smiley support.

image

You can activate the plugins by …

Updated: July 1st, 2010

image From time to time my, still curious, mind accumulates a variety of questions and concerns which it has to spill onto the pages of this blog. How random are these? Pretty damn random, and I need to see some answers, quick. Oh, and I’m deliberately not searching Google, as I want to facilitate discussion. What fun would it be if I just looked up all these?

Password Protected Garage Door Remotes

As a paranoid person and a recent homeowner, I started to wonder how safe I actually am in my house. Consider this likely scenario that nobody seems to be concerned with:

I park my car outside for one night and don’t take out my portable garage door remote, the

30

Swapping Column Values in MySQL


Posted by Artem Russakovskii on February 17th, 2009 in Databases, Linux, MySQL, Programming

Updated: September 16th, 2012

Today I had to swap 2 columns in one of my MySQL tables. The task, which seems easily accomplishable by a temp variable, proved to be a bit harder to complete. But only just a bit.

Here are my findings:

  1. The

    UPDATE swap_test SET x=y, y=x;

    approach doesn't work, as it'll just set both values to y.

    PostgreSQL seems to handle this query differently, as it apparently uses the old values throughout the whole query. [Reference]
  2. Here's a method that uses a temporary variable. Thanks to Antony from the comments for the "IS NOT NULL" tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This method doesn't swap the values

Updated: June 9th, 2009

image Introduction

Clickjacking is a malicious technique of tricking web users into revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages. A vulnerability across a variety of browsers and platforms, a clickjacking takes the form of embedded code or script that can execute without the user's knowledge, such as clicking on a button that appears to perform another function (credit: Wikipedia).

Clickjacking is hard to combat. From a technical standpoint, the attack is executed using a combination of CSS and iFrames, which are both harmless web technologies, and relies mostly on tricking users by means of social engineering. Additionally, the only server side technique against clickjacking known to me is “frame breaking

0

'Carwars' by Funeral Party


Posted by Artem Russakovskii on February 11th, 2009 in Awesomeness, My Favorites

I don't simply post videos and links anymore but I had to this time: can't stop listening to this song. Thanks @mkfrantz.

'Carwars' by Funeral Party

8

Driving To Work Sucks Or My Top 11 Reasons To Take Public Transportation


Posted by Artem Russakovskii on January 15th, 2009 in Stuff

Updated: January 18th, 2010

image After I graduated and got a job in downtown San Francisco, I spent the first 2 weeks trying to figure out where I could park cheaper. At $300-400 for a monthly spot or $15-30 daily, the fees started adding up really quickly. In fact, I am fully convinced that 80% of the people who can afford to park in downtown expense it in full.

I do not know why I haven’t thought of public transportation sooner. Maybe because I used to [so wrongly] associate it only with people who cannot afford a car and considered myself superior to the group, or because I thought it was too ghetto (though, very true in some cases). However, as soon as I started …