Hacker Newsnew | past | comments | ask | show | jobs | submit | andrewstuart's commentslogin

Bearer of bad tidings bears bad tidings.

Handwritten software interesting concept!

There should be a term like “artisan software”.


The author speculates about ways to deal with an overloaded queue.

Kingmans Formula says that as you approach 100% utilization, waiting times explode.

The correct way to deal with this is bounded queue lengths and back pressure. I.e don’t deal with an overloaded queue, don’t allow an overloaded queue.


Which is easy to say. I've been trying to debug an overloaded queue for over a week now. (it used to work until I discovered there were some serious race conditions resulting in 1 in a million problems crashes, and every fix for them so far has not fixed things. (at least I can detect it and I'm allowed to toss things from the queue - but the fact is we were handling this before I put the fixes in and people don't like it when I now reject thing from the queue so they want the performance back without the races)

I feel you may be adding your critical sections at too high of a layer (either in the code, or the data structure) if it is severely affecting performance. Look up sharded locks, and totally order them if you must acquire 2 or more at once.

You may also want to implement reader/writer locks if your load has many more reads than writes.

Unfortunately, nobody really teaches you these things in a really clear way, and plenty of engineers don't fully understand it either.


I didn't give near enough details for you to speculate like that. what you said applies to some very different queues but not mine. (What I have is currenly lock free, though this is my third redesign with different locking strategies for each.)

Is your queue bounded?

Does it reject entries when service times are too high?

Your debugging effort may become more predictable when the system measures the time workers take to complete.

I note you say it used to work overloaded. I would argue it probably was having hidden problems. Perhaps ask those people what the acceptable service time is and lock it in by refusing new entries when it is exceeded.

If they want both infinite queue length and consistently acceptable service times then you must add enough work resource to do that.


Queue is and was bounded, if it gets too large we already logged an error and stopped processing. it is currenty lock free, but the old version had locks (i've tried several versions with and without locks). the bounds didn't change but before it was processing in time even under heavy load, now it isn't.

>> I recently told all my engineers to delete their IDEs. PyCharm, VS Code, Cursor. All of them.

I’m all in on AI assisted development but this is ridiculous.

There’s so many self evident reasons to need an IDE as a developer.

Presumably the unidentified author is selling something that benefits from such a stance.


Yes. And then after you throw all your tools away you should buy my software.

I’d resign on the spot if my team lead told me to delete all IDEs and that coding is solved.

Nah, quiet quit. Orchestrate the agents to the degree necessary to keep your job, and no more. Use the free time to read a book.

If all coding is solved, what do they need you for? You'd be laid off before you could quit if that was the case.

Exactly, if coding is solved, why do they have a team? I'm sure doing all their engineering through an openclaw instance is totally a good idea, right?

Exactly, our gen's gold rush.

Seatbelts, speed limits, laws against property and personal crime, workplace safety regulations,

All government overreach, eh?


Admittedly, I'm not arguing it any one way or another. I'm just presenting what I think is perhaps an interesting argument that highlights how the whole concept is somewhat arbitrary and ambiguous, resting more on ones personal moral positions towards a thing in particular than any real underlying logical justification shared across similar concepts.

It's not interesting at all, you're just choosing to ignore externalities.

Any complex system - and these cloud systems must be immensely complex - accumulate cruft and bloat and bugs until the entire thing starts to look like an old hotel that hasn’t been renovated in 30 years.

It’s not inevitable. Absolutely this is true without significant effort, but if you’ve been around the traps for long enough (in enough organisations), you get to see that the level of quality can vary widely. Avoiding the mud-pit does require a whole org commitment, starting from senior leadership.

This story is more interesting, in my opinion, in how quickly things devolved and also how unwilling the more senior layers of the org were to address it. At a whole company level, the rot really sets in when you start to lose the key people that built and know the system. That seems to be what’s happening here, and it does not bode well for MS in the medium term.


Disturbing.

I did not know SQLite allows writing data that does not match the column type. Yuck. Now I need to review anything I built and fix it.

I understand why they wouldn’t, but STRICT should be the default.


> STRICT should be the default.

Somewhat ironically[^1], if STRICT were suddenly made the default, countless applications which work today would fail to work right after that update. SQLite is on billions upon billions of devices, frequently with many installations on any given device, and even a 0.001% regression rate adds up to many, many clients.

One of the reasons people trust SQLite is because, as a project policy, it does not pull the rug out from under them by changing long-held defaults.

[^1]: it's ironic because proponents of Strict tables frequently say that it improves app stability and robustness, whereas activation of Strict tables in apps not designed to handle it will, in fact, make them more fragile. Spoiler alert: most SQLite apps are not designed for Strict tables.


STRICT has severe limitations, for example it does not have date data type.

Why is it a problem that it allows data that does not match the column type? SQLite is intended for embedded databases, where only your application reads and writes from the tables. In this scenario, as long as you write data that matches the column's data type, data in the table does match the column type.


>> Why is it a problem that it allows data that does not match the column type?

“Developers should program it right” is less effective than a system that ensures it must be done right.

Read the comments in this thread for examples of subtle bugs described by developers.


> “Developers should program it right” is less effective than a system that ensures it must be done right.

You're right, of course. But this must be balanced with the fact that applications evolve, and often need to change the type of data they store. How would you manage that if this is an iOS app? If SQLite didn't allow you to store a different type of value than the column type, you would have to create a new table and migrate data to a new table. Or create a new column and abandon the old column. Your app updates will appear to not be smooth to users. So it is a tradeoff. The choice SQLite made is pragmatic, even if it makes some of us that are used to the guarantees offered by traditional RDBMSs queasy.


> Why is it a problem that it allows data that does not match the column type? SQLite is intended for embedded databases

I'm afraid people forget that SQLite is (or was?) designed to be a superior `open()` replacement.

It's great that modern SQLite has all these nice features, but if Dr. Hipp was reading this thread, I would assume he would be having very mixed feelings about the ways people mention using SQLite here.


No, I think that people can use SQLite anyway they want. I'm glad people find it useful.

I do remain perplexed, though, about how people continue to think that rigid typing helps reliability in a scripting language (like SQL or JSON) where all values are subclasses of a single superclass. I have never seen that in my own practice. I don't know of any objective research that supports the idea that rigid typing is helpful in that context. Maybe I missed something...


> where all values are subclasses of a single superclass

I don't understand this. By values do you mean a row (in database terms)? I don't understand what that has to do with rigid typing.

Lack of rigid typing has two issues, in my opinion: First, when two or more applications have to read data from a single database, lack of an agreed-upon-and-enforced schema is a limitation. Second, when you use generic tools to process data, the tools have no idea what type of data to expect in a column, if they can't rely on the table schema.


First off, I am so glad the famous "HN conjure" actually worked! My "if Dr. Hipp was reading this thread" was tongue in cheek because on HN it was extremely likely that's precisely what would happen. Thank you for chiming in, Dr. Hipp - this is why I love HN!

So, in case you missed it, you're responding to Dr. Hipp himself :)

> I don't understand what that has to do with rigid typing.

Now I would like to learn a bit from Dr. Hipp himself, so here's my take on it:

Scripting languages (like my fav, Python) have duck or dynamic typing (a variation of what I believe Dr. Hipp, you specifically call manifest typing). Dr. Hipp's take is that the datatype of a value is associated with the value itself, not with the container that holds it (the "column"). (I must say I chose the word "container" here to jive with Dr. Hipp's manifest. Curious whether he chose that word for typing for the same reason! )

