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

I agree Agile steers a team towards hastily bodged together code.


The abstraction is the standard case and should invite custom behaviour to be added dynamically. This extra behaviour should be added by the caller / user of the abstraction.

Especially in a CRUD situation, every custom procedure will probably have a few basic steps that stay the same. All you usually need is a pre and a post hook.


See, but that's exactly what I'm saying does not work.

It's tempting to think that for e.g. a CRUD situation, pre- and post-hooks are all you need.

And it may be that way at the beginning, although hardly so, except for the simplest applications. But very soon, you start to run into things like (not an exhaustive list, but all are things I actually encountered while trying to do precisely what you're saying, many years ago):

* Transactions, when multiple things have to happen atomically. Your pre-hook must start a transaction, and your post-hook must commit it. But what if there's an error somewhere? Python and JS don't have RAII, so you need some kind of catch block to abort the transaction. Where does that happen?

* Tricky validation, e.g. needing to do queries against the data store to check the request is well-formed. So if you're using an event-based language, your pre-hook also needs to be asynchronous.

* Data transformations (what the user sends will hardly be what needs to end up in your data store), so your pre-hook needs to be able to return a new object.

* Tracing across service calls, so you need to pass some kind of request ID as well to your hooks.

* An "update" request needs to return something (e.g. an ID) to avoid another round trip. But sometimes it needs to return more stuff, so your post hook must be able to return data. Oh, but your ORM or DB usually returns the created object, so you'd like to use that instead of re-fetching in your post-hook, so now your post-hook must accept that as well.

These just keep coming up. The first three in particular are usually guaranteed to happen before the first release of the product, since requirements always change. Soon you have an unmaintainable monstrosity. A little copy-paste is tame in comparison.


Exactly right, transactions being the killer/most common one.

And the proposed solutions of hooks, AOP etc all start down the road of scattering actual logic across files and methods making the code harder to reason about which seems to be the worst part of overeager abstraction.

The library Automapper from C# is another place I run into this a lot. At its core it simply maps from domain to dto properties but you soon end up needing awful unwieldy configs and magic. I'd rather have a few hundred lines of obvious mapping than ever work with automapper again.


Some of those could perhaps be solved by an "around" hook, in addition to pre- and post-hooks, like advice[1] in Emacs. Although in OOP maybe that would be represented by a decorator class (or a subclass) that overrides the method and calls the original method?

[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Ad...


https://en.wikipedia.org/wiki/Aspect-oriented_programming

A further elaboration on that idea. I like it, but have used it in a disciplined way. There's some valid criticism of its ability to obfuscate a program. Particularly with the ability to add and remove advice dynamically, making static analysis (to determine why something happens) practically impossible.


>just happened to be the same >MUST be the same

This difference is something important to stress.


You mean "Start Menu"?


I don't think it works like that. Letters are shapes but keys just are a relative position. The software is reading gestures, specific keypress motions seems much less data to work with.


I think it’s trained.

“Imagine writing an A”

Then they look at what fires and record it.

Instead you’d ask “imagine typing an A” and then do the same thing.

Eventually when brought training happens to capture variation you start to get visual feedback and can train faster.


China has big pharma too and they pivoted from authoritarian socialism to authoritarian capitalism, they're just making money now and don't care about their poor any more.


>China has big pharma too

Why do you say this? anything I can read about ? From what I see in the news the government makes a plan for the future and executes it, it does not care about some billionaires or some company.

China does not need to create a convoluted scheme to pump money into some company, so it makes no sense. They could just give the population the miracle medicine/plant stuff and then write a contract for the big pharma for some vitamins that will be mandatory.


Their real estate market begs to differ.


Apple messed up and that makes me happy


I could really care less, but as a developer I'm not buying a laptop without Vulkan support. It's a little silly that Apple can even market it as 'Pro' without support for the graphics API that pros actually use.


cademy is not a word though. code cademy.


I always have issues spelling it


Windows 10 was supposed to be the last Windows and I'm sticking with it forever.


Hopefully you're joking. The day will come when none of your software will be updated on Windows 10, and it will become increasingly unusable. That day is still pretty far off, but it's going to come.


We're still using commercial software on W10 that was compiled for XP and shipped on CDROMS. The backwards compat on Windows is unreal and continues to be the major reason why I tend to stick my neck out for MS to the extent that I do. The OS is solid too, so hundreds of days of uptime on my desktop certainly doesn't hurt :D


If Windows continues in the direction it is headed, I will likely have given up on personal computing entirely by that point.


2025 is the cutoff year on Win 10 support.


:sadface:


I said that about XP, and then 7…


This is about how Microsoft marketed it.


One developer said it in an interview, and Microsoft never issued a correction. Microsoft never actually marketed it that way, and honestly I'm not sure why anyone even believed that developer at the time.

That being said, Windows 11 is a free upgrade. So aside from just not liking the changes (I personally like most of them) there's not much room to complain about Windows 10 not actually being the last version of Windows.


> Windows 11 is a free upgrade.

If your computer is new-ish.


Well, yeah. And I think that's ultimately why they bumped it up to 11, because they wanted to drop support for older hardware. Even if Windows 10 was going to be the "last version" of Windows, it would be insane to believe that it would continue to support all hardware forever.

That being said, the cutoff line for Windows 11 CPU support does seem to be a bit higher than necessary. But I don't know all of the reasoning behind why they chose the point that they did.


Vendor lock-in powered by SecureBoot.


And even if they did market it like that, why would anyone believe that at face value? When has that ever happened in software?

Like anything, you gotta dig a little deeper if you want know what something actually is.


it has an EOL in 2025. So no updates then anymore.


The switch to linux is much easier than expected. Try it?e.g. Regolith is great


I wouldn't outright recommend dropping Windows to switch to Regolith, but goddamn is Regolith a good OS. It really doesn't get enough love, I'm hoping that development doesn't taper off over the next few years...


True! Would be even greater with rolling released based distros... Is there smth similar based on arch or similar maybe? :D still looking for the optimal work distro


lol


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

Search: