|
I'm currently redoing code that was solely developed by tech lead that has left and am more and more surprised how culture of "let's add more poo poo on top of existing poo poo and never refactor" can result in code that doesn't really do anything. I really want my next company to not be "hey, we've written this code, but we also took heavy drugs while doing this, so search product functionality is actually done in user class". I guess third time is the charm... although new place doesn't have any unit tests, so lol. canis minor fucked around with this message at 12:48 on Jun 15, 2018 |
# ? Jun 15, 2018 12:42 |
|
|
# ? May 31, 2024 04:13 |
|
quote:To avoid login errors, please do not use any of the following special characters in your password: % & + ¥ £ ¢ Also do not use bullet points or the Euro currency symbol. Bonus points: it's a scrolling marquee. That isn't on the create password page:
|
# ? Jun 15, 2018 14:38 |
"You must use symbols in your password, but NO NOT THAT ONE!"
|
|
# ? Jun 15, 2018 14:58 |
|
Jeez, just tell me the exact password phrase you want me to use.
|
# ? Jun 15, 2018 15:17 |
Why are ' and ’ two very real things
|
|
# ? Jun 15, 2018 15:41 |
|
Polio Vax Scene posted:Why are ' and ’ two very real things Not only two! https://en.wikipedia.org/wiki/Quotation_mark#Unicode_code_point_table
|
# ? Jun 15, 2018 15:52 |
|
Polio Vax Scene posted:Why are ' and ’ two very real things Are you programming in MS Word? That poo poo almost never comes outside of MS products.
|
# ? Jun 15, 2018 17:07 |
Some fancy mcfancypants entered their first name as Le'douche into their data entry (Not actually le'douche but you get the drift) and the data entry does not correct this e: It is a Microsoft product. Not word though.
|
|
# ? Jun 15, 2018 17:14 |
|
eth0.n posted:
Kinda makes you wonder how seriously ADT takes security in the first place.
|
# ? Jun 15, 2018 17:30 |
|
Mooey Cow posted:For instance, every local variable you use in an iterator function will/can be made into a member variable in a hidden class so it can preserve state between yields. I believe async/await does something similar. If you're careless or don't know about this, causing enormous allocations from what looks like fairly innocuous stuff is very easy. While it's true that variables can be captured in a generated type, you'd also have to be capturing hundreds of variables before the class ends up in multi-kb territory. Which means that you have hundreds of variables in method scope to capture in the first place, which seems to be the real problem. Also some of the genetrated types are structs, so instead of a variable on the stack, you end up with a generated struct on the stack with the variable in it, so there's not that much difference. Your point about templates is true though. There is some tooling out there to generate code for that sort of stuff, but that's kind of a poo poo solution compared to templates. However, I do wonder if C# is the right tool for your job if you frequently run into that sort of issue. Math heavy stuff has never really been one of C#'s strengths.
|
# ? Jun 15, 2018 17:47 |
|
What kind of data do you think a column named source_id would store? If you answered “an integer” or “a uuid”, you are wrong! It’s actually a big ol’ minimally structured string of arbitrary key-value data.
|
# ? Jun 15, 2018 18:13 |
|
Polio Vax Scene posted:Some fancy mcfancypants entered their first name as Le'douche into their data entry (Not actually le'douche but you get the drift) and the data entry does not correct this What would need to get “corrected” about this?
|
# ? Jun 15, 2018 18:16 |
Presumably it got stored as Le’douche and trying to do operations on Le'douche doesn't work, or entered as Le’douche but got stored as Le?douche or Le�douche or code:
Or ? hailthefish fucked around with this message at 18:27 on Jun 15, 2018 |
|
# ? Jun 15, 2018 18:24 |
|
Pollyanna posted:What kind of data do you think a column named source_id would store? If you answered “an integer” or “a uuid”, you are wrong! It’s actually a big ol’ minimally structured string of arbitrary key-value data. This reminds me that some time ago I've discovered that basket_id actually contains a hash of the session current user has (no problem there's an actual baskets table that has nothing to do with this field). Still, something better from today: a join on LocationSearches table and Searches table on varchar2 address field.
|
# ? Jun 15, 2018 18:47 |
|
Oh yeah, and as part of killing off our old Java monolith, I have to go through its codebase and extract hardcoded values and overridden methods that construct arbitrary maps n poo poo. I’m beginning to brainstorm easier ways to do that. I wonder if we can leverage the code that puts these blobs of data together, and have the monolith send the blob of data along with what it made that blob of data for to a service or something with a line of code after that method call? To kinda automate the poo poo I’d have to do otherwise. Does that even make sense?
|
# ? Jun 15, 2018 19:16 |
|
Pollyanna posted:What kind of data do you think a column named source_id would store? If you answered “an integer” or “a uuid”, you are wrong! It’s actually a big ol’ minimally structured string of arbitrary key-value data. There was a brief period of darkness where we were converting some numeric IDs into strings for transmission to the frontend code, which would then dutifully cast them back to numbers. Fixing that felt good. (This was more of a project management horror than a coding horror, though; give people more than six weeks to do major software development)
|
# ? Jun 15, 2018 19:25 |
|
One of our applications puts items in a database table for later processing, so basically a queue. A separate scheduled task then calls a wcf service to retrieve the items, batched per 7 items (why 7? who the gently caress knows). After processing an item the task makes another call to the same wcf service to remove the item from the queue. Relatively straightforward stuff. The stupid thing is that the id for the item is a guid. Which is stored as a char(38) in the db. And is exposed as a string by the wcf service. But the call to dequeue the item takes a guid, so the client has to parse the string it got from the server to a guid in order to pass it back to the same server. Which in turn obviously turns it back to a string when it goes to the db
|
# ? Jun 15, 2018 19:46 |
|
dwazegek posted:One of our applications puts items in a database table for later processing, so basically a queue. A separate scheduled task then calls a wcf service to retrieve the items, batched per 7 items (why 7? who the gently caress knows). After processing an item the task makes another call to the same wcf service to remove the item from the queue. Relatively straightforward stuff. Who cares? unless it's actually the bottleneck in your application, which doesn't sound likely
|
# ? Jun 15, 2018 20:34 |
|
Polio Vax Scene posted:Some fancy mcfancypants entered their first name as Le'douche into their data entry (Not actually le'douche but you get the drift) and the data entry does not correct this https://www.youtube.com/watch?v=YPOCIlvAsP8
|
# ? Jun 15, 2018 20:40 |
|
hailthefish posted:Presumably it got stored as Le’douche and trying to do operations on Le'douche doesn't work, or entered as Le’douche but got stored as Le?douche or Le�douche or This is probably Windows 1252 encoding. Had an issue related with this that drove me mad the other day trying to figure it out.
|
# ? Jun 15, 2018 20:54 |
|
Hammerite posted:Who cares? unless it's actually the bottleneck in your application, which doesn't sound likely You don't think that it's an issue that a web service exposes an id as a string, but requires the client to post that same id back as a guid? Or that the id could have just been a guid throughout the application, which would have resulted in better performance, and, more importantly, less potential for bugs? Sure, it's not the worst coding horror in the world, but still...
|
# ? Jun 15, 2018 21:27 |
|
dwazegek posted:You don't think that it's an issue that a web service exposes an id as a string, but requires the client to post that same id back as a guid? Or that the id could have just been a guid throughout the application, which would have resulted in better performance, and, more importantly, less potential for bugs? Sure, it's not the worst coding horror in the world, but still... I missed that the id is exposed as different types on the same interface, yeah that's a bit ugly. But still, if that's the biggest wart on the application then you're doing ok.
|
# ? Jun 15, 2018 21:36 |
|
code:
code:
Edit: Oh gently caress, Groovy's XML support returns attribute values as lists: http://grails.asia/groovy-xmlparser-examples-for-parsing-xml So the previous developer did need those getAt() calls after all and my stupid test has to wrap that value in a list for no reason! Never mind that well-formed XML disallows multiple attributes with the same name in the same element! Now I need to use actual XML as my mock data, because this is getting stupid. CPColin fucked around with this message at 23:00 on Jun 15, 2018 |
# ? Jun 15, 2018 22:21 |
|
You should've been using real xml for the mock data from the start.
|
# ? Jun 16, 2018 00:30 |
|
Yep. Groovy's dynamic typing is letting me get away with getting sloppy.
|
# ? Jun 16, 2018 00:39 |
|
Janitor Prime posted:Are you programming in MS Word? That poo poo almost never comes outside of MS products. TeX wants you to distinguish starting from ending quotes, and from double quotes. So you don't write "this", you write ``this''.
|
# ? Jun 16, 2018 01:00 |
|
dwazegek posted:You don't think that it's an issue that a web service exposes an id as a string, but requires the client to post that same id back as a guid? Or that the id could have just been a guid throughout the application, which would have resulted in better performance, and, more importantly, less potential for bugs? Sure, it's not the worst coding horror in the world, but still... Assuming a message protocol is SOAP or some other text-based protocol then it’s being converted to and from a string to cross the wire anyway, so probably not any real performance loss. Mildly annoying that you have to convert in your own code instead of letting WCF do it for you.
|
# ? Jun 16, 2018 16:29 |
|
Eggnogium posted:Assuming a message protocol is SOAP or some other text-based protocol then it’s being converted to and from a string to cross the wire anyway, so probably not any real performance loss. Mildly annoying that you have to convert in your own code instead of letting WCF do it for you. You can easily do binary encoding over TCP with WCF, so this may not be a good assumption, but even in that case the loss of type safety is probably a bigger issue than performance.
|
# ? Jun 16, 2018 17:56 |
|
Having a weird issue with some Discord client software, I eventually tracked the problem down to this initialization code (pared down a bit):code:
|
# ? Jun 16, 2018 18:17 |
|
Hell, for-in doesn't even give you consistent iteration order, does it?
|
# ? Jun 16, 2018 23:25 |
|
brap posted:Hell, for-in doesn't even give you consistent iteration order, does it? in js, for in returns properties in the order they were defined - which is consistent, but arbitrary.
|
# ? Jun 17, 2018 00:37 |
|
dwazegek posted:You don't think that it's an issue that a web service exposes an id as a string, but requires the client to post that same id back as a guid? Or that the id could have just been a guid throughout the application, which would have resulted in better performance, and, more importantly, less potential for bugs? Sure, it's not the worst coding horror in the world, but still... It's untidy and I certainly wouldn't design something that way, but I don't think it's likely to increase bugs as you said. If it was the other way around (input expected a string that it subsequently assumes to be a guid) then I could see potential bugs arising from that for sure.
|
# ? Jun 18, 2018 05:54 |
|
My latest one, setting up my old iphone as a company phone, they force you to have a 6 digit pin unlock code, The rules are as follows You cannot have repeating digits (11 or even 123451 ) You cannot have 2 adjacent numbers (129874 is not allowed as 12 and 98 and 87 are adjacent)
|
# ? Jun 18, 2018 06:47 |
|
TheresaJayne posted:My latest one, setting up my old iphone as a company phone, If my quick calculations are correct then that leaves about 12% of the 6-digit pins as valid. Nice going.
|
# ? Jun 18, 2018 08:09 |
|
Loezi posted:If my quick calculations are correct then that leaves about 12% of the 6-digit pins as valid. Nice going. I'm getting 4.6%. Python code:
Some assumptions: 1. Codes may start with 0. 2. 0 and 9 are not considered adjacent.
|
# ? Jun 18, 2018 09:40 |
|
LOOK I AM A TURTLE posted:I'm getting 4.6%. Yeah, looking at it again, this seems correct.
|
# ? Jun 18, 2018 11:16 |
|
I mean, that still leaves more choices than industry standard four digit pin codes.
|
# ? Jun 18, 2018 11:34 |
|
Vanadium posted:I mean, that still leaves more choices than industry standard four digit pin codes. But a lot of people use patterns on the Keypad like a T L P O etc. so most patterns are not allowed anything going across the pad is not allowed and in some cases up down as well 0147 is not valid
|
# ? Jun 18, 2018 11:41 |
|
LOOK I AM A TURTLE posted:I'm getting 4.6%. This means 6 and 7 are considered adjacent, but they're not adjacent on the numpad. And perhaps vertical adjacency is invalid as well.
|
# ? Jun 18, 2018 11:53 |
|
|
# ? May 31, 2024 04:13 |
|
Ola posted:This means 6 and 7 are considered adjacent, but they're not adjacent on the numpad. And perhaps vertical adjacency is invalid as well. Nice, this lets us get rid of even more entropy. I'll assume we have this keypad layout: pre:1 2 3 4 5 6 7 8 9 0 But why stop here? We should obviously block direct diagonal adjacency as well. If we include diagonal adjacency we can almost completely eliminate the digit 5 from the list of valid codes, as it would then only be able to occur at the beginning or end of the code, and only next to a 0. If e.g. 15 and 07 are also considered adjacent we can bring the number of possible codes down to 0.52%.
|
# ? Jun 18, 2018 12:35 |