- In Python, everything is fundamentally a `PyObject`.

- In SQLite, every piece of data is (or was?) stored internally as a `sqlite3_value` struct.

As a result, a stack that uses Python and SQLite is extremely dynamic and if implemented correctly, is agnostic of a strict type - it doesn't actually care. The only time it blows up is if the consumer has a bug and fails to account for it.

Hence, because this possibility exists, and that no objective research has proven strict typing improves reliability in scripting environments, it's entirely possible our love for strict types is just mental gymnastics that could also have been addressed, equally well, without strict typing.

I can reattempt the "HN conjure" on Wes McKinney and see if this was a similar reason he had to compromise on dynamic typing (NumPy enforces static typing) to Pandas 1.x df because, as both of them are likely to say, real datasets of significant size rarely have all "valid" data. This allows Pandas to handle invalid and missing fields precisely because of this design (even if it affects performance)

A good dynamic design should work with both ("valid" and "invalid") present. For example: layer additional "views" on top of the "real life" database that enforce your business rules while you still get to keep all the real world, messy data.

OTOH, if you dont like that design but must absolutely need strict types, use Rust/C++/PostgreSQL/Arrow, etc. They are built from the ground up on strict types.

With this in mind, if you still want to delve into the "Lack of rigid typing has two issues" portion, I am very happy to engage (and hope Dr. Hipp addresses it so I learn and improve!)

The real world is noisy, has surprises in store for us and as much as engineers like us would like to say we understand it, we don't! So instead of being so cocksure about things, we should instead be humble, acknowledge our ignorance and build resilient, well engineered software.

Again, Dr. Hipp, Thank you for chiming in and I would be much obliged to learn more from you.


Thank you for the great explanation. But SQL isn't as dynamically typed as you suggest. If a column is defined as DECIMAL(8, 2), it would be surprising for some values in that column to be strings. RDBMSs are expected to provide data integrity guarantees, and one of those guarantees is that only values matching the declared column type can be stored.

