|
we just switched to slack and giphy has a disappointingly high anime to actual good gif ratio
|
# ? Jan 31, 2016 19:41 |
|
|
# ? May 30, 2024 12:22 |
|
we use flowdock and i like it
|
# ? Jan 31, 2016 21:00 |
|
I don't like XML
|
# ? Jan 31, 2016 22:36 |
|
Suspicious Dish posted:we just switched to slack and giphy has a disappointingly high anime to actual good gif ratio We switched a few months ago. Only a few NSFW giphy incidents so far. Apparently, "bouncy" is a bad keyword.
|
# ? Jan 31, 2016 22:40 |
|
Giphy is awful. Unsurprisingly, it got turned off after a week and then the sales dudes whined until it got turned back on.
|
# ? Jan 31, 2016 22:56 |
|
Pizzatime posted:I don't like XML looks like the problem's with the library you're using, xml doesn't need to be any more painful than any other structured serialization format
|
# ? Feb 1, 2016 00:23 |
|
Soricidus posted:looks like the problem's with the library you're using, xml doesn't need to be any more painful than any other structured serialization format I'm not sure if I'm allowed to use anything outside of the .NET framework so I was scared to use LINQ to XML or something similar.
|
# ? Feb 1, 2016 00:26 |
|
Pizzatime posted:I'm not sure if I'm allowed to use anything outside of the .NET framework horror spotted
|
# ? Feb 1, 2016 00:48 |
|
Pizzatime posted:I'm not sure if I'm allowed to use anything outside of the .NET framework so I was scared to use LINQ to XML or something similar. Well, XML deserialization comes out of the box, so unless you're doing something fancy you don't need to. Visual Studio will even (try to) write the classes for you
|
# ? Feb 1, 2016 00:52 |
|
It's also pedantic as hell, but mixing int and Int32 in C# is just so goofy. Choose one and use it :v
|
# ? Feb 1, 2016 01:12 |
|
Pizzatime posted:I'm not sure if I'm allowed to use anything outside of the .NET framework so I was scared to use LINQ to XML or something similar.
|
# ? Feb 1, 2016 01:15 |
|
Pizzatime posted:I don't like XML your code is bad and it's not because of the libraries you used
|
# ? Feb 1, 2016 01:18 |
|
yeah dude you just need to learn to deserialize XML using the built-in stuff.
|
# ? Feb 1, 2016 01:22 |
|
For me, the bad thing about XML is manual editing or reading. Like programs that use an XML file for configuration and expect the user to edit those. gently caress those programs. If I can use a library, I don't give a crap what format it uses.
|
# ? Feb 1, 2016 01:48 |
|
Thermopyle posted:For me, the bad thing about XML is manual editing or reading. Like programs that use an XML file for configuration and expect the user to edit those. gently caress those programs. They aren't so bad if you have an editor that is XML aware and hopefully can even understand XML schemas. Just hope you don't get called in the middle of the night to fix something and find out the system it is running on has vanilla vi. Bognar posted:
I've seen people do stuff like this in Java too when dealing with dates. While this one is probably fine, the cases where I run into it is because they don't know how to deal with parsing a date into a Date and properly handling timezones before storing it somewhere that expects a different format. That said, I wouldn't say this is a horror, just someone who is under experienced. It reminds me of the code my college new hires write especially if they didn't come from an IS background. HFX fucked around with this message at 04:26 on Feb 1, 2016 |
# ? Feb 1, 2016 04:06 |
|
HFX posted:handling timezones before storing it somewhere that expects a different format. Please don't trigger me. I'm slowly removing all instances of millisAtMidnight from our codebase as now the company has offices and operations in the UK but our servers (and half the dev's) laptops are still in Italy. For now we're just switching to millisAtNoon but by god I can't wait to have actual Dates, as opposed to nothing but DateTimes.
|
# ? Feb 1, 2016 09:33 |
|
gonadic io posted:Please don't trigger me. What is "millisAtNoon"?
|
# ? Feb 1, 2016 10:18 |
|
qntm posted:What is "millisAtNoon"? More importantly, why is that an improvement over "millisAtMidnight"?
|
# ? Feb 1, 2016 10:49 |
|
qntm posted:What is "millisAtNoon"? The number of milliseconds since epoch start until noon on a given day. MillisAtMidnight plus 12 hours. Which timezone? Hopefully UTC... Dessert Rose posted:More importantly, why is that an improvement over "millisAtMidnight"? Because they all get converted back into a date anyway, so when we gently caress the timezones up and get moved an hour back 11am is the same date as noon. 11pm is not the same date as midnight. gonadic io fucked around with this message at 12:36 on Feb 1, 2016 |
# ? Feb 1, 2016 11:43 |
|
gonadic io posted:The number of milliseconds since epoch start until noon on a given day. MillisAtMidnight plus 12 hours. Which timezone? Hopefully UTC... Until you open an office in Kiribati, that is: https://en.wikipedia.org/wiki/UTC%2B14:00 Thanks to that stupid timezone (and the UTC+13:00 timezone) there's no time of the day where the whole planet is on the same date. Edit: I posted this at 12:00:00 UTC because I'm cool like that.
|
# ? Feb 1, 2016 13:00 |
|
HFX posted:That said, I wouldn't say this is a horror, just someone who is under experienced. It reminds me of the code my college new hires write especially if they didn't come from an IS background. While no part of it is particularly egregious, I liked the whole class just because there's an example of what not to do on almost every line. In order: 1. Useless XML-doc comments 2. Region directives around a single property 3. A property called "...TimeSpan" that is of type double (and is used elsewhere in the code to convert to and from a TimeSpan object) 4. An empty constructor that could be removed containing a useless TODO 5. A protected helper method in a class that is never inherited, that 6. Returns an invalid date if the input is null/empty 7. Doesn't do any length checks before calling Substring 8. Casts string to string The entire class could be replaced with a variable of type TimeSpan.
|
# ? Feb 1, 2016 15:36 |
|
I am working on an industrial branch of an academic branch of academic code that has evolved over a decade of engineering students plugging away at it between paper deadlines. Wading through the code and trying to document the software architecture is akin to mapping a jungle that has grown over mayan ruins. All code evolved over time, but no one ever thought or dared to change the architecture. This is an archetypical big ball of mud project and a goldmine for coding horrors. Q: Why does this object serialize itself to a byte array, only to be deserialized right after? A: Oh, there used to be separate processes, but it got mashed together. It works. Q: Why does this mother of a God class subclass some other class and is the only class to do so? A: Well, there used to be different subclasses... It works. Q: Wait, this object has an enum value field that is constantly checked in a switch statement to see what code to run on it? A: This was probably from a student that had a poor grasp of polymorphism. But hey, it works. Guess who has to wade through the entire code and document it! Today's drop in the bucket: It is neither helpful nor OK to split up your gigantic monstrosity of a function into multiple functions overloaded with the same name. code:
Beef fucked around with this message at 17:56 on Feb 2, 2016 |
# ? Feb 2, 2016 17:53 |
|
Beef posted:I am working on an industrial branch of an academic branch of academic code that has evolved over a decade of engineering students plugging away at it between paper deadlines. Wading through the code and trying to document the software architecture is akin to mapping a jungle that has grown over mayan ruins. All code evolved over time, but no one ever thought or dared to change the architecture. Ahh, reminds me of a previous job. I was brought on to fix issues this lab was having with their custom-built-over-ten-years hardware control program. It crashed every once in awhile, they didn't know why, and the previous dev and the original dev had both left for greener pastures. The program was written largely in Python, which is fine; I like Python. Normally. But I hadn't counted on academic Python, especially not a 25-kline Python monstrosity. Among the things I found in this system, and leaving aside such pedestrian matters as inscrutable variable names and a nigh-total lack of informative comments, were:
|
# ? Feb 2, 2016 18:31 |
|
TooMuchAbstraction posted:I tried to generate a dependency graph of the program using a static analyzer. The analyzer crashed. TooMuchAbstraction posted:The developers had heard of source control, and didn't believe in it. Instead, whenever they made a change to the system, they would comment out the old code, and mark it with a date and the name of the developer that had made the change, but no comment indicating why the change was made. What is it with people and using these kinds of bullshit instead of version control? I can see why someone would just comment out poo poo in 20 line script instead of versioning, but how do you get to the 25KLOC monstrosity without thinking "There is got to be a better way"? (Hell, how do you get to 1KLOC without thinking that)
|
# ? Feb 2, 2016 18:56 |
|
At least I am dealing with a buildup of small --innocuous by themselves-- changes. To add some content to the post: The mother of all singletons is referred to by nearly every class in the system and contains an amalgamation of configuration objects, reporting/logging and the kitchen sink. It is the product of years of thinking along the lines of: "I could pass the relevant configuration options to the constructor of this class, but that is too much effort. Let's put all this information that only this class uses in this God singleton object and 3-arrow access my way to the relevant data in the constructor." Accessing anything useful from it requires 3, 4 and the mythical 5-star programming style with really long multi-part variable names. I have lines wrapping on my 1920p-wide display. I made a collage of the collaboration diagram of a single important class once, it fit on 8x A4 pages pasted together with the smallest readable font. Doxygen gives up on most classes and the pub/priv. box (generated UML) is typically "...196 more" One of the method chains starts with about a dozen arguments, takes one off and passes it along, eleven more on the arguments chain. There was documentation on the top-level function of the above chain, it lists four methods and somehow survived a decade of people adding arguments without bothering to change the documentation comments.
|
# ? Feb 2, 2016 18:59 |
|
Laziness? "We got this far doing it this way, and changing the process means I have to spend X amount of time refactoring all this stuff, or I could spend a fraction of that time continuing like we have been."
|
# ? Feb 2, 2016 19:02 |
|
Xarn posted:What is it with people and using these kinds of bullshit instead of version control? I can see why someone would just comment out poo poo in 20 line script instead of versioning, but how do you get to the 25KLOC monstrosity without thinking "There is got to be a better way"? (Hell, how do you get to 1KLOC without thinking that) For this I'll blame the boss of the lab, who did not understand version control and was paranoid about losing anything. He kept literally everything from every piece of hardware he bought (we had a room full of old boxes and packing material, just in case we ever needed to ship something back to the manufacturer). We also had many, many binders full of the manuals for each device in the system; he did not cope well with the "modern" trend of including only software versions of manuals. As for source control, he asked to see some of my code at one point and nearly had a fit when he realized there were no dates or logs in the code and therefore it wasn't immediately obvious when things had changed. I spent a good hour telling him about how source control worked, demonstrating that I could pull up any version of the program at a moment's notice, and talking about our backup strategy, and I'm fairly certain he still didn't believe me.
|
# ? Feb 2, 2016 19:28 |
|
Xarn posted:
Mainframe background.
|
# ? Feb 2, 2016 21:34 |
|
Oh, that reminds me! At one point my boss asked for a dump of the contents of the repository, so I handed him a printout of the (slightly formatted) contents of `find`. He asked me where the information about what each directory contained was; I pointed at the README.txt files I'd made. He declared this inadequate, and asserted that back in his day, every directory had included, as part of its information, some manner of comment string declaring what it was for -- like, when you made a new directory, you had to write in a bit of text saying "for storing photos of cats" or whatever. And then you'd see that string whenever you did a directory listing, "so you always knew what everything was for." I don't remember ever seeing an OS that worked that way, but I could believe that it happened on systems that lost prevalence before I entered the workforce. Maybe a VAX?
|
# ? Feb 2, 2016 21:45 |
|
xzzy posted:Laziness? This also seems to be a symptom of poor unit testing - often combined in a moderate risk corporate environment. When you don't trust your tests to tell you if you broke downstream code with a change, you end up trying to make every change as small and minimal as possible, rather than tearing apart entire widely-used classes to make them better.
|
# ? Feb 3, 2016 00:49 |
|
Beef posted:At least I am dealing with a buildup of small --innocuous by themselves-- changes. dependency infection
|
# ? Feb 3, 2016 00:57 |
|
|
# ? Feb 3, 2016 17:04 |
|
This is a pretty good metaphor for a procrastinator.
|
# ? Feb 3, 2016 18:09 |
|
Cuntpunch posted:This also seems to be a symptom of poor unit testing - often combined in a moderate risk corporate environment. When you don't trust your tests to tell you if you broke downstream code with a change, you end up trying to make every change as small and minimal as possible, rather than tearing apart entire widely-used classes to make them better. It can be poor unit testing, lack of testability as in you can't write unit tests for some of these mudballs, and even lack of testability as in you can't even run the app and be that confident of what the original behavior was supposed to be.
|
# ? Feb 3, 2016 18:20 |
|
Sometimes writing a unit test involves having to hook the OS, or simulate complex hardware. Not everyone is set up to write a dummy USB driver.
|
# ? Feb 3, 2016 18:22 |
|
This actually seems fine? Breaks out of the loop if try() returns true, and assigns it to succeed. I mean, "succeed" is kind of a useless variable there, and I don't think you can call a method try() in a language where that's a keyword, but... As stupid sayings translated into code go, at least it actually does what it's supposed to do.
|
# ? Feb 3, 2016 18:26 |
|
Except you're always trying at least once, but the saying says to try only if you don't succeed first.
|
# ? Feb 3, 2016 18:58 |
|
So,code:
|
# ? Feb 3, 2016 19:08 |
|
Dessert Rose posted:This actually seems fine? Breaks out of the loop if try() returns true, and assigns it to succeed. https://jsfiddle.net/ojvkp35b/ For the lazy: code:
Nude fucked around with this message at 19:12 on Feb 3, 2016 |
# ? Feb 3, 2016 19:09 |
|
|
# ? May 30, 2024 12:22 |
|
Success is signalled by a 0 return code
|
# ? Feb 3, 2016 19:14 |