Showing posts with label kfar yona. Show all posts
Showing posts with label kfar yona. Show all posts

Monday, October 18, 2010

finding implementation of an interface method in Eclipse

You read your code and bump into a method that you'd like to dive into. You then, most probably, hit F3 (find it's declaration) or attempt to drill down using CTRL + LEFT-MOUSE-CLICK. However, then you end up with a declaration of the method's signature in an interface. What you'd like to find are the implementations of that method. Fear not! Instead of ending up at the signature in the interface press CTRL + T which will popup the implementations with shortcuts to the actual implementations' code.

Source: http://zvikico.typepad.com/problog/2008/01/eclipse-tip-qui.html

Thursday, October 14, 2010

Google Blogger Bug on IE8 -- cannot paste when editing a post


There's a very annoying bug that doesn't allow to paste stuff from the clipboard (even plain text) to a post while editing it. This yet makes me further not want to edit posts using IE.


I found someone also discussing it here. I couldn't find how to use the advice in the popular answer.
Any ideas?


The Java Programming Language Third Edition by Ken Arnold, James Gosling and David Holmes


I got to read and to get up to date with Java by reading The Java Programming Language Third Edition book by Arnold, Gosling and Holmes.

Reading the book is slightly more interesting than reading the phone book. There's a lot of useful information there. I can't say that the book is very productive for reading cover-to-cover (time will tell). However, I'm pretty sure that it will pay off as a useful reference book.

I didn't find the book as useful or as well written as the K&R book for C (The C Programming Language), possibly due to the vast differences between C and Java.


I'd be happy to get recommendations for good Java programming and design book for Java implementation.




Thursday, October 7, 2010

slf4j vs. log4j







Idioms for loggers in Java code:






An often used idiom for logger configuration in Java code uses log4j. Following is a code snippet that demonstrates the usage:






Import statement:


import org.apache.log4j.Logger;



Declaration and generation example within a class:





