Category Archives: Front

CSS Regression

Adopting Test-Driven Development (TDD) is critical for a tech company. TDD serves as a strong safety net against bugs caused by code changes. TDD becomes especially important for large code bases that are changed frequently. At the time of this writing, the Trustious code base is around 20,000 commits large, with over 80,000 lines of code, code that changes rapidly. The frequent changes are a natural consequence of the Lean methodology. As a company we firmly believe in Lean and are continuously running Build-Measure-Learn cycles. This requires us to make frequent experimental changes to the user experience which map to frequent changes to the code base (mostly to the front end). With such a rapidly evolving product, writing and maintaining tests that will truly keep us safe, could easily get out of hand.

Continue reading CSS Regression

Solving Games

Last week at Trustious, Islam gave a Talk about Games! But wait, its NOT your typical card games, board games or even video games. Islam’s talk was about impartial games with perfect information and a win-lose outcome. Self- explanatory right?

Let’s get to know these kinds of games a little bit more. “Perfect information” means all you need to know about how to win is in front of you, there is no chance, no hidden cards or anything of the sort. In “impartial games” the allowed moves for each player are the same and depend only on the current position. Basically what differentiates the 2 players is who goes first. This is what usually determines the winner and the loser, no draws hence the “win-lose outcome”.

ss_DSC07257
Islam (left) playing a variation of Nim with Akram (right).

Continue reading Solving Games

The Amazon Incident

This article is a cautionary tale for people using Amazon Web Services (AWS) and a testament to the awesome amazon customer support.

Thu, Jul 3, 2014 at 8:58 AM: The Shock

The day started bright with a light cloud cover and cool refreshing breeze. A rare and lovely day in the blistering summers of Cairo. I was hacking away in the quite morning hours when I noticed that the month’s AWS bill has arrived. I took a look and was rattled to see that it was for over 1800 USD!

shock

Continue reading The Amazon Incident

8 furniture shops that have it all

We did the research for you; all you have to do is start the trip!

We’ve all heard the famous argument between the engaged girl and her mother. Mother says; “Honey, you can’t use modern furniture for the whole house! It’s not durable and it doesn’t look very classy...” The girl thinks to herself that her mother probably knows best, but she doesn’t want furniture that looks too old fashioned or uptight. She wants to enjoy sitting in her reception comfortably, with her friends and her family! And the dilemma goes on…

Well girls; after checking 200 furniture shop reviews on Trustious and asking many newly-weds and engaged couples for recommendations, we’ve got this list of shops that we believe can give you exactly what you need; durability, comfort and a classy modern look depending on your preference and budget.

Here are the best furniture shops according to people’s choices:

Pinocchio bedroom 2 - Copy

Pinocchio. One of the shops gaining more fans every day; they locally design and produce modern and stylish furniture with a flavor of the Egyptian heritage shown in the carvings in wood. Their furniture is of very high quality and with reasonable prices with regards to shops of the same style. Pinocchio’s collections include bedrooms, dining and living rooms, but bedrooms are their specialty. Pinocchio’s fans also say that they are very professional and organized; a rare commodity these days!

mehrez dining roomMehrez Krema. Another proudly-Egyptian store where two designers “Khaled Mehrez” and “Hanan Krema” fuse their work together to come up with bold stylish furniture inspired by Islamic calligraphy and some Pharaonic symbols. Their style is very unique might not suit all tastes, but we must salute them for their high quality and excellent finishing; they specialize in dining rooms, but they have a good collection of living rooms and bedrooms too. People who have dealt with them say that Mehrez Krema are perfect in on-time delivery and customer care. We can’t say that their prices are average, they are a little high, but you’ll definitely get your value for money.

apex 3

Apex. Along the same lines of bold designs and rich fabrics, here is another shop that we think you will love. Apex has unique ideas for dining and living rooms, and bedrooms. You’d find leather couches, mirror buffets, square dining tables, and sofa-like dining chairs. Their furniture is all very comfortable and their wood is strong, manufactured in Egypt, while their fabrics are imported. Apex, unlike Mehrez Krema, is moderately priced; and their after sale service is smooth and timely and their staff professional and helpful.

