9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions
comment 9y ago · link · parent
However, perhaps that wasn't their focus. My impression is the Q&A site was supposed to be mostly a gateway to their other services, and for that to work, the Q&A part simply had to be "good enough". It's an interesting strategy that perhaps didn't work out quite the way they had hoped it would.
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
In reality, human beings rarely implement a strategy that's game theoretically optimal, but algorithms might.
comment 9y ago · link · parent
.exe files created this way wouldn't launch, but a .com created this way would instantly reboot the computer. Even more weirdly, this only worked for the specific command that happened to enter in my first attempt -- it might have been something like "cd games". If I changed anything at all, it no longer worked. Only years later I realized that the characters I typed were directly executed as machine code, and that I must have stumbled upon a set of instructions that caused a CPU exception!
For several years, this weird file was the only way I knew to programmatically reboot a computer, so I renamed it "reset.com" and kept it around. I think it stopped working only in the Windows XP era when DOS programs were finally sandboxed to some extent.
comment 9y ago · link · parent
The author acknowledges that this can happen:
> So, you’re now out of address space. There are two ways you could try to address this.
> a) Think carefully about your data representation and encode it in a more compact fashion
> b) Allow the program to just use more memory
> I’m the performance guy so of course I’m going to recommend that first option.
As a "performance guy", he should know that using a bit more RAM is essentially free, and much, much easier to code than doing the kind of bit-fiddling wizardry he suggests ("encode it in a more compact fashion"). In practice, that kind of low-level code will not get written anyway, at least not by modern Microsoft, and much less so by most extension authors. Which means that there's an arbitrary and very hard limit on how much you can customize/extend Visual Studio before you hit that 3 GB wall. And again, this is on modern workstation machines with gigabytes of unused RAM lying around.
In short, there may be very valid technical reasons why VS can't go 64-bit, but to claim that this doesn't hurt the product is in my opinion not justified.
comment 9y ago · link · parent
The problem then is that some of the advantages of modern C++ are a bit "all or nothing". Just to pick an example, for exception safety in the current sense to really work, basically all of your code has to be written in a certain style, which is something that's really hard to achieve.
Maybe that's less of a problem for codebases started after 2011 that have been written in the modern style from the beginning. But given the way the C++ language continues to evolve, my bet is that even those will eventually run into the same problem with whatever new feature is introduced in 2026. There really needs to be a way to deprecate old language features.
comment 11y ago · link · parent
So please excuse my skepticism, because I'm still fascinated by Perl 6's ideas and potential. But is this another "Rakudo Star" where they just take whatever current mess they have and label it "release", or is Perl 6 really finally ready now?
comment 11y ago · link · parent
Say you have a class CustomerHandler (stupid example, pseudo-C#) with a constructor like this:
public CustomerHandler(Guid customerId, ILogger logger, ISomeExtraDependency whatever) { ... }
Now, let's say another class needs to create CustomerHandlers for specific customers, but doesn't want to care how they are created. Autofac, the .NET DI framework I'm most familiar with, let's you inject factory delegates: public RequestProcessor(Func<Guid, CustomerHandler) customerHandlerFactory) { ... }
(Every type not mentioned in the Func<> is auto-injected.) This is very convenient because you can change the dependencies of CustomerHandler without messing up the rest of the code.Of course, even in the absence of such an auto-factory feature, you can still create a dedicated CustomerHandlerFactory class and inject that. That's not quite as convenient, but it's still a lot better to have only one extra place that has to know CustomerHandler's dependencies than having them all over your codebase.
comment 11y ago · link · parent
See https://en.wikipedia.org/wiki/Subspecies
"A taxonomist decides whether to recognize a subspecies or not. A common way to decide is that organisms belonging to different subspecies of the same species are capable of interbreeding and producing fertile offspring, but they do not interbreed in nature due to geographic isolation or other factors."
comment 11y ago · link · parent
comment 11y ago · link · parent
If you think about it, it doesn't make sense to use "LATIN SMALL LETTER I" as the lowercase form of "LATIN CAPITAL LETTER I WITH DOT ABOVE". Four new codepoints for Turkish ı/I and i/İ would have solved so many problems.
comment 11y ago · link · parent
account.Balance -= order.Amount*order.Item.Price - order.Rebate;
is not readable at all, which is why many coding standards require whitespace around binary operators.comment 11y ago · link · parent
It seems that in the author's beauty contest game, most people are unable to analyze this game correctly at the top of their head. Maybe some people don't even bother and just pick any random number. But assume that this game is played repeatedly and for real money (like in a stock market). I think people will notice that low numbers consistently win, which will cause a downward trend towards the Nash equilibrium in very few iterations.