Monday, April 23, 2012

Machine Learning Class

Hi everybody,

it's online the new Machine Learning class of Standford University through the Coursera website.

http://www.coursera.org/course/ml

Refresh your linear algebra....


This link contains an useful pdf regarding linear algebra. It's a good reading if you want to refresh your knowledge. Probably for the newbies the relations between the arguments are not so explicit and i suggest to use this pdf as complement to another book.

HTML:
http://www.numbertheory.org/book/

PDF:
http://www.numbertheory.org/book/mp103.pdf

Thursday, April 19, 2012

Hi-Tech websites

Hi folks,

I don't like to copy piece of articles from other website. So, I share with you two very famous website I use to visit. Usually they provide a lot of news and podcast about new technologies. If you know some other website, feel free to share it with everybody just commenting the post.

http://www.engadget.com/

http://www.tomshardware.com/

Friday, April 13, 2012

Pragmatic Debug IT - Book Review

I went through this book because I was interested to learn something more about debugging, not as a simple research of a bug, but as a set of methodologies and pragmatic tips that can help to write robust, clear and self-explaining software. The book is splitted into two main topics, the former is a microscopic journey through four step the author has identified as the principal operations to be executed when facing a bug; the latter is a macroscopic vision of the whole system and the author provides tips and especially tools to deal with the debugging process inside a company.

The first 5 chapter belongs to the microscopic description.
The first chapter is an introduction of the empirical approach used to remove a bug. This chapter introduces the reader to the main step of debugging:
  • Reproduce
  • Diagnose
  • Fix
  • Reflect
The other four chapter deals with each of this steps. The "Reproduce" chapter explains that reproduce a bug is the most important and sometimes difficult step to do during debugging and provides a series of suggestions as logging or control the inputs.
The "Diagnose" chapter explain what happen next the reproduction. In this phase, the programmer must define hypothesis and experiments to find the real cause of the problem. The experiments he/she conducts are aimed to verify or not his/her hypothesis. Typically the experiments:
  • Tries to examine the internal state of the software  (as example using a debugger)
  • Modify the environment the software runs in (input files, OS. variables)
  • Change the logic of the code and see the effect.
The "Fix" chapter helps to understand better the implication of your changes in the code and how to avoid regression. Finally, the "Reflect" chapter describes how the knowledge acquired fixing a bug can be shared with the others and make think about other possible errors.

The next 2 chapters gives a whole vision of bug management inside a software company. Topics of this chapters are how a company should manage bugs and bug reports,how give priorities to the bugs such as none of them is left behind before continue the development, how to deal with the customers and so on.

The last 3 chapters that completes the book gives some useful tips to how avoid bugs or simply make it easy find them. Chapter 8 explains special cases where the normal empirical approach can't be used rigorously. Chapter 9  instead explains how Automatic Testing, Automatic Builds, Source Control, Continuos integration system and so on can be a blessing for debugging. The last chapter close the book explaining ways of how our code can be "prepared" to be debugged in a more easy way and how our software can give us useful information without effort.

I found this book very helpful and even if doesn't teach you to found a bug in 2 seconds It gives you a method to debug your software more efficiently and make the software debug itself. Also provides some clues about set of tools that can be used for the process. The "experiences" paragraphs through the book helps to understand better how to apply the tips of the book and also clarified which are the errors I used to do while debugging.

Tuesday, April 10, 2012

R - Scripting language for statistics


I'm actually reading the book "Machine Learning for Hacker" and I hope to review it as soon as possible together with other books as "Pragmatic Thinking and Learning" and "Pragmatic Debug it". In the first book, the author uses the language R for the examples. R is a scripting language made from staticians for staticians that helps providing a set of functions and data structures to help with the job.

Here is the website: http://cran.us.r-project.org/

Thursday, April 5, 2012

GDB: Debugging old style

 With the rise of IDE and RAD tools as Eclipse or Visual Studio, tools that made the history of computer science tends to disappear. Probably this is cause by senior programmers prefer to address young programmers toward this IDE tools, more usable and easy. Sometimes, you don't have an IDE, or you don't want to create a project for some simple exercises but, you will need a debugger in either way.

GDB is the debugger. You can do everything you do in a IDE debugger using the command line and GDB. In fact, often IDE maps debugger buttons into GDB instructions and format the outcome properly.

Below you can find two link, the former is a short tutorial while the latter is the official guide to GDB.


http://www.cs.cmu.edu/~gilpin/tutorial/

The official Guide can be found @

http://sourceware.org/gdb/current/onlinedocs/gdb.pdf.gz

P.s. Yesterday i was traveling and a guy next to me was programming an IPhone APP. He was stucked on an error, trying to resolve it using print instruction or logging. Because XCode uses GDB for debugging, I said to him to run a backtrace command in the GDB to see what's going on and I gave him the guide you can find here. I told him to read just the Sample session chapter (around 5-6 pages) to understand how to use minimally GDB.
He doesn't have listen my advice and, for not read 5-6 pages, he spend more than an hour on that bug using his method and probably he will continue to use it.