saloni livingSaloni. A Turkish brand known for their colors, comfort, and good quality of the fabrics and wood; they offer neo-classic “salons” – which means that their pieces are not for the everyday use of a living room. Their new branch in New Cairo is expected to have some bedrooms as well. Saloni uses natural wood (Counter wood) in their furniture pieces, all of which are made in Turkey and shipped to Egypt. Their prices are considered average, especially when comparing them to similar stores of somewhat less quality. People seem to be satisfied when dealing with Saloni, as their payment process is reasonable and their delivery is considerably fast, depending on whether the item you choose is available in the shop or not.

ashley livingAshley. Here’s a place where you can find variety and flexibility in high quality and reasonable prices. An American brand opening in Egypt recently, but with its star rising fast! It specializes in bedrooms and living rooms with a few scattered dining pieces and home accessories. Ashley’s furniture is mainly modern, but they try to add a classic touch – especially in bedrooms, through the wood carvings. The products are mostly imported, from the US and East Asia; however, they have a factory in Egypt if you want to exchange some pieces for custom-made ones, or add a closet to your bedroom as their bedrooms come with no closets. For all of that, Ashley’s prices are great and they have discounts and flexible payment options!

al cazar livingAl Cazar. Now that is one unique place to visit; talk about curves, fine wood, and perfect finishing! They really do have their own style, which can’t be called classic and is definitely not the regular “modern” pieces we see everywhere. They have mostly dining rooms and bedrooms, but you can also find salon sofas and tables. Al Cazar is an Egyptian brand and is quite expensive, but they hold nice sales every now and then and the prices drop significantly to reach the average rates of the market.

williams living 2WilliamsThis very elegant store is known for its unique designs and add-on pieces and mechanisms in their furniture. Their specialty is living room and reception sofas but they have bedrooms and dining rooms as well. They are very flexible if you want to pick out pieces from here and there, and you can also customize the pieces themselves; different fabrics and sizes…etc. Williams is quite overpriced, but you get good value for money and the shopping experience there is just too lovely to miss!

in & out 2In & Out. This is your place for simple, comfortable furniture with very modest prices. They work with manufactured wood, which is of less quality than natural wood, but they offer you a 10 years guarantee on the wood, which makes you somewhat comfortable. In & Out has a huge variety of living rooms and bedrooms and their designs are simple and can fit many tastes. Most people who have reviewed it though, recommend it for summer houses/chalets or second bedrooms at home, but not for your main house and especially not your master bedroom. Their delivery is said to be smooth and on time, with good after sale service.

You might also want to check out:

Image; known for their amazing quality and durable furniture; a mixture or modern, classic and contemporary designs with a specialty in living rooms. They have a great variety of fabrics to choose from and their prices are slightly above the average.

Verinno; a large variety of classic and modern furniture of great quality and chili prices, very high –imported pieces, slightly high – locally made ones. Their designs are very unique but don’t necessarily fit all tastes.

Divano; reasonably priced strictly modern living rooms and bedrooms, imported from Turkey with simple designs that are comfortable to the eye. Dining rooms and wall-units for the living room are also available.

Home Center; an abundant variety of all you can ever need at home, not highly recommended for actual furniture, but all else is recommended and in great prices as well.

IKEA; we decided to let this one speak for itself! ;)

At the end girls, remember to go through your furniture hunt with patience, try not to rush into buying anything, you don’t get to furnish your house every week!

And don’t forget to write your reviews on Trustious when you receive your orders ;)

Brought to you by Trustious!

Where to take your partner on a special occasion: An expert’s recommendations!

Psyched about your partner’s birthday and want to take them to a new place? Maybe your anniversary is coming up and you’re planning something special? We’ve got some answers for you!

Here are some nice spots you can take your loved one to, recommended by Nour Naguib; one of Trustious’s Stars who has written over 250 restaurant and food reviews, receiving endless Helpful votes by other Trustians. We basically consider her an expert on restaurants!

If you’re early risers and have a plan for the whole day, you can start with a refreshing breakfast at Tempo in 6th of October. Overlooking a huge golf court at Allegria, it provides a small indoor and huge outdoor seating area with excellent food, friendly staff and of course, amazing view.

For lunch, and could also serve as a breakfast place;

