|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On February 16 2018 19:20 Excludos wrote: I'm not sure if this is the right place to vent, but maybe you could take it as a cautionary tale of why you should ALWAYS ALWAYS ALWAYS make your program modular.
So the place I work at is a bit weird in that we don't have proper project leaders. So I was told a month ago to start working on something, and have been hammering on the keyboard since then.
Then, quite randomly, I'm told that someone else have been told to work on the exact same thing. I go talk to him, and by a random stroke of luck, we've each completed different parts of the project, so together we actually have a working product. All I need to do now is merge my code into his. I take a look at it, and it's a fucking disaster! Everything is ingrained into itself. I can't change a single variable without ruining something in a completely different class. I have been struggling for hours and literally can not find a single way to use any of my code into his or vice versa. He's also completely forgotten to take into account how the user is suppose to interact with his system.
At this rate, I'm not sure what is faster: Continue struggling with this merge or just throw out his part of the code completely. I'm fucking pissed. Give him your code and tell him to merge it?
|
On February 16 2018 19:27 Acrofales wrote:Show nested quote +On February 16 2018 19:20 Excludos wrote: I'm not sure if this is the right place to vent, but maybe you could take it as a cautionary tale of why you should ALWAYS ALWAYS ALWAYS make your program modular.
So the place I work at is a bit weird in that we don't have proper project leaders. So I was told a month ago to start working on something, and have been hammering on the keyboard since then.
Then, quite randomly, I'm told that someone else have been told to work on the exact same thing. I go talk to him, and by a random stroke of luck, we've each completed different parts of the project, so together we actually have a working product. All I need to do now is merge my code into his. I take a look at it, and it's a fucking disaster! Everything is ingrained into itself. I can't change a single variable without ruining something in a completely different class. I have been struggling for hours and literally can not find a single way to use any of my code into his or vice versa. He's also completely forgotten to take into account how the user is suppose to interact with his system.
At this rate, I'm not sure what is faster: Continue struggling with this merge or just throw out his part of the code completely. I'm fucking pissed. Give him your code and tell him to merge it?
If the code was mergable I'd be able to do it myself. The entire structure is different, and, like mentioned, completely non-modular.
|
On February 16 2018 19:57 Excludos wrote:Show nested quote +On February 16 2018 19:27 Acrofales wrote:On February 16 2018 19:20 Excludos wrote: I'm not sure if this is the right place to vent, but maybe you could take it as a cautionary tale of why you should ALWAYS ALWAYS ALWAYS make your program modular.
So the place I work at is a bit weird in that we don't have proper project leaders. So I was told a month ago to start working on something, and have been hammering on the keyboard since then.
Then, quite randomly, I'm told that someone else have been told to work on the exact same thing. I go talk to him, and by a random stroke of luck, we've each completed different parts of the project, so together we actually have a working product. All I need to do now is merge my code into his. I take a look at it, and it's a fucking disaster! Everything is ingrained into itself. I can't change a single variable without ruining something in a completely different class. I have been struggling for hours and literally can not find a single way to use any of my code into his or vice versa. He's also completely forgotten to take into account how the user is suppose to interact with his system.
At this rate, I'm not sure what is faster: Continue struggling with this merge or just throw out his part of the code completely. I'm fucking pissed. Give him your code and tell him to merge it? If the code was mergable I'd be able to do it myself. The entire structure is different, and, like mentioned, completely non-modular.
He suggests the "its his problem now"-approach
|
modularity / abstraction is not free. root module (library api, cli, etc) is typically given, but everything beneath is open too interpretation and not something that will admit a dogmatic answer. choosing which level of abstraction to stop deconstructing is tricky, and from my experience i can't really say if we tend to over- or under-abstract. i know i have done both a lot of times, and am still doing it.
i think if, mid-project, the top-level abstraction of it was changed to a lower-level one, i would have to spend a couple of days adjusting. my approach to the sub-modules is not the same as the root-module.
if i were you excludos, i would co-decide with your co-worker on APIs (or at least a sketch) for your respective parts, adjust your respective parts to these, and then co-figure out how to combine them for your finished product. of course i don't know how big your project is, the time-frame, how you collaborate, etc, etc, and i don't doubt that it's a mess. good luck.
|
On February 16 2018 20:37 waffelz wrote:Show nested quote +On February 16 2018 19:57 Excludos wrote:On February 16 2018 19:27 Acrofales wrote:On February 16 2018 19:20 Excludos wrote: I'm not sure if this is the right place to vent, but maybe you could take it as a cautionary tale of why you should ALWAYS ALWAYS ALWAYS make your program modular.
So the place I work at is a bit weird in that we don't have proper project leaders. So I was told a month ago to start working on something, and have been hammering on the keyboard since then.
Then, quite randomly, I'm told that someone else have been told to work on the exact same thing. I go talk to him, and by a random stroke of luck, we've each completed different parts of the project, so together we actually have a working product. All I need to do now is merge my code into his. I take a look at it, and it's a fucking disaster! Everything is ingrained into itself. I can't change a single variable without ruining something in a completely different class. I have been struggling for hours and literally can not find a single way to use any of my code into his or vice versa. He's also completely forgotten to take into account how the user is suppose to interact with his system.
At this rate, I'm not sure what is faster: Continue struggling with this merge or just throw out his part of the code completely. I'm fucking pissed. Give him your code and tell him to merge it? If the code was mergable I'd be able to do it myself. The entire structure is different, and, like mentioned, completely non-modular. He suggests the "its his problem now"-approach
Well he went on vacation as of today, and we have a deadline to reach too.. So we decided to throw his code out and continue without him. The situation isn't his fault (More that our company isn't being run properly..but I'm out in two months anyways so I'm beyond caring), but it would have been a lot easier if he'd make it modular enough for me to just extract the bits I need and use.
|
On February 16 2018 23:16 nunez wrote:if i were you excludos, i would co-decide with your co-worker on APIs (or at least a sketch) for your respective parts, adjust your respective parts to these, and then co-figure out how to combine them for your finished product. of course i don't know how big your project is, the time-frame, how you collaborate, etc, etc, and i don't doubt that it's a mess. good luck.
If both programs didn't overlap so much, this would be possible, but half of our parts literally do the same thing just with completely different logic. It wouldn't be reasonable to create any kind of API to use each others code. It would just end up with 50% more database entries and lookups than needed, and a bunch of reiteration of the exact same data. I'm sure I could make it work that way, but I'm also sure I wouldn't sleep at night, instead having nightmares about the hackjob.
After fuming at management for a while we now have a proper project leader, and we have finally mapped out the way forwards properly. It's a shame one of our modules need to be thrown out (Which, since he went on vacation and we need to continue this, will be his), but at least we can get something done now.
|
Doesn't sounds so much like a lack of modularity than a lack of quality overall. If you can't use any of his code and you can't change anything without breaking something else, then his classes probably don't encapsulate anything, have multiple responsibilities and so on... If he had written a couple of well defined classes, you could at least those.
And you should always seperate your core business logic, the key algrithms and such from other parts like database and UI in some way. That level of encapsulation/abstraction should be present in all but the most trivial applications.
|
On February 17 2018 02:02 spinesheath wrote: If you can't use any of his code and you can't change anything without breaking something else, then his classes probably don't encapsulate anything, have multiple responsibilities and so on... If he had written a couple of well defined classes, you could at least those.
I would qualify this as modularity Well defined classes are generally modular by nature.
He's Chinese, and I presume that's where he learned how to code. It seems like they have a very different way of approaching coding than we do over here.
On February 17 2018 02:02 spinesheath wrote: And you should always seperate your core business logic, the key algrithms and such from other parts like database and UI in some way. That level of encapsulation/abstraction should be present in all but the most trivial applications.
This is actually done. He's used our already well defined database APIs, and he haven't made anything on the gui. But we've still approached the entire DB thing differently. He uses it as a queue of commands that the gui is suppose to send, which are deleted as they are read. I wanted the entire thing to be stateful, so if it crashed or was restarted it could pick up where it left off. It also works a lot better with how the user is supposed to interact with the gui (user opens a tunnel and is returned information about that tunnel. Instead of the user commanding a tunnel to open and then has no clue what happened to it). so tl;dr: If I wanted to use both of our codes I would first have to use my part of the DB to store states, and then I would have to make an adapter which reads the states and put them back into another place of the DB as queued commands. I cringe just thinking about it.
|
So, how did his code get past code review?
If it was approved, then it's probably doing the things your coworkers expect. You have a systematic issue with teams not being properly involved in projects.
If there are no code reviews, then you have much bigger problems.
If this was just off in one branch somewhere, then it might as well not exist, but code shouldn't be written as giant diffs.
Why was there no hand-off before your coworker went on vacation?
How were you working on the same code without being aware of it?
There are _way_ larger red flags here than your 2 approaches not matching.
|
On February 17 2018 07:17 Blisse wrote: So, how did his code get past code review?
If it was approved, then it's probably doing the things your coworkers expect. You have a systematic issue with teams not being properly involved in projects.
If there are no code reviews, then you have much bigger problems.
If this was just off in one branch somewhere, then it might as well not exist, but code shouldn't be written as giant diffs.
Why was there no hand-off before your coworker went on vacation?
How were you working on the same code without being aware of it?
There are _way_ larger red flags here than your 2 approaches not matching.
Hahahahaha. Code review. Good one. No we don't do any of that.. Yes, I'm also signing on to a new company tomorrow and quitting on monday. The company is small, only 11 employees, and they haven't changed their structure from when they were 5. It might have worked back when they were 5, it doesn't any more.
Some of these questions have been answered but I guess it's worth repeating:
1. No code reviews. 2. Small company, no branches. 3. There was never supposed to be a hand off to begin with. We where both told to work on something, separately, and naturally ended up doing the exact same thing. He went on vacation literally the day after we found out. 4. This happened because we have one boss who tries to run everything. He doesn't assign project leaders, and only tells people what to do. He wanted 2 people working on this project, and told 2 people to start working on the project..without telling either of the other. Can't fathom where that went wrong..
Yes, there might be a red flag or two here..
|
Are you all remote employees or something?
There's always some structural issues with tiny teams, but part of having the entire group physically within a few dozen square meters is that you can talk to each other constantly.
|
I've worked remotely with tiny teams for over six years now. Imo it's just on the people, and how much you can trust them to get shit done.
|
On February 17 2018 12:23 WolfintheSheep wrote: Are you all remote employees or something?
There's always some structural issues with tiny teams, but part of having the entire group physically within a few dozen square meters is that you can talk to each other constantly.
No. But we work in separate rooms, and I don't talk a lot to him because while he knows enough English and Norwegian to make himself understood, it's still difficult to keep a conversation going.
Anyways. Signed on with a new company today 25% increase in salary and (hopefully) no more of this type of bullshit which have plagued me since I started there.
|
On February 17 2018 08:10 Excludos wrote:Show nested quote +On February 17 2018 07:17 Blisse wrote: So, how did his code get past code review?
If it was approved, then it's probably doing the things your coworkers expect. You have a systematic issue with teams not being properly involved in projects.
If there are no code reviews, then you have much bigger problems.
If this was just off in one branch somewhere, then it might as well not exist, but code shouldn't be written as giant diffs.
Why was there no hand-off before your coworker went on vacation?
How were you working on the same code without being aware of it?
There are _way_ larger red flags here than your 2 approaches not matching. 1. No code reviews. 2. Small company, no branches. 3. There was never supposed to be a hand off to begin with. We where both told to work on something, separately, and naturally ended up doing the exact same thing. He went on vacation literally the day after we found out. 4. This happened because we have one boss who tries to run everything. He doesn't assign project leaders, and only tells people what to do. He wanted 2 people working on this project, and told 2 people to start working on the project..without telling either of the other. Can't fathom where that went wrong.. Yes, there might be a red flag or two here..
1. This is bad. 2. What do you mean by "no branches" as in, everyone is working off of master branch in git? Hell, I create branches even when doing solo stuff from beginning to end. 4. I feel you man. Bosses trying to micro-manage their workers can be a total pain in the ass. But it also looks like there was no issue tracker involved too...
|
On February 15 2018 19:33 nunez wrote:
in terms of feature completeness they are also quite close. since gcc already has concepts it is an easy choice (disregarding context) for me, and probably for any other advanced c++ programmer who uses template meta-programming. i don't know what 'analysis tools' you're talking about, but the *grinds does not work with the AST. maybe syntax and aesthetics? that is not a big concern for me and my regexi. i only have a tiny familiarity in working with the AST's of both, but i don't think i found any of them daunting.
The gcc AST tends to be a less exact representation of the actual source code compared to clang. So if you're e.g. building a tool to refactor all of a given thing, gcc might yield you some missing pieces.
Not a big deal for most use cases.
|
On February 18 2018 10:24 Manit0u wrote:Show nested quote +On February 17 2018 08:10 Excludos wrote:On February 17 2018 07:17 Blisse wrote: So, how did his code get past code review?
If it was approved, then it's probably doing the things your coworkers expect. You have a systematic issue with teams not being properly involved in projects.
If there are no code reviews, then you have much bigger problems.
If this was just off in one branch somewhere, then it might as well not exist, but code shouldn't be written as giant diffs.
Why was there no hand-off before your coworker went on vacation?
How were you working on the same code without being aware of it?
There are _way_ larger red flags here than your 2 approaches not matching. 1. No code reviews. 2. Small company, no branches. 3. There was never supposed to be a hand off to begin with. We where both told to work on something, separately, and naturally ended up doing the exact same thing. He went on vacation literally the day after we found out. 4. This happened because we have one boss who tries to run everything. He doesn't assign project leaders, and only tells people what to do. He wanted 2 people working on this project, and told 2 people to start working on the project..without telling either of the other. Can't fathom where that went wrong.. Yes, there might be a red flag or two here.. 1. This is bad. 2. What do you mean by "no branches" as in, everyone is working off of master branch in git? Hell, I create branches even when doing solo stuff from beginning to end. 4. I feel you man. Bosses trying to micro-manage their workers can be a total pain in the ass. But it also looks like there was no issue tracker involved too...
2. Yes xD Well sortof. We do have a few major branches. The release branch is usually for fixing bugs and minor implementations (Which the customer has more or less direct access to), while we have an internal branch for actual development which is shared by everyone in the company. Now in this case the reason I first caught that the other guy was doing the same as me was that I noticed the files he had uploaded and thought "Hmm..what does these do?", so it somewhat worked to our advantage this time (Al tough why he worked on them for two weeks before deciding to use version control I don't know).
edit: Also we use SVN and not git..because when we're already rolling down the retard track why stop to use something that actually works amirite?
|
If you use SVN then it's fairly normal to not have lots of branches. Merging in SVN is something horrific. I used to be partial to SVN in the early days when everybody hip was switching to GIT, and it just didn't really cover the use cases of my development, but GIT has improved and can now do basically everything SVN could do, and does it a lot better. I highly recommend you work towards your next major release, and then do a big switch and start with that as your first commit in a new GIT repository.
But if you're quitting there, then yeah, don't worry about it. Just let them muddle along when you're outta there
|
At least you're not using clearcase. If you think SVN or git is bad...
|
On February 18 2018 12:48 phar wrote:Show nested quote +On February 15 2018 19:33 nunez wrote:
in terms of feature completeness they are also quite close. since gcc already has concepts it is an easy choice (disregarding context) for me, and probably for any other advanced c++ programmer who uses template meta-programming. i don't know what 'analysis tools' you're talking about, but the *grinds does not work with the AST. maybe syntax and aesthetics? that is not a big concern for me and my regexi. i only have a tiny familiarity in working with the AST's of both, but i don't think i found any of them daunting.
The gcc AST tends to be a less exact representation of the actual source code compared to clang. So if you're e.g. building a tool to refactor all of a given thing, gcc might yield you some missing pieces. Not a big deal for most use cases. you are comparing gcc / clang as compiler front-ends in the context of writing a compiler. spinesheath was comparing compilers in the context of using a compiler. the former is not a use-case in a discussion of the latter, it's irrelevant, and so is the level of abstraction in the AST.
in any case: can you give examples of how GCC 'completely fucked with' the AST and caused you pain? what kind of tool did you try to write?
|
i don't think svn is bad or 'retarded'. it requires a different approach like acrofales says. i prefer git or mercurial, but i am not going from door to door to do a big song and dance about it.
|
|
|
|