The replace-url thing should be a simple JS code using history API no?
[1] https://github.com/sudeep9/datastar-plugins?tab=readme-ov-fi...
823 karma · joined August 2, 2021
The replace-url thing should be a simple JS code using history API no?
[1] https://github.com/sudeep9/datastar-plugins?tab=readme-ov-fi...
This way the DBs can use simple sequence numbers instead of timestamp based IDs.
It is a typical CRUD app (like most of them). I like the idea behind HTMX or datastar. I built a prototype in it as well. But then I pivoted to solidjs.
Some reasons for this:
1. Single backend API for web, mobile and any other platform
2. Some UI patterns which are suited for JSON REST APIs [#patterns]
3. Ability to support partial functionality offline.
#patterns
1. Showing a subset of columns in a table but have an option to view & edit each record in detail. In my case a dialog opens with editable checkbox. So it doubles-up as "view" and "edit". These actions render just another view of existing data. A round-trip to server is not desirable IMO.
2. Filtering, sorting on columns. HTML based solution becomes tedious if some of the cells are not plain text but instead a complex component like a <div>. Sorting json and rendering is much better experience IMO.
Edit: About solidjs & datastar
1. It has fine-grained reactivity which I find it appealing and it uses signals which hopefully will be standardized.
2. The compiled bundle size is much smaller than I expected. I have 24KB compressed js which is serves quite a lot of views, pages.
3. Datastar is amazing and I have added it in my toolbox.
A sample of bad ringtone (auto-tuned baby crying) which was trending back then (2007-2008) was [1]. Thankfully I never used it.
There was a cambrian explosion of tools to customize the look and feel. TweakXP pro is the one I remember. All pirated off-course.
This does not have the benefit of being usable across different tabs or even closing and re-opening the page. Besides, (a minor point) shoving all the state in the cookie makes code simple i.e. don't have use URL params.
You might need async if there are lot of concurrent users and each of them using long duration SSE. However, this is not DS specific.
So, when /upload is requested, the backend in response sets a cookie with a random uploadId (+ TTL). At the backend, we tie sessionId and uploadId.
With every step which is called, we verify sessionId and uploadId along with additional state which is stored.
This means even if the form is opened on a different tab, it will work well.
So when opened on a different tab, the backend would do authentication and render the page depending on the store state.
In general, the backend must always compare the incoming state/request with stored state. E.g the current step is step 2 but the client can forces it to go to step 4 by manipulating the URL.
DS v1.0 now supports non-SSE (i.e. simple request/response interaction as well) [1]. This is done by setting appropriate content-type header.
[1] https://data-star.dev/reference/actions#response-handling
I think it is best seen in examples on DS website.
Why not use cookies?
In datastar the "Out Of Band" updates is a first class notion.
Its a combo of "Press" and "Prostitute" and it aptly describes some journalists and media people who clearly take sides and have sold their souls.
"Lakh" => 100K
"Crore" => 100Lakhs
[1] https://en.wikipedia.org/wiki/Indian_English#Numbering_syste...
[1] https://dictionary.cambridge.org/dictionary/english/prepone
I have made peace with the fact employees are just means to an end. Always have been. Nothing less or nothing more. The power is extremely lopsided in favour of the companies. This makes so many things beyond the control of an individual [1]. Focus on things in your control:
1. Keep learning
2. Be debt free as soon as possible.
3. Invest and build a financial cushion
4. Eat healthy and exercise (I am pretty bad at this but trying to improve)
5. Develop an alternative skill(s) which can you put to use if needed
6. Never burn the bridges, no matter what.
All of the above are easier said than done but I see no sustainable way of coping up.
[1] My current employer (which is a listed company) got acquired by a private equity. I have no idea what will happen but I am relaxed.
In SF, see if companies share knowledge if they are after the securing a contract from the same B2B customer.
In UK, drivers give way as a courtesy many times even though one has the priority. In return the other driver thanks using hand gestures. However, there was a local football match on a weekend and parking was very hard to find. Parking spots are zero-sum game. People started violating many rules. People started driving against the arrows on the road in desperation to grab the spot. Parking in places which were not marked as parking spots. All the manners & niceties went out of the window. It has hunger-games for parking spots.
BTW, google (and other big companies) hiring top graduates and researchers to deprive others of the same talent is hoarding.
On an unrelated note, the short clip is funny as well.
Maybe this varies country to country. I have seen this in India and UK atleast.
In UK atleast there are trades like roofing, landscaping, exterior building cleaning, masonry, tree surgeon etc which I have seen them are mostly family based.
Actors for sure with auditions and maybe maybe chefs, male pornstars.
I suggest to put a comment on the page to open dev tools and see the SSE event in action. I think people will appreciate D* even more.
SQLITE:
1. Smaller page size (to be specific: max(disk_sector_size, 512))
2. Integer primary keys
3. WAL mode
4. Increase page cache size. This is assuming that most people will click in the top-left 100x100 checkboxes.
Other optimzation:
1. In mem cache of bitmap of 1B bits, which is about 120MB, which is a shared state for all incoming connections.
1. Tracking i.e. navigating through jungles for hunting or find where the bottleneck is.
2. The thrill of the hunt. The joy after finding the hotspot or the bottleneck. It makes your day.
3. The actual hunt i.e. shooting an arrow/spear or using clever way of fixing.
4. Brag about the hunt or writing a blog post or tech talk on how difficult and awesome the hunt was.
Also optimizing a critical path has multiple takers in the org:
1. Product Managers are happy due to improved user experience.
2. Management is happy as in some cases it actually saves a lot of money.
3. Your boss is happy because he/she gets to score points as "team achievement" when evaluation is around the corner.
4. Engineers get to do nerdy things which otherwise would not find traction in the org.
All in all its a win-win-win-* situation.
Before performing upgrade make a copy of the db file. Also multiple DBs can be inited in parallel.
I fail to see why this might be so hard.
If a tech works 80% of the time, then I know that I need to be vigilant and I will review the output. The entire team structure is aware of this. There will be processes to offset this 20%.
The problem is that when the AI becomes > 95% accurate (if at all) then humans will become complacent and the checks and balances will be ineffective.