I decided to enroll the free two courses delivered by Udacity: Building a Search Engine and Programming a Robotic Car. There will be programming contests and the language used will be Python. I never programmed in Python before and so I decided to start learning the language.
If you already know a language like Java, C# or C++ learning Python is relatively easy.
I started to quickly read the official tutorial:
I think that it is quite good as a starting point and teach you all the basics: control flows, data structures, modules, input and output, errors and exceptions, classes and standard library.
An another interesting resource is Learning Python in 10 minutes. This collects in a single post the basic Python syntax.
After the following reading I decided to start doing a simple coding session. I decided to implement a Code Kata and in particular the Kata Four: Data Munging.
First of all, I installed the python engine:
I decided to use the version 2.7 instead of the latest 3.2. It seems that the latest is quite recent and there are lots of breaking changes and the conversation process of many libraries is still in progress.
The next step is installing the development environment. It seems that there is a unproportional list of editors out there to develop in Python. I personally love Visual Studio and the idea of a single integrated environment and for this reason I found a Python extension for Visual Studio that was perfect for me:
Ready !!!
You can create a new project in the usual way:
and start adding files in the solution explorer:
The tool has also some good intellisense that helps in writing code. Considering that Python is a dynamic language this is quite impressive.
Here few examples:
This is an extract of the code:
You can find the complete source code in my personal repository:
I think that the best way to learn Python is using it. I am looking forward to play with it during the courses.
Be passionate, enthusiast, curious, motivated and ambitious. Communicate, collaborate, share and learn constantly!
Tuesday, 14 February 2012
Saturday, 4 February 2012
Democratizing Higher Education
Last year, I have been part of the first step in the upcoming revolution of education. I took an online class on "Introduction to Artificial Intelligence" and the experience has been great. I love learning and I truly believe in the importance of higher quality education at lower cost delivered through Internet everywhere at anytime.
There are already some outstanding experiments out there:
Both offer interesting lessons on a broad range of topics for free. The topics are not strictly related with computer science.
I believe that people love learning but at the same time people want to be able to add their new skills on their CV. For this reason, it is important to organise exams and give certificates. The most important thing is price: price have to be very low in order to make education available to all the people.
There is now a new exiting project that is called Udacity with exactly this purpose in mind. The classes will be free of cost and all about computer science topics (at the moment).
Classes start on 20th February 2012 but courses will be offered again starting April 16, 2012.
The most exiting thing for me is that now they have a programming environment, so you can develop and test software. This means that there will be programming problems to solve in order to pass the course.
An another upcoming project is MITx that will offer a portfolio of MIT courses through an online interactive learning platform. I am very curious to see what will happen.
We will have plenty of cool things to learn... as usual is all about prioritising and finding the time for studying.
Sebastian Thrun resigns from Stanford to Launch Udacity. I have a great respect for this man.
There are already some outstanding experiments out there:
Both offer interesting lessons on a broad range of topics for free. The topics are not strictly related with computer science.
I believe that people love learning but at the same time people want to be able to add their new skills on their CV. For this reason, it is important to organise exams and give certificates. The most important thing is price: price have to be very low in order to make education available to all the people.
There is now a new exiting project that is called Udacity with exactly this purpose in mind. The classes will be free of cost and all about computer science topics (at the moment).
Classes start on 20th February 2012 but courses will be offered again starting April 16, 2012.
The most exiting thing for me is that now they have a programming environment, so you can develop and test software. This means that there will be programming problems to solve in order to pass the course.
An another upcoming project is MITx that will offer a portfolio of MIT courses through an online interactive learning platform. I am very curious to see what will happen.
We will have plenty of cool things to learn... as usual is all about prioritising and finding the time for studying.
Sebastian Thrun resigns from Stanford to Launch Udacity. I have a great respect for this man.
Tuesday, 31 January 2012
Waterloo Game Analysis
Microsoft created the Facebook Game Waterloo in order to do some research on game theories.
Tonight, just for fun, I wanted to create a piece of software that enumerate all the possible combinations and find the move with the highest probability of win (one Nash Equilibrium).
I created it using a simple C# console application.
First of all, I created a function that returns a list of all possible moves for each player (the funniest part):
After that, for each pair of moves, I calculated the number of wins and finally get the better move.
The implementation of the Win extension method:
and the main body:
Using total = 15 and n = 5 the result is:
The Waterloo game use total = 100 and n = 5. With these numbers the code is too slow to terminate but you can easily guess that the result will be (20, 20, 20, 20, 20).
If you are curious about the total number of possible moves in Waterloo I can tell you this with the following code. The code analyse a specific Waterloo move telling you what is the probability of win in addition to the total number of moves.

So, the total number of moves is 4598126 !!!
The move (20, 20, 20, 20, 20) is the "best move" in terms of probability. However, if you play against a human being it is probably easier to come up with a solution like (33, 33, 34, 0, 0) or (34, 34, 11, 11, 10). In both the cases, if you use the "best move" you lost.
Let's see the result using (33, 33, 34, 0, 0):
Let's see the result using (34, 34, 11, 11, 10):
Arrived at this point I feel a little bit lost. What is the best solution?
Probably there are more Nash Equilibrium's and the solution should be a probabilistic strategy instead of a simple move.
Let's see what will be the result of the research.
If you want to learn more about Game Theory, you can watch this introduction course taken from the Artificial Intelligence class:
https://www.ai-class.com/course/video/videolecture/164
You can find the full source code in my personal repository: Waterloo Game
UPDATE: Code from IanS
IanS proposed a recurvise implementation of the "combinations" algorithm. It it probably slower then mine (it is a recursive algorithm) but has the advantage of readability. This solution has the interesting property of not using any explicit assignments or increment operations.
Thank you Ian for your feedback.
Tonight, just for fun, I wanted to create a piece of software that enumerate all the possible combinations and find the move with the highest probability of win (one Nash Equilibrium).
I created it using a simple C# console application.
First of all, I created a function that returns a list of all possible moves for each player (the funniest part):
After that, for each pair of moves, I calculated the number of wins and finally get the better move.
The implementation of the Win extension method:
and the main body:
This is the output of the basic example:
Using total = 15 and n = 5 the result is:
The Waterloo game use total = 100 and n = 5. With these numbers the code is too slow to terminate but you can easily guess that the result will be (20, 20, 20, 20, 20).
If you are curious about the total number of possible moves in Waterloo I can tell you this with the following code. The code analyse a specific Waterloo move telling you what is the probability of win in addition to the total number of moves.
The output:
So, the total number of moves is 4598126 !!!
The move (20, 20, 20, 20, 20) is the "best move" in terms of probability. However, if you play against a human being it is probably easier to come up with a solution like (33, 33, 34, 0, 0) or (34, 34, 11, 11, 10). In both the cases, if you use the "best move" you lost.
Let's see the result using (33, 33, 34, 0, 0):
Let's see the result using (34, 34, 11, 11, 10):
Arrived at this point I feel a little bit lost. What is the best solution?
Probably there are more Nash Equilibrium's and the solution should be a probabilistic strategy instead of a simple move.
Let's see what will be the result of the research.
If you want to learn more about Game Theory, you can watch this introduction course taken from the Artificial Intelligence class:
https://www.ai-class.com/course/video/videolecture/164
You can find the full source code in my personal repository: Waterloo Game
UPDATE: Code from IanS
IanS proposed a recurvise implementation of the "combinations" algorithm. It it probably slower then mine (it is a recursive algorithm) but has the advantage of readability. This solution has the interesting property of not using any explicit assignments or increment operations.
Thank you Ian for your feedback.
Sunday, 29 January 2012
Unlimited Internet and my new Android device
Yesterday, I finally solved an important problem.
As many of you know, I am living in UK while my girlfriend live partially here and partially in Italy. We tend to stay quite in touch with each other but this costs me a lot of money. Unfortunately there are no telephone companies with offers on text between countries.
The solution? Unlimited Mobile Internet.
We started from the following situation:

The situation is now:
Having Unlimited Internet is awesome. You feels like the entire world is in your hand.
Fantastic !!!
As many of you know, I am living in UK while my girlfriend live partially here and partially in Italy. We tend to stay quite in touch with each other but this costs me a lot of money. Unfortunately there are no telephone companies with offers on text between countries.
The solution? Unlimited Mobile Internet.
We started from the following situation:

