
First programming job – a 4 month reflection - _RPM
http://pastebin.com/raw.php?i=w8dhbzpN
======
gibybo
All work environments are absolutely not like that. I've worked in places
exactly like that and places nothing like that.

I'm pretty sure it depends largely on the type of business. Businesses where
software makes them money tend to have high code quality and developers that
care about that sort of thing. Businesses where software (or IT as they'll
call it) is a cost center tend to be like you described.

I'm also pretty sure there is a strong correlation between PHP and that type
of environment. It's much less common with places that use Ruby/Python/etc.
Probably for the reasons Paul Graham wrote about with Python vs Java:
[http://www.paulgraham.com/pypar.html](http://www.paulgraham.com/pypar.html)

~~~
eik3_de
That correlation is exactly my experience.

What are examples of companies that have a verifiable 'great software' culture
and chose PHP because they prefer the language?

------
ivom2gi
The minute you stop thinking about "they" and start thinking about "us", there
is a chance. If you just walk around thinking and knowing things are sour but
are not going to do anything about it - guess what. Nothing is going to
change. But if you take the lead, sell your ideas, execute upon the change,
you will see daylight one day.

Most engineers never exit the "whining" phase though. But those who do, make a
truly good mate to work with.

~~~
baq
it's easier to just quit and look for a better job. it's the engineer's
solution. what you suggest is a challenge to improve your soft skills. it's
probably worth it but it's not for everyone.

~~~
nawitus
I think a compromise is more constructive: fix as much as you can in a given
period, and then find a better job. Apparently a 4 month programming stint
doesn't lookt that good in a CV.

------
jared314
> I always prioritize security as number 1.

> I've made sure that my code was secure

> has just always been embedded into my programming philosophy

> So their environment was broken to me.

> I've began to realize that I'm a much better programmer than all of them

Good code quality, and security, is something everyone needs a bit more of,
but be careful not to fall into dogmatic thinking. They are paying you to do
tasks the way they want them done. If you can show them a "better"[1] way they
might take your advice, but you should never expect it. Programming is more
than just a job skill to me, so I always have to remind myself about the line
between "my code", built on my own time, and "their code" for which I am being
paid to build/maintain.[2]

> I showed them OSWAP, and they have never heard of it.

> I mentioned MVC pattern, and the manager didn't know what that was.

This is common. Never hearing of something is not bad. No one can keep track
of all the tools available, learn them well enough to use them, and still
accomplish what they need to do. No matter how much time you spend trying to
keep up, you won't.

Also, your coworkers, and manager, might already know what will and won't be
approved. So, they are only informing themselves of things that are likely to
be important to their tasks.

> I've began wondering if all work environments are like this.

No comment.

[1] There are many definitions of better. (Time, money, complexity,
maintenance, ROI, etc.)

[2] Some managers / employers want you to mix the two concepts, but, in my
experience, this is just encouragement to focus more attention on the tasks
they are giving you. You need to draw a line.

~~~
kelseyfrancis
> They are paying you to do tasks the way they want them done.

Maybe with respect to "code quality", but it would be unethical write code
with blatant security flaws, even if the organization paying you says "that's
just the way we do it here".

------
neilk
Okay, it's clear that sooner or later you are going to outgrow this place.

But, just some advice for you in the meantime: don't be that developer who
insists on your standards, no matter how much you feel yourself to be right.
If you do that, you're going to be miserable and you won't get a good
reference for the next job.

But more importantly, you should take this opportunity to learn about
everything in the job that _isn 't_ coding. Like teamwork, communication,
respect.

Success at the job is not about doing what's right in an abstract sense; it's
about doing things that decision makers perceive as valuable. If you feel
strongly that they're doing the wrong thing, then you're first going to have
to change what they perceive as valuable.

In your programming career, you will often be employed by people who are less
mentally agile than yourself. But you're going to have to learn to respect
what they know and do well - understand the customer, forge relationships.
Computers are so fucking efficient these days that even naive solutions have a
lot of value sometimes, so deal with it. (There's always some other programmer
who would be appalled at the shortcuts you take; you're not special.)

TL;DR: If you want respect, you have to give respect first.

------
yeukhon
There is always politics in any workplace, any organization.

My first thought is to have meetings where you and your team make a list of
problems that you guys are facing (is logging not enough? is disk filling up
quickly? is it getting hard to maintain some part of the code, etc). Don't go
overboard. People who are much more senior than you are in this organization
have pride. Imagine you worked your way up and did most of the coding and
suddenly a new hire called your code shitty and ugly and non-functional, that
hurt. Also, some people fear of breaking system. School in particular hates
it. They don't care; students don't care. If school's portal is down for more
than 1 hour, someone is gonna get an ugly call from some executive admin.

I can say testing, MVC patterns, all that shit (excuse my french here, in your
manager's hypothetical voice) are least priority. What are your priority.
Prove SQLi. Then fix it. Are there documentations for how to set up a server
running the software you guys are working on? Is it done with a shell script.
If so, is it working?

Testing and new development patterns shouldn't be your priority. They are
cultural. You can't build Rome in one day unless you have all the people
behind your back.

Scrum style, sure, but do it slowly. Also, this may sound extreme, but
sometimes, you need to play a bit dumb. Don't show off. Some people can't face
the fact they are out of the league... sometimes playing dumb/doing things a
little slow can make things smoother.

------
_RPM
I forgot to add that my manager might be cosidered a "micro-manager", I've
heard him tell other developers that they should change a single variable
name. and re-commit.

Another thing that I've noticed, and that has happened > 1 time is that I'll
write something, spend like all day on it, then come to work the next day to
have found out that the manager re-wrote it claiming "simplification" of the
code, which is in fact not true, or claiming my code had a "bug" These bugs
aren't security bugs, or anything for that matter. Their small user permission
things that I was never told about and is not documented. I don't care if I
can't work on something, but if you want to do it, then do it, don't ask me to
do it, then re-write it because I could have been working on something else in
that time.

~~~
imdsm
That is part of life though, and as frustrating as it is, you'll sometimes
have to expect that other people will rework your code.

~~~
room271
It is, but it's definitely not a good way to treat new people to the team,
especially people on their first job.

Much better to explain the bug/problem and let them fix it.

~~~
imdsm
Very true, again highlighting some of the flaws of OPs current workplace.

------
nacho2sweet
My first web dev job was a university as well. Department by department can be
different but it is not a normal place to work. If you are gunho about ramping
up your skills and getting into the industry I would suggest not staying long.
The attitude you have now and any drive you have to make things better is hard
to sustain in an beurocratic environment like a university for long,
especially when they don't seem to care. However! If you are young and have
visions of traveling a lot in your 20s and experiencing other parts of life
then very much work there. You will probably never work over time, get things
like 4 - 5 weeks paid vacation and be allowed to take them off all at once on
little notice.

------
IvyMike
> One file has 3000 lines of code, and is a huge switch() statement.

Kids these days. I once worked on a system where the size of the switch
statement broke the compiler. I believe the limit was 64k lines in a switch,
although my memory is a little hazy. Of course you couldn't actually
reasonably edit a single file with that much code, so it was split into
several files, each of which was still thousands of lines long, but at least
you could load the smaller files without crashing emacs with out-of-memory
errors.

    
    
      switch (action)
      {
      #include <actionsetA.cpp>
      #include <actionsetB.cpp>
      #include <actionsetC.cpp>
      // etc
      default: printf("unhandled action")
      }

~~~
gkya
No, that did not ever happen. I reject to believe. Oh my god, how frightening
is this!

~~~
jpatokal
There's a whole site full of stuff like this:
[http://thedailywtf.com/](http://thedailywtf.com/)

------
onion2k
_I care about code more than most people_

I get the impression that this guy thinks of himself as "a coder". He wants to
write code all day long. He wants to write the best code in the world. He
wants to write code that's robust and tested and modern and secure and
clever...

...and all for the sake of writing code that's interesting to _him_.

In the real world we have to write code that enables users to do things.
That's it. Usually that _also_ means writing code that's tested, secure,
robust and so on, but for the sole purpose of making users better able to use
our software.

We write things that are secure so that users don't lose their
data/privacy/money.

We write things that are tested so that users don't face errors and bugs when
they use our software.

We write things that are robust so that users can use our software whenever
they need it without it falling over all the time.

If I was the manager of his team and he came to me suggesting "Dependency
injection of the database objection into a class" I'd say no too without a
good reason - the entire team would need to learn the new code, any code that
relies on the old system would need refactors, and so on. But if he came to me
and said "If we used an injection pattern we'd be better able to switch to a
failover server, we'd be able to add features faster and it'd enable use to
use a better security model", I would listen.

A big part of development is actually "sales" \- if you can't sell your ideas
to your team, you'll not get to implement them, even if they're the right way
to do things.

------
room271
That is very similar to my first job. The truth is that most programmers are
not very good at writing software. Some don't care about code quality, and
others haven't learnt (yet) how to program well.

When you apply for your next job be careful to ask about their coding
practices. Ideally you should be able to find their lead devs on github or
somesuch and view their code to get a sense of how good their work is.

------
grasuth
I've seen a lot of this in small organisations. Typically they are isolated
from the rest of the developer community.

Your challenge, if you choose to accept it, is to hack the social environment:
get them all slowly to come to meetups and hackdays and stuff and engage with
the rest of the industry. They'll hear the buzzwords and learn, and change
will happen. It will take a while...

------
sebcat
I think it's less about the skill and more about the development process. When
your manager comes to you and want feature upon feature added to an existing
project that once was written without any basic requirements laid down, the
code is going to turn to shit pretty quickly and nobody is going to care about
it. The process is broken.

One of the reasons why open source is good is because you associate your code
with your name. You take personal responsibilith for it. At a company where
developers have come and gone over time, that doesn't happen.

Now, how you approach this matters. You can either become one of those who
don't care, you can start to roll the stone uphill or you can seek greener
pastures. It's all up to you. The people you work with sound like they don't
care for things as long as it works. Do you want to become like that?

------
neverminder
I've been there years ago where OP is now. I can tell him this: you've only
scratched the surface. Just as there are very good programmers there are also
very bad ones. Trying to make a bad programmer into a good one often ends up
in a catch 22 - he would already be a good one if not for all the constants in
equation that makes him a bad one. My advice number 1 is this: move on, find a
team of solid professionals. Advice number 2: dump PHP, learn a more serious
language like Java, Scala, Clojure or C/C++ if a lower level is in your
interest. It just so happens that often guys who work with those languages
tend to be better than guys who work with PHP.

~~~
imdsm
Correct me if I'm wrong but neither Java, Scala, Clojure, nor C/C++ tend to be
used for web development, right? So OP wouldn't be doing web development if he
picked those up? From what it sounds like, OP is doing web development, so
maybe some other suggestions such as RoR, Node, or .NET etc would be more
applicable?

~~~
mpartel
Java is used a lot in web dev. See servlets and J2EE. It can feel a bit
enterprisey though.

Scala and Clojure are relatively new languages but they have pretty good web
frameworks, which tend to be closer to RoR than the J2EE stuff.

C/C++ is indeed used very rarely - it's just too dangerous and unwieldy.

~~~
imdsm
Well, I have to thank you, I have learnt something today and I've only been
awake a few hours. I did do a quick bit of research before posting my comment,
to make sure I wasn't overshooting the mark, but I didn't see anything about
Scala/Clojure web frameworks, so on that regard, thank you for enlightening
me.

OP should definitely move away from PHP though.

------
fisherprice
It is always easy to complain but you never know how all this evolved. Maybe
the founder had hard times to find the first developer. Maybe the first
developer could not do it better. Maybe this setup only attracted weaker
developers and suddenly this mess was set in stone. Maybe the business model
doesn't provide enough margin to justify a rewrite of large parts of the
legacy code and so on.

And I could also easy complain about you: why did you choose this aged stack
for your first programming job in 2014? This stack is still very popular and
nothing bad but yeah, there must be some reasons why you chose this stack
which I don't know.

But I won't complain.

------
nerdkarthik
Sorry if I am a bit late to the party. I am a student right now and this is
one of the issues that's freaking me out about working in the industry. I'm
genuinely scared my code is not up to par, have no ideas what security issues
I should take care of to start with and also how the hell am I supposed to
cover all test cases with TDD? I am alright with following design patterns and
ensuring clean documented code but am always under the impression I can do
better. If anyone has any insights, would be really grateful, especially when
it somes to security.

------
nbevans
As you go through your career it will only get worse like this before it gets
better. Normally when it gets truly better is around the point that you start
your own business.

------
lalc
Yep, lots of workplaces are like this. As you do care, get away from PHP ASAP.

Beware of structuring and refactoring too much, or writing low-ROI tests. You
must find balance.

~~~
yeukhon
While I dislike programming in PHP (the syntax is ugly mostly), and I like
Python and JS, I don't think getting away from PHP is _a_ solution and _the_
solution. PHP is not the problem in this situation. It's _the people_ who is
working there with OP.

~~~
sehr
I like to think that's what lalc was implying. With a language comes
community, and PHP's community is unfortunately laden with baggage.

~~~
yeukhon
Okay. That's a fair point. Maybe it is right that people have to leave their
territory once and feel the difference in another community.

------
gnusouth
The place I just finished working at employed people to manually run
regression tests on HTML forms... I implemented an automated system using
selenium and Jenkins which ended up mostly working. I say "mostly" because
Selenium itself is kind of flaky (I had a read, and wasn't impressed) and
there's a lot of crazy stuff going on with the web drivers. Next time I think
I'll use Phantom JS.

I feel it, OP.

------
owenjones
It's always sunny outside - a 1 minute reflection

Seriously though how can you start generalizing / assuming about working as a
professional programmer when you're not even 1 year into your first job?

Try your best to change things, but don't try your best for too long till you
burn out and are miserable. Some programming jobs are there just to separate
the wheat from the chaff.

------
0x037
This kind of stuff makes me feel...I'm not even sure how to qualify it. I feel
like a lot of places that hire set these great and tall expectations that
always make me second guess myself. Do I have the skills and know-how to do
this?

How was your interview process in comparison to the quality of people you're
working with now?

------
erex78
If you want to be/work with engineers and build something real/hard, I would
start looking for your next job. Even without professional experience, don't
settle, find a place where the standards are up to yours.

(We're looking for engineers at my company if you're interested..)

------
eik3_de
Type in 'ruby-lang.org' and get redirected to the https site where you find
'security' as a main menu entry. There you find known issues and ways to
report vulns.

Try this on php.net.

[Edit: I tried to download the stable php release via https. Try to guess how
that worked out]

------
baq
your coworkers are people who are in this job to get paid. you're probably
programming because you like programming. learn some other language and search
for an employer who cares about the same stuff as you do - you'll be both
better off.

~~~
yen223
"your coworkers are people who are in this job to get paid. you're probably
programming because you like programming. "

You know, I have a sneaking suspicion that every programmer thinks this way.

~~~
meowface
Definitely not every. There are people who do it themselves just as a job, and
are self-aware of that.

------
csgavino1
I've worked at a total of 3 companies over the course of 5 years. 2 of those 3
companies I've worked for have no coding standards at all, which is surprising
because the company is able to make money despite the quality of code.

~~~
jotm
Why does that come as a surprise to most people? Businesses don't care how
their code looks - if it works, it's good enough.

Which is also why changes are discouraged - no need to mess with something
that works unless absolutely necessary.

Not the best policy, but if it works - it works :-).

~~~
meowface
It definitely depends on a lot of factors.

Even if they don't have any formal coding standards, a company can ship good
products as long as they have at least a few decent programmers.

Ad hoc / beta testing can fill in for unit testing. Bad coding style and low
modularity won't necessarily make a project slower or worse, just harder to
maintain. Lack of version control isn't necessarily a major problem if there
are daily backups of source code, and if each part of the system is being
developed by only one person.

No tech company or startup would ever consider things like that sane
practices, but many companies do get away with it. Especially if what they're
programming isn't the company's primary product or service, like in the case
of a university.

------
SchizoDuckie
Welcome to the real world. Where code is not perfect, but somebody pays for a
timeboxed piece of work and legacy code _will_ exist.

You will not come into heaven straight from university and you _will_ have to
learn to work in environments like this.

Blame your study for not telling you about how the real world works. Don't
blame legacy code because it's something that exist no matter how unicorny the
world is.

Negotiating managers and project owners is even more important than just being
able to write testable code.

So take your skills and apply them (iteratively) to your current job, or go
work at a startup where everything is hip and trendy. But remember you're at
the bottom of the ladder right now, and you're the one making things better
for companies and yourself.

Also remember the golden rule:

No one wants to pay to refactor code that works into more beautiful code that
works.

~~~
SchizoDuckie
WTF I get downvoted for this?

Why am I even here.

------
matiasb
"I've began wondering if all work environments are like this."

Yep, it's pretty common (and sad).

~~~
meowface
Common among government agencies and universities, sure. Fortune 500
companies? Some, but not most. Tech companies? Not so much.

~~~
room271
Small webshops are also rife with this kind of programming environment. Mostly
because their clients have no idea about code quality and the projects are
small enough that you can still just about be productive with terrible
programming standards.

------
spazbite
It's so funny, i first thought i wrote this. Im in the same spot at my new
workplace.

------
ibrad
Hello, I am you from the future. You are in for a treat. Buckle up.

------
catshirt
welcome to the NBA

and no, it doesn't make you a better programmer.

~~~
_RPM
What does NBA mean?

~~~
catshirt
National Basketball Association. this should explain:
[http://allball.blogs.nba.com/2013/11/13/welcome-to-the-
nba-j...](http://allball.blogs.nba.com/2013/11/13/welcome-to-the-nba-jeff-
withey/)

------
slowblood
Want horror stories? Try consulting.