Sometimes you have to put aside proud and listen other people because anyone can teach you something because everyone have a different view of  the same problem.

Tuesday, April 3, 2012

Decision trees

Today I propose a good paper about random decision tree suggested by my professor. This kind of tree are used in the kinect system to track the skeleton of the player categorizing each pixel of the depth-map.

http://research.microsoft.com/apps/pubs/default.aspx?id=155552

Monday, April 2, 2012

Unity 3D mobile licenses




 Until the 8th of April is possible obtain a iOS and Android license of UNITY 3D for FREE!!!

Unity 3D is a powerful and easy game editor that allows to create complete videogames for multiple platforms.

http://unity3d.com/unity/

Think Complexity - Book Review


If like me you think this book will explain you the complexity theory of algorithms and teach you how to write faster code you are out of the road.
Instead, this book shows various models that allows to simulate experimentally the behavious of real complex system.
Another aspect who the author try to explain through all the book, is the validity and the robustness of explanations of complex system behaviours given with computational models compared to the "old science" approach, based on formulas and mathematically explainable relations .

In the preface the author indicates three major topics the book will cover: Python programming, Computational Modeling and Philosophy of science. While the last two topics are covered deeply, trough the book and in the references, the Python programming (one of the reasons i choose this book) is very basic and the references to other libraries doesn't makes the code more complex. So, this book is not for pure practical programmers who want to learn advanced features of python, which are covered better in books like "Dive into Python" and "Think Python".

Computational modeling is explained widely thanks to exercises, references and case studies. Starting from systems describable through graphs, the book continues explaining systems that present a specific distribution of events and how to model these distributions and extract the relations between the parameter of the model. Cellular automata is explained and used to generate some behaviors like randomness or other models as fractals, percolation. Other models are described to show the behaviors of some critical systems, systems in transition between to states, as freezing waters and pink noise. The last models described are the Agent-based models and examples as traffic jams and bird flocks are used to explain them.

For what concern the Philosophy of Science, the author tries to induce into the reader what "Thomas Kuhn" introduced as "Paradigm shift", a shift from old science to complexity science, where complex models gives the same satisfaction of equations.
To better explain this concept, I report an example of the book:
"The development of complexity science is not the replacement of an older model, but (in my opinion) a gradual shift in the criteria by which models are judged and in the kinds of models that are considered acceptable.For example, classical models tend to be law-based, expressed in the form of equations, and solved by mathematical derivation.Instead, models that fall under the umbrella of complexity are often rule-based, expressed as computations, and simulated rather than analyzed. Not everyone finds these models satisfactory. For example, in Sync, Steven Strogatz writes about his model of spontaneous synchronization in some species of fireflies. He presents a simulation that demonstrates the phenomenon, but then writes:
I repeated the simulation dozens of times, for other random initial conditions and for
other numbers of oscillators. Sync every time. The challenge now was to prove it. Only
an ironclad proof would demonstrate, in a way that no computer ever could, that sync
was inevitable; and the best kind of proof would clarify why it was inevitable."
Pros of the book are the exercises and the presence of case studies at the end of the it with which the reader can practice. Also, each chapter contains both sections where models and implementations are explained and sections where papers shows real-system with their derived model.
One of the cons of this book is the huge presence of external references to papers and wiki pages. Of course is practically impossible fill a single book with all the topics related to the models explained but, the continuous "goto" and come back impact on the readability.

This book is a good reading for Computer scientist who wants to learn about complex systems and the data-structures related. For who is interested on the philosophy aspect of complexity, the book proposes in each chapter the validity of this method and how can be applied to study complex system where a clear definition of laws and equations is impossible. The author stimulate the curiosity of the reader through the book, asking to implement and critically analyze models looking for analogies and differences. Even if I consider myself a pure practical programmer, this book interested me because describes the behavior of real-system through models that I can reassemble to apply them to other problems, providing also methods and tools to analyze the results of the tests compared to the real system behavior.

Free Machine Learning Lectures

Hi guys,

i want to share with you this link to the Standford Lectures Videos about Machine Learning. There are also other topics, from programming to physics. 
http://www.ml-class.org/course/auth/welcome

Here the youtube link:
http://www.youtube.com/watch?v=UzxYlbK2c7E&feature=BFa&list=SPA89DCFA6ADACE599&lf=list_related

In the description of the videos you can find the link to the class website and download the pdfs of the lecture and other useful files.

The MIT does the same with the OpenCourseWare project
http://ocw.mit.edu/index.htm

Sunday, April 1, 2012

Google Summer of Code 2012

From now until the 6 of April is possible to register to the Google Summer of Code 2012!!!! More than 100 companies gives their support for beautiful open-source projects.

Google Summer of Code 2012

Hello World!!!

Hi Everybody,

yes, this is another blog about coding and computer science. I'm going to publish some reviews about books and videos and share some useful or funny link.