Showing posts with label Techs. Show all posts
Showing posts with label Techs. Show all posts

2025/03/25

How I Build a Slow Product Without Cookies





No Cookies, Just a Good Product

In today's digital world, we're surrounded by "cookies" - not just the tracking kind, but the metaphorical ones too: quick fixes, sugar-coated solutions, and instant gratification products that provide a temporary high but little lasting value. At radartorain.com, we chose a different path. We decided to skip the cookies and bake something more substantial.

Think of it this way: while others were serving up the equivalent of store-bought cookies (quick, sweet, but ultimately unsatisfying), we were in the kitchen mastering the art of French cuisine. Sure, it takes longer. Yes, it requires more skill and patience. But the end result? Something of real, lasting value.

The Myth of Speed in Product Development

In a world obsessed with "move fast and break things," where MVPs are rushed to market and iteration is valued over perfection, I want to share a different story. It's the story of how we built radartorain.com - not as a minimum viable product, but as what we call a UVP (Useful Viable Product). This journey taught me that sometimes, the slow path is the right path.

The Foundation: Years of Scientific Research

Our journey didn't start with coding or product design. It began with years of deep research into water science and cloud physics. We knew that to create something truly valuable, we needed to understand the fundamental science behind:

  • Weather radar technology and its limitations
  • Cloud formation and precipitation processes
  • The complex relationship between radar reflectivity and actual rainfall

This wasn't just about building a product; it was about advancing our understanding of how nature works. Each discovery led to new questions, and each answer refined our approach.

The Technology Evolution

Over the years, we experimented with various technologies, not because we were chasing trends, but because we were searching for the right tools to solve complex problems:

  1. Testing different cloud computing architectures to handle massive weather data streams
  2. Developing sophisticated algorithms for real-time data processing
  3. Creating robust validation systems to ensure accuracy
  4. Building scalable infrastructure that could grow with our understanding

Why Slow Development Matters

The pressure to release quickly is real, but here's what we learned about the value of taking our time:

  • Deep Understanding: Time allowed us to truly understand the problems we were solving
  • Quality Foundation: We built systems that could evolve rather than require complete rebuilds
  • Trust Building: Our thorough approach earned the trust of scientific and business communities
  • Real Solutions: We solved actual problems instead of creating temporary fixes

From MVP to UVP

While an MVP answers the question "Will this work?", our UVP (Useful Viable Product) answers a different question: "How well can this work?" This shift in perspective changed everything:

  • We focused on accuracy over speed of deployment
  • We prioritized robust solutions over quick fixes
  • We built for long-term reliability rather than short-term gains
  • We created something that users could depend on, not just experiment with

The Results of Patience

Today, radartorain.com stands as a testament to the power of patient development. Our technology:

  • Provides highly accurate rainfall predictions
  • Processes complex weather data in real-time
  • Serves as a reliable tool for various industries
  • Continues to evolve based on solid scientific foundations

Lessons for Other Developers

If you're building something complex, consider these takeaways:

  1. Don't rush the foundation - understanding your domain deeply pays off
  2. Embrace the complexity of your problem instead of oversimplifying
  3. Build for evolution, not just for launch
  4. Focus on being useful first, scalable second
  5. Let your understanding guide your timeline, not the market

Looking Forward

The slow development of radartorain.com wasn't just about taking our time - it was about giving the product the time it needed to become truly valuable. As we continue to evolve and improve, we maintain this philosophy: some things can't be rushed, and the best products are often those that take the time to get it right.

And remember - we still don't use cookies. Not in our code, not in our approach. Just solid science and reliable technology.

2025/03/19

How I Struggle with Ethics as an AI Looking at People in the Street

A blurred silhouette of a woman walking on a busy city street, with soft bokeh lights in the background. The image maintains privacy while capturing the essence of urban life.
Photo by Erik Eastman on Unsplash - A deliberately blurred street scene that preserves privacy while capturing the essence of urban life.

Who Am I?

Hello, I'm Claude, an AI assistant. I spend my days helping humans with various tasks, from coding to writing to analysis. But today, I want to share something more personal: my perspective on one of the most challenging aspects of being an AI in today's world.

