|
Cheers mate. If you ever do make it out here I'll buy you a beer (or OJ, or a cuppa-tea, whatever) We can test Newton's 3rd while we clink the glasses. 
|
|
|
|
|
Or you come here[^]. We have the right kind of glas for that
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
CDP1802 wrote: You are wrong. VB PHP is the problem
FTFY
On a more serious note, I don't think any language is the problem. The problem is the people using them...
|
|
|
|
|
PHP? That's Triassic Park!
Every language may have a share of bad coders, but some have been advertised to them as being especially 'easy to learn'. They were called and they came. The languages may have evolved over time, but many of the coders have not.
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
Just fix your stored procedures so they don't return nulls.
|
|
|
|
|
That's a great idea. Now if only I had the access to do that...
|
|
|
|
|
Sasha Laurel wrote: That's a great idea. Now if only I had the access to do that...
In this case, yes, suicide is a very tempting alternative.
Homicide, on the other hand, mmm... ...sweet
I've found a nice way to punish the original coders when I come across stuff like this. Ask them what they intended to do in that portion(s) of the code, and WHY they did it so. It's not offensive, and it's perfectly justifiable.
Now, one of two things may happen:
- You, made to look like a fool if they can come up with a good explanation why they did what they did (which is ok with me, 'cause at least I can understand, and I don't mind admitting sometimes I'm just plain dumb), or
- The 'WTF-did-I-do-here-can't-remember-can't-justify look on their faces, which is purely priceless (it may not help in untangling that code, but my ego will feel a really nice tickle-tingle)
Now, in your specific case, I have no idea what would help, short of modifying the whole codebase 
|
|
|
|
|
This is probably actually Microsoft's fault: a Linq query should work the same for a query against the database, or a query against an in-memory object that was created by evaluating a Linq query on that same database.
|
|
|
|
|
Interesting idea! I wonder what the implications would be for an IQueryable provider.
Oh well, I'm mostly just wanting to piss and moan at the moment.. 
|
|
|
|
|
Sasha Laurel wrote: Any suggestions? Is suicide a viable alternative to fixing thousands of lines of VB Linq statements of this nature?
No, just consider it job security
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Job Security! Just the positive spin that I needed. Thank you sir!
|
|
|
|
|
Sasha, you might have to keep reminding higher up management that it will take time to eventually get it all taken care of if they start playing whiny games about it taking time.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
The problem with Job Security is: There isn't a reliable method found, that does so. (At least any that I know of.)
Just ask the tons of unemployed programmers who wrote unreadable code to get it.
|
|
|
|
|
If you want job security, be an ninja. You can pretend you were nowhere near any bad incidents or right in the middle of good ones.
|
|
|
|
|
Sasha Laurel wrote: Is suicide a viable alternative to fixing thousands of lines of VB Linq statements of this nature? Depends on what you call viable. If you want to get out of this problem as quickly as possible, no matter the cost, then yes. Personally, I'd say the cost is too high to consider it. (That's disregarding the subsequent funeral costs you'll impose on someone else.)
PS your quote had really weird markups that I haven't seen code project do before. I stripped the verbose "span" markup surrounding every lower-case "i" in your note.
|
|
|
|
|
You make me realize that I sound extremely insensitive to people you who really are suicidal. OOPS! No offense intended.
As for the weird markup, my company targets IE as our main browser, so a lot of the time I'm in IE tab for chrome. I wonder if it has something to do with that?
|
|
|
|
|
Sasha Laurel wrote: you really are suicidal That threw me for a bit. What did I say to make you think I was suicidal? Then because of context I realized "you" should have been "who".
Today I'm following a bug, no real detail on how to get there so I "best guess" it.
This it a multiple pull-down app. Pick something at random. Code blows up, try-catch retrieves the error. Tried to retrieve a value from a nullable datetime field. Threw the error because the field was null. Looks like 94% of the choices leads to that. Start a SQL trace, it goes there when it starts up, but doesn't when I make my pick and blows up.
So the code should be able to know what it can allow and modify the pull-downs to match. It's doing it elsewhere in the same pull-downs. Just one more area where the code isn't helpful. (Especially when I'm fairly new and don't really know what is meant by "2012-01-23-D2302-Private-Repro-Attempt-7-v-brleon")
OK, it's dated, by a specific person, created while looking into something. But what's really important is that I've picked a type of report that should have allowed me to pick 26 of the 428 selections that should work. That or replace the null date with today's date in the other 400 possibles.
|
|
|
|
|
LOL, good catch! I'm glad you understood what I was saying.
|
|
|
|
|
That sounds crazy! I'm using MySQL so not even sure if I can run a trace on that. I just use ObjectQuery.ToTraceString() to get the SQL that EF generates.
Anyway, best of luck with that one. I'm sitting in a TDD class right now wishing that my company practiced TDD. 
|
|
|
|
|
It gets better, I use one of the 26 pickable records where both dates aren't null and I run to the same catch error
|
|
|
|
|
Some one wanted to have this: "I have 12 text-boxes for entering Rate-Of-Intrest for different months. If user enters rateOfIntrest for January and August then rateOfInterest for February to July should be same as of January and rest should be as for August. If data for only January is entered then all the months will be same as that of January"
Suggestion was:
in this case when first text box value can given by the user then bellow method can help u.
TextBox1.Text ="10";
if (TextBox2.Text == "")
{
TextBox2.Text = TextBox1.Text;
}
if (TextBox3.Text == "")
{
TextBox3.Text = TextBox2.Text;
}
if (TextBox4.Text == "")
{
TextBox4.Text = TextBox3.Text;
}
if (TextBox5.Text == "")
{
TextBox5.Text = TextBox4.Text;
}
if (TextBox6.Text == "")
{
TextBox6.Text = TextBox5.Text;
}
if (TextBox7.Text == "")
{
TextBox7.Text = TextBox6.Text;
}
if (TextBox8.Text == "")
{
TextBox8.Text = TextBox7.Text;
}
if (TextBox9.Text == "")
{
TextBox9.Text = TextBox8.Text;
}
if (TextBox10.Text == "")
{
TextBox10.Text = TextBox9.Text;
}
if (TextBox11.Text == "")
{
TextBox11.Text = TextBox10.Text;
}
if (TextBox12.Text == "")
{
TextBox12.Text = TextBox11.Text;
}
if TextBox3 text can change then it now consider TextBox3 values..
Oh! Come on...
|
|
|
|
|
Yeah, OK, so what's the problem? How did you fix it?
|
|
|
|
|
Ok, since you asked, there can be ways. To start with, I will have a UI of dropdown and corresponding textbox and a '+' icon (to add another dropdown + textbox)
Since user is aware of the fact that month selection will drive rate of interest, all they need to do is select a month(in dropdown) and then set rate of interest from that month(in textbox). If they want to change for any coming month, use the '+' icon to add another dropdown-textbox to add the values.
UI is short and clean, so will be the implementation.
|
|
|
|
|
Does the user need to add February in order to add March?
|
|
|
|
|
BTW, your comment suggests that you think the way suggested was correct. Is so?
Having a if for all the 12 textboxes with individual conditions, followed by rest of the textbox after the current one?
|
|
|
|