|
Suspicious Dish posted:Imagine SourceSafe but somehow slower and buggier. Clearcase and VSS are two entirely different forms of evil. For all VSS's faults, such as being loving slow, having a terrible UI, no real branching support, being unusable over the internet, and having the propensity to just gently caress up and eat files for no good goddamn reason... It's still easier to deal with than loving Clearcase. Clearcase's problem is that with enough effort, you can make it do any goddamn thing you want it to do, but you need to have dedicated build engineers because it has a sky-high learning curve.
|
# ¿ Dec 30, 2012 03:18 |
|
|
# ¿ May 21, 2024 00:30 |
|
how!! posted:What makes you think nothing is broken. A bit of undocumented code that seems to subtract %0.13 from all transactions seems to be broken to me. Maybe it was added by a programmer many years ago for debugging purposes and was left in by accident. Maybe it was put there to solve a problem that has since been solved some other way. You could be throwing money down the drain for no reason. This is why lovely, complex, undocumented code is bad and should be eliminated at all costs. Well that's not the only thing that can go wrong. I work on software that displays medical images. Long story short, a complaint comes in from another country that they can't use a navigation feature that tries to scroll together images that are parallel if you have images that have multiple orientations linked together. They bitch it's a safety issue, lots of smoke is blown. We sit down, we think about it, we're like "I know, let's not scroll together images that have different orientations." So we roll that out and suddenly a whole new set of doctors start bitching because they're trying to view two copies of the same stack of images in two different views and linking them together, and the scrolling is hosed up because we're excluding images with different orientations. The point is that sufficiently software can have unintended use cases. Like, we never designed the navigation aid feature to be used to link together images that weren't parallel, people just decided they were going to do that and decided that the current behavior is a safety risk! Then we tried to fix that, and we broke a completely unanticipated use case that we hadn't even imagined when we designed the goddamn feature! I work on a project that is six million LOC. It's so complicated that no single person has it in their own head just from a code standpoint, let alone requirements, and I just spend all day in meetings being like "oh, I think we put that patch in 2004 to make it so powerpoint would work if you copy pasted an image in because of some bullshit with the clipboard formats. Of course you don't need the option if you have an updated version of powerpoint because ms changed the way clipboard formats are handled but there's this one hospital that wouldn't update past that service pack and it's still in code because people would complain." It kind of sucks but we have enough trouble fixing the actual problems without putting ones in ourselves by mucking with stuff we don't need to muck with.
|
# ¿ Jan 17, 2013 05:02 |
|
Smugdog Millionaire posted:Sounds like your project is just too complicated and needs a rewrite. Your program doesn't do 6 million different things so it shouldn't be too big of a deal. Well at least the source code for that project has comments in English. The project that's supposed to replace it has all the rendering code written with Japanese comments. So I'll be working on something and my boss's boss will be like "DROP EVERYTHING AND GO TO JAPAN TO STRAIGHTEN poo poo OUT" Japan is a sucky place to do software development at least from my experience. Employees don't have internet connections for the whole building - you literally have to go to the computer with the internet connection to do email, etc (at least for my company.)
|
# ¿ Jan 17, 2013 23:19 |
|
Found this today in work stuff:code:
|
# ¿ Jan 21, 2013 17:10 |
|
nielsm posted:I believe that the "and" operator binds weaker than the assignment operator, so it parses as: In the good old days, if you mowed down someone in the street while driving drunk, the drunkenness could serve as a defense in court - "he's not a murderer your honor, he was just really, really drunk!"
|
# ¿ Feb 11, 2013 20:52 |
|
Doctor w-rw-rw- posted:Pretty sure mg -> MG isn't the problem - the problem is that both mg and μg capitalize to MG. Oh gently caress, that's pretty nasty. Granted everywhere I've ever seen a string comparison, people ToLower() then compare rather than ToUpper(). Maybe that's why?
|
# ¿ Mar 15, 2013 06:43 |
|
Wheany posted:I'm don't want to start a big argument about this because I would probably embarass myself, but I think the identical looking glyphs behave the same since they are essentially the same letter, even if one means "micro" and one means a literal "mu". Or or it could be that greek lowercase letters have uppercase equivalents. So if you want uniform toupper, it has to work with greek letters as well. It's just unfortunate that the letter looks like uppercase M
|
# ¿ Mar 18, 2013 20:54 |
|
bewilderment posted:My workplace running their own programming language to be backwards-compatible with their old UniBasic and UniData is bad enough. "We don't run any third-party code in our solutions," says the CTO proudly. I'm just calling properties ProperTires from now on just to mess with people.
|
# ¿ Mar 20, 2013 15:21 |
|
nielsm posted:What does this do that C++11 doesn't? Well for one it's pure C... pretty big difference between C and C++.
|
# ¿ Apr 21, 2013 13:46 |
|
Pilsner posted:I simply can't fathom how large C++ applications and 3D games can even function, given how insanely complex C/C++ is, notably with regards to memory allocation. My hat goes off (or condolences?) to those to can make it work. Does anyone actually think C++ is fine and dandy, or would you/they prefer a more modern language with GC, a simple and useful standard library, etc., if they had the choice? Well one of the reasons you would use C++ is because you don't want GC if you're writing stuff that performs well. It isn't that hard to make stuff not leak - if you're calling new or free or malloc this day an edge and aren't working on embedded software, you're doing poo poo wrong. Smart pointers and referenced counted smart pointers can handle everything for you, but the problem is that everyone has their own convention - your company needs to pick a convention for how to deal with memory allocation, have tools that enforce this convention on check in, and you need to run static analysis tools.
|
# ¿ Apr 30, 2013 21:46 |
|
pigdog posted:Everquest used to be the most popular MMORPG for years until World of Warcraft was released and quickly dethroned it. Why? Because all of Everquest's new content was horribly buggy and slow to implement... because, it turned out, all of it had to be hard-coded in C++. WoW implemented a Lua scripting engine for its game content and was able to offer so much more at much better quality. Actually that was one of the cool things about the windows script control in the 90's, it became braindead simple when doing windows programming to just instantiate the windows script control, run some jscript or whatever, and pass values to and from the scripts. It isn't a new idea by any stretch of the imagination.
|
# ¿ May 1, 2013 15:00 |
|
That Turkey Story posted:It's mostly due to the fact that prior to C++11 there was no way to create "variadic templates" (templates that can take any number of parameters). The hilarious thing about MSVC is that there actually still isn't real variadic template support in VS2012 - they use 'faux variadics.' The following paragraph speaks for itself: quote:Faux variadics: We've developed a new scheme for simulating variadic templates. Previously in VC9 SP1 and VC10, we repeatedly included subheaders with macros defined differently each time, in order to stamp out overloads for 0, 1, 2, 3, etc. arguments. (For example, <memory> included the internal subheader <xxshared> repeatedly, in order to stamp out make_shared<T>(args, args, args).) In VC11, the subheaders are gone. Now we define variadic templates themselves as macros (with lots of backslash-continuations), then expand them with master macros. This internal implementation change has some user-visible effects. First, the code is more maintainable, easier to use (adding subheaders was a fair amount of work), and slightly less hideously unreadable. This is what allowed us to easily implement variadic emplacement, and should make it easier to squash bugs in the future. Second, it's harder to step into with the debugger (sorry!). Third, pair's pair(piecewise_construct_t, tuple<Args1...>, tuple<Args2...>) constructor had "interesting" effects. This requires N^2 overloads (if we support up to 10-tuples, that means 121 overloads, since empty tuples count here too). We initially observed that this (spamming out so many pair-tuple overloads, plus all of the emplacement overloads) consumed a massive amount of memory during compilation, so as a workaround we reduced infinity. In VC9 SP1 and VC10, infinity was 10 (i.e. "variadic" templates supported 0 to 10 arguments inclusive). In the VC11 Developer Preview, infinity is 5 by default. This got our compiler memory consumption back to what it was in VC10. If you need more arguments (e.g. you had code compiling with VC9 SP1 or VC10 that used 6-tuples), there's an escape hatch. You can define _VARIADIC_MAX project-wide between 5 and 10 inclusive (it defaults to 5). Increasing it will make the compiler consume more memory, and may require you to use the /Zm option to reserve more space for PCHes.
|
# ¿ May 8, 2013 20:15 |
|
Jabor posted:Dark themes are seriously cool, when you're spending your whole day staring at a screen you really don't want it to have a glaring bright background. A programmer I work with is extremely sensitive to light - his background is muddy gray and his text is black. He can't look at a normal monitor with normal themes without visibly flinching though, it must suck to have to develop and be really sensitive to light from computer monitors.
|
# ¿ May 18, 2013 16:36 |
|
Lysandus posted:Ok, which of you did this. Too readable. I should take a crack at doing this my company's way.
|
# ¿ May 20, 2013 15:47 |
|
Suspicious Dish posted:https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/ConnectionStatus.java#L212-215 is that a loving joke
|
# ¿ Jun 1, 2013 00:10 |
|
Slanderer posted:"heh, look at this hack i just implemented, guys. it's so tight" i don't want to imagine the kind of mind that even could think of doing it this way the idea is so bad.
|
# ¿ Jun 1, 2013 06:25 |
|
Jewel posted:
For the punchline, click http://msdn.microsoft.com/en-us/library/aa260976(v=vs.60).aspx and scroll to the code sample.
|
# ¿ Jun 12, 2013 10:06 |
|
Volte posted:Yes, it worked fine, and was far more robust than the official solution which was basically "chop off various parts of the string and put them into a big switch statement". I totally agree with the grader about the style though. Good god, C style comments? Totally random indentation?
|
# ¿ Jul 26, 2013 11:33 |
|
Doctor w-rw-rw- posted:Speaking of security shame, here's a syllabus for Berkeley's (computer science) security class this semester: Man, that is a ridiculously fast-paced course. If that's meant for undergrads then god help you all.
|
# ¿ Aug 30, 2013 12:37 |
|
teamdest posted:Not to belabor the point, but if they fix the stack trace issue, you wouldn't need an ugly and possibly broken hack to do what you originally wanted. You benefit from bug fixes in anything you work under. I agree with Shrughes that it'd be a huge waste of time. Like, chances are a bug report like that, the person evaluating the bug would laugh unless you provided a minimal test case app, which might take days to write and test. Assuming you had the minimal test case, and the person you provide the test case app can actually get your stuff to build, you'd also have to match it with a defect report the person on the other side would understand, and answer their questions if needed. Congratulations, your bug will get marked no-fix or at the very least take months if not years to get fixed.
|
# ¿ Dec 3, 2013 13:55 |
|
Pollyanna posted:It's definitely the machismo. Are they the contractors or are you the contractor? If it's the former, then you have precedence over them. Dickheads like those don't respond to anything except acting like you have the bigger set of balls. Why are you posting like you know what you're talking about?
|
# ¿ Dec 22, 2013 00:23 |
|
theodop posted:The second option: committed code that breaks the build. He doesn't do a Get Latest so its based on whatever's on his PC. Looks like he just overrode the conflicting version dialog too. Gated checkin will at least get you to the point where the code compiles and passes the unit tests.
|
# ¿ Jan 15, 2014 11:19 |
|
So we use google closure at work for our javascript stuff. Somebody decided we needed to annotate all our JS with the google closure jsdoc comments (that became a fad until people realized putting annotations for hundreds of thousands of lines of legacy code was loving boring and stopped doing it.) But anyway, I was looking through some C++ code from other groups, and some moron actually wrote google closure type annotations ... for C++ methods. You know, that esoteric language is statically typed and has a header and doesn't use google closure compiler to compile. What the gently caress?
|
# ¿ Feb 20, 2014 14:47 |
|
HardDisk posted:I'm really trying, but I can't understand what's the error. code:
Now the verification method never gets called and the method that called this function thinks it succeeded because err = 0. So never actually verify the certificate, but report success. Bruegels Fuckbooks fucked around with this message at 14:21 on Feb 22, 2014 |
# ¿ Feb 22, 2014 14:19 |
|
evensevenone posted:"if (error) goto fail" is an pretty common C construction when you aren't using exceptions, since otherwise you'd have to build the "failure" code path through conditionals the rest of the through the function, which would be way more error prone. As opposed to C with exceptions? Exceptions would be better than retvals if morons didn't sprinkle catch(...) {} all over codebases.
|
# ¿ Feb 22, 2014 16:42 |
|
Steve French posted:There are C implementations of exceptions out there, it's just not provided by the language or standard library. Yeah, I consider not having exceptions a feature, not a bug. I loving love integrating with libraries that throw exceptions in higher level languages, it's definitely my favorite part of writing glue code that makes poo poo talk to poo poo.
|
# ¿ Feb 22, 2014 18:16 |
|
Blue Footed Booby posted:Has anyone ever been sued over that license? I'm imagining arguing over definitions of good and evil in court and the judge either shooting himself or you. Granted it's fun messing with lawyers.
|
# ¿ Mar 23, 2014 20:52 |
|
Ender.uNF posted:. My experiences with doctors and software have been absolutely horrendous. You'd think the same kind of thinking used for diagnosing medical conditions would transfer to being able to troubleshoot software, but it's clearly not the same kind of thinking at all.
|
# ¿ Jun 12, 2014 13:24 |
|
kitten smoothie posted:There is zero reason in the year 2014 to care about quitting Android apps. A "quit button" under the hood is just going to call Activity.finish() which is really pretty much the same as what's going to happen if you hit the back button from an app and wind up on your home screen. Say I'm playing Pandora and I hit the back button to get to the home screen. The music keeps playing! I've seen android phones have like 50 or 60 background processes running just with all the crap people download. A lot of app developers like to run background apps. Download enough stuff that does that, they all keep running, and it eats battery life and memory. Apple tried the other way with banning background apps and people didn't like that, so they eventually relented. I don't really have a solution but it's totally still a problem if you download a bunch of apps even in the year of our lord 2014.
|
# ¿ Jun 18, 2014 13:34 |
|
Soricidus posted:Picture, if you will, a codebase in which the .h files are all symlinks to the corresponding .c files, most of which then #include themselves recursively. Time works the same way.
|
# ¿ Aug 7, 2014 21:37 |
|
return0 posted:I don't know much about JS, what's the horror with the first one... looks like branching on the value of a default argument? javascript doesn't actually have working default arguments in anything but firefox.
|
# ¿ Aug 23, 2014 23:02 |
|
Literally Elvis posted:crosspost from the noob jobs thread: Sounds just like the architects at my company.
|
# ¿ Sep 4, 2014 00:23 |
|
Jabor posted:Can someone point me in the direction of a good example of self-documenting code? I mean an actual example of a complex program, not a little toy "this class does arithmetic on numbers" thing. I got handed a codebase that was something like 250k LOC in C++ with no english comments and it was easier to work with than the american product (which had lots of comments in english.)
|
# ¿ Oct 14, 2014 12:30 |
|
Dr Monkeysee posted:Yeah if I remember correctly there were in fact several confirmed cases in the wild of the "Windows 9*" version check and they were all Java. I'd be surprised if there was enough *relevant* Java code out there checking for pre-2k versions for it to sway Microsoft's naming choices one way or the other. Probably being a master of the obvious here, but if your java code cares about the version of windows that its running on, you've clearly chosen the wrong tool for the job.
|
# ¿ Oct 25, 2014 14:09 |
|
Centripetal Horse posted:This is the funniest thing I've read in this thread. I'm not entirely sure why, but the idea of this type of petty sabotage is hilarious to me. I actually laughed out loud at the thought of the poor bastard's confusion when gcc starts choking on his perfectly-fine-until-then code. Get parasoft and enable all the rules and it's pretty much the same thing.
|
# ¿ Oct 29, 2014 06:31 |
|
seiken posted:
So what do you think of Perl compared to Python?
|
# ¿ Dec 7, 2014 18:49 |
|
TheresaJayne posted:The homwwork was a sheet that said Man, it'd be cool if job interviews were like that.
|
# ¿ Dec 11, 2014 14:40 |
|
QuarkJets posted:How does one even arrive at that kind of coding style. "Hmm this algorithm is slow as gently caress, welp no point in trying to optimize it" Well don't pick a lovely algorithm and your poo poo won't be slow! Maybe your algorithm for putting a list of items in a drop-down menu doesn't need to run in factorial time.
|
# ¿ Dec 13, 2014 14:36 |
|
apseudonym posted:Focusing on only the math part misses a big part of "dont do crypto". Honestly, I wouldn't trust most developers to correctly use crypto libraries, let alone do crypto. Pretty much every time I've seen somebody get the idea "hey, let's use a crypto library because we need cryptography for reasons" something bad has happened in the application.
|
# ¿ Dec 23, 2014 01:55 |
|
|
# ¿ May 21, 2024 00:30 |
|
evensevenone posted:Well, the first shellshock wasn't a C thing, but after looking at bash for like a day, they discovered 3 more serious vulnerabilities, 2 of which were buffer overflows. If exceptions weren't literally the worst part about programming with modern languages I'd agree with you.
|
# ¿ Dec 25, 2014 14:44 |