Relaxing that guarantee has benefits. For example, it can make application evolution easier--being able to store strings in a column originally intended for numbers is convenient. But that convenience can become a liability when multiple applications read from and write to the same database. In those cases, you want applications to adhere to a shared schema contract, and the RDBMS is typically expected to enforce that contract.

It also creates problems for generic tools such as reporting systems, which rely on stable data types--for example, to determine whether a column can be aggregated or how it should be formatted for display.


>> but if Dr. Hipp was reading this thread

He is.


If you reached out and notified him, Thank you. I hope he has time to revisit - had a few more followups. Cheers!

No I did not I think he’s been a regular community member a long time he probably just saw it on front page.

> I understand why they wouldn’t, but STRICT should be the default.

No wait, what do you mean?

As I mentioned at https://news.ycombinator.com/item?id=47619982 - your application layer should be validating the data on its way in and out. I mention the two reasons I use for DB fall back


Checking the datatype is not the same as validating. There is lots of data out there that is invalid, and yet still has the correct type. In fact, that is the common case.

I dare say you will be hard pressed to find a dataset of significant size that doesn't have at least one invalid entry somewhere. Increasingly strict type rules will not fix that.


Dr. Hipp,

> I dare say you will be hard pressed to find a dataset of significant size that doesn't have at least one invalid entry somewhere

I agree. In my experience, and you've forgotten more than I have learned, the mark of a good data engineer is how they account for invalid entries or whether they get `/dev/null`ed.

> Checking the datatype is not the same as validating. There is lots of data out there that is invalid, and yet still has the correct type. In fact, that is the common case. Increasingly strict type rules will not fix that.

I am having a hard time letting go of this opportunity to learn from you, so in case you have time and read this again - When you say "There is lots of data out there that is invalid, and yet still has the correct type", I read "type" as "shape" or "memory layout" and "invalid" as "semantically wrong".

So, is a good example of this a value of `-1` for a person's age? The database sees a perfectly valid integer (the correct shape), but the business logic knows a person cannot be negative one years old (semantically invalid).

In that case, to be explicit, `0` or `14` is a "valid type" for an age (usually integer), but completely invalid data if it's sitting in an invoicing application for an adult-only business?

Again, thank you for your time and attention, these interactions are very valuable.

PS: I'm reminded of a friend complaining that their perfectly valid email would keep getting rejected by a certain bank. It was likely a regex they were using to validate email was incomplete and would refuse their perfectly valid email address


What is Xbox 360 recompilation?

You take an Xbox game designed to run on an Xbox 360, a 64 bit PowerPC system and decompile its binaries back into source code. You now have the ability to modify the game as well as port it to other systems and architectures such as Windows on X86_64 or Linux on ARM64.

It's more nuanced than that; the approach you're describing is usually called "decompilation."

The difference is how far one goes in hoisting the "source code;" in this "recompliation" approach the source code, while C++, is basically an IR (intermediate representation) between the original game's assembly and a host platform, and the hardware itself is emulated (for example, the original architecture's CPU registers are represented as variables in the host architecture's memory). The machine code is translated to C++ using a custom tool.

In a "decompilation" approach the game logic is converted (using a decompiler, like IDA or Ghidra's) back into something which resembles the original source code to the game itself, and the source code is usually hand analyzed, marked up, rewritten, and then ported across platforms. The product is something that attempts to resemble the original game's source code.

Of course, they lie on a continuum and both approaches can be mixed, but, while they both involve C++ in the middle, the process is starkly different. Recompilation is much more copyright-friendly, because in many implementations only the modifications are distributed and the original binary is translated by the end user (who owns the software/a license to it), whereas decompilation produces an artifact (source code) which is a derivative work encumbered by the original software's license and generally should not be distributed.


> In a "decompilation" approach the game logic is converted (using a decompiler, like IDA or Ghidra's) back into something which resembles the original source code to the game itself, and the source code is usually hand analyzed, marked up, rewritten, and then ported across platforms

There definitely is a lot of scope to apply LLMs here


no one

absolutely no one

not a single soul on this Earth

LLM nut: OMG LLM!!!!!!!

Can’t you just drop it, please?


Seeing this [1], I thought it was something related to taking assembly instructions in the original code, emitting C statements that match the instruction, and then compiling that C code.

[1] https://github.com/N64Recomp/N64Recomp


Your idea is much more accurate; see my sibling comment. It's basically using C or C++ as an intermediate representation for machine code, rather than trying to recreate the game's higher-order logic/structure or source code.

Ah, you are right. I haven't looked at the details of the recomp efforts.

You take a binary that's intended to run on the Xbox 360, and emit a new binary that runs on a modern x86 computer.

The future of ChatGPT maybe well be as a Microsoft product.

Is there some sort of hybrid flying/stationary drone that flys in an sits to hold a ground position?

Common tactic is for drones to wait next to a road and ambush.

Ammunition is heavy.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: