|
Ok, so this guy is a prick. I told him to take his java code and turn it into c# code, because we're a c# shop. And he said "<bosses name> has been riding me, and he said i could write it in java code", or something like that. Kinda pissed me off, but ok, can't over-rule the boss(at least not without talking to him first) Next time I saw <bosses name> was at a meeting about the project.. This was also the first time i got to actually see idiot's code. He had put everything in a single 3000 line file. Not only that, but he had written everything in functions (or methods if you wanna get technically correct). Each method dealt with one line. And yeah, each method had code in it that parsed the given line. But it just printed out to the console. It didn't do anything with the result of that parsing, or decoding. really. This is what he had: code:
This stuff has to go in a database, not to the screen. And besides, some lines are gonna have info that other lines need if you want to put them in a database, and link them together. For instance link the merchantId with the various authorization records. I knew this, and I hadn't even read the spec really. I kind of scanned over it. It's just common sense. There was no way his solution was gonna work, and he'd basically wasted his time. I was more diplomatic than that though. I said look, you need to break this out into objects, and you're gonna want to use a base class, an abstract base class really. You might as well write it in c#. But it was as if he had no idea why he would need to do that. He really pushed back. Oh, and the fact that he has a 3000 line code file that was not auto generated. If you find yourself in the middle of typing up a 3000 line file, you should probably rethink your career choice. Wow, sorry this is so long. But this guy really got under my skin. I've had a real breakthrough recently, and realized I need to stop coddling these guys. If I can tell they're not gonna work out after a week, I need to fire them (I don't really have the power to fire anyone, but the owner loves me, and trusts my opinion implicitly). It really wastes everyone's time to let them linger on This was not the end of this guy, but I can assure you it has ended now. We have a new rule in my office. If you have a project with a 3000 line code file in it that was not auto-generated, you are fired. I have more about this guy if anyone cares. .
|
# ¿ Dec 15, 2012 20:45 |
|
|
# ¿ Apr 30, 2024 07:40 |
|
awesmoe posted:What's wrong with 3k line files? If you're looking at two different pieces of code at once,you're going to have to open another view(/window/split/tab) for the second piece. Why does it matter whether the code is 3k lines away or 10k lines away, or whether it's in a different file? (Unless you never learned to use your editor, I guess) I knew someone would fuckin' say this, so I'd just like to note that 1. I will make an exception for people who come to me first and I approve of their approach 2. They can always split there code into partial classes to get around the rule 3. I was kidding, there is no such rule
|
# ¿ Dec 15, 2012 23:28 |
|
awesmoe posted:
Actually his code was not messy at all. Sure he had hundreds of methods that all did basically the same thing, but it was very neatly typed, indented and even commented in places. My point was that his code was not very extensible. I asked him how he planned to proceed with the project and he had no idea. I knew how he could proceed, but he wouldn't listen to me. And it took me and a coworker and my/his boss telling him to, before he agreed to. And if it's so easy to navigate around one giant file in modern IDEs, why not put all of your classes in one file. Why this arbitrary practice of placing different classes in different files? Just shove em all in one big file. Saves a lot of time not having to right click->new class. Right? Oh and in case you missed it the first time. I was kidding. It was a joke. *edit* I think I'm gonna start coding this way, it really would be convenient!! Jen heir rick fucked around with this message at 23:56 on Dec 15, 2012 |
# ¿ Dec 15, 2012 23:50 |
|
awesmoe posted:1. You haven't explained why it's an approach that needs special-case approval 2. Jesus Christ you can't take a joke 3. That's right it was a joke, were you really reading and responding to these one at a time, and it was only at this point that you realized I'm "not actually doing what you said you were doing"? Or did you just waste your time writing out these detailed responses in order to argue with no one? awesmoe posted:I was replying to the guy who said "I refactored a long file into 3 short classes".
|
# ¿ Dec 16, 2012 01:26 |
|
awesmoe posted:
Who said the file contained "closely related functionality"? Unless by closely related you mean they're close together in the same file, and by functionality you mean they all do nothing of consequence. By the amount of words you use when you post, I'm gonna guess you have made a few 3000 line files yourself. That's the only reason you're defending this guy. Well you can hire him. He'll be looking for work soon. And you know what? I double take it back. I am gonna make a rule. Only the cutoff is now 3284, just to be even more deliciously arbitrary. No exceptions. I'll call it the awesmoe rule. I have more awesome stories to share if awesmoe would just shut up. He's ruined my flow. Jen heir rick fucked around with this message at 02:13 on Dec 16, 2012 |
# ¿ Dec 16, 2012 01:54 |
|
Doc Hawkins posted:This person is an intern, right? Like, they've never really programmed before. Give me that at least. Fresh out of college. Rave reviews from all his professors. Must be a lovely college. I didn't really want him to do this project. I wanted him to tackle some easier stuff before he tried something of this magnitude. but my (sorta)boss went and gave it to him. He (sorta boss)doesn't really understand that not all programmers are equal, and figured anyone would do. He's also not very good at determining how difficult something is. In addition we have poor communication because he's out of the office a lot. Largely because of this incident, all coding decisions have to go through me now, and hiring decisions go through me too(orders from the big boss), but we're gonna have to work on the communication issue.
|
# ¿ Dec 16, 2012 02:27 |
|
Doc Hawkins posted:See, this is why I only work at shops that do %100 pairing. Interesting idea. I like it!
|
# ¿ Dec 16, 2012 05:17 |
|
Ruzihm posted:I must be misreading something. How can flow go from running Task.Run to going "out" into running Scope.Dispose, when one is in an if and the other is in an else, and the only recursion occurs from the if block? I think the problem is that the code that calls dispose doesn’t know to wait for the task to complete. Once dispose is called the runtime is free to garbage collect the object as well as anything it references. So you end up with a race condition.
|
# ¿ Jan 22, 2020 18:13 |
|
That looks like a CORS issue, nothing to do with leap year.
|
# ¿ Mar 3, 2020 14:48 |
|
OddObserver posted:I would be surprised if failure at CORS preflight time was that sensitive to the request URL. It’s not, somebody misconfigured a server sometime this morning causing CORS errors, and for some reason twitter is blaming it on leap year.
|
# ¿ Mar 3, 2020 16:35 |
|
Ok, good to know I’m half right. It just really bugged me that everyone on twitter was saying it’s cause of leap year.
|
# ¿ Mar 3, 2020 17:24 |
|
I think it is a little different to see a CORS error message and assume it’s a CORS error vs assuming it’s a leap year bug. But fair enough. I am the horror this time.
|
# ¿ Mar 4, 2020 02:34 |
|
Kazinsal posted:
Great post. I don't know much about hardware stuff. Why is this such a batshit insane hack?
|
# ¿ Mar 25, 2023 14:23 |
|
Spatial posted:It's so goddamn slow too. Same. I don't know how it's so slow and lovely. I've literally just done a recursive DIR command on a directory, output to file and ctrl-f to find a file and it was faster than windows search.
|
# ¿ Mar 29, 2023 11:26 |
|
smackfu posted:So I suspect Spotlight is involved. Yeah spotlight sucks just as much as windows search. Which is crazy, because back in the macos 9 days, when it was called sherlock, search was instantaneous and actually searched your entire harddrive. Of course it only searched file names, but I have literally never found it useful to search contents on local search. Maybe that's the problem. I start typing "the.." and it tries to show me every file that has ever been written. Real useful.
|
# ¿ Mar 29, 2023 15:34 |
|
Kazinsal posted:It was designed originally for COM components, then between 3.1 and NT they realized, oh man, we can just have programmers shove their config data in this structured, centralized database with optimized access routines, instead of littering the filesystem with INI files that need to be parsed line by line constantly. I don't know what you're complaining about. Com and the registry sucked all kinds of poo poo. It's much easier now.
|
# ¿ Sep 26, 2023 12:31 |
|
Tann posted:Just found you can do something like sql injection in my game lol This sounds like a cool feature, not a bug.
|
# ¿ Sep 30, 2023 15:57 |
|
JawnV6 posted:https://x.com/ataiiam/status/1765089261374914957 That's a lot of useless comments. Be nice if it said what the type is for and how it's used.
|
# ¿ Mar 6, 2024 21:07 |
|
NihilCredo posted:It's code that given a schema object generates the types defined by that schema. So the traditional way would be to have a compile step that generates types from a schema right? That's how I've done it, it can be kind of fiddly, but you can manually define a custom schema map/template in the tools I've used. If this thing messes up, I think you're just hosed. Schemas can get pretty complicated.
|
# ¿ Mar 6, 2024 23:02 |
|
GABA ghoul posted:
You can also set the current culture to en-us: code:
|
# ¿ Mar 7, 2024 23:14 |
|
My isEven implementation:code:
|
# ¿ Mar 11, 2024 15:17 |
|
Bruegels Fuckbooks posted:Here's a C# version that precomputes all even numbers up to IntMax, which obviously will save on calculation speed. We improve the initialization speed using a Lazy<T> so we only pay the cost of the precomputation on first use of IsEven()
|
# ¿ Mar 11, 2024 15:38 |
|
My new and improved version. No text files needed. Runtime may be a problem though, just get a faster computer.code:
|
# ¿ Mar 11, 2024 15:50 |
|
Bruegels Fuckbooks posted:I thought about it a bit and I think we can use tensorflow for this application. This may or may not work depending upon your CPU type and CUDA version present on your system - when you generate the model, it's important to take a vm of your working environment so you can ensure consistent results. welp, I'm out. No idea how this works.
|
# ¿ Mar 11, 2024 16:54 |
|
The hero we need.
|
# ¿ Mar 24, 2024 10:24 |
|
Volguus posted:If the alternative was python or electron on the desktop, gently caress yeah, Java is a million times more preferable to those abominations. If it was to be in a browser anyway, suggesting Java (as an applet? Web start?) that's is indeed a capital sin. I don't think electron's so bad. Visual studio code is written in electron and it works pretty good.
|
# ¿ Mar 24, 2024 17:04 |
|
Breetai posted:Had to look at some poorly running code. This is really a database horror than a coding horror isn't it? Not that it matters, poo poo still sucks.
|
# ¿ Apr 2, 2024 20:49 |
|
darthbob88 posted:Javascript horror that just crossed my desk Yeah, but just don't do that. It's fine.
|
# ¿ Apr 4, 2024 01:19 |
|
pokeyman posted:This is me writing any line of C++. "But does this really work the way I think it does???"
|
# ¿ Apr 10, 2024 23:14 |
|
|
# ¿ Apr 30, 2024 07:40 |
|
What about COM. Anyone remember COM? Or DCOM, or COM+. It was supposed to be this magical technology where you could register a COM object and then any program would use it. And when you update with a new version it would automatically work. And you could move those COM objects to a remote server and your program would just magically keep working the same. And any update on the server would be automatically be picked up by the local program. Except that poo poo didn't work. It was a pain in the rear end. You'd update version and the program keeps picking up the wrong one. And you'd pull your hair out trying to find the right incantation to make it work. Any type of remote COM had to be carefully designed to be called remote. So that's a leaky abstraction. poo poo was worse than what we had, which was just shared libraries resolve by PATH. Which is what we have now, which shows you how lovely com was. Of course I haven't worked with COM in like 20 years So I may not remember the specifics, but I do remember COM sucking poo poo, and having to pierce the vale of magic was often needed to get poo poo to work correctly.
|
# ¿ Apr 29, 2024 15:16 |