|
It seems like the more someone is concerned about random people stealing their code, the shittier it is.
|
# ? Oct 17, 2011 23:56 |
|
|
# ? May 31, 2024 00:29 |
|
SavageMessiah posted:It seems like the more someone is concerned about random people stealing their code, the shittier it is. I can't hear you over the sound of how awesome my homebrewed encryption scheme is. It's way better than bcrypt or RSA, and it's all written in PHP, but I can't show it to you because it's SECRET.
|
# ? Oct 18, 2011 00:17 |
|
OriginalPseudonym posted:I would say "Use \r so that it's non-obvious (depending on their text editor) that there's newlines", but it doesn't appear that PHP recognizes those as newlines unless it's explicitly enabled. Oh well. Oh PHP...
|
# ? Oct 18, 2011 00:25 |
|
SavageMessiah posted:It seems like the more someone is concerned about random people stealing their code, the shittier it is. Now that I think about it, that kind of makes sense. If you're good, you can write simple stuff like that easily, and you know that other good programmers can as well, which means there's no reason to keep it secret. If you aren't, it's a terrible ordeal to get it written and even once you're done it only just barely works. But since they think they're good, that means it must have been a really loving hard problem they just solved! Which means a solution for it must be valuable in some way, and they should protect it.
|
# ? Oct 18, 2011 00:40 |
|
That plus if you have a lick of sense about you, you'll feel stupid sharing terrible code so you'll only share better code.
|
# ? Oct 18, 2011 00:59 |
|
pokeyman posted:That plus if you have a lick of sense about you, you'll feel stupid sharing terrible code so you'll only share better code. I would think that should be reversed- if you're bad and you know it, you'll want to share your code so you can get better.
|
# ? Oct 18, 2011 01:13 |
|
OriginalPseudonym posted:I would think that should be reversed- if you're bad and you know it, you'll want to share your code so you can get better. The problem with most bad developers is that they don't know they're bad. It's usually the opposite; they think they're awesome.
|
# ? Oct 18, 2011 03:05 |
|
ToxicFrog: I think you nailed it hard. 'I find this really difficult' + 'I got it to work' = 'I am a goddamn genius'. It's actually pretty impressive how well that generalizes to other situations.
|
# ? Oct 18, 2011 03:09 |
|
Internet Janitor posted:ToxicFrog: I think you nailed it hard. Absolutely. Good developers will take "I found that really difficult" to mean "I don't know enough about how to do this correctly" and study the poo poo out of it. And that applies at all levels, up from basic string manipulation to architecting major applications with a ton of moving parts.
|
# ? Oct 18, 2011 03:16 |
|
Ithaqua posted:Absolutely. Good developers will take "I found that really difficult" to mean "I don't know enough about how to do this correctly" and study the poo poo out of it. And that applies at all levels, up from basic string manipulation to architecting major applications with a ton of moving parts. I don't know about other people, but if something's literally difficult, then my first reaction is to stop it right there because I'm probably doing something wrong. Coding is easy, you just have to come at it from the proper angle.
|
# ? Oct 18, 2011 03:48 |
|
OriginalPseudonym posted:I don't know about other people, but if something's literally difficult, then my first reaction is to stop it right there because I'm probably doing something wrong. Coding is easy, you just have to come at it from the proper angle. I was looking over someone else's code today. He had rolled his own "alphabetize this list of strings" algorithm. It was C#. I kept thinking "man, this guy isn't nearly lazy enough."
|
# ? Oct 18, 2011 04:06 |
|
OriginalPseudonym posted:I don't know about other people, but if something's literally difficult, then my first reaction is to stop it right there because I'm probably doing something wrong. Coding is easy, you just have to come at it from the proper angle. It depends on the experience level and problem domains, really. If a long time Java or other strictly OO based programmer walks into the same problem problem that uses Clojure or Scala, it's going to be really difficult for them.
|
# ? Oct 18, 2011 04:24 |
|
NotShadowStar posted:It depends on the experience level and problem domains, really. If a long time Java or other strictly OO based programmer walks into the same problem problem that uses Clojure or Scala, it's going to be really difficult for them. I admit that coming from different programming backgrounds is going to trip you up, but that's all the more reason to pause and start looking around. Chances are good that you're not the first person who's had to do X problem before, and seeing a handful of "this is how I did it" examples can be enough to kickstart your mind into the proper paradigm to get moving in the right direction. Which is not to say "Copy paste 110,000 lines of code, splice them together, and call it a day". There's reinventing the wheel, and then there's gluing together a full-sized car out of micro machines with spunk and used gum.
|
# ? Oct 18, 2011 04:45 |
|
This guy really, really likes using string.Join().code:
plushpuffin fucked around with this message at 14:26 on Oct 18, 2011 |
# ? Oct 18, 2011 14:13 |
|
OriginalPseudonym posted:Which is not to say "Copy paste 110,000 lines of code, splice them together, and call it a day". There's reinventing the wheel, and then there's gluing together a full-sized car out of micro machines with spunk and used gum. I'm more used to the crushing a luxury car into a vaguely wheel shaped object paradigm.
|
# ? Oct 18, 2011 14:51 |
|
Bhaal posted:And that's fine and all, but I just hate how you can't easily itemize an allotment for "habit-break and reeducate client to accept the changes they came to me for in the first place" on the SOW. You certainly can, it's called "training."
|
# ? Oct 18, 2011 15:20 |
|
BonzoESC posted:You certainly can, it's called "training." I can't even get most clients to agree to signing a proposal with "testing" on it, let alone "training." We've taken to just putting all that stuff in as "project management" which they mysteriously seem fine with, but you can only make that number so big.
|
# ? Oct 18, 2011 15:25 |
|
Sooooocode:
Damnit Guido.
|
# ? Oct 18, 2011 15:30 |
|
Zombywuf posted:Sooooo Tuples in Python can be a bit funky. A single element tuple requires a comma: code:
code:
Python's def follows the same (bizarre) rules.
|
# ? Oct 18, 2011 15:48 |
|
Tuples are defined by the comma. Parenthesis just make it easier to use as an expression; they're not necessary when defining one.code:
code:
|
# ? Oct 18, 2011 16:03 |
|
Janin posted:Tuples are defined by the comma. Parenthesis just make it easier to use as an expression; they're not necessary when defining one. Yeah, the only dodgy part of any of that is the (1) is not a tuple thing, but it's understandable and why would you want to declare a single-element tuple like that anyway? Why would you want "def f(a, )" or, more realistically, "def f(a, b, c, d,)" to be an error?
|
# ? Oct 18, 2011 17:14 |
|
Jonnty posted:Why would you want "def f(a, )" or, more realistically, "def f(a, b, c, d,)" to be an error? Because I'm far more likely to have left a comma lying around by mistake than to have put it there deliberately. I mean, why not just ignore any lines that can't be parsed? Would make it easier right?
|
# ? Oct 18, 2011 17:23 |
|
SlightlyMadman posted:Since they neglected to put a break in that loop, just add 1,000,000 blank lines to the end of that config file. The site will mysteriously slow down and you can blame it on lovely hosting. Or claim you think you can optimize the site if some overtime will get approved. Remove 10-20% of the blank lines, goof off for the rest of the time, collect money, repeat as needed. I hear this works great with usleep() and anything AJAX-y.
|
# ? Oct 18, 2011 17:38 |
|
Zombywuf posted:Because I'm far more likely to have left a comma lying around by mistake than to have put it there deliberately. I mean, why not just ignore any lines that can't be parsed? Would make it easier right? It's something which can sometimes happen for good reasons (ease of updating lists), barely ever happen for bad reasons and sometimes happen as an innocuous mistake, why should it be an error? Your line of "it's unnecessary, STOP EVERYTHING" leads to trailing whitespace being an error.
|
# ? Oct 18, 2011 18:12 |
|
Jonnty posted:It's something which can sometimes happen for good reasons (ease of updating lists), barely ever happen for bad reasons and sometimes happen as an innocuous mistake, why should it be an error? Your line of "it's unnecessary, STOP EVERYTHING" leads to trailing whitespace being an error. In python, excess leading whitespace is an error. But yeah, I've been bitten by the fact that python doesn't complain when you leave commas lying about more times than I've been bitten by languages being strict about them. In general the syntax of a language should be strict, otherwise you end up with abominations like automatic semicolon insertion and HTML. The worst part is that pylint doesn't even give a warning. Le sigh.
|
# ? Oct 18, 2011 18:22 |
|
Zombywuf posted:In python, excess leading whitespace is an error. How has it bitten you? The only thing I can think of is actually getting rid of an argument by accident or something, which is pretty contrived.
|
# ? Oct 18, 2011 18:30 |
|
Jonnty posted:How has it bitten you? The only thing I can think of is actually getting rid of an argument by accident or something, which is pretty contrived. By my doing some refactoring, getting distracted for a moment and then pylint (running in the background in emacs) telling me "Everything's ok, no syntax errors here". Then all my unit test fail at the call site instead of at the location of the error.
|
# ? Oct 18, 2011 18:44 |
|
Doc Hawkins posted:Or claim you think you can optimize the site if some overtime will get approved. Remove 10-20% of the blank lines, goof off for the rest of the time, collect money, repeat as needed. Too bad I can't pull that ruse. I get paid by the year. I'll just stick to fixing up all this horrible code I've been running in to.
|
# ? Oct 18, 2011 20:45 |
|
Zombywuf posted:By my doing some refactoring, getting distracted for a moment and then pylint (running in the background in emacs) telling me "Everything's ok, no syntax errors here". Then all my unit test fail at the call site instead of at the location of the error. You should be running your unit tests in the background too, that way you'll know better when a particular change has caused one to fail
|
# ? Oct 18, 2011 21:36 |
|
Apparently, in VC++6, this worked:code:
|
# ? Oct 18, 2011 21:48 |
TasteMyHouse posted:Apparently, in VC++6, this worked: VC10 still has a compiler option to allow that broken scoping, look under the C/C++ > Language settings. But yeah, better fix the code.
|
|
# ? Oct 18, 2011 22:14 |
|
nielsm posted:VC10 still has a compiler option to allow that broken scoping Why would you want to do this?
|
# ? Oct 18, 2011 22:40 |
|
I can't remember for the life of me, but I was working with some horrible scripting language not long ago that would actually throw AN ERROR if you tried to do that CORRECTLY. Declaring "int i" a second time would tell you that i was already defined. I ended up having to declare all of my iterators at the top of the function.
|
# ? Oct 18, 2011 22:45 |
|
nielsm posted:But yeah, better fix the code. I have to before gcc sees it and refuses to speak to me ever again.
|
# ? Oct 18, 2011 22:49 |
|
Dynamic scoping has its place, just not there.
|
# ? Oct 18, 2011 22:59 |
|
Optimus Prime Ribs posted:Why would you want to do this? well you HAD to do that in VC6.0 since code:
|
# ? Oct 18, 2011 23:25 |
|
Better to just have iterators.h that you #include at the top of every file:code:
|
# ? Oct 18, 2011 23:28 |
|
BonzoESC posted:You should be running your unit tests in the background too, that way you'll know better when a particular change has caused one to fail Working on it, but emacs's compile mode doesn't quite do what I want. It would still have the problem that the error would be reported at the call site, not at the line of code with the error.
|
# ? Oct 18, 2011 23:31 |
|
tractor fanatic posted:well you HAD to do that in VC6.0 since Well isn't that cute.
|
# ? Oct 18, 2011 23:38 |
|
|
# ? May 31, 2024 00:29 |
|
Optimus Prime Ribs posted:Why would you want to do this?
|
# ? Oct 18, 2011 23:41 |