Jump to content

Recommended Posts

Some regulars might recall I got a new job recently, and its going well but there are so many things in place here that I have never experienced before and instinctively to me are all incorrect. I will try not to just make a list of negatives because that will be more of a rant that no one other than me cares about.

 

All our internal systems are just one big website, and are in need of a ground up rewrite(this is my other proposal im working on too).

The problem I have is my boss seems to be either not interested or doesnt care. My first alarm bell was him setting up my pc for my local dev environment, IIS 5 with php on win xp.  well ok, if thats what it is thats what it is.

when i finally get up and running, the site fails to work as its littered with $_SERVER['argv'] which is removed from the latest php, so the guy was unable to even set up the correct environment for me. i had to work all this out for myself, however i also ended up getting a new pc with win 7, so now im on IIS7 with php 5.2.9.

the database we are connected to is over 3 years out of date from the live environment and he is quoting data protection as a reason not to use an upto date database!!!

 

i told him how can i simulate anything without uptodate data, how can i analysis anything to do with performance if the tables i have on my environment represent 10% of the actual rows in some tables on the live database. heck even some pages on the intranet return messages stating things like table doesnt exist on database, its that far out of date.

 

Im trying to build a contructive list of pros to why we should have upto date data, and cons of having outof date data, so far i have come up with this:

 

Its unheard of, and its standard practice for a dev to mirror the live.

I cannot test effciency of my code against data that isnt representative of the real thing.

how can i learn the structure of the database if some of the tables are missing from the dev environment.

i cannot analyse errors that occur on the live that are related to specific sql selects if i dont have that data myself to look at.

 

I am looking for other points that I havent thought of to bolster my argument, as im sure there are plenty of others i havent come up with.

Link to comment
https://forums.phpfreaks.com/topic/266591-development-environment-standards/
Share on other sites

"You hired me to do a job. You clearly thought I was qualified for it. This is how I think it should be done. If that doesn't work for you, this isn't the right job for me".

 

But I wouldn't want to stay at a place where I had to say that anyway

"You hired me to do a job. You clearly thought I was qualified for it. This is how I think it should be done. If that doesn't work for you, this isn't the right job for me".

 

But I wouldn't want to stay at a place where I had to say that anyway

Hit the nail on the head.

lets put it this way, when he said why did i put in a missing content type declaration since  its worked fine without it before......

 

i might just go direct to MD as he wrote the original system about 7 years ago before it turned into the code of frankenstein

lets put it this way, when he said why did i put in a missing content type declaration since  its worked fine without it before......

 

i might just go direct to MD as he wrote the original system about 7 years ago before it turned into the code of frankenstein

I was told to stop complaining when I raised concerns that a proper software development process involves writing documentation beforehand so that others in the future will know what we did :) .  Also, my previous 5 years of experience working in infinitely more strict software development processes were ignored and I was told: "to just make it work."  No reviews of code, no design docs, no formal testing.

 

Updating my resume?  Yes I am.

Your primary complaint right now seems to be around not having a copy of the live db to work against.  It's actually pretty standard practice in a lot of industries not to give devs access to live data.  Between privacy concerns and legal reasons, as well as practicality with the size of some databases, it's pretty common for devs to work with a small set of test data and develop off of that.  If there is a problem with scalability in live, it's typically handled primarily by ops with feedback from engineering, but only a handful of very senior engineers would ever have access to live data.  Are you one of these senior engineers at your new position, or are there other people who handle these types of issues?

 

That being said, there really isn't any reason you shouldn't be working against a current schema, so have you approached your boss about figuring out a way to deal with just that aspect?  Have you offered any suggestions to addresses your boss's concerns around data privacy issues?  Replicating something like Oracle's Data Masking might be a good approach here if you need something close to live data.

 

Even if this new job isn't the best fit long term for you, you're describing a fairly large system that has had a lot of people working on it, so there's a ton for you to learn there.  Over your career, knowing how to implement organizational improvements is far more important than implementing anything technical, so it sounds like you have a great opportunity here to grow.

I assume you are working as part of a team of developers. Have you gotten their input on the situation? Perhaps, since you're the new guy, you just don't carry enough weight to get through to your boss. But, if the whole team of developers are pushing him, he might succumb.

 

 

yeah the data thing I guess isnt the biggest concern but its my start point! I understand the argument of data protection but since with my login i could access anything via the system anyway, why not give me the database too?

