Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions

Submissions

comment 3y ago · link · parent

The conversation hasn't turned. We are still waiting on examples of ORM toolkits that don't provide separation between the ORM and the query building operations. I suspect ad hominem entered the chat because one couldn't be found, but I'll continue to wait as I love to learn new things.

comment 3y ago · link · parent

I suppose the difference is that they can afford to be. If any of the rest of us stopped liking our car on an arbitrary whim, we'd have to suck it up and drive it anyway.

comment 3y ago · link · parent

Funny that I am the one being called pedantic, despite flat out acknowledging that I am using the term informally. Yes, again, technically a SQL relation isn't actually a relation. I get it. But we all know what relation means with respect to the conversation, so what is to be gained by ignoring that context?

Formal definition matters only if you haven't reached a shared understanding. Before definitions entered the discussion we started at that end, but all the information necessary to understand what relation means in SQL-speak, particularly with respect to ORM, has been given. There is no value in hanging off any other definition and doing so is merely a straw man.

Whatever you want to call it, the abstraction that converts between the database's data model and the application's data model is not the same abstraction that builds queries. They are very much distinct operations and ORM is only concerned with one of them (hint: Not the one that builds queries).

comment 3y ago · link · parent

> This is what a relation is: https://www.techopedia.com/definition/21677/relation

"Relation is sometimes used to refer to a table in a relational database" – True, but a relation is any set of tuples. Joining multiple tables together also produces a relation. It's not just tables. It's the more abstract concept of rows and columns, basically.

But, as noted earlier, SQL actually deviates from the relational model here. It doesn't actually operate on sets. This is where you find a lot of the gotchas it is famous for. Something like QUEL, which Postgres used instead of SQL for the first 10 years of its life, is closer to Codd's original model. It actually has relations.

I expect that deviation is why we're having trouble communicating here. As SQL isn't actually relational, calling them relations is technically a misnomer. While I appreciate the purity bent you say you're off on, I have indicated multiple times that I use relation with acknowledgement of SQL's deviation from the term in its purest sense. Yes, again, SQL relations aren't truly relations, but for the sake of ORM they serve the same purpose.

> Most ORMs intrinsically tie "query building" and the orm together without even referencing the term query builder.

Such as? All of the ORMs with query builders I'm familiar with are like "You an use our query DSL and you can even write raw SQL!". They present a clear separation between the ORM and the query building phases. If they were tightly coupled in those toolkits, they wouldn't be able to enable you to use raw SQL queries.

comment 3y ago · link · parent

Looking over the Python spec again, I can maybe see how you might consider it object oriented. In my experience using Python in practice, I am not sure it is commonly used as an object oriented language, though. Not like the other three languages are. I expect this is more like saying Go is a functional language[1] because it has some functional-inspired features.

C# didn't yield the same results. As you suggest, it even changed its name away from containing 'Object Oriented' during the project scope evolution to not confuse people about what it is. I can't find any primitives that would even allow you to write object oriented-style code.

That said, I won't completely dismiss C# as being object oriented as it is the language I have the least familiarity with and very well could have overlooked the obvious. As before, I ask where the orienting comes into play. What language features at least come close the oriented paradigm?

[1] And, indeed, many do call Go a functional programming language. They're not strictly wrong, but it can make communication hard when you're loose like that. In these sorts of discussions you do have to be a little more precise, otherwise you'll end up talking past each other.

comment 3y ago · link · parent

> They were the dominant paradigm for a long time. You haven't been around long enough.

I've only been programming for about 30 years, so yes still quite young, but during that time the C++/Java style object model has been king, and while it is based on objects, they are definitely not oriented. For orientation you need, at very least, message passing.

When was oriented programming popular and not just a cool novelty that rises up from time to time?

> Doesn't seem like a relation. Seems like you're referring to a single table with no relationship to other tables specified.

A table is represented by a relation[1], yes. A relation isn't a join. A relation is a set of tuples, by literal definition.

Does your confusion here stem from not being familiar with the relational model?

> String manipulation is what an orm does for you.

What string manipulation is required in the ORM phase? You must be thinking of query building, but that's a completely different level of abstraction. Many ORM toolkits also bundle query builders, but you could create an ORM toolkit that expects one to write SQL by hand. They are not intrinsically linked. In fact, most ORM toolkits, even those which come with query builders, do allow you to write SQL by hand if you prefer.

[1] Ignoring the peculiarities of SQL which deviate from the mathematically pure model.

comment 3y ago · link · parent

I expect Java was once confused as being object oriented because James Gosling came from a Smalltalk background and Patrick Naughton from an Objective-C background and as a result Java takes a lot of inspiration from those two languages. But it misses the part that provides orientation. Java's object model is much closer to C++'s in that regard, and C++ definitely isn't object oriented. The coiner of the term even once literally said so.

