Archive for the ‘software’ Category

A proposed new language construct: do/undo

Sunday, February 5th, 2017

There are several cases, in which a program has to do operations A,B,C. If an error occurs while doing A, the program needs to undo A. If there is an error while doing B, the program needs to undo B then A. Similarly, an error in C requires undoing of C,B,A in this sequence.
(more…)

A better way to run Android Studio from a Docker container

Thursday, February 4th, 2016

Did you want to build a Docker container, which will run Android Studio for you, for example because your PC does not run GNU/Linux Ubuntu 14.04 but another Linux distribution?

You can find suitable scripts in the GitHub repository tddpirate/androiddocker

האם רצית לבנות Docker container שיריץ לך את Android Studio, למשל מפני שמחשבך אינו מריץ GNU/Linux Ubuntu 14.04 אלא הפצת לינוקס אחרת?

ניתן למצוא סקריפטים מתאימים בגיטהאב: tddpirate/androiddocker

Learn to develop for the Android, contribute to Free Software and advertise yourself

Sunday, July 22nd, 2012

During the last few weeks I developed an Android application for helping people prepare for the Israeli driving theory test.  The application uses the questions database available from http://data.gov.il/dataset/249 (and the corresponding ones for Russian and Arabic).  It was a nice and fun exercise, which helped me master more parts of the Android development platform.

The application is now at version 0.1 and is working.  Its look and feel is not polished, yet; and some missing features have been identified by comparing it to three other applications available from Google Play doing the same thing.

Today the source code has been released under the GPLv3 and is available from https://github.com/tddpirate/teuria and if you are looking for an Android developer with few weeks worth of experience and known quality of work, you may have a look at the above.

Installing Slackware (a Linux distribution) in a VirtualBox virtual machine

Tuesday, June 26th, 2012

After not having dealt with Slackware for several years, I needed to create a virtual machine with Slackware.  I had to solve two problems, and am writing below how they were solved for the benefit of future Slackware based virtual machine builders.

  • Slackware version: 13.37 for 32-bit x86, installed from DVD
  • VirtualBox version: 4.1.18 r78361, Debian Squeeze amd64

Virtual machine parameters:

  • Operating system: Linux
  • Version: Linux 2.6 (32-bit being implied) - the combobox list had no entry for Slackware.
  • Base memory: 1.5GB
  • Hard disk: 30GB
  • Host I/O caching: on (to silence a warning).

Problem 1
When trying to boot from the DVD in order to install Slackware 13.37, the hugesmp.s kernel failed to boot.
I found the following bug reports:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/246067
http://www.linuxquestions.org/questions/slackware-14/kernel-panic-on-virtual-box-installation-its-driving-me-nuts-901223/
https://forums.virtualbox.org/viewtopic.php?f=3&t=44598

Some of the above bug reports had the suggestion to turn on VT-x/AMD-V acceleration.  However it was already turned on in my virtual machine.  I tried several combinations of flags in Settings/System/Processor and Settings/System/Acceleration but of no avail.

The problem was solved by changing the IDE controller type from PIIX4 to PIIX3 in Settings/Storage/IDE Controller/Type.

Problem 2
The initial reboot after installation failed.  From the stack trace it seemed that the problem was due to unknown kernel options.  I found some bug reports, but they were not directly related to this.

I successfully rebooted the virtual machine when entering the following as LILO prompt:

Linux pci=routeirq acpi=off pci=noacpi

Then, the problem was solved by editing /etc/lilo.conf as follows.  The line

append=” vt.default_utf8=0″

was changed to

append=” vt.default_utf8=0 pci=routeirq acpi=off pci=noacpi”

And then /sbin/lilo was run (without arguments).

Israel Zak 1927-2011

Friday, August 26th, 2011

ישראל זק תרפ”ז - תשע”א

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

השגת לי צעצוע שמחירו היה מיליוני דולר - CDC6400 שהיה המחשב המרכזי של האוניברסיטה העברית בירושלים.

בזכות השבתון שלך, הייתי בארה”ב וזכיתי לטייל שם בתקופה שבה ישראלים עדיין לא הרבו לטייל בחו”ל.

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

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

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

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

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

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

לאחר שנים קראתי את ההיסטוריה של הטלכתבים בארץ שבה הכל התחיל - ארה”ב - והתחושה שלי היא שבסך הכל בישראל הכל הלך לנו יותר בקלות מאשר ליוזמי הטלכתבים בארה”ב.

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

אני זוכר שהיו נסיבות שונות בילדותי שבהן לא הבנתי מה הולך ומה רוצים ממני - עד שבאת והסברת לי בבהירות מה הולך שם.

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

תודה לך, אבא.

Israel Zak 1927-2011
You teached me to multiply and divide when I was at kindergarten age. Later I forgot how to divide until I relearned it in school.
You obtained for me a toy which costed multimillion dollars - CDC6400, which was the central computer of Hebrew University in Jerusalem.
Thanks to your Sabbatical leave, I was in USA and got to travel there at a time in which Israelis still didn’t travel abroad as much as they do today.
One day you brought home a telephone which had the means to let the other side pass a message to me by Morse code. The experiments were not successful because I and my conversation mates were not proficient in Morse communications.
When I was at high school, you opened a geological consulting company and I helped you in software development. Few years later, your experience with the business side of consulting eased my transition from employee to self-employed freelancer.
You escorted me when I started to drive a car, making it easier for me to integrate into the Israeli road culture.
When I wrote my M.Sc. thesis, you advised me to add a list of questions for further research.

You and mother had lifestyle, which did not emphasize materialism or conspicuous consumption. Your luxuries were to travel to almost every distant hole in the world. Therefore I grew up with the feeling that money will not be what’ll prevent me from achieving whatever is important in one’s life. There was a financing solution for my studies in Gallaudet College so I could choose not to study there not due to financial considrations. You helped me buy an apartment as soon as I knew where I’ll live. I chose not to undergo cochlear implantation but you secured financing for this, so that if I wanted, I’d be able to get this operation - even before the operation was included in the Health Basket.

The TDD Project, for making the telephone network accessible to the deaf more than 25 years ago, needed also all kinds of pull with all kinds of people with influence. You did a lot behind the curtains. It is our custom to be proud when pull is not needed in order to succeed. However it was a project for which it was mitzvah to exploit every exploitable connection and pull every available rope. Several years later I read the history of the TDDs where everything started - USA - and my feeling is that overall it was easier for us than for the TDD innovators in USA.

Unlike several other people, you accepted the responsibility to facilitate the communication with me. I do not remember any occasion in which you corrected my speech, and I remember that once you told me that when I feel relaxed, I speak more clearly. You invested the effort into learning and practicing cued speech and it was always easy for me to understand you when you addressed me, except of course for the last few weeks during which you were too tired for this.
I remember various circumstances during my childhood, in which I did not understand what was going on and what people want from me - until you arrived and explained clearly what is going on there.
Ever since the TDD entered our lives, you were my relay service, to relay messages between me and other people whom I needed to contact by telephone. Happily, my need for the relay service was lessened over the years, with improvement in telecommunications accessibility of the general population, thanks to SMS and E-mail.

Thank you, father.

Computerized elections in Israel - the threat is still there

Saturday, April 24th, 2010

Time has passed since the Nov. 2007 council elections (with no publicity to the results of the pilot of computerized elections), and since the Dec. 2008 Taldor fiasco.

And it turns out that in their infinite wisdom, the Israeli government decided to continue to cater to the impatient, “want to know the results right NOW!!!” segment of the electorate in future elections.  Having learned from the experience of other countries, a system based upon near-field RFID tags was chosen for development and deployment.

However, according to http://www.eng.tau.ac.il/%7Eyash/evoting-relay-rfid2010.pdf, the chosen system suffers from serious vulnerabilities.

It seems that the real agenda of the politicians here, like everywhere, is still to get the populace to accept ballot systems, which allow the elections to be rigged.

Web 2.0 Best Practices

Sunday, December 14th, 2008

Suppose you have been contacted by someone with a great Web 2.0 idea and he wants you to join his startup.
You need to know whether he knows what he is talking about.
The following checklist may help you tell the clueful apart from clueless.
I hope people will be able to contribute advice concerning each item in the checklist as well as more items I missed.

  1. Dealing with bad content:
    • Spam
    • Trolling
    • Off-topic user-contributed content
  2. Vandalism (and in general, content backup/restore).
  3. Legal:
    • Acceptable use guidelines
    • Copyright violations and other issues
  4. Content ownership/lockdown policies - will a contributor be able to export his contributions into file/s in his own PC?
  5. How will the network effect be overcome (if another Web 2.0 site already exists serving the same need, how to get people to use your Web site instead of the other site, if they already have stuff).
  6. Business model (i.e. how to actually get people to pay for the stuff).
  7. Scaling with demand (nowadays, thanks to cloud computing services availability, the required scaling is not that of servers but that of customer service personnel and maybe other critical resources).
  8. Are there standards (such as XML schema) relevant to the kind of content to be served by the site?

The hospital which demands that its surgeons operate in non-sterile theaters, with inadequate equipment and without enough help

Monday, December 8th, 2008

If what Alan Carter says in his The Programmers’ Stone blog is right, then the way our society treats software developers is like requiring surgeons to operate in non-sterile theaters, with inadequate equipment and without enough help from other doctors and nurses.

Thank you, Taldor LTD., for tarnishing the reputation of computerized elections in Israel

Wednesday, December 3rd, 2008

Yesterday, the primaries election of the Labor party in Israel was aborted and postponed to a later date due to serious malfunctioning of the voting machines deployed for this purpose.

The provider of those machines was Taldor LTD.

Sources (in Hebrew):

I wrote previously about computerized elections.

Copyfree vs. Copyright/Copyleft

Sunday, October 19th, 2008

The other day I stumbled upon the Website http://copyfree.org/, which advocates a software licensing model somewhat similar to LGPL.
See the Website for arguments in favor of this licensing model.

I would, however, stick with GPL/LGPL due to the following reasons:

  1. The world has some actors (such as the one whose name starts with M and ends with T) with monopolistic intentions. Copyfree is not strong enough to stop them. GPL (especially its v3) is essential to limit the effects of such actors.
  2. Some software developers are not altruistic philanthropists. They expect to be compensated for their software development work. In the case of software which scratches their own itches, an acceptable form of compensation would be enhancements to the software, which fix bugs and - more interestingly - add new features. When wielded by such developers, GPL/LGPL are used much as traditional copyright law is used by creators to get compensated for their creations.
  3. In the special case of security software, which should be used by everyone, exemptions can be made on case by case basis. The reasoning is much the same as the one which led USA to release to USSR, in midst of the Cold War, certain technologies for securing atom bombs against accidental detonation. And those were days, in which people were executed for releasing nuclear secrets to the wrong parties (witness the Rosenbergs affair).