I havent addressed anything to the boss yet, since I wasnt prepared for the response I got originally. I will have to investigate the oracle data masking, not sure what t is but the name kinda gives me a big clue!

 

When i see files with 20 include_once in them, functions littered with echoed html code inside them, inline styling and not style classes in a seperate style sheet, errors supressed not fixed, there is only 1 class used in the entire site, and that i think was opensource, it just makes me shudder. All I want to do is fix stuff and its like its not important, in my interview part of my role was to optimise sql statements to make them quicker, but surely having all the php & html correct will only improve performance as well..

I'm going to suggest an MVC rebuild in time, but i dont know enough of the system yet to put forward a bullet proof proposal. It is very easy to make a list of things that a wrong, not so easy to make the list f suggested alternatives.

 

The other devs i spoke to vocally agree with me, i would need to get them commited rather than saying yes this is good and then not backing me up when push comes to shove

You are a new guy walking in to fix "problems."  That's going to involve a lot of stepping on toes, because most everybody there will have either been directly or indirectly a part of those problems being there in the first place.  Experience will teach you that even good coders are sometimes more often than not forced to do bad things because of red tape and politics vs. deadlines.  Does it suck? Yes.  But that's the reality of things.  And nobody likes being told their shit stinks, even if it is because they really do suck, but especially if it's not their fault. 

 

But you don't know the history behind any of that stuff, because you are new.  In my experience, the best way to go about it is to assume everybody there is decent, and that any "baddie" thing you see, is because of something someone was forced to do as a lesser of the evils or most feasible option at the time.  Just try to be really tactful about things.  "Hey, I think we can improve this by.." vs. "Omg this is crap, wtf was someone thinking?" because you never know if the person you are talking to was directly or indirectly involved in the coding or decision behind what you are talking about.  And it doesn't matter if it boils down to someone being terrible at their job and not because of circumstance.  Your job will always become harder when people are on the defense, so try really hard to choose how you say it in a way that won't put someone on the defense. 

this is one of my biggest fears, coming across the wrong way , i am no wanting to upset anyone and so its important i suggest things with constructive criticism. like: "if you had a normalized database with proper indexed keys and foreign keys, it will perform better"  rather than "the database is crap".

 

over 200 tables and not one 'official' relationship!! :o

I assume you are working as part of a team of developers. Have you gotten their input on the situation? Perhaps, since you're the new guy, you just don't carry enough weight to get through to your boss. But, if the whole team of developers are pushing him, he might succumb.

 

The problem is, in these type of situations, you find yourself standing alone as all other dev's happily program against php3

I assume you are working as part of a team of developers. Have you gotten their input on the situation? Perhaps, since you're the new guy, you just don't carry enough weight to get through to your boss. But, if the whole team of developers are pushing him, he might succumb.

 

The problem is, in these type of situations, you find yourself standing alone as all other dev's happily program against php3

 

Well, I guess you just need to suck it up then. Sure, it sucks being forced to write bad code or work in a inefficient environment. There is a part of you that simply isn't satisfied delivering nothing but the best, but you can only do so much with what you are given.

 

As long as your boss thinks you are an asset and are productive, that's all that matters in the end.

well i have to disagree on that last point, because I would rather find a different job than work in one where i am being forced to code badly or in a manner that I used to many years ago, before I knew how to code better.

however the money is making me stay for now ;)

 

I will see how it pans out over the next few months.

Yeah, I understand. Just know that you will probably see the same problem to some degree no matter where you work. You will most likely have to succumb to the standards and practices set in place by the company. They may not be the best way to do it, but it's their way to do it and you just have to deal with it.

Were you hired to clean up their act and take the reins of a faltering development group?  Or were you hired to be another developer in that group?

 

If it's the former, tell them that they're wrong and you know the right way to do things.

 

If it's the latter, do what you're told.

 

he is quoting data protection as a reason not to use an upto date database!!!
Perfectly valid reason not to pull down production data to a dev database.  I don't even have access to the production database and I'm the second highest ranking dev at my company.  There are credit cards in the production database.  Nobody gets access to customer credit cards unless they absolutely need to.

 

how can i analysis anything to do with performance if the tables i have on my environment represent 10% of the actual rows in some tables on the live database
This, again, is a perfectly valid dev setup.  When your site is small, it makes sense to have all the rows in dev and in prod at the same time.  But when it's big...do you really think facebook has a dev database with billions of user profiles in it?  And trillions of status updates?  Sometimes dev is a mini version of prod.  You're supposed to be smart enough to know algorithmic efficiency just by looking at it. 

 

 

