ג’רי מחפש בית חם

April 12th, 2008

http://img144.imageshack.us/img144/8633/dscf4745xh0.jpg

לפני כמה ימים אחותי ביקשה ממני שאעביר מייל למכרים שלי על כלב בשם ג’רי שמחפש בית חם.

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

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

מי שמעוניין לאמץ את ג’רי, או מכיר מישהו שיהיה מעוניין, אנא צרו קשר איתי במייל gpgemini gmail com.

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

http://img81.imageshack.us/img81/2635/dscf4841tu3.jpg

http://img81.imageshack.us/img81/7578/dscf4831lh3.jpg

You can do better

March 29th, 2008

I got an email titled "Naked Shakira Clip" today.

Thinking "Cool, I got a naked shakira clip right to my inbox" I took a look, and there is a link there named "Download and Watch" poiting to www.someaddress/video.exe

It’s like their not even trying anymore.

The funny thing is that of all the houndreds of spam mails I get, this one got through the Gmail filter.

Come On !

March 28th, 2008

לא כתבתי כלום מזה זמן מה.

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

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

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

אבל כל זה לא מעניין.

מה כן מעניין ?

A Trend Named Firefox

January 4th, 2008

I looked up some statistics of user entries to my DivisionByZero tumblog, and was a little surprised to find that Firefox was the definite leading browser people use.

I was sure Firefox would be at around the 20-30 percent, but it stands at around 45% of total entries, and if you neglect IE 6.0 from the count, since it’s most likely used by people who don’t or can’t make a contious choice of their browser, you’ll get that Firefox is used almost twice as much as IE 7.0 does.

http://img120.imageshack.us/img120/8499/firefox2vw9.png

If you tried Firefox 2.0 (not the old 1.x versions) and you didn’t like it, that’s ok.
But if you’re still using the default IE option, you must try Firefox. The results above speak for themselves

Serialization With .Net Remoting - Chronicles Of A Solution

December 28th, 2007

.Net offers two great technologies - Serialization and Remoting.
Both work almost seamlessly independently, but should you try to use both, sequentially, you are into trouble.

There is a feedback issue on Microsoft’s Connect site that depicts this exact problem:
Serialization of MarshalByRef object fails after a remoting identity has been set
Unfortunately they Closed the issue with a "Won’t Fix" state.
Here is what Microsoft have this to say about the problem:

In 2005 they wrote:

Unfortunately, it was determined that it is now too late in the Whidbey product cycle to change this behavior, given that there is no straightforward solution. Thus, the problem will most likely not be fixed in Whidbey, but we will definitely consider it for the next version of the framework

And in 2007:

We have decided to only invest limited resources into Remoting and Binary Serialization, and concentrate on the Windows Communication Foundation and Data Contract Serialization instead. We’re only proactively fixing the most critical / most customer-impactful issues in the legacy technologies. However, both Remoting and Binary Serialization are of course supported technologies and will be supported for a long time

It is facinating to hear that the inability to combine two widely used .Net framework technologies is not concidered a critical customer impactful issue.
Admitting the problem, the lack of workarounds for it, the request of customers to fix it and the promiss of a future solution, followed by a claim that WCF outweights serialization and remoting in resource allocation, when it cannot fill in the gap, is nothing less than outrageous.

Needless to say that there are straightforward solutions for this problem, the most simple of which was suggested and acknowlegded in the feedback issue - setting the NonSerialized attribute on the Identity field of MarshalByRefObject, as it SHOULD have been in the first place.
When searching for a practical solution, I have even concidered injecting the NonSerialized attribute at runtime, or to modify mscorlib itself using Reflector.

Unwilling to mess with core framework code, the only feasible solution found was to use db4o to perform serialization for me.
How would that help ? db4o claimed and proved that their mechanism overrides the ServerIdentity problem, allowing to perform serialization on objects even after accessing them with remoting.
They achieved this by applying a TTransient translator on all ServerIdentity objects, which in effect removed the non-serializable problematic factor from the serialization process, allowing for both serialization and remoting to take place.

Encouraged by this achievement, I went on to test if the same workaround could be applied directly in the serialization process, so I used a ISerializationSurrogate to control the serialization process of ServerIdentiy, or to be more precise the lack of it.
db4o were able to have active remoting objects serialized by preventing the Identity field from being serialized AND by setting it’s value back to null upon deserialization (the default value of a remoting object not yet accessed from a remote AppDomain).

The phrase "The right hand doesn’t know what the left hand is doing" couldn’t come in any better.
ISerializationSurrogate has a method named SetObjectData:

Object SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector);

The return value of this method controls what would be set into the deserialized object, as seen fit by the SerializationSurrogate.
Well ….. Almost.
Any value, but null.
By definition, the mechanisms on top of the surrogate passes a dummy object to it, allowing its fields to be set directly or by reflection. In order to allow a different object reference to be set into the deserialized object, a different object can be returned as a return value. How should the all mighty algorithms select the proper one ? Using a null return value indication off course. That is, should the return value be null, the dummy object will be used, and should it be an object reference the returned object will be used.
You guessed it right, you can’t return null as a new value of the surrogated object.

So close to a solution, only to be halted by another Microsoft design flaw.

