|
a hot gujju bhabhi posted:True, and occasionally he does take it upon himself to ask me to double check his poo poo, but I feel like it's ridiculous that I can't trust this person to do the simple stuff (we're paid equally and share the exact same position, which is what may be underpinning my frustration to be honest). I'm too tired to continue fake-ragging on you, but the idea of code review isn't that (necessarily) you don't trust the other people. The idea is that you do code review so stupid poo poo (like typos, and wrong tabbing, and horrible code, and, and) has a second chance to be caught before the stupid poo poo gets to be a problem in production.
|
# ? Jun 18, 2017 06:14 |
|
|
# ? May 17, 2024 00:03 |
|
Zemyla posted:No, they require the ability to consciously and selectively disregard typing. Having the ability to remove safety guards from a machine is different from having a machine that doesn't have safety guards in the first place. E: Shut up, this is boring Dongsturm fucked around with this message at 06:40 on Jun 18, 2017 |
# ? Jun 18, 2017 06:38 |
|
HardDiskD posted:I'm too tired to continue fake-ragging on you, but the idea of code review isn't that (necessarily) you don't trust the other people. The idea is that you do code review so stupid poo poo (like typos, and wrong tabbing, and horrible code, and, and) has a second chance to be caught before the stupid poo poo gets to be a problem in production. I know but it's also not some excuse to be as sloppy as you like so that someone else can find all your typos, hosed up indentations and miscapitalisations etc later on. That's my point. He makes zero effort to do his own due diligence.
|
# ? Jun 18, 2017 07:09 |
|
itskage posted:The first bit aside, It's crazy how long it takes some people to realize you can just return the result of the test and not have to explicitly write true : false all over the drat place. But what a Boolean is a byte in your language/platform you might otherwise want to return something else like file not found, eh smart guy?
|
# ? Jun 18, 2017 09:41 |
|
I'm working on a legacy application which is essentially a giant pile of Java Servlets written by a self-taught programmer. The entire thing is a spaghetti mess, with lots of state clumsily passed around via the session; if one of them wants to make, say, a User object available in the session, it puts the User id primitive into the session and the other end pulls that out, goes to the UserManager and calls a static method to get the User again. I'm trying to fix it up to make it easier to add new clients but I had to stop my refactoring when I realized I was basically rewriting it from scratch and had to start over with much lowered expectations and I've still had to make changes in nearly every file. Here, however, is hands down the dumbest thing I've seen in this project: code:
code:
ThisIsNoZaku fucked around with this message at 19:19 on Jun 18, 2017 |
# ? Jun 18, 2017 11:09 |
|
ThisIsNoZaku posted:Snip This sounds eerily like MVC 5 where you have a User property which holds the ID, if you want the user you make a call to the UserManager and get the full user. I don't know if this is good or bad. Mr Shiny Pants fucked around with this message at 12:06 on Jun 18, 2017 |
# ? Jun 18, 2017 11:58 |
|
Snak posted:New thread title?
|
# ? Jun 18, 2017 12:20 |
|
ThisIsNoZaku posted:Here, however, is hands down the dumbest thing I've seen in this project: But... Why? What requirement is this fulfilling?
|
# ? Jun 18, 2017 13:47 |
|
a hot gujju bhabhi posted:I know but it's also not some excuse to be as sloppy as you like so that someone else can find all your typos, hosed up indentations and miscapitalisations etc later on. That's my point. He makes zero effort to do his own due diligence. Ah, that's hosed up then.
|
# ? Jun 18, 2017 14:20 |
|
ThisIsNoZaku posted:Here, however, is hands down the dumbest thing I've seen in this project: How self taught can lead to that is really mind boggling.
|
# ? Jun 18, 2017 14:37 |
|
john donne posted:But... Why? What requirement is this fulfilling? My theory is that he only half-understands what a map does. He knows that you can put stuff into a map and get all the things out of it by iterating through all the keys (probably found how to do that on codeproject). He doesn't understand that if you know the individual key, you can get the value out of the map.
|
# ? Jun 18, 2017 14:41 |
|
ThisIsNoZaku posted:
I think you meant value.getClass(), rather than Object.getClass().
|
# ? Jun 18, 2017 16:33 |
|
Bruegels Fuckbooks posted:My theory is that he only half-understands what a map does. He knows that you can put stuff into a map and get all the things out of it by iterating through all the keys (probably found how to do that on codeproject). He doesn't understand that if you know the individual key, you can get the value out of the map. Except he's not getting anything out of the map. He's iterating over the keyset and returning values based on when the iterator happens to yield a certain key (which is unspecified behaviour) while also assigning all ids not in the keyset a value equal to the size of the map +1. I hope the values aren't supposed to be unique and that elements are never removed from the map. It also must be very old if it doesn't use generics.
|
# ? Jun 18, 2017 18:49 |
|
Absurd Alhazred posted:I think you meant value.getClass(), rather than Object.getClass(). Yep, you're right. Fixed. Dr. Stab posted:It also must be very old if it doesn't use generics. It was written in Java 6 and does use generics, just not there. Another funny thing, if the method returns the position in the queue as an Integer, it is put into the container with the key "wait time" but if anything else it is put in with the key "position"! I will give the man his due, however, my understanding is the thing has been running fairly smoothly in production for years. It's just a nightmare to change anything. ThisIsNoZaku fucked around with this message at 19:33 on Jun 18, 2017 |
# ? Jun 18, 2017 19:19 |
|
Wouldn't it be impossible for it to be anything other than Integer? The value the method returns is an int, which would be converted to Integer if I remember the autoboxing rules correctly.
|
# ? Jun 18, 2017 20:28 |
|
zergstain posted:Wouldn't it be impossible for it to be anything other than Integer? The value the method returns is an int, which would be converted to Integer if I remember the autoboxing rules correctly. Also, there is a Number class which is the supertype of all the boxed number classes so there's no need to go all the way up to Object even if this ridiculous thing is what you actually want to do. And if that's the case, maybe you need to use a different language. ThisIsNoZaku fucked around with this message at 20:54 on Jun 18, 2017 |
# ? Jun 18, 2017 20:50 |
|
ThisIsNoZaku posted:
Well, the non-generic version of Map maps from objects to objects. Implicit conversions are for the weak. Except, of course, on the first line where he boxes an int and then casts it to an object. I'm amazed that this code is part of anything that does anything. What it ends up doing is very small for the amount of code it takes up, and doesn't really seem like a thing you'd want to do in the first place.
|
# ? Jun 18, 2017 21:42 |
|
It turns out I hosed up! I had changed it and was misremembering the old code, that map is used elsewhere.code:
code:
Edit: Forgot all the extra whitespace! ThisIsNoZaku fucked around with this message at 22:29 on Jun 18, 2017 |
# ? Jun 18, 2017 22:27 |
|
More This application has a ColdFusion front end running on a dev server. You have to go into the ColdFusion config and tell it to direct traffic to the instance running on your dev machine and restart it. Only one person can work on it at a time. Edit: I forgot about this one. code:
ThisIsNoZaku fucked around with this message at 23:48 on Jun 18, 2017 |
# ? Jun 18, 2017 22:32 |
|
HardDiskD posted:Ah, that's hosed up then. In fairness to you I explained it poorly.
|
# ? Jun 19, 2017 00:11 |
|
Mr Shiny Pants posted:This sounds eerily like MVC 5 where you have a User property which holds the ID, if you want the user you make a call to the UserManager and get the full user. This reminds me of a VB 6 program i once had to rewrite to add the functionality the original developer failed to add. Back then you would do something like Global Dim Username Global Dim UserID so that you had in the running app the username and id. The original developer had booked a one day OOP course and failed to attend, (this was back in 1999) He had code:
|
# ? Jun 19, 2017 08:56 |
|
TheresaJayne posted:The original developer had booked a one day OOP course and failed to attend, Information Hiding, Single Responsibility, and Type-Driven Development. This guy was a pro. Or as they were called in 1999, "eXXXXXXtreme".
|
# ? Jun 19, 2017 11:41 |
|
NihilCredo posted:Information Hiding, Single Responsibility, and Type-Driven Development. This guy was a pro. Yeah it also kinda reminded me of the F# for fun and profit working with types examples. Don't know if VB6 would be the right language......
|
# ? Jun 19, 2017 11:42 |
|
A few weeks ago I had to fix a crippling bug in production during the weekend. Found this compareTo Java method which obviously was plain wrong, and after a little back-of-the-envelope doodling I concluded it definitely was the cause of our bug. It was. That it is non-transitive is only one of its faults. Original: code:
Fixed: code:
|
# ? Jun 19, 2017 13:53 |
|
code:
|
# ? Jun 19, 2017 14:02 |
|
Jabor posted:
Nice.
|
# ? Jun 19, 2017 14:05 |
|
Orderings.natural.nulllsFirst sounds like something you say while cursing a hoodoo bag.
|
# ? Jun 19, 2017 15:35 |
|
Jarl posted:
I always like to see these. Even the best of us have bad days. Not that I'm among the "best of us", but most of my "oh god thats super dumb" mistakes happen because I'm doing lots of editing across a couple of different locations and I start conflating what I'm doing in one place with what I'm doing in another place. Or I'm just trying something out and then never do it right.
|
# ? Jun 19, 2017 16:23 |
|
Same here - though there's always a difference between working with somebody that has a bad day, working with somebody that is overworked and wants to provide results as quickly as possible (for example, I think the other dev in the company I started working at belong to this category, as while his layers of code are consistent within the layer, but inconsistent between times he did them, if that makes sense) and working with people that don't have a clue what they're doing (or care to understand). It's also a shame when a lead cannot say: this is what we're doing, this is how we should do it, this is how we're going to approach the problem. Meanwhile - I've had fun installing Cordova / Java: - installed npm, cordova, java without problems - setup 4 paths in environment variables (for Java and Android Studio; paths for Android Studio are not in the place where documentation specifies) - trying to build cordova hello app - fails with message saying that it can't find the ADV - trying to find ADV Manager in Android Studio - it's not in the place any documentation specifies; managed to find it via "Search everything" - managed to install it, again running build, message saying my Java path is wrong - changed the paths, no result - actually message about paths being wrong means that Java doesn't have enough memory to run VM; setting _JAVA_OPTIONS with 2048M fixes it - trying to build again, build completed without problems - trying to install plugin for geolocation - manage to reinstall JRE, overwriting my previous installation and issuing an 1803 error; I can't build cordova app anymore - install, reinstall Java - getting error 1803; nothing on the Java documentation page regarding this problem works; Java Control Panel doesn't run, nothing runs - removed _JAVA_OPTIONS from my environment variables, Java can install again - try to build again - message says my Java path is wrong - add back _JAVA_OPTIONS with 2048M - message says my Java path is wrong - change _JAVA_OPTIONS to 512M - cordova builds succesfully Logic! canis minor fucked around with this message at 13:50 on Jun 20, 2017 |
# ? Jun 19, 2017 18:38 |
|
https://groups.google.com/forum/#!topic/golang-nuts/Oo5s6ryBCYI
|
# ? Jun 21, 2017 01:28 |
|
YOLO, i want better structure to program faster, i might not be doing the right thing because i ain t yet understood the language correctly, yet, i want to benefit the whole environment provided by it, ultimately, that i m right or wrong, does not matter in the immediate terms of getting productive, i m only looking for ways to program faster by reducing all those additional constructs.
|
# ? Jun 21, 2017 01:42 |
|
Python code:
|
# ? Jun 21, 2017 02:52 |
|
FrantzX posted:
Because on the one system you checked, longs were 32-bit, but you needed a 64-bit type? "long" is not a strictly-defined term in C-likes IIRC, which is why most languages are now making the number of bits explicit in the type names.
|
# ? Jun 21, 2017 05:03 |
|
I'm stunned by the simplicity and brutal practicality.
|
# ? Jun 21, 2017 16:05 |
|
TooMuchAbstraction posted:"long" is not a strictly-defined term in C-likes IIRC, which is why most languages are now making the number of bits explicit in the type names. To include C/C++ - check out stdint.h.
|
# ? Jun 21, 2017 16:27 |
Don't doxx me (I am getting acclimated to go, but I will never forgive them not having a loving set type with intersection, union, and difference methods. What the gently caress.)
|
|
# ? Jun 21, 2017 16:56 |
|
Eela6 posted:(I am getting acclimated to go, but I will never forgive them not having a loving set type with intersection, union, and difference methods. What the gently caress.) The number of things that would be one-liners in a language with generics that become tedious for loops in Go is enormous. They're simple, easy to write, and all over the goddamn place so you're liable to accidentally gently caress one of them up sometime, resulting in subtle bugs because your eyes just gloss over them.
|
# ? Jun 21, 2017 17:16 |
|
|
# ? Jun 21, 2017 22:52 |
|
The npm maintainers are the bane of my existence boo_radley fucked around with this message at 00:45 on Jun 22, 2017 |
# ? Jun 22, 2017 00:43 |
|
|
# ? May 17, 2024 00:03 |
|
https://twitter.com/jennschiffer/status/877705092043907072
|
# ? Jun 22, 2017 03:47 |