Sunday, November 27, 2011

דברים שאני שונא - Things I hate

Two things I hate - one in Hebrew, one in English...

I hate encodings. They're the spawn of satan. I'm somewhat jealous of the programmers of the future - everyone will be using UTF-16, or maybe even UTF-32, with enough code points to store anicent egyptian hieroglyphs, lolcats, and short gifs of porn. Until then we'll be stuck trying to guess which encoding we're using, or figure out why the keys I gave python in Hebrew don't match the ones in the dictionary read from a file (hint - ANSI vs. Unicode - writing them as u'key-in-hebrew' worked). Barak, one of the guys who rally taught me how to program, used to say (paraphrasing) that "every programmer needs to be wary of two things - encoding, and time zones". If your encoding-fu is rusty, or just feel like reading more, check out this excellent article.

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


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


זה הכל לעכשיו. מה דעתכם? איך אפשר לפתור את בזבוזי הזמן המזעזעים האלה?

Saturday, November 26, 2011

A few random notes

- I thought about it, and realized that since I moved back to Israel from the US, bay area sports suddenly decided they're respectable. The Giants won the World Series last year, and have played at least reasonably well most years. The 49ers finally play like a real football team (even after yesterday's though loss in tha Har-bowl), the Sharks made the conference series a few times (from what I remember). Even the Warriors seem to be in the right direction, after being bought by a seemingly far more serious group of owners than before. And of course, there's Stanford football - if they hadn't forgot how to play defense against Oregon (for two years running), might be next in line for an ass-whooping by LSU (it wouldn't even be close). Maybe I should've moved back sooner?

- As the above bullet probably hints, I still really enjoy watching American sports. Some are broadcast here on TV, but that gets you incredibly annoying commercials (thank you Fox Sports Europe and ESPN Europe, and especially METV). The two better options are to go out somewhere (usually, Mike's Place) to watch the games, or stream them online. If you're looking for online streams, I'm a big fan of http://www.firstrowsports.tv/. Pretty much never disappointed me.

- Although most of their songs sound pretty much the same to me, I'm really digging Coldplay's Paradise (I feel somewhat ashamed admitting this. Oh well). Not really sure why - but it probably helps that the video is pretty neat.

- My cousin, who is a month older than I am, was honorably discharged (השתחרר) from the army today. I still have two months of mandatory service, and then at least a year and a half as a salaried officer. Feels kinda weird for me. Mazal tov, Tom!

- I've started to think about upgrading to a new laptop - my current one is three and a half years old, and while it's holding up pretty well, it feels like it's going to be about time soon. I have my eye on this 17" ASUS from Newegg. My current one is an ASUS, and they have terrific performance for the price. It also helps that it's currently $400 off. Any thoughts? Should I wait for anything before upgrading? Or just generally hold out as long as I can, as things will get better and cheaper?

That's it for tonight - hopefully something more Ultimate related tomorrow.

-Guy

Wednesday, November 23, 2011

ביקורת ראשונה

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

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

Monday, November 21, 2011

Debugging (the annoying web kind)

This isn't even proper debugging - but still, I labored through it for an hour now, so I guess it's worth a post.


At some point yesterday, some javascript controls (across all websites) seemed to stop working. I'm not very strong in web development, but I believe those were all ajax controls (specifically, facebook's ticker and chat stopped responding to clicks in them). 


I started with the usual voodoo debug - close and open chrome, disable and enable javascrip, reboot the computer (which always seems to have a positive effect), and neither worked. I tried upgrading chrome - same thing. IE (gasp) worked fine, so I kept on working. I figured it must be something in my local chrome configuration.


Copying it to a backup and starting over made it work - progress! Once I copied everything I thought I might need, the problem returned. So I've isolated the problem pretty well, but still don't know what caused it. The next step was clean the user data again, and this time copy over the bare minimum - cookies, settings, saved passwords, bookmarks, history, etc. That worked again.


Happy with that, I set to installing my extensions with the new profile. I went through the basic ones - AdBlock, Gmail mail checker, IE tab, translate, FireBug, etc. One of the last extensions I installed was FastestChrome - a pretty neat extension, with all sorts of features to help you browse faster - highlight text and search it in Google or Wikipedia automatically, pre-load additional result pages (when searching, or browsing a messageboard, for example), etc. After installed and enabling it, I found that the problem returned. As you're probably guessing, it seems to be FastestChrome's fault. I have no idea what triggered it - it worked fine for months - but disabling it seems to do the trick.


Why am I writing this? No idea. But it wasted an hour of my life now, so maybe it will spare you from the same. If you read this, and have any idea what might have triggered it, I'd be happy to know - even though I have nothing to do with the development of FastestChrome, and have no current intentions of debugging it further.


-Guy

First!

שיט, כאן זו לא תחרות מי מגיב ראשון?

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

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

כיף גדול. 

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

I'm guessing this blog will see around equal amounts of English and Hebrew - because on one hand, I live in Israel, and want to get some writing done in Hebrew. On the other hand, I type faster (and with fewer errors) in English, and some subjects (Ultimate, for example) just make more sense to write about in that language.

One final request - if, for whatever reason, you end up reading this (or any other post) - please let me know you've read, or better, share your thoughts. If you took the time to read, I'll take the time to listen to what you have to say. It's only fair.

זהו לעכשיו,

-גיא