Private Attributes in Python

Python allows us to define private attributes in our class (private instance variables). Outside the scope of the class it won’t be possible to access them. In order to create private attributes we should prefix their names with two underscores (‘__’). class Rectangle: def __init__(self,w=10,h=10): self.__width = w self.__height = h def area(self): return self.__width*self.__height […]

The use warnings; Statement in Perl

Adding this statement to the begining of our code will trigger warnings for our code wherever relevant. Adding ‘use warnings Fatal => ‘all’; to our code will promote all warnings to errors and die immediately on the first warning. #!/usr/bin/perl use strict; use warnings; my %currencies = ( USD => 4.1, EURO => 4.4, GBP […]

The use strict; Statement in Perl

The Perl programming language started as a hack, as a tool that its sole purpose was to fulfill specific needs. When Perl’s popularity grew and more and more people started to use it was already too late to enforce rigid grammar rules. Adding the ‘use strict;’ statement in the beginning of the file will enforce […]

The Scala Programming Language Colloquium

On Sunday Novemebr 22th I will deliver a short seminar about the Scala programming language. The seminar will take place in HIT (www.hit.ac.il) room 424 building 8 (computer science department) at 1500. During this seminar I will overview my thoughts about using this programming language in academic courses and focus on its strengths as a […]