Its unheard of, and its standard practice for a dev to mirror the live.
Not unheard of, and not even standard practice.  Unless you can follow this up with "the last 10 companies I worked for all ran hot copies of production" you shouldn't put this in your list.

 

 

I cannot test effciency of my code against data that isnt representative of the real thing.
They know this already, and they've probably figured out a way around it, either by expecting you to write code which assumes large data sets, or by having a staging or prod-testing server which runs off the real data set.

 

 

how can i learn the structure of the database if some of the tables are missing from the dev environment.
If this wasn't told to you when you started, ask.  There's a document somewhere.  If their developers are all honestly flying blind with no idea of the database structure, there's bigger problems than what you've been discussing.

 

 

lets put it this way, when he said why did i put in a missing content type declaration since  its worked fine without it before......
Very few companies will allow you to fix something that isn't broken.  Every change, no matter how small, could break something else. 

 

surely having all the php & html correct will only improve performance as well..
OOP is, all other things being equal, much slower than spaghetti code.  The efficiencies come from design and re-use, not execution time.

 

 

well i have to disagree on that last point, because I would rather find a different job than work in one where i am being forced to code badly or in a manner that I used to many years ago, before I knew how to code better.

however the money is making me stay for now

Money is more important than writing code you can be proud of.  And that, right there, is why this codebase sucks.  Just go with the flow and keep your eyes open for more opportunities.

 

 

 

Regarding Dan's point about being able to use a subset of data as a representative of a larger set, that's what Test Driven Design with mockups are for.  You never need real data for developing functionality.  All you should care about is whether or not the data set CRUDs (I just invented a verb!) properly or not.  You can do that with:

 

Name                                    Address                                SSN                                     CC#
Mickey Mouse                            35 Disney Lane                         000-00-0000                             1234567890123456

That credit card number fails to checksum!  This one works: 4111111111111111

 

Seriously though, the only time data scaling becomes a problem is when you've either written something wrong, or it's a tool so complex it should be done some other way anyway. 

As long as your boss thinks you are an asset and are productive, that's all that matters in the end.

 

He did and I was payed VERY generously, even got a serious bonus, but I don't know how old you guys are but if you are young, like me, I find it vital you do NOT stick there and instead find an environment that challenges you, and allows you to write with the latest and greatest, it's a better career move when you are young to work somewhere you earn above average each month BUT LEARN A LOT EACH DAY than earn A LOT and learn nothing over the years that you work there. If you get fired one way or another (company goes belly up for example) you have something to add to your CV.

 

Potential employers are not gonna be amazed when you tell them that you worked in an ancient environment and never heard of PHP 5.4 (there is a version 5 ?!?) and did absolutely NOTHING to improve this situation, just went on your merry way as long as got payed every month and your boss thought you were an asset and were productive...

if you are young, like me, I find it vital you do NOT stick there and instead find an environment that challenges you, and allows you to write with the latest and greatest
For perspective:  I'm 28, and I worked professionally in college.  Including that job as a programmer in college, I've had 5 jobs in 10 years.  My salary has doubled in those 10 years, and I've always quit in favor of a more advanced company (except one time I was fired for "performance reasons" 2 weeks before my stock options would have vested and 3 weeks before the company was sold for $100 million.  Convenient for them that I was slacking off right then).

One other perspective to throw in is the product owner (or whoever decides the priority of a piece of development). The PO doesn't give a shit if it's running IIS5 on XP, or if there's a thousand hamster wheels running crazy to power the servers. If it works, it works. Of course ops would generally sort this but they'll need say-so from the man upstairs as well. You need to convince them, not us.

if you are young, like me, I find it vital you do NOT stick there and instead find an environment that challenges you, and allows you to write with the latest and greatest
For perspective:  I'm 28, and I worked professionally in college.  Including that job as a programmer in college, I've had 5 jobs in 10 years.  My salary has doubled in those 10 years, and I've always quit in favor of a more advanced company (except one time I was fired for "performance reasons" 2 weeks before my stock options would have vested and 3 weeks before the company was sold for $100 million.  Convenient for them that I was slacking off right then).

 

Ouch man, that sounds criminal.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.