NexTech/AP2PS 2010

I am currently in Florence, Italy, at the NexTech conference, where I will be presenting a paper we wrote called “On the Performance Evaluation and Analysis of the Hybridised Bittorrent Protocol with Partial Mobility Characteristics”.

The scope of the conference includes many topics on P2P systems, both innovations and optimizations of the P2P protocols. Also, at NexTech there are a number of other conferences taking place, including UBICOMM, ADVCOMP and semapro.

The paper I will be presenting talks about including partial mobility characteristics within Bittorrent networks, in order to allow mobile peers exchange data more efficiently and in a mobile-friendly manner, where their mobile connections (3G, GPRS and so on) are not congested by the network requiring them to upload too much in order to be allowed to receive pieces/blocks. In case you are interested in this topic, I will soon be uploading (after the conference is finished), the article in PDF format directly from the published proceedings.

George Violaris

Florence, Italy – October 2010


Is Android about to take over the world?

Absolutely. About 3-4 weeks ago I purchased my HTC Desire phone, equiped with Android 2.1 (Eclair), – now updated to 2.2 (Froyo) – , and topped with the beautiful HTC Sense. Let me tell you, it was absolutely the most brilliantly amazing purchase I ever made in my entire life. Within a few hours of “playing” with Android, one discovers the power of Linux on the mobile platform. It is difficult to begin to describe how amazing it is. I won’t even talk to you about the features. You have to try it yourselves. I am starting to develop a religion around the little green robot!

As a Java developer, I created my first practice app for the Android, a Fahrenheit to Celsius converter, just to test how easy it is to create applications. Well, if you got Eclipse the power of Java in conjuction with the Android SDK is fully unleashed.

In case you feel the Desire is too expensive for your pocket, there are ton of cheaper brands out there equiped with Android. However, I recommend the HTC Wildfire as an alternative to the Desire. WIldfire is like the bastard child of the Nexus One and the Desire, so yeah, it is also amazing.


Dynamic CSS generation with PHP

The incentive and idea for writing this article comes from Jeff Atwood’s article “What’s Wrong With CSS?”.

I know that in CSS you need to rewrite stuff and it gets annoying if you need more than 200 lines of CSS, which you most probably do even for tiny projects, while huge web applications could need as many as 2000 lines or more.

The short answer to the problem of repetition, is PHP. You can generate your CSS with PHP files, same way you use PHP to generate HTML. The advantage that you get from this is that you can use variables to store CSS items such as colors. You don’t need to repeat the code for Chartreuse (#7FFF00) over 50 times.

<? $chartreuse = ‘#7FFF00′; ?>

.archive-pagination {
color: <? $chartreuse ?> ;
padding: 10px 0;
}

So you simply use the variable you create for the color or for any other CSS element you need to repeat over and over again. This way you can make CSS a little bit more “programmable” and save some time and effort.


Confusing

Source: Stack Overflow


A few programming puzzles

If you are up to sharpening your programming skills, here are a few puzzles to keep you busy. The reason I’m posting these is because I’ll try to solve them myself as I feel kinda rusty lately (I think PHP is trying to kill the best of my programming habits, it’s a good thing I am also programming in Java now for my final year project!)
So yeah, here we go!

1. Given N Queens place count the number of different ways they can be placed on an N x N board so that no queen can attack another queen given one move. (tip: use a backtracking algorithm. Also there are many heuristics you can use for this one, optimizing your algorithms even further).
2. For all 6-digit numbers from 100000 to 999999, find the numbers that, if you add the top three digits to the bottom three digits, and square the result, it will equal the original number. For example, for 123456, you’d add 123 and 456, which equals 579. Then, square that sum, which yields 579 * 579 = 335241. 335241 ≠ 123456, so 123456 is not in the set.
3. Given an array of size 45, containing integers from 1..50 with the exception of five integers, find the missing integers.
4. Create a random number generator that takes as input nodes from a double linked list. (tip: to do this you simply need to un-sort the list in a random way, the algorithm is up to you).
5. Given any file containing code, write a program which calculates the computational complexity of the code. Your output should be in big O notation.
6. Write a small simulation engine for social network interconnections. i.e. it should be able to accept a number of people, some of them connected between them, and the simulation should show the minimum spanning tree for all interconnections to occur based on the already existing ones.

Have fun!


Follow

Get every new post delivered to your Inbox.