|
Dren posted:Thanks, I'll roll my own. I feel like it's kind of a strange culture on github to not require a license to be specified but to explicitly permit forking. It seems like forking something with no license leaves you in kind of a no-man's land. You were allowed to fork but you're not really allowed to use the code for anything because it's implicitly copyrighted. Requiring a valid open-source license for all projects is pretty much the one thing I like about Google Code.
|
# ? Aug 15, 2013 01:17 |
|
|
# ? Apr 27, 2024 12:07 |
|
Internet Janitor posted:Spotted at work today in C code for an embedded device: original pull request was to change it to 28
|
# ? Aug 15, 2013 01:27 |
|
Plorkyeran posted:You are allowed to build and run it, just not distribute it (in source and binary form). Are you? The only rights I see granted in the ToS are the rights to "view and fork" (Section F.1). They never define what "fork" means much less imbue it with any usage rights.
|
# ? Aug 15, 2013 01:30 |
|
evensevenone posted:(Not mine) Abusing alias like that is a horror. Especially because if that was properly in a file called git-yolo, you'd be able to use "git yolo" on the command line!
|
# ? Aug 15, 2013 01:41 |
|
Dren posted:Are you? The only rights I see granted in the ToS are the rights to "view and fork" (Section F.1). They never define what "fork" means much less imbue it with any usage rights.
|
# ? Aug 15, 2013 01:57 |
|
Found this in some code the other day and while it isn't the worst thing in the world, it annoyed me because there's no reason to do it and it sort of kills readability.code:
Sacrificing readability to reduce 4 lines of code is dumb.
|
# ? Aug 15, 2013 02:38 |
|
Bognar posted:I've been pushing for code reviews, and we're slowly starting to do them. However, the plan is to introduce them for the more junior developers first and then move up the chain. The guy who writes 'wip' and 'asdf' is our second most senior developer, so it will be a bit before that is fixed by code reviews. Leading by example, I see.
|
# ? Aug 15, 2013 02:59 |
|
Bognar posted:I've been pushing for code reviews, and we're slowly starting to do them. However, the plan is to introduce them for the more junior developers first and then move up the chain. The guy who writes 'wip' and 'asdf' is our second most senior developer, so it will be a bit before that is fixed by code reviews. What kind of code reviews? Are you talking the meetings where the mess is on the screen and it gets sniped line-by-line, paired stuff, offline reviews, or what? That person probably thinks they're God's gift to software, so think of all the excuses you can imagine for them to shrug off all the feedback.
|
# ? Aug 15, 2013 03:15 |
|
status posted:Found this in some code the other day and while it isn't the worst thing in the world, it annoyed me because there's no reason to do it and it sort of kills readability. It doesn't work when your properties are WRITE-ONLY!
|
# ? Aug 15, 2013 05:14 |
|
pokeyman posted:It doesn't work when your properties are WRITE-ONLY! Sure it does.
|
# ? Aug 15, 2013 05:19 |
|
status posted:I tried to explain that it was a dumb thing to do, but he was having none of it. "What's wrong with that? It's fine." I do this all the time and don't see a problem with it. What's unclear/unreadable about it? I thought it was a commonly used construct to set a load of variables to the same value.
|
# ? Aug 15, 2013 07:49 |
|
It's a gigantic long line when you could increase readability immeasurably at little or no cost by just doing one assignment per line. It violates the Zen of Python in a few different ways, notably "flat is better than nested" and "readability counts". e: Something else I realised - due to CPython implementation details, if "NO" is a value which isn't precomputed (like an integer between -5 and 128) then the stacked assignment means all those names are given the exact same object, rather than copies of the object. Python code:
Crosscontaminant fucked around with this message at 08:19 on Aug 15, 2013 |
# ? Aug 15, 2013 08:10 |
|
But he never said it was Python? Also, you don't seem to explain why it's unclear or unreadable, just restate that it is because it is I would hope that Perhaps I am the horror...
|
# ? Aug 15, 2013 08:28 |
|
If you think a line that's 170+ characters long is reasonable in any context then yes perhaps you are the horror.
|
# ? Aug 15, 2013 08:44 |
|
..btt posted:But he never said it was Python?
|
# ? Aug 15, 2013 08:55 |
|
GrumpyDoctor posted:Sure it does. How could it? Each assignment assigns the value from the RHS into the LHS. Aside from the rightmost assignment, that means getting the value of a property.
|
# ? Aug 15, 2013 09:12 |
|
pokeyman posted:How could it? Each assignment assigns the value from the RHS into the LHS. Aside from the rightmost assignment, that means getting the value of a property. a = b evaluates to "the thing that was stored in a," not "the value of a after the store" (Disclaimer: I tested this in C#, but as far as I know it's true in any language with C-style assignment semantics.) raminasi fucked around with this message at 09:25 on Aug 15, 2013 |
# ? Aug 15, 2013 09:19 |
|
Jabor posted:If you think a line that's 170+ characters long is reasonable in any context then yes perhaps you are the horror. I was assuming the implied horror was the construct, not the line length. I would stick some line breaks in that specific example.
|
# ? Aug 15, 2013 09:34 |
|
Suspicious Dish posted:The daemon is nowhere near your init. But what do you have against dbus? It solves a problem only Gnome developers had, namely that Bonobo was poo poo. And there is really no need for anything like dbus to be anywhere near init, it has nothing to do with the daemon. Emulating a networked message passing system inside your machine in order to boot is nothing but over-engineering.
|
# ? Aug 15, 2013 12:05 |
|
GrumpyDoctor posted:a = b evaluates to "the thing that was stored in a," not "the value of a after the store" In C++, most operator= overloads I have seen tend to be: code:
You would need the extra functions ( like type::operator=(const class&) )to allow the conversion from 'class' back to 'type', and if class was a write-only accessor object, then these probably wouldn't exist.
|
# ? Aug 15, 2013 12:14 |
|
..btt posted:But he never said it was Python? You're sacrificing readability for the perceived efficiency of concatenating several lines. As mentioned before, flattening this would make it simpler to parse visually and mentally, as a simple assignment statement is no longer so simple to view. It's in the same area as assigning a variable within an if statement; yes, you can do it, and you'll save a line there too, but it's usually not worth it (although sometimes it can be). I'd let it slide if you were just assigning two variables although I would grump about it, but five is just too long. Sorry, you're the horror.
|
# ? Aug 15, 2013 12:43 |
|
Just got this exception message.quote:
|
# ? Aug 15, 2013 13:16 |
|
Zombywuf posted:It solves a problem only Gnome developers had, namely that Bonobo was poo poo. And there is really no need for anything like dbus to be anywhere near init, it has nothing to do with the daemon. Emulating a networked message passing system inside your machine in order to boot is nothing but over-engineering. And as I said, it doesn't. systemd simply uses the serialization protocol between UNIX domain sockets it makes itself so that it didn't have to invent its own. DBus isn't networked either; it runs on UNIX domain sockets and while there have been attempts to change it to remote over TCP, it's been a failure.
|
# ? Aug 15, 2013 13:34 |
|
Volmarias posted:You're sacrificing readability for the perceived efficiency of concatenating several lines. As mentioned before, flattening this would make it simpler to parse visually and mentally, as a simple assignment statement is no longer so simple to view. It's in the same area as assigning a variable within an if statement; yes, you can do it, and you'll save a line there too, but it's usually not worth it (although sometimes it can be). I'd let it slide if you were just assigning two variables although I would grump about it, but five is just too long. This'll be my last reply on the subject, since it's starting to become a bit of a derail, but to me it's quicker to mentally parse "set a, b, c and d to x" than it is to parse "set a to x then set b to x then..." It's not about laziness in typing, it's about the code being more concise and to the point. Happy to accept that I'm unusual in that regard, but it doesn't seem that strange.
|
# ? Aug 15, 2013 14:02 |
|
Suspicious Dish posted:And as I said, it doesn't. systemd simply uses the serialization protocol between UNIX domain sockets it makes itself so that it didn't have to invent its own. DBus isn't networked either; it runs on UNIX domain sockets and while there have been attempts to change it to remote over TCP, it's been a failure. I know dbus isn't networked, I said it emulates a network. Dbus is far more than a serialisation format.
|
# ? Aug 15, 2013 14:19 |
|
..btt posted:This'll be my last reply on the subject, since it's starting to become a bit of a derail, but to me it's quicker to mentally parse "set a, b, c and d to x" than it is to parse "set a to x then set b to x then..." It's more about the shape of the code and your eye's ability to read that shape. A block like this: code:
code:
|
# ? Aug 15, 2013 14:19 |
|
I thought better of this post
Hammerite fucked around with this message at 15:27 on Aug 15, 2013 |
# ? Aug 15, 2013 15:22 |
|
Hammerite posted:Well, so, IMO the more sensible version of that is code:
|
# ? Aug 15, 2013 15:27 |
|
That Turkey Story posted:This is true of just about every library, not just logging libraries. Eh, it's only really true of large libraries that solve problems that on the surface seem like they should be small problems.
|
# ? Aug 15, 2013 15:33 |
|
Crosscontaminant posted:True. I assume it is on the basis of self. Sorry, forgot to mention it's Objective-C.
|
# ? Aug 15, 2013 15:39 |
|
My company's coding style specifies tabs instead of spaces, and the rule was set by the senior programmer and I can't change it. I hate my job.
|
# ? Aug 15, 2013 15:59 |
|
They sound like smart people, tabs are superior in every way
|
# ? Aug 15, 2013 16:04 |
|
Zombywuf posted:I know dbus isn't networked, I said it emulates a network. Dbus is far more than a serialisation format. It kinda looks like a linux knock off of 9P/Plan9
|
# ? Aug 15, 2013 16:08 |
|
Suspicious Dish posted:My company's coding style specifies tabs instead of spaces, and the rule was set by the senior programmer and I can't change it. I hate my job. Challenge him to a code review, if you win you take his power.
|
# ? Aug 15, 2013 16:08 |
|
Suspicious Dish posted:My company's coding style specifies tabs instead of spaces, and the rule was set by the senior programmer and I can't change it. I hate my job. Hard NOP Life posted:They sound like smart people, tabs are superior in every way Don't loving start.
|
# ? Aug 15, 2013 16:19 |
|
Smart people use whitespace like this. Dumb people use whitespace like this.
|
# ? Aug 15, 2013 16:21 |
|
Plorkyeran posted:Eh, it's only really true of large libraries that solve problems that on the surface seem like they should be small problems. I guess, but on the other hand, when a library is small I often hear a similar but opposite rationale to avoid it, perhaps especially if the problem is seemingly simple: Why would I use <some small library>? It's simple enough that I can replicate its capabilities with a handful of functions without pulling in a dependency. Really, in my experience it's just difficult to get people to use a library period. I spend a lot of time bug-fixing or rewriting functions of freely available libraries for projects because people don't want to use them, even if the quality is high and licensing is free of restrictions. The size of a library is often referenced whether large or small.
|
# ? Aug 15, 2013 16:36 |
|
Wheany posted:Don't loving start. If I get to define a strict coding style I will mandate the use of U+180E, MONGOLIAN VOWEL SEPARATOR, as the only valid indentation character.
|
# ? Aug 15, 2013 16:58 |
|
That Turkey Story posted:Really, in my experience it's just difficult to get people to use a library period. I spend a lot of time bug-fixing or rewriting functions of freely available libraries for projects because people don't want to use them, even if the quality is high and licensing is free of restrictions. The size of a library is often referenced whether large or small. It's just looking for excuses. If the size can't be used to disqualify it, then they'll pick something else. If it's new and unproven, never mind that anything they write instead will inevitably be newer and even less proven. If it's old and clunky, never mind that it's been solving a well-established problem like distributed transaction processing since before they were born while running on computers with less processing power than a toaster. Or it uses a forbidden technology like XML in a way that isn't even apparent to someone using the library. Or it's got too many features. Think about it: How often do you really need to sort any possible permutation of a sequence when some in practice may be impossible to reach? So why use an overkill general sorting algorithm?
|
# ? Aug 15, 2013 17:52 |
|
|
# ? Apr 27, 2024 12:07 |
|
That Turkey Story posted:I guess, but on the other hand, when a library is small I often hear a similar but opposite rationale to avoid it, perhaps especially if the problem is seemingly simple: People are afraid of code they don't understand, and the dialect of a library screws with their own tiny mental model of the universe. I think it goes well beyond libraries. Now there are some people that have good reason to be afraid of libraries--particularly our friend the DLL. There's nothing quite like program X using core library A not being able to use module Y that also uses core library A. The .NET runtime complains that Y's implementation of interface IFartAllNight is missing an implementation for TootAndPoot(Butts). You look at the source, and you see Y does indeed implement TootAndPoot(Butts). After a day of losing hair, you discover that Y references the core library A from its own path when it was loaded. The DLLs are identical but since they come from different paths, the .NET runtime says they're different. Then you get into import cascades where loading one library causes a bunch of other ones to start loading from God-knows-where. Then for giggles one of them adds an assembly resolution handler that scans that entire C: drive for a DLL it couldn't find in the default path. You know, why not?
|
# ? Aug 15, 2013 18:05 |