r/javahelp • • 2d ago

Solved Noob here

Hi everyone,

I’m a junior developer. While learning and working on development, I find it really hard to understand what proper engineering work a feature actually requires. What I build often ends up being more like a demo rather than something production-ready. My team lead keeps criticizing me for this.

Does anyone have good advice on how I can improve? Thanks in advance!

3 Upvotes

24 comments sorted by

•

u/AutoModerator 2d ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

12

u/MyNameIsRichardCS54 2d ago

Does your team lead only criticise or does he do his job and tell you how to improve it?

1

u/Mqyang_lazy 1d ago

Since the company is small, the supervisor who mentors me has many other tasks to handle, and there are actually only two of us doing development. Sometimes she gives me guidance, and sometimes she directly criticizes me only when she is in a bad mood. I also want to help her solve problems through my own proactive learning.

1

u/Agawell 2d ago

Or any other senior dev? Maybe whoever’s doing code reviews?

1

u/Mqyang_lazy 1d ago

only two dev,she and me

3

u/joranstark018 2d ago

Not sure of your exact situation; working as programmer in a team is usually about team work, helping each other and asking each other questions.

We usually have mentors for our junior devs and new devs that can help with guiding and giving advice on different matters, not just programming issues.

I find that many junior developers, eager to ship things faster,  settles for the first thing that works. My advice is to work in iterations, find the core requirements (eg the must haves), make a plan (starting with a MVP and how it may expand with other features, you may try things with POC:s),  present it to your team or your team lead (get an early feedback), build the scaffoldings for the solution, add more details in increments, reflect after each increment (eg what have you learn, what could have been done better), try different solutions(find what may be clearer, restruct things, move things around, use other abstractions) and ask the team questions and ask for (constructive) feedback early.

1

u/Mqyang_lazy 1d ago

This is really useful advice—thank you so much! I’ll definitely do that

3

u/Independent_Teacher4 2d ago

Nobody knows everything from the start, so don't get discouraged.

Learn from the experience, reflect on where you could improve, and focus on strengthening those areas.

Asking AI for guidance is a good place to start, too.

1

u/Mqyang_lazy 1d ago

Thank you

2

u/JGhostThing 2d ago

Do you get a complete list of requirements for your projects? How closely do you stick to this?

1

u/Mqyang_lazy 1d ago

Don't have.We are two dev.she and me.

2

u/JGhostThing 1d ago

Then I suggest you do a couple of things to protect yourself.

First, officially request a list of requirements for your next project. If they don't give you one, think about it, and write the list yourself. Use google to get it right. Send this list to your supervisor and explain what it is.

Don't program anything that isn't on the list of requirements. That's why you need to write it well in the first place,

5

u/Lumethys 2d ago

what are the examples of the critism?

2

u/Far-Bullfrog161 2d ago

Something that helped me early on was asking "what happens when this goes wrong?" before writing any code. A demo only handles the happy path. Production code has to deal with bad input, a slow or dead database, a null coming back from some other service, and two users hitting the same record at once. So for each feature jot down a short checklist: input validation, error handling with sensible responses, logs you could actually debug from at 2am, tests for the edge cases, and config that isn't hardcoded. Also go read a few merged PRs from the seniors on your team and look at what they added beyond the main logic, that's pretty much your lead's definition of done. You could even ask your lead to go through what they'd expect for a feature before you start building it, so the feedback comes early instead of at review time.

1

u/Dobby068 1d ago

You only demo the happy path ???

1

u/Mqyang_lazy 1d ago

I only know how to do simple port connectivity checks. My unit tests basically just verify whether a connection can be established successfully.

2

u/Dobby068 1d ago

You need requirements for all scenarios. Then you translate the requirements into code. Unit tests must cover all functionality.

Surely when you cannot connect to a port you also have some expectation:

  • retry (how many times and with what delay, configurable parameters or not, etc)
  • finally give up, user is informed in some way, app changes some state
  • logs are generated, configurable different log levels.

All if the above can be covered by unit tests and should be.

2

u/edwbuck 2d ago

Write some unit testing. Make sure it's really "unit testing" in the sense that it tests only one small "unit" of the program.

A unit tested solution will naturally take on features in production quality code. The testing is how you "add" quality, because quality is proof your solution works. You can have a working solution that never has an error, but if you lack the proof it works, it's not quality.

Also, if your team is telling you it's not good enough, but not telling you why, they might be looking for something you'll waste much of your time trying to guess. Work is not meant to be a guessing game. If they want something, they should be able to tell you what it is, in vague, but still deliverable terms.

If they fail to do that, you don't really have a team lead, you've got a self-important "best programmer in the group" that will do everything socially to ensure they keep their position, by telling everyone else (till many believe it) they are better and their team sucks.