- Just Chatbot: Pretrained neural network. No tools;
- Agent: DNN + Tools
- Loop Engineering, Graph Engineering ...
- DAN: Deep Agent Network based on Deep Neural Network 😂
Tips that make life of a software engineer easier. Well, not exactly. Some posts are open questions that I haven't found an answer ... yet
Google launched Firebase Studio this April. I tried its "Prototype with AI" feature and recorded my experience here.
TL;DR; It is great for creating an interactive mock UI. It is NOT designed to bring you the full stack web application that is production ready.
I spent an hour learning and playing with it. Everything is super intuitive. I did not need to look for help anywhere else. During this hour, I wrote prompts (essentially requirement specs and provided a few feedback after I was able to try the user experience), waited for code generation, reported bugs and waited for AI to fix the bugs. By the end of the hour, it created an interactive web app that is good for a concept demo.
A few things I found interesting:
Create a web application for order picking. Requirements below:
![]() |
| System Diagram |
![]() |
| Flow Chart for Subscriber |
"This public dataset was created by the Social Security Administration and contains all names from Social Security card applications for births that occurred in the United States after 1879."
SELECT SUM(number), name
FROM [bigquery-public-data:usa_names.usa_1910_2013]
WHERE name in ('John', 'Jason', 'Mary', 'David', 'William')
GROUP BY name
SELECT SUM(number), name FROM [bigquery-public-data:usa_names.usa_1910_2013] GROUP BY name ORDER BY 1
SELECT SUM(number), name FROM [bigquery-public-data:usa_names.usa_1910_2013] GROUP BY name ORDER BY 1 DESC
https://maps.googleapis.com/maps/api/js?key={YOUR_API_KEY}&libraries=visualization,place&callback=initMap
Add this line in typings.ts, so that we can have type definitions for Google Maps JavaScript API
"googlemaps": "github:DefinitelyTyped/DefinitelyTyped/googlemaps/google.maps.d.ts"Event handlers turns out to be tricky. My naive first implementation was something like this
this.map.addListener('click', function(e: google.maps.MouseEvent) {
this.mapClick.emit(e.latLng));
);
Turns out there are two big problems in this implementation:this inside the event handler does not have member mapClick. Because it is no longer the component class this is fixed, I found data changes in the event handler does not trigger Angular change detectionViewChildren (notice there is also ConentChildren which will inject children from content projection).
constructor of child component. However, there is a bit of problem due to circular reference. The parent component has to reference child component as directive. If the child also depends on parent, we will get an error like this: EXCEPTION; Cannot resolve all parameters for '[ParentComponent]'.... So, the following slightly twisted injection is needed:
contructor(@Inject(forwardRef(() => ParentComponent)) private _parent: ParentComponent)
<div> <h1><ng-content select="my-title"></ng-content></h1> <div> <ng-content select="content"></ng-content> </div> <br/> <em style="font-size:smaller"><ng-content select="footer"></ng-content></em> </div>Markup in the client component:
<multi-slot-content> <my-title>Angular 2 Content Demo</my-title> <content>The selectors defined in MultiSlotContent directive will find the content element in this template, insert it into it's own template section.</content> <footer>Footer: this feature was called transclusion in Angular 1.</footer> </multi-slot-content>Resulting HTML Markup:
<multi-slot-content>
<div>
<h1><my-title>Angular 2 Content Demo</my-title></h1>
<div>
<content>The selectors defined in MultiSlotContent directive will find
the content element in this template, insert it into it's own template
section.</content>
</div>
<br>
<em style="font-size:smaller"><footer>Footer: this feature was called transclusion in Angular 1.</footer></em>
</div>
</multi-slot-content>
Notice the key is to define proper Angular 2 selectors in the directive. Then in the client component, it just need to fill the content in the right selector target. The end result is the directive's ng-content elements got replaced by the fragments from client.