|
Steve French posted:
(I assume you intended the horror to be Ruby DSLs, but if you had something else in mind then do please feel free to point it out.)
|
# ¿ Sep 20, 2014 12:40 |
|
|
# ¿ May 17, 2024 18:20 |
|
M31 posted:Composition is much more maintainable and having a standard class with all character attributes seems pretty logical to me in that context, even if you have a gazillion attributes.
|
# ¿ Sep 22, 2014 10:48 |
|
Aleksei Vasiliev posted:How to Multiply in C Programming
|
# ¿ Sep 24, 2014 08:42 |
|
qntm posted:Code is not documentation. It doesn't matter if the code is tests which test other code. Tests need documenting as well. If someone* looking at a method can't understand what it's for and how it's used without referring to external documentation or tests, your code is bad. Sorry. That doesn't mean you have to write a thousand-word essay explaining every trivial getter, but it sure as hell does mean you need to document anything that's non-trivial - and that applies to any code that will ever be maintained, not just public APIs. Unless your employer actively supports paying people to reverse-engineer their own products, I guess, but that seems like a rather inefficient way to run a business. * Someone who knows the language and has a basic understanding of the domain you're working in, at least. For example: you, in six months' time.
|
# ¿ Oct 12, 2014 22:24 |
|
Could someone who's arguing that tests can make good documentation please post an example of a test suite they'd like to use that way? I'm honestly interested to see what you have in mind.
|
# ¿ Oct 13, 2014 20:09 |
|
I love the argument that comments might get out of date so you should just abandon them and use descriptive method names instead. Because there's no way anyone would ever change a method without updating its name ... right? Missing method comments are a code smell. It might still be good code, but it's often a sign of sloppy maintenance.
|
# ¿ Oct 14, 2014 22:01 |
|
astr0man posted:If it's obvious what your code is doing it doesn't need comments. In this case if your function was named handle_butts() or something it wouldn't need any additional explanation. Fortunately there was an accurate and detailed method comment that explained what it actually did, so I didn't have to reverse-engineer it like I would have if its author had subscribed to the opinions of some posters in this thread of horrors.
|
# ¿ Oct 15, 2014 19:16 |
|
Subjunctive posted:I think we use libjpeg as JS for client-side image resizing now.
|
# ¿ Oct 22, 2014 09:08 |
|
Deus Rex posted:It ranges from trivially easy to pretty easy to set up in every operating system I've ever used. If you're not using it and value your data, you probably should be! On my phone, it's a no-brainer. The data's all in the cloud anyway, and the risk that someone else will get their hands on my phone is very high. On my PC? Not such an obvious choice.
|
# ¿ Oct 23, 2014 00:26 |
|
sarehu posted:If you would be screwed by a lost password then you'd also be screwed by a hard drive failure. The risks are small. Backups exist, etc. But the risks caused by just not bothering to encrypt everything are also frankly insignificant, so why bother, unless you're paranoid about the Feds kicking down the door and stealing your cat videos?
|
# ¿ Oct 23, 2014 09:28 |
|
ATM Machine posted:The more I learn about Java, the more I scream
|
# ¿ Oct 30, 2014 10:25 |
|
YanniRotten posted:I understand that a pretty minimal level of application security is often 'good enough' for an enterprise application where your users are generally non-malicious, non-technical, and probably don't care at all about stealing or damaging data.
|
# ¿ Nov 1, 2014 22:50 |
|
Scaramouche posted:Not really coding horror, but sometimes funny, the underhanded c contest has started again: Brb, just submitting the OpenSSL source code.
|
# ¿ Nov 4, 2014 00:34 |
|
If you hate clearcase, wait till you've tried clearcase where branching is disabled in all vobs and the use of commit messages is strictly forbidden in favor of a separate central manually-updated commit log that in practice has barely been touched since 1997!
|
# ¿ Nov 6, 2014 10:25 |
|
Xenoveritas posted:Well, I'm not going to post any actual code, instead I'll just say: Until you got to the last line there, I thought I knew which program you were talking about. Now I'm just going to sob gently at the horrifying revelation that there's more than one of them.
|
# ¿ Nov 7, 2014 00:39 |
|
Xenoveritas posted:gently caress, I'm wrong about what it does if the lengths are equal. If the lengths are equal, it then goes through the string characters backwards and checks each character's lexicographical orders.
|
# ¿ Nov 10, 2014 20:52 |
|
Munkeymon posted:The nutbar that used to be the senior admin around here likes to use disaster names and rather presciently picked tsunami in November 2004. Wouldn't be so bad but the idiot didn't rename it before calling in for tech support in early January the next year to getting something set up. Tech support was, of course, in Indonesia. Congratulations (?), you have managed to get the server-name derail back on topic.
|
# ¿ Nov 10, 2014 23:04 |
|
Also I ran into some servers named after my little ponies today and I think I want to kill someone.
|
# ¿ Nov 10, 2014 23:07 |
|
Che Delilas posted:Look man, it's not the enterprises' faults if they don't want to pay enough to attract more than entry-level talent. I don't think you get the enterprise. The whole "gotta pay big money or you'll get lovely people" principle only applies to executives. Regular employees don't care about the money, they just want secure jobs with good benefits so the executives can save even more money when they outsource them, and get an even fatter bonus
|
# ¿ Nov 18, 2014 01:54 |
|
Ithaqua posted:The people who don't care about being paid a fair market value for their skills are almost always lovely You know that. I know that. The people who make hiring decisions for enterprise software development apparently don't.
|
# ¿ Nov 18, 2014 09:48 |
|
Subjunctive posted:Same as the apps that wrap a webview and ship a local-only node server as part of it; it's not the worst way to build an app This is true, but only because the option exists to build an app with an Excel user interface driven by VBA.
|
# ¿ Nov 20, 2014 00:25 |
|
hobbesmaster posted:It should pretty much only be used with enums and is horribly abused in practice with everything else. switch/case on enums is basically a bad language's substitute for pattern matching on algebraic data types.
|
# ¿ Nov 24, 2014 21:49 |
|
Skuto posted:I don't even know what this is. It's like switch statements, but better.
|
# ¿ Nov 25, 2014 11:52 |
|
QuarkJets posted:In what sense? I've never heard of these before, so I looked up some code examples. Can you explain the advantages for us? Strong typing and exhaustiveness guarantees. You can't easily get those if enums are just aliases for ints. Java-style enums get you part of the way, but still have annoying limitations. Then proper sum types extend the enum concept by allowing you to associate variable data with some members, which is similar to, say, using a combination of an enum and a union in C, but again with actual type-checking. And pattern matching then lets you destructure those and use bits of their data in the matching process. It gives you a very nice natural representation for things like trees with associated data.
|
# ¿ Nov 25, 2014 21:44 |
|
Powerful Two-Hander posted:Are all developers poo poo? Yes
|
# ¿ Dec 4, 2014 22:27 |
|
QuarkJets posted:Variable declaration and scope are way simpler in Python than in any of those other languages, so this is just Probably the problem is the whole "global" mess where you can read from something but trying to write to it without saying please will break everything.
|
# ¿ Dec 6, 2014 12:07 |
|
Someone I would be fired for naming posted:We don't need source control anymore now that we've switched to Python.
|
# ¿ Dec 6, 2014 17:35 |
|
Hammerite posted:The worst thing about this code is that it uses a double for something in a particular unit and that the user has to be reminded with a little comment what unit they are supposed to use. Good until at some point in the future someone has a brain fart and forgets about units, and assigns a value which is actually in calories per half-hour per acre. It should use instead an object representing the value, from a class that is aware of units and unit conversions. That would be a great idea if Java had operator overloading.
|
# ¿ Dec 6, 2014 18:54 |
|
guys, guys, this language that I am intimately familiar with behaves the way I expect, so clearly what it does is natural and logical and anyone who thinks it's flawed or inconsistent simply doesn't get it
|
# ¿ Dec 7, 2014 14:28 |
|
Python is fine and often a good choice, but it's dumb to pretend it doesn't have a bunch of warts. The same goes for pretty much every language. If you can't list a bunch of nasty design flaws in a given language, you probably don't know it as well as you think.
|
# ¿ Dec 7, 2014 17:34 |
|
Thermopyle posted:Stop saying probably wrong things that many people are obviously going to disagree with you on and then going "but I'm not going to explain them except in some amazing magnum opus that I'm not actually going to write". Actually please carry on doing all that, but in yospos
|
# ¿ Dec 9, 2014 20:05 |
|
JawnV6 posted:Such as? Java or C#. Either is a better choice than a plang in any non-throwaway situation where a plang was an option in the first place. They're quite expressive enough in practice, it's easy to find people who know the languages, performance and tooling will be vastly better, and you get to take advantage of all kinds of useful static analysis that is flaky at best in a plang. Any other opinion is born of ignorance or prejudice.
|
# ¿ Dec 10, 2014 22:07 |
|
QuarkJets posted:And what if you're solving a problem that hasn't been solved before? If you think you fall into this category, you are probably mistaken. Feel free to keep right on reinventing the wheel, though, rewriting things in increasingly inefficient ways has kept programmers employed for decades now and there's no reason to suppose you can't spin it out for the rest of a lucrative career!
|
# ¿ Dec 13, 2014 19:05 |
|
Hitler trusted professional cryptographers instead of rolling his own, and look what happened to him. Don't be like Hitler.
|
# ¿ Dec 23, 2014 11:35 |
|
When I want to crypto I usually make a one time pad, which is where you use rand() to seed itself so the seed is also random and nobody can recreate the key. Then you just xor that with your message, making sure it's the same length as the key otherwise it's not secure. Send the key in one email and the message in another from a different address so even if the nsa intercept one they'll still be out of luck. Don't forget to encrypt the subject line too because if you just send it saying "cipher key" they'll probably notice that. That's all it takes really, dunno why everyone makes it out to be such a big deal.
|
# ¿ Dec 24, 2014 20:14 |
|
Dr. Stab posted:What else would you name a variable that flips itself and does nothing else? x
|
# ¿ Dec 24, 2014 22:51 |
|
pigdog posted:Even if you can't code for poo poo and the code you first come up with is completely retarded, you can still be confident that it works You can be confident that it passes your tests, and nothing more. Congratulations, you have successfully moved the point of failure from one chunk of code you wrote to another chunk of code you wrote!
|
# ¿ Dec 31, 2014 22:29 |
|
Steve French posted:Or maybe you choose not to implement your code only considering the narrow circumstances of one test at a time, and you realize from the get go that an if statement for every combination of inputs is loving stupid, and avoid wasting your time. Exactly. Like, the only thing I can see people arguing against is the idea that you should deliberately write incorrect code at any point and expect this to improve the end result.
|
# ¿ Dec 31, 2014 23:34 |
|
carry on then posted:The entire degree program should be this. If you can't hack it in a fast paced, high skill environment, you don't get the degree. Can't pivot on a moment's notice? Fail. Can't put in 12 hour days 7 days a week like a team player? Fail. We need to be much better and finding and promoting rockstar programmers and getting rid of everyone else. Please source your quotes.
|
# ¿ Jan 2, 2015 20:04 |
|
|
# ¿ May 17, 2024 18:20 |
|
The horrors are coming from inside the thread
|
# ¿ Jan 6, 2015 23:57 |