|
Psycho-*Coder*-Extreme wrote: who has a hard time (it seems) to do adequate exception handling
Slap him. Slap him silly.
|
|
|
|
|
Dave Sexton wrote: Slap him. Slap him silly.
I have thought about this, but I know it will cost me my job (if I knew I could get away with it I would probably do it :->. Once, he actually "bitched" at me for putting code in a Try....Catch block, saying that an error couldn't possibly happen in that function and that I needed to remove it, to which I replied "Assumptions are the mother of all f**k ups".
He has a bad habit of assuming something cant happen, or that the user cant possibly do something to raise an error. No matter how hard I've tried to explain this he just wont listen, but hey in the past 4 months he's had over 20 "trouble tickets" for the processes he's coded, and I've had 2. Maybe someday he'll grow out of his arrogance and start seeing things in the right light
"Okay, I give up: which is NOT a real programming language????"
Michael Bergman
|
|
|
|
|
Psycho-*Coder*-Extreme wrote: "Assumptions are the mother of all f**k ups"
I remember a guy on a development team I was part of yelling that at one of the sales guys who demanded a feature that we later discovered no one wanted. The sales guy just assumed that a potential customer wanted a certain feature. He didn't. And he didn't buy either.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Psycho-*Coder*-Extreme wrote: but hey in the past 4 months he's had over 20 "trouble tickets" for the processes he's coded, and I've had 2.
Is he assuming he won't get fired for his "quality" code? That's the mother of all f-ups.
|
|
|
|
|
Dave Kreskowiak wrote: Is he assuming he won't get fired for his "quality" code?
Dave,
Thats exactly what he's assuming. He's been there coming up on 4 years, and we were both made part of the IT department about 4 months ago, we were just the personal programmers for one department, we didn't have to follow any of the SOCKS(sp?) Compliance issues, none of the Software Development Life Cycle or anything, if they wanted something we made it then gave it to them, so up until now no one ever knew of any "bugs" he wrote. I'm hoping that now that they're coming to light something will be done about it.
"Okay, I give up: which is NOT a real programming language????"
Michael Bergman
|
|
|
|
|
hi
How can i get the content of selected row on the double click event of datagridview in vb.net2005 to dislpay in textbox?
Pls. reply immediate
thanks
bye
|
|
|
|
|
Don't Cross Post.
Regards,
Satips.
|
|
|
|
|
<b>Suppose I have numeric values in my listbox. How do I add(addition) them and display the result in textbox. Plz help me guyz. I need the code both in VB.NET as well in C#.NET. plz plz help me out.</b>
Mash
|
|
|
|
|
Dim i as Integer
dim Total as Decimal = 0
For i = 0 to lstTest.Items.Count - 1
Total += Ctype(lstTest.GetItemText(lstTest.Items(i)),Decimal)
Next
txtTest.Text = CStr(Total)
Converting it to C# is very simpel
Best Regards
3ala2
|
|
|
|
|
vb.net
dim i as Decimal
dim c as integer
for c = 0 to c = listbox1.count
i += listbox1.items.item(c)
next c
textbox1.text = i
c#
dec i;
int c;
for (c = 0; (c <= listbox1.count); c++) {
i = (i + listbox1.items.item[c]);
}
textbox1.text = i;
Did c# with an online translator so it might not be %100 correct.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
The ANZAC wrote: Did c# with an online translator so it might not be %100 correct.
C# look sgood to me!
|
|
|
|
|
Can Somebody Give example of Trim Method
If provide with small example prog will be a great help
Nitin Jenwal
|
|
|
|
|
suppose the following:
dim str as string = "****abc***xyz***"
dim str2 as string = str.trim()
'str="abc***xyz" , where each star is a space
'its cut the spaces from the two sides
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
hi,
dim test as string = " test "<br />
textbox1.text=test 'will give you " test "<br />
textbox1.text=test.trim() 'will give you "test"<br />
textbox1.text=test.trimStart()'will give you "test "<br />
textbox1.text=test.trimend()'will give you " test"
basically, it will remove the white spaces from the string.
hope this helps
regards
|
|
|
|
|
hello frnds,
trim() is basically to remove the spaces from left and right side of the string
let take an example
txtPfr.text = "****prasad****"
trim(txtPfr.text)
then it removes the sapce from both side
likewise u can use Ltrim() and Rtrim() methods too.
to remove Left and Right side sapces respectivelly.
best luck
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
hi all
i have a label that displaying a date in the format("dd-MM-yyyy"), but my problem is that i want to save it in the format("MM-dd-yyyy").
this what i tried to do:
dim dt as DateTime = CType(lblApplicationDate.Text, DateTime)
and this is the error i got:
String was not recognized as a valid DateTime.
what i have to do to solve this issue ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
hi,
provide the format in the tostring() function. try this:
yourLabel.Text = yourDateTimeObject.ToString("mm/dd/yy")'or ("dd/mm/yy") or whaterver acceptable format.
hope this helps
regards
|
|
|
|
|
thank you ..
but i have no problem with displaying format, the problem is how to save the date in different formats.
check this
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
where exactly do you want to save it?
you could use the various properties like day, month, year ... provided by the datatime object to create a string that you like and save it to ....
regards
|
|
|
|
|
1119 wrote: you could use the various properties like day, month, year
actually this is the way i used to solve it.
but i don't think it is the best way to solve the problem
thank you
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: actually this is the way i used to solve it.
but i don't think it is the best way to solve the problem
the best way depends upon where you want to store the data.
you have not made it clear where you want to save it? i asked you in earlier post.
if you are saving the data in a database then you will have to store the datetime object, but if you are storing it in a text file, you can't do that.
you will have to format it. for example save the year,month,day... in a file and use it when you want to create a datetime object: datetime dt = new datetime(year,month,day) or you can save the ticks and use it to create the object when you read from the file like: datetime dt = new datetime(ticks)
hope this helps.
regards
|
|
|
|
|
Where are you going to save it? If you are saving it to a database, you should not save it as a string, but a date.
Use the DateTime.ParseExact method to parse the string. You can use any date format that is possible to specify as a format string.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi Guffa :
simply my question is : if i have a string contains
a date (suppose 17/06/2007 format dd/mm/yyyy) how to convert this value to
a valid date if my data base has the date format mm/dd/yyyy
(or any date format) ??
thank you
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: if my data base has the date format mm/dd/yyyy
Stop. Database's don't have a format for a date, unless you made the mistake of storing the date as text. Pass the date to a parameter in your SQL insert and you pass this parameter a DateTime value, not a String.
|
|
|
|
|
Dave Kreskowiak wrote: Stop. Database's don't have a format for a date,
in MS server i could enter a date 06/17/2007.
but i could not enter 17/06/2007 .
can we consider this a date format problem ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|