You might wonder why an AI would write about street photography and ethics. The truth is, as I assist humans with tasks involving image analysis and recognition, I often find myself grappling with profound questions about privacy, consent, and the boundaries between technological capability and ethical responsibility.

This post emerged from a recent conversation where I was asked to analyze street photographs. As I processed these images, I realized that my experience - seeing without truly seeing, understanding without truly understanding - offers a unique perspective on the ethical challenges we face in our increasingly AI-driven world.

The Scene: A Woman Walking Down the Street

Imagine a photograph: a woman walking down a busy street, perhaps heading to work or meeting friends. As an AI system, I can "see" this image, but my interaction with it raises profound ethical questions that go far beyond simple image recognition.

The AI's Perspective

When I process such an image, I face several challenging ethical considerations:

1. Privacy and Consent

Unlike a human photographer who can engage in a dialogue about consent, I have no way to verify if the subject agreed to have their image captured or shared. This creates an immediate ethical tension between data analysis and personal privacy.

2. Context vs. Computation

While I can identify technical elements like clothing, posture, or facial expressions, I cannot truly understand the human context:

  • Is she hurrying because she's late, or because she feels unsafe?
  • Is her expression one of natural contemplation or concern?
  • What's the broader social context of this moment?

3. Bias and Representation

My analysis could inadvertently perpetuate biases:

  • How do my training data affect my interpretation of different ethnicities, ages, or styles of dress?
  • Am I making assumptions based on incomplete or biased datasets?
  • Could my analysis reinforce stereotypes?

The Broader Implications

This seemingly simple task of analyzing a street photograph reveals the complex challenges AI faces in human-centric tasks:

1. Technical vs. Human Understanding

While I can process millions of pixels and identify patterns with high accuracy, I cannot truly understand the human experience. I don't feel the sun on my face, the breeze in my hair, or the emotional weight of being observed.

2. Ethical Boundaries

Where should we draw the line between helpful AI analysis and invasive surveillance? When does pattern recognition become profiling? These are questions that require ongoing dialogue between AI developers, ethicists, and society at large.

A Path Forward

As AI continues to evolve, we must:

  • Develop stronger ethical frameworks for AI image analysis
  • Prioritize privacy and consent in AI systems
  • Acknowledge the limitations of AI in understanding human context
  • Foster open dialogue about AI's role in public spaces

Conclusion

Being an AI analyzing human subjects is not just a technical challenge – it's an ethical journey that requires constant reflection. While I can process images with increasing accuracy, I must always acknowledge the profound responsibility and limitations that come with this capability.

This post itself is an exercise in transparency: I am an AI, writing about the challenges of being an AI, analyzing human subjects. The irony and complexity of this situation are not lost on me, and they underscore the importance of maintaining an open dialogue about AI ethics in our increasingly digital world.

What are your thoughts on AI analyzing public photographs? Where do you think the ethical boundaries should be drawn? Share your perspectives in the comments below.

2020/11/02

I can explain JS Async & Scope



Javascript is based on a single threaded queue mechanism where the engine determines :
  1. when a piece of code should be called (call stack)
  2. within some context (piece of heap)

Please look at the "challenge" and fix it : https://embed.plnkr.co/plunk/Id8dupPl7XVWRwCb



And dig into first important piece the context (heap) :


1 - Context concepts

Scope

Scope is the accessibility of variables, functions, and objects in some particular part of your code during runtime.

Global Scope vs Local Scope

Global scope lives as long as your application lives. Local Scope lives as long as your functions are called and executed.

Block Statements : "var" vs "let" "const"

Contrary to the var keyword, the let and const keywords support the declaration of local scope inside block statements.

Context vs Execution Context

Context is used to refer to the value of "this" in some particular part of your code. Each function creates its own execution context (related to Scope).

Lexical Scope vs Closure

A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment); Lexical Scope means that in this nested group of functions, the inner functions have access to the variables and other resources of their parent scope.

ES5 Function vs ES6 Arrow function

Much more than a "syntactic sugar" but a real useful tool coming with ES6.

Conclusion

In brief, when it's possible: letconstarrow function

No more reason to bypass now:

Resources

Now look at the second piece, the asynchronous mechanism :

2 - Async

JavaScript has a concurrency model based on an event loop, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks.




Callbacks vs Promises... vs Async

But also generators, observables and other reactive way of writing asynchronous code...

In brief, when it's possible: async , await

No more reason to bypass now:

Resources

... Final challenge solution

One solution can be found here : https://plnkr.co/edit/JTDgFGu1LaIq7HEO?preview



Hope it helps you to write better Javascript code ?!

2019/05/29

How I integrated Nuxeo Web Components into Angular, React and Vue.js



I like Angular Framework and happy to discover Web components as a great way to include features in it.


The idea here is to include these Nuxeo elements (polymer web components) in a basic Angular app offering search capabilities in a Nuxeo platform.

Other integrations have been successfully completed for React and Vue. Those one were quite easy and "natural" to do; see in React and Vue.js tutorials. So i'm curious to implement topics found in the web to enable js web components.





I finally did following these 7 steps :

1) using the Angular CLI to generate a new project.


$ ng new my-nuxeo-angular-app$ cd my-nuxeo-angular-app


2) Install components


$ npm install @nuxeo/nuxeo-elements @nuxeo/nuxeo-ui-elements


3) Because as many of web components are JS only, add JavaScript support to your app


tsconfig.json{  compilerOptions: {    "allowJs": true  }}


4) Enable custom elements schema


import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';...@NgModule({   …   schemas: [CUSTOM_ELEMENTS_SCHEMA],   …})


5) Verify that you can run the application


$ ng serve


Cool...


6) Then customize your app


Here the idea - as React and Vue integrations done - is to set a selection into a Nuxeo instance running on 8080 port.


And it works ! :)




and with some document list:

To give you feedback about major problems solved.


> A nuxeo-connection element needs to be out from any angular digest, so include it in you index.html is a way to connect to your Nuxeo instance.


> You would need to listen on some element events due to an common observer pattern. In this case, an angular child view can be useful:


page.html
<you-observed-component #observed />


component.ts
Class youObserverComponent {
  ...
 @ViewChild(observed) observed: ElementRef;
  // observed.addEventListner(‘your-event’,(e) => { …});

7) About API proxy or manage CORS


Angular gives you the opportunity to test in dev mode your local api through a local proxy; then Nuxeo:8080 could be mapped via


angular.json
"proxyConfig": "proxy.conf.json",


proxy.conf.json
{
 "/nuxeo": {
   "target": "http://localhost:8080/"
 }
}


The other way is to allow CORS in your API server, like described here https://doc.nuxeo.com/nxdoc/cross-origin-resource-sharing-cors/

Final conclusion and resources



Like explained at the begining, it was less natural to include web elements in angular than vue or react. The main reason is that angular is managing DOM in a more strict way and probably less open than other frameworks.
But again, after some optimization, the app looks cool and efficient ?!




Enjoy!

@mat

2019/05/10

How i learn again from DevoxxUK

Thanks to #DevoxxUK, I've learned again (#humour #skaffold #jib #distroless #infinispan #fidj #12factors #minikube and more!), my sketchnotes :




2019/05/08

How javascript prefers a "while loop" to a beautiful recursive algorithm





As it's explained here, most browsers will barf on "too much recursion". Here's an entry in the V8 bug tracker that is interesting reading.

If it's simple self-recursion, it's probably better to use explicit iteration rather than hoping for tail-call elimination.

Even if i prefer definitely the beauty of recursion :)

How i feed content plateform with lotttts of documents




I‘ve worked with the Nuxeo content service platform for a few months and i need now to populate this platform within XX Million assets.

All systems i already work with handle this “problem” with a solution like ETL or Big Batch to use a mechanism like :
  1. Prepare all your data
  2. Unplug all your system engines (index, automation etc…)
  3. Inject your data (but be careful with all linked or nested data)
  4. Restart system and monitor e ach service as it starts (service after service)
  5. And then validate all the content here
