about 3 weeks ago - 5 comments
I’m going to make a simple point. And because people that know me think I’m a “unfair-Google-aficionado-that-doesn’t-see-how-evil-Google-is”, I’m going to use Android as victim here.
iPhone ruleZ
Other OS? I’m not even taking into consideration old stuff like Symbian: is just too easy to trash it now-days (Qt is a whole different story though).
Android is great… for [...]
about 1 month ago - No comments
Imagine you have a Binary Tree, with those characteristics:
Nodes do not respect any order relation – In other words: it’s not a Binary Search Tree of any kind
Every node appears once and only once within the tree
A nice Binary Tree
Then, your little brother passes by your desk and, to upset you, deletes the tree from [...]
about 1 month ago - 3 comments
I believe I don’t have to describe what primes are, what are their properties and what not. This post is more a tribute to geek-ness of 2 friends-and-colleagues (@lucabox) that have fun thinking of algorithms to solve stupid (or less stupid), and always useless problems .
Optimus Prime – yeah yeah, a [...]
about 1 month ago - No comments
I’m “studying” this algorithmic technique: Backtracking. This is an algorithmic approach to problem solution that I trust every good Computer Scientist already uses; but taking a good theo-practical look at it is something better.
A Backtracking Tree
I believe you can find enough informations about it online (the 2 links I provided are more than enough), so [...]
about 1 month ago - 7 comments
This is a classical problem of Computer Science: it’s used to study both Greedy and Dynamic Programming algorithmic techniques.
I hate having my pocket full of copper!!! -_-
Definition
Given:
A set of n Denominations D[0...n-1] in ascending order, representing a Monetary Coin System
An money amount A, as input
calculate a solution:
S[0...n-1], with 0 <= S[i] <= (A/S[i]) and 0 [...]
about 1 month ago - 4 comments
For this you need someone to teach it to you: if you made it yourself, then you are a very good Comp-Sci, and you should send your CV to Google ASAP.
Without branching O_o?
Yes, without using any “if ( a < 0 )…”. To do that, you need to refresh how Two’s Complement works, [...]
about 2 months ago - No comments
Tonight it’s a challenging one. Or, better, a problem of which is really difficult to find a good solution in < O(n3). Indeed, it’s a question that an ex-colleague was asked during an interview with Big-G.
The guy, a part from being a REALLY smart guy, is also very humble, and he doesn’t want to be [...]
about 2 months ago - No comments
Another old-classic problem: the Merge Sort.
Merge Sort Algorithm
The problem of the classical implementation
The whole algorithm is explained in the wikipedia link above, so I’ll focus on the problem here.
The Merge Sort is an in-place-sorting-algorithm that requires some support memory to do it’s calculations. At the “merge step”, an amount of memory as large as the [...]
about 2 months ago - No comments
Another simple-but-yet-interesting problem that I found challenging solving is the to Write a Fibonacci’s numbers calculator. It’s a REALLY SIMPLE problem, but still can demonstrate how superficial thinking in programming can lead to dramatically bad solutions.
What’s a Fibonacci’s number
A Fibonacci’s number is an integer number generated using the following function:
Assumed that:
f(0) = 0
f(1) = 1
for [...]
about 1 year ago
4. Perché stupido? Ogni posto è quello che è perché determinato dalla sua storia.
6. Motivare, non giustificare.
7. Niente è identico. E credimi posti con “percorsi simili” forse stanno pure peggio. Vogliamo parlare dei paesi dell’est? Vogliamo parlare di alcune zone della Spagna? Vogliamo parlare del sud-america? Vogliamo parlare di alcune città siciliane? Jamm.
8. Non è che puoi ficcare lo slogan “la chiesa è una merda” ovunque, sii realista. Per quello ci fai un documentario a parte. Stai facendo un documentario su Napoli, non una propaganda anticlericale.
Riguardo la ragazza, sebbene abbia criticato anche io la sua abilità, scadere nella critica dell’estetica mi sembra alquanto fuori luogo.
Ad ogni modo, ho parlato con Luciano De Fraia, il regista sceneggiatore produttore e chissà cos’altro. Cito testualmente:
“l’attrice doveva essere Lina Sastri, che dopo mesi di attesa ci ha poi proposto altri mesi di attesa..poichè il film era gia pronto salvo le parti girate per strada allora abbiamo cercato un altra attrice, Sara ha 21 anni, ha lavorato gratis come noi”
Insomma, situazione di fortuna. Considerando che un autoprodotto, il budget quello è, e quella non è l’unica problematica in cui si sono imbattuti, direi che in fin dei conti non è un cattivo lavoro.
Fermo restando che l’interpretazione di lei è davvero il difetto del documentario.
about 1 year ago
6. A me suona troppo di giustifica. Non a caso ci sono le conclusioni finali dove, all’ipotesi “la colpa e’ dei napoletani”, si auto-risponde aggiundendo dettagli che delineano la linea di pensiero.
7. Nemo, ma Napoli e’ nel CENTRO d’Europa o no?
E ste cose non sono successe OVUNQUE nel resto d’Europa?
Perche’ Napoli sembra piu’ vicina ad un Medio Oriente egiziano che al resto dei paesi che stanno sulla bandiera blu a stelle gialle?
Capisci cosa intendo? Il paragone va fatto con il “nostro” occidente. Quello di cui, bene o male, condividiamo la cultura (mediatica).
Sulla ragazza, mi riservo di dire quel che me pare, dato che e’ un giudizio puramente estetico.
Buon per lei che l’ha fatto gratis.
about 1 year ago
Noterai che ho citato anche Spagna e Sicilia, non mi pare che stiano in sudafrica…
about 1 year ago
Ah, mi erano sfuggite.
Ma, ripeto, Napoli e’ diversa da entrambe: la cultura nostra e’ meno civile persino di una Palermo o di una Catania.
Ovviamente c’e’ una fortissima componente di “Potere Locale”, ma Napoli risulta comunque meno civile. Ed e’ famosa per questa nel mondo.
about 1 year ago
Non è così, se intendi della civiltà della gente. Ho visto personalmente scene che parevano trapiantate da Napoli. Motorini su marciapiedi, semafori optional, carte a terra, non cura del bene pubblico, opere pubbliche dimenticate e bistrattate.
Napoli è sulla bocca di tutti perché è Napoli. Punto. È famosa per il concentrato di cose allucinanti, belle e brutte. È la città più paradossale del pianeta.
Per non parlare del decadimento culturale di molte città del sud.
Napoli è solo…Napoli. È particolare. Del resto potrei rigirarti la frittata e dire che se non vuoi accettare motivazioni storiche del perché Napoli è quello che è, allora mi devi spiegare pure come può una sola città (come tu affermi) nel mezzo dell’occidente essere incivilizzata.
about 1 year ago
Rileggendo quanto ho scritto fin ora, e’ chiaro che ho scritto male.
Ma per me il punto e’ proprio questo: non credo che la “dimostrazione” del documentario sia buona.
Fa acqua.
E fa acqua perche’ si basa eccessivamente su concetti comuni a tanti altri posti.
L’inizio mi piaceva: le motivazioni piu’ GeoPolitiche e Logistiche sono migliori.
Come, per esempio, e’ stato interessante capire come si sono sviluppati i vari quartieri.
E’ il tutto che non mi sembra una “Conclusione che Quadra”.