|
newton.saber wrote: How would you cancel it?
Usually by terminating a loop.
newton.saber wrote: iterate the list on another thread?
Or several if you like.
|
|
|
|
|
I can't do anything else than approving the termination of the unary plus operator
I fully agree on the IEquatable<> and IComparable<> interfaces implementation nightmare; considering the fact that we have to deal with structs and classes differently, we end up with four different ways to do basically the same thing.
I also agree on the fact that two concepts that do not overlap should not be implemented in a single object (ex: integers/bit arrays, enums/flagged enums). Having a consistent system for bit-arrays handling would be a great improvement.
I had never imagined that using increment and decrement operators could be a problem. I use them pretty much. Maybe there are better ways to achieve the same goals, but I never had a readability problem with them; they just make a lot of simple expressions very concise.
It would also be very painful to me if I had to give up on the for loop.
while (true) {
continue;
}
|
|
|
|
|
phil.o wrote: I also agree on the fact that two concepts that do not overlap should not be implemented in a single object (ex: integers/bit arrays, enums/flagged enums). Having a consistent system for bit-arrays handling would be a great improvement. I see this a lot, but they do overlap. A lot of the power of using an int as a bitarray comes from the ability to use operations that aren't strictly bitwise, for example x & -x selects the lowest set bit (if there is one) without having to look for it,
x & x - 1 removes the lowest set bit (used also as part of determining whether a number is a power of two), or to take a more practical turn, the o^(o-2r) trick in chess engines.
Meanwhile integers that we pretend aren't bitarrays (they still are) benefit from bitwise operations, for example testing whether it's a power of two (as above), rounding up/down until it is a power of two (involves a bunch of shift/or), rounding down to a known power of two (eg x & -16 is the canonical way to round x down to a multiple of 16), and even knocking off the lowest set bit (as above) in the indexing of a Fenwick tree (it's not a bag of bits there, it's an index), the FFT bitreversal (again an index, not a bag of bits).
Arithmetic operations and bitwise operations are not two different worlds, they mix in useful ways.
|
|
|
|
|
phil.o wrote: termination of the unary plus operator
NO! That would violate the Orthogonality Principle! (Or is it the Regularity Principle?)
Heathens at the gate! Heathens at the gate!
|
|
|
|
|
I'm surprised there's nothing on the overuse of ?.
MyClass item = passedIn != sentinel ? otherItem : defaultValue;
item = item ?? otherCouldBeNullValue;
item?.DoSomething();
|
|
|
|
|
Pete O'Hanlon wrote: MyClass item = passedIn != sentinel ? otherItem : defaultValue; Should the inverted question mark, unicode U+BF ¿ flip the sense of the boolean?
Pete O'Hanlon wrote: item = item ?? otherCouldBeNullValue; Why doesn't unicode U+2047 ⁇ work like the double ?
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
You mean that several various operators contain a question mark? Meh, I'm OK with that -- at least until I see
MyClass item = someitem ?? otherCouldBeNullValue != sentinel ? otherItem?.DoSomething() : defaultValue;
I don't blame the designers for abuse.
|
|
|
|
|
Exactly - and you know that sooner or later people will start accepting R# suggestions that end up producing horrors like that.
|
|
|
|
|
Many engineers develop some bad habits over their years of forging code. Here are seven career-breakers software engineers need to ditch. Collect the whole set!
|
|
|
|
|
Here's the 8th: being a patronizing git, just like the author of the article.
|
|
|
|
|
Most of these aren't habits of the developer, but consequences. Passion gets killed easily if you have no say in what you are doing, and saying "NO" is one of the most important skills a dev can have.
Scope-creep is one of the reasons why a lot of projects go beyond their deadline. Learn to say no, we got a product to ship.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
This article is intended to highlight some of the key advantages and disadvantages typically experienced by enterprises. It then presents the key questions to be contemplated by your enterprise in determining whether Git is right for you and what you need to consider in moving to Git. To Git, or not to Git. Whether 'tis nobler in the mind to rebase the branches...
|
|
|
|
|
Regardless if you opt for Intel's latest platform and DDR4, or go for last season's Haswell range with more affordable DDR3 memory, you'll likely ask yourself: "Should I get 8GB or 16GB of RAM?" Is more always better?
|
|
|
|
|
I did not ask, I just went for 16GB.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Me too. I don't want to have to think before debugging a mobile client using Android Studio and a web app using VS2013 simultaneously. My GigaByte BRIX (4th gen i7, 16G RAM, 500G SSD) flies!
/ravi
|
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: Android Studio is an idiot IDE in manner of memory-consumption; Hmm, it seems to work well for me. Seems faster and more robust than Eclipse.
Afzaal Ahmad Zeeshan wrote: 1TB HDD *Beat ya!*. A 1TB SSD? Nice!
/ravi
|
|
|
|
|
In case of Eclipse and Android Studio, indeed, it is a better IDE for Android programming. But I was comparing it with Visual Studio.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
IMHO, *nothing* compares to Visual Studio. I wouldn't marry a woman who said she didn't like VS.
/ravi
|
|
|
|
|
We're now requesting 512GB and 36 cores -- for database (SQL Server) servers anyway. I got no response when asking about a similar desktop.
|
|
|
|
|
PIEBALDconsult wrote: for database (SQL Server) servers anyway Makes sense. One of the reasons why SO is insanely fast is that it runs in RAM.
/ravi
|
|
|
|
|
Runs in RAM? I thought RAM was supposed to save the data.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
32GB because ... Batman!
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
64 GB.
Not upgrading for a while.
|
|
|
|
|
I've got 32GB in my home machine because about 2 years ago I started bumping far enough into swapland on my 12GB LGA1366 box that I was noticing performance hits I fixed that by putting some old ram into the box to get to 18GB but wanted a bigger buffer for my new system. At that time my peak numbers were:
3.5GB Heavily loaded 32bit browser #1
3.5GB Heavily loaded 32bit browser #2
3.5GB Distributed computing (8x 400MB CPU tasks + stuff on the CPU)
3GB Combined lesser applications and the OS
6GB Whatever game I was playing (or tabbed out of instead of quitting)
For about 19GB maximum total memory usage. From keeping an eye on task mangler for a bit before doing the upgrade 14GB total (2gb swap) didn't have any noticeable impact shuffling to/from the SSD. My typical max of 16GB (4GB swap) was noticeably slower if I was paying attention. 17+GB (+5GB) swap was enough slower that I noticed even if I wasn't looking for a problem. For a while I was shooting browsers thinking the core issue was them fragmenting their heap to hell and back; this worked to the extend that restarting the browsers would temporarily free a GB or two of memory and reduce pressure on the swap file.
At work I only have 8GB and have found that I can't comfortably run more than 2 instances of VS along with all my other crap before bogging down. Only having a spinning drive makes any swap usage here quite painful.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|