2007-11-29

Take the data literacy test

So, you think you're a good programmer, do you?

In his book, Code Complete, Steve McConnell has something he calls *"The Data Literacy Test". It's a test to see how 313373 you are when it comes to data types.

Here's how Steve himself describes the test:

The first step in creating effective data is knowing which kind of data to create. A good repertoire of data types is a key part of a programmer's toolbox. A tutorial in data types is beyond the scope of this book, but the "Data Literacy Test" will help you determine how much more you might need to learn about them.

Ok, so that was the motivation. Here's is how it goes:

Put a 1 next to each term that looks familiar. If you think you know what a term means but aren't sure, give yourself a 0.5. Add the points when you're done, and interpret your score according to the scoring table below.

  • abstract data type
  • array
  • bitmap
  • boolean variable
  • B-tree
  • character variable
  • container class
  • double precision
  • elongated stream
  • enumerated type
  • floating point
  • heap
  • index
  • integer
  • linked list
  • named constant
  • literal
  • local variable
  • lookup table
  • member data
  • pointer
  • private
  • retroactive synapse
  • referential integrity
  • stack
  • string
  • structured variable
  • tree
  • typedef
  • union
  • value chain
  • variant

.. OK - got your score ready? Check how you rank below:

Here is how you can interpret the scores (loosely):

0-14 You are a beginning programmer, probably in your first year of computer sci­ence in school or teaching yourself your first programming language. You can learn a lot by reading one of the books listed in the next subsection. Many of the descriptions of techniques in this part of the book are addressed to advanced programmers, and you'll get more out of them after you've read one of these books.

15-19 You are an intermediate programmer or an experienced programmer who has forgotten a lot. Although many of the concepts will be familiar to you, you too can benefit from reading one of the books listed below.

20-24 You are an expert programmer. You probably already have the books listed below on your shelf.

25-29 You know more about data types than I do. Consider writing your own com­puter book. (Send me a copy!)

30-32 You are a pompous fraud. The terms "elongated stream," "retroactive syn­apse," and "value chain" don't refer to data types-I made them up. Please read the "Intellectual Honesty" section in Chapter 33, "Personal Character"!

Permalink . admin . 08:25:59 . 422 Words . Basics . Email . 15720 views . 27 comments

2006-12-11

Piratebay blocks Swedish ISP

When the the swedish ISP Perspektiv decided to block their customers from visiting the music site allofmp3.com just before the weekend they pissed quite a few people off.

Well, now The Piratebay strikes back and announces that they are blocking Perspektiv customers from using their site.

It must really suck being a Perspektiv customer, right?

Here's the press release from Piratebay (sorry, loosely translated from Swedish):

As one of the larges websites in Sweden we will not sit silently and watch some of our basic rights be restricted. If we want a working and good society even on the Internet we must stand up for one another and show courage when it is needed.

After careful consideration, we have for the first time ever, decided to block an ISP because of their management. The ISP *Perspektiv Bredband* is a very controversial enterprise - in the way that they have shown to put the unrealistic ideas of some powerful media-companies over their own customers freedom of information - something which in our eyes is comparable with dictatorialness and censorship.

*Perspektiv Bredband* has every right in the world to block whichever site they want on their own net. And their customers have every right in the world to change to a new ISP which does not take upon itself the task of ensuring collective conscience.

Do you have any opinions on this? Call Perspektiv Bredband's support line on 075-555-0030! (source)

The Pirate Party is also calling for sites to block the ISP - and they also provide this PHP code for the convenience of people who would like to do so:

if (get_perspektiv_ban(getenv("REMOTE_ADDR"))) { Header("Location: http://piratbyran.org/perspektiv/blockad.php"); exit; }

function get_perspektiv_ban($iip) {
$a=explode(".", $iip);
$ip=str_pad(decbin($a[0]), 8, "0", STR_PAD_LEFT).str_pad(decbin($a[1]), 8, "0", STR_PAD_LEFT).str_pad(decbin($a[2]), 8, "0", STR_PAD_LEFT).str_pad(decbin($a[3]), 8, "0", STR_PAD_LEFT);

$match[]="193.108.42.0/23";
$match[]="85.235.16.0/21";
$match[]="213.185.16.0/20";
$match[]="81.88.0.0/20";
$match[]="195.60.68.0/23";
$match[]="85.235.0.0/20";
$match[]="217.72.48.0/20";
$match[]="85.235.16.0/20";
$match[]="81.186.240.0/20";
$match[]="213.185.0.0/19";
$match[]="89.236.0.0/18";

while (list(, $value) = each($match)) {
$c=explode("/", $value);
$b=explode(".", $c[0]);
$net=str_pad(decbin($b[0]), 8, "0", STR_PAD_LEFT).str_pad(decbin($b[1]), 8, "0", STR_PAD_LEFT).str_pad(decbin($b[2]), 8, "0", STR_PAD_LEFT).str_pad(decbin($b[3]), 8, "0", STR_PAD_LEFT);

if (!strncmp($ip, $net, $c[1])) {
return 1;
}
}
return 0;
}

// Edit; a visitor commented that he has created a better version of this script, and it's available here

The Pirate Party also ask that sites that decide to block Perspektiv let them know by e-mailing them at info@piratbyran.org.

Sources: (sorry, they are all in either Swedish or Norwegian)
Piratebay press release
Pirate Party press release
PirateBay stenger ute bredbåndsleverandør

Permalink . admin . 21:54:27 . 493 Words . p2p . Email . 17018 views . Leave a comment