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.
________________________________________

Now, if you're masochistic enough to use blogger, you've noticed, that, every once in a while, you run into this problem:

I have a caption for an image, used on a blogger post, that is pretty long. The caption is not wrapping, and , as a result, the line goes way off page and the image also is not visible without horizontal scrolling. 

The solution: take control. Hack that critical td like so:

 <td class="tr-caption" style="text-align: center; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; max-width: 100%;">

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


Monday, March 13, 2023

Congratulations Korea. chatGPT says $1m. You Did It for $25k (Or More :)

"


I asked chatGPT:

I want to build a smart Rubik's cube with the following specs

  • Each visible face of every edge piece - of which there are 20 (8 corner pieces, 12 middle-of-edge) will have an LED that can be lit up.
  • Have internal battery that can be charged by a custom charger using a USB port.
  • 400 mAh Li-Ion battery
  • BLE to smartphone Smartphone app to visualize, implement timers, provide solutions, etc (optional for user to purchase, but part of development effort)
  • Embedded computer to track every piece and, if user "requests", provide step-by-step guidance on solution by using LEDs to indicate next move.

Suggest a team size and talent breakdown to get this done in one year - prototyping, etc, ready to release to customers

It's fortunate that experienced and knowledgeable professional engineers have joined in this project. Thanks to their dedicated passion, JUNECUBE was developed faster.  

  •  TED LEE: General manager of this project and June's dad.
  •  S.Y LEE:  Software and application developer.  He is developing Android and IOS applications. 
  •  J. CHOI: Product planning and hardware developers. He was in charge of hardware development and is currently building a mass production system. 
  •  I.H.KIM: Circuit design and development engineer. He has developed PCBs and sensors and is currently working on product certification. 
  •  Y.J.BHAN :  Mechanical design engineer.  He designed and manufactured a prototype. He is complementing the product design for mass production. 
  •  J.W. BAEK:  Product designer.  He was responsible for the design of JUNECUBE. And it is currently  improving design of mass-production products.

What was the Oracle's answer?

That’s a great and ambitious project — essentially a full IoT + mechanical + embedded systems product. To go from concept to production-ready smart Rubik’s cube in one year, you’ll need a cross-disciplinary team that balances electronics, firmware, mechanical design, and mobile software. Here’s a practical breakdown based on similar consumer hardware timelines.

🧠 Core Team Size: ~10–12 people

1. Project Leadership (2)

  • Product Manager / Technical Lead (you, possibly)
    Oversees scope, schedule, and design tradeoffs; bridges hardware–software teams.

  • Industrial Designer / Mechanical Lead
    Owns cube geometry, LED integration, durability, magnetic feel, manufacturability.


2. Electronics & Embedded Team (4)

RoleMain ResponsibilitiesKey Skills
Hardware Engineer (EE)Design 6-axis PCB layout inside cube core, power regulation, BLE antenna tuning, battery management, LED drivers, sensors for orientation.Altium/KiCad, rigid-flex PCB, power electronics
Firmware Engineer (MCU/BLE)Embedded code for motion/orientation tracking, piece state computation, LED control, BLE communication.C/C++, FreeRTOS, Nordic nRF52 or ESP32, BLE GATT
Sensor/Algorithm EngineerCube state reconstruction (sensor fusion, quaternion math), move detection.Embedded math, IMU fusion, Kalman filters
Power & Charging Specialist (can overlap)Custom charger design, USB-C PD or magnetic dock, Li-ion safety compliance.Battery management, charge ICs, protection circuits

3. Software & App Team (3–4)

RoleMain ResponsibilitiesKey Skills
Mobile App Developer (iOS)Core app, BLE integration, visualization, timer, cube solver API.Swift, CoreBluetooth, Unity optional
Mobile App Developer (Android)Same as above.Kotlin, Jetpack Compose
Backend / Cloud Developer (optional)User accounts, firmware updates, analytics, optional online leaderboard.Firebase, AWS IoT Core, Python
UI/UX DesignerVisualizes cube state, LED hints, tutorials, store integration.Figma, Unity UI, Flutter design systems

4. Prototyping & QA (2)

  • Mechanical Prototyping Engineer — 3D printing, magnet strength tuning, LED wire routing, durability testing.

  • QA / Test Engineer — Stress testing (drop, twist, battery, BLE), regulatory compliance (FCC/CE).


🕐 High-Level Timeline (~12 months)

PhaseDurationKey Deliverables
1. Concept & Architecture1–2 moCAD sketches, system block diagram, component selection
2. Hardware + Firmware Prototype3 moWorking cube with LEDs, battery, BLE prototype
3. App Alpha + BLE Integration2 moSmartphone app communicates with cube
4. Pre-production Iteration2–3 moOptimized PCB, final enclosure, production-ready firmware
5. Beta Testing & Certification2 moFCC/CE, drop tests, user testing
6. Manufacturing Prep & Launch1 moVendor onboarding, Kickstarter or DTC release

