Settings

Theme

Ask HN: Feeling miserable at work

3 points by grover_hartmann 8 years ago · 5 comments · 2 min read

Reader

Rails programmer with ~10 years of experience here, recently I've been hired as a PHP programmer and I'm dealing with a very complex and undocumented codebase that I wish I never seen before.

You might ask "why did you took the job in the first place?", well that's either because I can't find work in my area and most of it is PHP/Python work and I can't move either, the Rails related work that is remote requires that I move and remote work tends to be "US remote".

The PHP code I'm working with is extremely complex/messy and most of the code is undocumented, I have to do lots of debugging just for changing the simplest things and I'm also not very familiar with this language.

Most of the code is a mess of spaghetti code, think of HTML, JS and PHP all glued up with no proper structure.

The git repository is also one of the biggest repositories I have worked with (247 MB), 45,000 files and 1 million lines of code for the whole project.

I was already able to complete some tasks but I can't help but feel miserable with this project.

Recently my manager started asking me questions like "How's it going? Will you finish this task today?" and I explained to him I'm having difficulties with the code and that I'm not very comfortable working with it but he's insisting that I stay firm at it and get familiar with the code. Please advice.

tboyd47 8 years ago

Sorry man. Sometimes you just have to deal with shit code. We've all been there.

Are the people at the job nice? Do you have freedom to work as you please? Do you have the time to take the code in a better direction? I'm just trying to help you find a bright side.

I'd say there are two possible paths here. Either the job is overwhelming to you, or it's not overwhelming but just extremely unpleasant. If it's overwhelming, I'd say to explain that to your manager and request an immediate short-term re-assignment. If it's just unpleasant, then follow your manager's advice. You might be holding your nose for a while, but you will adapt to it and it will get easier.

  • grover_hartmannOP 8 years ago

    > Are the people at the job nice?

    Yes, they seem patient/polite and I can tell they want me to stay, but I don't know them personally and this work is remote.

    > Do you have freedom to work as you please?

    Yes and no.

    > Do you have the time to take the code in a better direction?

    This is something that I'm currently annoyed with, when I was implementing a feature and working with a coworker, we had to re-use code from another function and instead of just making some changes to the function, he asked me to duplicate the function (~650 LoC).

    I suggested to just make some changes to the existing function and re-use that one, but my coworker didn't want to go that route and suggested I just duplicate the function and so I did, I'm pissed that I can't make my own choices and instead I have to follow his orders.

    My boss acknowledged that the project is in a bad state and sometimes I feel they are testing my patience, he mentioned they plan to rewrite the project in another language so I can tell they have common sense, but I get the feeling this other programmer I'm currently working with is happy with the state of the project and is holding things back.

    • tboyd47 8 years ago

      650 LoC seems like a big chunk of code to copy and paste, but I don't know the project or the team. You can't expect to join a team and start turning everything upside-down. Even if you are honestly just trying to help, if that's how it's perceived, you will face resistance on any team.

      It sounds like at least your boss agrees with the general direction you want to go in. That's really the only thing that matters in the long term. You need to be humble and willing to work with people, but at the end of the day, you are only answerable to your direct supervisor.

      • grover_hartmannOP 8 years ago

        That's good advice, I appreciate it, thanks.

        I finally started understanding some of the code today, and things are starting to get better on that front.

        I agree with you, I'll stay humble and play my cards well, being employed is more important right now than taking possible risks and losing my job.

        • cerberusss 8 years ago

          When you're a couple of months in, you will probably no longer have to take orders from an idiot that wants you to copy and paste code.

          I've been in this situation. The existing developer was stuck in his ways, used a very old-fashioned way of dealing with the language in question and told me to do things that go against every good practice. It was frustrating.

          I just agreed, then slowly started asking token advice (for example naming, coding style, things that don't matter to me). Then simultaneously and without asking, I started setting up a git repo, a basic architecture, build server, linter et cetera.

          Hang in there, and build their confidence in you. Then slowly you can start doing things your way.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection