jhg | 6 years ago | on: Show HN: A spectrogram app in less than 100 lines of HTML and JavaScript
jhg's comments
jhg | 9 years ago | on: Show HN: A list of GitHub users that have founded a company
jhg | 15 years ago | on: What's wrong with C++ (from the point of view of someone that uses it daily)
void foo(int * a) { }
void bar(int * b) { foo(b); }
void baz(const int * c) { bar(c); }
Point being is that the compiler should warn of the const violation based on whether a function argument or a class member is getting touched in the function code.In fact, the example above is more relevant, because what I am ultimately aiming for is to not need to make member functions const, and yet be able to call them for const class instances.
jhg | 15 years ago | on: What's wrong with C++ (from the point of view of someone that uses it daily)
Does anyone knows any research or even a state of affairs of const inference in language design?
The idea is similar to type inference whereby a compiler (or some other tool in a chain) would take care of understanding which arguments/variables/functions are going to be const and generate appropriate warnings based on that. For example,
void foo(int * a) { (*a)++; }
void bar(int * b) { foo(b); }
void baz(const int * c) { bar(c); }
A compiler would generate a warning when baz function, because foo() includes a non-const operation on its argument, bar() is non-const for the same reason, and so it cannot be called for a const pointer.jhg | 15 years ago | on: Google co-created video of an entire ride of the Trans-Siberian Railway
jhg | 15 years ago | on: 300 actions a minute? Truly mastering StarCraft
jhg | 15 years ago | on: Ask HN: Help me fix your backups
jhg | 15 years ago | on: Ask HN: Help me fix your backups
> Looks like you have a question or two that still needs to be filled out.
If I want to skip a question, I should be able to do so.
jhg | 15 years ago | on: Cory Doctorow vs Canadian MP on "Canadian DMCA"
What a hypocrisy.
Determining what consumers wanted was the goal of having public consultations. It worked out that consumers didn't want what the (heavily lobbied) government officials wanted, so whatever the public said was quietly ignored and they proceeded pushing for a bill that they had.
"Let the consumers decide what they want" my ass.
jhg | 16 years ago | on: 'They say Chinese is difficult - European languages are more difficult'
Just to emphasize - EIGHT PERCENT of my coworkers came from Chinese software development companies and they quite naturally brought their work ethics with them. My four years in this company is a basis for my original comment.
If it's not obvious, I am not talking about Chinese nationality, I am talking about developers with Chinese way of working in a software development environment. The way that revolves around never saying No to the boss, which in turn is deeply rooted in their cultural heritage. If the project manager says that the bug needs to be fixed today, it will be fixed today. Meaning that it will no longer be reproducible. How it will be fixed and what else is going to broken along the way is secondary. This will create another bug that can be taken care of later in the same manner.
And this was the company that developed sophisticated networking software including their own embedded OS down to the kernel level. Moreover most of these guys were perfectly capable of NOT cutting corners and doing a splendid coding job if forced. But god forbid if they would ever do it on their own accord. Everything was always done in a rush and sketchy-patchy way. I don't have any other explanation except for it to be a cultural thing.
You can certainly call it a horseshit and a casual racism if you'd like. However that's how things are in reality.
jhg | 16 years ago | on: Ask HN: Why won't start-ups hire older, experienced programmers?
jhg | 16 years ago | on: 'They say Chinese is difficult - European languages are more difficult'
Oh, don't start. "I don't know what the bug was, but I fixed it." - verbatim quote. This was a mode of operation of disturbingly large number of Chinese devs I have worked with. After several bugfixing iterations of this kind it was easier to throw the code away and redo it from scratch than to understand how that managed to work. So, yeah, "don't have to be exact" is certainly there.
jhg | 16 years ago | on: Brian Kernighan on The Elements of Programming Style[video]
jhg | 16 years ago
That's actually a good strategy. Should you ever be approached regarding a patent infringement, produce the prior art and say that you are going to challenge the patent (which is doable). I am going to guess that in many cases, especially in cases of patent trolls, they will back off as it makes more sense to keep the patent and harass other people than risk loosing the patent altogether.
jhg | 16 years ago
The attorney fees are in the range of few thousand dollars.
HOWEVER - if you proceed as is and if it can be proven in court that you knew about the patent, you are effectively committing a "willful patent infringement". In many jurisdictions this automatically triple damages should you be sued for the infringement. Be very, very careful with it.
jhg | 16 years ago | on: Dereferencing a NULL pointer always segfaults, right? Not if you're clever...
How many C programmers are out there that do not know how VM works?
jhg | 16 years ago | on: Ask HN: How do you solve hard problems if you can't make incremental progress?
jhg | 16 years ago | on: A challenge, identify this HN user, I tried twice and failed
jhg | 16 years ago | on: How I Stopped over 1000 Spam Emails/Day from Reaching Me in 5 Minutes
jhg | 16 years ago | on: Will single founders please stand up?