5

Anybody here working on projects where they have to code in Java & Python in different modules? How do you handle multitasking and organizing your programming cells in your brain well? I am working on two projects - one of them written in Java and the other written in python and I am finding it very difficult to get much work done in both at the same time (apart from working on other business domain-related stuff which has sql/shell script/database).

What do you guys suggest? I have organized my time to switch between the two projects, but so far that hasn't helped much.

11
  • 2
    Common problem in web dev... How frequently are you switching between the two? You mean daily or hourly or more often? Apr 11 at 22:44
  • @LukeSawczak I plan to do Java coding once a week for like half a day. Other than that 1 full day for Python coding and rest 3.5 days domain-related stuff Apr 11 at 22:57
  • 2
    So the problem isn't using two languages. For instance, that doesn't seem to be an issue when you're combining SQL and something else. The problem is jumping between two languages (or perhaps more generally 'skills') whilst being a beginner at both. Apr 11 at 23:08
  • 4
    If you're not proficient in either of the languages, doing both at the same time isn't doing you favors. They're different enough that you will have problems mixing syntax. Python uses indents and spacing as scoping structure, while Java is brackets and semi-colon. That alone is going to mess you up, never mind the subtle differences in all the OO concepts and nuances between the two languages. A missing semi-colon is going to be very painful for you.
    – Nelson
    Apr 12 at 2:02
  • 1
    This might be more on topic for the software engineering stack, unless you're looking for an answer on how to get your manager to help you with this or something.
    – Erik
    Apr 12 at 5:50
7

I'm going to take a different tack with my answer.

Become really good at one language first, that is the key. Learn one language well. Learn it deeply. Become fluent in it.

Then, and only then. It will be easier for you to learn a second programming language. If your current employer doesn't allow you to do that, I'd strongly suggest you try to find a new employer.

And before someone chimes in and says that this is very common. Yes, I know. It is very common. But that doesn't change the fact that this is going to be a very tough environment for the OP to learn in. Having his attention split like that is also going to make it more difficult for him to market himself and find a better-paying job.

1
  • While i generally agree with what you say, I'm not sure it applies to OP's case, he jumps through Java /Python 1.5days per week and the rest he does another job not related to developping.
    – Walfrat
    Apr 14 at 12:04
14

Programming languages are basically syntax surrounding business and technical processes.

As stated in comments, this is a very common scenario when it comes to development work that crosses technology boundaries (platforms, integrations, client/server interactions, etc., etc.)

I personally abstract my thinking and concentrate on the technical and business aspects of the coding work, the programming language being use is a secondary consideration.

Having the agility to bounce from one to another just comes with familiarity and experience. The more you do it, the easier it gets.

1
  • This suppose that the purpose of each langage is well defined and doesn't cross each other. Hopefully this is OP's case.
    – Walfrat
    Apr 14 at 12:02
3

Good time management!

A while ago I worked on two complex projects in two very different technical areas, just like you.

I choose to manage my time during this period by dedicating every Monday, Tuesday and Wednesday to project A exclusively and to spend every Thursday and Friday only on project B. I also told everyone about that schedule and asked them to not expect me to answer any questions about these projects until the days I am working on them (unless super-urgent). That way I was able to focus completely on one technology or the other.

I also had the advantage that I was able to work on each project while in a different building. The different environment made the mental switch between the two projects even easier.

Another neat side-effect of this way of working is that it becomes a lot easier to fill out your timesheet correctly (assuming your company does proper project controlling and expects you to state how much time you spent on each project).

1

I will adapt my answer to what you said in your comment as such this answer if far more specifics than the others :

I plan to do Java coding once a week for like half a day. Other than that 1 full day for Python coding and rest 3.5 days domain-related stuff

It is more about getting good in both Python & Java at the same time which is troubling me, I am not much of a programmer, but a Database expert

Yes. and the Java project also has a UI written in Javascript. Also project it is distributed architecture with kubernetes , docker in backend ..and many more parts

You are yourself a database expert, not a developer. The project you're working on seems to be a mature project already running well. It is clear that in order to properly work on it, you would need at least one month full time to get a solid grasp on what is going on.

I would suggest to organize with your some coworker that are developpers or/and manager/project lead (maybe in two differents meeting) in order to organize a way to be more efficient, less risky*, with everyone sticking to their role :

  • Explain the fact that you don't have a solid grasp in any of those langages, that you're not a developer, and you would need weeks full time to get a solid grasp on both the langage and the current state of the projet.
  • Explore various solution with the developpers in order to be able to have the work getting done. For instance you could try to organize with the developper to actually tell the developer what is needed in the Java part and let them doing it. This would allow you to focus more on the python part. You could also ask a training from a developer on the part you only need to cover.

Also it depends of your goals/preferences, if you prefer to stay your hand far from the code or if you're interested into doing something at least related do your field of expertise (which certainly isn't UI).

*risky : I'm saying ths because since you're not a developer on the project, they're solid chance you're actually writing code not up-to-par with what the developer does and may actually introduce bugs for them which may give them more works than actually does the piece of IHM in your stead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .