Saturday, April 15, 2023

Resource : donotpay.com - Taking the Fight to the Biggies

The world's first robot lawyer - claims certain cities trap people into parking in spots that will ensure them ticket income. And it's not just cities. His favorite big company to go after is an airline - for scam charges..

Hear his story here :


DoNotPay utilizes artificial intelligence to help consumers fight against large corporations and solve their problems like beating parking tickets, appealing bank fees, and suing robocallers.

DoNotPay’s goal is to level the playing field and make legal information and self-help accessible to everyone.

Wednesday, April 05, 2023

What Daily Drills Can Do For You


You do an exercise you've done thousands of times already - curling a dumbbell, but you persist at it - why? Because it still has value.

Why is it different with cognitive skills? Why do we think we don't need to repeat past homework problems? Exactly - old assignments and problem sets are a valuable resource for preserving your cognitive ability in a given skill area.

Now that I'm trying to improve my skill at good ol C code (we'll get to why later😊), I've decided to tap into CodeWars for some daily drills. I asked chatG if that was a good idea - yes!

Here's an excellent one, with so many ways to trip up:

You are given a string containing space separated integers. You are to return (in a string) the max and min.

There's one old fashioned way to do it:

(it goes without saying that your outer loop is going to check if you're at end of the input string)

Loop through the string and capture any non-space character in your "buffer". If you do see a space, then take what you've accumulated in the buffer to atoi (stdlib.h) and then update your min and max.

When you're done with the loop, you just send out what you have in min and max.

How many ways are there to mess up something so simple? More than you think! For a start, if you have a Udacity-style fill-in-the-blanks exercise, it's hard to slip up. But, here, you're doing everything from scratch.

Do you know which you should use?

char *buffer

or

char buffer[]

One is a string and the other is an array of characters. What's the difference? Right? If you go with a string, you can't modify it without the mess of malloc, free. If you go with a char array, you waste some space. Which is better? 😊

If you're gobbling up characters from the in_string into buffer, did you remember to increment the buffer pointer? Check that you aren't exceeding your allotted storage?

Did you remember to increment the in_string pointer? Where in the loop? Only in one place?

How are you sending min and max to the update helper function? That's right - if you want MORE than one variable updated, you need pointers - and have to send the references to the helper. But, now, what about allocating the memory that these pointers point to. See? Not that trivial - better think twice before going down the "more readable" helper function path.😊

You'll get it to work and it builds some confidence. Without calling it that, you're using whitespace to parse - but, what about how you end - are you unintentionally requiring the last character to BE a space so that you get the last integer? See? So many things you don't see the first time - but, chatGPT sees it all!

Then, you look at someone else's solution and - wow - the atoi() in stdlib does way more than you imagined. It's not demanding just "23". You can give it "   23 32  44" and it'll return 23! Use that to your advantage!

So, now, you don't even need a buffer - you just loop through in_string and, each time you're NOT at a space, you gobble up non-space characters (after you've called atoi for a "bite" that is) till you get to a space.

So simple and elegant!

Saturday, April 01, 2023

Fixing the Crappy HTML Blogger Maintains - Thank You FreeFormatter!

You enter stuff into your blog in the Compose view and then, you want to add a tooltip, so you switch to the HTML view. Yuck! That's right, it's a mess.



How can you get $10,000 for free? Easy, buy a Lexus, let it get stolen and then buy it back when the insurance company auctions it. From Quora : 

This actually happened to my father. His Lexus was stolen right out from his carport. Not sure if he left the keys in it or how it got taken. He reported it as stolen to the police and turned it in to the insurance company. After two weeks or so when the car never turned up the insurance paid him for the car. Another week goes by and he gets a call from the police saying they had found his car parked in two towns over in the middle of town. There was not one scratch on it and not a lot of miles put on it either. So now the insurance owns the car and they put it up for auction. My dad goes to the auction and bids on his car to get it back. He won the bid with $10,000 to spare. So he drove home in his car with an extra $10,000 in his pocket.

Open Source Robotic Process Automation

What options do you have?
  1. Robot Framework: generic test automation framework started by Pekka Klarck that can also be used for RPA. It provides a keyword-driven approach for creating automation tasks.
  2. UiPath Community Edition: one of the most popular RPA platforms, and they offer a free Community Edition for individual and non-commercial use. It provides a drag-and-drop interface for creating automation workflows.
  3. Automation Anywhere Community Edition: offers a free Community Edition for non-commercial use. It provides a web-based platform for creating and managing automation tasks.
  4. OpenRPA: An open source RPA platform that allows users to automate repetitive tasks using a visual workflow builder. It supports various technologies and platforms, and can be integrated with other tools and systems.
  5. TagUI: a community-developed (Singapore, Govt. funded) FOSS RPA tool that uses natural language syntax to create automation tasks. It supports various platforms and technologies, and can be run from the command line or integrated with other tools and systems. The have an online course : https://learn.aisingapore.org/courses/learn-rpa-with-tagui-beginners-course/ and, here's Anders Jensen taking the course in real-time on YouTube with help from Ken, one of the developers of the course : https://www.youtube.com/watch?v=PKw1kFCDrHA