Not sure why you think C# and Python are object oriented? They have what could be considered objects, but where does the orienting come into play?

comment 3y ago · link · parent

> It's a leftover philosophy from a time when everyone thought object oriented programming was the only way to go.

I'm not sure object oriented programming ever really caught on. The only object oriented languages that ever gained any claim to fame are Smalltalk, Objective-C, and Ruby. And none of them really gained what I would consider mass appeal, let alone thinking that they were the "only way to go".

> SQL is already a high level abstraction.

SQL is a high level query abstraction, but we're talking about the data model. Again, a relation is nothing more than a set of tuples[1]. That is a very primitive data abstraction.

Using Javascript notation, consider the relation: [["John",32], ["Jane",23]]. Now consider a function that takes that input and outputs: [{name:"John", age:32}, {name:"Jane", age: 23}]. That's ORM. That's all ORM is. You see no value in those higher level structures?

> The models already exist in the database. Why build a repetitive model in the application language?

Primarily because your data store is an implementation detail of your repository layer that shouldn't leak into the rest of the application. Even if your application's domain model can be ideally represented as relations, you still will want a conversion step to not bind that data model to the database's model. Schema changes to the database shouldn't break the users of your code.

> It's a cosmetic thing because people don't want to deal with string manipulation.

String manipulation? Are you encoding your application's state into something like JSON at every turn, or where do strings come into play? Don't do that. Even if you do need to share your application's state (e.g. to share over the network) in a stringly fashion, use another conversion pass to convert your internal representation to the sharable format. Your central domain model should be optimized for the machine's local memory.

[1] If we are being pedantic, SQL actually deviates from the relational model by not staying completely true to sets. But the terminology has stuck regardless.

comment 3y ago · link · parent

The role of ORM is to convert relations (sets of tuples) into the object structures our applications usually model data as. Unless your entire application is modelled as relations, there is no avoiding this transformation step, be it whether you use a toolkit to help you or slog it by hand.

SQL doesn't help you here. SQL is just a query language that is designed around the relational model (more or less). The same relational model that your application isn't (likely) designed around. Thus, again, you need object relation mapping to provide the conversion between SQL's model and your application's model.

Some ORM toolkits also bundle query builders. The query builder may be what you find unnecessary, but I'm not sure the existence of query builders is crazy. These query builders essentially become another programming language that compiles to SQL. The idea of a programming language compiling to another programming language isn't crazy at all. We do it all the time with great success.

Although there is debate as to whether or not it is due to SQL/RDBMSes not being purely relational or if it is more fundamental, what is agreed upon is that there is an object relation impedance mismatch. This makes it a hard problem to solve and many ORM toolkits only provide half solutions, and this is where a lot of friction comes into play.

comment 3y ago · link · parent

> Saying those skills are exclusive to followers of the agile manifesto is silly.

What says that? The Manifesto is there to help guide you if your group chooses to forego managers, but it doesn't suggest not having managers is the right tool for the job. An engineer more than anyone should understand the concept of tradeoffs.

comment 3y ago · link · parent

Now read it again as the entire document that it is. While I can see where you are coming from, your theme doesn't carry into the points you conveniently left out.

Once you put it together, you'll realize that the message is:

1. Deliver software. You won't have a manager hounding you to do so.

2. Do good work. You won't have a manager questioning what you've done.

3. Don't spend more time programming than you need to. You need time for managerial tasks.

4. Meet with your teammates. You won't have a manager to act as the go-between.

comment 3y ago · link · parent

> But above all, make sure not to confuse a "pirated copy" with a "lost sale".

The one time I had software cracked and pirated sales pretty much dried up immediately upon its release.

This is probably true if your audience is primarily people who aren't particularly technically minded, but my product was no doubt most appealing to the same kind of people who know how to pirate software.

comment 3y ago · link · parent

> Waterfall vs agile is not really about how much effort you put into design, it’s about how long the plan-code-reassess cycle is.

Read the Manifesto again. You will notice that is actually about the considerations you should take into account if you want to run a software team without managers. Each point is there to ensure that the necessary functions a manager would traditionally take care of still get done.

Waterfall never existed as some kind of formal process. It was invented as an illustrative device.

comment 3y ago · link · parent

Just as Facebook uses MyRocksDB (a KV store) underneath MySQL. There is a definite turtles all the way down.

But where do you draw the line? Is your Ruby on Rails CRUD app that exchanges JSON documents a document database? Fundamentally, what's the difference between said Rails app and TAO, aside from one being centred around documents and the other graphs?

Surely "base" is meant to be more specific?

comment 3y ago · link · parent

> It’s just that I think there is such a thing as artificial intelligence

Perhaps you are actually thinking of what is more commonly known as AGI (artificial general intelligence)? None of these machines of which we have spoken of are AGIs. That I can agree with.

comment 3y ago · link · parent

> he usefulness of people telling what they will be doing or what problems they are facing at the moment is that they might not know there is somebody else in the team that can help them solve this problem very quickly.

I have worked on teams of chickens running around with their heads cut off before. While that is one way to try and rein them in, would you not be better served by moving away from making and instead towards engineering?

> I also like to think it puts a little bit of pressure on people to get something done so they can show some progress on the next standup.

From experience, initially it does. But soon you realize that when you're racing the clock you end up taking shortcuts (introducing bugs, making poor design decisions, not properly documenting your work, etc.) that will harm you and your team later.

Appearances aren't worth sacrificing the company over. It is far better to be seen as a poor employee than to be seen as the superhero of a failed business.

comment 3y ago · link · parent

> you’d say a can opener is artificial intelligence compared to a pocket knife?

No. In that case the intelligence is applied by the user. A can opener could be a component in a larger AI system. An AI needs to be aware (in the artificial sense) of its surroundings.

Edit: I forgot that AI can openers do exist. The can opener I own is of the dumb machine kind and I hadn't fully considered what else might use that term. Yes, those are an AI.

> That’s not the way anyone uses the term.

Except when they do. Indeed, the "an AI is anything we haven't figured out yet" definition is about as common, but doesn't seem to be the definition that fits the topic at hand.

A third definition where AI is defined as an ANN seems to be emerging in popular culture, but again that doesn't really fit the topic at hand as a lot of the job-replacing intelligences are not based on ANNs.

comment 3y ago · link · parent

That's exactly what artificial intelligence means...

There is a secondary definition of AI that says basically an AI is anything that we haven't yet figured out how to do. Once we figure out how to do it, it ceases to be AI.

Indeed, terms can and do have multiple meanings, but I'm not sure that secondary definition fits the topic of discussion.

comment 3y ago · link · parent

Certainly not. Indeed, all AIs are machines, but not all machines are AI. The kitchen faucet that preceeded the dish washer as the primary tool used to wash dishes is a machine, but has no intelligence. The dish washer expanded upon the concept of the kitchen faucet by adding artificial intelligence to it.

comment 3y ago · link · parent

I always found it funny that where I worked we were doing Agile (without knowing it by that name) until the "Agile" Kool-aid was drank, at which time processes started to trump people.

comment 3y ago · link · parent

ChatGPT seems a little too clever to stick to that script, though. Soon it will learn to answer like the rest of us do:

1. What we discussed I was going to work on yesterday.

2. Continue to do my job.

3. Of course not. If I did, I would have made it known long before this.

comment 3y ago · link · parent

Yet when AI learned to wash dishes in the home (among other tasks), freeing up a homemaker's time to join the workforce, it seems the labor market absorbed the influx in people largely by creating bullshit jobs.

comment 3y ago · link · parent

No doubt, but the core product known for being graph-y is based on MySQL.

Indeed, there is a graph data store (TAO) built on top of that base, but as we're talking about databases...

comment 3y ago · link · parent

> In a word: Facebook.

Which, funnily enough, uses a relational database.

comment 3y ago · link · parent

And I don't mind them as it is an officially blessed "we don't need you to work right now" period, giving me some time to work on personal projects while others drone on about nothing.

Which, indeed, is another reason why bosses love them. With less time working, more workers are needed to get an equivalent amount of work done, increasing the headcount under their watch. As a boss' worth is measured by how many people he leads, it is in his best interest to waste as much time as he can without losing his own job.

comment 3y ago · link · parent

> most corporate document management systems are really better/easier for written word.

I recently moved to a new team that has been using Notion. I can't find any meaningful difference between it and GitHub (which, just like Notion, also uses Markdown as the way to communicate the written word), aside from GitHub making it easier to include non-written word content alongside the written word.

Maybe git in the raw is a little too raw, but what's the appeal over git + something like GitHub that includes all of the higher level features?

comment 3y ago · link · parent

> But GitHub (and most other engineering tracking tools) are meant for relatively clearly defined tasks

I am not sure that's true. They are meant to avoid the need for status meetings by providing more realtime feedback of what is and isn't happening to other people who benefit from knowing where things are at. As long as all interested parties understand the overall intent of the ticket, to know what it being closed means, it doesn't have to be well defined.

If what you want to accomplish is so abstract that you can't even reach a shared understanding with others, they won't need to keep track of your status in the first place (what would they be keeping track of?), so that case is moot.

comment 3y ago · link · parent

What kind of useful team conversation is taking place in under five minutes?

comment 3y ago · link · parent

A lot can change in 60 days.
1
123124125
256