Self driving smart shopping carts

Shopping carts becomes more smart. Many intriguing features comes to them. Some of them –

self driving ; you summon a cart and a cart comes to you.

After unloading, you say bye-bye and cart automatically goes away.

You can ride on the cart mostly by standing on the back of it.

You just put stuff in the cart, it will show total bill, alternative items, adds more suggestions similar to the stuff, shows reviews, asks to add review. Whole inside-outside of shopping cart will be one big screen.

No need to wait in line and pay, you can pay to your shopping cart.

No need to unload stuff manually to your car, shopping cart and adjust height as per your car trunk height, and it can roll stuff onto trunk without you heavy lifting.

Shopping carts will be charged automatically when needed.

It even remembers your previous shopping history and shows you an auto generated personalized shopping list.

Once you sign up on a list, it even gives you a map to navigate store for optimizing your time and to ensure delicate items are kept on top (infamous example: onions goes below, tomatoes goes on top 🙂 )

No need to bring along shopping cart (option 2)

You take your mobile phone and scan items you need and enter quantity. Pay and wait in your car. With in five minutes a shopping cart will come to your car with all the stuff you selected.

Mini autonomous stores in every community complex

In your apartment complex or gated community – a mini sans-human, complete autonomous store will be present. You can walk, pick and come out. If you need anything else, place order and you will get it by evening. You can even order from your bed and just walk in to collect your complete packed goods.

Autonomous food-trucks

Self driving, sans-human food trucks will be norm. You can vend your favorite lunch or dinner from them. Either it is burger or biryani or pasta all are prepared freshly in the morning and packed for you, heated and served.

Autonomous honey-pots 🙂

Name says all! Hopefully they will be better than current versions.

Autonomous mobile stores for countries like India

For countries like India, a mobile store will travel to rural areas with single human presence. (mostly for security reasons) ; People will vend stuff. Even mobile book stores go to school. Mobile book libraries from charity orgs will be norm.

The line between online – offline shopping will be blurred.

You don’t feel like specially online shopping or offline shopping. Offline will technically present as if you are shopping on your screen. Online will present as if you are shopping in a physical store. In the end both will be merged. Everybody comes to a new balance of what to buy online vs offline. What to buy in which stores.

It is written and tested on Leetcode, so we ended up converting input to our object and reconverted back to required format.

CellState

/// <summary>
/// Represents state of single Cell.
/// </summary>
internal enum CellState
{
Empty, // Not yet filled.
InitialValue, // This value is already given
SolvedWithConfidence, // We found it with 100% probability.
InProgress, // Currently in progress.
}

Find a match with 100% probability

// This checks if there is only one fit for this cell.
// If it finds more than one fit, then we return zero.
private int GetBestFit(int row, int column)
{
var gridKey = GetGridNumber(row, column);
var availableInAllThree = rowAvailableList[row].Intersect(columnAvailableList[column]).Intersect(gridAvailableList[gridKey]);
if (availableInAllThree.Count() == 1)
{
return availableInAllThree.First();
}
return 0;
}

Datastructures

// Constants
// we can generally solve sudoku of any size.
// So far, tested only for size 9
private int SizeOfSudoku { get; set; }
// Private variables.
// Later, we create a board of given size (e.g.. 9X9)
private Cell[,] cellBoard;
// Next three dictionaries (hash's) represent each row, column, grid and still available values at any instance.
// For example, once we initialize with input values, we remove them from corresponding row, column, grid.
// Instead of three hashe's we could use 9X9 hashes to do same for each cell. That should be good for perf, for now this what I used.
Dictionary<int, List<int>> rowAvailableList = new Dictionary<int, List<int>>();
Dictionary<int, List<int>> columnAvailableList = new Dictionary<int, List<int>>();
Dictionary<int, List<int>> gridAvailableList = new Dictionary<int, List<int>>();

Golang’s documentation to get started is very well designed and implemented. Other languages can learn a bit from here to not make their complex-language learning extra-complex.

I thought I have seen last of pointers for major use cases, alas, I am mistaken.

“for” is new ‘while’.

Switch is all powerful. (Good. I still remember how I suffered with switch in Java6 days)

Methods are c# extension methods. (Or the otherway)

Go is C.Redefined. (Or C.Redesigned or C.Improved)

Go is not OOPS but Go is OOPS (Or Go is only a bit of OOPS and lot of Procedural)

Copy is actually CopyTo as destination is first argument and source is second argument.

Defer will do finally’s job, in more human way. Defer + Recover is catch; panic is throw exception. But the documentation says they don’t have try catch – I am a bit confused. It feels panic-defer-recover are more human friendly design of try-catch-finally.

But for common-man twitter is chaos. Nothing much to offer for them other than keeping up to date which also not possible due to its infinite chaos. Even if one follows ten people, it is impossible to feel satisfied. It is always unfinished – forcing people to run away to other social networking sites or moving on with life.

One idea to save Twitter from this self destructing nature. InDoor

Allow people to make their own twitter.

Anybody can create an indoor twitter.

Example twitter.com/indoor/myFamily or twitter.com/indoor/myTeam

Tweets inside indoor are for members only.

Every member follows every other member by default this setting can be changed either globally or per member by moderator.

One can unfollow any member.

One can retweet public tweets to indoor only.

Once on indoor there won’t be any confusion whole twitter interface remains same, except everything now applies to indoor account. Users can easily exit indoor and go to public twitter.

This should make twitter more useful to common members who are not celebrities. This will put twitter in direct competition with What’sapp for family/friend groups + slack/teams for office groups.