<https://danielmiessler.com/blog/keep-the-robots-out-of-the-gym>
very respectfully,
kushal
Against Must-Haves (Part Two) — Tom Dalling
The typical specifier does not understand the technical details and technical risks involved in building software. That's not their job. And if they did understand, engineers would become easily replaceable and their salaries would fall through the floor. For example, part of the job of marketing and sales people is to understand what the customers want, so they are able to provide great input when deciding what to build. It is not, however, part of their job to know how to build those things, which is why it's not uncommon for them to come up with ideas that are wildly expensive or literally impossible. And that's fine. Not every idea is feasible.
It's also often not specifiers' job to understand delivery risk, although it is highly desirable. Product people often don't have a good sense for whether building any given feature will be easy peasy lemon squeezy, or stressed depressed lemon zest. That's because there are knowns and unknowns that are deeply technical in nature, and only the people actually building the software have a hope of identifying where the landmines are. Product people with deep technical knowledge are incredible assets, but also exceedingly hard to find and probably outside of your price range.
So then who is actually responsible for the delivery of quality, working software? Whose job is it to deal with these deeply technical unknowns and the risks they pose? The most practical choice is engineering. Engineering is in the best position to understand and mitigate delivery risk — less so the individual engineers writing the code, and more so engineering management/leadership. Engineering management is the interface between the specifiers and the builders, and it is their job to ensure that delivery happens smoothly.
This is why I believe that non-technical engineering managers are generally a bad idea — but that's a topic for another time.
<https://www.tomdalling.com/blog/software-processes/against-must-haves-part-two/>
very respectfully,
kushal
It's also often not specifiers' job to understand delivery risk, although it is highly desirable. Product people often don't have a good sense for whether building any given feature will be easy peasy lemon squeezy, or stressed depressed lemon zest. That's because there are knowns and unknowns that are deeply technical in nature, and only the people actually building the software have a hope of identifying where the landmines are. Product people with deep technical knowledge are incredible assets, but also exceedingly hard to find and probably outside of your price range.
So then who is actually responsible for the delivery of quality, working software? Whose job is it to deal with these deeply technical unknowns and the risks they pose? The most practical choice is engineering. Engineering is in the best position to understand and mitigate delivery risk — less so the individual engineers writing the code, and more so engineering management/leadership. Engineering management is the interface between the specifiers and the builders, and it is their job to ensure that delivery happens smoothly.
This is why I believe that non-technical engineering managers are generally a bad idea — but that's a topic for another time.
<https://www.tomdalling.com/blog/software-processes/against-must-haves-part-two/>
very respectfully,
kushal
Whose fault is it anyway?
Could you say more about how these accidents were due to software issues stemming from outsourcing of development? Could you say more about how not outsourcing COULD have prevented the (2) accidents?
This is not what I understood to have happened.
The software developers writing the code 100% did not come up with or spec out how the MCAS should work. They're not aeronautical engineers, and they absolutely were not in the "system engineering" decision making change of the control system and how it should interface. They didn't decide to rely on one angle of attack sensor.
I know people like to shit on Boeing for outsourcing, but for FFS what do you think non-outsourced software developers were going to do? Fix the spec? Design it "right?" It WAS designed right to spec. The SPEC was bad.
"NO Billy, this is a bad control scheme. This is going to get people killed when the system forces action with 1oo1 voting on a key critical instrument. Especially when the methods and need to override such behavior is obfuscated from the pilot."
Non outsourced developers would have implemented it exactly as outsourced developers did because this is what they were TOLD to do. They didn't get to make ANY of those decisions. It would have still killed people.
Interestingly, my understanding is that Boeing maintains NONE of the production MCAS software was "outsourced" or written by "offshored" devs and was "effed up" in the good old US of A.
The software worked EXACTLY as intended. The system design was bad. The software developers did not do an iota of this system design.
<https://old.reddit.com/r/cscareerquestions/comments/1iuv5df/company_moving_to_only_prompting_no_coding/me2kt9m/>
very respectfully,
kushal
This is not what I understood to have happened.
The software developers writing the code 100% did not come up with or spec out how the MCAS should work. They're not aeronautical engineers, and they absolutely were not in the "system engineering" decision making change of the control system and how it should interface. They didn't decide to rely on one angle of attack sensor.
I know people like to shit on Boeing for outsourcing, but for FFS what do you think non-outsourced software developers were going to do? Fix the spec? Design it "right?" It WAS designed right to spec. The SPEC was bad.
"NO Billy, this is a bad control scheme. This is going to get people killed when the system forces action with 1oo1 voting on a key critical instrument. Especially when the methods and need to override such behavior is obfuscated from the pilot."
Non outsourced developers would have implemented it exactly as outsourced developers did because this is what they were TOLD to do. They didn't get to make ANY of those decisions. It would have still killed people.
Interestingly, my understanding is that Boeing maintains NONE of the production MCAS software was "outsourced" or written by "offshored" devs and was "effed up" in the good old US of A.
The software worked EXACTLY as intended. The system design was bad. The software developers did not do an iota of this system design.
<https://old.reddit.com/r/cscareerquestions/comments/1iuv5df/company_moving_to_only_prompting_no_coding/me2kt9m/>
very respectfully,
kushal
Meta LLM
Okay so I have a new idea maybe it's not just a new idea but anyway I have an idea a shower thought maybe so what I'm thinking is what if what if what if you ask the same prompt to multiple LLMs like or the same LLM multiple times and you take the responses all those responses and you feed it into the LLM again and you ask it to verify it or something like that right so maybe I can come up with something stupid like a prompt could be something like is it true is it true that more people more humans live in the temperate region of the Earth then they do on the tropical region of the Earth you know so that could be one question or another question could be something silly like is it true is it true is it true that more people live there are more people on earth than there are chicken on top of the peak of the Mount Everest right so that could be a silly question and maybe another question could be like hey review this review this piece of react component code that I have and tell me how I can fix it right so something like that you know like ask the same question to multiple alarms multiple times collect all the garbage together you know I mean collect all the responses together and then feed it back so yeah like just keep doing it until it becomes stable I guess I don't know well don't use it to train it I guess it's don't actually use the actual feedback to train it I guess but just just feed it you know just to see what what comes out just to see what comes out I guess what do you think
sincerely,
Common DB schema change mistakes | Postgres.AI
As usual, I'll be focusing on OLTP use cases (mobile and web apps), for which query execution that exceeds 1 second is normally considered too slow. Some cases discussed here are hard to notice in small databases with low activity. But I'm pretty confident that you'll encounter most of them when your database grows to ~10 TiB in size and its load reaches ~105–106 transactions per second (of course, some cases will be seen – unless deliberately prevented. – much, much earlier).
TypeScript 5.2's New Keyword: 'using' | Total TypeScript
Check out this article on the using keyword in an upcoming version of typescript.
Indexed db blazor
TLDR: I made IndexedDb work just like LINQ in C#. The code also uses attributes to build everything for you. Using client side storage made easy!
I will be posting the open source code on my github here this weekend:
https://github.com/magiccodingman
I simply haven't posted it yet because I need to remove some of my encryption keys and seperate some private company logic from my business out of the code.
Thank you to nwestfall for his BlazorDB work, which was a frok of Blazor.IndexedDB.Framework by Reshiru
https://github.com/nwestfall/BlazorDB
My project heavily worked off of the work that nwestfall created. I additionally went down the route of utilizing Dexie.js as Dexie reliably gets updates. So, what's special about what I made? First, any of the projects I found were left archived, dead, or didn't have the ability to query the way I'd want. There's a ton of ways I can make my code more efficient, but honestly it's good enough for what I need it for as my main goal was to make IndexedDb easier to use. I want to use IndexedDb just like I use my LINQ to SQL code.
Here's how it works:
1.) Setup some services in your program.cs and create as many databases as you want. Don't worry about creating the schemas as my code will auto build your store schemas. Additionally I will likely remove the EncryptionFactory service, but as I'll show later, I've added methods to encrypt your data. It's not the most secure method in the world, but it's better than native no encryption:
builder.Services.AddEncryptionFactory(); builder.Services.AddBlazorDB(options => { options.Name = DbNames.Client; options.Version = "2.4"; options.EncryptionKey = "256 bit encryption key of your choice"; options.StoreSchemas = SchemaHelper.GetAllSchemas(DbNames.Client); });
2.) Get your manager like so:
var manager = await _dbFactory.GetDbManager(DbNames.Client);
3.) Setup your model with attributes. Note that the Encrypt attribute uses your encryption key that you provide. It will encrypt any item as it goes into the IndexedDb database but you will need to make a specific call I made to decrypt it when you choose to decrypt it. I don't decrypt it automatically on each read or that'd be too much overhead:
[SchemaAnnotationDb("Person", DbNames.Client)] public class Person { [PrimaryKeyDb] public int id { get; set; } [IndexDb] public string Name { get; set; } [IndexDb] public int Age { get; set; } [IndexDb] public int TestInt { get; set; } [UniqueIndexDb] public Guid guid { get; set; } = Guid.NewGuid(); [EncryptDb] public string Secret { get; set; } [NotMappedDb] public string DoNotMapTest { get; set; } }
4.) Now you can call all kinds of methods similar if not exactly like you would with LINQ. Note that based on the attributes on your model, there's a ton of smart logic that handles the table names for you and much more. Here's some examples:
Adding a single item
Guid transactionId = await manager.Add(new Person { Name = "nakedMan1", Age = 45, guid = Guid.NewGuid(), Secret = "Hello World!", DoNotMapTest = "I'm naked! But nobody can know!" });
Adding bulk items
Person[] persons = new Person[] { new Person { Name = "nakedMan2", TestInt = 3, Age = 46, guid = Guid.NewGuid(), Secret = "Hello World!", DoNotMapTest = "I'm naked! But nobody can know!" }, new Person { Name = "nakedMan3", TestInt = 3 , Age = 47, guid = Guid.NewGuid(), Secret = "Hello World!", DoNotMapTest = "I'm naked! But nobody can know!" } }; var TransactionId = await manager.AddRange(persons);
Make queries with Where
IEnumerable<Person> people = await manager.Where<Person>(x => x.Age == 46 || x.Age == 47); IEnumerable<Person> people = await manager.Where<Person>(x => x.Age >= 21 && x.Name.StartsWith("nak", StringComparison.OrdinalIgnoreCase) && x.Age < 46 || x.Age > 47 && !x.Name.StartsWith("nak", StringComparison.OrdinalIgnoreCase)); IEnumerable<Person> people = await manager.Where<Person>(x => x.Age >= 21 && x.Name.Equals("nakedman", StringComparison.OrdinalIgnoreCase)); IEnumerable<Person> people = await manager.Where<Person>(x => x.Age >= 21 && x.Name.Contains("nAkedM", StringComparison.OrdinalIgnoreCase));
The Where statements were honestly really annoying to code. I had to build a custom protocol and a lot of smart logic to properly translate the predicate dynamically to Dexie.Js. But it does actually build behind the scenes a dynamic query that's as efficient as it gets when writing your code this way. I'm sure if you wanted extreme performance you can do better writing it directly in JavaScript when working with IndexedDb, but I care more about the speed of which I'm able to code and the readability of my code.
I've added a lot more logic as well that I'm not showing here. I'm adding repository methods, better versioning for auto updating the version, and there's a lot of things I've added as well that I didn't write out here. I'm going to document everything on GitHub, so I'm not going to waste my time writing it here.
I wanted to build my own custom version for a few reasons. But majorly, I need a very custom solution. I have a very unique software in which I have very weird unique needs. Which also means I need to build really fun code haha. But this code is meant to be great with Blazor WebAssembly and I'm going to open source the code while hopefully finding others who can help me make it better.
Some ideas I have are auto syncing when online with my API. I want to implement this in a way as well that it works similarly to cache memory methods when wrapping API calls so that when a call is made (usually done on server-side web applications), if it recognizes your offline with no internet, it can properly store logic and send the requests later.
Whether you're using this for a game, business use cases, safety implementations, offline mode capabilities, I really plan to use and abuse the capabilities of Indexed Db in my Blazor WebAssembly application.
But honestly, I also built this in a way that if someone used my code, they could likely make similar LINQ like methods in JavaScript as well. But I was pretty excited about getting a good version of this to work and wanted to share. Maybe nobody cares and I'm a lonely nerd, but if someone does care, if you have any suggestions as to what I should add, what would be cool to see, or if you're just interested in contributing to the project when I open source it this weekend, let me know!
I will be posting the open source code on my github here this weekend:
https://github.com/magiccodingman
I simply haven't posted it yet because I need to remove some of my encryption keys and seperate some private company logic from my business out of the code.
Thank you to nwestfall for his BlazorDB work, which was a frok of Blazor.IndexedDB.Framework by Reshiru
https://github.com/nwestfall/BlazorDB
My project heavily worked off of the work that nwestfall created. I additionally went down the route of utilizing Dexie.js as Dexie reliably gets updates. So, what's special about what I made? First, any of the projects I found were left archived, dead, or didn't have the ability to query the way I'd want. There's a ton of ways I can make my code more efficient, but honestly it's good enough for what I need it for as my main goal was to make IndexedDb easier to use. I want to use IndexedDb just like I use my LINQ to SQL code.
Here's how it works:
1.) Setup some services in your program.cs and create as many databases as you want. Don't worry about creating the schemas as my code will auto build your store schemas. Additionally I will likely remove the EncryptionFactory service, but as I'll show later, I've added methods to encrypt your data. It's not the most secure method in the world, but it's better than native no encryption:
builder.Services.AddEncryptionFactory(); builder.Services.AddBlazorDB(options => { options.Name = DbNames.Client; options.Version = "2.4"; options.EncryptionKey = "256 bit encryption key of your choice"; options.StoreSchemas = SchemaHelper.GetAllSchemas(DbNames.Client); });
2.) Get your manager like so:
var manager = await _dbFactory.GetDbManager(DbNames.Client);
3.) Setup your model with attributes. Note that the Encrypt attribute uses your encryption key that you provide. It will encrypt any item as it goes into the IndexedDb database but you will need to make a specific call I made to decrypt it when you choose to decrypt it. I don't decrypt it automatically on each read or that'd be too much overhead:
[SchemaAnnotationDb("Person", DbNames.Client)] public class Person { [PrimaryKeyDb] public int id { get; set; } [IndexDb] public string Name { get; set; } [IndexDb] public int Age { get; set; } [IndexDb] public int TestInt { get; set; } [UniqueIndexDb] public Guid guid { get; set; } = Guid.NewGuid(); [EncryptDb] public string Secret { get; set; } [NotMappedDb] public string DoNotMapTest { get; set; } }
4.) Now you can call all kinds of methods similar if not exactly like you would with LINQ. Note that based on the attributes on your model, there's a ton of smart logic that handles the table names for you and much more. Here's some examples:
Adding a single item
Guid transactionId = await manager.Add(new Person { Name = "nakedMan1", Age = 45, guid = Guid.NewGuid(), Secret = "Hello World!", DoNotMapTest = "I'm naked! But nobody can know!" });
Adding bulk items
Person[] persons = new Person[] { new Person { Name = "nakedMan2", TestInt = 3, Age = 46, guid = Guid.NewGuid(), Secret = "Hello World!", DoNotMapTest = "I'm naked! But nobody can know!" }, new Person { Name = "nakedMan3", TestInt = 3 , Age = 47, guid = Guid.NewGuid(), Secret = "Hello World!", DoNotMapTest = "I'm naked! But nobody can know!" } }; var TransactionId = await manager.AddRange(persons);
Make queries with Where
IEnumerable<Person> people = await manager.Where<Person>(x => x.Age == 46 || x.Age == 47); IEnumerable<Person> people = await manager.Where<Person>(x => x.Age >= 21 && x.Name.StartsWith("nak", StringComparison.OrdinalIgnoreCase) && x.Age < 46 || x.Age > 47 && !x.Name.StartsWith("nak", StringComparison.OrdinalIgnoreCase)); IEnumerable<Person> people = await manager.Where<Person>(x => x.Age >= 21 && x.Name.Equals("nakedman", StringComparison.OrdinalIgnoreCase)); IEnumerable<Person> people = await manager.Where<Person>(x => x.Age >= 21 && x.Name.Contains("nAkedM", StringComparison.OrdinalIgnoreCase));
The Where statements were honestly really annoying to code. I had to build a custom protocol and a lot of smart logic to properly translate the predicate dynamically to Dexie.Js. But it does actually build behind the scenes a dynamic query that's as efficient as it gets when writing your code this way. I'm sure if you wanted extreme performance you can do better writing it directly in JavaScript when working with IndexedDb, but I care more about the speed of which I'm able to code and the readability of my code.
I've added a lot more logic as well that I'm not showing here. I'm adding repository methods, better versioning for auto updating the version, and there's a lot of things I've added as well that I didn't write out here. I'm going to document everything on GitHub, so I'm not going to waste my time writing it here.
I wanted to build my own custom version for a few reasons. But majorly, I need a very custom solution. I have a very unique software in which I have very weird unique needs. Which also means I need to build really fun code haha. But this code is meant to be great with Blazor WebAssembly and I'm going to open source the code while hopefully finding others who can help me make it better.
Some ideas I have are auto syncing when online with my API. I want to implement this in a way as well that it works similarly to cache memory methods when wrapping API calls so that when a call is made (usually done on server-side web applications), if it recognizes your offline with no internet, it can properly store logic and send the requests later.
Whether you're using this for a game, business use cases, safety implementations, offline mode capabilities, I really plan to use and abuse the capabilities of Indexed Db in my Blazor WebAssembly application.
But honestly, I also built this in a way that if someone used my code, they could likely make similar LINQ like methods in JavaScript as well. But I was pretty excited about getting a good version of this to work and wanted to share. Maybe nobody cares and I'm a lonely nerd, but if someone does care, if you have any suggestions as to what I should add, what would be cool to see, or if you're just interested in contributing to the project when I open source it this weekend, let me know!
Subscribe to:
Posts (Atom)