How I made the most out of my facebook time


It’s been a while since I wrote something here, it feels weird coming back to something after leaving it for two years, there’s a lot has been going in my life and i had to redesign the whole blog to fit my current personality!

one of the things that bugged me the most, is the insane amount of times I take just going through facebook, I’m not the kind of people who likes/comments random stuff, I even rarely share something. but we all have this disease which one of my friends call it, “the necessary casual facebook roll” that we all do when we are between things, either you were working and you just hit compile (if you’re a programmer) or render (if you’re a graphic designer) or print (if you’re pretty much anyone!) you have to go to facebook and just check stuff there.

but that didn’t make me feel good about myself, it’s obsessive habit to do so, and since I tried to moderate that casual roll, I still find it annoying and I still can’t rid of it. so i decided to make the most out of it.

i started by un-following people that mostly share trivia or things that I’m not interested in, starting from picture quotes to fashion tips, all the way to ridiculous duck face selfies and the ones who likes their own posts (you gotta get rid of those too!)

i then started to fill in the gaps that un-following all these people left in my timeline. so I decide to iteratively look for pages/ personal accounts that discuss or shares thing that i have more interest in. I started following thinkers and scientists whenever I find someone’s account. but mostly, what made me the huge difference, is following the pages that discusses my personal interests (Software, science, and games).

I googled simply “best tech pages to follow on facebook” and “gaming news pages to follow on facebook” and I got tons of those, the important thing here is that I looked up these pages one by one, to filter my content.

it took couple of iterations to filter “out” content that I’m not interested in, and filter “in” the ones that I like, and in fact I liked it so much that now I spend even my long break times on the computer going through my facebook timeline for a tech video or scientific article or even a gaming scene that I would find entertaining.

It’s worth mentioning that is actually one of the most useful websites in that matter. it categorizes and filter all facebook pages so that you can filter whatever you want to filter and you can “like” it right from the website.


Interaction with the current implementation of semantic web

As we saw in the previous posts, many initiatives has been implementing their own version of semantic web data… there’re of course some famous and most covering of them.

Things like Freebase, DBpedia, FOAF, LinkedMDB and MusicBrainz are the ones that dominate the initiatives across the web, being the most covering and the most accurate and continuously updating databases of them all.

current datasets

current datasets

What you can do, is you can try to visualize (or query) an online version of these databases using an online database server that they use

You can use The W3C version of collection of websites and live endpoints that you can use to either query using SPARQL query language (we’ll talk about that later) or visualize the Graphs constructing these databases and semantic collections.

For example, you can have a look at the relFinder project, they use semantic web data to visualize relations between entities or people. You can try the demo here.

If you feel like something more serious than graphs and representations, you can try the original endpoint for the DBpedia initiative, at you can write your own database queries in SPARQL and see the results.

So, what about SPARQL? SPARQL is the standard Query language when it comes to semantic web, you can think of it like the SQL of the semantic web. It basically stands on a key concept and other secondary concepts, the key concept is that each semantic database is built from number of Triples, and each triple consists of three main things, Subject -> predicate -> Object.

It’s much like the English language, when I say “Sara owns a dog”, I can say that the Subject is ‘Sara’, the predicate is that she ‘owns’ something and the Object is ‘dog’.

The trick here is that each and every bit of the semantic web database is built like that. Of course instead of the free English, it uses the URI as we talked before. Of course the W3C has to keep track fo all the URIs to keep the standard. Anyways, I’ll try and explain a little about SPARQL and Triples in triple stores as we move along in the next series of articles. If you wan to have further looks on SPARQL you can find a very detailed documentation here.

Introduction to semantic web


Before we dive into semantic web, at least we need to know from a conceptual point of view, what exactly is semantic web?

In a nutshell, people began to get tired of the conventional web, they started to be a little bit less comfort with the way information are being presented and exchanged through internet. So they decided to revamp that structure into a new one that’s more effective and much more innovative and robust in terms of future flood of new information. To keep both current and next information organized in a way that anyone that can approach certain entity from any point of view can find it the same.

Sir Tim Berners-Lee has a TED talk about this:

Also I found this useful video that has a little introduction about semantic web, I find it very useful (even though it’s in Comic Sans 🙂 ):

If you’re more of a reading guy, I assembled a little article about some of the main concepts of semantic web as a technology and some technical background about the current formats and tools and raw data available as of approx. 2010


About Semantic Web

Even though the present Internet provides an extremely simple way to share information, the ability to read, understand, and process content is restricted only to humans. Computers have great difficulties processing these natural language documents, let alone processing them automatically. However, information desired by humans is also hard to find, as the precision of search results is low. Current Web search engines perform efficient but imprecise searches, thereby burdening users with thousands of answers to a single query. Users must thus assess their results by browsing and deciding for themselves what is relevant or not. The result is an immense overload of information for users. It would, however, be of great help if computers could assist users and alleviate some of the burden by having machine-processable semantics at their disposal in order to understand” results like a human and thereby utilize natural language Web content. This is exactly what the Semantic Web is thought to establish.

“It is an extension of the current Web in which information is given well-defined meaning, better enabling computer and people to work in cooperation.” – As Tim Berners-Lee defined Semantic Web (the inventor of the World Wide Web and director of the World Wide Web Consortium (“W3C“), which oversees the development of proposed Semantic Web standards).

The Semantic Web (web of data) provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries.

The Semantic Web is about two things. It is about common formats for integration and combination of data drawn from diverse sources, where on the original Web mainly concentrated on the interchange of documents. It is also about language for recording how the data relates to real world objects. That allows a person, or a machine, to start off in one database, and then move through an unending set of databases which are connected not by wires but by being about the same thing.


Open Linked Data

Linked data describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP and URIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried.

The Semantic Web isn’t just about putting data on the web. It is about making links, so that a person or machine can explore the web of data.  With linked data, when you have some of it, you can find other, related, data.

Like the web of hypertext, the web of data is constructed with documents on the web. However,  unlike the web of hypertext,  where links are relationships anchors in hypertext documents written in HTML, for data they links  between arbitrary things described by RDF,.  The URIs identify any kind of object or concept.

There are four principles of linked data:

  1. Use URIs as names for things
  2. Use HTTP URIs so that people can look up those names.
  3. When someone looks up a URI, provide useful information, using the standards (RDF/SPARQL)
  4. Include links to other URIs. so that they can discover more things.
semantic web graph

semantic web graph

Resource Description Framework (RDF)

The Resource Description Framework (RDF) is a general purpose language for representing information in the Web in a minimally constraining and maximally flexible way. Its purpose is the processing of machine-processable information without loss of information. RDF is intended for situations where information needs to be processed and exchanged between applications rather than only being displayed to people.

In the Semantic Web, RDF is the data-model for representing the meta-data. It provides users with a domain-independent framework for representing information about resources in the WWW. With it, one can unambiguously express and formalize the meaning of concepts and facts.

Everything that can be described is called a resource. A resource can be anything: a city, a book, a person, a process, a company, etc. Resources being described have properties which have values. These properties and values are specified by describing the resources in RDF statements. The part that identifies the resource the statement is about is called the subject. The part that identifies the property of the subject that the statement specifies is the predicate, and the part that identifies the value of that property is the object. Hence, an RDF statement is a triple consisting of a subject, a property, and an object.

RDF extends the linking structure of the Web to use URIs to name the relationship between things as well as the two ends of the link (this is usually referred to as a “triple”). Using this simple model, it allows structured and semi-structured data to be mixed, exposed, and shared across different applications.

This linking structure forms a directed, labeled graph, where the edges represent the named link between two resources, represented by the graph nodes. This graph view is the easiest possible mental model for RDF and is often used in easy-to-understand visual explanations.


Web Ontology Language (OWL)

The limited expressiveness of RDFs resulted in the need for a more powerful ontology modeling language—in particular, one that permitted greater machine interpretability of Web content. This led to the W3C recommendation of the Web Ontology Language OWL. OWL allows modelers to use an expressive formalism to define various logical concepts and relations in ontologies to annotate Web content. The enriched content can then be consumed by machines in order to assist humans in various tasks. As such, OWL fulfils the requirement for an ontology language that can formally describe the meaning of terminology on Web pages. If machines and applications are expected to perform useful reasoning tasks on these Web documents, the language must surpass the semantics of RDFS. OWL has been designed to meet this need.

Similar to RDFS, OWL can be used to explicitly represent the meaning of terms in vocabularies and the relationships between those terms. The resulting ontologies are used by applications that need to process the content of information instead of just presenting it. OWL provides a richer vocabulary along with formal semantics than RDFS by allowing additional modeling primitives that result in an increased expressivity for describing properties and classes.



That was a brief introduction about semantic web technologies and what it meant. In the next series of posts I’ll try and introduce tools that you can use to interact with the current version of semantic web technologies.

Using GLEED2D with your WP7 game

Heey people,

So, I promised a blog post on GLEED2D , and here it comes, I’m still not a professional in using it, but at least this post will get you up and running, and would save you couple of expensive hours setting it up like I did due to the lack of proper documentation and tutorials , specially on WP7.

Soooo, GLEED2D , what is that ? According to the author zissakos, and I quote:

GLEED2D (Generic LEvel EDitor 2D) is a general purpose, non tile-based Level Editor for 2D games of any genre that allows arbitrary placement of textures and other items in 2D space. Levels are saved in XML format. Custom Properties can be added to the items in order to represent game-specific data/events/associations between items etc.

so, in plain English, GLEED2D is a level Editor, what that means is, if you’re designing a game which has many levels and each level has it’s own map/layout. usually (before the time of level editors) you would have to hardcode every texture/position/property/animation yourself on the screen, and then load the level whenever the player access that level.

As you can imagine, this was a pain to do, so programmers evolved and created an automated way to load level, you can just write the texture name and position and other properties for each texture in each level and save it in a  .txt file or something, then you write a generic loader to load the level whenever necessary.

This was life before the level Editors like GLEED2D, what GLEED2D offered is basically something not far from the second way. in the second way you would have to write everything in plain text so you would have to imagine everything on paper and write the exact values of positions and properties in the .txt file to load it.

GLEED2D offered the GUI to do so without imagining anything , it’s basically a GUI based tool to design the level using your own textues/shapes/sprites and save the level in a .XML format then load the level from your game using  also the GLEED2D.InGame Loader.

so, the process would be like this from your POV:

flowchart of using GLEED2D level Editor


so, GLEED2D is one of many Level Editors which were ported successfully to suit WP7, in this case thanks to the great SteveDunn, who ported the Engine to WP7 and made the necessary dlls to include into your game.

in this blog post, I will try and help you out with setting up the GLEED2D Editor and I’ll help you set up a WP7 project to start loading a level into it.

you’ll be needing:

1-of course Visual Studio + XNA 4.0 Framework + Wp7 SDK

1- SteveDunn‘s GLEED2D for WP7 from here

2-the already built dlls to make it easy for you

3-any textures/images to start working with


Compiling and running the Editor

The .zip file you’ve just downloaded in number1, open \src\Gleed2D_Tool.sln , this will open the solution in a visual studio instance, press compile and run to run program



Now you need to compile and run the solution to have the following:


At the end of this post you’ll find a link to a youtube playlist of tutorials on how to deal with the editor step by step, right now I’ll just go to the Editors/Textures tab and select some textuers and place them inside the editor:

(you have to make sure that the textures’ positions doesn’t exceed the 480X800 displayable area on WP7 , note that the origin of the editor is in the center of the blue area)

After that you go to File->Save As and save the level you’ve just created.



Including the level and textures to your game

Now we’re going to start implementing the level into our sample game, first, go ahead and make a new project in Visual Studio, use:

File->new->project->XNA Game Studio 4.0->Windows Phone Game(4.0)

next, you’ll be needing to include the .dlls you’ve downloaded from number 2 in the resources:

