In many cases, it is essential to find the name of a computer over a local network. Such fits well when on a DHCP network, and need to always reach a certain machine.
An easy way to obtain this data, is via the python socket library. The ip of the desired machine is obtained via ipconfig (windows) or ifconfig (linux). For the sake of the example, assume that the ip from the DHCP network is 10.0.0.5.
In the python interpretor, execute the following code:
import socket
true_name = socket.gethostbyaddr("10.0.0.5")[0]
print true_name
The code above prints the true name of the machine, as seen on the network. This name is not always the machine name. For example the machine name could be "saher-desktop", while the name on the network is "saher-desktop.local".
When working on a piece of software using a framework or an API, the first source of help to rely on is the official documentation. As development on that code base continues, so does the documentation that changes accordingly. Sadly this is not always the case!!
At the time of this post, the latest stable release of the ubiquity project is version 0.54 and the version pulled from mercurial is 0.55pre8. I was trying to write an enhancement to provide feedback to a command's author. My testing environment had the latest stable version, and as the ubiquity wiki is under 0.5, I assumed it matches my currently running version. At the end of the wiki, a link is provided with the documentation of the CmdUtils library, containg the command CmdUtils.getCommand(id).
Such a command is very helpful as it returns the object representing the command matching the given id. Thus, details about the command's author could be obtained, and hence sending to them feedback. Being very excited about this, I gave it a test, and to my shock nothing worked. Even to my bigger surprise, firebug that is used for debuging ubiquity commands showed CmdUtils.getCommand is not a function.
This caught curiosity, so I opened the ubiquity extension's installation folder, and took a look at the "modules/cmdutils.js" file. With no surprise, the file did not contain the CmdUtils.getCommand function.
At the same time, Abdallah El Guindy was working on the same enhancement, reached the same conclusion, but had the function correctly working. When I asked about his running ubiquity version, it as the latest development version 0.55pre8. After taking and installing that version of the code, the "modules/cmdutils.js" file was the one matching the current online documentation.
Having the correct version number attached to the online documentation, would have saved development time and confusion. Such a problem is not restricted to the ubiquity project, but is also seen in other frameworks or APIs. The main lesson learned here, is that one has to be very careful during development, and not give up easily on finding the root of the problem.
On a small side note, this same problem with ubiquity 0.54 is also in 0.55pre7 (the current latest beta). So the CmdUtils.getCommand(id) is a brand new addition to the code base.
My first experience being involved in a workshop was both exciting and educational. This aimed to introduce different technologies technologies to students of the course. They would then choose a technology to work with a project of their proposal.
The workshop started with my Flex presentation. I followed through the standard sequence of over viewing highlights of the framework and showing sample applications.
Following my presentation was the talk by Mohamed Azab regarding Silverlight and WPF. There was a strong competition between these technologies and Flex during his talk. Such competition is always healthy and gives a chance for people to explore different options to perform the similar development tasks.
The day continued with presentations regarding mobile development platforms, where interesting talks were presented by Bahia El Sharkawy (JAVA-ME) and Mariam Rady (Android Framework).
The workshop concluded with my talk on Multitouch surfaces. It contained an the architecture behind building a multitouch enabled software, and the idea for detecting multiple interaction points. Furthermore, a live demo of the Mini Touch & Write table was demonstrated.
In general, the feedback is very positive, and I hope the talks inspired the students for thinking of highly interactive application ideas.