public class Foo {



private static final Logger logger = Logger.getLogger(Foo.class);



Usage example within that class:


if(logger.isDebugEnabled()) {



logger.debug("this will be logged with the following parameters x="+x+" y="+y+" z="+z);



}





This implementation causes evaluation and string concatenation of the argument to the various log levels of the Logger class instance (logger.debug in this case) regardless whether or not that logger is indeed configured for that log-level. Imagine a situation where the log level for this class' logger is set to an ERROR log level while the logger is reporting messages in a DEBUG log level. Obviously, the logging will not be manifested in the appender that is bound to that logger for this class (as DEBUG has a lower log level than ERROR log level) but nonetheless the String concatenation for the arguments to build up the string for logging will be executed and will yield a cost regardless of the actual logging. In order to avoid that, the code tests the log level for DEBUG and only if it is enabled then the invocation of the logger.debug method is being interpreted and executed. The cost is due to the concatenation operations and due to repetitive (possibly implicit) calls to toString().



A newer implementation provides an idiom that internally tests for the effective log level and thus builds up the string (with the required concatenations) only if the log message will actually eventually be streamed to the appender. As a result, the format of the method for logging changes to something that actually evaluates strings only if the suitable log level is used. For example, when logging is disabled at the DEBUG level, the logging framework does not need to evaluate the string representation of the values.



Import statement:



import org.slf4j.Logger;



import org.slf4j.LoggerFactory;





Declaration and generation example within a class:



public
class Foo {



private static final Logger logger = LoggerFactory.getLogger(Foo.class);



Usage example within that class:


logger.debug("this will be logged with the following parameters x={} y={} z={}",new Object[] {x,y,z});





So, the slow and inefficient idiom



logger.debug("this will be logged with the following parameters x="+x+" y="+y+" z="+z);



which also took additional awkwardness with the attempt to reduce its performance costs by using this idiom




if(logger.isDebugEnabled()) {



logger.debug("this will be logged with the following parameters x="+x+" y="+y+" z="+z);



}




should now be replaced with the fast and more efficient


logger.debug("this will be logged with the following parameters x={} y={} z={}",new Object {x,y,z});







It is recommended to refactor log4j idioms to slf4j idioms when working on classes that use the inefficient idioms.






It is required to use te slf4j idiom in new implementations.




Some related links:







Sunday, August 22, 2010

Programming From The Ground Up by Jonathan Bartlett




Programming From The Ground Up by Jonathan Bartlett.


The book's homepage:http://savannah.nongnu.org/projects/pgubook/

The book can be downloaded free of charge at:
http://download.savannah.gnu.org/releases/pgubook/

פגישת שוחרי פרל בישראל -- אוגוסט 2010




מחר, יום שני, 23 באוגוסט 2010, תתקיים פגישת שוחרי פרל בישראל (Israeli Perl Mongers). את המפגש מארח חברי הטוב, שמואל פומברג, בחברת קואלקום במת"מ בחיפה. [להודעה ברשימת התפוצה -- שם גם נפלה טעות סופר עם טעות בחודש...]

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






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


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


הכול מוזמנים: מורים, תלמידים, מפתחי תוכנה -- זה פתוח לקהל


הנה על הארוע מתוך יומן הרשת של


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



אינני מציג מחר לבדי -- ראשון יעלה להציג אורי ברוק, על RESTful Web Services ב-Catalyst. ואחריו אני עם חידות ומשימות ראיונות העבודה ודיונים ופתרונות (כן -- פתרונות!!! וגם קוד ב-Perl).


הגיעו בהמוניכם.



Uri Bruck:
Developing RESTful Web Services with Catalyst
Shlomo Yona:
Things to learn from job interview questions -- a Perl view

The meeting will take place in 18:30, August 23, in Qualcomm - Haifa,

MATAM. (near MATAM's the south exit)

Sunday, January 4, 2009

January Haifa Perl Meeting

Date: Thu, 01 Jan 2009 08:54:38 +0200
From: Shmuel Fomberg
Reply-To: Perl in Israel
To: Perl in Israel
Subject: [Israel.pm]

Hello All.

On January 7, 6:30pm, there will be a Perl meeting.

Topics:
Uri Bruck, "Perl in Software Art".
See: http://www.yapceurope2008.org/ye2008/talks/tag/want

Shmuel Fomberg, about the CPAN module Data::ParseBinary.

The meeting will take place at Qualcomm, MATAM, Haifa.

See you there.
Shmuel.


Here's a more recent post on this from Shmuel:

Hi All. Sorry about the previous announcement - it was a bit rushed. (can someone post this in the Haifa Unix mailing list? thanks) So, Our next meeting will take place on Wednesday, January 7. The talk will begin at 18:30, in Qualcomm Israel. First talk (40 min): Uri Bruck will talk about "Perl in Software Art" Abstract: Software Art is art where software, programming code, or software concepts play a significant role. It's closely related to Net Art. Some software artists use Perl to create their art, and true to the spirit of open source, often include the source code as part or alongside the art. Some observations on such art works will be discussed, the relation between code (material) and artworks, links to related concepts in other art forms. Second talk (40 min): Shmuel Fomberg (truly yours) will talk about his CPAN module Data::ParseBinary Abstract: Data::ParseBinary can be used to parse highly complicated and conditional binary structures. We will see what can be done easily using the module, and what can be done less easily. About the location: Qualcomm is located in the Omega Building, at the south entrance of MATAM, which is on the south entrance of Haifa. It is 15 minutes walk from the train / bus station "Hof HaCarmel". (I do it daily) For the lazy, there are taxi lines to Tirat Hacarmel that drive on that way in somewhat regular period. A map can be found in this link: http://tinyurl.com/qualcomm-israel See you there, Shmuel.


See post at the israel.pm archives:

Wednesday, December 31, 2008

High performance web sites by Steve Sounders


I learned a lot while reading High performance web sites by Steve Sounders.
It is a relatively thin book, 137 pages, with quite many diagrams and screen-shots. It also repeats and repeats the main ideas. So the book is a fast read.

I liked the fact that the whole book can be summarized by listing the 14 rules that it defines and explains. I also liked the fact that the rules are not only there to follow blindly (although, you could, most probably, follow them blindly and get away with it successfully), but are explained, reasoned and the benefit of following them is demonstrated using popular US web sites. I also liked the metering tools and demonstration tools that the author uses.

I think that you can learn quite a lot from the author beyond the book itself, so check out his web site at http://stevesouders.com/, where he has a blog and other interesting resources (e.g., videos).

The author also had an article based on the book on CACM, see the author's blog post about this, along with links to the publication.

Read reviews about the book on Amazon. Most of them are very informative.

A good read -- I think that you can find most of the information if not all on the web and in the papers and talks that result from the book. Still, the book itself is nice to have around.

Wednesday, November 14, 2007

תורן האנטנות יוזז דרומית מערבית

ככה שהמרחק מקו הבתים הראשון הוא, לפי הדיווחים (אין לי עובדות לצערי) 320 מטרים.

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

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



Monday, April 23, 2007

Birds I saw in the park next door today





Here are a few shots of birds I saw in the park next door today. All of them seems to me as the same bird... :-)