Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Tomis02
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
Tomis02
3y ago
That's like saying long COVID is better than lung cancer.
62.
▲
by
Tomis02
3y ago
A man of culture. https://en.wikipedia.org/wiki/Linear_B
63.
▲
by
Tomis02
3y ago
> The whole point of interfaces is that you're not supposed to care how a method is implemented That's exactly how you end up with O(N^4) code. Your job is to care.
64.
▲
by
Tomis02
3y ago
> Not all req/s are made the same. > Amazon search is made of 100s of services, and Amazon's search page loads 20 products per page, that means 80k search req/s translates to 1.6 MM product API req/s for example. T
65.
▲
by
Tomis02
3y ago
> I don't think your question necessarily has an answer, And why is that? Are objects and OOP not clearly defined? If you proclaim FILE and DIR to be classes, should it not be extremely clear what are their methods? That's the
66.
▲
by
Tomis02
3y ago
> > In my concrete example, given that FILE and DIR were classified as objects, to which of the so-called objects does F(const char*, FILE, DIR) belong? > Take any language which you agree is "OO". ... A normal part of di
67.
▲
by
Tomis02
3y ago
> In the above program, why isn't `counter` an object? > C in itself has no concept of an "object". You answered your own question. Without syntax to say "this is an object", you can take literally ANYTHING Tu
68.
▲
by
Tomis02
3y ago
I suspect that, rather than give us a language to discuss these features, OO hijacked the programmer jargon with its own terminology and heavily marketed it to become the default. To the point where FILE is called an object, even though it&
69.
▲
by
Tomis02
3y ago
I'm confused by the sudden digression to Smalltalk. I was talking about C. I'll restate my point. Take the GNU C library. You don't own it, you just use it. It exposes some types (FILE, DIR), and some functions that use these
70.
▲
by
Tomis02
3y ago
> you can implement exactly that by having FILE and DIR derive from a common base class Ah, but now you're changing the problem :) we are not in C++, we do not have base classes, we are in C and have just two so-called objects. They
71.
▲
by
Tomis02
3y ago
To be honest I don't understand your comment, I think you're talking about something else, so I'll try to rephrase. My point is that C is not an OOPL. There's two aspects of OOP: 1) the concrete language features 2) a ps
72.
▲
by
Tomis02
3y ago
I agree that you can _imagine_ that FILE and DIR are objects, you can imagine they have behaviour, you can apply your OOP mental model to procedural code. But it all breaks down the moment you add a function that operates on the internals o
73.
▲
by
Tomis02
3y ago
> It isn’t a thing in a C++ But it is a thing in OOP. That's the point. C++ is multiparadigm. All the OOP gurus will tell you that objects shouldn't expose their internal data, only methods. That's why the so-called encaps
74.
▲
by
Tomis02
3y ago
As far as I can tell, the author says that "ANSI-C is a full-scale object-oriented language" in a slightly sarcastic tone, as there's nothing particular to OOP languages that you can't do in C. But I've heard many p
75.
▲
by
Tomis02
3y ago
Sorry, I'll try to elaborate. What you described can work _sometimes_. If a particular feature is isolated from everything else, and if the optimization step is a couple of tweaks that can be done later on, sure. However, the dangers o
76.
▲
by
Tomis02
3y ago
> You puke out a solution(minimum viable product), without thought about optimisation. When that exists, you change hats and optimise. So, you first implement bubble sort, and when that exists you scrap everything and implement quick sor
77.
▲
by
Tomis02
3y ago
> Code isn't worth optimizing until it either becomes a bottleneck This is a well-known fallacy. There's no guarantee your performance problems have a single bottleneck. In fact, more often than not, your entire program is poor
78.
▲
by
Tomis02
3y ago
There's using "abstraction" in the classical sense of "harder to understand", as in "abstract painting". In today's world, good abstractions are the exception. > it's merely adding a bunch of
79.
▲
by
Tomis02
3y ago
> this article sets up a strawman of people who claim performance NEVER matters That's just ONE out of the five excuses he mentioned. And just because you haven't met people who claim performance never matters doesn't mean
80.
▲
by
Tomis02
3y ago
> Don't follow the concrete practices in the best-selling book* Argument by sales number. Good start. > vetted by industry leaders for years Self-appointed industry leaders, sure. They could by no means be wrong, right? > ins
81.
▲
by
Tomis02
3y ago
> Disregarding the fact that ~85% of machine learning academics do not have what it takes to be hired by OpenAI anyway That's interesting, could you please elaborate?
82.
▲
by
Tomis02
4y ago
I'm not necessarily opposed to it, I simply answered OPs question. It's unethical because there's no consent being given. However, humans do animal research regardless because they view it as "the end justifies the means
83.
▲
by
Tomis02
4y ago
How did you get consent to put the chip in?
84.
▲
by
Tomis02
4y ago
> Linux actually does have the flavour of problem the Clean Code is modelling here, and it does indeed solve it the way Clean Code recommends Getting a bit desperate here, eh? On one hand, having tables of function pointers does not intr
85.
▲
by
Tomis02
4y ago
> You'd like to pay money to be assured that you're right? I know I'm right, I'd pay money to see the embarrassment of the presumptuous Clean Code people who think that they can write maintainable code better than tho
86.
▲
by
Tomis02
4y ago
Fun fact. Software you routinely use, like Linux and Postgres, is written in the same "spaghetti" style. I guess the Clean Code people who implement CRUD features for a living are better programmers than the ones writing operating
87.
▲
by
Tomis02
4y ago
You managed to misunderstand both Casey Muratori and Donald Knuth. You are not alone, the majority of the industry seems to have gotten it wrong. Casey tells you that following "Clean Code" can give you a huge performance hit for
88.
▲
by
Tomis02
4y ago
> And now the shape_union must be rewritten from scratch. We spend most of our time reading code. If the Casey's code snippets are easier to reason about (which they are, especially as the codebase get larger), that's a big win
89.
▲
by
Tomis02
4y ago
Correct me if I'm wrong. Even if the compiler devirtualizes the classes, you still have the memory cost of storing the vtable pointer in each of the object instances (8 bytes for each instance), which means you need to do more fetches
90.
▲
by
Tomis02
4y ago
> There are far worse crimes than having code structure that spans several files. Sure, but what's the advantage of having your code split over several files? Yes, you can jump between them with an IDE, but that's still a disru
More ›