But this time the problem has shifted, it was no longer an issue of serialization and remoting, but simply a matter of getting one field of one object to be null.
All hail reflection !
Setting the Identity field of any MarhsalByRefObject is easier than a walk in the park, the question is - when ?
The best place to catch a MarshalByRefObject during it’s deserialization process is in the OnDeserialized event of any deserialized object.

So the final solution to this problem is so:

  • Create a new ISerializationSurrogate named TransientSurrogate.
  • Make it do nothing at all.
  • Set the surrogate in your serialization mechanism to override ServerIdentity’s serialization.
  • Derive from MarshalByRefObject and name it SerializableMarshalByRefObject.
  • Set it’s "Identity" field to null using reflection inside the OnDeserialized event.
  • Use SerializableMarshalByRefObject through out your application instead of MarshalByRefObject.
  • Enjoy both serialization and remoting in your appliaction !

I don’t have a working sample to upload, but if you run into trouble just contact me.

Hope this helps those of you who got stuck with the problem.

And my favorite quote, from the same MSDN article about ISerializationSurrogate:

Since surrogates don’t have intimate knowledge of the existing type, surrogate types tend to be useful only for simple types where the developer just plain forgot to make the type serializable.

Microsoft - clean up your mess.

Kleptocracy

December 22nd, 2007

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

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

את ההסבר המלא אפשר כמובן לקרוא בוויקי.

כובעים

November 26th, 2007

הגעתי הערב לשלוש מסקנות:

1. הדוש בדירה שלנו הותקן ע"י גמד, שכן בעמידה הוא מגיע עד ס"מ ספורים מעל הראש שלי.
2. אפשר לדעת שאוהבים מישהו באמת אם שנים אחרי שמאבדים אותו, אתם אוהבים אותו לא פחות מכאשר האהבה ביניכם היתה בשיאה.
3. Anathema היא הלהקה להקשיב לה כאשר רוצים לחשוב על דברים מורבידיים כמו אהבות נכזבות.

שניים מתוך שלושת הדברים הללו ידעתי כבר קודם, ואת האחד שהבנתי היום החלטתי לשתף איתכם.

Futurama Is Back !

November 23rd, 2007

http://img100.imageshack.us/img100/3797/bscap012fh9.jpgPure J.O.Y. !

Is one of the sensations watching the new Futurama movie would induce, had it been any good.
Unfortunately it wasn’t any better than a casual futurama episode, streched over an hour an a half, with a loose storyline connecting the parts.

I’m happy Futurama has risen from the dead, another movie is even scheduled for 2008, I just hoped that in more than 2 years of cinematic death, they would come up with some of the quality humor that made futurama what is was in the 30th century of 2005.

http://img144.imageshack.us/img144/808/bscap000wk2.jpgOne special part I did enjoy was when they remembered to cast fry’s beloved dog, who waited for him in the year 2000. It was one of the saddest most beautiful episodes futurama ever aired.
Then they ruined it by over doing the scene, spoiling all the good things that made the doggy lovable.

It felt like the creators had took the futurama theme, dressed it with "current" out dated jokes, like the whole spam thing, and mixed it with old futurama jokes. They should have invested their time in creating an independent self sustained creation, much like The Simpsons did in their movie.

Disappointed, but still loving futurama. Hopefully the series will return with new episodes.

Cleo Music Preview

November 23rd, 2007

cleo-screenshot.pngI’ve uploaded a first screenshot of the under-development Cleo Music application (click the image to enlarge).

In the screen shot you can see the the general look of the application. On the left you see the details of a given artist, with it’s picture, genre tags and related artists, all automatically retrieved from last.fm.
In the middle is the search window, allowing you to search both for artists and genre tags on all the mp3 files on your computer.
On the buttom are the mp3 files of the viewed artist or the search result. You always have all the files of the artist no matter where they are scattered on your HD, and on the top is the currently playing song/artist in winamp.
Also on the right are additional auto-hiding windows for viewing all artist/tags and more.

Currently it has some small patching up to do, and one major fix to reduce loading time. After this is done I will release a first Alpha+ / Beta- test version, and continue to develop other missing features.

I am very excited with how this application is taking shape and am using it myself from day 1 while listening to music.
Can’t wait to get some real feedback from music lovers for whom this application is developed

תמונות מההופעה לזכר ענבל

October 13th, 2007

http://img512.imageshack.us/img512/2424/dscf1045oq6.jpgפרסמתי תמונות מההופעה לזכר ענבל פרלמוטר בבארבי, קצת באיחור אבל non the less.

את התמונות אפשר למצוא בפיקאסה. עם המצלמה שלי ותנאי התאורה, התמונות לא יצאו הכי מרהיבות, אבל יש שם כמה טובות שאהבתי.

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

היו כמה רגעים בהופעה ששמו את הקול של ענבל ברקע השירים ששרו וזה היה מצמרר, כשעצמתי את העיניים הרגשתי כאילו היא באמת שם על הבמה מופיעה ושרה.

אפילו היה שווה את המחיר המופקע של ההופעה.


Copyright © 2010 קוצים של פחד. All Rights Reserved.
No computers were harmed in the 0.453 seconds it took to produce this page.

Designed/Developed by Lloyd Armbrust & hot, fresh, coffee.