@MasterPlanSoftware said:
Liar!
I can only guess that some other moderator (yes there are some) makes fun of me.
@MasterPlanSoftware said:
Liar!
I can only guess that some other moderator (yes there are some) makes fun of me.
Only Alex can ban users. Though that probably would not prevent him from registering by another name.
Anyway, banning users is IMO only a last resort in very extreme cases (WoW gold spammers etc.), and I don't see any reason at all in this particular case. By my experience, trolls who do not really mean to contribute to the forum. Does anybody remember TubeRodent?
@MasterPlanSoftware said:
Do you wear the cape too???
Yes, but it's invisible and so thin that you wouldn't notice it if even if you touched it. You just have to believe it's there.
@MasterPlanSoftware said:
Alright everyone... Raise your hand if you want AmmoQ to use his superpower...
* MasterPlanSoftware raises hand!
IMO it would be sad if this thread needs that kind of moderation, since antipatterns are per definition the main topic of TDWTF.
@morbiuswilters said:
Is this going to end with me locked in Room 101 being forced to drink keg after keg of vile, German beer?
er.. actually, no. I refered to that other secret super power. The one that deletes posts and locks threads. The "locked room" power has become a bit unpopular in this country, lately.
@MasterPlanSoftware said:
@ammoQ said:
Wrong guess. Try again.No way man. You are just a 'regular user' remember?
I am until the situation requires me to activate my secret super power.
@joe_bruin said:
This woman has serious psychological problems.
Nitpicking: No, she has serious psychiatric problems.
After careful consideration, I name "Inner Platform Effect" as my favourite anti-pattern. Especially since it was first defined within TDWTF.
About busy spin (aka polling): I side with MPS. In some situations, there's no way to avoid it or it just doesn't matter.
TRWTF is the forum software. Let's give it another shot: abra cadabra, lockedy-lockedy-lock
@MasterPlanSoftware said:
Or rather, it revives a thread that has been dead for months....
True. Thread locked to prevent repeat offenders.
@bstorer said:
Eventually, all things will be possible by us, mere mortal forum users, and finally shall we be free of the silly mythology that is Him.
@Jules said:
The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee.
@oipoistar said:
childs life in danger because of the people that have a need to watch
such crap?
At least it's a fair assumption that demand causes supply, so children get abused to create the stuff those sickos watch.
@Ice^^Heat said:
Mine is http://en.wikipedia.org/wiki/Object_orgy
Because everytime I write a method, I have to type this damn public/private thing!
Like I care if something is public or private!!
I make them all public to that I can access all the routines I need.
I'd guess there are two main reasons for Object Orgy:
a) lazyness or ignorance, as you suggest
b) some kind of missleaded caution - in the way of "but what if I ever have access xyz..." - by people who always want to keep options open.
@bstorer said:
I think it's fairly likely you missed the thread where we formed a religion to you, m'lord, for you, in your infinite wisdom, have yet deigned to lock it. Here it is, by the way.
Holy WTF, how could I miss that thread?
You are right, many of MPS' posts are pretty ok. Some are too rude. Some are superfluous. Just like mine.
@morbiuswilters said:
But you got your own Magic: The Gathering card made in the Mashup thread! I believe that's the highest honor that can be laid on anyone. Honestly, the SSDS stuff wears thin really quick and I only look at it in distilled format on TSMoE.
Thanks for pointing that out, I would have missed that otherwise. And of course thanks to CapitalIT for making the card. Unfortunately, it can't be played in TheMashupThread. It's like trying to shoot the brain of a headless zombie.
I consider myself a follower of The Way of ammoQ (if you aren't familiar with the religion that has been started around you, you need to read the Sidebar more).
Religion? I've seen occassions where people summoned me (to lock a thread etc.) but I wouldn't consider that a religion. Or is there something I've missed? Because I follow most threads, except TheMashupThread.
@HannahRochelle said:
I want that 2 minutes of my life back, thanks.
Friendly reminder: This thread is so fubr that it's mostly unmoderated. You are here because you want those swampy things.
@morbiuswilters said:
Seriously, I have seen almost no Sidebar posts out of you except in the last week or so. Also, let's assume all of MPS's posts were made in the last 6 months.. that still works out to about 11 posts a day, which hardly seems that over-active.
Rather ~15 posts per day. Which is quite a lot, IMO. You are right, I don't post that much in the sidebar threads; going into the swamp is not my thing (but I'll let you have your little fun with SSDS).
I'm also going to say that it seems a bit inappropriate for an admin to make a post like this in a public manor. If MPS or someone else is annoying you, send a PM and ask them to stop. By posting this publicly it leads people to believe there are unwritten rules that they are expected to abide by lest they get attacked by the moderators.
I'm not an admin per se, but a forum user who happens to have moderator privileges. Unless I actually use this privileges (lock a thread to stop a flamewar, remove spam etc.), you should not put more weight into my words than that of any other forum user. As you may have noticed, I'm rather reluctant when it comes to moderation.
@dtech said:
5 point for someone who can find an IT-subject known by more than 100 people that's not on Wikipedia.
Pragmatic Programming. There is only a stub for the book, but not for the method (or philosophy or however you call it) .
@SuperousOxide said:
Just fire him? Shouldn't they also be notifying the police?
I don't know the legal situation in your country, but here in Austria there are specific requirements for pics etc. to qualify as child pornography. So it's possible that someone downloads pictures that are certainly not acceptable for the company, but not explicit enough to constitute a crime.
@lolwtf said:
You're only noticing now that he's a troll?
More like an annoying hyperactive child. Just look at his post count. Close to mine, but he wrote almost all of them during the last 6 months. A good troll doesn't post that much. He drops a carefully crafted flamebait now and then and enjoys the fallout.
Thread locked for obvious reasons. Behave like adults, please.
@Keybounce said:
Is this the place to ask for help converting C# code to either Java or Objective C?
Yes. Obviously. But it's not the place for forum related questions. Thread locked. If you have an actual coding related question, please start a new thread.
Just a few clicks from today's frontpage, I've just found an article about that topic that is worth reading.
@WWWWolf said:
As for people not "needing" referential integrity - appears that even now, in our university, the database course exercise uses the following highly pedagogical method: The server is MySQL 3, and you're supposed to write an application in Java that does use references and does absolutely have to maintain referential integrity. I did it, and passed. It's simple to write, of course, but bloody heck, would I ever hate to do that in an actual non-academic environment.
Doing that is easy in a single-user, single-thread situation. Add some concurrency and you need an awfull lot of locking to make sure that e.g. user A doesn't insert a new child while user B deletes the parent.
@dlikhten said:
Also: Who in their right mind would think that the White House, and the UN offer prizes. Just curious.
Well, last week there was a story in the news about a 40-something old woman in Austria's provice Carinthia, who lost 8000€ in a lottery fraud case.
@boomzilla said:
You can alternatively use something like:
WHERE FIRSTNAME LIKE ?
Then set the parameter to be either '%' or the actual name.
For numeric parameters, is could be something like:
WHERE AGE BETWEEN ? AND ?
And they either both get the actual value, or the smallest and largest values that the data can take.
Also a possibility, but beware of the case that the value is NULL, so it doesn't even match '%' resp. falls between -INF and INF.
Thanks, spam removed.
Normaly I do not patrol the comments on the main page, for obvious reasons.
@marakai said:
Looping through the list of input fields on the form, only those that aren't empty get added to the hashtable. From said hashtable I could create snippets of "AND"-prefixed parts of the WHERE clause.
You don't need a hashtable, just a list of columnname-value pairs. Since you only have positional parameters, parameter names are not required at all.
A little improvement in brazzys version, works without the ugly array.
But of course this kind of solution is (like any version with positional parameters) implicitely dangerous in terms of maintenance...
String sql = "SELECT * FROM table WHERE true "
if(firstname != null){
sql += " AND firstname = ?";
}
if(lstname != null){
sql += " AND lastname = ?";
}
if(age != -1){
sql += " AND age = ?";
}
PreparedStatement pstmt = con.prepareStatement(sql);
int parcnt = 0;
if(firstname != null){
pstmt.setString(++parcnt, firstname);
}
if(lastname != null){
pstmt.setString(++parcnt, lastname);
}
if(age != -1){
pstmt.setInt(++parcnt, age);
}
@ulzha said:
@marakai said:In the Normalise() method I do my darndest to munge and check that field to make sure it doesn't put me at risk for injection.Are you saying that your DB2 API has no genuine escape method, or... WTF
For obvious reasons, an escape method cannot be part of the database. If such a method exists, it must be part of the API. Anyway, the whole idea of escaping is fundamentally broken.
@morbiuswilters said:
I didn't actually think that German beer was made from the tears of murdered Jews -- that was a joke.
An extremely offensive joke, I might add.
However your calm, matter-of-fact response has unnerved me a bit.
That's the point.
The only beer of value from Euroland is Belgian.
IMO Czech beer is better.
Unless performance prohibits it, I do it like that:
select * from person where (first_name=:p1 or :p1 is null) and (last_name=:p2 or :p2 is null) and (age=:p3 or :p3 is null)
(the parameter names p1, p2, p3 have been choosen to keep it short. Normaly I'd use p_first_name etc.)
If your language only allows for positional parameters in queries, it gets kind-of ugly...
select * from person where (first_name=? or ? is null) and (last_name=? or ? is null) and (age=? or ? is null)
SetParam(1, txtFirstName); SetParam(2, txtFirstName);
SetParam(3, txtLastName); SetParam(4, txtLastName);
SetParam(5, txtAge); SetParam(6, txtAge);
The advantage of this style is that the query is always the same, so the database system doesn't have to do a hard parse for every possible variation of the query; you might even be able to keep the query as a prepared statement to further reduce the overhead.
@morbiuswilters said:
I guess if you like watered-down swill made from the tears of murdered Jews.
The Reinheitsgebot (purity law) allows only water, barley and hops.
BTW: American beer is like having sex in a canoe.
Depending on the language you want to write, you could also try MonoDevelop for C# or NetBeans for Java. There are IDEs for other languages too, e.g. Eric for python. If you don't mind to pay, you might also consider non-free (beer) Tools like Komodo, SlickEdit.
@Yorick said:
Wait, is that - ...
It is! It's an actual negative number!
The idea of transaction identifiers being signed makes my head hurt. Badly.
I guess it's ok, since your actual winning is also a negative one.
Why not print the file, place the printout on a wooden table, take a picture, run it through OCR and use the high-level interface of the OCR-software to get the data?
@Cap'n Steve said:
I'd say declare them close to the usage if it's a strongly-typed language or if it has a default value. That makes it a little easier to spot how the variable is used.
Probably doesn't matter that much. Consider the following case:
someType v = null; // (1)
...
v = getFoo(); // (2)
...
doSomething(v); // (3)
The IDE is able to tell you that v is a "someType", so (1) isn't really interesting. Things get interesting when you examine (3). Where does v come from? You have to be able to spot the corresponding (2). Of course there can be more than one assignments to v, in different if cases etc. But to do that, it doesn't matter where (1) is.
thread moved to side bar
@Lexarius said:
@morbiuswilters said:What the hell? I do this all the time. Declaring variables all over a function is messy.Really? What I usually hear is "Declare as close to the usage as reasonable". A big block of names at the start of the function isn't going to tell me much about how these are used or where they are used. A declaration right next to where it starts being used gives context to both the declaration and the usage. Of course, a note after the area it is used in describing if/where you intend to use it again later is nice too. Or make smaller functions.
IMO a matter of habits. In a perfect world, your methods are small and clear, so there is no difference between "at the start of the function" and "close to the usage".
@Benanov said:
There are no explicit joins. There's this idea of where e.g = f.g but that's not the join syntax that's so popular amongst the kids these days. I would also assume that that doesn't allow the server to optimize properly, or at least makes it a hell of a lot harder to do so.
A database system that cannot optimize queries with implicitely written joins is not worth its money.
I really do not know, but as far as I'm concerned, joins are GOOD.They also encourage one to explicitly enumerate the relationship between the two tables, which does help to align what the hell one is doing firmly in one's head.
I wouldn't say explicit joins are bad, but at least I can say I hardly ever use them, and my coworkers also hardly ever use them. We all use implicit joins. Probably a matter of habits.
@upsidedowncreature said:
I've got experience of C# and I'm learning Java; the biggest hurdle is figuring out what's in the framework (is it called that in Java?) and where.
Nope, what you mean are (most likely) just the standard libraries. Frameworks in general do not "contain" things.
@Welbog said:
What I'm referring to as "the knack" is the prerequisite to this. People who don't have it would never be able to be good software developers without putting an incredible level of effort into it to overcome its lacking.
I agree to that. Without the knack, people will never really know what they are doing. (Chances are that others won't know either). But the knack is not enough. I know people who have the knack, but never bothered to get some formal education or at least read some books about software design, pattern, methods etc, i.e. everything it takes to create software except programming. Such people tend to reinvent the square wheel sooner or later. They are relatively good if they make small sized applications all by themself, but they are rather disappointing in a team. They don't know standards (tools, processes, naming etc.), they are mostly unable to read other people's code and they write code that is rather unstructured, undocumented and hard to read in general.
Everyone with the knack can be a good programmer, but that doesn't necessarily make him a good software developer.