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

Somethings get packaged up and distributed in just the right way to go viral

There was always going to be a first DAO on the blockchain that was hacked and there will always be a first mass network of AI hacking via prompt injection. Just a natural consequence of how things are. If you have thousands of reactive programs stochastically responding to the same stream of public input stream - its going to get exploited somehow

Its crazy to me after all these years that django-like migrations aren't in every language. On the one hand they seem so straightforward and powerful, but there must be some underlying complexities of having it autogenerate migrations.

Its always a surprise when i went to Elixir or Rust and the migration story was more complicated and manual compared to just changing a model, generating a migration and committing.

In the pre-LLM world, I was writing ecto files, and it was super repetitive to define make large database strucutres compared to Django.


Going from Django to Phoenix I prefer manual migrations. Despite being a bit tedious and repetitive, by doing a "double pass" on the schema I often catch bugs, typos, missing indexes, etc. that I would have missed with Django. You waste a bit of time on the simple schemas, but you save a ton of time when you are defining more complex ones. I lost count on how many bugs were introduced because someone was careless with Django migrations, and it is also surprising that some Django devs don't know how to translate the migrations to the SQL equivalent.

At least you can opt-in to automated migrations in Elixir if you use Ash.


Django doesn't force anyone to use the automatic migrations, you can always write them manually if you want to :)

There are some subtle edge cases in the django migrations where doing all the migrations at once is not the same as doing migrations one by one. This has bitten me on multiple django projects.

Can you give an example how this would happen?

Ok, from memory --

There's a pre, do and post phase for the migrations. When you run a single migration, it's: pre, do, post. When you run 2 migrations, it's: pre [1,2], do: [1,2], post: [1,2].

So, if you have a migration that depends on a previous migration's post phase, then it will fail if it is run in a batch with the previous migration.

When I've run into this is with data migrations, or if you're adding/assigining permissions to groups.


Did you mean migration signals (pre_migrate and post_migrate)? They are only meant to run before and after the whole migration operation, regardless of how many steps are executed. They don't trigger for each individual migration operation.

The only catch is they will run multiple times, once for each app, but that can also be prevented by passing a sender (e.g. `pre_migrate.connect(pre_migrate_signal_handler, sender=self)` if you are registering them in your AppConfig.ready method).


Does that affect the autogenerated migrations at all? Teh only time I ran into that issue as if I generated a table, created a data migration and then it failed because the table was created same transaction. Never had a problem with autogenerated migrations.

What a crazy design, why don't they just do pre1 do1 post1 pre2 do2 post2?

This doesn't sound at all familiar, are you sure you're not mixing it up with something else?

There’s like an atomic flag you can pull it out of the transaction . Solves a lot of these issues.

There is no way to autogenerate migrations that work in all cases. There are lots of things out there that can generate migrations that work for most simple cases.

Django manages to autogenerate migrations that work in the VAST majority of cases.

They don't need to work in every case. For the past `~15 years 100% of the autogenerated migrations to generating tables, columns or column names I have made just work. and i have made thousands of migrations at this point.

The only thing to manually migrate are data migrations from one schema to the other.


I end up needing to write a manual migration maybe once every other year in real world use.

That's why you can do your own migrations in Django for those edge cases.

well in elixir you can have two schemas for the same table, which could represent different views, for example, an admin view and a user view. this is not (necessarily) for security but it reduces the number of columns fetched in the query to only what you need for the purpose.

Idk, that is terrible advice. I've known several people who got hired because they emailed the CEO of 5-20 person startups.

Heck my CEO asks me all the time that people are messaging him and if i think they are interesting enough to hire.


If it's 5 person company they likely don't have HR or recruiting and the CEO is likely doing the hiring (for VPs/Directors/etc). In that case of course you would communicate with them directly, they are effectively a hiring manager and don't have HR to outsource the hiring to.

If the company has a person/group dedicated to hiring then going around them is counterproductive. IMHO of course!


Agreed. I've worked in startups most of my career, I've messaged CEO's, CEO's have been messaged, never a negative experience and higher quality candidates in my opinion.

Side note: You gotta hustle people!


the hidden text about financial markets is doubly so. Hate every time i open the news and its "$COMPANY stock falls after $EVENT happens" when often the event probably had no bearing on the stock price of multi-trillion dollar companies at all. It just happened at the same time and the news networks want to construct a narrative.


It's maddening that $100k purchases get totally nerfed by bad software. Absolutely crazy to me that I can go out find a super nice car I want and have to walk away because of bad software or no carplay support.


Google docs was just down a couple weeks ago almost the whole day.


I used to find a four leaf clover at least once a week during the summer when i was in the midwest. During the peak of summer, I could find 1-3 every time I took a walk.

Since moving to california, I did find some up around the mountains of the bay area (including a 7 leaf clover), but not many elsewhere in town.

In southern california I haven't found one yet.


usually its a combination of . , not exclusively . for both the thousands seperator and the radix point.


Well, they appear to have remembered it when typing the radix point, but forgot it when it came to the thousands separator.

This might have happened to me before as well...


> They do the same thing. They're roughly the same length

But they arent the same, the backbone code has raw HTML strings. These are opaque for code editors and not type safe. React code is using typed objects to construct the html (if you used typescript like is standard in 2025 for react projects). The backbone app is disconnected in the rendering flow. the space-y-2 selector is ambiguous and causes unnecessary searching. Just in this small example adds a level of indirection that just adds noise to what the component does. With everything setting raw html, what if you wanted the requirements blob to be a seperate component for instance. this is super easy and clean in react because html and custom components are treated the same.

It also cherry picks an extremely narrow use case of a single element on the page of a password element. This hides the realities of mature apps that you then need another parent component to check if the confirm password field matches, submits the form to backend and displays errors, checks if username is taken etc. Your example doesnt show calling another component from inside a component, etc.

Your purposefully slicing it in to a narrow use case and trying to show equivalence where there isn't

This is the equivalent of those "Primitive Technologies" Youtube videos of building a swimming pool out of mud. Yeah sure technically you accomplished some definition of a "swimming pool". Yes, in some lens you can stand back and look at your pool and a inground pool with filtration, etc and say that you accomplished the same. Yes, technically you proved if you want a swimming pool you don't need a bunch of other equipment. But if you are building a swimming pool to last and be usable for the next 10 years, you will find out why modern pools are not a dug out hole filled with muddy water.


> […] the backbone code has raw HTML strings. These are opaque for code editors and not type safe.

Try using a proper IDE, then, which can handle embedded HTML just fine.


Just wait til you discover hypermedia, the actual language of the web...


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

Search: