The All
seems to work the same as any other language conjunctions. Search for "vacuous truth" to read about the underlying set theory origin of this definition in logic, which all (or at least all non-esoteric) programming languages define all. The same logic you can find at least in Python, JavaScript, C/C++, PHP, etc. But on the other hand, if C# makes the method All
does not return true without error on empty set, it will make C# special and unique language, so there might be benefits.
Plamen Dragiyski
Posts
-
.NET's Sometimes Nonsensical Logic -
DebuggingRespect for detectives, that assume libraries are quite places where no murder can occur.
-
Got to love how people make stuff up...Just imagine the confusion, when scientists start to modify weather patterns and start hiring someone that can design a cloud with specific properties.
-
AI: Threat or panacea?As a person studying and working with AI my view changed from "AI is possibly a threat" all the way to "There is nothing to worry about, ever". First, I learned that AI is a little bit more mechanical than I anticipated. And we have been already using autonomous mechanical systems years from now (in practice HTTP servers requires little to no supervision after the start command, but fear from an HTTP server is irrational). Second, we have the validation issue. A system with no validation is just random programming with undefined behavior. In all known cases that leads to unhandled exception and termination.In all cases with validation AI tends to do what it had been programmed for. And nothing more. Even "self-aware" tends to do nothing by default or behave like expensive random number generator if emerging behavior is available. In other words, a self-aware AI that wants to kill humanity is only possible if you analyze, validate and train an AI to kill humanity and then test it and reiterate until it stops failing at that command. It cannot be an emergent behavior. Third, "self-awareness" is overrated. In fact this is the most scary part. Intelligence is far more machinery process than I actually anticipated. This gives rise to the most scary field "social engineering". It is not like a machine would harm you, but a person that understand how human mind machinery works and use that to achieve control over targeted person's behavior. Therefore, you should not be scared by a specialized self-aware AI, that has been validated on a higher level to drive a car, translate from another language, create a son and so on. You should be scared by the people who knows what pattern of sound can cause production of certain type of hormone to affect your mood and so on. Self-aware machine has predictable behavior (or breaks down otherwise), self-aware humans do not.
-
Your frequent unintentional typing mistakes?I always press the correct keys. The order of the keys is the problem. For eaxmple.
-
SSD laptopsDid you install grub-efi-bin after the Ubuntu installation. The new boot type ignore device discovery and only search for the catalog inside the small UEFI partition. You can put that on your HDD or SSD, but it needs to be GPT, has bootable flag and a proper GUID. 512 MB is usually enough. UEFI multiboot is a pain, not because it is impossible, but it requires so many stuff to be done manually.
-
SSD laptopsDid you install grub-efi-bin after the Ubuntu installation. The new boot type ignore device discovery and only search for the catalog inside the small UEFI partition. You can put that on your HDD or SSD, but it needs to be GPT, has bootable flag and a proper GUID. 512 MB is usually enough. UEFI multiboot is a pain, not because it is impossible, but it requires so many stuff to be done manually.
-
I'm starting to despair of this years crop of developers.Well, I have seen an HR strategy where more developers do the work faster. So, it is not a quality problem, but quantity. And since not many graduate from universities (we are small country), they have boot camps - 3 months and you become a developer.
-
git pollSuper Lloyd wrote:
is it common practice to have every developer working on its own branch instead of the whole team working on a common branch?
It depends on whether you want to resolve merge conflicts between two branches or merge conflicts between two commits. The best advice I can give you to avoid merge conflicts is to either work alone or re-review your architecture (unlikely to happen). I have worked in both cases, and working on separate branch feels better, since no merge requests are done at the end of the workday and finishing a bug/feature is unlikely to align with the workday schedule. As a result, not everything that goes into the central repository is complete (and tested). So if it is untested, it is better to be on its own branch.
-
Programming Question of the Week?I work on double data rate - when I get high and when I get low.
-
2018, A dark year for the gaming industry...F-ES Sitecore wrote:
Um, Microsoft don't make games?
I think, I am a bit old, but Freelancer (video game) - Wikipedia[^].
-
How much do you pay for your internet?In Netherlands I live in a city I have ADSL which is around 2.5 MBps download and 300 KBps upload (Big B = Byte, not bit, multiply by 8 for bits). Unfortunately, for Netherlands the ISP does not matter, it is the government who owns the line (ISP only rent it), so no alternative. The price is around €30. In my parents place in a small village in Bulgaria we have coaxial cable above ground. I get 4-10 MBps download and 1-8 MBps upload (no hard limits, depends on the usage, but usually it is above average). The network is really prone to breaking due to thunderstorms, but it is super fast. The price is 32лв. (~€16) and includes cable TV. It is amazing what lack of regulations can do for the internet (if you do not care there are cables everywhere outside).
-
Speaking of C++C existed during 16 bit period and I am almost sure that
RET
instruction did not take argument back then. Your computer most likely start in real mode, which is 16 bit, so it is still in use today. I suppose that is why they do not want to change the calling convention. P.S. fastcall prolog is usually optimized (under /O2 or more) to use arguments directly from registers when possible. -
Unofficial Survey of the WeekDo you need unstable (non-persistent) or partial drawing, buffers, dynamic scalar image generation (opposite as vector image generation), layers or 3D? Then use canvas. For all other simpler cases use SVG. None of those technologies is superior - SVG is simple to use for simple use cases, Canvas is simple to use for advanced use-cases (and difficult to use for simple use-cases).
-
When I say "goto", my parrot says "Spaghetti Code"den2k88 wrote:
Which is an Access Violation waiting to happen when the code changes.
How? If jumping outside block can causes access violation, then every "}" is potential access violation. If you talk about inter-scope
goto
, that's is entirely different story. You can do that in C using signals. What will be the state in C++ after suchgoto
it is indeed unknown, so that's one possible misuse ofgoto
. But if all affected variables are on the stack (and in C++ they should be - all pointer should be wrapped into appropriate *_ptr object allocated on the stack), jumping outside of scope is completely safe. Jumping inside non-conditional scopes is also safe. Jumping inside anything else is a bad idea. Jumping outside scope, can be realized by do-while wrapping:do {
// ... you can use break here
} while(false);But it cannot be used inside loop/switch statement and it is utterly more ugly than
goto
. -
When I say "goto", my parrot says "Spaghetti Code"den2k88 wrote:
breaks modularity in C code
That is true for C, but not so much for C++.
goto
is context dependent in C++, it will call appropriate constructors/destructors. When used in local context it will not make the function/method monolithic. So ifgoto
is so bad, you might be using a badly outdated language? -
Critical Mass - Then What ?Yeah, blame the language. I have almost never seen prototypical inheritance on third party JavaScript code. Some people even claim it is not OOP, language. JavaScript and PHP reputation is what spoon reputation would be if people tried to eat soup with the handle.
-
Development PCWait for a price drop on RAM, so you can get 16/32. If your MB supports up to 64, do not buy 2x8. I have found that in modern dev, one common IDE + debugger might fill up your RAM. And I usually use other programs as well (music, etc). Now seems like the worst time to buy new desktop. In a year from now for $1K you will be able to get:
- Cheaper 16G RAM
- 10nm CPU that's actually uses new technology - faster compile times if you are in that kind of dev
I know almost every year computers make some "new" technology, but prices do not, so it is worth waiting.
-
MILLISEC_PER_SEC is never neededI learned not only a valuable unit today. This link enriched my view of the metric/non-metric systems. Very useful graphic[^]. Now I realize why it is so for a person familiar with all this to discover the metric system.
-
EncodeFlagsBernhard Hiller wrote:
store that value in a database eventually.
Did I miss important new trend in databases? When did they stopped supporting integers?