|
No this is not a good practice because you can copy only database but the actual environment like IIS configuration and firewall settings you can not copy.
|
|
|
|
|
Not a good practice.
Yet where I am now, we're doing something potentially worse. Because (as in your case) deployment of code changes takes a while, and the report is "Very Important! It goes all the way up to the CIO!", the report developers argued that in order to provide the most accurate numbers, it has to be run against the most up-to-date code -- and that means running the production report on the DEV database* . So while I'm trying to improve the quality of the data I provide to the reporting team they keep complaining that the data is changing while they try to run the report -- of course it's changing! It's DEV!
So they want to run in DEV so they can receive changes in the data quickly, but they don't want the data to change. I'm reminded of the line from "The Twelve Chairs" -- "Hurry home, but don't gallop."
To make matters worse; I suspect that the reporting team is now referring to DEV as PROD!
* This is basically just a warehouse of data that has been ETLed from other databases within the enterprise.
<kvetch>
Oh, and I forgot the latest wrinkle -- my ETLs fill staging, then someone else reads staging to populate a Data Vault, then someone else reads that to populate a cube -- and lastly a report is run. And now the reporting team wants me to tell them every change I make that will impact their report -- I have no idea what their report entails, I have no idea what parts of the cube are involved, I have no idea what parts of the Data Vault the cube uses, I have no idea what parts of staging go where in the Data Vault, yet I'm supposed to know exactly how this data is used three levels downstream of me?! I don't even know what most of the data in staging means; I just copy it from other places. And, get this, they want me to tell them this so they don't have to waste their time investigating fluctuations they spot in the report.
I'm so glad I'm on vacation this week.
</kvetch>
|
|
|
|
|
Not a good sign that the website says:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/blahblahblahdotphp on line 19
I won't mention the name, to protect somebody.
|
|
|
|
|
It's always fun when a website returns an error and lets you know exactly which technology they used to implement it. Happened at our college(in the early days) and some students took advantage of that.
|
|
|
|
|
Happened to stumble upon a similar message yesterday:
Deprecated: Function set_magic_quotes_runtime() is deprecated in /www/htdocs/w0076eaa/(redacted)/counter/counter.php on line 61
chCounter: MySQL error!
Error number: 1045
Access denied for user 'd004ed82'@'localhost' (using password: YES)
Script stopped.
|
|
|
|
|
i'm confused about the password being YES or if it says that the user used a password
|
|
|
|
|
But he won't catch me so easily.
I've passed along links to Parsing Html The Cthulhu Way[^] many times so I always have the issue in mind. I usually read HTML with an XmlDocument (when I can) or the WinForms WebBrowser control, and I've seen others recommending the HTML Agility Pack.
This week I received a bunch of large HTML files to scrape.
They're not well-formed XML -- no surprise there.
So I decided that this would be a good opportunity to try the HTML Agility Pack.
It was able to read a sample, but it complained about “Start tag <td> was not found” -- which was surprising.
The problem? Several elements like this:
<th style="width: 5%"><!--</td>
The WinForms WebBrowser control is also able to read it, but the two tools treat it slightly differently and my initial feeling is that the WebBrowser handles it a little better.
So, the next time you encounter a developer who insists on consuming HTML with RegEx, pass them a sample like that, sit back, and watch the fun.
|
|
|
|
|
My favorite is AngleSharp[^]
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
We're moving off the AgilityPack onto AngleSharp.
cheers
Chris Maunder
|
|
|
|
|
AngleSharp is easily one of the best parsers out there.
And it seems Firefox doesn't think parsers is a word and wants it to be passer or parers.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I'm beginning to think that the HtmlAgilityPack uses RegularExpressions.
I'll have to try AngleSharp. Oh, look, an article...
|
|
|
|
|
A quick look at the HAP source code and it seems they parse it character by character.
I guess that's why it was so slow (it spent over three minutes 'parsing') when I tested it on a 1298 line HTML file (I can't remember where I found that file).
AngleSharp parsed the same file much faster (in a few seconds).
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
One of my earliest gigs was writing and XML, and then HTML, parser.
I learned why browsers treat HTML so differently, but never learned why browser writers were so pig-headed in their insistence on sticking to clearly ludicrous decisions when ambiguity in the "spec" surfaced. As it did often back then.
So everytime I see a HTML parser I give a solemn nod to the author. And then wish them the speediest exit possible from that gig.
cheers
Chris Maunder
|
|
|
|
|
Somehow, I immediately thought of this when I saw the title of your post.
Enjoy[^]
|
|
|
|
|
Thanks for the listen man!
I now want to kick ass on this morning.
|
|
|
|
|
PIEBALDconsult wrote: the next time you encounter a developer who insists on consuming HTML with RegEx, pass them a sample like that, sit back, and watch the fun
You're a cruel, cruel man.
I like it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I open the code of a friend of a friend and I see several lines like:
[DllImport("ZBRPrinter.dll", EntryPoint = "ZBRPRNReadMag", CharSet = CharSet.Auto, SetLastError = true)]
static extern int ZBRPRNReadMag(IntPtr _handle, int prn_type, int trksToRead, byte[] trk1Buf,
out int trk1BytesNeeded, byte[] trk2Buf, out int trk2BytesNeeded, byte[] trk3Buf,
out int trk3BytesNeeded, out int err);
[DllImport("ZBRPrinter.dll", EntryPoint = "ZBRPRNWriteMag", CharSet = CharSet.Auto, SetLastError = true)]
static extern int ZBRPRNWriteMag(IntPtr _handle, int prn_type, int trksToWrite, byte[] trk1Data,
byte[] trk2Data, byte[] trk3Data, out int err);
Oh boy, calling a bunch of un-managed drivers from managed codes sounds fun.
i cri evry tiem
|
|
|
|
|
Bad? Maybe.
Unfortunate? Yes.
Looks like he is working with Zebra printers; better he than me!
|
|
|
|
|
It may be cleaner to write the printer interaction in a C++ library and then export simpler functions that are called from C#, or even a very thin C++/CLI wrapper.
|
|
|
|
|
A colleague told me about a great bugfixing experience: a local variable had the same name as a member variable. "But the compiler will show you a warning." - "No, it does not."
Hard to believe, hence I tried it with a very simple class. My colleague was right: there is no compiler warning when a local variable overwrites a member variable.
But there are some tools which could help us here, like StyleCop. I installed StyleCop, and eventually got it accepting my code:
namespace Nonsense
{
public class DontDoThat
{
private int someValue = 0;
public void DoSomething()
{
if (this.someValue == 0)
{
this.DoSomethingElse();
}
}
private void DoSomethingElse()
{
int someValue = 42;
int somethingElse = someValue * someValue;
}
}
}
Well, that's clean code, isn't it? StyleCop suggested great things. Still a local variable can overwrite a member variable, but now you see the difference more clearly: a member variable has a "this." prefix. Hungarian notation is so great.
|
|
|
|
|
If Visual Studio did everything for you, there'd be no reason to buy a tool like ReSharper!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Good point. But are sure that ReSharper does find that? Really, did you check it?
|
|
|
|
|
|
It doesn't give you a warning because it's perfectly valid code. If you want to use the class var, you can qualify it with this.varname .
Don't make the mistake of using the IDE as a crutch.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Why would the compiler complain, name scope is part of the language
|
|
|
|