Sunday, May 29, 2022

Where have I been?

Data has suddenly become a very big deal in tech space. Today the data processing/analytics platforms are more valuable than the actual code that power these platform - in the sense that monetization happens on the platforms and not the code. The code is of course the foundation without which you cannot build solid platforms. So despite all the talk about "no-code", demand for solid programming skills are going no where. Most of the code that powers these modern data stack platforms are open-source with a very healthy and collaborative community of very smart people. 

When I joined Cloudera innovation accelerator via Turing.com this Feb (2022), and I had absolutely no idea of anything about modern data stack. I had experience with building ML models for medical domains, but the data sizes I dealt with were generally few thousand rows rather than million. Since then it has been quite a wonderful journey of learning, finding and connecting to new people. 

During this time I have primarily dabbled with building adapters for a transformation tool called dbt from dbtLabs (https://www.getdbt.com/dbt-labs/about-us/). One of these adapters for the Impala is now open source and is available from (https://github.com/cloudera/dbt-impala). I also made my first upstream contribution to impyla project (https://github.com/cloudera/impyla), which is used by dbt-impala to connect to Impala warehouse. It is cool, when you discover how does the actual patch process work in an open-source project. If you came here looking for using dbt-impala, do check this tutorial written by Alasdair Brown (https://community.cloudera.com/t5/Innovation-Blog/Getting-started-with-dbt-impala-amp-Cloudera-Data-Warehouse/ba-p/342616?es_id=1fabf7040a

The most fun part of working here has been closely interacting with people not only at Cloudera but also dbtLabs, something I have hardly done in my previous assignments. 

Last but not least the whole journey was possible due to the platform provided by Turing.com and the wonderful staff they have. I would strongly recommend that you try them out if you are looking for meaningful remote assignments.

Friday, July 31, 2020

Documenting a Cyber Fraud case - The Customs Price of a Gift

I mostly have a good acumen to detect if cyber fraud is about to happen or if a person is about to fall prey to a sophisticated cyber fraud - if at all the person in question contacts me at least at the nick of the time. So when a close relative of mine staying in another state contacted me yesterday night casually saying that some of his Facebook friend from London has sent a big gift with lots of items - alarm bells rang in my head and I immediately told him that it is a fraud. However, for some reason, he seemed totally ignorant to me and said that the other person had sent the tracking details of the same. I asked him to share the same with me. This is what he sent (personal details - name and address of recipient is masked for privacy reasons).



Now anyone with some intuition of billing systems will detect obvious issues with this note - different fonts used at various places. The text on the upper right (depicting destination and origin is in white ink - which doesn't exist in real world ;)). Then there are noticeable red flags about photo-shopping: different coloured ink everywhere, that cursor magnifier in the "screen shot", which actually ought to be a photo, a delivery time even before the item is delivered - I haven't found a logistics firm that can predict the delivery to this accuracy -, the missing phone number of the sender etc. And well I haven't even seen any legit tracking site that tell you exactly all the content in the parcel you are supposed to receive - for very obvious reason.

At this point I was pretty sure this is either a fraud or a trap (that the consignment had something else than it was pretending). Next I googled "Air Courier Diplomatic", the "Diplomatic" thing rang another bell - due to recent scandal involving diplomatic courier lines.  That threw this up:



Now that link looked legitimate, so I went to their site and entered the tracking ID. That gave an error - saying "Invalid tracking number". Another red flag. So I called up my clueless relative and asked if he actually checked the tracking number - he said yes, and it is real! I asked him to share the tracking URL and he sent me this: http://aircourierexpservice.com 
Another red flag - "http"!
But then visiting that resulted in the moving to an "https" site of which the certificate looked ok. The site also looked eerily similar to the above result that Google throwed up. I checked the Contact Us page on both these and they looked to give similar addresses to somewhere in UK. Then I checked the tracking number in this second site. And well enough, it showed up there. Even so, I was quite sure that there is something fishy about this whole thing. One thing struck me was that I have never heard of both of these courier companies. And I have had no idea that these worked so efficiently in the days of Pandemic (red flag!). It was late at night so I simply told my relative that it better to just reject the delivery, I also casually mentioned that these people will ask customs money to be paid under the guise of delivery. He was very firm in telling me that this is a real thing and refused to believe my advice. I didn't really spend time in analysing the tracking websites further (more of this in Post Analysis). 

Today morning, my relative again called up asking how to do an NEFT to another Bank. Now that was a super red alert to me. I asked him why he needed to do this - then he said the courier person called and asked to transfer customs charges to an account. I asked him to share this detail and asked him strictly to not to speak to this courier person and not to transfer money. Then he told that since banks are closed today (due to Id), he couldn't go to the bank to do the transfer and that is why he called me! I said thank God, and looked at the back account shared by this "helpful" courier person:


Many red flags here:
- this is a personal account
- this branch is from Patna, Bihar and my relative is from Kerala (super red flag)
- why the heck I need PAN number of the receiver (confidence building measure of the con?)
So I again called up my relative and asked him - in what language did this so called courier person speak - he said Hindi!! LOL. At this point did my relative realise that this is indeed a fraud - no person in Kerala will locally speak Hindi - no matter what. Of course people in Kerala will know Hindi but will never speak it locally. That question to my relative nailed it - but I found it very strange that I had to ask that question - he didn't realise till I asked. 

Post Analysis (sill continuing):
Were the tracking domains not legit?
They are not (most probably). They are only setup for fraud and nothing else. They don't deliver any goods and most likely their customer care number is invalid. For both the sites, the primary contact address seems to be UK - but both these sites seem to have same content but different backend (not yet analysed what is there in backend). A whois lookup on the domains point to registrations in Panama Islands (that itself is a mega red flag). I found another con domain with similar suspicious registrations - rextonexpc.com
How exactly these sites operate and who is behind them will be interesting to dig into. 

A word of advice:
- Never share your personal information with any one on social network of any kind. 
- If you want to share any personal information with the people you already know - use other more secure channels (email or encrypted chat) 
- Nothing in this world is free, earn it, but be good to others who are needy. If you can earn it, you are not needy. 
 

Friday, June 05, 2020

Airtel, eSIM, loosing connectivity and moving to Android

It was the 3rd day of the lockdown. I had to walk down to my office late in the evening as a server had broken down, and there was no other option than for me to walk in there and fix the thing so that rest of my colleagues can still connect to work. After I came back home, I went to take a bath and then suddenly realised that there was no signal on my iPhone. I had no clue what was the reason. So I did the usual trouble shooting and then restarted the phone. Still no signal. Next I put the sim in my second phone with no SIM - Google Pixel 3a. Still nothing. I had actually got this phone for my uncle, but he somehow didn't like it so it came back to me.

After a lot of trial an error I reached my service provider - Airtel on Twitter. They are usually fast to respond. Over the DM I described the issue, and they took an alternative number to call me back. Thankfully wife's number was available - I am a single number person, but today I suddenly realised the importance of having more than one SIM, or atleast 2.

The Airtel techical person called back and after a bit of trouble shooting - gave this assessment- that my SIM card is damaged and needs to be replaced! But since currently all the offices are closed I will have to wait. Sigh.

I waited for 2 days for this to sink in and in the mean time asked every one of my colleague to either call me on Slack or Skype. Luckily I had added a Airtel Data SIM to my plan just over a week ago. So that I could put that into my iPad and my father could use it for his usual bit of news and article reading.

Even though I didn't have a phone connection at this moment, I didn't feel disconnected or unable to go about my normal work from home routine. All this, until I had to pay my credit card bill. My bank had recently changed their interface, which now forced one to enter an OTP sent to your registered mobile number to complete a transaction. Bummer. Panicked I called up my colleagues to ask if they would be ok to pay my bills if I am not able to pay my bills because of this uniquely strange situation I was in. At the same time I tried to check if I could use the BHIM app installed on my phone to pay the credit card bills, but it didn't work - because my phone didn't have active SIM. But luckily there was Paytm, that was also linked to UPI, which I could use to pay my credit card bills. All this made me a bit worried on how I would pay for other things that will require me to provide the OTP. Soon there was a due date for property tax upcoming. Something clicked, and I again DMed Airtel customer care, to ask if they could provide me an eSIM. They said it will not work on my current phone, I knew that, it was an iPhone X. But I said I have an alternate phone with me Google Pixel 3a, which according to your site does support eSIM. But then they said that there is currently no procedure in place to give me a SIM like this. I again requested them and explained that without this I am totally locked out of my bank and unable to do any transaction. They said they will get back and also asked to send an email to their customer care (which are usually unanswered anyways). I tweeted about this issue and tagged Airtel and DoT ministry to issue a guideline for issueing eSIM in such a scenario.

I have been using iOS device since 2014. Before that I used Windows Phone - the Lumia 800. I had very briefly used Samsung Galaxy 5 as a daily driver, which ran on Android. Had a not great experience with Android, and thus shifted to using Windows Phone - that amazing Lumia 800. So when I was looking at shifting back to Android as my daily driver I was not so sure. But here I was, the Pixel was the only way, if Airtel agreed, to avoid me keep calling my friends to help me with paying my bills. 

After a bit of following up with Airtel executive, they approved my request and said that the eSIM will be sent to my registered e-mail in a few hours. After a bit of waiting, I actually got this email, and I activated using my Google Pixel 3a. Ever since, I have been using Android on daily basis, and it has grown on me. There was one more advantage of using Pixel 3a - a finger print reader to unlock the phone, instead of Face ID at the times when you have to cover up your face. Just in time.

Looking back, conncting the dots is a fun exercise - if my uncle didn't give me back the Pixel, I would be still disconnected as far as communication with the phone is concerned. And I would be desparately calling my friends to help me with my bills.

For now, I am on Android, and liking the flexibility it offers after using iOS for about 7 years. Crazy times, crazy experience.

The summer

The last 3 months have been crazy work wise:
1) We made some interesting scale computation on Linode dedicted CPU node for the first time.
2) Wrote lots of scripts, revisited C++ after almost 7 years! Was fun. Did a lot of performance optimization in a large simulation code written in C++, which is still continuing. Performance optimization is hard.
3) Helped re-architect background syncing code for a POS system running on Android.
4) Learned a lot of new things - lastly a bit of Flutter from AppBrewey.
6) Did some community work at our housing complex
7) Fixed a Windows XP machine after may be 8 years!
8) And learned a few life lessons from my dear wife.

