Saturday, February 09, 2013

PHP Benelux 2013

In January I've been speaking at PHP Benelux 2013, one of the major PHP conferences in Europe.
You can find a recount of what happened there on the Onebip blog (my company, which sponsored my travel).

Sunday, January 27, 2013

Pyramids and cathedrals

Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. -- Alan Kay
    An analogy to these programs of the sixties is a dog house. If you take any random boards, nail, and hammer; pound them together and you've got a structure that will stay up. You don't have to know anything, except how to pound a nail to do that. Now, somebody could come along and look at this dog house and say, Wow! If we could just expand that by a factor of a hundred we could make ourselves a cathedral. It's about three feet high. That would give us something thirty stories high, and that would be really impressive. We could get a lot of people in there. The carpenters would set to work blowing this thing up by a factor of a hundred. Now, we all know, being engineers and scientists, that when you blow something up by a factor of a hundred, its mass goes up by a factor of a million, and its strength, which is mostly due to cross sections of things, only goes up by a factor of ten thousand. When you blow something up [by] a factor of a hundred, it gets by a factor of hundred weaker in its ability, and in fact, what will happen to this dog house; it would just collapse into a pile of rubble. Then there are two choices you can have when that happens. The most popular one is to say, Well, that was what we were trying to do all along. [Laughter] Put more garbage on it, plaster it over with limestone, and say, Yes, we were really trying to do pyramids, not gothic cathedrals. That, in fact accounts for much of the structure of modern operating systems today. [Laughter and applause]

    Or, you can come up with a new concept, which the people who started getting interested in complex structures many years ago did. They called it architecture. Literally, the designing and building of successful arches. A non-obvious, a non-linear interaction between simple materials to give you non-obvious synergies, and a fast multiplication of materials. It's quite remarkable to people when I tell them that the amount of material in Chartres cathedral, which is an enormous, physical structure, is less than the amount of material that was put into the Parthenon. The reason is that it's almost all air, and almost all glass. Everything is cunningly organized in a beautiful structure to make the whole have much more integrity than any of its parts. That's the other way you can go, and part of the message of OOP was, that, as complexity starts becoming more and more important, architecture's always going to dominate material [...] -- still Alan Kay
    Let's choose between building pyramids or gothic cathedrals, by choosing to model behavior into piles of lines of code or into the web of messages that objects send to each other.

    Sunday, October 28, 2012

    My thesis: linking social network profiles

    Each of us has several accounts on multiple social networks, such as Facebook, Twitter and LinkedIn. But there's currently no deterministic way to find the LinkedIn profile of a Facebook user in an automated way: you have to google the full name of that person and verify the search results by hand.
    So in my thesis I set out to build a solution to this problem based on machine learning (in particular decision trees and support vector machines).

    Here's the abstract:

    Record linkage is a well-known task that attempts to link different representations
    of the same entity, who happens to be duplicated inside a database; in particu-
    lar, identity reconciliation is a subfield of record linkage that attempts to connect
    multiple records belonging to the same person. This work faces the problem in
    the context of online social networks, with the goal of linking profiles of different
    online platforms.
    This work evaluates several machine learning techniques where domain-specific
    distances are employed (e.g. decision trees and support vector machines). In ad-
    dition, we evaluate the influence of several post-processing techniques such as
    breakup of large connected components and of users containing conflicting pro-
    files.
    The evaluation has been performed on 2 datasets gathered from Facebook, Twitter
    and LinkedIn, for a total of 34,000 profiles and 2200 real users having more than
    one profile in the dataset. Precision and recall are in the range of cross-validated
    90% depending on the model used, and decision trees are discovered as the most
    accurate classifier.
    The full thesis can be downloaded if you're interested into these sorts of things (namely applying machine learning to data coming from social network APIs).



    Sunday, October 14, 2012

    A Computer Engineering degree in 5 minutes

    As you know, I have recently graduated as a Master of Engineering at Politecnico di Milano. I think each course in the program of Politecnico has some underlying principles which remain with you after the exam has been passed and the most technical things have been forgotten and left for documentation to remember.
    Thus, I'll try to synthesize the most important concept I took away from each course. This list may be useful to engineers, students of PoliMi in Como and somewhere else, and just to curious programmers wanting to know what I did for 5 years.

    First year

    Mostly, the courses of the first year are mandatory and involve basic maths and physics which will serve in the next years.
    Linear algebra: algebra is a mature way of dealing with multidimensionality, as you generalize numbers and their multiplication or linear combination with vectors and matrices.
    Analysis 1: an engineer really needs practical math skills, and not mere memorization of proofs.
    Analysis 2: this course should be named Analysis N as you generalize from the 1 input/output variable of Analysis 1 to N independent/dependent variables.
    Electrical engineering: engineers build simplified models to work with reality; in practice you use resistance and capacitors and Kirchhoff's laws, not the Maxwell equations. This course could have been focused on hydraulics and be useful as well.
    Physics 1: Entropy is a nasty thing, and how to find and conserve energy in nature is an issue.
    Physics 2: Maxwell equations tell you anything you need to know about classical electrodynamics. Preparing for the exam means writing them on a sheet of paper and be able to explain and use them.
    Computer science 1: C is the minimum common denominator between all languages, and may its pointers and arrays be with you, always.
    Computer science 2: a process is really a virtual machine provided for you by the operating system, appreciate that.
    Telecommunication networks: abstraction over abstraction, you can go from varying voltage levels on a wire to transmitting web pages reliably.

    Second year

    In the second year, you got to choose some courses, and to do some practical project.
    Probability calculus: a mathematical model is built starting from sets and relations/functions.
    Economy: an engineer must know where the money to fund his efforts comes from.
    Differential equations: meteorologists cannot predict weather for more than a limited amount of time due to divergence from initial conditions.
    Automation: feedback systems beat feed-forwards ones because they don't need an accurate model in order to work. Agilists, what do you say?
    Electronics 1: according to classical physics, USB keys and other SSD drives cannot work. Fortunately, USB keys know some quantum mechanics.
    Operations research: you can buy RAM if you have algorithms that consume too much space, but you can't buy time.
    Computer science 3: algorithms are really intertwined with the data structures they work on.
    Software engineering: maintainability is maybe the most important trait of design, and involves also writing diagrams not to avoid coding but to explain your code to other people.
    Software engineering project: communication between teams is typically the hardest problem in software development.
    Statistics and measurement: when you read 3:36:20 PM on your watch, it's actually a range like 3:36:19.5-3:36:20.5; and that interval has a mean and a variance.

    Third year

    Now you get to choose more than half the courses, and of course you have to work on a Bachelor's thesis which workload is of a course and a half.
    Databases: SQL and the relational model are not going to go away soon, and they're really about sets more than tables.
    Chemistry: the structure of [almost] everything we touch on a daily basis can be explained by protons, neutrons and electrons arranged in different ways. Not philotes, but near enough.
    EM waves and nuclear physics: waves are cool because you can carry information on their properties, such as frequency, amplitude and phase.
    Signals: a transfer function goes a long way, and for the engineer everything is linear, time-invariant and Gaussian unless the contrary is proven.
    Computer installations: you shouldn't really buy servers randomly without doing some math first.
    Theoretical computer science: computers cannot solve every problem, and do not parse HTML with regular expressions.
    Knowledge engineering: stochastic algorithms and neural networks work, give them a chance over pure statistical learning.
    Web technologies: HTTP is the lingua franca you need to speak.
    Web technologies project: (web) frameworks have a steep learning curve.
    Logical networks: sequential and combinatorial are two concepts which appear everywhere.
    Information systems: that was just wasted time having to rework RUP diagrams before changing a single line of code makes you aware of why the Agile manifesto is so popular.
    Thesis work: when on unfamiliar ground like new frameworks, languages and APIs, Test-Driven Development with a very short Red-Green-Refactor cycle will definitely speed you up.

    Fourth year

    This year is full of projects: you're a "graduate" student by now, so you're expected to show originality and autonomy.
    Advanced computer architectures: we may be stuck with the x86 instruction set, but if you try a RISC architecture optimization can do wonders.
    Advanced database and web technologies: it's not only SQL, and even universities recognize CouchDB and MongoDB now.
    Advanced software engineering: there's so much going on in a project other than code. You don't see this on a small scale, and it doesn't mean that you have to write it all down, but diagrams and documentation have their communication purpose.
    Computer vision: test-driven, object-oriented Matlab is a reality. But math is hard, especially for 3D models, so leverage libraries for complex domains you don't have time to explore by yourself. Oh yeah, and computers can see, but barely.
    Image processing: testing image-related code is not easy, but regression testing it is.
    Model identification: estimating the value of a stochastic process isn't just sampling and taking an average.
    Multimedia information retrieval: Google (and Google Images) work because of math that you must have the courage to study.
    Pattern analysis and machine intelligence: studying machine learning gives you an edge over all the programmers that don't know what regression is because of their theoretical background.
    Performance evaluation of computer systems: utilization and queuing networks are concept that apply to servers but to teams as well.
    Workgroup and workflow systems: you may dream of creating the new Tomb Raider, but 90% of the money is in business software.

    Fifth year

    In the last year, you can choose courses from other campuses, and you work on a master's thesis for a third of your time.
    Philosophy of computer science: ethos is an important part of execution. When in Rome, do as Romans do.
    Network architecture: one day we will all have fiber in our homes and send phone messages over 4G instead of SMS.
    Distributed systems: remote procedure call is not a modern way to build a distributed application, it's fundamentally different from running processes in a single addressing space.
    Game theory: people are rational. Somewhat, if you consider their utility functions.
    Interactive TV: recommendation systems literally print money.
    Pervasive systems: the way to go is smaller computers, who use less power and are not even based on a general purpose CPU.
    Thesis work: scientific work has other priorities with respect to programming; background and validation and are key with respect to coding and design.

    Friday, September 28, 2012

    A paper on the philosophy of digital piracy

    During my last course at Politecnico I wrote a paper on the philosophical argument of novelty of computer technology problems. Plainly speaking: ethical problems from copyright infringements are just a new version of theft or a new conceptual issue?
    Here is the paper:
    http://bit.ly/S62WtB
    If philosophy is not your thing, it would be boring to read. But it was a good exercise to write.

    Friday, June 29, 2012

    Roundup: the Lean tools series continues

    Here are my posts about the Lean tools for software development proposed by the Poppendiecks and my daily experience with them. I've published also some independent tutorials that may help you in testing legacy code or cook up some functional JavaScript.

    The Turing test explains which are the most popular interpretations of the famous test for distinguishing between humans and machines.
    Lean tools: Pull systems is about limiting Work-In-Progress with a counter intuitive inversion.
    Functional JavaScript with Underscore.js explains how to work with this library.
    Lean Tools: Queuing Theory is about a scheduling technique that works on both people and computers.
    Record and replay for testing of legacy PHP applications lets you record HTTP requests for repeating them in tests later on.
    Lean tools: Cost of delay tries to put a price tag on delays in releasing a feature.
    My take on Utility and Strategic software is a little essay on this dichotomy established by Fowler. In short, you want to work on strategic systems.
    Lean Tools: Self-Determination is about eliminating Taylorism and assembly lines from our profession.
    The Duck is a Lie is a critique on duck typing.
    Lean Tools: Motivation is about what gives a team motivation, and it's not money.

    Sunday, May 27, 2012

    Featured post

    A map metaphor for architectural diagrams

    It is a (two-dimension) representation of a pipe. The map is not the territory , but in software engineering terms they are models of it....

    Popular posts