There’s Paul in Downtown, New Cairo. It has a classic French style to it and a real French cuisine with high quality food. The staff is friendly, and it’s a little expensive. However, you’ll find the whole experience is very pleasant and worth your money.

panorama_1352808425 (1)

Then there’s Left Bank in Zamalek right next to Sequoia. It’s surrounded by full-length glass windows overlooking the Nile, so it gives a shiny open air feeling, minus the too hot or too cold weather. The interior is nice and the food is great as well.

Now let’s come to the more luxurious, cozy and private ones, where you can dine and relax;

Little Swiss in Maadi is perfect for a romantic getaway. There’s a warm feeling there, like you’re sitting in a small farm – thanks to the cow theme all over the place :) but the experience is nice and though the place is small you can still have some privacy. The owner runs the place herself and is extremely welcoming. The food is awesome, you grill the meat yourself and the cheese and chocolate fondue is amazing. It’s also cheaper than “The Fondue Pot”.

…which brings us to The Fondue Pot! It’s quite the same as Little Swiss, but the ambiance is very elegant and it’s more expensive. However the service is very good and the food is of very high quality. This one’s in Heliopolis, off Nozha street.

Then comes one of Nour’s favorite restaurants; Blackstone Bistro! The place is simply high on everything; service, food quality, cuisine diversity, atmosphere elegancy; everything! It has a branch in Maadi and one in Zamalek and it is said to be a must-try by several food experts on Trustious.

panorama_simple_img_5 (1)

For Italian food lovers there’s Rocca Razzo (photo above) in New Cairo, where the food is good, the place is elegant yet comfortable, and you can also get some privacy.

And lastly, Filini in Radisson Blu Hotel in Heliopolis. Quoting Nour; it’s one of the best Italian restaurants in town, although it doesn’t seem to get much notice. She says the place is also very elegant and the staff is friendly. Be sure to give it a visit!

Nour also recommends these places for regular couple-y outings;

We hope you enjoy your time, and waiting for your reviews afterwards ;)

Sending out a special thanks to our star Nour Naguib for her recommendations. We love you Nour!

Brought to you by Trustious!

Document Theme Classification

The primary objective of the Trustious Restaurants platform is to help people discover where to eat. In more concrete terms, Trustious needs to answer questions like “What are good sushi places near by?”, “What are good breakfast spots in Heliopolis?”, “Where can I order delivery late at night?”, “Where can I go to have good healthy food?”. An obvious pre-requisite, is to build a comprehensive model of a food spot that covers aspects like: What cuisine does it offer? When is it open? Is it good for a family outing, breakfast, large groups? Does it have out door seating, a good view? .. you get the idea. The question now is: How to obtain this information? .. and this is where it gets interesting.

We basically had three approaches:

  1. License an existing data set
  2. Rely on “experts”
  3. Develop a data driven solution

Our first impression was to see if some third party has clean fresh data for food spots in Egypt and to see if we can license it. After an extended period of research we arrived at the blunt conclusion that beyond basic location information, none of the available data sets completely fits our purpose for two primary reasons: (1) Most of that data is aggregated manually by people calling the food place to ask a set of questions. As you may have guessed, this approach could work for “where exactly are you located?” kind of question but not for “Are you good for breakfast?” kind of questions. Data acquired in this way does not differentiate between a place that allows people to eat before noon and a choice breakfast spot. (2) The data sets rarely covered the level of detail we need. For instance, none had information about what the place is really “good for” or when do patrons typically visit.

The approach we ultimately developed is a hybrid data driven pipeline with expert supervision. The idea is to analyze user data to find out what a food spot is really good for as seen by people not as advertised by the food spot. The expert’s role is to guide the data analysis and help spot flaws that we as engineers may not perceive.

In summary, the data driven pipeline works as follows:

  1. Develop a model for each “theme”. For instance: People typically go early to a restaurant that is good for breakfast, reviews about the place should comprise a certain set of keywords (e.g. breakfast, omelette).
  2. For each restaurant, create a document that includes all available data about the place. This includes; Trustious user reviews (currently over 10,000), the menu, Foursquare tips, Foursquare check-in times among others.
  3. For each theme and restaurant pair, measure the quality of fit between the theme’s model and the restaurant’s document.

In the rest of this post, we will cover how that works in some detail.

Theme Modeling

We came up with a list of interesting themes that we want to model. The first type of features associated with a given theme is its Relevant keywords.

Keyword Identification

We applied Keyword Frequency Analysis on all documents for all the restaurants. This resulted in a list of thousands of keywords sorted by frequency. Here’s a sample preview of the keywords list:

chicken - 1971
grill - 1204
sandwich - 966
salad - 906
sushi - 865
cafe - 750
burger - 741
cheese - 729

Clustering techniques were used, such as:

  • Phonetic Fingerprint: Useful for ignoring common phonetic spelling mistakes that may occur in user reviews or posts.
  • Nearest Neighbor Methods: Applying a membership class to an item based on its k-neareast-neibors (kNN)
  • Levenstien Distance: The number of edit operations needed to change one string into the other.

We inspected the clustering results, ending up with a group of keywords for every theme. A sample of the themes extracted is shown here:

romantic = ['romantic', 'nile view', 'late night', 'midnight']
breakfast = ['break-fast', 'breakfast', 'break fast', 'omlette', 'omlete', 'morning', 'فطار', 'افطار']
healthy = ['weight watchers', 'healthy food spot', 'diet']

Timing Signals

While exploring the Foursquare venue API, another valuable theme feature was noticed. Namely, opening hours and popular check-in times of a restaurant. This makes the second type of theme features used in our data-driven approach.

Popular check-in times indicate which times of the day (or which days of the week) does a venue get frequent check-ins. This is offered through the Foursquare API as an array of time windows for each day of the week (as seen here).

Let us consider the case that a certain venue consistently gets many check-ins early in the day (where early is until Noon). This significantly increases the probability that this place is visited often for breakfast. This signal is much stronger than simply checking the menu of restaurants for breakfast items. This allows us to confidently conclude that this place, not only offers breakfast, but also has good breakfast. This can be applied for many themes such as: late romantic dinners, breakfast spots, outings after work, or weekend hangouts.

For each theme T, we draw a timing curve C. covering the time of day or week related to T. C is then added as a theme feature for T. For example, assume T is the late-night romantic dinner theme, then C is the Normal Probability Density Function over the range of time [9:00PM – 1:00AM].

Document Analysis

Our Trustious dataset is rich with valuable Restaurants specific information. This includes user reviews and ratings, restaurant menus, and other associated metadata. Besides our own, several apps on the internet provide an API for the results of their data crunching. Whether that is most checked-in restaurants on Foursquare or popular hashtagged photos on instagram. We aggregated data from several such open API sources.

Challenge: Item Matching

A natural obstacle when merging similar data from multiple independant sources is how to match items. To associate any external information to a Trustious Restaurant or item, we try to match the given titles with the names of the items on Trustious. For example, these titles come from the name of the venue on Foursquare or the title of a blogpost. In most cases the names are not an exact match, which introduces a problem since checking for string equality of both names is not enough.

To solve this problem, we used our existing Elasticsearch cluster to find the best matching item on Trustious. We considered the name of a Foursquare venue as a search query given to our search engine. The result is the best matching document in our search index. Elasticsearch (more specifically Lucene) allows this easily through its fuzzy matching and quality scoring for a query. We chose a quality threshold that optimizes percision more than recall, in order to keep the matching pipeline as automated as possible. At the same time, a moderator verifies any remaining candidate matches with a low confidence.

Restaurants Model

We represent each restaurant as a model composed of the following:

  • Trustious reviews
  • Trustious restaurant menus
  • Foursquare tips
  • Popular check-in times of day/week

This information was gathered from the relevant API endpoints such as:

We aggregate data from these endpoints and for each restaurant generate a “Document”, which is the appropriate scientific term used in Information Retrieval. The next step is to find the best matching theme for each document.

Document Classification

The final step is to match all pairs of documents and themes. For the textual features, the matching was performed via several methods, such as: exact, n-gram, and fuzzy matching. As for comparing themes’ timing signals with restaurants check-in data, we used a modified p-value normality test. This is to judge how busy does a restaurant get during a given time duration. If a document D matches a given theme T. then the restaurant R associated to D is classified with T.

Applications

Our data-driven approach works well for associating a theme for restaurants. We currently use it for generating lists of exciting top places sharing the same theme. It can be used with different datasets to classify different entities. The definitions above can be modified to build a suitable model for a different domain. If you have any questions about any of the models or techniques mentioned above, please don’t hesitate to let us know in the comments.

Know the Stars, Be One of them!

Have you heard of the Trustious Stars team? Now it’s time to introduce you to each one of the Stars. Are you ready? ;)

You can skip to the end if you want to know How To Be a Star!

Our first Star is Nour Naguib, the restaurant expert. Following are Yousef Zohdy and Ghada Essawy, the biggest readers on Trustious. And finally Pierre Iskandar, the big gamer! Click on any of the Stars names to know more about them, or just scroll down ;)

This slideshow requires JavaScript.

 

 ****

The Restaurant Expert

  • This is a very special Star who’s been with us since day one, never letting Trustious miss her. Even when she went abroad, she was filling our stream with review after review of restaurants and food items of all kinds. Any time you open Trustious, you will see Nour Naguib’s name shining on the home page, whether adding a new review or getting a vote for an old one. 

There is nearly no restaurant or café in Cairo that Nour hasn’t been to. And if she’s been there, then you’ll find a review about it; it’s that simple :) But she doesn’t stop at that, Nour amazes us with a very helpful book review every now and then. She’s just always there for Trustious, and that’s why we love her :)

Nour’s profile: www.trustious.com/people/nour_naguib

The Reading Guru

  • He is another Star who was one of the very first people to have an account on Trustious; though he wasn’t just a user of the application. He had helped the founding team with financial projections when they were first building the company. And till this day, Yousef Zohdy comes to us with feedback of all kind. We don’t know what we’d do without his heads ups :) 

Yousef keeps on sharing with us reviews on the books he has read – and they are a lot – ranging from Arabic novels, to English ones to religion to nonfiction reads. He just keeps coming back with more and more books all the time :) However, if you open his profile you wouldn’t just find book reviews, you’d find cars, games, shops and restaurants as well. And that’s why he is a Star :) 

Yousef’s profile: www.trustious.com/people/yousef_zohdy

The Book Addict

  • This Star could easily be given the title “Most Loyal Trustian”, we really consider her family. She’s there in every event Trustious holds, every contest, every initiative; and is the first one to like our posts on Facebook :)) She’s also been inviting many people to Trustious who turn out to be as active as she is, and she wrote a note on her Facebook account about Trustious’s campaign “Ra2yak Byefre2”! It’s safe to say that Ghada Essawy really is our Most Loyal Trustian!! 

She is another book addict that never fails to write FULL brilliant reviews on the books she reads. She has a special interest in religious and spiritual books, and light Arabic reads as well. But of course, Stars never limit themselves to one category; Ghada has many reviews in food items, restaurants, and shops. And that’s why we love her :)

Ghada’s profile: www.trustious.com/people/ghada_essawy

The Big Gamer

  • This Star is a game expert who pours his heart and soul into each of his reviews; it’s like he created the games himself :D But this is not the only reason he is a Star, Pierre Iskandar was another early Trustian who amazed his with a whole blog post about us, telling to his followers who we are and what we do, and taking them on a tour too! It’s people like him that make us feel like we’re really making a difference.

Another thing that we love about Pierre is that he has set the bar high for himself and has almost never written a review that is less than AWESOME, even the book and restaurant reviews! We are really proud to have you with us Pierre :)

Pierre’s profile: www.trustious.com/people/PierreJIskandar

Those Stars are not stars just because they post reviews on Trustious. They are Stars because they want to make a difference in other people’s lives and help them make better choices by sharing their knowledge with them regularly and in great detail. We are truly proud to have them.

****

And now that you know the Stars, Here’s how YOU can be a STAR too ;)

  • Post an average of 20 reviews per month, OR
  • Post just 3 awesome reviews per month. What is an awesome review?
  • Your reviews should be an average of 60 words, and the awesome ones should an average of 200 words.

We’re waiting for your inner Star to shine ;)

www.trustious.com