Skip to content

Blog Entries

על מייק טייסון, הישרדות ועקידת אהוד

מאמר ישן שכתבתי בבלוג של התנועה לדמוקרטיה ישירה...

פעם סבתי שניפטרה ואני שמענו פיסת חדשות בקשר לכך שמייק טייסון, אלוף העולם לשעבר באיגרוף, נאשם באונס ובחבלה. סבתי שאלה אותי בהפתעה: “הוא יודע להרביץ?” “בטח סבתא”, עניתי, “ככה מגיעים להיות אלוף העולם באיגרוף: לומדים להרביץ יותר טוב מכולם!” ואז התחלתי לחשוב על העובדה הזו ומה היא אומרת לגבי פוליטיקה.

אבל אני מקדים את הדיון הזה.

השנה יצא לי לראות כמה פרקי הישרדות. תוכנית מאלפת בכל הנוגע לאופי האנושי, החברה האנושית, אסטרטגיות שכליות ורגשיות ועוד, ולדעתי יותר מחכימה מ”לונדון וקירשנבאום” אם יודעים איך לצפות בה. העובדה הברורה שקושרת את הישרדות למייק טייסון היא ששלושת השחקנים שהגיעו לחצי הגמר היו מן המניפולטורים היותר טובים שבחבורה. דן, נעמה ומרינה ידעו איך לשקר, מתי כדאי לומר אמת, עם מי צריך לכרות ברית, איך לנצל אותה עד תום, מתי הזמן הנכון לפרק את הברית, איך לנסות לתרץ את השקרים ולהציג עצמם כתמימים ואיך לבצע מניפולציות רגשיות.

איני מאשים אותם במאום: הרי להגיע לגמר היתה מטרת המישחק ובגמר אין מקום לכולם. מכיון שההגעה לגמר דורשת מיזעור סיכונים במידת האפשר ותמיכה מכמה שיותר מן המתמודדים אזי הטקטיקות שציינתי הן היעילות ביותר. אותה תוכנית היתה גם מקום מעולה ללמוד מדוע בתחרות שכזו אין מקום למוסר.

מושיק, מן המבוגרים והמוצלחים בחבורה, ניסה לבסס “קוד אתי” שעל פיו יש לקדם לשלב הבא את “הראויים” כהגדרתו. ברור שהאסטרטגיה הזו שירתה גם אותו שכן הוא היה בטוח שהוא מן “הראויים” אולם הנסיון שלו הוא המענין בכל הענין. הנסיון היה ליצור מצב שבו אם משתתף א’ מקדם משתתף ב’ בשל ברית למרות ש-ב’ הוכיח את עצמו כלא ראוי (השתמט מעבודה לדוגמא) הרי שהקבוצה תפעל נגד א’. לפי מושיק בחלוף הזמן הבחירה בעולים לשלב הבא לא תהיה בנויה רק על בריתות, פוליטיקה, שקרים ומניפולציות אלא תתבסס, לפחות חלקית, על ערכם של המיתמודדים. הנסיון של מושיק נכשל שכן כל העוסקים בבריתות, ושמטבע הדברים פחדו מכוחו הגובר בחבורה, זממו והצליחו להדיחו במהרה. מענין.

הצלחה בשדה הפוליטי נקראת כבר זמן רב הישרדות וכולנו צופים בפרקי סידרת הריאליטי “מהדורת החדשות המרכזית” עוד מלפני שריאליטי היה טרנד תיקשורתי. גם שם אני רואה את אותם שקרים ומניפוליציות, אותן בריתות, אותן חציות קוים והיתממות ואותם נסיונות עקרים לקבוע כללי מוסר אשר ינפו את “הלא ראויים”. ההבדל הוא שהפוליטיקה דומה הרבה יותר לאליפות העולם באיגרוף ושם צריך לשכור בלשים פרטיים, צריך לשקר, צריך לחצות קוים בניגוד לאידיאולוגיה, צריך לשחד ולהיות מקבל שוחד ועוד. גם אותם איני מאשים במאום: זהו המשחק שאנו כה גאים בו שניקרא “שילטון נציגים” ובצמרת יש מקום למעטים.

בהישרדות הפרס היה מיליון שקל ורכב שטח ואילו בפוליטיקה הפרס הוא שליטה על תקציב המדינה, מה שמעניק לשולט ולסובביו רווחה כלכלית לכל חייהם, וכניסה לדפי ההיסטוריה כחברי ממשלות ישראל. בנוסף, גם הפוליטיקה מעניקה את החשיפה התיקשורתית שבגללה משתתפים בתוכנית ריאליטי ואין לזלזל בטיבעו הביולוגי של האדם ובשאיפתו, במיוחד אצל הזכרים שבינינו, למעמד של ראש שבט שהיום מושג באמצעות הטלויזיה.

מה מלמדת הדחתו של מושיק על אנשים כדוגמת דן מרידור, בני בגין ועוד? ואפילו יותר מענין: מה מלמדת הצלחתם של דן, נעמה ומרינה על שימעון פרס, אהוד אולמרט וביבי נתניהו? מה חבל שאין לנו מצלמת “טסטימוניאל” אשר מצלמת את אהוד אולמרט, בדומה לדן מנו, מסובב את ראשו, מחליק ידו על עניבתו וצוחק למצלמה: “איזה טמבל המופז הזה! ידעתי שהוא יעבור לקדימה מהתחלה. עוד הצלחתי לשכנע אותו שאני עושה לו טובה שאני תוקע אותו בתחבורה. אני לא מאמין איזה דפוקים יש בתוכנית הזאת!”.

ההפתעה בהישרדות היתה עלייתו של נעם, שהיה תקוע רוב המישחק ב”אי המתים”, לגמר. הוא לא השתתף בתככים, לא שיקר כל כך, לא הכתים את עצמו בעיני הצופים ולמרבה הפלא כמעט זכה בגמר למורת רוחם של המישתתפים האחרים אשר הרגישו, ובצדק, כי הוא הגיע לגמר שלא בצדק. מדוע הרגישו שאר המשתתפים כה נעלבים מהופעתו של נעם? הסיבה שנאמרה על ידם במפורש היא כי נעם לא היה צריך לעשות את אותם תיחמונים שעשו האחרים: הוא לא היה צריך לשקר, להעמיד פני חבר של אנשים שאותם לא סבל, הוא לא היה צריך לשחק “ריגשי”, לא היה צריך לתרץ מדוע הוא מדיח או לא מדיח מישהוא בניגוד גמור להבטחותיו ועוד, בעוד שהאחרים נאלצו להתבזות, לעשות את כל אלו ואף יותר.

אני בטוח שהפוליטיקאים מרגישים בדיוק אותן תחושות בנוגע לרמטכ”לים שמוצנחים ישר לשורה הראשונה בסיעתם אך הם לא יספרו על השוחד והעמדם הפנים שהם עוסקים בה שנים כדי לשמר את מעמדם. קשה.

כאן אני מגיע לעיקר הרעיון: אם אכן אנו מכניסים מאות ואלפי פוליטיקאים לזירה הפוליטית כאשר הקריטריון היחיד להצלחה הוא מניפולציות של הציבור ושל שאר המשתתפים בזירה, היכולת לשקר בלי למצמץ, היכולת לכרות בריתות בניגוד לאידיאולוגיה והיכולת לתקוע סכין בגב לחברים, אז מדוע אנחנו מתפלאים, כמו סבתי, שהאלוף החדש, ראש הממשלה, יודע לעשות מניפולציות כמו שמייק טייסון יודע להרביץ?

לי זה נראה מאוד צבוע. אני הייתי נותן את הזכיה בהישרדות לדן מנו: הוא הרי היה אלוף המניפולציה ולא נעם! מדוע אם כן גם אני הרגשתי שצריך לתת את הזכיה לנעם ולא לדן התחמן? משום שאני לא אוהב אנשים תחמנים.

מה המסקנה לגבי פוליטיקה? אנחנו הצבועים. אנחנו יודעים כי הזירה הפוליטית היא מלוכלכת ואנו יודעים שהאלוף (ראש הממשלה) הוא אלוף התחמנים אולם אנו שונאים אותו על כך ועוקדים אותו. אנו מפילים ראשי ממשלה על ימין ועל שמאל ומהימין והשמאל. האם המישחק המכוער הזה שבו אנו מנפים על פי יכולת מניפולציה ובסוף מתרגזים על דן שזוכה ומאשימים את אהוד בשחיתות הוא לא פשוט נסיון שלנו לנקות את מצפונינו, על מנת שלא ניצטרך להתערב במישחק בצורה משמעותית יותר, ולהמשיך להעמיד פנים כאילו המשחק הוא לא באמת מלוכלך?

הגיע הזמן שיהיה בוס למשחק שישנה את כללי המשחק לחלוטין. גם דן וגם אהוד מרגישים נפגעים ובצדק מכך שאנו משיתים עליהם משחק שבו המניפולציה היא העיקר ובסוף שונאים אותם על שעמדו בו בהצלחה. הפוליטיקאים צמאים לבוס אשר יגיד להם מה לעשות, גם ובעיקר כדי שיהיה ברור להם מה לגיטימי ומה לא. המישחק שלתוכו זרקנו את הפוליטיקאים שלנו גם גורם להם עוגמה: אצל חלקם הוא מעקר את המצפון ואצל חלקם הוא גורם למירמור ולבסוף לפרישה ואני לא אתפלא אם יתברר שתוחלת החיים שלהם קצרה יותר כתוצאה מכך. הפוליטיקאים אשר פרשו יהיו התומכים הראשונים ברעיון שהציבור יקח את המושכות ויעשה קצת סדר באורווה והגיע הזמן שגם אנחנו נפסיק לנקות את מצפונינו על ידי עקידה של פוליטיקאי זה או אחר ופשוט נבין שאנחנו צריכים לקחת את הניהול לידיים ולהפסיק את תוכנית הריאליטי הגרועה הזו פעם אחת ולתמיד.

Producing MySQL dates on the command line

I often find myself in need of inserting data manually into a MySQL database using some kind of database editor. In a database editor you find yourself manually inserting values into cells of a table and in most of them you are not allowed to enter an SQL expression (the MySQL Query Browser is a prime example). In this case I need some way to generate the current date and time as per the MySQL format quickly on the command line. I will usually use:

alias date_mysql="date +'%F %T'"

WordPress and UNIX security (part 2)

In an effort to secure my blog I once again did battle with the mighty Word press. It seems that you can run a perfectly healthy blog with no write permissions by the HTTP server (usually www-data) to your service directory.

What do I suggest? Change owner ship to root on your blog area. When you know that you need to upload stuff to Word press then open the permissions on the relevant folders. This happens when you want to add or remove plug-ins, upload media, themes etc. After the relevant operation clamp down on security again. There are plugins (like xLanguage) that write all kinds of junk log files into the upload folder as part of their operation. Obviously you cannot use these if you want better security.

Advantages: better security. Disadvantages: A little discomfort and the need to write very simple short script to do the chmod for you. The Inability to use certain brain dead plug-ins.

Git and signing

I'm now using git heavily for configuration management and wanted to sign my objects. There were no complete guides out there that I found so here is the list of instructions that I finally arrived at:

- If you have a key that you are already using to sign things (email, code, whatever) then you can skip to item 4. If not, then decide on an name, email and pass phrase that you will use to sign your code.
- Create a key pair based on the name, email and pass phrase that you chose,. You can do this using `gpg2 --gen-key`. The program is interactive and very easy to use. The program comes with the `gnupg2` package on Ubuntu or Debian. The keys are generated in `~/.gnupg`. If you want to see that everything went well the you can list all keys using `gpg2 --list-public-keys`.
- Configure git to use your email. This usually involves editing your git configuration file at `~/.gitconfig` and setting the `email` config option under the `user` section to your email.
- Sign your change when you commit or tag it. If you commit then use "git -s commit". If you tag then use "git tag -s -m 'commit message' [tagname]".

Grep is broken - use perl instead

In the course of running various grep(1) combination to find various defects in source files I ran into inherent grep(1) difficulties. It seems that the regular expression syntax in grep(1) is very limited and so it's better to use perl to solve these issues as it's regular expression support is fantastic. A small script can solve all your grepping needs. So here it is. Please comment with fixes and I'll incorporate them if you want to add features.

#!/usr/bin/perl -w

# This is a general script to grep using perl to overcome some of the deficiencies
# of grep(1) grepping...

use strict;
use diagnostics;

my($pattern)=$ARGV[0];
my($debug)=0;
my($print_filename)=1;

for(my($i)=1;$i) {
                if($line=~$pattern) {
                        if($print_filename) {
                                print $filename.": ";
                        }
                        print $line;
                }
        }
        close(FILE) || die("unable to close file [$filename]: $!");
}

Wordpress and UNIX security

Here is what I found the hard way. Sometime you want Wordpress to install plugins, themes and all and do not want to pass through an ssh or ftp connection in order to achieve this. Maybe you have your own machine and do not want to run or configure an ssh or ftp server (which is my situation). In that case you can choose to either install plugins and themes by hand (just unzip them to $WORDPRESS/wp-content/[plugins|themes]) or you can give wordpress permissions so it can do it for you. The disadvantage of giving Wordpress permissions is ofcourse security since any one hacking into your server could have write access to the wordpress files themselves. In order to avoid this you can keep all your wordpress files owned as root.root (maximum security) and only change permissions for the duration of the installation of the plugin or theme.

Here is how to do this for a completely safe install:

- Turn off your world access to your web server. This can be done by bringing down your external network link by `ifdown eth0`. This step is only necessary if you are a security freak.
- `chown -R [webuser].[webgroup] [wordpress]/wp-content/{plugins,themes}`. Substitute webuser and webgroup for your web servers user and group. These are usually www-data on Debian based systems or could be gotten from ps -ef.
    - Now perform your installation of plugins or themes from the local machine or from a remote machine if you have not followed the security step above.
    - `chown -R root.root [wordpress]/wp-content/{plugins,themes}`. This will clamp down on security once again.

Please note that some weird Wordpress plugins write to the web folder due to their regular operation. If you have such plugins and are worried about security then I urge you to dump them and find substitute plugins. If you cannot dump them then you probably cannot use any sane security practice for your blog.

Firefox favicon cache is over caching

I've recently tried setting some sites icon to appear as the small icon you see at the tab you are browsing it. This icon is called favicon.ico and is located in your servers root directory which resides in /var/www on standard systems. When changing this icon and reloading the page in Chrome the icon got updated promptly. No such luck with Firefox. The only way I found to do it is to go to the Firefox cache which is at ~/.mozilla/firefox/[some instance of firefox]/Cache and remove the icon. The problem is that the cache folder shows files whose names are hash keys of the cache which means that you need to find the file. Usually something like file * | grep icon can help. If you know the exact size of the icon you are looking for this could help also or if you have the actual icon file you are trying to erase from the cache you can just explicitly run a search for it using cmp(1).

Addendum: A much easier way is just to point your browser at the favicon URL which should update it's cache just for this URL. In Firefox this worked even without browser restart. In addition to all of the above in Firefox the bookmarks tool bar could show a different favicon than the tab. For this you can install "Bookmark Favicon Changer" as an extension and set the icon yourself.

Purging unneeded packages on a debian system

If you want to remove all packages which are in the "rc" state (means that the package was already removed but only it's configuration remained) you can use the following command as administrator:

dpkg --purgedpkg --list | grep "^rc" | tr -s " " | cut -d " " -f 2``

Take care to save configuration files that you need before issuing it.

Blog upgrade to wordpress 3.0

I just upgraded the blog to the new 3.0 release. The upgrade is quite easy so there is no reason to fear it. The real reason for my upgrade is the multi site feature (I want to open another blog in Hebrew). The multi site feature is quite cool and allows you to have as many blogs as you wish or give blogs out to your friends and serve as their administrator. Check it out in wp3.0.

Dropbox is better than Ubuntu one even in Ubuntu

I'm using both DropBox and Ubuntu one services in my desktop and laptop machines and I find dropbox much superior. Here are the reasons why:

- You can get ridd of dropbox (just `dpkg --remove` it).
- Installation is very easy (`apt-get install`).
- It is very clear that dropbox is running (via the tray icon).
- The tray icon has all the functionality you want via the UI.
- The command line tool `dropbox(1)` is even better than the UI since you can  check if the upload has finished or not, turn dropbox on and off and  even configure if dropbox is started automatically at login time.
- Unlike ubuntu one dropbox does not seem to want to sync my bookmarks, contacts and more and certainly does not urge me to do that by DEFAULT which could lead to security issues.
- File syncing is just an application and as such should not be a part of the system administration menu as the guys in ubuntu seem to have been forced to implement by pressure from their management. Why not put backgammon score keeping in the sys admin menu too ?

These are also the reasons why I keep my most important files in dropbox and not ubuntu one. Ubuntu really need to do a lot more integration work to make me prefer them to Dropbox. Go Dropbox.