Saturday, April 11, 2020

Testing times

It is an absolutely depressing time to be alive. The world is run over by a pandemic and whenever that ends, the world won't be same again. We are in the twentieth year of this century, but feels like this is going to set us back by atleast 5-10 years in the progress curve. 
In the end though, there is a great hope that the human race will prevail over this and build a better tomorrow. Hopefully, see all of you on the other end. We gotta make it. 

Friday, December 28, 2018

The Year End Note - Other Work Way

I do a lot of other things from my primary association with VLlife. One of that is involvement with OGD (www.onegreendiary.com).

So what did I learn there? Quite a bit of other things: about human resources and importance of better communication in a startup culture, about managing a team, about meeting differing expectations from customers, and just a lot of other things that are involved in making a company of what it is and would be. Essentially, I did gain a lot of experience in things other than my primary interest: research and coding. It has been a wonderful journey so far with Yogesh Wagh doing all the hard work, and I supporting the tech team when needed. 

Thank you all at OGD for teaching me things that otherwise I would never acquire, and hope you learned some bits from me as well ;-) 
 
Oh, and by the way, if you are restaurant or QSR owner, or have a multi outlet chain, you should probably check us out at: https://www.onegreendiary.com/ or https://risehq.io/ 


  

The Year End Note - One Work Way

So the year is coming to an end. What did I learn this year? Quite a lot I must say. Overall, it had been a lot of fun this year, as I learned quite a bit of image processing, object recognition using machine learning models, building custom machine learning models that run on smartphones and in the process make some apps (Woundly: https://play.google.com/store/apps/details?id=com.vlifesciences.woundly.woundly&hl=en) that are currently being used in a clinical research study for treatment of diabetic foot ulcers. In the process I learned a hell lot of medical terms as well. I also learned how to be more forbearing when making a video tutorial. This is the first ever I made (Woundly tutorial: https://youtu.be/PSFHfZ-W71Y), but I think, I can now make more videos on Youtube ;-). Possibly, something that I may try in the coming year. 

I also developed (NurseAssist: https://play.google.com/store/apps/details?id=com.novalead.nurseassist), along with my colleague Kiran Kakulte for tracking Nurse visits for a nurse assisted clinical trial. We also build the infrastructure necessary - using NodeJS/MySQL backend, the same backed is also used for the Woundly app described above. 

Side Note on tech stack for above apps:
1. Android Native, OpenCV
2. NodeJS / MySQL 
3. AngularJS for Web portal (This cannot be shared because it is not open to public)

PS: On another side note, if you or any one you know is affected by diabetic foot ulcer (DFU) and you live in India, you may register your interest for participating in a currently running clinical trial at:  https://goo.gl/forms/Cc2yd4sl8qYwBycq2
   

Monday, August 27, 2018

Where is that server?

I was tying to find the geo location of a few DNS IPs that we use for our proxy server today, and stumbled upon these two sites: https://tools.keycdn.com/geo and https://ipstack.com

So just out of curiosity I decided to check some Indian (and India related) sites and their geo locations. The most surprising one for me was Paytm and Flipkart. While the later seem to be hosted in India, Paytm seem to be hosted on AWS in Singapore. Of the banks: the HDFC seem to be at odds to use Cloudflare hosting from USA. With GOI (hopefully soon) enacting the DEPA (Data Empowerment and Protection Architecture), many of these sites would need to move with in India, this includes some which I am directly associated with. Also despite what some Chinese mobile companies want you to believe that their user data is stored only in India / Singapore (which may be true), their IP address location seem to indicate a different story. One more fun: google.co.in points to a server in USA.

Here are more:



























Sunday, August 26, 2018

A quick trip to my alma mater: Pune University

I had a quick visit to my alma mater the PU (now SPPU). I had been visiting the campus after quite a long gap, and more so I was going in monsoon time. A time when the campus is lush green and as always pleasant than the rest of city. So I was surprised to find that the British era main building has been mostly renovated and looked great again.


And one who has been in PU for even a short graduation course cannot forget the great old tree - the place where multiple generation of students relaxed, studied, chilled and romanced. I always make it a point to walk though this tree every time I visit the PU campus. The tree is getting old, a branch was completely rotten, but it still stands still as a magnificent caretaker of numerous seekers of knowledge who folk to this Oxford of the east. 






Saturday, August 25, 2018

Odd tech trials #1

I use a lot of tech. And more often that not, I use them in ways that a typical user may not really use the tech. Nor it is the way tech companies design their products to be used. Here are some odd experiments I am currently running:

1) Using a Windows desktop PC with out a mouse. I have almost a decade old machine, of which internals have been upgraded over time. About 5 years ago (around the time Windows 8 was released), I had also bought a touch screen monitor, but seldom use the "touch" part of it. Few weeks ago, I decided to give up on my old wired mouse and keyboard in leu of a wireless keyboard I had got for an iPad (but which I found no use of). Now, I didn't have wireless mouse, so I decided to just rely on using the touch screen. So far the experiment has been going great. But these days, I use my desktop PC a lot less as I am away from home most of the time. (PS: this post is being written on my desktop PC).

2) Using an Android phone without Google account. I have been using Oppo A3s as my secondary phone for a while now. A week ago, however, I was getting increasingly upset over the way Google was tracking my movements. Yes, I could shutoff the tracking options, but then I decided to nuke the phone and use it without any Google account. But without a Google account on the phone there is no way to download apps from the Play Store. Being an Oppo phone, however, there was a "Oppo Store" where you could install most of the popular apps on the "Play Store", and the Oppo store didn't need you to setup an account or anything, but it indicated that it would constantly send "usage information" to "improve user experience". Something I have ZERO interest in, and of-course something that raises my inner eyebrows. So I nuked the phone again and set it up with out anything, disabling and removing everything possible to the bare minimum. But I needed two apps (one a popular messaging app and another an apartment security app) - for both of these I found a trusted source to get the APK and side load them on to the phone. As of now things are going fine. I don't recommend people doing this, but one can pretty much have a locked down phone (android), if one really wants it that way.

3) Using an Android phone just to take photos. I had been reviewing the so called phone called "Kodak Ektra". Now even though you can make phone calls using this "phone", it is very much a camera in all ergonomics sense. I tried to use it as my secondary phone but I just couldn't. So next I nuked this phone and removed all the apps (including phone and messages) except the camera app, the Google Photos app and Snapseed. Now I have a "smart camera" - that has only one function : take photos, on device editing (using the fantastic Snapseed), and backup to Google Photos over a Wi-Fi connection. Coming to think of it sounds pretty cool. I am just wondering, why have companies not yet come up with camera products that would offer this very limited and focused function: take photos, offer on device editing, and backup on cloud storage. I definitely think there is a sizeable marker for this device - and I already have a neat prototype of this ;)

Friday, August 24, 2018

Playing with OpenCV : dynamic magnification



I have been playing around with OpenCV (https://docs.opencv.org/3.3.0/index.html) on Android quite a bit these days. While I am using OpenCV for image processing and image recognition work (using caffe bridge), I wanted to implement a UX scenario with dynamic magnification when a user is interacting with an image. An example of this UX is seen below:



You can see this kind of UX on iOS when trying to select a text. This is the equivalent for selecting a part of the image. After trying out a bit, I figured we could do with some simple lines of code as follows:

  Mat img = ...; // the source image is read into this Mat
 int sz = .. ; // size of zoomed area in pixels
 int sf = 2 ;  // the scale factor
 int scaledFactor = sz * sf; // this would be the total width of the zoomed area            
  int mxX =  mnX + scaledFactor;
 int mxY =  mnY + scaledFactor;

 // the centre of the circle depicting the zoom
 Point circleCenter = new Point((mxX-mnX)/2, (mxY-mnY)/2);

 // the source rectangle 
 Rect rect = new Rect(mnHX, mnHY, sz, sz);
 // the scaled rectangle 
 Rect scaledRect = new Rect(mnX, mnY, scaledFactor, scaledFactor);
 Mat roiFrame = new Mat(img, rect);  // get the are of interest to magnify 
 Mat scaledFrame = new Mat(roiFrame.rows()*sf, roiFrame.cols()*sf, img.type());
 Mat circleMask = new Mat(roiFrame.rows()*sf, roiFrame.cols()*sf, img.type());
 // create a circular mask 
 rectangle(circleMask, new Point(0, 0), new Point(scaledFactor, scaledFactor), BLACK, -1);
 circle(circleMask, circleCenter, sz, WHITE, -1);
 // zoom the rectangular area
 resize(roiFrame, scaledFrame, new Size(), sf, sf, INTER_LINEAR);
 // now copy the zoomed area into the source image applying the circular mask 
 scaledFrame.copyTo(img.submat(scaledRect), circleMask);
 // indicative circle
 circle(img, new Point((mxX+mnX)/2, (mxY+mnY)/2), sz, GREEN, 1);

 // cleanup ..
 roiFrame.release();
 scaledFrame.release();
 circleMask.release();

The above code is essentially a fast way to get a source rectangular area on the screen where a user is interacting, scale that area to a factor as needed, then apply a circular mask to give an effect of magnifying glass, then copy this back on to the source image so that it overlays to give a smooth UX with dynamic magnification when selecting a portion of the image.

Friday, March 02, 2018

Axiostat becomes the first from India to get USFDA approval for wound dressing.

Wounds are a traumatic. Some wounds may immediately kill a person, others may hurt over a longer period. Having been associated with a company researching into this domain, I can tell you that for both of these, wound care is absolutely essential and an important part of that is dressing.

Axiostat (http://www.axiobio.com), a Bangalore based company just got USFDA approval for their patented (http://www.axiobio.com/axio-clotting-technology/), emergency wound dressing tech ( 
http://www.newindianexpress.com/states/karnataka/2018/mar/01/axiostat-is-first-indian-wound-dressing-to-get-usfda-nod-1780418.html). Apparently, their products are being already used in Indian military (http://www.axiobio.com/military/). Now, with this approval, they also have the possibility of a larger global market.

This is quite a good news. These are some of the companies and alike that GOI needs to froster and encourage. They are not the ones that have short term benefits (of creating lots of jobs, say) albeit  have long term impact not only in India but have global outreach. Something, I had argued back in 2014 in this article (http://tovganesh.blogspot.in/2014/12/make-for-india-makes-more-sense-than.html) and also echoed in a well written article by Amit Paranjape (https://swarajyamag.com/science/israel-the-startup-nation-lessons-for-india)

As a policy, GOI not only needs to encourage local manufacturing, but would have to go the extra mile to encourage disruptive, forward thinking companies who may not have capital funds today but have superior brain power to make products, and IP for the world audience of tomorrow. 

Tuesday, December 12, 2017

A week with Apple Watch

So, here I am. After avoiding to get a watch in the first place, I recently bought an Apple Watch (Series 1) for myself. I didn't go for Series 3 because I am not really a swimmer or runner and the Series 3 doesn't actually offer substantially more in terms of features against the price difference. With the difference in price, you can actually purchase AirPods as well.

In 2013, months before Apple released their first Watch model - I had written a post stating why calls, text and tweets won't define a smartwatch (see. It is not calls, text and tweet that would make a smartwatch) - which I am pleased that I wrote - and I am so right in every aspect of what I wrote there. Apple with its Watch, initially had a mis-step. It tried to position itself as a luxury watch maker, failed, and quickly pivoted its strategy to what a wearable watch truly made sense: tell time, track fitness, have a quick way to call up digital assistant, and 3rd party apps to extend the functions not in the core system.  When I see the Siri watch face on my watch - I can't help but pat myself of how close is this interaction model to what I described in the article above :)



The interaction model that I proposed and the Siri Watch face have so much in common (see http://tovganesh.blogspot.in/2013/09/it-is-not-calls-text-and-tweet-that.html).



Third party apps are there, but are still a long way to go.

There is still a lot to improve until we really have a wearable computer that doesn't look like a piece of brick, and one whose battery lasts for at least a full day of heavy use. The Series 3 with LTE is definitely not that one device as Joanna from WSJ notes in her review of the latest iteration of the watch that I didn't get (https://www.wsj.com/articles/apple-watch-series-3-review-untethered-and-unreliable-1505905203).

For one thing is sure, smartwatches are here to stay. It is only to be seen if they take as much time as smartphones to evolve or would we see substantial breakthroughs in a much shorter period. 

Monday, November 20, 2017

Using the iPhone for programming




I have been using my iPhone like a computer for some time now. The primary thing I do with my computer is programming. I dislike laptops and more dislike carrying around one. Over about 2 months ago - I experimented using the iPad as my primary go to computer. With the multitasking enhancements introduced in iOS 11, I could pretty much use it as a primary computer with a number work apps installed: Terminus (for ssh to development Linux server), Pythonista (for a fantastic on device python interpreter with a number of libraries I use - numpy to be specific, Working Copy (for managing git repositories), Textastic (the most fantastic source code editor for iOS). With these apps in place my next quest was to see if I could manage even without the iPad around. This is my week 2 of the experiment and I think I haven’t faced a lot of issue for on the go programming. These tools just work great for me. Now I can pretty much keep my laptop at home and use the desktop at work, while on the move I just use my phone. There are a few things like join.me and teamviewer that may just work better on a bigger screen, but then I can also connect my phone using the lightning to vga dongle that I sometimes carry - if there is really this need. 

Oh - and did I tell you that I wrote this post on the same phone ;) 

Peace. 

Friday, August 25, 2017

Programming in Devanagari [Revisited]

Exactly a decade ago, I wrote this post - http://tovganesh.blogspot.in/2007/08/programming-in-and-for-devanagari.html. I was exploring JavaFX released by Sun Microsystems back then. I am no longer using JavaFX actively. But a decade later I am exploring Go. And the first code I wrote today morning was this:

package main

import "fmt"

func main() {
fmt.Println("ॐ नमो भगवते वासुदेवाय")
}

So just thought of reconnecting with a decade old post. Idea stays, the mode has changed. 

Tuesday, August 01, 2017

Simple script to extract final GAMESS geometry

Am dabbling with QM codes again, so I needed this quick script without much baggage of other dependencies, so wrote a quick one in Python. You can get this from Github: https://github.com/tovganesh/myrepo/blob/master/extractConvergedGeometry.py

I will call these scripts - quick and useful scrips (QUS) - hence forth and post others when I feel the need :)