⚙️ Recommended Core Hardware Stack

  • MCU: Nordic nRF52840 (BLE + enough GPIO for LEDs, IMU)

  • IMU: 9-axis (e.g., MPU-9250)

  • LEDs: WS2812B-mini or APA102C-mini (addressable)

  • Battery: 400 mAh Li-ion with BMS (TP4056 or MAX1555)

  • Charging Dock: Magnetic pogo or USB-C cradle

  • Firmware: FreeRTOS + BLE GATT + LED animation engine

  • App Framework: Flutter (cross-platform) or Unity for 3D visualization


💰 Rough Cost (for 1 year, small startup model)

Role/ItemCost Estimate
Core engineers (8–10 FTEs)~$800 k–$1.2 M
Prototyping, tooling, components~$100 k
Certifications, cloud infra, app store~$50 k
Total (1-year pre-launch)≈ $1.2–1.4 M

And what did the Koreans actually pull off?


Impressive? (Forget the typos :)

I'm giving them credit. Sure, a lot of things could be improved - just the user interface alone. "Put it yellow center edge down and wait" Really? Also, the blinking lights are pretty lame - they could have easily done something much nicer. Gangnam style would be cool. But, they got it done!

Sunday, March 05, 2023

Dated - Eaten and Spent in One Week - in the Late 2000's

Germany : The Melander family of Bargteheide
Food expenditure for one week: 375.39 Euros or $500.07

United States : The Revis family of  North Carolina.  Food expenditure for one week $341.98


Italy : The Manzo family of  Sicily
Food expenditure for one week: 214.36 Euros or $260.11

Man do them euros consume carbs. And they still outlive us. How?

Mexico : The Casales family of  Cuernavaca
Food expenditure for one week: 1, 862.78 Mexican Pesos or $189.09


Poland : The Sobczynscy family of Konstancin-Jeziorna
Food expenditure for one week: 582.48 Zlotys or $151.27

And you wonder why Germany always wanted more of Poland..

Egypt : The Ahmed family of  Cairo
Food expenditure for one week: 387.85 Egyptian Pounds or $68.53


Ecuador : The Ayme family of Tingo
Food expenditure for one week: $31.55


Bhutan : The Namgay family of  Shingkhey   Village
Food exp enditure for one week: 224.93 ngultrum or $5.03


Chad : The Aboubakar family of Breidjing Camp
Food expenditure for one week: 685 CFA Francs or $1.23


Sunday, February 26, 2023

Self-Control Do's and Don'ts by the Ultralearner Scott Young

James Clear : Every action you take is a vote for the kind of person you want to become.

DON’T :

Avoid these three self-control strategies:

• suppressing thoughts about temptations

     • if you suppress thoughts then they’ll come back stronger than before (in ironic rebound)

• resisting temptations

    • this takes a lot of effort and it’s ineffective

• training self-control as a muscle

     • there’s little transfer between different self-control tasks

     • you need to develop a complex skill set to master self-control


BELIEFS :

Watch out for the “limited” mindset:

·        Your beliefs about how self-control works become a self-fulfilling prophecy

o   if you think your willpower is limited, you’ll feel depleted after exercising self-control

o   if you believe your willpower is unlimited, you’ll feel energized by self-control tasks

·        you can gradually change your beliefs to become more unlimited (thus strengthen your actual willpower) by adopting effortless self-control strategies described in the rest of this guide

 

AVOID EXERCISING WILLPOWER IF YOU CAN

• choose ‘want-to’ goals (for which you have intrinsic motivations) rather than ‘have-to’ goals (for which you have extrinsic motivations)

• if you can’t choose want-to goals, increase your want-to motivation for the thing you have to do

• find activities that promote your goals and which are enjoyable at the same time

• if you can’t find enjoyable goal-promoting activities,

• look for aspects within the activities you have to do which are immediately rewarding,

• use temptation bundling (pairing an activity you have to do with an indulgence),

• or decrease the value of indulgence with commitment contracts (agreeing to incur costs if you fail – Eg. Donation to a group you dislike)

• be careful not to self-reward with indulgence and don’t rely on temptation bundling and commitment contracts onlyand team focused.

 

MANAGE SELF-CONTROL CONFLICTS

• broad-bracketing

• think of your choice (whether to indulge or not) not as a one-shot decision, but as a sequence of habitual decisions;

• always ask yourself: what will be the consequences if I indulge every time?

• psychological connectedness (use self-awareness to manage your sense of belonging – it helps!)

    • realize that in the future you likely won’t change much – you’ll

be equally tempted to indulge as you’re now and you won’t have

more willpower or resources to deal with temptations than you

have now

    • ask yourself – what would my older self ask me to do better now?

• adjusting your identity

    • identify yourself with the self-image of a strong-willed person

    • choose your identity based on your goals – if you want to become a runner, start thinking like one

Use Self-Affirmations!

 

DECISION MAKING

• whenever making an important decision, get yourself into a high-level (=abstract) construal by asking yourself a series of ‘why’ questions

    • for instance, if you want to lose weight, ask yourself: Why do I want to lose weight?

    • if your answer is ‘to be more attractive’, turn it into another ‘why’ question: Why do I want to be attractive?

    • Do this until you’ve connected to your deepest values (because it gives me great joy, because I deeply value my life, etc.)

• whenever you need to plan how to achieve your goals, you need to get into a low-level (=concrete) construal

• if you have a tendency for harsh self-criticism, practice mindful construal

Practice Mindfulness Regularly!

MANAGE CRAVINGS

• when you’re consuming food, alcohol or cigarettes, remove all distractions

    • don’t watch TV or YouTube and don’t listen to music

    • don’t check social media

    • don’t speak on the phone or send messages

• use additional techniques to strengthen your consumption memory:

    • before eating, drinking and smoking, remind yourself how much you’ve already consumed on that day (with pictures taken of the previous meals/drinks/cigarettes)

    • discard food wrappers at the end of the day rather than straight after each meal, get rid of cigarette packs and bottles at the end of the week or month

• when you’re not consuming food, alcohol or cigarettes, distract yourself away from cravings by

    • visualization (=imagining pictures or scents)

    • visual noise

    • counting

    • smelling pleasant odors


LIFESTYLE

• for optimal self-control, avoid foods with high sugar content

• instead, maintain a stable level of glucose in your blood by eating foods with a low glycemic index

• take plenty of exercise – this will improve glucose and oxygen supply to your brain and boost the volume of your frontal lobes (which are responsible for self-control)

• to preserve and restore self-control, maintain regular sleep habits and take naps when you’re down on energy

For a change, a really crappy blog post by the master himself - what I learned about getting in shape. I'll spare you the time and the link and the torture. Not worth reading. All I got:

Peter Attia - Outlive - concept of the Centenarian Decathlon

Spark by John Ratey - exercise is really about taking care of the brain. So do it!

Daniel Lieberman - The Story of the Human Body - impacted wisdom teeth are due to insufficient chewy food in childhood.

And, I didn't know about the NCSA's Essentials of Personal Training. Might look that one up


Saturday, November 19, 2022

The Father of Criminal Profiling


Source

Incendiary: the psychiatrist, the mad bomber and the invention of criminal profiling

Author

Michael Cannell

Primary Subject

George Metesky  - the Mad Bomber

Cause

Paranoid schizophrenia: A chronic disorder of insidious development, characterized by persistent, unalterable, systematized, logically constructed delusions. People suffering from this disorder often have a cool and distant demeanor. They may hear demonic voices calling them to action or see things that are not real. They may believe other people are controlling them or plotting against them. They are typically reclusive, anti-social and consumed with hatred for their imagined enemies. For all their derangement, they are capable of acting quite normally until, inevitably, some aspect of their delusions enters into their conversation. The paranoic is the world's champion grudge-holder. We all get mad at other people and organizations sometimes. But, with most of us, the anger evaporates eventually. The paranoic's anger doesn't.

Quotes (Dr. Brussel)

“I’ve never fired my .32 Iver Johnson at anyone," he would say. “But it’s never far from reach while I attend patients in my mid-Manhattan office or on outside calls. And. believe me, if I ever need to shoot—l will.”

Trivia

  • GM signed letters to the press "FP" - Fair Play. He has a patent for a solenoid pump
  • Dr. B used to teach a course at Yeshiva University. Carried a revolver in his briefcase
  • Joe Petrosino "the Dago" - Italian born NY cop - pioneer in fight against organized crime. Tapped by none other than Teddy Roosevelt (NY Police Commissioner).
  • "Needed only one glance at the wounds of the victim to know what inspired the murder and what branch of the mafia was responsible"
  • Deductions from color of blast smoke: black - dynamite; yellow - nitroglycerin; blue - gunpowder
  • GM used shellac to make the bomb waterproof so it could be hidden in a toilet.
  • "Line coupling" vs "well coupling" - jargon was a clue to the resident county of the bomber.
  • "Brooklyn (in Waterbury, CT) was a long way from the Connecticut of well-heeled commuters and country roads lined with picturesque stone walls. "
  • Thomas Harris (creator of Hannibal Lector) got ideas from interviewing John Douglas at Quantico (FBI, BSU)

Dr. B's Lifespan

1905 - Oct 23, 1982 (77 years)

Other Books by Dr. Brussel

  • Casebook of a Crime Psychologist
  • Instant Shrink : Become an Expert Psychiatrist in 10 Easy Lessons
  • Just Murder, Darling (Kills wife's lover and frames her for it)

Dr. B's Hobbies

Composing crossword puzzles, playing electric organ and drums

 

Dr. James A. Brussel holding his book, "Casebook of a Crime Psychologist"


Joe Petrosino : Pioneer in NY's fight against organized crime


Teddy Roosevelt : NY Police Commissioner who tapped Joe Petrosino for a big position in the NYPD


Dr. Egas Moniz, first Portugeese winner of the Nobel Prize, "for his discovery of the therapeutic value of leucotomy (lobotomy) in certain psychoses". Dr. Brussel had to recommend lobotomies in his line of work.