7

I have created an app for Android some time ago and uploaded it to Google Play. I am really happy because users like my application and request updates and improvements.

My project is growing bigger and bigger and it's gotten to a point where I am scared to change things because I might break something else. I also find myself thinking of all parts of a program at the same time sometimes. It's stressing me out a bit, to be honest. I love doing small projects and I'm comfortable writing the code. I would like to be relaxed when working on something bigger too.

I work with Android Studio by the way.

So, how to work comfortably with big projects and not think of all parts of the program?

Thanks.

  • 3
    "scared to change things because I might break something else" => automated testing. "how to work comfortably with big projects and not think of all parts of the program" => good modular (oop) design. – zapl Nov 14 '15 at 13:14

3 Answers3

6

Dear user3054843, The main thing is, this question and it's answer both can't be perfect because-

  • it differs from developer to developer
  • & project to project,

Large projects are not everytime difficult to handle and manage, sometimes they may be covered up within less time and less efforts.

Sometimes small projects with unique and extra functionalities may be difficult to handle due to a lot of R&D.

Whatever is that, but atleast keep the following points with you to handle the project efficiently:

  1. Divide complete project requirements into modules.

  2. Create packages by feature, or packages by structure. ("packages by feature" is a better way).

  3. Try to use separate classes and methods to avoid code complexities and to make it easy to understand.

  4. If any large functionality is required, then use open source lib if available and as per your requirements.

  5. Do everything step by step, and solve problem instead of skipping.

  6. Work Hard.

Thanks,

Rahul Dhrub
  • 71
  • 1
  • 8
Androider
  • 3,833
  • 2
  • 14
  • 24
  • Dear Androider , kindly explain "packages by feature is better way" . And why it is better than "packages by structure" – Heshan Sandeepa Nov 14 '15 at 14:09
  • 1
    @HeshanSandeepa, please go through some links: http://www.javapractices.com/topic/TopicAction.do?Id=205, http://stackoverflow.com/questions/11733267/is-package-by-feature-approach-good, http://www.javacodegeeks.com/2013/04/package-your-classes-by-feature-and-not-by-layers.html, https://dzone.com/articles/package-your-classes-feature Thanks – Androider Nov 14 '15 at 14:18
4

First of all I don't have in my mind any tool or any specific method to handle big projects. But I can give you some recommendations that I am trying to apply in my everyday life. First of all , write good code, well organised according to java rules (good class and variable naming, packages etc). Second, avoid repeating code. Third, if you have a huge amount of code that does a specific job, make a library. That method reduces the size of your visible code. These 3 methods I use to reduce the size of my projects (if there is such need)

karvoynistas
  • 1,295
  • 1
  • 14
  • 30
1

I guess one of the things that you ought to have first is some sort of version control - git, svn etc. While version control is not exclusively limited to large projects, it'll help eliminate the fear of changing something because you're afraid you might break it. If you follow good practices of creating branches to manage new features and creating snapshots that you can use as checkpoints then you have a way of managing your deployment releases.

Some other obvious aspects have been mentioned - use proper OOP, keep your code relatively simple and modular so you don't fall into a mess of nested statements/methods and the like. Focus on developing one feature at a time preferably using version control - use branching and other features that you can merge into the master branch once you've completed it. Fix your errors when you get them and try to understand why it's giving you that error. I've seen people try to 'bruteforce' their way of fixing things by writing more and more code which doesn't help at all.

One other thing that comes to mind is look up some projects on github or somewhere else to see how people manage their code. There are also podcasts and videos - ruby presentations/podcasts come to mind - that may help with info on how to manage large codebases.

Work hard and think about why your current workflow is making it hard for you to develop then change some of the habits you current have. Good luck.

Aesphere
  • 604
  • 6
  • 16