Host *
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 8h
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
ForwardAgent yes # also forward the current ssh keys
I live in Bangalore(also known as Bengaluru) which is one of the biggest hubs for startups in India. I reside in Koramangala which is a sub-locality which has one too many restaurants.
People think Food Startups are supposed to solve the problem of
Discovery — To allow the customer to identify what are the restaurants near them and
Conversion — To help order with ease and get the items delivered
There is another problem which is not taken into account and there is no solution. Its the ‘scale’ problem.
The scale problem kicks in when you have hundreds of orders every minute and there are handful of people who take the orders from a portal and call to confirm the restaurants to place and confirm the order (while they miss out the time for delivery which is where the bad CX(Customer Experience) happens).
Dominos used to do have this problem of scale, but tried to solve it with the 30 minute guarantee delivery which was dis-continued. They have other ways to escape this, by pulling off chords from their phone lines or not picking up the phones etc., Online orders started to solve this problem, but there is a case of stupidity and sheer lack of UX in their website.
The Dominos Website
God!, you’d find a website done by a single inexperienced person better in UX than a complete team of people doing it. If someone sues Dominos, they better sue them for their Customer Experience Usability. (This requires a separate post. My hatred towards their website since 7+ years continues)
When you order something in the Mc Donald’s store, they give you an estimate by when your order is going to come. Keeping people in the loop is very good. Some companies try to do this and show couple of steps for the sake of it. Its typically this —
Your item is being prepared. Your order will reach any time between the next 10 minutes — 1 hour
Startups use other startups which is good for the ecosystem and innovation, but since everyone is in a startup state, they usually do not have proper processes for everything. I ain’t blaming anyone, but I am just pointing out the state of the complete system.
Let’s start from the website
Problem#1 — What do I order? — Discovery
Every person has different tastes in everything. Zomato is one of the only and best apps which has that information particular to restaurants. What item to order, what are famous, what did people like.
I believe Zomato can auto-suggest or personalise the complete experience of suggestions of items along with customisation.
Because of the competition between startups to sell more by adding restaurants, no one really cares about personalisation which e-commerce sites are already ahead of.
Problem#2 — Veg / Non-veg on the menu
Very few companies have done this in their apps and websites. A consistent user experience is usually nice.
Problem #3 — Address — Instead of the address, if you give a GPS coordinate, it solves your problem. This applies equally for all deliveries alike (E-commerce vs Food) startups.
You are in the middle of an important task or meeting and you get a call —
Sir, where is your address? I am right now near ‘ Signal’
I always wonder why there was no startup or service which allows you to fill your address details. Every time, you need to fill in the address or find what is your location and enter it even though you have an exact location of where you are (When ordering from a friend’s house). India does not have addresses well streamlined like the US postal systems have. You cannot identify a house with a 4 digit number + 5 digit pin-code.
Problem #4— Waiting for the food (Refreshing the browser and cursing the company you ordered from).
Adding a real-time tracking based on the delivery person’s phone. You have GPS coordinates, you have some servers to get that info, you display those based on the orders he is carrying to the customers. There could be a little extra work if you are integrating with other companies or other apps.
Problem#5 — Offers/Coupons
Everybody loves coupons. There are loads of coupon websites and everyone wants a better price. There are several ways different companies solve this.
Flipkart — does not have a concept of coupons or providing different prices to different customers (until now). It auto applies the coupons.
Amazon — has it on every product page when applicable.
Big Basket / Ola — Providing all eligible coupons to allow customers avail the offer
Swiggy / Food Panda — Search on the internet every time you need one.
Some companies use a loyalty program to get you discounts while ordering from their website/apps.
Problem #6 — CASH
CASH is a very very hard thing to maintain, give and transact. This is a problem from both the customer and the delivery associate. He might not get enough change to provide change to everyone in the route.
Credit Cards ? — They require network, they require good signal, they require you to provide an additional pin to enter. Credit Cards are good if you are performing a big transaction say few thousands or buying stuff online (or standing in line in a store, (but this will change soon too)).
People use PayTM. Loads of them do. If not that, Airtel Money, If not that some other wallet. Most people have their phones on them. Companies like CCAvenue have been only doing one thing. A Payment Gateway aggregator and could not get in the Wallet game like Mobikwik or PayTM.
Companies which provide Wallet services need to have an offline and simple to transact via SMS or via offline or scan of barcode (ChaiPoint does this via barcode scanner but their service lacks idempotency checks). People would be ready to transact via PayTM as long as I acknowledge the sale of goods which can be by allowing the customer to provide an OTP to the delivery person on receiving of goods. (with the exception cases of partial transaction)
Problem#7 — Lack of End to End Customer Experience Ownership
Restaurants get their money through the Food Aggregators which source them orders. They are less about how late its going to reach the customer since its not their problem. They just need to get the food ready. Everyone cares about their own problem. There is no overall feedback loop.
I have seen on an instance that Eatlo take the feedback. It’d be good if companies keep the feedbacks open and what they have done which would gain customer trust.
Problem #8 — Healthy and Tasty Food
There are couple of startups which provide you Tasty food options for Rs. 100/- ($2). These food options are great, getting used to every day in a month is hard.
When a dietician suggest you a diet, they expect you can get all options of food from rice bowls to roti to fruit bowls to eggs. You won’t have a single location for a balanced diet unless you spend good amount of time every day to search, travel and get food.
You cannot (the API endpoints are down or choked — The app won’t even open) and should not place an order during a rush hour day on Swiggy. The orders only reach the customers only after 2–3 hours once the order is confirmed(not placed). Once their hunger gets killed and this single order becomes a regret.
MastKalandar (MK Dabbawala) has started a brand and sells to-be expired pickles (which are going to rot in another week or two) and doesn’t give a damn when you call their Customer Service. MastKalandar is as well very famous for late deliveries even though the customer is < 1 Km away. People are hooked for the consistency of food quality and desserts.
As a regular customer and a foodie, I only respect couple of startups which maintain Quality of Service and provide Value for Money. FreshMenu is one of them whose quality of food never degrades. Delivery experience differs from weekdays to weekends.
All normal restaurants try to ensure customer experience within the restaurant, but doing it on delivery fails because of the outsourcing or other factors which are outside of their control like Traffic or no. of deliveries a person handles or getting the food cold etc.,
This was one of the open source contribution in 2015 to a major Rails project used by e-commerce companies.
It usually takes hours/days to understand the basic framework, goals, motivations, features vs limitations etc., to start contributing to an open source project based on the amount of domain knowledge (especially for matured projects).
Its usually hard to find and understand bugs in a very well mature framework or language. One of the good things about using open source libraries is you get to know both the code and get to know the eco system while getting paid on the job.
The Bug
I found a bug in the admin section of Spree. The images when re-ordered are not maintaining their position. I identified this issue while trying to work on a similar feature to order categories.
I made a fix locally to verify it has solved the issue and later fixed it
tl;dr
acts_as_list index starts from 1
Javascript is sending indices starting from 0.
acts_as_list has top_of_list defaulted as 1 - Source: https://github.com/swanandp/acts_as_list/blob/master/lib/acts_as_list/active_record/acts/list.rb#L38
Steps to reproduce the Issue:
1. Go to images under product.
2. Take any element after the 1st one to the top.
3. Edit the one at the top (that was just dragged)
4. Coming back to the index page shows it in the 2nd position.
What is happening in the frontend?
1. Javascript sends the indices starting 0.
2. The update_positions method in resource_controller just sets the positions as they were sent (with more stuff going on)
3. When element in the 0th position is modified. acts_as_list figures 1 is the top of the list and sets the value to 1 along with setting anything which is already in position 1 to 0.
The FIX
This fix will not modify existing positions, but will only fix those resources for new updates.
Other Solutions
Another solution could be to set the configuration for all models which use acts_as_list to top_of_list: 0 which could be an alternative solution which fixes this issue from re-occurring in the first place.
The Code Change
Though the code change was in Javascript, it was sending the data to the ruby backend which was using acts_as_list which uses to store the data using ActiveRecord based on indexes.
Problem Statement: I want to SSH into a list of hosts from the browser(from a host monitoring UI).
Note: At this point of time, we did not have Service Discovery present.
To identify this, in our team, we maintained a single service which has this list. The service is responsible for
bunch of things including displaying host metrics, checking health statuses, disk space, querying the LB status for the service/port.
A regular deployment usually consists of updating a puppet script and running a puppet command on all servers in batches of 20% at a time.
When you start dealing with multiple hosts, you realize you want to use a utility command like csshX which opens multiple windows. Though this is limited by the configuration file or copy/pasting the host list.
I wanted to pass on this host list data from the browser and with a click of a link, the user should be able to get the list of hosts.
Now if you have a link like csshx://127.0.0.1%20127.0.0.2%20127.0.0.3 , it will open 3 shells using the csshX command installed passing it as csshX 127.0.0.1 127.0.0.2 127.0.0.3. The protocol handler transfers the ownership in a very clean way.
Security Warning: Beware about any URL injections that may happen while using this. As long as you trust the source, you should be good.