Search Chir.ag 'Blog
Search Results
Search text: "pricing" found in 3 'blog entries.
Call Me MaybeFri, 2nd Jun '23, 11:40 pm::
Juliet doesn't always keep her phone or smartwatch nearby when she is home. Normally it is not a problem since she does not get any urgent calls from the kids' schools or doctors, as those go to me. But I get pretty annoyed if I try to call her when I'm away from home and get her voicemail instead.
Not anymore! Thanks to the wonders of technology, I have figured out the perfect way to annoy her back and have her call me immediately. I hooked up a Sonos to the dozen in-wall speakers we have throughout our house and can use Spotify to blast a song at full volume no matter where I am in the world. Naturally, my song of choice is Call Me Maybe by Carly Rae Jepsen.
Who needs a landline when you have Sonos?! Surprisingly, just as I was typing this, I realized that we do have a landline! It's the emergency line for the elevator via Ooma. I know landlines are a thing of the past and pretty boring in general but Ooma's tech and pricing is pretty cool. You buy the equipment online and they give you a phone number and service for free, with the only monthly payment being taxes and FCC charges (around $7 for my location). Their equipment is well-designed and cleverly solves the reliability vs. reach problem.
So here's the problem I needed to solve: The elevator's emergency phone line required an old-school landline connection over an RJ-11 phone cord. I cannot easily get a standard landline where I live so my only choice was cellphone or internet-based phone. Cellular phones do not have RJ-11 ports and even if I found one that did, cell service is not dependable indoors, at least not for life-and-death matters. This left internet-based phone service as my only option, but most VOIP (voice-over-internet) services offer phones that connect to standard Ethernet (RJ-45) and there's no cheap "adapter" to go from one to the other, at least not stably for an emergency phone. Additionally, the elevator's control box where the phone line would plug in, is far from my router. Now while I do have good wi-fi all over the house and even the yard, VOIP over wi-fi may work for casual usage but I would not recommend it for emergency phones.
That's why after looking online for months, I was elated to come across Ooma. They offer a base-station ($50 refurbished on Amazon) that plugs into your router with an Ethernet cord and a compatible wireless phone jack with a RJ-11 port (another $50 on Amazon) that can talk to the base-station over RF, without using your home wi-fi. This means I could keep the base-station in my network cabinet, mount the wireless phone jack right next to the elevator's control box, and get reliable phone service without pulling a new RJ-11 cable all across the house. And that's exactly what I did and it works great. It even has a dial-tone with pulse-dialing!
If blasting Carly doesn't work out next time, I might have to call our elevator's emergency line to get Juliet's attention!
The Internet and Us - Part 3: A Joke OnlineTue, 18th Dec '18, 12:30 am::
It started off as an elaborate April Fools' joke in March of 2019. I wanted to prank my friend so I wrote a simple script that used Google's new Duplex AI digital agent to call him at odd hours. The AI voice was "human" enough to fool almost anyone, interjecting pauses with "umm" and "aha", repeating the same thing using different words. Gone were the days of Prof. Hawking's monotone voice. My friend was now being nagged by a believable set of voices who were trying to book a scuba lesson in his non-existent swimming pool, buy his not-for-sale hair, and apply to his world-famous clown college! My script emailed me every hilarious interaction he had to put up with but by the sixth one, he started asking the bots if I was paying them to call him. On April 1st, I called him up and asked him to review some code I was having trouble with and waited until it dawned on him. I heard a series of loud cuss words followed by uproarious laughter.
"You know I totally believed it was real people," he said. "I mean the accents could use some improvement but I honestly believed someone was posting my number on Craigslist or something. I had no idea these were computer voices!"
Over the next few months, I got busy with life and forgot about the script until one evening I had to call my cable company. They had unexpectedly raised my monthly rate without increasing the Internet speed and I figured it was time they heard my true feelings. But I was on hold for so long, I realized that it wasn't worth my time or sanity. "Only a robot could hold patiently for 30 minutes and not get enraged at the poor customer service rep for an unexpected charge," I thought. Maybe it was frustration, maybe it was the prospect of another funny story, but I spent the night rewriting my April Fools' script to bargain with the cable company. The logs showed that it took about 3 tries before an agent at my cable company said "I totally understand you frustration. How about I revert back to your old price but you keep the new speed?" My pre-programmed script sighed "Ok, that will work I guess." I didn't want it to sound too happy lest they might think I was trying to pull a fast one over them.
I shared the story of lowering my cable bill with friends and family and they all wanted to try it out. I just needed them to send me their cable company name and account number. I already knew most of their home addresses. It took a few days but eventually I had a very detailed, realistic script written that could handle most of the top 10 cable companies and it could even change the tone when talking to supervisor. I analyzed the logs and the script worked right off the bat in 60% of the cases and took at most 3 attempts to get 95% success. I eventually created a simple online form for friends of friends to enter their cable company name and account number so I didn't have to manually type things out.
I woke up one morning with a billing alert from Google. Apparently I had used $150 worth of Duplex agent credits in one night! A quick peek at the site analytics told me things had gotten out of hand. Someone had posted my app to their Facebook page. So I did what any broke person who just got his 15 minutes of fame would do - I put a big banner on the page that said "Lower your cable bill by $10/mo" and put a $1 PayPal button under it. No privacy policy, no terms of service. Just gimme a buck and my robots will take care of your problems! It only cost me 10c/call so there was barely any risk. I figured maybe in a few months, the PayPal button will make me enough to offset the $150 I lost.
I woke up next morning with a $540 PayPal balance. Positive balance! Someone popular had mentioned my site on their podcast. By evening, it was $1400 and PayPal shut down my account thinking it was scam. Took all next day to get it unlocked. After a few days, I started getting calls from people saying Company X had started training their employees to ignore my script. So I spent a few hours increasing its vocabulary and fed it a few books on negotiation and customer service. That worked. First month sales were $24,000 and expenses were barely $500!
The next few months leading into January 2020 are a haze. I was receiving feedback and requests from people around the world at an overwhelming rate. I expanded the basic cable-company caller system to handle health insurance claims, Craigslist inquiries, and even added a business-ready module that could reschedule Outlook and Gmail appointments. But the one that went viral was the car purchase negotiator. You simply enter the car make/model and your zip code and my AI bots would look online and call up every dealership in a 100-mile radius. Then it would negotiate the best price, essentially making each dealer bid against the others in near real-time. Once the script reached optimal pricing, you would get an email summary and then could call the dealership to finalize the purchase. Only cost you $25 or if you joined the monthly Gold plan or higher, it was free.
Growth was good and rapid. Soon I had a team of talented coders, a horde of eager investors, and a following of lazy slackers who never wanted to make a phone call again. But replacing phone calls wasn't the end-of-line for us. We had stopped using Google's Duplex once Mozilla released their open-source AI agent framework Firefish, which could do a lot more than talk. It could intelligently fill out forms. So we added a premium "No Snails" service. All of your boring postal mail comes to us and we handle it. Late fees on car rental? We negotiate it down to near $0. Bill for a "free" service that keeps auto-charging you? We cancel it for you! $49/mo is not a lot to live a hassle-free life. The only mail in your mailbox is birthday cards and wedding invites. No more scary IRS bills. Our Platinum plan members got their tax issues resolved automatically.
Maybe it was the public's lack of technical understanding or their faith in our brand, but people stopped thinking of us as an algorithm company. As far as they were concerned we had a call-center full of 100,000 people fighting on their behalf. It was barely 10,000 cloud servers! By the time we needed a million servers, we had acquired ten million paying customers. We were still private, IPOs having lost their charm by the market failures in late 2020s. We wanted to do something special for our ten millionth customer and the folks in travel department came up with an ingenious solution - World Citizen plan.
We already had Full-Life management plans where we took care of almost every issue you could have from picking health insurance to finding the right job. But no matter what we did, everything was location dependent. Even if our system could help a Canadian citizen find a job in US and automatically handle the filling, mailing, and replying to all of the paperwork needed to get passport and work-visa, the person still had to go for an in-person interview for security reasons. What if we could negotiate some sort of deal between both US and Canada where citizens of either countries could bypass the interview as long as they met certain criteria? Well, since most of the politicians in both countries were already Full-Life management customers, it didn't take long for us to convince them to support our World Citizen plan. After all, we already knew our customers in more depth than any interview or background check could reveal.
As far as I was concerned, I had no interest in selling anyone's data or getting hacked. Sure we experienced the odd instance of run-of-the-mill corporate espionage but securing our systems remained our top internal goal. This helped sell the World Citizen plan to more than the North American politicians. Soon Europe, Africa, and India joined in. Beauty of the World Citizen plan was that since we managed the application and approval process on both side of member countries, our customer's didn't even have to proactively apply for a visa. Instead our travel department would suggest places for them to visit as soon as they became eligible for a visa.
It took a few years but we finally worked out the kinks in the visa-free travel process. Terrorism had always been the primary threat to visa-free travel and we found a unique solution, that our customers surprisingly didn't hate - bank with us. Once a customer moves 100% of their banking, investment, and credit accounts to our system, we could easily detect and prevent illicit activities. We weren't as interested in preventing crime as in having non-criminal customers. Shady financial stuff got you banned from our service permanently. And if you wanted to appeal, you would have to fill out the forms manually and make the calls personally. There was little incentive for criminals to join our service.
For the next decade or so, we continued to acquire more customers and around the time the ten billionth baby was born, we added our third billionth customer. Of these three billion paying customers, 400 million were on the World Citizens plan. We were essentially the fifth largest nation in the world albeit without sovereign borders, currency, or elected officials. We did have a flag though and although it wasn't planted on any planet or moon, it was quite popular among new customers.
Things seemed to be going well for us and our customers well into the mid-2040s but then things took a turn for the worse quite quickly. Our non-customers revolted globally and continued to do so with an unyielding frenzy. We all understood why but we didn't know what we could do that didn't further spread violence. They either made too little to afford our service or had history (criminal or objectionable as per our internal standards) that prevented them from signing up for even the Bronze plans. These folks rarely got approved for visas now that most of the UN countries had signed up to the World Citizens registry. They had a hard time beating our AI at finding decent jobs, dates, or even restaurant reservations. Our AI lawyers beat their AI-aided human lawyers in 90% of the cases and our banking system was better insured than most countries' reserve banks. In nutshell, if you were our customer, you did not have to worry about bureaucracy. Sure it cost you a bit more to get your kid enrolled in a prestigious school but you can be sure that once you set a $3500/mo budget, our system found the most optimal school that fit your budget, education goals, and even your morning commute. The school didn't have to update their enrollment process or website. Our system did everything like you as a human would have via phone, snail mail, and web, just at a thousandth of the cost and with nary a care.
As proud as we were of everything we did for our 3/10th of the human population, it wasn't great to be part of the other 7/10th. So after a few tumultuous years, on Jan 1st 2050, we made the entry-level plan free for everyone without a bad history. Bam! Five billion new users in a day! The rest were mostly kids under 13 or ineligible to sign up.
Looking back at my life, I am proud to say that I helped improve the world in my own unique way. No, I didn't cure cancer and didn't eradicate world hunger. I barely donated to charity beyond what my Full-Life Tax AI suggested. But I'd like to think that I made the world a better place because I got rid of stress and misery on a global scale. We are all but human. I never expected us flawed humans to always do the right thing and I could never convince politicians to fix the laws or update their convoluted processes. All I could do was write a few automated scripts to make living less bothersome. Who knew it could end up touching so many lives! And to think it all started as a joke online.
Fingerprint Matching 101Sun, 13th Feb '05, 12:30 pm::
I spent yet another weekend pouring over computer algorithms. This time, it's fingerprint extraction and identification. The whole topic came up from my discussion at work. I foolishly boasted that I could design a system that will let any of the 10-15 people use any of the 10-15 computers to log on to their user account by pressing any of their 10 fingers against a little Fingerprint Scanner. So in theory, if my boss's computer was busy, he could walk up to my computer, press his finger against the fingerprint scanner and it will automatically log him into the new business software that I'm gonna make.
So of course, now that I've told everyone it's possible, it's time to figure out how. The lazy computer programmer in me wants to spend a little money, buy something like the VeriFinger Standard SDK, hook it up to one of the cheap fingerprint scanners, let it do the scanning and recognition, write a small application to manage it all, and call it a day. It won't be cheap but it'll work pretty realiably. A lot of companies around the world have done it. The mathematician in me wants to do it all myself. It's not just the thrill of writing it on my own, it's the additional features that I can add on to it. So, if you are given the task of writing a software to do all of this from scratch, how would you go about it?
It's a known fact that every individual has absolutely unique fingerprints on each of their ten (or so) digits. If you want to design something that can let anyone use any finger to log on from any computer, you need (1) software + scanner on every computer, (2) a server that has the database of every person's every finger, and (3) some way of reliably matching a finger with the correct person no matter what computer they are on. So now we can break this whole operation into two phases. The first phase is the setup phase when we add each users's fingerprint to the database. And the second phase is application phase in which we recognize the user when they press their finger against a scanner. In either phase, a fingerprint has to be read, converted to a form that can be understood by a computer, and transferred to the server. Only difference is that in the first phase it is stored on the server and in the second, it is matched against every existing fingerprint on the server.
What we have are two different operations: Extraction and Identification/Recognition/Matching. Extraction is the process by which a fingerprint is read from the scanner and specific unique qualities about the fingerprint are extracted from the image. Identification/Recognition/Matching is simply looking up the server for other fingerprints with similar unique qualities. So how and what do we extract from the scan of a fingerprint? Look at your own index finger right now or if you don't have any fingers or fingerprints, look at this image. The first thing we notice and actually don't even realize is that the lines are actually ridges and valleys. The ridges are the thick bright protruding highs and the valleys are the thin dark low-lying crevasses. It is this pattern of ridges/valleys that is different for each person's each finger.
The first thought that comes to mind is that, if this pattern is different for everyone, just store a picture of their fingerprint and match it up against the database. Storing a picture to a database is easy. But matching up a picture of a fingerprint against a database is not. How do you match? Based on what? One idea is to just overlay the scanned fingerprint on to each of the 1000 fingerprints in the database and compare each pixel - if 95% of the pixels match, we have a match. That is how the older fingerprint matching systems worked. It works decently in identifying criminals, especially if you can wait 2 hours for it to match with 1000 fingerprints. But it's not fast enough for instant identification and poses a lot of problems, like what happens if your finger is positioned slightly to the left and/or at a 5% degree angle. It wouldn't even match against your own finger with 5% margin of error. So people have moved from the picture (raster) matching techniques on to the marker (vector) matching.
Instead of matching the whole fingerprint against 1000 others, why not extract unique characteristics of each finger and store them. This is called Minutiae Matching. Look at your finger again. If you notice carefully, you can identify many types of markers where ridges end, ridges bifurcate into two ridges, three ridges form a delta etc. If we can somehow chart this information like a graph or a map, then we can store this in a database much more easily. The information stored in the database, if read in English would seem something like this - "At the center of the fingerprint is a 'delta' and 5mm away on the right is a 'bifurcation.' 7mm below the bifurcation is an 'island' and 3mm to left of the island is another bifurcation." If this information is stored in the database for my right index finger, then when I press my right index finger against a scanner, the software asks the server to match my finger against all others who have a delta near a bifurcation and must have an island. This instantly narrows down the search only to those fingers which have deltas, islands, and bifurcations. Then it looks to see if they are positioned similar to my finger.
So now the extraction problem is just to find where the ridges end, bifurcate, or form deltas and map them on a graph. It's like saying plot Singapore, Mexico City, and Cape Town on a map. Not very difficult when you look at the big picture. The algorithm to extract markers looks at every pixel and it's neighborhood pixels. If they satisfy some special characteristics then it assigns it a marker type (delta, island etc.) and stores it in the database, relative to the position of other markers on the same finger.
Now comes the hard part - matching a finger's markers against that of the 10,000 in the database. If you think about it, it's actually an age-old problem that the ancient Greeks like Ptolemy busied themselves with - finding constellations. You must've heard of the constellation Ursa Major (The Big Dipper) or my favorite Ursa Minor (The Little Dipper). Astronomers and astrologers for centuries have stood under the night sky and identified tons of constellations simply by looking up and observing. They didn't need no fancy computers or telescopes to find The Libra in the night sky. We humans have built-in pattern-matching and pattern-recognition abilities that seem so natural to us but it is near impossible to replicate these on a computer.
Given a night sky full of stars, how do you find a constellation you are looking for? You can start by looking for small groups within the constellation. Maybe two of the stars in the constellation you are looking for, are really close to each other. So scan the whole sky for two stars very close to each other. If you find such a pair of stars then look for further signs - like is there a third star directly above or below one of them but at twice the distance. Stuff like this is what we humans are really REALLY good at. You don't even realize that you are performing one of the most difficult patterm-recognition operations right now - reading text from a computer screen. After all, OCR is big business. So is recognizing sounds (especially voice), handwriting, images, and videos - things that we so easily discern and detect.
Anyways, back to recognizing fingerprints. After the extraction process, the software will have to form a constellation with all the markings on the fingerprint. In the setup phase, this is stored on the server and in the matching phase this is what is searched for in the server. Searching a constellation of markers within each of the 1000 fingerprints in the database can be done in the following way. One of the things we need to realize is that due to the randomness of the physical act of positioning a finger on a scanner, you will almost never get two exact readings. However, the marker data in the middle of the finger will be much more accurately readable than the markings on the fringes or towards the sides of the finger. So give more importance to a bifurcation in the middle of the finger than an island at the far left - after all, it could be just a normal fully-connected ridge but the person might not have pressed the finger fully on the scanner.
My extraction method would be to start towards the middle, spiral out in a clockwise direction and note the position of every marker. Note the distance between each marker and nearby ones and store it in a cyclic data format. Now search the database for only those fingers which have similar markings in the center as there is a very high probability that center readings are accurate. Then narrow down the list to only those with similar markings near the immediate area surrounding the center. Keep narrowing down the search till you have at most 5-10 fingerprints. Then just cycle through each of them and compare each of them to the reading. Leave some margin for error, take into account the rotation and position of the markers and we should have a pretty damn reliable match. If you don't account for rotation or slight movement in position, you will almost always get an incorrect reading.
Note that throughout this discussion, we have concentrated mostly on the 1:N and not the 1:1 matching. 1:N matching means that one fingerprint is compared against N (10 or 10,000 or 10 million) fingerprints to identify the person. This is mainly used for easy identification, say to let people into a Government building. 1:1 matching is used for secure authentication - that is to verify that a person really is who they say they are, say to allow you access to your own safety deposit box in your bank. The 1:N method is geared towards faster searching and the 1:1 method is geared towards more reliable matching. It is quite difficult to design an algorithm that performs equally well in both situations for you can either do it fast or do it accurately, rarely both.
Anyways, I'm still writing algorithm for the pre-extraction phase right now. Before you extract markers, you gotta convert the true-color ridges and valleys to two color lines and gaps. Using a very simple algorithm, this is what I've come up with so far. In the next few days, I should get my own fingerprint reader and then I'll improve upon this code and do more cool things with it :) If I'm successful, then maybe I'll open-source the code for scanner and recognition and make it easy for others to use it in their applications. While I'm almost positive I won't be able to make it as good as these guys, if I make it sufficiently workable, it'll certainly make them review their pricing. These people have been doing this for years and have received national awards so I don't think I'm gonna be much of a competition (neither do I care to be). After all, I've only known about fingerprint techniques for less than 24 hours now :) But it seems like the whole scientific world has been at it for ages.
I still dunno what/how I'm gonna be setting this up for my work but all I know is that I really want to. Good thing is that I can add this feature to my work software anytime so even if it takes me months that's perfectly fine. Let's see what happens first once I have a fingerprint scanner sitting on my desk.

