Can I make other developers aware that they can define certain functions for extra-functionality even if they’re not required?

The language is PHP. I have the certain, in my opinion, code smell, it doesn’t feel right: In my controller class that ingests objects of the same type (interface, it’s ViewBlockInterface), I check if these certain objects have certain methods and based on that, do stuff, if not, just skip that object in the array.

if( method_exists( $  loaded_module, 'getBlockViewStylesFilePath' ) ) {     //logic with $  loaded_module->getBlockViewStylesFilePath() } 

The problem with this approach is that, unless you read the documentation (which, of course, almost no one does), you won’t know about it. I don’t want to throw errors, but in my interface, ViewBlockInterface, I don’t want to define these, because it’s not necessary that every block have CSS / scripts attached to it.

In short, I want the developer to know that if he defines these functions, stuff will happen, but it’s not required to have them. I also believe that the scope of this sub-system is so small that I don’t want to create 4+ interfaces just for this.

What can I do here?

How many and which developers are needed to develop a mobile app of Instagram complexity? [on hold]

How many and which developers are needed to develop and manage iOS and android mobile app with complexity equal to Instagram? 2 iOS developers, 2 android developers, back end developer, content ranking algorithm specialist, non-technical creative UI/UX designer?

How long does it take for an mobile app of this kind of complexity to be developed?

trying to merge chunks to trigger better balancing after 50% of the data was deleted by the developers

Trying to merge chunks using the following command:

         db.adminCommand          ( {            mergeChunks: "HTMLDumps.HTMLRepository",            bounds: [ {   "ShardMapId" : 2, "DomainId" : 62 },            {  "ShardMapId" : 2, "DomainId" : 162 } ]          } ) 

getting the following error when trying to run the above command to try to merge any of the available consecutive chunks available on a shard:

             {              "ok" : 0,              "errmsg" : "Failed to commit chunk merge :: caused by ::               DuplicateKey: chunk operation commit failed: version               32|6||5ba8d864bba4ff264edf0bd9 doesn't exist in               namespace: HTMLDumps.HTMLRepository. Unable to save               chunk ops. Command: { applyOps: [ { op: \"u\", b: false,               ns: \"config.chunks\", o: { _id: \"HTM               Dumps.HTMLRepository-ShardMapId_2.0DomainId_62.0\", ns:               \"HTMLDumps.HTMLRepository\", min: { ShardMapId: 2.0,               DomainId: 62.0 }, max: { ShardMapId: 2, DomainId: 162 },               shard: \"shard0000\", lastmod: Timestamp(32, 6),               lastmodEpoch: ObjectId('5ba8d864bba4ff264edf0bd9') },               o2: { _id: \"HTMLDumps.HTMLRepository-               ShardMapId_2.0DomainId_62.0\" } }, { op: \"d\", ns:               \"config.chunks\", o: { _id: \"HTMLDumps.HTMLRepository-               ShardMapId_2DomainId_109\" } } ], preCondition: [ { ns:               \"config.chunks\", q: { query: { ns:               \"HTMLDumps.HTMLRepository\", min: { ShardMapId: 2.0,               DomainId: 62.0 }, max: { ShardMapId: 2, DomainId: 109 }               }, orderby: { lastmod: -1 } }, res: { lastmodEpoch:               ObjectId('5ba8d864bba4ff264edf0bd9'), shard:               \"shard0000\" } }, { ns: \"config.chunks\", q: { query:               { ns: \"HTMLDumps.HTMLRepository\", min: { ShardMapId:               2, DomainId: 109 }, max: { ShardMapId: 2, DomainId: 162               } }, orderby: { lastmod: -1 } }, res: { lastmodEpoch:               ObjectId('5ba8d864bba4ff264edf0bd9'), shard:               \"shard0000\" } } ], writeConcern: { w: 0, wtimeout: 0 }               }. Result: { applied: 1, code: 11000, codeName:               \"DuplicateKey\", errmsg: \"E11000 duplicate key error               collection: config.chunks index: ns_1_min_1 dup key: { :               \"HTMLDumps.HTMLRepository\", : { ShardMapId: 2.0,               DomainId: 62.0 } }\", results: [ false ], ok: 0.0,               operationTime: Timestamp(1554112692, 1), $  gleStats: {               lastOpTime: { ts: Timestamp(1554112692, 1), t: 13 },                electionId: ObjectId('7fffffff000000000000000d') },               $  clusterTime: { clusterTime: Timestamp(1554112692, 1),               signature: { hash: BinData(0,               0000000000000000000000000000000000000000), keyId: 0 } }               } :: caused by :: E11000 duplicate key error collection:               config.chunks index: ns_1_min_1 dup key: { :               \"HTMLDumps.HTMLRepository\", : { ShardMapId: 2.0,               DomainId: 62.0 } }",              "code" : 11000,              "codeName" : "DuplicateKey",              "operationTime" : Timestamp(1554112687, 1),              "$  clusterTime" : {              "clusterTime" : Timestamp(1554112687, 1),              "signature" : {                 "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),                 "keyId" : NumberLong(0)                }               }              } 

This is happening regardless of which chunks i select. Main reason for me to try to do this is to achieve true data balancing and not just chunk numbers. Recently developers deleted 90% of the data from these chunks that caused the distribution to get to 90% 10% state from 60/40 earlier. I hope to merge/remove empty chunks to ensure balancing of the data to reach as close to 60/40 as possible.

Which version control system should I use for the team of 10 developers working on a medium level project in an organization?

I am tasked with providing my company with the best version control management system. The company is an oil company and I am in IT department working as a software engineer.

The company has some web based projects that are developed in quite of old technologies and languages and now planning on to develop it in MVC and also discard the old method of code sharing i.e. sharing via mail or in shared folder etc.

So now they are planning to host their code on online version control system so code can be maintained.

We are a team of 10 developers, tester and project manager working in different offices on a 3,4 medium sized web project and the budget is a bit tight.

So what system between GitHub, BitBucket, Azure DevOps Server and Azure DevOps Services should I pick?

The best way to share a React/React Native project with others developers [on hold]

I’m relatively new to React/React Native programming and my team is wasting much more time when it comes to sharing the code than with the project itself.

For example, creating a new React Native project from ground-zero it’s fairly simple: just follow the tutorial from its official website. The problem comes after installing some packages with NPM, adding new files and directories and sending it to a repository. When my other fellow developers pull this repo to their machines it gets weird. They’re having different compiling and installation errors and end up using workarounds that we cannot have in the final product. I’ve been looking at different sources for a step-by-step guide or even a workflow for developers working together on this kind of project but with no success.

It’d be nice if anyone could shine a light over this issue. It’s good to add that we’re using Ubuntu as our main and default OS for compatibility reasons.

Thanks in advance.

How to handoff animation for iOS developers?

I’m a designer and interested in different ways I can handoff animation to iOS developers and the best ways to do that depending on a particular case.


I know Lottie works best for animating micro interactions and creating animated illustration, like those on onboarding pages. For a designer it’s easy to provide JSON file since it can be generated with Bodymovin plugin in AfterEffects. Developer just gets the file and uses it as is, no more additional efforts for him.

2. Swift or Objective C

iOS has different animation API, like UIView so a developer can recreate animation from a video or designer can explain it in words. In this case developer has to code everything himself.

3. Export from design tools

Some design tools are able to export into Swift or Objective C. Flow is able to generate Swift code, Framer does it as well.

What are other technologies developers use to create animations?

What type of files, prototypes designers should provide for the developer considering different cases?

How to lead a team full of junior developers?

Currently I’m leading a team of 4 developers, all of them started their careers 5-6 months ago. I can consider ourselves lucky, as we’ve been assigned to a greenfield project, it’s completely up to us to achieve the business goals. The company itself is quite small and they have a long history of maintaining legacy applications and they are far from being up to date. These circumstances led to a certain level of isolation within the company. I was extremely motivated at the beginning but after several months I began to feel burnt out. My position is quite tricky: since it’s only 5 of us, without any management or business team assigned specifically to the project, mostly I deal with it. Designing architecture (and writing huge part of it), holding code reviews, organizing the backlog, trying to drive everything and communicating our progress towards the management. As I mentioned, I started to feel burnt out, frustrated. I can’t really get any help, not even technical discussions with someone, and I can’t realistically expect the juniors to challenge my decisions.

Anyhow, my real question is: How do I deal with all this? I’m trying to keep the codebase as clean as possible, while maintaining progress, so the project won’t be shut down, but sometimes I feel like I accept solutions that otherwise I wouldn’t, for the sake of progress. These might sound silly questions, but I’m sure some of you might’ve experienced it before: how many times is it ok to decline a pull request? How many trainings do I need to hold or how many percent of my work should be writing documentations so I’m not a single point of failure? I obviously don’t expect anyone to specifically answer this, but rather I’d like to hear an opinion.