- I have a vodafone italian card without Internet access
- I have a Windows Phone 7 device (LG Optimus 7)
- She has a vodafone italian card without Internet access
- She hasn't a smart phone

The situation is now:
- We both have a smart phone with Android
(Sony Ericsson XPERIA) - I have a Windows Phone 7 device with my Italian Sim card
- We both have Unlimited Internet in UK
- We both have lots of text and calls for free every month
- I reduced my telephone costs of more than 50%
Having Unlimited Internet is awesome. You feels like the entire world is in your hand.
Fantastic !!!
My New Official Blog
Hello,
It is a while that I am considering ways to centralise my presence on the web and I finally decided what to do.
Until now I had three blogs and one personal web site:
At the same time I didn't want only a simple blog but I wanted a single personal homepage with a blog inside it. I basically wanted a single entry point to my digital life. Implementing a portal like this manually requires a lot of work and I couldn't really afford it in a reasonable time. Fortunately, I realised that BlogSpot could be easily solve all my problems.
Why BlogSpot:
An another important decision is the language. For obvious reasons, I am going to write most of my posts in English. After all, I am living in UK and this seems the right decision. English is the way to reach a vast amount of people but I am very sorry for some of my Italian friends that could have problems reading my posts. For you, I suggest using automatic translation services offered by Google that are easily accessible at the right of the page. An another quick option is to install the Google Toolbar to get translations with a single click by adding one of the buttons below to your browser's toolbar.
I probably won't remove the others blogs for a while but I am not going to update them anymore. For this reason, please, consider this as my only blog.
This is my only blog.
My intentions with this blog are the following:
It is a while that I am considering ways to centralise my presence on the web and I finally decided what to do.
Until now I had three blogs and one personal web site:
- Technical Italian Blog (Hosted by UgiDotNet)
- Technical English Blog (Hosted by UgiDotNet)
- Life Blog (Hosted by Word Press, my old windows live blog)
- Personal Homepage (Personal Hosted Plan)
At the same time I didn't want only a simple blog but I wanted a single personal homepage with a blog inside it. I basically wanted a single entry point to my digital life. Implementing a portal like this manually requires a lot of work and I couldn't really afford it in a reasonable time. Fortunately, I realised that BlogSpot could be easily solve all my problems.
Why BlogSpot:
- Extremely easy to setup and use
- Easy to customise with lots of gatdets available
- Possibility to create custom pages in addition to the blog (the blog itself is just a page)
- Possibility to choose a custom domain name (andrea-angella)
- Possibility to add a new post using the browser (no need of external software like Live Writer)
- Possibility to check the spelling
- Support for mobile devices
- Well integrated with Google services (Of course, this is Google)
- Free
An another important decision is the language. For obvious reasons, I am going to write most of my posts in English. After all, I am living in UK and this seems the right decision. English is the way to reach a vast amount of people but I am very sorry for some of my Italian friends that could have problems reading my posts. For you, I suggest using automatic translation services offered by Google that are easily accessible at the right of the page. An another quick option is to install the Google Toolbar to get translations with a single click by adding one of the buttons below to your browser's toolbar.
I probably won't remove the others blogs for a while but I am not going to update them anymore. For this reason, please, consider this as my only blog.
This is my only blog.
My intentions with this blog are the following:
- Create a single entry point to my digital life with links to my presence in the web
- Share with the world my opinions and some technical stuffs
- Receive constructive feedbacks
- Keep track of my life experiences and my learning for personal reference
- Improve my writing skills in English
Wednesday, 31 August 2011
Tuesday, 23 August 2011
Exam passed: “MCTS - Windows Applications Development with Microsoft .NET Framework 4”
I am definitely not a guru of WPF but recently in my company I had to play with it a little bit and it was the right opportunity to prepare the certification.
The 15th of August 2011 I passed the certification exam:
“MCTS - Windows Applications Development with Microsoft .NET Framework 4”.
This is how looks my certification logo at the moment:
For many people certifications are not important or required. However, I believe that setting goals and achieve them is very exciting. If you studied at the university like me, you know what means passing an exam. Well, that kind of emotion allow you to continue towards higher goals.
This time I want to achieve the professial level MCPD.
Before this, I have to pass other two MCTS level certifications:
Before to finish, I want to underline some important aspects when you want to prepare a Microsoft certification:
The 15th of August 2011 I passed the certification exam:
“MCTS - Windows Applications Development with Microsoft .NET Framework 4”.
This is how looks my certification logo at the moment:
For many people certifications are not important or required. However, I believe that setting goals and achieve them is very exciting. If you studied at the university like me, you know what means passing an exam. Well, that kind of emotion allow you to continue towards higher goals.
This time I want to achieve the professial level MCPD.
Before this, I have to pass other two MCTS level certifications:
- MCTS: .NET Framework 4, Data Access
- MCTS: .NET Framework 4, Service Communication Applications
Before to finish, I want to underline some important aspects when you want to prepare a Microsoft certification:
- Don't use only the official preparation book because it contains a subset of the required arguments.
- Read carefully the section "Skills Measured" and check that you covered all the subjects
- In this case, for example, it was easy to unnote that the exam included the Task Parallel Library and Parallel LINQ
- Take practise tests on MeasureUp is a big help and you shouldn't understimate this
Friday, 12 August 2011
Unit Test Lab il 24 Settembre 2011 – Tenetevi pronti
Ciao a tutti,
appena prima delle meritate vacanze estive DotNetToscana vuole rivelare alcuni dettagli del prossivo evento laboratorio.
La data à già stata fissata a Sabato 24 Settembre 2011 mentre il luogo deve ancora essere confermato.
Il laboratorio sarà guidato da Matteo Baglini mentre gli altri membri dello staff forniranno supporto tecnico ai partecipanti.
Segue una breve descrizione dell’evento:
Uno degli aspetti più controversi dello sviluppo software è sicuramente il test.
Pratica da molti reputata importante per ottenere un software di qualità ma allo stesso tempo snobbata. La realtà è che gli sviluppatori preferiscono progettare e realizzare il software piuttosto che testarlo lasciando quest'ultimo compito al team di tester. Esistono molteplici tipologie di test, lo Unit Test è uno di questi e rappresenta uno strumento importante per i tester, ma soprattutto per gli sviluppatori. Durante questo laboratorio potrai provare con mano la pratica dello Unit Test e trovare risposta alle tipiche domande: perchè, come e quando effettuare Unit Test. Imparerai i principi che guidano lo Unit Test passando dalla teoria alla pratica, applicando questa tecnica in svariati contesti.
Maggiori dettagli seguiranno alla fine del mese,
Buone vacanze a tutti,
Vi aspettiamo,
Andrea
appena prima delle meritate vacanze estive DotNetToscana vuole rivelare alcuni dettagli del prossivo evento laboratorio.
La data à già stata fissata a Sabato 24 Settembre 2011 mentre il luogo deve ancora essere confermato.
Il laboratorio sarà guidato da Matteo Baglini mentre gli altri membri dello staff forniranno supporto tecnico ai partecipanti.
Segue una breve descrizione dell’evento:
Uno degli aspetti più controversi dello sviluppo software è sicuramente il test.
Pratica da molti reputata importante per ottenere un software di qualità ma allo stesso tempo snobbata. La realtà è che gli sviluppatori preferiscono progettare e realizzare il software piuttosto che testarlo lasciando quest'ultimo compito al team di tester. Esistono molteplici tipologie di test, lo Unit Test è uno di questi e rappresenta uno strumento importante per i tester, ma soprattutto per gli sviluppatori. Durante questo laboratorio potrai provare con mano la pratica dello Unit Test e trovare risposta alle tipiche domande: perchè, come e quando effettuare Unit Test. Imparerai i principi che guidano lo Unit Test passando dalla teoria alla pratica, applicando questa tecnica in svariati contesti.
Maggiori dettagli seguiranno alla fine del mese,
Buone vacanze a tutti,
Vi aspettiamo,
Andrea
Subscribe to:
Posts (Atom)