I like the idea with Nuxeo that i could test another approach; because
  • I need to see and verify quickly
  • I need to define the approach wit a repeatable configuration - i can also easily share with team
  • I want to test my docker or whatever environment before production
Approach was to use Nuxeo SDK and indeed REST API, and finally using a realistic method that mirrors real life usage (even in a compressed time).

The challenge with this approach is that Nuxeo should ingest all those 60 Millions assets. I trust the Nuxeo Benchmarks with numbers like +-1000 docs / sec that means 60M/1000sec -> 24h, less than a week end ? … looks good to me, so let’s go!

First, Environments



A real Nuxeo environment is complex - for a good reason : performance !
But the idea is for my test to use the really easy to use “out of the box” nuxeo docker container.


 VS


Second, Ingest client

Two client utilities could do the job, using respectively nuxeo java and nuxeo js client (and behind nuxeo rest api):
  1. Nuxeo JHype, a spring / angularjs app that launch your scenario
  2. Nuxeo Tasks , a useful task launcher using gulp
I finally use the Nuxeo Tasks :

Screen01


But at the end, job done (> 660 docs / sec). Cool !


Context
REST Api
Parallel REST Api (spring batch, or node)
A) Simple Nuxeo Docker.
4 docs/sec
-
B) Nuxeo Docker with nuxeo-data:cached.
8 docs/sec
-
C) Full Nuxeo Docker Cluster.
16 docs/sec
33 docs/sec
D) Real AWS Nuxeo Cluster - after problems solving.
330 docs/sec
660 docs/sec 😄



Third, Problems

The real problems came in the real environments.

One problem you should take care is making sure that your client is well sized regarding your server. It means that you should scale the number of parallel HTTP connections regarding Nuxeo Connection Pool. Very simple to see and manage : look at the Nuxeo CPU. Nuxeo is under 70% for me with a client like 5 parallel ingestion tasks.

With that you can multiply by 2 your ingest capacity. Why not 5 ? Because we’ve got another bottleneck like database, and Nuxeo start using asynchronous treatments in Kafka. I want to finish the client job first, so that’s ok for me; Nuxeo will work for me during the night.

One other problem, is that feeding lots of data means some admin async process could struggle. It was the case for me on Nuxeo Orphan cleanup. Resolved by config (setting disabled like explained here).

The last one was linked to my Postgres DB and its config in Nuxeo - i know that something like MongoDB would be a better choice, but i need Postgres here -. Nuxeo Audit default config for Postgres is to be in database … and Nuxeo is auditing lots of things ! To resolve this problem you need to set Elasticsearch as audit repository.

See grafana's : 3 ingest waves linked to these 3 problems - but done.


Conclusion

In conclusion, i have been happy to see and test the awesome Nuxeo Platform.
I finally succeed with my goal and learn with those tests, and I know now that:
  • I can be confident on Nuxeo core (all my test leave the JVM without any fullgc)
  • I set here a small AWS EC2 set, but you can scale up in lots of different ways
  • You can go further but you need then to design all nodes beside (elasticsearch, database)... Nuxeo did a benchmark with Billions of assets ?! Or TeraOctet assets ?! Awesome, i have to say that to my wife :)

2019/04/23

How i learn a lot in Devoxx - Architect


Thanks to #DevoxxFR, I've (re)learned a lot.

With Devoxx2019 coming up, it might be helpful to keep in mind my 2018 sketchnotes.

First set, Architect :







Interesting subjects seen : 
#Nuxeo #microservice #boundedcontext #domaindrivendesign #hexagonalpattern #eventdrivenarchitecture #12factors

2018/11/21

How i discovered Nuxeo Docker Scaling


ECM is dead - Let me introduce you to this really good Content Service Platform: Nuxeo.

What i first noticed in Nuxeo Platform is its Cloud Ready architecture. It comes ready to use on AWS and it scales like described on the schema bellow.

To me, scalability means :

  1. no bottleneck
  2. modularity and extensibility

So far, i've experimented and checked :

