Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.

29 December 2011

Quick jQuery Intro.

For the second time in two days, one of my friends asks me about jQuery. So, here is a quick introduction to it.Let's say we have the following HTML that contains a list of four items
<html>
<head>
<title>jQuery demo</title>
</head>
<body>
<ul>
<li class="news_line">Mr. One</li>
<li class="news_line">Mr. Two</li>
<li class="news_line">Mr. Three</li>
<li class="news_line">Mr. Four</li>
<ul>
</body>
</html>
Now we want to make it more interactive, so when the mouse hovers on any of the below items it turns red, and when it goes away it turns white again. Here comes the beauty of jQuery, you can give them all a CSS class "news_line", hence you write a function once and it is applicable to them all. So, first of all, you have to include the following script.

<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"
></script>
You put all your jQuery script between the following, this makes sure it's not executed until the page is loaded successfully
<script>
$(document).ready(function(){
... YOUR jQUERY SCRIPT HERE ...
});
</script>
We now are going to use the following function, which simply mean attach an event catcher to the items with class "news_line", and make the event trigger is 'mouseover', i.e. whenever the mouse hovers over it. We also have other events such as 'mouseout', etc.
$(".news_line").live('mouseover',function(){
... DO SOME STUFF HERE ...
});
One more thing to notice is "$(this)", the above command searches for all items with class "news_line", now when we use "$(this)", we are referring the the item we are dealing with now. And starting from that point we use another functions "css()" to change the object's background colour. You may in some other cases use stuff like "$(this).children().css()" to change the colour of all of the children of the matched items, or "$(this).parent().parent().hide();" to hide the parent of the parent of the item you are referring to, etc.So, finally here is the code we are talking about here.
<html>
<head>
<title>jQuery demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".news_line").live('mouseover',function(){
$(this).css("background-color","#ff0000");
});
$(".news_line").live('mouseout',function(){
$(this).css("background-color","#ffffff");
});
});
</script>
</head>
<body>
<ul>
<li class="news_line">Mr. One</li>
<li class="news_line">Mr. Two</li>
<li class="news_line">Mr. Three</li>
<li class="news_line">Mr. Four</li>
<ul>
</body>
</html>

Finally, here is a list of all jQuery functions, events, etc.
http://visualjquery.com/

15 November 2011

Democratization the Internet Infrastructure

You sure heard of the Internet blackhole Egypt lived in when Mubarak's regime shut down the whole internet during January revolution. Other countries are filtering and censoring the Internet, Tunisia, Syria and Iran are just few examples. And recently the availability of the internet to the demonstrators in the Occupy Wall Street movement is an essential issue.

Isaac Wilder and Charles Wyble are two of the participants in  OWS, and they also are the founders of an initiative to democratize the internet infrastructure using Wireless Mesh Network technology. Their initiative is called the FNF (Free Network Foundation)



Let me first give you quick brief about Wireless Mesh Network, normally at our homes we connect our access point to the internet via some sort of wired technology, for example ADSL. But let's imagine if I decide to get my ADSL connection then can give that internet I have to my neighbour's Access Point wirelessly, and he on his turn give it to his neighbour and so forth. So we will end up with having one internet connection shared among us. You can compare it to peer-to-peer file sharing (Kazaa and Torrent), where users are connected in a sort of mesh network.

Basically, the above description is how a Wireless Mesh Network look like, and it is already used but in different scenarios. When you need to have wireless coverage outdoors, you normally need many Access Points to cover the whole area, but also it is hard to get dedicated internet access to each of them, so you end up connecting one of them to the Internet ADSL hose, and then share that internet connection from one to the other using mesh topology.

Now from what I've read in the Free Network Foundation website, they are looking forward to have a similar mesh network that spans a whole metropolitan area or city, and in the first stage each of those cities will be connected the other cities using the internet, but I can see that they have plans to use underutilized spectrum in the VHF and UHF bands to connect those cities without the need of the Service Provider's infrastructure whatsoever, i.e. we will end up by replacing the Internet infrastructure we have today, and people will not be required to go to the Internet Service Providers or Mobile Network Operators for internet access any more.

How would such a system create cheaper Internet for everybody?

In the initial phase, people will be sharing their internet connection, so they will be saving money, and as you can see, their future plan is to totally replace the ISP's and MNO's so it decrease the internet access prices dramatically if not making it free.

But in my humble opinion, making the internet cheaper is just one benefit, but the most important benefit here, is that it will make it free from the government and ISP's censorship and control.

Is this feasible?

Well, we already have seen small scale examples of what they are willing to do, so technically it should be feasible, however I believe there will be many other obstacles such as legal or economical issues.

For example, here in Egypt, no one is allowed to cover public areas using Wifi, without having license from the government, and this might be the case in different locations, and if not, Mobile Operators will sure lobby to ban such thing, as it will directly harm their business.

Also, I believe I can compare the FNF to Web2.0. In Web2.0 the user-generated content is generated by users, and here the infrastructure is made and operated by the users as well. And while being at this analogy, huge part of FNF's success relies on users participation. Facebook's success is totally dependant on the user's participation there, and the number of photos and content they share, like and comment on, and so is FNF, it will only succeed if millions or hundreds of millions decide to participate in it, other wise it might fail.

Where are wireless mesh networks typically used?

Nowadays it's typically used in covering outdoor areas, but as far as I know, all the available mesh networks are like separate islands each of them is built and controlled by a single business or governmental entity. FNF should do to the state of wireless internet access what Gnutella and Kazaa did to file sharing, where the connection gets democratized and the network infrastructure will be owned and controlled by the people.

Have they ever been used in a protest context?

Many people though of a similar solution when the internet was down in Egypt, during January revolution, but it remained an idea and I am happy to see FNF taking it further.
During the revolution (after the internet came back), people living near Tahrir square opened their Access Points for the demonstrators to use freely. Although what they did is a very basic thing compared to FNF plans, however it shows the need for such solution, especially where governments can either totally shut the internet down or at least censor it.

What is the difference between a WMN and VPN?

They two are very different. WMN (Wireless Mesh-Network) is meant to provide physical layer connectivity to users, while VPN (Virtual Private Networks) are built on top of that connectivity to provide connectivity and security (encryption) in the upper layers of the internet stack.

To make it easier to understand, you can consider WMN as the roads and streets that connect our houses together, while VPN is the cars that run on those streets. Without the roads, no matter how good are the cars you have, they will be useless. VPN can help fighting governments censorship of the internet, but WMN can fight both censorship and internet blockage as well, which VPN's can't deal with.

Hint: This is basically how I understood the FNF ambitious initiative, and here are links to Mesh Networks, Sovereign Computing, and Packet Radio projects listed on FNF website.


Sources:
How Occupy Wall Street Is Building Its Own Internet
The Free Network Foundation

30 September 2011

Delicious Redesign

As you know, Yahoo sold their social bookmarking service, Delicious, to AVOS, a while ago. On September 26, AVOS redesigned Delicious. It's sad how Facebook grabs the whole internet's attention with every redesign they make, while Delicious redesign was ignored like that. However since I am a Delicious fan myself, let me write my two cents here about their new design, which by the way is not only an interface redesign, but many functionalities have been changed too.


  • Avatar: Now you can add your own Avatar (profile picture) to your profile there. Silly!? Not really, I guess it's meant to make the service more social. Although Delicious was one of the pioneers in the Social Web movement, they have been a bit anti-social compared to newer services like twitter, espcially when Yahoo stopped any further development in the site for ages.
  • Stacks: Well, before talking about that feature, let me tell first you how I used to use Delicious earlier. Other than saving my bookmarks, Delicious was like my way to discover new startups, python libraries, news, etc. All that was done via two tabs that were normally ignored by many users, the Network tab and the Subscription one. The Network tab was like the timeline of my friends' bookmarks, or you can say it was the twitter-like face of Delicious. In the Subscriptions, you were to subscribe to some tags related to interesting topics to you, and it lists all the links saved under those tags whether by your friends or by strangers. Now those two tabs aren't there any more, and it seems that the Stacks feature is meant to replace them, it's like a way for people to curate links under a specific subject, give the whole curation a title and description. You know, it's like a less-geeky replacement for the old tags pages, which are still there by the way. Currently, you should curate the links within a stack manually, however I guess they will let us grab them from specific tags later on. Now if you ask me, are Stacks really a good replacement for Network/Subscriptions, well, I am getting older and don't get used to changes easily, but I guess after a while I'll get used to it as a replacement for the Subscriptions tag, however I'll still miss the Network unless it is - or both of them are - still there but hidden somewhere in the new interface and I am not able to find them!!
  • API: It's cool they left the API as it is for backward compatibility, as now I can still use the same bookmark button I have in my browser. Also, in case any developers had applications built using the old API, they should still function now. However I believe there should be additions to reflect the new features. Are the "tag bundles" mentioned in the API docs for example meant to reflect the Stacks? I have no idea.
  • Rough Edges: Some rough edges are there with the new design, but this isn't a big deal as they are minor one, and they made it clear that they are back to beta status and are looking for users feedback now. 
  • Auto-completing Tags: I've noticed that tags whether in the Bookmarklet or on the site itself ain't auto-completed. Is it something they are working on to improve, or is it a new trend! Hope it's the former not the later. The auto-completion of tags isn't just meant to make our life easier by typing less, but more important, it prevents us from creating too many with slightly different spellings in reference to the same thing, startup, startups, start-up, etc. 
Tags: , ,

26 August 2011

Interview with Khaled Wagdy about his Motion Capture System

Do you think Egyptians are less creative than many other nations when it comes to technology startups? Well, think again. This team of brilliant computer developers created a system that makes it easier for computers to capture ones motion. You can watch this video to better understand their new system. I interviewed one of the team members, Khaled Wagdy, about their project and its future.


Hi Khaled, can you please tell me first about yourself? What did you study? Who are the other team members of the project? How did you meet?

We are Yasser El-Sherbiny and Khaled Wagdy (@kwagdy), two computer engineers with great passion for 3D computer animation and development; we studied at the same university where the dream began as our graduation project, when we decided to use our knowledge as computer engineers to develop affordable motion capture & animation solutions to play a role in improving the productivity and quality of the animation and gaming industries here in Egypt.

Also I'd like to know more about the technology used. I've noticed in the video that you said no need for cameras (like in the case of Wii), so how do you detect motion? Did you develop the sensors and softwares used yourself?

There are mainly three types of motion capture systems, and we’ve gone through the process of implementing the three types before we decided to go with the latest system. The optical system which is based on cameras surrounding the performer with markers attached to a suit he wears to track each point on the body, the mechanical system where the performer wears an exo-skeleton suite with sensors at the joints to capture the joints' rotations, and the inertial system, that's our system, which is based on Inertial Measurement Unit (IMU) sensors, fitted using straps around the body to calculate the orientation of each body segment in space, this type of motion capture system doesn't require cameras, doesn’t need special setup for the space like in the optical systems and don't have the limitations and restrictions of wearing a mechanical exo-skeleton.

We spent the last few months developing the hardware (the IMUs) and software for this system, as well as the real-time plugins for the commercial and known 3D software packages for ease of use and real-time display, so the end-user doesn’t need to learn new tools to use our system.

How do you see your technology versus competing ones like that ones applied in Xbox, or versus competing technologies such as that of Vicon (@_vicon)

The "Kinect" used with the Xbox gaming console controls the motion of the in-game character based on gesture recognition and basic tracking of the performer (gamer/user), it lacks the accuracy, gives the performer very limited space to move in and can’t handle high speed motions, these are all requirements when doing motion capturing for Media related projects (Movies, TV series', Commercials, Games ...etc.) and motion analysis in medical and sports sectors. Also, you should know that motion capturing technology was used for the characters animation we all enjoy while playing games on this and other similar high-end consoles :)

Vicon is one of the leading developers of optical motion capture systems, their systems have been used in many big budget movies and popular games by the biggest visual effects studios and game developers, however, they were one of the main reasons why we decided developing our own system, motion capture by then had established a strong foothold in the entertainment industry and gaining popularity and acceptance. It created possibilities in filmmaking which did not exist before, and became an essential element in game development elevating the gaming experience into new levels of realism, and for ongoing series and TV shows it stands out as a cost-effective tool to speed up production and increase the quality and productivity.

Unfortunately, the quality demands for animation place challenging demands on a motion capture system. To date, commercially available motion capture solutions that meet these demands (like Vicon’s optical systems) have required specialized software/hardware that is extremely expensive (hundreds of thousands of dollars) and not easily portable and require a dedicated staff for operation/support and a dedicated vast capture area with specific settings for physical installation (like lighting conditions) making it difficult for small and medium sized companies or even independent users with small budgets to take advantage of its features.

We had specific targets and vision when we started developing our motion capture systems. We want to provide portable, high quality and cost effective motion capture solutions that is accessible even to medium and small production houses, increasing their quality standards and productivity, we want to help animation houses to focus more on their ideas and their output rather than the complex technicalities faced in producing good character animation and the high costs behind them.

Other than games, where else you believe your technology can be applied?

It’s been used in many industries other than entertainment (films and games) such as sports (performance evaluation), education (training, simulation & virtual reality), medical applications (gait & motion analysis) and even military. The list of potential uses for motion capture does not stop there, and continues to rise as increasing computational power become available, alongside a general acceptance of motion capture into the mainstream.

What are your plans now? Are you looking to sell this technology to gaming platform vendors for example? Or you are looking to get incorporated and find a Venture Capital to support you?

We’ll continue the development process, right now we try to complete and integrate our facial motion capture system (you can see a very early test of it here: (http://www.youtube.com/watch?v=0RlWTZkpHFw) with the full-body system to create what’s known as “Performance Capture” which captures the hole performance not only the body motion but the facial expressions as well. Currently we are getting in contact with pilot customers to offer our animation services for real production testing and gathering their feedback; in parallel we are contacting VCs for funding.

Did you contact Angel Investors and VC's? You think it is better to be backed by VC's from within Egypt or from outside it?

In the last couple of weeks, we contacted a few VCs some of which have already invited us for meetings and interviews. We are currently waiting for feedback. We don't think there will be much difference, so far, almost all of the VCs we've met already have international connections.

How do you see the software and technology in Egypt? What obstacles did you see here?

Egypt has a lot of really great calibres, people who are determined to reach their goals despite the various technical and financial challenges, and we think as the technology sector gains more and more attention and focus, it will be one of the most valuable assets for this country. For us, we had some challenges due to the lack of high-end technology resources in the local market as well as the financial challenge. However, we are glad we didn't back out on our dream until it's now a reality :)

Any other projects you are working on, and would like to share more info about them here?

We have a few ideas; some related to the animation industry and some outside, however, we are now focused on the new Motion Capture System.

Any other questions you were expecting me to ask?

We’d like to thank you for having us on your blog, feel free to contact us if you have any questions.

Links & Contacts:
Facebook: http://www.facebook.com/pages/Motion-Capture-Egypt-Snappers-Systems/138488292872249
Youtube: http://www.youtube.com/watch?v=MVvDw15-3e8
Twitter: @SnappersSystems
Email: info(at)snapperstech(dot)com

Tags: , ,

29 April 2011

Android Market On Galaxy Tab

For an unknown reason, the Galaxy Tab's sold here in Egypt has got no Android Market on them. I.e. there is no way to get real applications, and you should just stick to the shitty Samsung Apps that has got almost nothing. I know how frustrating this might sound, but calm down, there is a solution for this.
  1. Open the Phone application.
  2. Dial *#272* then your device's IMEI number ( it's on the back of the galaxy tab), followed by the # (hash sign).
  3. You'll find something like "EGY" being selected as your Sales Code, change it to "XSG" and tap Ok/install.
  4. The device will reboot and reset, and voilĂ !
The only problem here is that you will loose your 3G setting, but you still can find it anywhere online. For Mobinil for example here is how to set it back after you finish the above steps:
  1. Go to Settings >> Wireless and network >> Mobile networks >> Access Point Names
  2. Add a "New APN" from the below menu botton
  3. The Mobinil APN settings are as follows:
    • Name: mobinilweb
    • APN: mobinilweb
    • Proxy: [Leave Blank]
    • Port: [Leave Blank]
    • Username: [Leave Blank]
    • Password: [Leave Blank]
    • Server: [Leave Blank]
    • MMSC: [Leave Blank]
    • MMS Proxy: [Leave Blank]
    • MMS Port: [Leave Blank]
    • MCC: 602 (should be set to this already)
    • MNC: 01 (should be set to this already)
    • Authentication type: [Leave Blank]
    • APN type: internet + mms (should be set to this already)
  1. Or if you are Vodafone user, Vodafone APN settings are as follows:
    • Name: internet.vodafone.net
    • APN: internet.vodafone.net
    • Proxy: [Leave Blank]
    • Port: [Leave Blank]
    • Username: internet
    • Password: internet
    • Server: [Leave Blank]
    • MMSC: [Leave Blank]
    • MMS Proxy: [Leave Blank]
    • MMS Port: [Leave Blank]
    • MCC: 602 (should be set to this already)
    • MNC: 02 (should be set to this already)
    • Authentication type: [Leave Blank]
    • APN type: internet + mms (should be set to this already)
  1. Or if you are Etisalat, user, Etisalat APN settings are as follows (Courtesy to Ehab Elzelaky):
    • Name: Etisalat
    • APN: etisalat
    • Proxy: 10.71.130.29
    • Port: 8080
    • Username: [Leave Blank]
    • Password: [Leave Blank]
    • Server: [Leave Blank]
    • MMSC: 10.71.131.7:38090
    • MMS Proxy: [Leave Blank]
    • MMS Port: 8080
    • MCC: 602 (should be set to this already)
    • MNC: 03 (should be set to this already)
    • Authentication type: [Leave Blank]
    • APN type: internet + mms (should be set to this already)
PS. May be such hack works for other Android devices too, and not only Galaxy Tab. Who knows :-) Now let me ask, why the hell Android Market isn't available in Egypt in the first place. Also after you get it, still some applications ain't available in Egypt such as Skype, and Amazon's Kindle. I'm not sure if this is due to some crappy copyrights issues, or those vendors believe that the world just ends at the borders of their countries. Anyway, screw them, there will always be ways to hack the devices and overcome these vendors' stupid limitations Update: There is a workaround to download Kindle, Skype, etc. Use the below link for Opera Mobile Store. Thanks to @OthmanVII for the tip. http://mobilestore.opera.com/ Tags: , ,

06 March 2011

Can Supporting the Devil be Ethical?

As you know, the Egyptians protesters attacked the Egyptian State Security Head Quarters yesterday. During Mubarak's regime the S.S. used to arrest and torture the Egyptian people. They also used to collect information of every singe person or entity in the country. The protesters were able to capture loads of documents from there, one of them revealed [Ar] that they used some kind of software tool called "FinFisher" in order to install malwares into users computers, collect data from there, and hack into their emails. According to the document, this software belongs to a German company called "Gamma Group", and was sold to the S.S. by a local Egyptian company called "MCS".

The question now, is it ethical to do business with tyrants? Let me be more specific here. Let's consider an entity like the Egyptian State Security. Is it just unethical to support them or sell them anything? Or we have to differentiate here between selling them stationary for example, and selling them torturing tools or softwares like this one?

Finally, I have to clarify that no one can be sure of the authenticity of the revealed documents so far. We still have to wait for the official entities in Egypt in order to verify the informations there. So, by all mean, nobody has the right to accuse anybody here. However, this doesn't mean that my questions aren't valid. I really want to know how ethical is it to help in oppression and information stealing. Normally those who write malicious software tools, they write disclaimers somewhere saying that they aren't responsible for any malicious use of their tools. But in our case here, the nature of the tool and the end-user makes such kind of disclaimers unacceptable, if they ever existed.

Tags: , ,

25 January 2011

Twitter is blocked here now!

Ok, so because of the demonstrations here in Egypt, apparently the government owned service provider, TEData, decided to fucken block twitter!
Has Ammar 404 has left Tunisia after the flee of Ben Ali and decided to spend the rest of his life here in Egypt.
Seems that they are blocking its IP address, using a simple ACL. And not blocking it's url using a Web Filtering services on their Cache Servers, as I tried to login via "https://" and it failed too. And normally, many WF solutions miss the encrypted SSL traffic. Still not sure, but just guessing.

Tags: , ,