|
Not in this case.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
Member 14629409 wrote: visual basic 2008...
Mind Bleach! Send me Mind Bleach!!!!
Will Rogers never met me.
|
|
|
|
|
|
Not half as tough as England will be playing!
The All Blacks are on fire this year ...
And we barely scraped through.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
We were not very good at all Paul hopefully WG will have a hard word before the South Africa game - a wins a win though we had Warburton sent off in 2011 and France beat us
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
There is a bloody great big frog getting an earful for the red card that cost them the match. Japan match was a real grind for the first 50 minutes before the weight of SA took its toll.
Looking forward to seeing the Kiwis give the dammed poms a hard time.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Cymru am byth!
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
I'm Welsh and would love them to win but they won't unless they shape up.
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
We played much better than Wales, as even Wales coach admitted, but in the end with the two missed penalties and that red card (Our guy must be brainless to do something like this at all, let alone in a world cup) and a bit of technical errors in front of Wales line, we did no make it. Anyway, it was a nice game, and I enjoyed watching it.
|
|
|
|
|
Being from the US and not following rugby, how are the Scots doing? My great grandmother was from there.
|
|
|
|
|
|
I just spent over an hour fixing some custom DateTime TextBox that only worked if the system clock was in a specific Dutch format (both CurrentCulture and CurrentUICulture had to match)
I'm sure it all works at the customer (for now), but as a developer I prefer having my OS in English because it's more Googleable.
And I REALLY don't know what to make of this
smtp.Send(mail)
For n = 1 To 10
Thread.Sleep(500)
Application.DoEvents()
Next I wanted to apply the boy scout rule, but that's a full time job
There's new work (and a new customer) in it for me though.
Probably a new web or mobile application hosted in Azure
|
|
|
|
|
Application.DoEvents() is used to keep a Winforms GUI responsive, otherwise in a tight loop it will freeze.
Agree with you on the English Windows version, just can't stand Windows Dutch translation
|
|
|
|
|
I know what DoEvents does, but why would you need it in the first place?
And in a loop?
With a Thread.Sleep?
I should add that the class in which it is used is not even a Form.
|
|
|
|
|
My bet is that the SMTP method runs asynchronously and they wanted to make sure it goes through before the code goes on.
Could be worse, I've inherited a code base that crashes when compiled in release build, works only in debug build. Thankfully, I am rid of it now.
|
|
|
|
|
Then he should put that send mail call in an async method and prevent user from sending another mail or closing the program before it's done.
|
|
|
|
|
I suppose that's kinda the point of the loop in the first place: To prevent the user from doing anything else in the meantime.
|
|
|
|
|
Yes but user should be still allowed to do stuffs such as clicking on menus or continue typing. Using async method gives user smooth experience. While using thread.sleep and window.doevents continuously wont be smooth, I believe.
|
|
|
|
|
For starters, I don't mean to defend the code. It's a clear code smell and should be restructured to be asynchronous proper.
That said, it can be smooth depending on the interaction rate. No process in computing ever is smooth in reality, it's just granular on a fine-enough scale to make us, slow-reacting meatbags, think, it's smooth. In gaming, 60 FPS are, as a rule of thumb, pretty enough to make things feel smooth so if the application processes messages 60 times per second, that would feel smooth despite doing busy-wait-nonsense.
|
|
|
|
|
That smtp call followed by the loop stinks of a VB6 port. I had to write garbage like this in VB6.
|
|
|
|
|
Quote: And I REALLY don't know what to make of this
Simple: it's a chunk of code which says "I have absolutely no idea what the I'm doing".
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Did somebody also comment out code, then leave it to be checked into the repository? That's a sure sign too.
yes, I deal with that on a daily basis.
Them: "What if we ever change the repository? Then we lose all that history!"
Me: "Who * cares? The application should support the business rules at this point in time. If those ever change, we need to understand how to make the application work differently, and write that code. Having this clutter around just makes the code less readable."
|
|
|
|
|
happy to hear it's not just me. I'm okay with commenting out code and forgetting about it - we all do it from time to time. HOWEVER, having multiple levels of commented out code so that you can see the history (yet we're using svn...), yeah, that's either stupid or a bad habit.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Seems like it would be a very unresponsive message pump, given the half second interval between processing events.
Explorans limites defectum
|
|
|
|
|