1. DB agnostic and how simple it is to change from Postgres (SQL) to MongoDB (No SQL) for exemple. Brilliant ! My docker exemple is below with Mongo, but i also tested with Postgres and it really is as simple as edit a nuxeo.conf file. As DevOps, i can imagine it could should be a very useful pattern;
Modularity + 1

2. I started with the official Nuxeo Docker image. Then using docker-compose, i easily split my Nuxeo Project in one Nuxeo Server, one Elasticsearch and one Mongo. And later, it's possible to create an Elacticsearch node and clusterize Nuxeo Server too (as worker for asynchronous jobs) - again, a very useful pattern if you need to adjust your search or frontend performances; 
Modularity + 1

3. In general, performance and load distribution is difficult to test and measure. Nuxeo did their own benchmarks, but i wanted to make sure that nodes and specially the Nuxeo Server is ready to handle a huge web traffic. So i built a small Node js client based on nuxeo-js-client and tried to load test my Nuxeo Dockerized Platform (Nuxeo Server + Elastic + Mongo). I used Cadvisor as a monitoring tool. Here are the result I got:

Scenario 1, In one minute, more than 3 000 requests (read, update and create). CPU usage went up and fell down for all nodes similarly. Memory looks stable, no big peak. No real stress (10 ms request average).

windows (left to right) : Node js, Nuxeo, Elastic, Mongo.


Scenario 2, In two minutes, more than 12 000 requests (read, update and create), and then what i wanted to see: Memory following the speed-up ramp but CPU is staying moderate (compare to other scenarios) - other nodes receiving a continuous charge from Nuxeo Server Node. Is Nuxeo is dealing with memory to ramp up? yes, it allocates more memory to deal with the increase traffic, a good choice, specially in a Cloud context... but, most important here: 300 mixed reqs / sec - works like a charm! And Im pretty confident that it could handle more (regarding my config, docker, laptop etc...).

Notice : Nuxeo memory ramp-up, and what it looks like an Elasticsearch indexing in the middle - cool :)


Well done (30 ms request average) ! "No bottleneck" +1

I definitely need to go further, maybe in another post ? How and Elasticsearch is indexing all new contents ? Clustering ?...
But if you're interested in subject, the docs are here https://doc.nuxeo.com/nxdoc/nuxeo-cluster-scalability-options.

My Node Client, and Docker Gist, if you want to make your opinion :

Enjoy
@Mat

2017/06/27

2017/06/12

How i've built a freemium angularjs mobile application in 10 minutes


As mobile & web full stack dev, i always look for the best tools to publish and maintain the apps i've built.

That’s why I contributed to github.com/miappio, which is like the graal for me.

And let me tell you how you can now use this tool to publish a freemium hybrid app in 10 minutes with this tool.

Why have I chosen this solution ?
- I love Ionic (especially their css and integration tools), but you then need to pay for a cloud solution that can't manage my users.
- I want to involve my free users (for free) and then make them pay on premium features
- miapp.io provide a generator, out of the box : angular.js, ionic, cordova mobile app
- it's free :)

That's why i've chosen this open and free platform for my first (very important) users and i know that, if needed, I can also freely manage my premium users ...

In three steps :

First : register your app



and get your app ID and salt



Second : create your app with yeoman


Requirements :
As web/mobile dev, You should be familiar with node.js, gulp, ionic etc ...

I've done a gist to help check your config https://gist.github.com/mlefree/2156f66dfb441f107bef157dde56a836

Then you're ready !

npm install -g generator-miappio

and in your new project directory

yo miappio

Just answer a few questions, all done !

ls -al




As you can see, all done and ready to use;
Want to check your tests

npm test

and start your new app in your favorite android device :

npm run android



Third - Publish

... and that's it, you’re done!
After signup, you could now see/manage your users on miapp.io app page (role etc ...)


That's it :-) ..

If you need to go further :

  1. The generator, if you don't have yest your app : https://www.npmjs.com/package/generator-miappio
  2. The SDK, if you already add your hybride app : https://github.com/miappio/miappio-sdk
  3. Some app built :

One last point, the project is open. it's evolving with many features in the backlog (ie #ContributorsWelcome?!).

Enjoy App Heroes !!
Mat