Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
perdunov
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
perdunov
12y ago
The difference is that the code may try to execute x = "Hello", and then call free(y) (in case the condition is messed up). So the code will try to free() the pointer to a string literal (because they share the same memory locatio
62.
▲
by
perdunov
12y ago
union { char* x; char* y; }; ... if (/*smth*/) { x = "Hello"; } else { y = strdup("Hello"); } ... if (/*smth*/) { free(y); } It is possible to screw up
63.
▲
by
perdunov
12y ago
Why is he "lead" then, if he's not special?
64.
▲
by
perdunov
12y ago
That's a questionable matter. In every project, there is a little interesting stuff, and the rest is just chores. Even if you're doing your own project, there will be a bunch of boring unpleasant work.
65.
▲
by
perdunov
12y ago
How is it possible to be bored in software development - an area that is a fractal of unsolved problems? The only normal state of a software developer is "too many things to do", otherwise it is a burn out, or a pathological lack
66.
▲
by
perdunov
12y ago
I get your point, but how to tell "labelling" from typing? Typing depends on semantics. This particular example only works out because the types are all strings, which is a case of sort of loose typing often used in programming. I
67.
▲
by
perdunov
12y ago
If one uses the entity* notation, they must always declare each variable with a separate declaration, that is: thing_t* ptr1; thing_t* ptr2; not thing_t* ptr1, ptr2 /* <= oops */;
68.
▲
by
perdunov
12y ago
Say, somebody allocated one of the strings with malloc or strdup and put a free(), but mixed up when to call free() and when not.
69.
▲
by
perdunov
12y ago
char* points to some mutable buffer of char's that is supposed to be allocated somewhere. In this particular case they are assigned string literals, but in general it would be quite easy for someone to break consistency of allocations&
70.
▲
by
perdunov
12y ago
There are three data structures unsystematically blended into one (that is, one cannot unambiguously tell which fields go into which "virtual" type, and cannot formally check the correctness). The name thing_t is indicative that y
71.
▲
by
perdunov
12y ago
Great idea, but oops... the data structure thing_t is hideous. It is a "god object" for anything where differently purposed members are union'd. Also, putting char*'s into a union is a terrible idea.
72.
▲
by
perdunov
12y ago
Sure, I agree about reduction to known problems, but still, understanding algorithms completely is more powerful than manipulating them as "black boxes", as the former allows to build upon ideas of algorithms and produce variation
73.
▲
by
perdunov
12y ago
I think this is actually not a problem of overusing algorithms, but a problem of correctly separating the job titles related to software development. There are software developers whose work actually requires no knowledge of algorithms, mat
74.
▲
by
perdunov
12y ago
If you don't have a library of algorithms and methods memorized , you won't be as productive in solving real-world problems as the one who does. Often the difference can be dramatic. Many good algorithms are quite counter-intuiti
75.
▲
by
perdunov
12y ago
I do? I was saying that being ignorant in CS may lead to lame mistakes, and I have seen many web developers who appeared ignorant in CS, and there has been a case of some central web framework with an O(n^2) queue.
76.
▲
by
perdunov
12y ago
Mistakes come for different reasons: the human brain's limitations; carelessness; bad methodologies; ignorance. I was talking about the last one here. "PS Rubygems isn't a web framework, it's a package management tool, s
77.
▲
by
perdunov
12y ago
My empathy is blocked by disgust towards most people, although I am very empathetic. I am not sure what it is that slight or strong disgust I feel towards almost all people. Maybe it is a psychiatric condition.
78.
▲
by
perdunov
12y ago
I completely agree that software development is such a vast field that it is completely impossible to be proficient in everything. I am kind of a lamer in web development, for example. But fundamental CS is a different thing. "Annnnddd
79.
▲
by
perdunov
12y ago
Really. Every time I whine publicly how web programming people aren't familiar with even basic CS, I get a slap. But really, I should move to web programming. I'll be an expert computer scientist there, probably.
80.
▲
by
perdunov
12y ago
How long has this idea of making a 3D engine from conv nets been researched?
81.
▲
by
perdunov
12y ago
Acquiring GitHub would seem like a pretty natural move by Google, wouldn't it?
82.
▲
by
perdunov
12y ago
I'd better put my code on GitHub and double-license it with GPL and a commercial license. That way I would probably earn more bucks and keep my intellectual property. Another point is that it seems that the concept was devised by someb
83.
▲
by
perdunov
12y ago
You're right that writing singletons needs expertise because there are a number of (possibly unsolvable) gotchas that you need to know about to even start using singletons. Take the self-referencing problem: let's say we have a lo
84.
▲
by
perdunov
12y ago
I have concluded that singletons should not be used ever for anything. Because practically always there appears a situation when a singleton has to be used as a doubleton or multipleton, and doing such refactoring is a mess. I am not even
85.
▲
by
perdunov
12y ago
This is super-cool. I am trying to start learning Chinese on Coursera https://www.coursera.org/learn/learn-chinese Learning a language that is based on different principles is an enormous brain exercise. Also, remember
86.
▲
by
perdunov
12y ago
Not really efficient. The junctions have way too many vertices and that should be way slower than the simple textured pattern approach. Also, for AA you would need subsampling that is times slower than the methods that allow to draw AA line
87.
▲
by
perdunov
12y ago
I think another reason is that for the competition-kind code there is very little difference between languages, so the drawbacks of C++ just don't matter. For example, the lack of garbage collection is not a problem, as the program wor
88.
▲
by
perdunov
12y ago
Are there decent people in this world at all?
89.
▲
by
perdunov
12y ago
I guess I will never make something popular because I am apparently on the different side than all those people who are happy eating shit (playing games that try to rip them off).
90.
▲
by
perdunov
12y ago
Okay, let's suppose a software engineer cannot implement the BM off the top of their head. What would you make of that? How relevant is this kind of testing to the actual work of a software engineer?
More ›