Tuesday, 9 December 2008

update...

Sorry for not posting in a while... there were a lot of things happening...

My visa application (for UK Tier 1 visa) was rejected while the previous visa was about to expire. Apparently, the UK Border Agency doesn't recognise any income made through Paypal and Paypal statements are not considered valid. And hence, I did not have sufficient "valid" or "provable" income for the past one year to clear their minimum requirements (even though I have payed tax on it).

So it seems, my mistake was not taking a "regular" job after graduating and trying something different...

Anyway, am still in the process of sorting everything out. Fingers crossed...

Will get back to posting soon.

Monday, 27 October 2008

Second Tech Meetup: another success...

Edit: Added an older video of Yann's demo




It seems the Tech Meetup has caught the attention of the techie folk around Edinburgh, and the second meetup on 8th October was also a big success. We had about 70 people attending, which was a lot more than we expected. Consequently we also ran out of pizza and beer...




So as the self-designated official blogger for the event, I'll try and relate the happenings of the night...



Like last time, we started around 7 o'clock with people filtering in till 7:30. This, lets call it 'group chat time', was useful as it is a good way for people to chat with acquaintances and meet with people they already know. On the other hand, it also takes up a lot of initial time. So for the coming meetup in November we are going to start earlier at 6:30 instead of 7:00, so that we can do the introductions earlier, which means people can start meeting new people earlier.

Introductions

After pizzas had arrived and everyone had had a slice or two, we started with the public introductions like last time. Going through all 70 people did take time, but we think it was pretty useful as it helped break the ice. Even though this might not scale as the number of attendees grows, we still want to carry this on for as long as possible. The main objective of the meetup is to get people meeting and chatting to people they don't already know. A public introduction helps this because even though people don't remember each and every person's name, they can still remember their faces and then come and chat to them afterward.



We are looking for ways this can scale in the future. We are trying to avoid name-badges, etc as that would make the Tech Meetup feel like yet another formal conference or a networking event. Having peoples' profiles and interests on a website beforehand might be a way, but people will still not know who the person is that they want to meet in the crowd (unless we have clear photos on the website, or use name-badges... ).



Many have also proposed a "corners idea", which we are going to try out this time. Basically the idea is to designate certain corners of the room to certain topics where people who want to talk about that can gather. I think it is a good idea. Coming up with a general and yet interesting set of topics for the corners is the hard part. We would love to hear more feedback on this...

Demos



We had two demos again like last time. We had more lined up but sadly had to cut short as we ran out of time, and it was getting late. So, this time starting earlier would help...

Wii Loop Machine

In the first demo, Yann Seznec gave a great demo of his Wii Loop Machine software. Yann's application allows users to create new electronic music using a Wii remote. A big part of producing electronic music is to do with looping music samples and mixing them in a good rhythm. Yann's software allows you to control, mix and match these loops, just like a DJ would, using a Wii remote. It also looks fun because you start dancing with the Wii remote, while producing music.



Here is a video from Yann's blog:


Wii Loop Machine 2.0 :: an intro from The Amazing Rolo on Vimeo.

Technically, Yann mentioned that he is using aka.objects library for accessing Wii remote developed by Masayuki Akamatsu. Yann also has plans of porting the Loop Machine to the windows platform soon. All in all, it was a fun demo.


Erlang



Gordon Guthrie of Hypernumbers gave a high level yet interesting talk on Erlang. He focussed on the philosophy behind Erlang which was designed from ground up to be a concurrent & distribution-oriented programming language. Even though Erlang syntax is similar to many other functional programming languages, it provides native concurrency and multiprocessing capabilities. So an application written in Erlang can scale easily to a large network of computers.

As scalability is one of the biggest concerns for any successful and growing software application, having this functionality inherent in the design since the beginning is a big plus.

Here are the slides for Gordon's talk:

Erlang
View SlideShare presentation or Upload your own. (tags: programming erlang)



Photos


Thanks to Adam Yates, we have some great photos of the meetup. Here are some of them (all throughout this post). I have also uploaded them to the Facebook group.



Future plans

  • Dates: The next meetup is fixed for 12th of November which is a Wednesday again. We have also decided to hold meetups in the future on the 2nd Wednesday of every month, so that it doesn't conflict with most of the other events.
  • Website: We have a plan for a getting a full-fledged community website up for the Tech Meetup. It will have videos of demos, photos, member profiles and facilities to contact each other, forums, Job listings and Event registration. This looks like a lot of work, but we hope to roll it out in phases soon... All suggestions are welcome...
  • Venue: If we continue to grow, 8th Floor of Appleton tower will soon be too small. Bigger halls in the new Informatics Forums are an option. We have decided to stay with Appleton tower for the coming meetup, and see if we do actually outgrow it...

All in all, it was another great meetup with lots of new people coming this time. Can't wait for the next one...

Friday, 24 October 2008

Python

This is a presentation I gave at work on Python. It is a quick overview for anyone interested in the language. I tried to keep it not too technical (but there are still some jargon in there)...

Why Python
View SlideShare presentation or Upload your own. (tags: python programming)




For more on Python, I recommend these articles:

Interview with Guido von Rossum: Making of Python

Eric Raymond: Why Python?

Data structures in Python

Python: Myths about indentation

Peter Norvig: Spell Checker in Python in 21 Lines

Performance computing in Python

Monday, 6 October 2008

Second Tech Meetup on Wednesday

So, its been a month already... the second meetup is set for this Wednesday (8th October) at 7pm. The venue is the same: Appleton Tower, 8th Floor.

Expecting lots more cool people this time...

Friday, 5 September 2008

First Tech Meetup: success!

Thanks to everyone who showed up yesterday! The tech meetup last night went great. We had a group of about 50 people all interested in technology, talking about technology. Even though there were many startuppers and some investors in the crowd, the business chat was to the minimum...

The two demos were great too. Tom Griffiths from Hubdub gave a quick run through of their very popular website and some insight into prediction markets. Matt Aylett from Cereproc also gave a great demo of their Speech Synthesis software and how it can mimic George Bush as well as generate West Bromwich accents.

Special thanks goes to Andrew Mitchell, Colin Adams, and the University of Edinburgh for letting us use their space, and sponsoring the Pizza and Beer... The space on the eighth floor of Appleton Tower was actually very well liked by everyone.

I know many people couldn't make it to this event because of the short notice. I will do a more detailed post about what went on soon. But if you are interested in coming and meeting all sorts of cool techies, just drop us a line...

Wednesday, 3 September 2008

First Tech Meetup in Edinburgh - Sept 4th 7pm

I hear networking is important, but networking sounds like waiters with trays of finger food and paper napkins. Ian Hogarth wrote about "Hackers Need Friends Too!" (http://uk.techcrunch.com/2008/08/21/hey-hackers-need-friends-too/)
on TechCrunch UK, and we've decided to do what they do in London: get all the developers, tech heads, and tech startups together and build a functional community.

This gives everyone a community where we can learn from each other, hear what's going on around us, demo some stuff, and really try and bring together the wealth of tech talent we
have in Scotland and of course, enlighten others who may be interested.

So the first meetup on September 4th is to see what people think and what we can do to make an easily accessible and friendly community of tech minds, skills and startups around Scotland and connecting with London. We're hoping to have a meetup maybe every month and to find a way to connect with Ian's meetup in London (and other cities as they start).

So come along at 7pm to 8th Floor of Appleton Tower (Edinburgh Uni).

The response so far has been really encouraging. Thanks to Sam Collins for setting this up, Andrew Mitchell and Edi Uni for sponsoring it and Ian Hogarth for the support.

Friday, 15 August 2008

Great Generals: Hannibal takes on Rome III - Battle of Cannae

I finally got to writing about the third and the greatest battle of Hannibal against Rome - The Battle of Cannae. The essay is long, but the battle is truly amazing ...


After being defeated at Trebia (Dec 18, 218BC) and Trasimene (Jun 24, 217BC), the Roman Republic was already cornered. There was an enemy rampaging through Italy and yet they could not stand up to him. Fabius Maximus who was appointed the "dictator" after Trasimene, decided not to take on Hannibal (probably a wise decision) and chose to rely on cutting off his supply lines, raiding his camps and basically wearing him down. But his Fabian strategy, as it was known, soon became unpopular with the Roman public. General public was, as it still is, impatient and wanted revenge. So, in 216BC, the Senate did not renew Fabius as a dictator and elections were resumed. As a result, Gaius Varro and Lucius Paullus were elected as consuls, apart from Geminus and Regulus (who were consuls before Fabius become dictator).

Rome's preparations

Usually each consul would go to a battle by himself taking two legions that belonged to him. Each Roman legion consisted of 5,000 soldiers (or legionaries) and were generally accompanied by an allied legion of equal size. So, among the 4 consuls they commanded 16 legions (Roman + Allied), which along with about 4,000 Cavalry and other meant about 87,000 troops.

The Roman Senate decided to send all of these legions to fight Hannibal. Never before in Roman history had all four consuls gone to war at the same time. The terror of Hannibal amongst Romans was so great that they had raised an unprecedented army of almost 90,000 to take him on. They believed their strength in numbers and the strong infantry would overwhelm Hannibal's eclectic army of barbarians (as they called them).

In contrast, Hannibal only had about half as many men (40,000 heavy infantry, 6,000 light infantry and 8,000 cavalry), about 55,000 in all.

Seeing that Romans were raising a huge army, Hannibal decided to take them on sooner rather than later. He moved first by capturing the Roman supply base at Cannae, and placed himself between Romans and their supplies. This provoked the Roman army to move, confident as they were in their large army.

The stage for the epic battle between Hannibal and Roman army was set.

Know thy enemy


The two newly elected Roman consuls, Varro and Paullus were commanding the 16 legions as they moved towards Cannae. But there was a problem: who would take the overall command of the army? Neither of them would be a subordinate of the other. So, by Roman law it was decided that Paullus and Varro would take charge on consecutive days (so one day Paullus and then one day Varro, and so on). It sounds ridiculous now, but this actually happened... To make matters worse, the difference between the two generals' ways was big. Varro was a rash and arrogant general while Paullus was patient and cautious. Even though Paullus was against fighting head on with Hannibal, he wasn't able to convince the hot-headed generals who were itching for a fight. Hannibal knew this.

For two days the armies stood facing each other, but neither would attack first. When Hannibal sent a challenge to Paullus it was promptly rejected. But on the third day, when Varro was in charge, Hannibal ordered his cavalry to cross the Euphidus river and attack the small Roman camp on the other side. They attacked the Roman water supply line from the river and caused a lot of mayhem in the Roman camp. This succeeded in getting Varro angry and got him to cross the river to the other side with all his army. And Hannibal had already prepared for it...

Know thyself and prepare

Hannibal knew that his army was outnumbered 2:1, but he still had the advantage when it came to Cavalry, in numbers (8,000 as opposed to 6,000) and also in strength and experience. So, if his cavalry was able to destroy the Roman cavalry quickly, they would then be able to circle round and attack the Roman infantry from behind. When this happened, it would be essential to prevent the Roman army from spreading or escaping (and later regrouping). So, Hannibal came up with an idea of encircling the Romans from both right and left, a Pincer Attack.

Hannibal knew his soldiers and their weaknesses and capabilities very well. The Carthagian army was made up of warriors from all over the world:
  • 8,000 strong core group of Libyans and Africans who had been with Hannibal for a long time. They wore Roman armour.
  • 8,000 Iberians (Spaniards) who fought with cutting and thrusting swords and javelins. They used large oval shields for protection.
  • 16,000 Gauls who carried long slashing swords and small oval shields.
  • 8,000 skirmishers who wore light armor and used long range weapons like javelins, bows and slings. Their main aim (like present day Artillery) was to disrupt the enemy line by long range attacks and cause casualties even before the battle began. Once the battle began, the skirmishers would usually fall back and let the heavy infantry go forward. Knowing this, Hannibal ordered his cavalry to attack and kill the skirmishers first when they arrived behind the Roman army.
Infantry planning:
Hannibal also knew that his Spanish and Gallic infantry were not as strong and battle hardened as his African unit, but they were still much larger in number (24k vs 8k). So, he decided to form a thick line with Spanish and Gallic in the center and kept the African infantry on the two sides. Their job was to perform the pincer attack from the Roman right and left when the cavalry reached the Roman rear.

He further ordered his central line to advance and meet the Roman center first, in an Echelon or more specifically a V-formation (used by fighter jet squadrons). This had three purposes:
  1. As the battle began, the center would slowly begin falling back and drawing the Roman center into the semi-circle thus formed.
  2. Because the fight would have already started in the center, Romans would also not be able to notice the two African divisions behind on the right and left.
  3. This would give time to the Carthagian cavalry to defeat the Roman cavalry on the right and left flanks and then attack behind the Roman center.

Cavalry planning:
To ensure that his cavalry would be able to quickly destroy the Roman cavalry, he gave his commander Hasdrubal on the left, 2/3rd of his cavalry (6,500), and Hanno on the right was made in charge of the Numidian light cavalry which was 3,500 in number. While Hanno's light cavalry would hold off half the Roman cavalry, Hasdrubal would destroy the other half on the left and then circle round and attack the Roman cavalry on the right from behind. After finishing them off, the combined cavalry would attack the Roman infantry center from behind.

The framework for one of the greatest planned battles in human history had been laid. Hannibal was going to turn his enemy's greatest strength into their biggest weakness.

Stand in the eye of the storm and coordinate


When the battle began, Hannibal himself led the the center formed by the Gallic and Spanish infantry to an advance and tackled the Romans first. They bore the brunt of the Roman attack. Many soldiers were getting killed as they went head on against the strong Roman infantry charge. But being there himself, Hannibal was able to motivate his soldiers and control them to a coordinated retreat. As the central line kept falling back, the initial V-formation changed to a crescent.



In the meantime, the strong Carthagian cavalry was completely destroying the Roman flanks. As planned, they first finished off the left and then the right flanks and then attacked he Roman skirmishers from behind.

Hannibal now sprang the trap that he had laid. He ordered his battle hardened African troops (who had stayed out of the battle until now) to attack the Romans from the two sides. Maybe Romans could not see them because of all the dust caused by the battle, or the Roman generals lacked the quick judgment to respond, nobody knows for sure, but the Roman infantry was now surrounded. Without their flanks, Roman infantry drove itself deeper and deeper into the crescent shaped alley formed by the Carthagian line. Soon, they were completely encircled and running out of space to fight.

Corner and finish


The Romans in the center were packed so close to each other that they could not move their arms or lift their weapons. Only the soldiers on the outer circumference fought and were soon killed where they stood. To cause even more confusion, Hannibal ordered his soldiers to kill all the Centurions (officers) first.

As killing so many Romans was taking a lot of time, Hannibal ordered his soldiers to cut the hamstrings of the Roman soldiers to make them incapable of fighting, and then move on. After finishing the fight, they could come back and kill them at leisure.

Result


Tens of thousands of Roman bodies were all over the battlefield when darkness brought an end to fighting. Some Roman soldiers even killed themselves by burying their own heads in the ground, to escape the pain. In all about 70,000 Roman soldiers were killed and only 14,000 managed to escape and 4,000 were taken prisoner. 600 Roman soldiers were killed every minute that day.

Paullus along with two previous consuls was killed (ironically Varro survived). 29 out of 48 military tribunes and 80 out of 300 senators (in all) were killed in one day. Only 1 out of every 6 Roman soldiers who entered the battle, survived.

The Carthagians on the other hand only lost 16,000 men, most of them Spanish and Gallic who formed the center line.

The Battle of Cannae was the costliest battle in human history uptil then. It still ranks as the second most costly formation battle in human history.

Aftermath

Even though Rome was in complete disarray after Cannae, Hannibal didn't attack and lay siege to Rome. This maybe because he believed that Rome still had significant resources, and also because of his experience from his first battle when he laid siege to Saguntum (refer the introduction to the Battle of Trebia). He was criticized by many in his camp for not taking this opportunity and destroying the Romans completely. But Hannibal's objective of fighting might not have been destruction of Rome, but to dishearten it and force it into a moderate peace agreement.

Hannibal sent a delegation to Rome to propose a peace treaty on moderate terms, but the Roman Senate refused to talk. Instead they mobilized their entire male population and started raising new armies. The word 'peace' was prohibited on the streets of Rome and only women were allowed to cry in public.

At last they had learnt their lesson. Instead of fighting head-on with Hannibal, they went back to attrition strategies of Fabius. In the meantime, the Oligarchy in Carthage was growing more and more jealous of Hannibal, his achievements and his growing popularity. After a few years of maneuvering around Italy, they refused to send Hannibal reinforcements, and Hannibal was forced to pull back.



Hannibal's story

The rest of Hannibal's life story is sad. Even after such huge victories and with unrivaled strategic genius, Hannibal could not carry on winning, because of lack of support from home and loss of most of his good soldiers (either dead or tired from fighting). In 202Bc, fourteen years after Cannae, Hannibal with a much weaker army was finally defeated at the Battle of Zama by Scipio Africanus. The Second Punic War ended with the battle of Zama, and Carthage conceded defeat.

After the war ended, Hannibal tried to become a statesman and was also appointed the Chief Magistrate because of his popularity. But the oligarchy in Carthage were still jealous of him. When the Romans demanded that Hannibal surrender, Hannibal knew that the oligarchy would not support him. He decided to go into a self imposed exile. He offered his services to King Antiochus III of Syria and then the king of Phoenicia.

But the Romans were determined to hunt him down, and in the end one king (Prusias I of Bithymia) agreed to give him up. Determined not to ever fall into the hands of Romans, and to keep the promise he had made to his father on his deathbed (to fight the Romans till death), Hannibal took the poison he always carried with him (in his ring). Hannibal died in 183BC at the age of 64.