Facebook scales to 500 million users

A few of the big numbers Facebook deals with:
* 500 million active users
* 100 billion hits per day
* 50 billion photos
* 2 trillion objects cached, with hundreds of millions of requests per second
* 130TB of logs every day

Remember, there are only three numbers in computer science: 0, 1, and n. This is what scaling horizontally is – break out the infrastructure so that it’s trivial to add another instance of, say, a database server.

Read the full note from the Facebook engineering team: http://www.facebook.com/note.php?note_id=409881258919

Hacked MediaTemple sites inserting javascript malware

One of my friend’s sites recently had some javascript hacked, which cunningly hid the contents of what it wrote to the screen so that searching through the files with normal means didn’t even show what files were affected.

So here’s a script which shows possibly hacked files. Assuming you have ssh access to your server, save it as check_for_hacked_js.sh and then chmod 755 it. To run it, type:


Once it’s done, check the contents of hacked.txt – and you’ll see all files which have possibly been hacked.


# This script scearches through all files on the server for
# a certain string which writes some malware javascript to
# client browsers, and then saves the results in a file
# for inspection.

# Written by Roger Saner on 2010.07.15

grep -ri "document.write(unescape" * > hacked.txt

Ignore Julius

I know this is a geek blog, but sometimes I’ve got to step into some of South Africa’s public issues (I guess there’s some lesson in here about the relationship between technology and the public sphere). So here goes…

Much of the fear Julius Malema has managed to inspire is not because of his vast intelligence or ability to provoke the masses into mindless violence; it’s that he says the craziest things which would never be uttered by any responsible public figure of any depth in post-Apartheid South Africa. He contradicts himself, by the way, first by saying

“The reality is that the majority of white people, despite the practical assurances made by our democratic Constitution and government; continue to believe that black people are out to get them. They feel threatened, but there is no basis for their insecurity.” Source: ANC Youth League website

and then by singing “Shoot the boer,” which even if he doesn’t mean it literally and is merely celebrating the history of the struggle movement (which I doubt), it gives insecure whities some basis for fear (which is why the ANC told him to stop singing it). You can’t sing “Shoot the boer” and then say, “White people shouldn’t believe that black people are out to get them.”

One reason Malema seems to have power is the massive exposure our local media gives him. It’s come to the point where they’re not merely objectively reporting on Malema, they’re actually encouraging the madness he encourages. And so we should ignore Julius, which is what the rest of this post is about, posted on many other South African blogs.

Julius Malema has exploded into political… prominence… by making himself hard to ignore. Inheriting a platform that drew attention to the accidental outrages he tripped into, he quickly learned to stoke outrage and roar back at any responses he provoked. For the media, trying to gauge the state of the nation’s health from moment to moment, this makes him a much more attractive candidate than the business-as-usual official announcements of the ruling party proper. But Malema’s sound and fury signify nothing, and his disproportionate voice in South Africa’s public conversation is only hurting our ability to speak to one another, and to speak sense when we do. We think it’s time to ignore Julius, and invite you to join us.

For the week of 7-14 April 2010, we undertake to talk about this country, its challenges, its promise, its news, and to ignore Julius while doing so. Join us in this initiative. If you blog, join the roll. If you Tweet, add the hashtag #ignoreJulius to your daily output. However you communicate, take a week off from Julius.

Here is the list of blogs that are participating in this initiative:





Unite South Africa

This is part of a blogging campaign to Unite South Africa, given the recent events in the country, which show a disturbing increase in violent rhetoric and alarmist reasoning. You can follow the conversation on twitter as it unfolds here: http://search.twitter.com/search?q=%23uniteSA

South Africa stands at a crossroads – a time in which racial tensions run high and the world is focused on us. Neither the people of South Africa nor the country itself can afford to have negativity and irrational outbursts rule our daily lives.
To that end, UniteSA is an attempt to bring people from all corners of our nation together in a call for peace, calm and rational thought.
Various ministers have called for restraint as has President Zuma – certain organisations have chosen to use this time to push a political agenda and we appeal to them to allow the authorities the chance they need to resolve the issues.
We urge the people of South Africa to express faith in the police force and the justice system at this time.
We call upon the ANC to rein in Julius Malema appropriately and urge him to behave responsibly.
We call upon the AWB to continue to act responsibly after the tragic death of Eugene Terre’blanche.
We call upon the National Government to plan for protection of farmers as they worry about their futures.
We express our solidarity and empathy for those who have suffered because of crime and corruption in our country.
We are far stronger united than we are apart.



Also, please take the time to read Sipho Hlongwane’s column in the Daily Maverick on this issue, because, as 6000.co.za says, “it might just be the most accurate and most salient collection of words I have ever set eyes upon.”

Bloggers for a Free Press

This article is a call by Sipho Hlongwane for bloggers to join in the protest against the tactics the ANC Youth League are employing to try and destroy the freedom of the press. The Twitter hashtag for this is #SpeakZA

Last week, shocking revelations concerning the activities of the ANC Youth League spokesperson Nyiko Floyd Shivambu came to the fore. According to a letter published in various news outlets, a complaint was laid by 19 political journalists with the Secretary General of the ANC, against Shivambu. This complaint letter detailed attempts by Shivambu to leak a dossier to certain journalists, purporting to expose the money laundering practices of Dumisani Lubisi, a journalist at the City Press. The letter also detailed the intimidation that followed when these journalists refused to publish these revelations.

We condemn in the strongest possible terms the reprisals against journalists by Shivambu. His actions constitute a blatant attack on media freedom and a grave infringement on Constitutional rights. It is a disturbing step towards dictatorial rule in South Africa. We call on the ANC and the ANC Youth League to distance themselves from the actions of Shivambu. The media have, time and again, been a vital democratic safeguard by exposing the actions of individuals who have abused their positions of power for personal and political gain.

The press have played a vital role in the liberation struggle, operating under difficult and often dangerous conditions to document some of the most crucial moments in the struggle against apartheid. It is therefore distressing to note that certain people within the ruling party are willing to maliciously target journalists by invading their privacy and threatening their colleagues in a bid to silence them in their legitimate work.

We also note the breathtaking hubris displayed by Shivambu and the ANC Youth League President Julius Malema in their response to the letter of complaint. Shivambu and Malema clearly have no respect for the media and the rights afforded to the media by the Constitution of South Africa. Such a response serves only to reinforce the position that the motive for leaking the so-called dossier was not a legitimate concern, but a insolent effort to intimidate and bully a journalist who had exposed embarrassing information about the Youth League President. We urge the ANC as a whole to reaffirm its commitment to media freedom and other Constitutional rights we enjoy as a country.

Blog Roll

Comparison of worldwide Apple prices – South Africa comes in 2nd highest

“The world is flat!” Thomas Friedman proclaimed in 2005, meaning that the world has become a global village, where all players have a equal opportunity. I wish he was right, because that would mean that we in South Africa would have the same access to Apple computers as the rest of the First World.

Thanks to Core, we have that access, but it comes at a price, a price which Core refuses to explain to online community, so continuing to maintain the perception that they are a monopoly focusing on one thing: profit, and profit only.

cmyplay.com has an interesting infographic showing the price of a 13” Macbook Pro around the world, and South Africa comes in second most expensive, just after Brazil.

Worldwide Macbook Prices

Worldwide Macbook Prices

TUAW picked this up and have some interesting comments on their post.

If Core was paying attention, they could point out that the graphic shows greater differentiation between prices than the actual numbers show. If Core bothered to interact with the online community, they would be able to point out that the South African prices are similar to prices in other countries. If Core cared at all about customer perception, they’d hire someone to reach out to the online community instead of isolating and vilifying us. My Christmas wish (from last year really – I didn’t make one so figure I have some credit!) is that Core would stop their command-and-control ways, and enter into conversations with their customers.

I wish the world really was flat. And I wish Core would reach out to the online community in healthy ways.

Javascript in Drupal 7

Kat Bailey has posted an excellent overview of the changes in javascript usage between Drupal 6 and 7. Particularly relevant is AHAH usage, which she sums up in Drupal 6 as follows: “AHAH forms make people want to jump out of the window of very tall buildings”!!! which is SOOOO true (I struggled for about a month to get an AHAH for working earlier this year…then figured out that AHAH doesn’t play nicely with CCK).

Also new: merlinofchaos has implemented an AJAX framework, and jQuery UI is in core. Plus there is the ability to use other libraries too, not just jQuery. Drupal 7 is gonna rock!

Snow Leopard, Drupal, Macports and php

The short story is this: Snow Leopard has php 5.3.0 in, and although Drupal 6.14 now runs on that version, all previous drupal versions run on 5.2. [Solution? Manual compile - instructions below]

(Read the article)

South Africans: it’s legal to add people to your newsletters without their permission

Turns out it’s legal to spam people if you’re South African.
(Read the article)

Import the correct package for Actionscript 3 functions

Warning: geeky rant follows. If you don’t care about Flash and Actionscript, don’t bother reading. Go and play in the sunlight, or whatever you people do for fun.
(Read the article)

Next Page »