new programmer here, forgive my ignorance, but couldnt you write a new functiom that takes a bool which then calls the original funtion and passes it a string?
yes, and i hope that everyone who used that function did that. but its still hacky. why the extra step that wastes performance? (in case you have to read or write that value very often). ofc people argue "we hav da performunce!!" but that is the reason why my i5 struggles with some websites while games in my old vintage 10Mhz x86 run just fine.
dokks ยท 2 points ยท Posted at 03:25:43 on May 29, 2017 ยท (Permalink)
You are technically correct about performance, however the cost of a single nethod call that doesn't do any cpu intensive work, or data/network access is so negligible that it's almost never worth worrying about, even in a tight loop. There are so many other performance considerations that people don't pay attention to like not streamlining data access or super chatty APIs that are the real performance killers.
there is so much that kills performance nowadays, i wish courses would put more emphasis on it
Splamyn ยท 2 points ยท Posted at 09:56:50 on May 29, 2017 ยท (Permalink)
Unfortunatly in this case not since the ShadowCopyFiles is a property and not a function. You could add a overload to the contructor of the class for it, but property names must be unique. Proprties behave almost exaclty like normal fields, because you access them identically; object.MyProperty = true; or return object.MyProperty;
It would be better to write a new function, and then change the implementation of the old function to just translate it's arguments and use the new one - that way you avoid the "deprecation lasagna" of a new function calling an older function [calling an older function, etc].
skeet70 ยท 3 points ยท Posted at 18:56:15 on May 28, 2017 ยท (Permalink)
I once had someone come in for an interview, who chose a string parameter to a function for turning an LED "on" or "off". When I asked what would happen if I called setLed("brightly lit"), candidate added another if comparison for that string, quite proudly at that. ๐คฆ๐ปโโ๏ธ
clearly what he should be doing is passing in a function as the argument, which the LED-setting function calls. Then, make an exception for each special LED behavior you want. Your function-argument then throws the exception corresponding to the desired behavior, which your LED-setting function catches and behaves appropriately. This has the nice feature of crashing when you try to use a behavior you forgot to finish implementing.
Obviously on day 1 that was implemented as the trigger for the default blinking mode. We're very concerned about the effect that defining new exceptions might have on compile time and executable size.
If they are directly working with LED I guess it's probably in C?
Depends on how directly. For instance, I wrote a library (in C++) that sends serial messages to an Arduino running a special program, so that the voltages on individual pins could be manipulated from MATLAB with minimal latency. Granted, any call to manipulate the LED within MATLAB ultimately has to come back through the library, but still, it's unclear what the context of manipulating the LED was, not to mention that virtually any library would allow you to do some PWM.
The reason for CTrue and True is likely because BASIC defines true as -1 while in C if you cast true to an int you get 1. So they defined both values here for both languages.
Mixed suggests the value was intended to indicate a range of booleans were not all one state or the other but had mixed states. Not sure what Toggle would be used for, except perhaps in a UI context to differentiate between checkbox (toggles) and radio buttons (not toggles). Weird though.
Obviously the correct solution was to change it to be an if else statement that gets the length of the string and turns it on if it's and even number and off if it's odd. Satisfies all those criteria and still functions for any other string.
[deleted] ยท 3 points ยท Posted at 06:06:08 on May 29, 2017 ยท (Permalink)
i like your style
[deleted] ยท 91 points ยท Posted at 14:04:50 on May 28, 2017 ยท (Permalink)
Ah, you might hate it but somewhere out there some businesses love it. And businesses are Microsoft's bread and butter. I would probably care about compatibility too if that were the case (I actually do). There is nothing worse than code breaking for no reason at all while updating library versions. Node or JS developers are probably just used to the abuse and think it's normal.
dokks ยท 5 points ยท Posted at 03:35:35 on May 29, 2017 ยท (Permalink)
Spot on. Always remember, Microsoft's number one goal is not to write perfect, or even great software. It's to secure licenses. Which means if a certain library is crappy or even broke, if no huge license holders are complaining, it's very unlikely to get touched.
This is not the way the world works for the most part, except for this new trend of subscription based services where you just "get" or are forced to take new things. It may be 2017 but people build businesses to stand the test of time without needing to commit a portion of their resources to solely maintaining items that are changing upstream when they themselves don't need new features. This is why part of Microsoft's empire is so large in the enterprise, because they have structured backwards compatibility in to their products to allow taking of things like security updates so you can benefit from them but without requiring code changes in XXX random application.
[deleted] ยท -28 points ยท Posted at 15:14:24 on May 28, 2017 ยท (Permalink)
Honestly you sound like someone who has never worked at a company with a real product. Companies backlogs of projects and tasks is usually many months if not years long. Nobody is sitting on their ass with nothing to do instead of upgrading. It just often isnt as high a priority as some other feature or product which will bring more money in.
I understand the point you are trying to make, and the concepts we are talking about are things every company struggles with. I think when it comes down to it though, the smart move for most businesses is the conservative route with less risk factors, and the guaranteed cash output is to continue to support and make your existing client base happy - ergo don't fix what ain't broken.
[deleted] ยท 18 points ยท Posted at 15:41:23 on May 28, 2017 ยท (Permalink)
Keeping outdated software around makes more attacks like WannaCry possible.
atyon ยท 7 points ยท Posted at 17:30:42 on May 28, 2017 ยท (Permalink)
But companies won't have better code just because you break compatibility. After a breaking change, they will just port their old code as fast as possible. If it builds, good, done, ship it.
The problem is that with the breaking change the assumptions the original coders had might no longer be correct. Just migrating from ASCII to UTF8 means opening a whole can of worms. Or the new API allows more or different access. Or the new API doesn't check for things the old did. Or vice versa.
Even just adding capabilities can be bad. Imagine an old file retrieval API that can only access local files. If a file is on a tape library, it just returns an error. If the new version can access those files, great, now your program hangs for fifteen minutes when such a file is requested.
dnew ยท 6 points ยท Posted at 17:01:48 on May 28, 2017 ยท (Permalink)
I work at a company that thinks this way. We have a very large code base. I'd estimate at least half of all the effort I see going on is keeping up with people breaking shit out from under you. It's not a good thing.
Splamyn ยท 70 points ยท Posted at 14:11:35 on May 28, 2017 ยท (Permalink)
I think java is guilty of the same thing. And I hate it everywhere. Sometimes it's really better to just make a break and do it for good that time!
(Also didn't realize it was 1.1, at 2.0 they really had the chance to do it, since there were many breaking changes. Nobody talks about
< .Net 2.0 - for a good reason)
To the downvoter: why don't you take this chance to earn some easy money?
[deleted] ยท 4 points ยท Posted at 19:46:12 on May 28, 2017 ยท (Permalink)
It's a shame. Pip and virtualenv make it pretty easy to make the switch.
Splamyn ยท 18 points ยท Posted at 15:31:25 on May 28, 2017 ยท (Permalink)
also true, but there's no perfect way.
NaN-ers ยท 9 points ยท Posted at 18:11:07 on May 28, 2017 ยท (Permalink)
I still think it's bizarre that they keep Python 2 around, and that so many people continue to use it. They really should have just set a date and dropped it.
NaN-ers ยท 7 points ยท Posted at 18:49:09 on May 28, 2017 ยท (Permalink)
I didn't realize it was being dropped in 2020. That's good news, and about time too. I think it'll be good for the community, or at the very least for me
[deleted] ยท 8 points ยท Posted at 20:11:57 on May 28, 2017 ยท (Permalink)
You can do, but having to make changes to your code is expensive. Microsoft has learned the hard way over many years of being beaten up by users that it's pretty much just not worth changing something this small.
pr0n2 ยท 19 points ยท Posted at 17:13:20 on May 28, 2017 ยท (Permalink)
Java is 1000 times worse because they can't make up their fucking minds. I remember one update where they changed .close() to .terminate(), or something equivilant, completely on a whim breaking thousands of apps for no reason other than someone didn't like the name.
Developers and companies often hate having their product/code break, unless there is an extremely good reason (and even then they will hate you for it). Libraries that want a large and happy user base are often better off to at least keep compatibility.
YRYGAV ยท 7 points ยท Posted at 23:53:25 on May 28, 2017 ยท (Permalink)
Having a misleading API can cause things to break too. When you have functions that do the opposite of what they say, some percentage of people will release code that is broken because of it. Yes, shame on them for not testing, but shit happens.
You have to weigh the pros and cons of fixing it while it's new and the least amount of people have adopted it, vs. it constantly causing bugs for people for the entire lifetime of your library.
There's seldom decisions that can be made the same way every time without exception. Sometimes it's better to just pull the band-aid off and fix it for good, rather than it constantly being a sore spot for the API for years.
borick ยท 15 points ยท Posted at 17:01:39 on May 28, 2017 ยท (Permalink)
If you hate it, you've never been in a situation that caused you a massive headache because of non-backwards-compatibility API changes :(
God, we dropped .NET and moved to a Node front end server this rings so true. Upgrading in .NET wasn't always a picnic but it was usually straightforward, upgrading a package.json reference seems like the software equivalent of "here be dragons." Basically just leads to shrinkwrap all the things, followed by ok upgrade everything and spend an iteration figuring out what's broken every few months. Node has got some positives going for it but it all just feels so...slapdash.
Node has got some positives going for it but it all just feels so...slapdash.
Well, for all it's great things, it's made by someone who felt that JS on the server was the best solution to a problem. Like.. They might be right, that's a different argument.. But you need to have a very special mind to even get to there.
I have a feeling the problem was "all my server-side and client-side code are in separate programming languages" and unfortunately, unless transpiling to JS ever takes off, that is the only solution.
The thing is, the language isn't even the issue there - the issue is the mindset and approaches. You essentially need a different approach to backend than front-end, else you just end up with a pile of shit.
WebAssembly removes the need to transpile, though we're probably a few years away from it seeing it used by a single person for a single, tiny webpage.
1.1 => 2.0? Nah, too soon. Lots of people will still be on 1.1.
Oh, we're releasing 3.0. Maybe we can break it now, not many people should be on 1.1 anymore right? Oh wait... since we didn't change it for 2.0, this'll break anyone using 2.0 too, and that's everyone!
Repeat for 3.5, 4.0, etc..
You can't just say no one's using 1.1 anymore. Because every version since then has the same issue and will break. And you can't change it in the next version because everyone is using your last released version (obviously). It's not as simple as the version it was introduced in.
Of course, sometimes a breaking change is necessary. But this is such a minor one... it's just not worth the pain.
1 => 2 add the new api and a deprecation warning to the old. 2 => 3 only allow the old api to be used with a compiler flag. 3 => 4 remove the old api. That's about the most sensible route I can think of.
Oh, I forgot about the obsolete attribute. That would make it a bit easier - but in that case you might as well just leave the old one there, marked obsolete (with warning, not error). That's enough to encourage use of the new without actually breaking the old.
[deleted] ยท 2 points ยท Posted at 20:17:10 on May 28, 2017 ยท (Permalink)
It depends on the code base but this could be undesirable. The last thing you want is a collection of obsolete attributes crapping up your classes or even just needing to have a dependency on methods in an assembly that you aren't ever going to use again, at some point a removal of the old will be welcomed.
[deleted] ยท -10 points ยท Posted at 15:39:16 on May 28, 2017 ยท (Permalink)
[deleted]
dnew ยท 3 points ยท Posted at 17:07:17 on May 28, 2017 ยท (Permalink)
It looks like it's returning a value from an environment variable or something. They could have interpreted it as a boolean, but if the variable is set to "banana" it's hard to make a unilateral decision about what that should mean.
Also, I've used libraries that required "true" or "false" instead of a boolean because they needed an "unset" value also.
[deleted] ยท 9 points ยท Posted at 17:32:32 on May 28, 2017 ยท (Permalink)
If they didn't someone would make a comment "the reason I hate Microsoft is because I constantly have to rewrite my code to be compatible with the latest version of .net"
If it works, it's documented, the documentation is correct, and it has low usage (which is likely) ... why bother with the headache? Who knows what kind of internal systems at Microsoft which use the far reaches of this stuff depend on that specific behavior. Just the pain of having to unblock some other team because of this is probably worth not updating it.
zdakat ยท 0 points ยท Posted at 18:43:01 on May 28, 2017 ยท (Permalink)
Im not an expert,but it feels like Windows would probably work better if they refined what it did. It seems to break new applications while still having limitations in order to support absurdly old software.
mick88 ยท 5 points ยท Posted at 14:34:20 on May 28, 2017 ยท (Permalink)
This is still a thing in stringly-typed frameworks that haven't invented enums or constants yet.
I once wrote some javascript that needed to export the data to a string for later import on a different system.
Bools as true/false strings felt so wrong, but it worked and I still can't think of something better other than making assumptions about data structure.
Too ambiguous for the parser, had values that could actually be a 1 or 0 without being a boolean.
YMK1234 ยท 5 points ยท Posted at 17:05:58 on May 28, 2017 ยท (Permalink)
Pah, you should see the shit our indian platform guys do ... I've seen anything from (all strings) true/false, T/F, y/n, yes/no, enabled/disabled, and of course partially usually sensitive with different casing.
at least the documentation mentions it. in other languages it would probably be handled like some forbidden knowledge that only the grand masters of the language are allowed to know and understand
Flosus ยท 532 points ยท Posted at 13:07:59 on May 28, 2017 ยท (Permalink)
Did you ever hear the tragedy of Senior-Developer Plagueis The Wise? I thought not. Itโs not a story the trainers would tell you. Itโs a urban legend. Senior-Developer Plagueis was a Dark user of VB.Net, so powerful and so wise he could use the bitwise operator to influence the servers to create useful applicationsโฆ He had such a knowledge of the development environment that he could even keep the ones he cared about from jitting...
dnew ยท 51 points ยท Posted at 16:57:32 on May 28, 2017 ยท (Permalink)
The compiler compiles everything down to what's essentially a fake machine language that doesn't match any real computer. That fake machine language is fast to interpret, because all the operations are (usually) pretty simple. That fake machine language is often called "bytcode" because in the original languages that did this (Smalltalk, UCSD Pascal) back in the 80s, each machine code instruction was one byte long. The .NET programs call it ILM, Intermediate <mumble> CIL, Common Interpreted Language.
Since it's fake, you can compile your program once and run it anywhere there's an interpreter for that fake code. Java's version, for example, compiles into ".class" files, and uses the JVM "Java Virtual Machine" to interpret it. That's how you get Java that can "run on any machine." The JVM gets ported to a new computer, and then all existing Java programs can work on that new computer (in theory).
Nowadays, the fake machine code gets interpreted, but if the interpreter sees the same routine getting called more than a handful of times, it will "just in time" translate it directly into the machine code of the computer it happens to be running on, as it's running. So after that, it runs full speed.
.NET goes one step farther. When you install a compiled .NET program, there's a background task that eventually compiles the whole thing and stores the machine code back onto the disk, so once that finishes, you don't have to take the time to JIT any more. That's one reason why after some Windows Updates, you might notice your disk flicking around for a while.
Same thing after an android update when it says updating programs? Recompiled for your phone?
dnew ยท 4 points ยท Posted at 23:06:37 on May 28, 2017 ยท (Permalink)
I believe that's essentially the same thing going on there, but I'm just guessing based on vague knowledge.
Somethings things on a PC will say something similar, like after you install a Steam game, but I think in many of those cases it's just defragging the files it just installed, so they're all close together on the disk.
v1rous ยท 49 points ยท Posted at 14:41:29 on May 28, 2017 ยท (Permalink)
Just In Time compilation. .NET assemblies are usually(?) not raw machine code but actually in an intermediate form, kinda like Java's .class bytecode representation.
Senior-Developer Plagueis was a Dark user of VB.Net, so powerful and so wise he could pass objects ByRef to influence the servers to create useful applicationsโฆ He had such a knowledge of the On Error Resume Next trick that he could even keep the ones he cared about from crashing.
Twirrim ยท 60 points ยท Posted at 15:31:56 on May 28, 2017 ยท (Permalink)
Like python's optimize flag. If you look in the documentation around the flag, it just tells you it applies some optimisations, but doesn't detail what, or link to the place in the manual where it does. It's highly logical that you'd go looking for information under modules, right? https://docs.python.org/2.7/tutorial/modules.html#compiled-python-files
If you do happen to stumble across it, you discover it drops asserts.. And that's about it.
currently have to work with python... its a nightmare of bad/incomplete documentation. "but what exceptions does it throw when this and that?" docs: "heck if i know"
dnew ยท 24 points ยท Posted at 16:58:56 on May 28, 2017 ยท (Permalink)
Try using Blender. I've seen people release features, and others saying "Please, just give me the files you used to test the feature, and I'll figure out how it works and write the documentation for you." And no answer...
blender.. a nightmare of key combinations... sucks when you only occasionally work with it and cant remember shit from last time and have to look up every single thing you want to do "how do i set the rotation to exactly 90ยฐ??? ohhh select the object, press n and a window comes up..."
[deleted] ยท 4 points ยท Posted at 18:16:28 on May 28, 2017 ยท (Permalink)
why would you bother with the properties menu when you can just press R like usual and then type 90 for 90ยฐ?
feels so uncertain to me. i rather just click a textbox, put my number in, press enter. not hope that blender just understood what i wanted to do. i guess the reason that this function is so hidden is that blender is mostly used for artsy stuff where it doesnt matter if its exactly axis aligned. i usually work with CAD models or other stuff where exact rotations are important.
[deleted] ยท 5 points ยท Posted at 18:32:20 on May 28, 2017 ยท (Permalink)
hope that blender understood what i wanted to do.
...that's bull, to be completely honest. You can restrict axes just as easily by pressing X, Y, or Z (literally the names of the axes) during rotation, I don't see how that seems unreliable... and hidden? It's one keypress, not really a complex combination by any means
leadzor ยท 41 points ยท Posted at 16:06:13 on May 28, 2017 ยท (Permalink)
Python. Great language and environment, with a good community. Documentation written by a lazy middle aged demon.
well i might argue about the "great language" part, but yeah community is good and there are tons of libs/modules, but docs are lacking basic things like talking about special cases or exceptions
d3matt ยท 5 points ยท Posted at 18:07:33 on May 28, 2017 ยท (Permalink)
I'm a bit curious what language you would say has good documentation at that level... I haven't found one yet... At least with Python, it's fairly trivial to find the library code (or even the underlying C code) if you need to...
i usually work with c#, and the doc usually mentions what happens when for example a file is missing, or there is no permission. java (not that i like it) even forces exception documentation in its syntax. so the signature contains at least a mention of all the possible exceptions that can be thrown (id love to see such a feature as optional in c#, so there is an easy way to document exceptions in code, but you dont have to document every argumentexception ever)
Ironically, Java is pretty thorough just due to age. You have to read the source more often than I'd like, but it sometimes actually warns for unexpected pitfalls, and it hardly ever lies the way Microsoft and Android docs do.
yup, which is why i usually use statically and strongly typed languages where i dont have to deal with the bogus that dynamic and weak typing brings with itself. so many hours wasted, which could be saved by just checking for such things at compile time
[deleted] ยท -6 points ยท Posted at 18:50:29 on May 28, 2017 ยท (Permalink)
but maaayyyybe i dont have time to search through the source all the time when i want to know what exceptions are thrown? i need to get the product going, and searching code for answers that should be in the documentation is quite annoying
Bruh Python be chill yo i mean i roll that from time to time and shit but it's just a language and shitty, hard to process code is written in it all the time just like any other language furreal tho
Python done right, as in proper PEP8, sure. I've seen a lot of shoddily written Python code that would be a whole lot more useful to expand upon, with documentation.
Wasn't there a blog post by a Google developer who had exactly that situation, because the optimizations caused people with slow connections/browsers to be able to use YouTube at all?
Thanks for finding it; I tried searching for various combinations of "performance", "youtube", "javascript", "countries", and "developer blog", but didn't think of searching for "page weight".
After a week of data collection, the numbers came backโฆ and they were baffling. The average aggregate page latency under Feather had actually INCREASED. I had decreased the total page weight and number of requests to a tenth of what they were previously and somehow the numbers were showing that it was taking LONGER for videos to load on Feather.
I dont understand. How can you stream a video if loading the page takes two minutes?
ihahp ยท 13 points ยท Posted at 19:59:25 on May 28, 2017 ยท (Permalink)
just wait .....
Creshal ยท 5 points ยท Posted at 00:48:30 on May 29, 2017 ยท (Permalink)
Very patiently.
And there's lots of "videos" where people share music albums with a static image as video feed. Those have fairly small overhead over pure music streamsโฆ if you can load the page in the first place.
function isOn() result(string)
logical string = .false.
do while (thing->isOn==.true.)
return
exit
end do
string = .not. string
return
end function
Ghi102 ยท 0 points ยท Posted at 17:37:18 on May 28, 2017 ยท (Permalink)
So
function isOn()
{
return !isOn;
}
BullRob ยท 6 points ยท Posted at 17:52:56 on May 28, 2017 ยท (Permalink)
So
!isOn
Ghi102 ยท 1 points ยท Posted at 18:10:52 on May 28, 2017 ยท (Permalink)
Not quite, isOn could be a private member (say in a Java class), so you might not have direct access to it. It's also not a function anymore so it is not equivalent.
You're definitely correct. Global variables can get messy real fast so it's nice to have private variables only accessible by a function. All these downvoters don't like object oriented programming I guess.
[deleted] ยท 1 points ยท Posted at 04:19:46 on May 29, 2017 ยท (Permalink)
They just read java and got triggered.
Ayerys ยท 1 points ยท Posted at 21:18:37 on May 28, 2017 ยท (Permalink)
Too easy :/
leadzor ยท 3 points ยท Posted at 16:08:27 on May 28, 2017 ยท (Permalink)
let isOn = !_isOn;
Ayerys ยท 2 points ยท Posted at 21:19:14 on May 28, 2017 ยท (Permalink)
Is there another language than OCaml that use "let" ?
Or add a few functions that do some specific version of TheThing, like doTheThingNow() or doTheThingSideways(). You might end up with a long list of functions for all the combinations (man -k printf, anyone?) but at least your code has a chance of being understandable. Maybe even readable.
regendo ยท 44 points ยท Posted at 15:41:43 on May 28, 2017 ยท (Permalink)
Shouldn't it also be EnableJITCompileOptimizer, with a capital C?
ClysmiC ยท 61 points ยท Posted at 16:56:07 on May 28, 2017 ยท (Permalink)
I've always thought EnableJitCompileOptimizer was the most elegant way to handle acronyms. Especially if you have two acronyms in a row. Like which of the following is better (ignoring the stupidity of the name): TCPIPFTPClient or TcpIpFtpClient
[deleted] ยท 26 points ยท Posted at 17:14:02 on May 28, 2017 ยท (Permalink)
[deleted]
--xe ยท 9 points ยท Posted at 18:19:45 on May 28, 2017 ยท (Permalink)
I think the two letters thing is bullshit.
SarahC ยท 2 points ยท Posted at 17:14:29 on May 28, 2017 ยท (Permalink)
leadzor ยท 48 points ยท Posted at 16:12:23 on May 28, 2017 ยท (Permalink)
At work we have database field named "boolean" that represents if a quality parameter supports a simple "yes/no" value, or a quantifiable one (usually a percentage or a quantity). When "boolean" is set to 1, it represents a quantifiable parameter, when set to 0, represents a "yes/no" (aka boolean) parameter.
wait why overwrite the built-in function type though?
leadzor ยท 1 points ยท Posted at 17:21:21 on May 28, 2017 ยท (Permalink)
This represents a database table, so it represents column named type. They simply didn't want to name the column "quality_control_type" to not cause confusion with the QualityControlType model bellow.
Remmes- ยท 1 points ยท Posted at 17:02:40 on May 28, 2017 ยท (Permalink)
leadzor ยท 1 points ยท Posted at 17:10:30 on May 28, 2017 ยท (Permalink)
I believe previously it actually meant if a quality parameter was a boolean, and only recently they changed the semantics to mean that a parameter is quantifiable. It's a matter of field name change, but still makes a few heads turn sideways. The data on the database had already it's value inverted to accommodate the new meaning.
We just make sure we hire Technical writers named "Self".
YMK1234 ยท 17 points ยท Posted at 17:01:33 on May 28, 2017 ยท (Permalink)
Classic bug that escaped to the release version, and now you can't change it as a bunch of stuff depends on it. Sucks but just breaking an unknown number of clients is generally not an option, so the best you can do is document it.
Absolutely not: the best you can do is offer the correct option as new field, with the right name, deprecate the old one and remove it in a release or two. Let's be honest, checking two boolean flags to see which one is on its non-default value (or both), shouldn't be much of a hassle anywhere and this is the most obvious example of a deprecated field I could ever dream of.
YMK1234 ยท 10 points ยท Posted at 18:29:13 on May 28, 2017 ยท (Permalink)
checking two boolean flags to see which one is on its non-default value (or both)
Lol, how archaic is that? Just have one property as a mask over the other ...
LegacyField
get -> !NewField
set -> NewField = !value
NewField {get;set;}
And yes, you still need to document that LegacyField has an inverted behaviour.
i always think i'm taking crazy pills coz whenever i tell people microsoft documentation reads like shit compared to other languages they disagree(not the latest stuff, like 2 generations back - stuff that is still in use in corporate life but doesn't have rockstar devs constantly looking at it)
i fucking despise microsoft code documentation.
feels obtuse as fuck
I mean there must've been a number of process failures for this to end up as published. Who designed the API in the first place? Who implemented it? Who tested it?
There must've been a number of people internally who saw this and went "WTF". What happened systemically for it to remain uncorrected?
THe most obvious thing to come to mind is someone made a typo and put in "==" instead of "!=", and later one when the mistake was noticed, the code was too tied into the rest of the system to change it. Which is moronic, obviously, but at least there'd be some logic left in the world.
sphks ยท 1 points ยท Posted at 17:37:58 on May 28, 2017 ยท (Permalink)
It reminds me the Sony P910i implementation of the Bluetooth API (JSR82). It was something like : "If the result is 'error', everything is alright. If the result is 'everything is alright', it's an error."
Oh man, the Microsoft answer file reference is bad like this.
Another one they do is:
EnableThingOne - Values: true, false
EnableThingTwo - Values: 0,1
They flip flop between using string boolean values, and integer boolean values. Not sure if they're interchangeable, but their documentation only states one form is valid.
Reminds me of the Utf8Encoding constructor argument that caught me out the other day, encoderShouldEmitUTF8Identifier which I read as encoderShouldOmitUTF8Identifier.
I think I remember a php function in some old Wordpress versions that (as named) should go to the next page in the pagination, but did (as documented) exactly the opposite. Can't find it, though.
[deleted] ยท -7 points ยท Posted at 13:18:39 on May 28, 2017 ยท (Permalink)
Anyone who uses software or languages created by microsoft is a cuckold. I will gladly take the shill downvotes for pointing it out (you can tell they're shills because my profile karma never decreases, only the karma on this specific comment. This is because reddits fraud detection reverses bot votes on user profiles).
I don't think they separate between bots and non-bots on that level. That would only be possible if they deliberately colluded with the bot-makers. But there's another feature of reddit that caps downvotes for your profile. Helps others distinguish between troll accounts and people who just get heavily downvoated every once in a while...
Thank you for your cooperation. We have finally been able to access your account and confirm your downvote. Please proceed to the link below for payment:
Unless you mean that Microsoft might be referring to Bill Gate's unerect penis, an assembly flag refers to the fact that the designated attribute is either true OR false. Hence it being zero by default, and then referring to its 'exact' opposite.
Saved comment
Splamyn ยท 595 points ยท Posted at 13:56:16 on May 28, 2017 ยท (Permalink)
Another funny thing i once found was this
Back in my day boolean wasn't invented yet. We had to write them as strings!!1!
i know they made a decision mistake and just left it for compatibility reasons.
Olaxan ยท 208 points ยท Posted at 14:35:14 on May 28, 2017 ยท (Permalink)
That's annoyingly stupid. Couldn't they overload it to allow booleans, while also allowing strings for those bastard legacy applications?
fredlllll ยท 109 points ยท Posted at 14:58:40 on May 28, 2017 ยท (Permalink)
cant overload properties (afaik), but deprecating this one and creating one with a suffix of type bool would be a better idea
Olaxan ยท 55 points ยท Posted at 15:07:48 on May 28, 2017 ยท (Permalink)
Oh, right, it's a property.
I guess this is what the [ObsoleteAttribute] is for.
m7u12 ยท 45 points ยท Posted at 19:04:47 on May 28, 2017 ยท (Permalink)
Cant do that. People are still using it.
C O M P A T I B I L I T Y
[deleted] ยท 10 points ยท Posted at 00:49:02 on May 29, 2017 ยท (Permalink)
Dey broke our werkflow!
[deleted] ยท 7 points ยท Posted at 05:49:18 on May 29, 2017 ยท (Permalink)
[deleted]
xkcd_transcriber ยท 4 points ยท Posted at 05:49:26 on May 29, 2017 ยท (Permalink)
Image
Mobile
Title: Workflow
Title-text: There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.
Comic Explanation
Stats: This comic has been referenced 1110 times, representing 0.6980% of referenced xkcds.
xkcd.com | xkcdย sub | Problems/Bugs? | Statistics | Stopย Replying | Delete
Supernova141 ยท 11 points ยท Posted at 20:54:55 on May 28, 2017 ยท (Permalink)
new programmer here, forgive my ignorance, but couldnt you write a new functiom that takes a bool which then calls the original funtion and passes it a string?
fredlllll ยท 24 points ยท Posted at 21:26:25 on May 28, 2017 ยท (Permalink)
yes, and i hope that everyone who used that function did that. but its still hacky. why the extra step that wastes performance? (in case you have to read or write that value very often). ofc people argue "we hav da performunce!!" but that is the reason why my i5 struggles with some websites while games in my old vintage 10Mhz x86 run just fine.
dokks ยท 2 points ยท Posted at 03:25:43 on May 29, 2017 ยท (Permalink)
You are technically correct about performance, however the cost of a single nethod call that doesn't do any cpu intensive work, or data/network access is so negligible that it's almost never worth worrying about, even in a tight loop. There are so many other performance considerations that people don't pay attention to like not streamlining data access or super chatty APIs that are the real performance killers.
Slankydudl ยท 3 points ยท Posted at 11:39:56 on May 29, 2017 ยท (Permalink)
I think you're both right.... Does it matter thaaat much? no, but should this conversation even exist? hell no.
fredlllll ยท 1 points ยท Posted at 16:03:53 on May 29, 2017 ยท (Permalink)
there is so much that kills performance nowadays, i wish courses would put more emphasis on it
Splamyn ยท 2 points ยท Posted at 09:56:50 on May 29, 2017 ยท (Permalink)
Unfortunatly in this case not since the
ShadowCopyFilesis a property and not a function. You could add a overload to the contructor of the class for it, but property names must be unique. Proprties behave almost exaclty like normal fields, because you access them identically;object.MyProperty = true;orreturn object.MyProperty;PeridexisErrant ยท 0 points ยท Posted at 05:04:09 on May 29, 2017 ยท (Permalink)
It would be better to write a new function, and then change the implementation of the old function to just translate it's arguments and use the new one - that way you avoid the "deprecation lasagna" of a new function calling an older function [calling an older function, etc].
skeet70 ยท 3 points ยท Posted at 18:56:15 on May 28, 2017 ยท (Permalink)
{-# LANGUAGE OverloadedStrings #-}lx45803 ยท 6 points ยท Posted at 20:19:50 on May 28, 2017 ยท (Permalink)
{-# LANGUAGE OverloadedStrings #-}[deleted] ยท 0 points ยท Posted at 23:01:15 on May 28, 2017 ยท (Permalink)
casting from a string to a boolean ought to be pretty easy. simple solution if you want to accept both. test it afterwards.
mercurysquad ยท 67 points ยท Posted at 17:24:32 on May 28, 2017 ยท (Permalink)
I once had someone come in for an interview, who chose a string parameter to a function for turning an LED "on" or "off". When I asked what would happen if I called
setLed("brightly lit"), candidate added anotherifcomparison for that string, quite proudly at that. ๐คฆ๐ปโโ๏ธTheTerrasque ยท 73 points ยท Posted at 19:44:45 on May 28, 2017 ยท (Permalink)
bool is great for that! You can use True for turning on and False for turning it off. And FileNotFound for brightly lit.
TASagent ยท 35 points ยท Posted at 20:12:14 on May 28, 2017 ยท (Permalink)
clearly what he should be doing is passing in a function as the argument, which the LED-setting function calls. Then, make an exception for each special LED behavior you want. Your function-argument then throws the exception corresponding to the desired behavior, which your LED-setting function catches and behaves appropriately. This has the nice feature of crashing when you try to use a behavior you forgot to finish implementing.
mercurysquad ยท 14 points ยท Posted at 00:23:56 on May 29, 2017 ยท (Permalink)
Our production code actually sends a fax to a team of interns. They have someone scoot over and flip the switch accordingly. It's more agile that way.
masterxc ยท 10 points ยท Posted at 21:53:51 on May 28, 2017 ยท (Permalink)
throw new NotImplementedExceptionTASagent ยท 1 points ยท Posted at 07:44:34 on May 29, 2017 ยท (Permalink)
Obviously on day 1 that was implemented as the trigger for the default blinking mode. We're very concerned about the effect that defining new exceptions might have on compile time and executable size.
#efficiency
TheTerrasque ยท 8 points ยท Posted at 21:14:52 on May 28, 2017 ยท (Permalink)
Absolute genius. I still have a lot to learn!
sqdcn ยท 1 points ยท Posted at 01:06:27 on May 29, 2017 ยท (Permalink)
If they are directly working with LED I guess it's probably in C?
TASagent ยท 1 points ยท Posted at 07:41:57 on May 29, 2017 ยท (Permalink)
Depends on how directly. For instance, I wrote a library (in C++) that sends serial messages to an Arduino running a special program, so that the voltages on individual pins could be manipulated from MATLAB with minimal latency. Granted, any call to manipulate the LED within MATLAB ultimately has to come back through the library, but still, it's unclear what the context of manipulating the LED was, not to mention that virtually any library would allow you to do some PWM.
thetasigma22 ยท 35 points ยท Posted at 22:43:36 on May 28, 2017 ยท (Permalink)
What about the tri-state bool with 5 states and only two supported ones
IanSan5653 ยท 13 points ยท Posted at 01:17:57 on May 29, 2017 ยท (Permalink)
What the fuck
skreczok ยท 1 points ยท Posted at 08:37:18 on May 30, 2017 ยท (Permalink)
This is how you ensure job security.
rasherdk ยท 1 points ยท Posted at 16:18:00 on May 29, 2017 ยท (Permalink)
The real wtf is always in the comments.
The_MAZZTer ยท 1 points ยท Posted at 17:00:17 on May 30, 2017 ยท (Permalink)
The reason for CTrue and True is likely because BASIC defines true as -1 while in C if you cast true to an int you get 1. So they defined both values here for both languages.
Mixed suggests the value was intended to indicate a range of booleans were not all one state or the other but had mixed states. Not sure what Toggle would be used for, except perhaps in a UI context to differentiate between checkbox (toggles) and radio buttons (not toggles). Weird though.
corvus_192 ยท 5 points ยท Posted at 19:07:09 on May 28, 2017 ยท (Permalink)
Sounds like JavaScript
mercurysquad ยท 9 points ยท Posted at 20:46:18 on May 28, 2017 ยท (Permalink)
This was a C++ embedded developer position.
ZugNachPankow ยท 8 points ยท Posted at 21:47:32 on May 28, 2017 ยท (Permalink)
Embedded developer, passing strings around rather than enums? I can't see that going very well.
Farlo1 ยท 3 points ยท Posted at 21:32:29 on May 28, 2017 ยท (Permalink)
Oh no...
PM_me_when_HL3 ยท 3 points ยท Posted at 20:23:45 on May 28, 2017 ยท (Permalink)
You would write.
TheBeginningEnd ยท 7 points ยท Posted at 01:00:34 on May 29, 2017 ยท (Permalink)
Obviously the correct solution was to change it to be an if else statement that gets the length of the string and turns it on if it's and even number and off if it's odd. Satisfies all those criteria and still functions for any other string.
[deleted] ยท 3 points ยท Posted at 06:06:08 on May 29, 2017 ยท (Permalink)
i like your style
[deleted] ยท 91 points ยท Posted at 14:04:50 on May 28, 2017 ยท (Permalink)
[deleted]
the_king_of_sweden ยท 216 points ยท Posted at 14:54:31 on May 28, 2017 ยท (Permalink)
https://xkcd.com/1172/
xkcd_transcriber ยท 67 points ยท Posted at 14:54:52 on May 28, 2017 ยท (Permalink)
Image
Mobile
Title: Workflow
Title-text: There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.
Comic Explanation
Stats: This comic has been referenced 1109 times, representing 0.6976% of referenced xkcds.
xkcd.com | xkcdย sub | Problems/Bugs? | Statistics | Stopย Replying | Delete
Smaktat ยท 10 points ยท Posted at 18:20:29 on May 28, 2017 ยท (Permalink)
And that's that argument.
[deleted] ยท 6 points ยท Posted at 19:58:15 on May 28, 2017 ยท (Permalink)
I need to keep that and reuse it in design meetings.
DavidChenware ยท 71 points ยท Posted at 14:23:44 on May 28, 2017 ยท (Permalink)
Ah, you might hate it but somewhere out there some businesses love it. And businesses are Microsoft's bread and butter. I would probably care about compatibility too if that were the case (I actually do). There is nothing worse than code breaking for no reason at all while updating library versions. Node or JS developers are probably just used to the abuse and think it's normal.
dokks ยท 5 points ยท Posted at 03:35:35 on May 29, 2017 ยท (Permalink)
Spot on. Always remember, Microsoft's number one goal is not to write perfect, or even great software. It's to secure licenses. Which means if a certain library is crappy or even broke, if no huge license holders are complaining, it's very unlikely to get touched.
McNerdius ยท 1 points ยท Posted at 19:53:13 on May 31, 2017 ยท (Permalink)
somewhat necropost, forgive me...
secure
free
open
source
licenses
?
Or am i missing something... (it happens)
[deleted] ยท -10 points ยท Posted at 14:47:25 on May 28, 2017 ยท (Permalink)
[deleted]
DavidChenware ยท 59 points ยท Posted at 14:55:25 on May 28, 2017 ยท (Permalink)
This is not the way the world works for the most part, except for this new trend of subscription based services where you just "get" or are forced to take new things. It may be 2017 but people build businesses to stand the test of time without needing to commit a portion of their resources to solely maintaining items that are changing upstream when they themselves don't need new features. This is why part of Microsoft's empire is so large in the enterprise, because they have structured backwards compatibility in to their products to allow taking of things like security updates so you can benefit from them but without requiring code changes in XXX random application.
[deleted] ยท -28 points ยท Posted at 15:14:24 on May 28, 2017 ยท (Permalink)
[deleted]
davidcroda ยท 57 points ยท Posted at 15:59:16 on May 28, 2017 ยท (Permalink)
Honestly you sound like someone who has never worked at a company with a real product. Companies backlogs of projects and tasks is usually many months if not years long. Nobody is sitting on their ass with nothing to do instead of upgrading. It just often isnt as high a priority as some other feature or product which will bring more money in.
Ninjastahr ยท 1 points ยท Posted at 17:19:53 on May 28, 2017 ยท (Permalink)
Can confirm: My Dad works at a major software development company and has to deal with this shit all the time.
DavidChenware ยท 14 points ยท Posted at 15:22:17 on May 28, 2017 ยท (Permalink)
I understand the point you are trying to make, and the concepts we are talking about are things every company struggles with. I think when it comes down to it though, the smart move for most businesses is the conservative route with less risk factors, and the guaranteed cash output is to continue to support and make your existing client base happy - ergo don't fix what ain't broken.
[deleted] ยท 18 points ยท Posted at 15:41:23 on May 28, 2017 ยท (Permalink)
[deleted]
senatorpjt ยท 3 points ยท Posted at 16:54:15 on May 28, 2017 ยท (Permalink)
I thought that was the whole reason people used Microsoft products.
CirkuitBreaker ยท 8 points ยท Posted at 16:44:30 on May 28, 2017 ยท (Permalink)
Keeping outdated software around makes more attacks like WannaCry possible.
atyon ยท 7 points ยท Posted at 17:30:42 on May 28, 2017 ยท (Permalink)
But companies won't have better code just because you break compatibility. After a breaking change, they will just port their old code as fast as possible. If it builds, good, done, ship it.
The problem is that with the breaking change the assumptions the original coders had might no longer be correct. Just migrating from ASCII to UTF8 means opening a whole can of worms. Or the new API allows more or different access. Or the new API doesn't check for things the old did. Or vice versa.
Even just adding capabilities can be bad. Imagine an old file retrieval API that can only access local files. If a file is on a tape library, it just returns an error. If the new version can access those files, great, now your program hangs for fifteen minutes when such a file is requested.
dnew ยท 6 points ยท Posted at 17:01:48 on May 28, 2017 ยท (Permalink)
I work at a company that thinks this way. We have a very large code base. I'd estimate at least half of all the effort I see going on is keeping up with people breaking shit out from under you. It's not a good thing.
Stormflux ยท 7 points ยท Posted at 15:10:46 on May 28, 2017 ยท (Permalink)
Tell that to my company that refuses to switch from TFS to git.
likelyworkrelated ยท 2 points ยท Posted at 15:59:46 on May 28, 2017 ยท (Permalink)
You talking about Microsoft? They have moved to Git. Actually had a very interesting write up a few months back of how they had to create some sort of virtual file system to do it: https://techcrunch.com/2017/05/24/microsoft-now-uses-git-and-gvfs-to-develop-windows/
dnew ยท 4 points ยท Posted at 17:04:57 on May 28, 2017 ยท (Permalink)
Cool. I always thought that was the right way to do a giant codebase: git plus fuse.
alexbuzzbee ยท 0 points ยท Posted at 19:35:10 on May 28, 2017 ยท (Permalink)
What I'm wondering is what it was like to set up that Git repo. I mean,
Probably wouldn't be enough on a project that big with that many separate components.
dreamin_in_space ยท 1 points ยท Posted at 02:56:35 on May 29, 2017 ยท (Permalink)
I imagine they converted their existing repo to git rather than just... adding all that. Gotta keep the history!
BadgerMcLovin ยท 0 points ยท Posted at 16:05:15 on May 28, 2017 ยท (Permalink)
You can take TFS from my cold, dead hands
Splamyn ยท 70 points ยท Posted at 14:11:35 on May 28, 2017 ยท (Permalink)
I think java is guilty of the same thing. And I hate it everywhere. Sometimes it's really better to just make a break and do it for good that time!
(Also didn't realize it was 1.1, at 2.0 they really had the chance to do it, since there were many breaking changes. Nobody talks about < .Net 2.0 - for a good reason)
LicensedProfessional ยท 78 points ยท Posted at 15:18:06 on May 28, 2017 ยท (Permalink)
You see how well that's been working for Python :P
[deleted] ยท 23 points ยท Posted at 17:21:34 on May 28, 2017 ยท (Permalink)
python 3 is pretty good :d
GamerLeFay ยท 45 points ยท Posted at 17:53:23 on May 28, 2017 ยท (Permalink)
Yeah, and it'll be even better in 30 years when people start using it!
Decker108 ยท 16 points ยท Posted at 18:45:36 on May 28, 2017 ยท (Permalink)
I'd bet good money that Python 2 will be supported past 2020.
jackmusclescarier ยท 8 points ยท Posted at 19:21:01 on May 28, 2017 ยท (Permalink)
To the downvoter: why don't you take this chance to earn some easy money?
[deleted] ยท 4 points ยท Posted at 19:46:12 on May 28, 2017 ยท (Permalink)
It's a shame. Pip and virtualenv make it pretty easy to make the switch.
Splamyn ยท 18 points ยท Posted at 15:31:25 on May 28, 2017 ยท (Permalink)
also true, but there's no perfect way.
NaN-ers ยท 9 points ยท Posted at 18:11:07 on May 28, 2017 ยท (Permalink)
I still think it's bizarre that they keep Python 2 around, and that so many people continue to use it. They really should have just set a date and dropped it.
phantahh ยท 19 points ยท Posted at 18:27:52 on May 28, 2017 ยท (Permalink)
It does have one https://pythonclock.org/
NaN-ers ยท 7 points ยท Posted at 18:49:09 on May 28, 2017 ยท (Permalink)
I didn't realize it was being dropped in 2020. That's good news, and about time too. I think it'll be good for the community, or at the very least for me
[deleted] ยท 8 points ยท Posted at 20:11:57 on May 28, 2017 ยท (Permalink)
[deleted]
mushr00m_man ยท 8 points ยท Posted at 00:58:28 on May 29, 2017 ยท (Permalink)
I am altering the deal. Pray I don't alter it any further.
MiffTheFox ยท 3 points ยท Posted at 20:01:49 on May 28, 2017 ยท (Permalink)
Unless everyone just goes to Tauthon (a fork of 2.7 with the intent to add new features without breaking compatibility) instead.
endreman0 ยท 5 points ยท Posted at 01:24:14 on May 29, 2017 ยท (Permalink)
How do you people come up with all these clever names?
Yuzumi ยท 17 points ยท Posted at 16:26:02 on May 28, 2017 ยท (Permalink)
Every large, widely used code base does the same thing. Otherwise things would break way more often and people would never update.
toutons ยท 0 points ยท Posted at 18:51:43 on May 28, 2017 ยท (Permalink)
Wouldn't you release a version with deprecation warnings?
CUM_AND_POOP_BURGER ยท 12 points ยท Posted at 19:26:07 on May 28, 2017 ยท (Permalink)
You can do, but having to make changes to your code is expensive. Microsoft has learned the hard way over many years of being beaten up by users that it's pretty much just not worth changing something this small.
zman0900 ยท 6 points ยท Posted at 19:51:31 on May 28, 2017 ยท (Permalink)
Wise insight from CUM_AND_POOP_BURGER
CUM_AND_POOP_BURGER ยท 5 points ยท Posted at 20:25:48 on May 28, 2017 ยท (Permalink)
A rose by any other name smells just as sweet.
pr0n2 ยท 19 points ยท Posted at 17:13:20 on May 28, 2017 ยท (Permalink)
Java is 1000 times worse because they can't make up their fucking minds. I remember one update where they changed .close() to .terminate(), or something equivilant, completely on a whim breaking thousands of apps for no reason other than someone didn't like the name.
muntaxitome ยท 15 points ยท Posted at 14:42:24 on May 28, 2017 ยท (Permalink)
Developers and companies often hate having their product/code break, unless there is an extremely good reason (and even then they will hate you for it). Libraries that want a large and happy user base are often better off to at least keep compatibility.
YRYGAV ยท 7 points ยท Posted at 23:53:25 on May 28, 2017 ยท (Permalink)
Having a misleading API can cause things to break too. When you have functions that do the opposite of what they say, some percentage of people will release code that is broken because of it. Yes, shame on them for not testing, but shit happens.
You have to weigh the pros and cons of fixing it while it's new and the least amount of people have adopted it, vs. it constantly causing bugs for people for the entire lifetime of your library.
There's seldom decisions that can be made the same way every time without exception. Sometimes it's better to just pull the band-aid off and fix it for good, rather than it constantly being a sore spot for the API for years.
borick ยท 15 points ยท Posted at 17:01:39 on May 28, 2017 ยท (Permalink)
If you hate it, you've never been in a situation that caused you a massive headache because of non-backwards-compatibility API changes :(
darkpaladin ยท 11 points ยท Posted at 18:45:18 on May 28, 2017 ยท (Permalink)
God, we dropped .NET and moved to a Node front end server this rings so true. Upgrading in .NET wasn't always a picnic but it was usually straightforward, upgrading a package.json reference seems like the software equivalent of "here be dragons." Basically just leads to shrinkwrap all the things, followed by ok upgrade everything and spend an iteration figuring out what's broken every few months. Node has got some positives going for it but it all just feels so...slapdash.
TheTerrasque ยท 20 points ยท Posted at 19:48:31 on May 28, 2017 ยท (Permalink)
Well, for all it's great things, it's made by someone who felt that JS on the server was the best solution to a problem. Like.. They might be right, that's a different argument.. But you need to have a very special mind to even get to there.
MiffTheFox ยท 8 points ยท Posted at 20:03:22 on May 28, 2017 ยท (Permalink)
I have a feeling the problem was "all my server-side and client-side code are in separate programming languages" and unfortunately, unless transpiling to JS ever takes off, that is the only solution.
skreczok ยท 1 points ยท Posted at 08:41:42 on May 30, 2017 ยท (Permalink)
The thing is, the language isn't even the issue there - the issue is the mindset and approaches. You essentially need a different approach to backend than front-end, else you just end up with a pile of shit.
Switching languages isn't even that hard.
GungnirInd ยท 1 points ยท Posted at 21:06:39 on May 28, 2017 ยท (Permalink)
WebAssembly removes the need to transpile, though we're probably a few years away from it seeing widespread use, unfortunately.
evildarkon ยท 2 points ยท Posted at 02:13:45 on May 29, 2017 ยท (Permalink)
Your naรฏve optimism warms the cackles of my heart.
darkpaladin ยท 3 points ยท Posted at 16:26:33 on May 29, 2017 ยท (Permalink)
I feel like you can estimate the age of developers by their level of cynicism.
bananaboatshoes ยท 2 points ยท Posted at 02:44:55 on May 29, 2017 ยท (Permalink)
FTFY
ElusiveGuy ยท 30 points ยท Posted at 15:30:39 on May 28, 2017 ยท (Permalink)
But where do you make the breaking change?
1.1 => 2.0? Nah, too soon. Lots of people will still be on 1.1.
Oh, we're releasing 3.0. Maybe we can break it now, not many people should be on 1.1 anymore right? Oh wait... since we didn't change it for 2.0, this'll break anyone using 2.0 too, and that's everyone!
Repeat for 3.5, 4.0, etc..
You can't just say no one's using 1.1 anymore. Because every version since then has the same issue and will break. And you can't change it in the next version because everyone is using your last released version (obviously). It's not as simple as the version it was introduced in.
Of course, sometimes a breaking change is necessary. But this is such a minor one... it's just not worth the pain.
Sean1708 ยท 34 points ยท Posted at 15:52:24 on May 28, 2017 ยท (Permalink)
1 => 2 add the new api and a deprecation warning to the old. 2 => 3 only allow the old api to be used with a compiler flag. 3 => 4 remove the old api. That's about the most sensible route I can think of.
ElusiveGuy ยท 11 points ยท Posted at 18:07:14 on May 28, 2017 ยท (Permalink)
Oh, I forgot about the obsolete attribute. That would make it a bit easier - but in that case you might as well just leave the old one there, marked obsolete (with warning, not error). That's enough to encourage use of the new without actually breaking the old.
[deleted] ยท 2 points ยท Posted at 20:17:10 on May 28, 2017 ยท (Permalink)
It depends on the code base but this could be undesirable. The last thing you want is a collection of obsolete attributes crapping up your classes or even just needing to have a dependency on methods in an assembly that you aren't ever going to use again, at some point a removal of the old will be welcomed.
[deleted] ยท -10 points ยท Posted at 15:39:16 on May 28, 2017 ยท (Permalink)
[deleted]
dnew ยท 3 points ยท Posted at 17:07:17 on May 28, 2017 ยท (Permalink)
It looks like it's returning a value from an environment variable or something. They could have interpreted it as a boolean, but if the variable is set to "banana" it's hard to make a unilateral decision about what that should mean.
Also, I've used libraries that required "true" or "false" instead of a boolean because they needed an "unset" value also.
[deleted] ยท 9 points ยท Posted at 17:32:32 on May 28, 2017 ยท (Permalink)
If they didn't someone would make a comment "the reason I hate Microsoft is because I constantly have to rewrite my code to be compatible with the latest version of .net"
Can't please everybody.
DolphinsAreOk ยท 4 points ยท Posted at 20:14:41 on May 28, 2017 ยท (Permalink)
Backwards compatability is extremely important.
bananaboatshoes ยท 3 points ยท Posted at 02:38:56 on May 29, 2017 ยท (Permalink)
Let me flip this around on you, then.
If it works, it's documented, the documentation is correct, and it has low usage (which is likely) ... why bother with the headache? Who knows what kind of internal systems at Microsoft which use the far reaches of this stuff depend on that specific behavior. Just the pain of having to unblock some other team because of this is probably worth not updating it.
appropriateinside ยท 1 points ยท Posted at 20:08:00 on May 30, 2017 ยท (Permalink)
Still better than php's hodgepodge.
darkpaladin ยท 1 points ยท Posted at 18:50:09 on May 28, 2017 ยท (Permalink)
https://github.com/dotnet/core
zdakat ยท 0 points ยท Posted at 18:43:01 on May 28, 2017 ยท (Permalink)
Im not an expert,but it feels like Windows would probably work better if they refined what it did. It seems to break new applications while still having limitations in order to support absurdly old software.
mick88 ยท 5 points ยท Posted at 14:34:20 on May 28, 2017 ยท (Permalink)
This is still a thing in stringly-typed frameworks that haven't invented enums or constants yet.
SteveCCL ยท 8 points ยท Posted at 14:07:29 on May 28, 2017 ยท (Permalink)
What about "banana"?
SirButcher ยท 28 points ยท Posted at 14:17:00 on May 28, 2017 ยท (Permalink)
"banana" gives back the size of the CPU in centimetres.
Splamyn ยท 1 points ยท Posted at 14:16:12 on May 28, 2017 ยท (Permalink)
works like a charm, I just don't know how .net interpreted it :P
dnew ยท 3 points ยท Posted at 16:59:30 on May 28, 2017 ยท (Permalink)
Java 1.0 had the same documentation for Read() and Write() also. Copy-pasta, and they forgot to fix it.
SydneySedai ยท 3 points ยท Posted at 18:24:59 on May 28, 2017 ยท (Permalink)
I once wrote some javascript that needed to export the data to a string for later import on a different system.
Bools as true/false strings felt so wrong, but it worked and I still can't think of something better other than making assumptions about data structure.
nmdarkie ยท 1 points ยท Posted at 00:08:05 on May 29, 2017 ยท (Permalink)
What about 0/1
SydneySedai ยท 1 points ยท Posted at 01:42:17 on May 29, 2017 ยท (Permalink)
Too ambiguous for the parser, had values that could actually be a 1 or 0 without being a boolean.
YMK1234 ยท 5 points ยท Posted at 17:05:58 on May 28, 2017 ยท (Permalink)
Pah, you should see the shit our indian platform guys do ... I've seen anything from (all strings) true/false, T/F, y/n, yes/no, enabled/disabled, and of course partially usually sensitive with different casing.
gospelwut ยท 2 points ยท Posted at 22:59:17 on May 28, 2017 ยท (Permalink)
In the world of CI CD tools this is still the case.
fredlllll ยท 1083 points ยท Posted at 12:18:54 on May 28, 2017 ยท (Permalink)
at least the documentation mentions it. in other languages it would probably be handled like some forbidden knowledge that only the grand masters of the language are allowed to know and understand
Flosus ยท 532 points ยท Posted at 13:07:59 on May 28, 2017 ยท (Permalink)
Did you ever hear the tragedy of Senior-Developer Plagueis The Wise? I thought not. Itโs not a story the trainers would tell you. Itโs a urban legend. Senior-Developer Plagueis was a Dark user of VB.Net, so powerful and so wise he could use the bitwise operator to influence the servers to create useful applicationsโฆ He had such a knowledge of the development environment that he could even keep the ones he cared about from jitting...
JustChilling_ ยท 134 points ยท Posted at 14:14:24 on May 28, 2017 ยท (Permalink)
He could actually save people from jitting?
esfraritagrivrit ยท 103 points ยท Posted at 14:17:08 on May 28, 2017 ยท (Permalink)
Is it possible to learn this skill?
Mirgle ยท 138 points ยท Posted at 14:23:07 on May 28, 2017 ยท (Permalink)
Not from reddit.
green_meklar ยท 37 points ยท Posted at 18:43:25 on May 28, 2017 ยท (Permalink)
Time to hit StackOverflow then.
pauix ยท 8 points ยท Posted at 06:36:54 on May 29, 2017 ยท (Permalink)
It's treason then.
Cyniikal ยท 7 points ยท Posted at 07:39:06 on May 29, 2017 ยท (Permalink)
MATHEMATICAL SCREECHING
IanPPK ยท 2 points ยท Posted at 00:17:22 on May 30, 2017 ยท (Permalink)
I have the class scope!
NotFromReddit ยท 10 points ยท Posted at 00:18:58 on May 29, 2017 ยท (Permalink)
?
Steven__hawking ยท 48 points ยท Posted at 14:36:07 on May 28, 2017 ยท (Permalink)
Noob question: what is jitting?
dnew ยท 51 points ยท Posted at 16:57:32 on May 28, 2017 ยท (Permalink)
The compiler compiles everything down to what's essentially a fake machine language that doesn't match any real computer. That fake machine language is fast to interpret, because all the operations are (usually) pretty simple. That fake machine language is often called "bytcode" because in the original languages that did this (Smalltalk, UCSD Pascal) back in the 80s, each machine code instruction was one byte long. The .NET programs call it
ILM, Intermediate <mumble>CIL, Common Interpreted Language.Since it's fake, you can compile your program once and run it anywhere there's an interpreter for that fake code. Java's version, for example, compiles into ".class" files, and uses the JVM "Java Virtual Machine" to interpret it. That's how you get Java that can "run on any machine." The JVM gets ported to a new computer, and then all existing Java programs can work on that new computer (in theory).
Nowadays, the fake machine code gets interpreted, but if the interpreter sees the same routine getting called more than a handful of times, it will "just in time" translate it directly into the machine code of the computer it happens to be running on, as it's running. So after that, it runs full speed.
.NET goes one step farther. When you install a compiled .NET program, there's a background task that eventually compiles the whole thing and stores the machine code back onto the disk, so once that finishes, you don't have to take the time to JIT any more. That's one reason why after some Windows Updates, you might notice your disk flicking around for a while.
MGSsancho ยท 2 points ยท Posted at 23:00:28 on May 28, 2017 ยท (Permalink)
Same thing after an android update when it says updating programs? Recompiled for your phone?
dnew ยท 4 points ยท Posted at 23:06:37 on May 28, 2017 ยท (Permalink)
I believe that's essentially the same thing going on there, but I'm just guessing based on vague knowledge.
Somethings things on a PC will say something similar, like after you install a Steam game, but I think in many of those cases it's just defragging the files it just installed, so they're all close together on the disk.
Kok_Nikol ยท 1 points ยท Posted at 12:02:28 on May 29, 2017 ยท (Permalink)
I didn't know why it was called bytecode, thanks!
v1rous ยท 49 points ยท Posted at 14:41:29 on May 28, 2017 ยท (Permalink)
Just In Time compilation. .NET assemblies are usually(?) not raw machine code but actually in an intermediate form, kinda like Java's .class bytecode representation.
vendetta2115 ยท 28 points ยท Posted at 18:44:54 on May 28, 2017 ยท (Permalink)
If there's a known issue, would it be a jitter bug?
v1rous ยท 4 points ยท Posted at 19:08:14 on May 28, 2017 ยท (Permalink)
Hell, have an upvote
[deleted] ยท -2 points ยท Posted at 19:01:23 on May 28, 2017 ยท (Permalink)
[deleted]
PunishableOffence ยท -5 points ยท Posted at 19:31:32 on May 28, 2017 ยท (Permalink)
(doing the jitterbug) is not allowed. Heil Trump!
celluj34 ยท 6 points ยท Posted at 16:48:48 on May 28, 2017 ยท (Permalink)
Correct. .Net programs compile to IL code, which is then JITed upon startup.
Existential_Owl ยท 48 points ยท Posted at 14:12:28 on May 28, 2017 ยท (Permalink)
qwertyslayer ยท 17 points ยท Posted at 15:55:51 on May 28, 2017 ยท (Permalink)
>_o
Perfect_spot ยท 31 points ยท Posted at 13:32:48 on May 28, 2017 ยท (Permalink)
/r/PrequelMemes is leaking
okmkz ยท 123 points ยท Posted at 14:12:33 on May 28, 2017 ยท (Permalink)
/r/PrequelMemes is always fucking leaking
neinherz ยท 113 points ยท Posted at 14:52:37 on May 28, 2017 ยท (Permalink)
I don't like /r/prequelmemes. They're coarse and rough and irritating and they get everywhere.
DefinitelyNotASpy_ ยท 43 points ยท Posted at 15:04:50 on May 28, 2017 ยท (Permalink)
It's treason then.
TheAmazingPencil ยท 15 points ยท Posted at 15:51:45 on May 28, 2017 ยท (Permalink)
I'll try filtering, that's a good trick!
AlGoreBestGore ยท 12 points ยท Posted at 15:40:13 on May 28, 2017 ยท (Permalink)
Then you are lost!
BenjaminGeiger ยท 25 points ยท Posted at 14:50:56 on May 28, 2017 ยท (Permalink)
/r/PrequelMemes is a goddamned sieve.
Existential_Owl ยท 19 points ยท Posted at 15:01:20 on May 28, 2017 ยท (Permalink)
/r/PrequelMemes was a mistake
xXISCOPEIXx ยท 2 points ยท Posted at 02:18:31 on May 29, 2017 ยท (Permalink)
It's more like a torrential downpour/flood at this point
AGameOfBeanbags ยท 6 points ยท Posted at 16:10:15 on May 28, 2017 ยท (Permalink)
A surprise, to be sure, but a welcome one.
Thecheesecakeman ยท 6 points ยท Posted at 15:13:04 on May 28, 2017 ยท (Permalink)
r/didyoueverhear
humblevladimirthegr8 ยท 15 points ยท Posted at 16:32:15 on May 28, 2017 ยท (Permalink)
Oh my, a subreddit just for that meme? A surprise, to be sure, but a welcome one.
sneakpeekbot ยท 3 points ยท Posted at 15:13:11 on May 28, 2017 ยท (Permalink)
Here's a sneak peek of /r/Didyoueverhear using the top posts of all time!
#1: Did you ever hear the tragedy of Albert Einstein the wise?
#2: Did you ever hear the tragedy of Google Translate?
#3: Did yousa ever hear da bombad tragedy of Darth Plagueis "the Wise"?
I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out
lelarentaka ยท 0 points ยท Posted at 13:53:21 on May 28, 2017 ยท (Permalink)
replace trainers with recruiters or headhunters.
strange_and_norrell ยท -1 points ยท Posted at 16:11:20 on May 28, 2017 ยท (Permalink)
I JIT my pants!
Twirrim ยท 60 points ยท Posted at 15:31:56 on May 28, 2017 ยท (Permalink)
Like python's optimize flag. If you look in the documentation around the flag, it just tells you it applies some optimisations, but doesn't detail what, or link to the place in the manual where it does. It's highly logical that you'd go looking for information under modules, right? https://docs.python.org/2.7/tutorial/modules.html#compiled-python-files
If you do happen to stumble across it, you discover it drops asserts.. And that's about it.
fredlllll ยท 38 points ยท Posted at 15:36:19 on May 28, 2017 ยท (Permalink)
currently have to work with python... its a nightmare of bad/incomplete documentation. "but what exceptions does it throw when this and that?" docs: "heck if i know"
dnew ยท 24 points ยท Posted at 16:58:56 on May 28, 2017 ยท (Permalink)
Try using Blender. I've seen people release features, and others saying "Please, just give me the files you used to test the feature, and I'll figure out how it works and write the documentation for you." And no answer...
fredlllll ยท 8 points ยท Posted at 17:45:05 on May 28, 2017 ยท (Permalink)
blender.. a nightmare of key combinations... sucks when you only occasionally work with it and cant remember shit from last time and have to look up every single thing you want to do "how do i set the rotation to exactly 90ยฐ??? ohhh select the object, press n and a window comes up..."
[deleted] ยท 4 points ยท Posted at 18:16:28 on May 28, 2017 ยท (Permalink)
why would you bother with the properties menu when you can just press R like usual and then type 90 for 90ยฐ?
fredlllll ยท 1 points ยท Posted at 18:23:13 on May 28, 2017 ยท (Permalink)
feels so uncertain to me. i rather just click a textbox, put my number in, press enter. not hope that blender just understood what i wanted to do. i guess the reason that this function is so hidden is that blender is mostly used for artsy stuff where it doesnt matter if its exactly axis aligned. i usually work with CAD models or other stuff where exact rotations are important.
[deleted] ยท 5 points ยท Posted at 18:32:20 on May 28, 2017 ยท (Permalink)
...that's bull, to be completely honest. You can restrict axes just as easily by pressing X, Y, or Z (literally the names of the axes) during rotation, I don't see how that seems unreliable... and hidden? It's one keypress, not really a complex combination by any means
leadzor ยท 41 points ยท Posted at 16:06:13 on May 28, 2017 ยท (Permalink)
Python. Great language and environment, with a good community. Documentation written by a lazy middle aged demon.
fredlllll ยท 10 points ยท Posted at 17:39:35 on May 28, 2017 ยท (Permalink)
well i might argue about the "great language" part, but yeah community is good and there are tons of libs/modules, but docs are lacking basic things like talking about special cases or exceptions
d3matt ยท 5 points ยท Posted at 18:07:33 on May 28, 2017 ยท (Permalink)
I'm a bit curious what language you would say has good documentation at that level... I haven't found one yet... At least with Python, it's fairly trivial to find the library code (or even the underlying C code) if you need to...
fredlllll ยท 8 points ยท Posted at 18:25:12 on May 28, 2017 ยท (Permalink)
i usually work with c#, and the doc usually mentions what happens when for example a file is missing, or there is no permission. java (not that i like it) even forces exception documentation in its syntax. so the signature contains at least a mention of all the possible exceptions that can be thrown (id love to see such a feature as optional in c#, so there is an easy way to document exceptions in code, but you dont have to document every argumentexception ever)
TheOccasionalTachyon ยท 2 points ยท Posted at 02:03:44 on May 29, 2017 ยท (Permalink)
Not all possible exceptions, all possible checked exceptions โ that is, all exceptions that inherit from
Exceptionbut notRuntimeException.bless-you-mlud ยท 5 points ยท Posted at 20:14:16 on May 28, 2017 ยท (Permalink)
Not a language per se, but if you're used to man files on a Unix/Linux platform the Python documentation does feel... deficient.
Bartweiss ยท 1 points ยท Posted at 19:33:16 on May 28, 2017 ยท (Permalink)
Ironically, Java is pretty thorough just due to age. You have to read the source more often than I'd like, but it sometimes actually warns for unexpected pitfalls, and it hardly ever lies the way Microsoft and Android docs do.
SnowdensOfYesteryear ยท 5 points ยท Posted at 20:02:14 on May 28, 2017 ยท (Permalink)
To be fair it's probably a PITA to figure out that stuff on a duck typed language. Ruby is the same way
fredlllll ยท 3 points ยท Posted at 21:28:05 on May 28, 2017 ยท (Permalink)
yup, which is why i usually use statically and strongly typed languages where i dont have to deal with the bogus that dynamic and weak typing brings with itself. so many hours wasted, which could be saved by just checking for such things at compile time
[deleted] ยท -6 points ยท Posted at 18:50:29 on May 28, 2017 ยท (Permalink)
[deleted]
fredlllll ยท 14 points ยท Posted at 18:57:42 on May 28, 2017 ยท (Permalink)
but maaayyyybe i dont have time to search through the source all the time when i want to know what exceptions are thrown? i need to get the product going, and searching code for answers that should be in the documentation is quite annoying
gott_modus ยท 3 points ยท Posted at 04:11:06 on May 29, 2017 ยท (Permalink)
Bruh Python be chill yo i mean i roll that from time to time and shit but it's just a language and shitty, hard to process code is written in it all the time just like any other language furreal tho
Golden_Age_Fallacy ยท 1 points ยท Posted at 06:05:53 on May 29, 2017 ยท (Permalink)
Python done right, as in proper PEP8, sure. I've seen a lot of shoddily written Python code that would be a whole lot more useful to expand upon, with documentation.
anacrolix ยท 20 points ยท Posted at 13:54:21 on May 28, 2017 ยท (Permalink)
It would be documented on Twitter
CrazedToCraze ยท 45 points ยท Posted at 14:01:30 on May 28, 2017 ยท (Permalink)
"documented" on Stackoverflow*
goldfishpaws ยท 9 points ยท Posted at 14:35:49 on May 28, 2017 ยท (Permalink)
Once upon a time, deep in MSDN when it was a thing on a stack of CD's, I came across a the initials WWMRD "What Would Molly Ringwold Do".
mrstinkyfingers ยท 4 points ยท Posted at 16:55:12 on May 28, 2017 ยท (Permalink)
When you have to grep the source code.
fredlllll ยท 3 points ยท Posted at 17:45:35 on May 28, 2017 ยท (Permalink)
IF there is sourcecode to grep
ZeKWork ยท 86 points ยท Posted at 13:38:23 on May 28, 2017 ยท (Permalink)
Link to the official documentation : https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assemblynameflags.enablejitcompileoptimizer?view=netframework-4.7
shasum ยท 51 points ยท Posted at 13:50:01 on May 28, 2017 ยท (Permalink)
I was desperately hoping for this to be deprecated, but alas no. Hideous.
settleddown ยท 125 points ยท Posted at 15:26:39 on May 28, 2017 ยท (Permalink)
"So, did you roll out all the new optimizations?"
"Yes, sir!"
"And how well does it work?"
"It makes things run 10 times slower"
"Our optimizations.. make thing 10 times slower?"
"Yes sir!"
"Wait a minute... I got this."
jausdyquo ยท 46 points ยท Posted at 16:50:49 on May 28, 2017 ยท (Permalink)
Wasn't there a blog post by a Google developer who had exactly that situation, because the optimizations caused people with slow connections/browsers to be able to use YouTube at all?
TheThickPizza ยท 92 points ยท Posted at 17:20:03 on May 28, 2017 ยท (Permalink)
I remember this article! It took me forever to find, but here it is: http://blog.chriszacharias.com/page-weight-matters
[1].It's a great, quick read.
[1]
Page Weight Matters
Double_A_92 ยท 9 points ยท Posted at 19:31:53 on May 28, 2017 ยท (Permalink)
How were those people with potato internet supposed to even watch the video, if they already had problems loading the site?
lx45803 ยท 11 points ยท Posted at 20:31:50 on May 28, 2017 ยท (Permalink)
144p and patience.
SBC_BAD1h ยท 1 points ยท Posted at 01:38:11 on May 29, 2017 ยท (Permalink)
Me on dairy queen wifi ๐. Seriously, it's like they have a wireless 56k modem back there...
jausdyquo ยท 7 points ยท Posted at 17:30:29 on May 28, 2017 ยท (Permalink)
Thanks for finding it; I tried searching for various combinations of "performance", "youtube", "javascript", "countries", and "developer blog", but didn't think of searching for "page weight".
hor_izon ยท 2 points ยท Posted at 21:18:14 on May 28, 2017 ยท (Permalink)
MrMeasurmentMan ยท 1 points ยท Posted at 19:36:24 on May 28, 2017 ยท (Permalink)
I dont understand. How can you stream a video if loading the page takes two minutes?
ihahp ยท 13 points ยท Posted at 19:59:25 on May 28, 2017 ยท (Permalink)
just wait .....
Creshal ยท 5 points ยท Posted at 00:48:30 on May 29, 2017 ยท (Permalink)
Very patiently.
And there's lots of "videos" where people share music albums with a static image as video feed. Those have fairly small overhead over pure music streamsโฆ if you can load the page in the first place.
PelicanPop ยท 0 points ยท Posted at 17:36:44 on May 28, 2017 ยท (Permalink)
I had always heard about this but never got to actually read it. Thanks for finding it!
brokedown ยท 230 points ยท Posted at 14:51:20 on May 28, 2017 ยท (Permalink)
AKernelPanic ยท 73 points ยท Posted at 14:57:11 on May 28, 2017 ยท (Permalink)
var isOn: Bool { return !_isOn }
jausdyquo ยท 27 points ยท Posted at 16:30:35 on May 28, 2017 ยท (Permalink)
Distractiion ยท 20 points ยท Posted at 18:31:01 on May 28, 2017 ยท (Permalink)
SoftCoreDude ยท 21 points ยท Posted at 19:22:28 on May 28, 2017 ยท (Permalink)
Raknarg ยท 13 points ยท Posted at 21:08:00 on May 28, 2017 ยท (Permalink)
asdfkjasdhkasd ยท 5 points ยท Posted at 02:39:15 on May 29, 2017 ยท (Permalink)
;CptSpockCptSpock ยท 12 points ยท Posted at 20:23:34 on May 28, 2017 ยท (Permalink)
function isOn(){var retVal = "false";if( isOn == true ){retVal = "true";} else if( isOn != true ){retVal = "false";}return retVal != "false";}BullRob ยท 2 points ยท Posted at 03:40:51 on May 29, 2017 ยท (Permalink)
function isOn(){var n="false";return 1==isOn?n="true":1!=isOn&&(n="false"),"false"!=n}
Astrokiwi ยท 1 points ยท Posted at 09:51:24 on May 29, 2017 ยท (Permalink)
Ghi102 ยท 0 points ยท Posted at 17:37:18 on May 28, 2017 ยท (Permalink)
So
BullRob ยท 6 points ยท Posted at 17:52:56 on May 28, 2017 ยท (Permalink)
So
Ghi102 ยท 1 points ยท Posted at 18:10:52 on May 28, 2017 ยท (Permalink)
Not quite, isOn could be a private member (say in a Java class), so you might not have direct access to it. It's also not a function anymore so it is not equivalent.
aidenator ยท 6 points ยท Posted at 19:08:22 on May 28, 2017 ยท (Permalink)
You're definitely correct. Global variables can get messy real fast so it's nice to have private variables only accessible by a function. All these downvoters don't like object oriented programming I guess.
[deleted] ยท 1 points ยท Posted at 04:19:46 on May 29, 2017 ยท (Permalink)
They just read java and got triggered.
Ayerys ยท 1 points ยท Posted at 21:18:37 on May 28, 2017 ยท (Permalink)
Too easy :/
leadzor ยท 3 points ยท Posted at 16:08:27 on May 28, 2017 ยท (Permalink)
Ayerys ยท 2 points ยท Posted at 21:19:14 on May 28, 2017 ยท (Permalink)
Is there another language than OCaml that use "let" ?
laserBlade ยท 3 points ยท Posted at 00:44:42 on May 29, 2017 ยท (Permalink)
Haskell, F#...
jaggadakoo ยท 3 points ยท Posted at 01:15:46 on May 29, 2017 ยท (Permalink)
BASIC
ZugNachPankow ยท 2 points ยท Posted at 22:10:08 on May 28, 2017 ยท (Permalink)
ES6 Javascript.
hai1337 ยท 2 points ยท Posted at 02:57:49 on May 29, 2017 ยท (Permalink)
Rust
leadzor ยท 1 points ยท Posted at 22:14:05 on May 28, 2017 ยท (Permalink)
JavaScript 2015 or ES6 (same thing).
DanRoad ยท 1 points ยท Posted at 00:26:20 on May 29, 2017 ยท (Permalink)
Haskell, F#
cosmo7 ยท 1 points ยท Posted at 00:52:18 on May 29, 2017 ยท (Permalink)
Visual Basic
magion ยท 1 points ยท Posted at 01:10:42 on May 29, 2017 ยท (Permalink)
English uses it, fairly certain.
hai1337 ยท 1 points ยท Posted at 02:58:47 on May 29, 2017 ยท (Permalink)
bless-you-mlud ยท 15 points ยท Posted at 20:22:07 on May 28, 2017 ยท (Permalink)
No parameters? That can't be right. Because whenever I see a Microsoft method being called it usually looks something like
dreamin_in_space ยท 3 points ยท Posted at 04:25:36 on May 29, 2017 ยท (Permalink)
That is so sadly true.
Like, for fucks sake introduce a variant with enums.
bless-you-mlud ยท 3 points ยท Posted at 09:13:20 on May 29, 2017 ยท (Permalink)
Or add a few functions that do some specific version of TheThing, like
doTheThingNow()ordoTheThingSideways(). You might end up with a long list of functions for all the combinations (man -k printf, anyone?) but at least your code has a chance of being understandable. Maybe even readable.brokedown ยท 4 points ยท Posted at 20:31:35 on May 28, 2017 ยท (Permalink)
Yeah this is a Linux port.
green_meklar ยท 3 points ยท Posted at 18:48:35 on May 28, 2017 ยท (Permalink)
yzRPhu ยท 24 points ยท Posted at 14:07:55 on May 28, 2017 ยท (Permalink)
r/softwaregore
regendo ยท 44 points ยท Posted at 15:41:43 on May 28, 2017 ยท (Permalink)
Shouldn't it also be
EnableJITCompileOptimizer, with a capital C?ClysmiC ยท 61 points ยท Posted at 16:56:07 on May 28, 2017 ยท (Permalink)
I've always thought
EnableJitCompileOptimizerwas the most elegant way to handle acronyms. Especially if you have two acronyms in a row. Like which of the following is better (ignoring the stupidity of the name):TCPIPFTPClientorTcpIpFtpClient[deleted] ยท 26 points ยท Posted at 17:14:02 on May 28, 2017 ยท (Permalink)
[deleted]
--xe ยท 9 points ยท Posted at 18:19:45 on May 28, 2017 ยท (Permalink)
I think the two letters thing is bullshit.
SarahC ยท 2 points ยท Posted at 17:14:29 on May 28, 2017 ยท (Permalink)
I'm using this from now on!
jsideris ยท 8 points ยท Posted at 16:06:02 on May 28, 2017 ยท (Permalink)
Someone fucked up.
isaacarsenal ยท 3 points ยท Posted at 18:08:59 on May 28, 2017 ยท (Permalink)
Twice.
leadzor ยท 48 points ยท Posted at 16:12:23 on May 28, 2017 ยท (Permalink)
At work we have database field named "boolean" that represents if a quality parameter supports a simple "yes/no" value, or a quantifiable one (usually a percentage or a quantity). When "boolean" is set to 1, it represents a quantifiable parameter, when set to 0, represents a "yes/no" (aka boolean) parameter.
IronManTim ยท 16 points ยท Posted at 16:51:00 on May 28, 2017 ยท (Permalink)
Please tell me you're joking
leadzor ยท 12 points ยท Posted at 16:57:25 on May 28, 2017 ยท (Permalink)
No. Lines 280 and 293. That's the model for the ORM we're using, at least that gives us a True/False 'interface' on top of MySQL's TinyInts.
paperock ยท 2 points ยท Posted at 17:16:20 on May 28, 2017 ยท (Permalink)
wait why overwrite the built-in function
typethough?leadzor ยท 1 points ยท Posted at 17:21:21 on May 28, 2017 ยท (Permalink)
This represents a database table, so it represents column named
type. They simply didn't want to name the column "quality_control_type" to not cause confusion with the QualityControlType model bellow.Remmes- ยท 1 points ยท Posted at 17:02:40 on May 28, 2017 ยท (Permalink)
WHY...
green_meklar ยท 7 points ยท Posted at 18:53:09 on May 28, 2017 ยท (Permalink)
For the glory of Satan, of course!
Remmes- ยท 0 points ยท Posted at 18:54:00 on May 28, 2017 ยท (Permalink)
Nooooo
leadzor ยท 1 points ยท Posted at 17:10:30 on May 28, 2017 ยท (Permalink)
I believe previously it actually meant if a quality parameter was a boolean, and only recently they changed the semantics to mean that a parameter is quantifiable. It's a matter of field name change, but still makes a few heads turn sideways. The data on the database had already it's value inverted to accommodate the new meaning.
the_morat ยท 0 points ยท Posted at 23:08:58 on May 28, 2017 ยท (Permalink)
I choose to believe this is not true. (I need to keep my SAN points.)
leadzor ยท 1 points ยท Posted at 00:23:54 on May 29, 2017 ยท (Permalink)
I'm sorry.
[deleted] ยท 21 points ยท Posted at 18:48:11 on May 28, 2017 ยท (Permalink)
[deleted]
BeakerAU ยท 1 points ยท Posted at 21:31:05 on May 28, 2017 ยท (Permalink)
We just make sure we hire Technical writers named "Self".
YMK1234 ยท 17 points ยท Posted at 17:01:33 on May 28, 2017 ยท (Permalink)
Classic bug that escaped to the release version, and now you can't change it as a bunch of stuff depends on it. Sucks but just breaking an unknown number of clients is generally not an option, so the best you can do is document it.
javelinRL ยท 19 points ยท Posted at 18:27:28 on May 28, 2017 ยท (Permalink)
Absolutely not: the best you can do is offer the correct option as new field, with the right name, deprecate the old one and remove it in a release or two. Let's be honest, checking two boolean flags to see which one is on its non-default value (or both), shouldn't be much of a hassle anywhere and this is the most obvious example of a deprecated field I could ever dream of.
YMK1234 ยท 10 points ยท Posted at 18:29:13 on May 28, 2017 ยท (Permalink)
Lol, how archaic is that? Just have one property as a mask over the other ...
And yes, you still need to document that LegacyField has an inverted behaviour.
DropTableAccounts ยท 10 points ยท Posted at 19:05:39 on May 28, 2017 ยท (Permalink)
This reminds me of Microsofts tri-state booleans with 5 values of which 3 are not supported...
relevantpicsonly ยท 26 points ยท Posted at 11:30:47 on May 28, 2017 ยท (Permalink)
It was probably supposed to say enable jit compilation suppression or something, but that would be deemed too long :P
wolf2600 ยท 4 points ยท Posted at 15:19:23 on May 28, 2017 ยท (Permalink)
Looks like SOMEONE didn't read the documentation.
dedicated2fitness ยท 1 points ยท Posted at 18:20:58 on May 28, 2017 ยท (Permalink)
i always think i'm taking crazy pills coz whenever i tell people microsoft documentation reads like shit compared to other languages they disagree(not the latest stuff, like 2 generations back - stuff that is still in use in corporate life but doesn't have rockstar devs constantly looking at it)
i fucking despise microsoft code documentation.
feels obtuse as fuck
AceJohnny ยท 2 points ยท Posted at 23:29:46 on May 28, 2017 ยท (Permalink)
OK but
Why?
I mean there must've been a number of process failures for this to end up as published. Who designed the API in the first place? Who implemented it? Who tested it?
There must've been a number of people internally who saw this and went "WTF". What happened systemically for it to remain uncorrected?
THe most obvious thing to come to mind is someone made a typo and put in "==" instead of "!=", and later one when the mistake was noticed, the code was too tied into the rest of the system to change it. Which is moronic, obviously, but at least there'd be some logic left in the world.
sphks ยท 1 points ยท Posted at 17:37:58 on May 28, 2017 ยท (Permalink)
It reminds me the Sony P910i implementation of the Bluetooth API (JSR82). It was something like : "If the result is 'error', everything is alright. If the result is 'everything is alright', it's an error."
Centimane ยท 4 points ยท Posted at 17:44:28 on May 28, 2017 ยท (Permalink)
Oh man, the Microsoft answer file reference is bad like this.
Another one they do is:
They flip flop between using string boolean values, and integer boolean values. Not sure if they're interchangeable, but their documentation only states one form is valid.
boxingdog ยท 1 points ยท Posted at 23:29:54 on May 28, 2017 ยท (Permalink)
Happened recently with a game called 'Broforce', in that game enabling steam multiplayer disabled it.
[deleted] ยท 1 points ยท Posted at 01:21:52 on May 29, 2017 ยท (Permalink)
Microsoft be like yea yea it doesnt make any sense... but everybody updated to windows 10 right?
Technofrood ยท 1 points ยท Posted at 02:58:58 on May 29, 2017 ยท (Permalink)
Reminds me of the Utf8Encoding constructor argument that caught me out the other day, encoderShouldEmitUTF8Identifier which I read as encoderShouldOmitUTF8Identifier.
newocean ยท -2 points ยท Posted at 19:17:23 on May 28, 2017 ยท (Permalink)
NEVER name your company after your penis.
ReallyHadToFixThat ยท 0 points ยท Posted at 17:28:42 on May 28, 2017 ยท (Permalink)
They also have a definition for a 64 bit DWord.
Hullu2000 ยท 0 points ยท Posted at 19:04:23 on May 28, 2017 ยท (Permalink)
/r/windowsmemes?
looperhacks ยท 0 points ยท Posted at 19:34:18 on May 28, 2017 ยท (Permalink)
I think I remember a php function in some old Wordpress versions that (as named) should go to the next page in the pagination, but did (as documented) exactly the opposite. Can't find it, though.
[deleted] ยท -7 points ยท Posted at 13:18:39 on May 28, 2017 ยท (Permalink)
[deleted]
htmlcoderexe ยท 5 points ยท Posted at 13:35:11 on May 28, 2017 ยท (Permalink)
/r/lolphp is leaking again
sneakpeekbot ยท 5 points ยท Posted at 13:35:17 on May 28, 2017 ยท (Permalink)
Here's a sneak peek of /r/lolphp using the top posts of the year!
#1: PHP and ISO 8601 (from php.net, link in comments) | 11 comments
#2: Even comics make fun of PHP | 39 comments
#3: 1...1 is 10.1 | 8 comments
I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out
comrade-jim ยท -121 points ยท Posted at 15:00:08 on May 28, 2017 ยท (Permalink)
Anyone who uses software or languages created by microsoft is a cuckold. I will gladly take the shill downvotes for pointing it out (you can tell they're shills because my profile karma never decreases, only the karma on this specific comment. This is because reddits fraud detection reverses bot votes on user profiles).
lunaroyster ยท 39 points ยท Posted at 16:08:41 on May 28, 2017 ยท (Permalink)
77.25% of your comment is about your comment.
Noumenon72 ยท 13 points ยท Posted at 16:24:30 on May 28, 2017 ยท (Permalink)
I can tell this is a shill comment because bot comments include fabricated percentages 87.3% of the time.
jsideris ยท 25 points ยท Posted at 16:07:54 on May 28, 2017 ยท (Permalink)
I like C#. Not a cuckold. Not a bot. Not a shill.
cl0wnshoes ยท 14 points ยท Posted at 16:27:47 on May 28, 2017 ยท (Permalink)
Same. I've used python, ruby, node, dabbled in java/go. I keep coming back to c#.
SarahC ยท 2 points ยท Posted at 17:17:01 on May 28, 2017 ยท (Permalink)
I think C#, have to use VB....
senatorpjt ยท -4 points ยท Posted at 16:45:58 on May 28, 2017 ยท (Permalink)
Nobody ever says they are.
jsideris ยท 3 points ยท Posted at 16:48:15 on May 28, 2017 ยท (Permalink)
Don't bots usually have "I'm a bot" right in the signature?
carlinco ยท 6 points ยท Posted at 16:41:40 on May 28, 2017 ยท (Permalink)
I don't think they separate between bots and non-bots on that level. That would only be possible if they deliberately colluded with the bot-makers. But there's another feature of reddit that caps downvotes for your profile. Helps others distinguish between troll accounts and people who just get heavily downvoated every once in a while...
elbarto2811 ยท 6 points ยท Posted at 17:53:20 on May 28, 2017 ยท (Permalink)
Yeah I'm crying all the way to the bank dude.
javelinRL ยท 3 points ยท Posted at 18:31:04 on May 28, 2017 ยท (Permalink)
Notice how your profile karma never increases either when people upvote your comments! THIS IS ABSOLUTE PROOF THAT YOU'RE A BOT YOURSELF /s
Spoiler: that's not how reddit works. Better luck next time.
Philboyd_Studge ยท 2 points ยท Posted at 22:00:04 on May 28, 2017 ยท (Permalink)
I wonder, if I downvote you, when exactly will my check come in?
javelinRL ยท 1 points ยท Posted at 20:45:54 on May 29, 2017 ยท (Permalink)
Thank you for your cooperation. We have finally been able to access your account and confirm your downvote. Please proceed to the link below for payment:
student_activist ยท 7 points ยท Posted at 16:15:30 on May 28, 2017 ยท (Permalink)
Either this is sarcasm or t_d is leaking contamination.
totallynormalasshole ยท 1 points ยท Posted at 17:03:25 on May 28, 2017 ยท (Permalink)
Cuckold. Really setting yourself apart from everyone else by using the whole word. 5/7
DarkNinja3141 ยท -14 points ยท Posted at 16:32:34 on May 28, 2017 ยท (Permalink)
JIT? Is that how some people say git?
SarahC ยท 11 points ยท Posted at 17:16:18 on May 28, 2017 ยท (Permalink)
Just In Time
DarkNinja3141 ยท 0 points ยท Posted at 23:11:58 on May 28, 2017 ยท (Permalink)
woosh
half_bot_have_not ยท -9 points ยท Posted at 17:10:15 on May 28, 2017 ยท (Permalink)
Unless you mean that Microsoft might be referring to Bill Gate's unerect penis, an assembly flag refers to the fact that the designated attribute is either true OR false. Hence it being zero by default, and then referring to its 'exact' opposite.