so are local repositories, it's beyond me why anybody would commit non-working code to a non-local branch without getting it to work first, waste of a commit # if there ever was one. One cool thing I've seen people do is set these up with GIT & Tortoise on the side from say like TFS, or other non-locals, and commit the shit out of those for easy roll back (once you've done it a few times it's real easy) and only make relevant commits to the rest of the team.
Damn dude, not meaning to troll here, but sounds like you've written quite a bit of buggy code and thus benefit from your own approach of cross-referencing "bad" working code with yours... which I believe is legit, but when replacing large(er) chunks of code like that I find a notepad approach best, write down what the code is doing, and from what you can gather what the code's supposed to be doing (original rfp is priceless here, senior users are too) including the problem you're trying to solve by rewriting it (businesses benefit more from functional code than good code is the sad, but hard truth). So I wind up with a mini-rfp functionality requirements doc after which I delete the code in it's entirety (after source-control commit, making note of the commit # depending on size of team), and rewrite it again off my requirements doc, test it to make sure it meets requirements & send off for testing.
It might seem similar, but the problem with merging good code with bad code on anything more than a quick patch is ime bad code tends to be very un-flexible so making a 5 minutes change takes 30 & because you've altered the structure of something held up on air, you've introduced possible bugs again that now you can't account for because it's not your code that's causing them, but your code is integrated into the bad code if that makes sense. So a moderate change can turn into 30 minutes into 4 hours of tracking down an anomaly.
You've obviously not done any remote night driving, when you got 75 miles to go, it's night, you're tired and the road's seemingly straight and level, some people are inclined to speed up... lose alertness, etc... so on interstates, country roads, this could save lives easily & obviously. Putting it on Main St.... would be a waste.
The internet would still be a bunch of news groups if it wasn't for advertising: advertising spurred people to create and advance content and it's the #2 on how people make money off the internet... #1? Porn... which has tons more ads for more porn.
The problem isn't advertising, it's how some websites go about it in a less than straight forward manner and not so much anymore, but some used to be really annoying, like the recursive jscript ad pop-up.
"A critical bug in a windows 8 application mistook a camera abroad for one used in the ops training center where the machine was located with disastrous consequences. Microsoft issued an apology to those lost & will be patching the bug sometime late next week."
Last time I came across a guy with ME was 09, and he was one of those users, who's computer nobody in their sane mind would willingly touch, so there's definitely a nitch for windows 8 user statuses here.
The funny thing there is with all the micro and mobile technology circulating around that pager can now be a better spy device than anything 20 years ago.
Uhhh... the only incrementing evidence there is the MAC address, which is hardware specific, but it's easily spoofed without loss of functionality of the machine. Of course VMs auto-assign MAC addresses themselves.
Snitching on an organization is called whistleblowing... screwing over your fellow man = you're a POS, screwing over the man (or a corp) = you're a hero to some. You're assuming society makes always sense, welcome to the real world.
1. used their real name w the accounts they used to commit their crime
2. told somebody what they're doing
3. don't understand enough about computers to not get caught
4. used their home IP
On the flip side of that, if a hacker is caught penetrating a system, they can go to jail, there was a story on here a little while ago about a guy who did just what these guys are talking about and got charges pressed against him by the company who's systems got penetrated by him. Best bet is to publish the vulnerability on forums anonymously & let it circulate around till somebody from the organization catches wind.
I don't think the article mentioned redundancy either day... but consider what they did: they took pre-manufactured components, hauled them up 15,000 feet and installed them... not set them up. I'm sure somewhere in this process short of hiring ALL first year grads they most likely introduced typical datacenter redundancies... load balancing, failover, arrays, etc...
The article is about the challenges posed with operating the components at such a high altitude and for people who aren't used to high altitudes, they really can't work effectively up there limiting the pool of tech support personnel you can send up there significantly.
I almost stopped reading the wiki when I read "Bush", this is typical Bush era BS law. This type of thing should have never been up for discussion much less law, once there's a law, it needs to be voted on every now and then, etc..., etc... it should be a basic manufacturer right. Good example with tobacco though, but there's some key differences, the laws around tobacco involved adding a warning, not marketing to kids in magazines, TV, etc..., and a higher tax if I recall, there was no actual restriction on how they operate, just negative stigma put around them to make buying cigs more of a pain in the ass, guns are already a pain in the ass to buy: I've never seen ads & you're requires to pass a stringent background check. Blaming a gun maker for their guns killing people = blaming the cigarette companies for lung cancer. The cigarette companies did get ruffled pretty good though: Can I sue big tobacco? , I think that most of this occurred because of the lack of warning on boxes / the cig companies not disclosing the health risks... you'd have to be stupid to not understand the pros/cons of guns, but I guess it is within consumer rage's legal reach to sue a gun company for something.
Don't hard code dates, calculate them. If you have reference tables for date pair values, there needs to be a process in place to update those tables. Can't think of a whole lot more that can go wrong on a year change....
Oh, dynamically calculated dates need to factor in the 12/31 to 01/01 change, formulas / functions that work the other 364 days tend to fail here in their first year in production a lot. That only applies to the actual year switch though, and when the app/report is specifically run on 01/01.
To add, if the guy with the bad code is your senior, guess who management is going to believe.
Why I'm leaning towards agreeing with OPs view of doing nothing is because you say he's a smart person... I've worked with senior devs who's hands I've had to hold, but... I wouldn't call them smart, others might, not me. If I can optimize your code, make it smaller, more compact, and/or faster (not just different... & perf. is the major player here) then I'd say I've got room to tell somebody how to code, but it almost sounds like you don't understand his code, and with him being the senior, it becomes really hard to seriously consider your recommendations.
There's even a few things I can think of that make good code look bad:
1. Excessive error checking without a 3rd party library... I've done jquery error checking without the validator plugin and it looks about 100x more convoluted while doing the same thing... I gained performance & my successor isn't going to have to learn the validator plugin, so I have reasons that may not be apparent right away.
2. Abstract variable names... cNum is an example, it would make sense to me in context of the app, say it deals w customers so cNum = customers, maybe not so apparent to somebody not as familiar with the business logic of the application. Not the best of practices, but it can fly, esp. if there's no standard. I can also make the argument that any programmer worth their salt can use a debugger to unravel even the most abstract variable names... newer versions of Visual Studio have a ton of features for this.
3. Boredom... code so much and you start looking for cool new ways to do things like crazy object handling, or lambda expressions:)
I'd recommend just sucking it up... or updating your resume... or trying to learn a few things from your senior.
And like the OP said, it doesn't matter if it's good or bad as long as it works.
That's like saying I'm going to sell you this used car and the alternator is going to go out as soon as you get home... and oh, we don't offer a warranty sorry. Inheriting crappy code sucks hard dude. Code reviewers are just people, in some cases Visual Studio might do a better job.
I'm confused though, why allow this possibility in the first place? There's a ton of locations I can think of off the top of my head to store an app key that's better than the root of the application.
Let's see... the last time such a law was truly applicable was The Stamp Act
Sounds like it's time to read the actual legal requirements (or lack of) for printing legal docs and avoid re-living the American revolution. My understanding is you need one official copy that is say notarized and if there's any discrepancies with copies of that copy, the original is referenced to resolve. I'm not aware of anything that requires you to make carbon copies of a document anywhere I've worked.
Also there's printers just about as old as your ideas that have been able to use carbon copies, just cause they pre-date inkjets don't let that stop you from picking one up to upgrade.
Woks are at the ready!
so are local repositories, it's beyond me why anybody would commit non-working code to a non-local branch without getting it to work first, waste of a commit # if there ever was one. One cool thing I've seen people do is set these up with GIT & Tortoise on the side from say like TFS, or other non-locals, and commit the shit out of those for easy roll back (once you've done it a few times it's real easy) and only make relevant commits to the rest of the team.
Damn dude, not meaning to troll here, but sounds like you've written quite a bit of buggy code and thus benefit from your own approach of cross-referencing "bad" working code with yours... which I believe is legit, but when replacing large(er) chunks of code like that I find a notepad approach best, write down what the code is doing, and from what you can gather what the code's supposed to be doing (original rfp is priceless here, senior users are too) including the problem you're trying to solve by rewriting it (businesses benefit more from functional code than good code is the sad, but hard truth). So I wind up with a mini-rfp functionality requirements doc after which I delete the code in it's entirety (after source-control commit, making note of the commit # depending on size of team), and rewrite it again off my requirements doc, test it to make sure it meets requirements & send off for testing.
It might seem similar, but the problem with merging good code with bad code on anything more than a quick patch is ime bad code tends to be very un-flexible so making a 5 minutes change takes 30 & because you've altered the structure of something held up on air, you've introduced possible bugs again that now you can't account for because it's not your code that's causing them, but your code is integrated into the bad code if that makes sense. So a moderate change can turn into 30 minutes into 4 hours of tracking down an anomaly.
You've obviously not done any remote night driving, when you got 75 miles to go, it's night, you're tired and the road's seemingly straight and level, some people are inclined to speed up... lose alertness, etc... so on interstates, country roads, this could save lives easily & obviously. Putting it on Main St. ... would be a waste.
You're confusing regulation with obliteration. Remember, only SOME ads are bad.
The internet would still be a bunch of news groups if it wasn't for advertising: advertising spurred people to create and advance content and it's the #2 on how people make money off the internet... #1? Porn... which has tons more ads for more porn.
The problem isn't advertising, it's how some websites go about it in a less than straight forward manner and not so much anymore, but some used to be really annoying, like the recursive jscript ad pop-up.
And later in the news:
"A critical bug in a windows 8 application mistook a camera abroad for one used in the ops training center where the machine was located with disastrous consequences. Microsoft issued an apology to those lost & will be patching the bug sometime late next week."
Last time I came across a guy with ME was 09, and he was one of those users, who's computer nobody in their sane mind would willingly touch, so there's definitely a nitch for windows 8 user statuses here.
The funny thing there is with all the micro and mobile technology circulating around that pager can now be a better spy device than anything 20 years ago.
Uhhh... the only incrementing evidence there is the MAC address, which is hardware specific, but it's easily spoofed without loss of functionality of the machine. Of course VMs auto-assign MAC addresses themselves.
Snitching on an organization is called whistleblowing... screwing over your fellow man = you're a POS, screwing over the man (or a corp) = you're a hero to some. You're assuming society makes always sense, welcome to the real world.
1. used their real name w the accounts they used to commit their crime
2. told somebody what they're doing
3. don't understand enough about computers to not get caught
4. used their home IP
Missing anything? There's a trend forming here...
A snitch is a snitch even if it's a snitch of snitches.
On the flip side of that, if a hacker is caught penetrating a system, they can go to jail, there was a story on here a little while ago about a guy who did just what these guys are talking about and got charges pressed against him by the company who's systems got penetrated by him. Best bet is to publish the vulnerability on forums anonymously & let it circulate around till somebody from the organization catches wind.
Still... a really creative way to dish out punishment for being a slacker. I sense a motivation poster pending.
I don't think the article mentioned redundancy either day... but consider what they did: they took pre-manufactured components, hauled them up 15,000 feet and installed them... not set them up. I'm sure somewhere in this process short of hiring ALL first year grads they most likely introduced typical datacenter redundancies... load balancing, failover, arrays, etc...
The article is about the challenges posed with operating the components at such a high altitude and for people who aren't used to high altitudes, they really can't work effectively up there limiting the pool of tech support personnel you can send up there significantly.
I almost stopped reading the wiki when I read "Bush", this is typical Bush era BS law. This type of thing should have never been up for discussion much less law, once there's a law, it needs to be voted on every now and then, etc..., etc... it should be a basic manufacturer right. Good example with tobacco though, but there's some key differences, the laws around tobacco involved adding a warning, not marketing to kids in magazines, TV, etc..., and a higher tax if I recall, there was no actual restriction on how they operate, just negative stigma put around them to make buying cigs more of a pain in the ass, guns are already a pain in the ass to buy: I've never seen ads & you're requires to pass a stringent background check. Blaming a gun maker for their guns killing people = blaming the cigarette companies for lung cancer. The cigarette companies did get ruffled pretty good though: Can I sue big tobacco? , I think that most of this occurred because of the lack of warning on boxes / the cig companies not disclosing the health risks... you'd have to be stupid to not understand the pros/cons of guns, but I guess it is within consumer rage's legal reach to sue a gun company for something.
Are gun makers responsible for how their guns are used? :)
Don't hard code dates, calculate them. If you have reference tables for date pair values, there needs to be a process in place to update those tables. Can't think of a whole lot more that can go wrong on a year change....
Oh, dynamically calculated dates need to factor in the 12/31 to 01/01 change, formulas / functions that work the other 364 days tend to fail here in their first year in production a lot. That only applies to the actual year switch though, and when the app/report is specifically run on 01/01.
Anything else?
I can "haz" money then? meowww
Scam spam = ban
To add, if the guy with the bad code is your senior, guess who management is going to believe.
:)
Why I'm leaning towards agreeing with OPs view of doing nothing is because you say he's a smart person... I've worked with senior devs who's hands I've had to hold, but... I wouldn't call them smart, others might, not me. If I can optimize your code, make it smaller, more compact, and/or faster (not just different... & perf. is the major player here) then I'd say I've got room to tell somebody how to code, but it almost sounds like you don't understand his code, and with him being the senior, it becomes really hard to seriously consider your recommendations.
There's even a few things I can think of that make good code look bad:
1. Excessive error checking without a 3rd party library... I've done jquery error checking without the validator plugin and it looks about 100x more convoluted while doing the same thing... I gained performance & my successor isn't going to have to learn the validator plugin, so I have reasons that may not be apparent right away. 2. Abstract variable names... cNum is an example, it would make sense to me in context of the app, say it deals w customers so cNum = customers, maybe not so apparent to somebody not as familiar with the business logic of the application. Not the best of practices, but it can fly, esp. if there's no standard. I can also make the argument that any programmer worth their salt can use a debugger to unravel even the most abstract variable names... newer versions of Visual Studio have a ton of features for this. 3. Boredom... code so much and you start looking for cool new ways to do things like crazy object handling, or lambda expressions
I'd recommend just sucking it up... or updating your resume... or trying to learn a few things from your senior.
And like the OP said, it doesn't matter if it's good or bad as long as it works.
That's like saying I'm going to sell you this used car and the alternator is going to go out as soon as you get home... and oh, we don't offer a warranty sorry. Inheriting crappy code sucks hard dude. Code reviewers are just people, in some cases Visual Studio might do a better job.
I'm confused though, why allow this possibility in the first place? There's a ton of locations I can think of off the top of my head to store an app key that's better than the root of the application.
Pardon the punctuation: not likely, they have tax entities there I think
Let's see... the last time such a law was truly applicable was The Stamp Act
:)
Sounds like it's time to read the actual legal requirements (or lack of) for printing legal docs and avoid re-living the American revolution. My understanding is you need one official copy that is say notarized and if there's any discrepancies with copies of that copy, the original is referenced to resolve. I'm not aware of anything that requires you to make carbon copies of a document anywhere I've worked.
Also there's printers just about as old as your ideas that have been able to use carbon copies, just cause they pre-date inkjets don't let that stop you from picking one up to upgrade.
On the other hand if you're trolling, kudos