Including the dlls necessary


You will now need to add the level you’ve just made using GLEED2D Editor into your Content folder , to do that, Right click Content->Add->Existing item->choose your level file

Do the same for the textures you’ve used in constructing the game levl, in my case the ‘grass’ texture.

Next, you’ll be needing to fix some properties in the .gleed file you’ve added to the content, go to the item properties, and do as the following:

fixing .geed file properties



There’s a problem with the resources position inside the XML/gleed file you’ve just added which I’m not sure how to fix it, so I do a simple hack to fix it, hopefully I’ll update this as soon as I find a regular solution.

The thing is the path the Editor adds to the textures is not the relative path inside your Content folder. To fix that use simple “Find and replace” to replace the wrong path inside the XML file with the right one from the Content folder, like this: (in my case the wrong one was ‘Users\Sherif\Desktop\WP7\Images\quick_grass.png’  and the right one is ‘quick_grass’ )

fixed XML file name

Now the file should be loaded and successfully implemented into your game.



Drawing the level contents into your screen

we’re now going to use the very easy very simple very unoptimized method to just draw the textures inside the screen, in order for the following instructions to work, you need to only be using textures (i.e pictures) in your level, further instructions for advanced implementation will be linked at the end.

what we did so far is that we made the XML file generated by the editor accessible by the game (i.e. it’s now one of the game resources), the next following lines will enable us to load, read and process the XML file contents to draw the level correctly.

add these namespaces to the beginning of your code:

use this namespaces



Add the following line of code into the class of Game1:

Level declaration



Then you’ll need to add  the following lines to load the level into the Level object:

level loading



Now, you have all the layers/items of your level inside the level object, we will now proceed to iterate through the level’s layers and items and draw them one by one (That’s why the following code won’t work if you have items that cannot be drawn i.e. shapes, paths…etc, but this is for the tutorial purpose only)

drawing the level



Voila, if everything went ok, you’ll be ending up with something like this:

Final output



Now everything works great, if you’re not a beginner in this, you sure know that I made some bad implementations in the coding part, I’m in the process of optimizing my code and designing some generic code to implement in each game, you can check this question for further overview.


Wooo, that was a long post 🙂 , I’m glad I finished it in only 4 hours , I was expecting more 😀

Special thanks goes of course to  zissakos for creating this amazing tool , and gladly to  SteveDunn for making the necessary porting to WP7, we couldn’t thank you enough 🙂


for further readings, please refer to:

Original GLEED2D


(Don’t forget to check the discussions/issues section on each website)

Playlist of GLEED2D Tutorials 


Engines and Editors to make your programming life easier

Heey people,

My first blog post 🙂 , YaaaY….

It sure feels different when you write to people rather than just speak and show what you wanna tell them, but sure thing, both are really important.

So I’ve been tring so hard to implement my own in-game physics, and no matter what I do, I don’t end up with the results I expect. Meanwhile I was amazed by the quality that other mobile games offer in terms of physics, something like physiBricks  was an absolutely mesmerizing game to me. that was the one that broke me and I decided to give up and use pre-made physics Engines.

I did some research and I found that it’s the one and only way to have quality of physics like that in your game, you cannot by any means develop something to have better physics quality than these Engines. if you can, you probably won’t be wasting time doing mobile games anyways…

So, I found a number of game Engines that Either were developed for many platforms including XNA , or developed originally for XNA , some were ported to suit WP7 and some are in the process of doing that having some buggy beta versions, I made a list of these tools, The list is :

These are Game Engines:


These are Level Editors:

tIDE level editor game running on htc wp7

I’ve been using GLEED2D, the WP7 Version , and Recently I’m playing around with tIDE , I’ll post here as soon as I know enough about them, but till then I can say, they sure save alot of time and effort and the results are amazing.

All of the above tools are the ones compatible perfectly with WP7 explicitly said by the authors/editors , There’re also some other tools/Editors/Engines that you can use and do some modifications on to make it compatible with WP7:



Tile-based, non-tile-based Editors:

Worth a Try / Alpha Versions: