|
Working on it this second
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
E-mail Checkbox Oddness has disappeared. Thanks a lot!
|
|
|
|
|
|
And now it's fixed... yay!! Thanks...
|
|
|
|
|
That goes down as the most many-tentacled bug I've fought with in a long time.
A brief history:
I made a change to the way I was retrieving records for members' preferences. This change resulted in 2 recordsets each with 1 record instead of 1 recordset with 2 records being returned. It was done as an optimisation.
This caused a bit of weirdness in the code that was meant to sort and combine the data from the two records (1 could be from when you were logged in, 1 could be from when you weren't logged in on another machine). Guess who forgot to check whether the two rows were, in fact, the same. This scenario simply wasn't possible with 1 recordset, 2 rows.
However, this unearthed a head-slapper of a bug whereby when a settings value was being changed I was setting a dirty bit using
_dirty = (_currentValue != value);
_currentValue = value
This is all well and good unless you plan to test all your properties. Then you need to do
_dirty = dirty || (_currentValue != value);
_currentValue = value
The irony being that the original optimisation turns out to no longer be needed after a little more work in the table indices. (Though I am seeing an option for more improvement that, I think, will bring me back 180 degrees yet again...)
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: _dirty = dirty || (_currentValue != value);
yeah, it can only get more dirty.
thanks for the insight, I really do appreciate that.
|
|
|
|
|
There's two of them in the main page left nav pane.
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
Thanks Uros,
Fixed
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
Hi Guys:
As a learner point of view; most of the times I search for a very basic level questions and I always wonder that the search results most of the time contain some intermediate or advanced level articles and tips/tricks as well. Is the code Project only for the intermediate or advanced level developers?
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Md. Marufuzzaman wrote: Is the code Project only for the intermediate or advanced level developers?
It's for all developers. Articles can be submitted for any level. The author of the article gets to choose the level, so the actual level of the article may not be what the author selected, depending on how the author percieves his/her own work. However, more advanced articles are held in a higher regard and beginner articles are sometimes viewed as "what's the point when this info is on MSDN or in beginner books or can be found already using Google".
|
|
|
|
|
somewhat i agree with you.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Md. Marufuzzaman wrote: Is the code Project only for the intermediate or advanced level developers?
Of course it isn't. Most of my articles are aimed at a beginner audience - be they beginner in a technology, or in programming in general. I'm a great believer in trying to provide that leg up for developers who haven't got a huge amount of experience - they deserve as much information as somebody who wants to go deep dive into a technology.
|
|
|
|
|
Pete O'Hanlon wrote: Most of my articles are aimed at a beginner audience - be they beginner in a technology, or in programming in general.
I agree, do you see that most of the article does not have basic information in explanation section / example of code snippets.
For example :
if (HttpContext.Current.User.Identity is FormsIdentity)
{
FormsIdentity id =
(FormsIdentity)HttpContext.Current.User.Identity;
FormsAuthenticationTicket ticket = id.Ticket;
string userData = ticket.UserData;
string[] roles = userData.Split(',');
HttpContext.Current.User = new GenericPrincipal(id, roles);
}
If i consider the above code snippets, How could I know what about FormsIdentity , FormsAuthenticationTicket, HttpContext .
However If you suggest me to buy a book first, So why should I use online resources, my goal is to learn within a very short time & all the resource should be in my hand.
NOTE: The above code snippets taken for the link below:
Authenticate user by roles in asp.net[^]
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Md. Marufuzzaman wrote: If i consider the above code snippets, How could I know what about FormsIdentity , FormsAuthenticationTicket, HttpContext .
There comes a point where you are expected to do some research. No book or article, no matter how basic, can cover all the items in depth for you - they'd end up being too big, and would alienate almost everybody because they would be reading a lot of things that they already know.
From this example, you have identified 3 things you don't know about. What about HttpContext ? What about GenericPrinicpal ? What about the use of is ? Where do you draw the line?
|
|
|
|
|
Probably because the intermediate and advanced get the highest votes, and search results are weighted by rating.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: intermediate and advanced get the highest votes
yes, probably this may one of the valid reason.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Good for you for searching before you ask. However, if you can't find the answer you need, try posting your question in quick questions, with an example of what you've tried and where you are stuck.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for your valuable suggestion..
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Since there is an Indian and a Chinese Forum now, how about a place for the Europeans among us?
Not sure what it could be used for, English football, German cars/beer, Italian coffee, Swedish girls, etc... you know stuff that Europeans engineers talk about. If somebody isn't comfortable writing in English, he could find help and locals there. Just an idea...
/M
|
|
|
|
|
...Swiss chocolate, Wiener Schnitzel, Dutch cheese/tulips?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
go on, I am listening...
|
|
|
|
|
now you want to keep the Europeans out of the regular forums too?
|
|
|
|
|
Or we could just replace the technical forums with ones devoted to all the nationalities of the world.
It's time for a new signature.
|
|
|
|
|
I didn't realise so many Europeans were having problems assimilating into the main site, or that language barriers were hampering their ability to be understood. I'd also be happy to consider a European forum to help with all the obvious sterotyping and needless and childish bashing that occurs with these poor hapless Europeans.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: I didn't realise so many Europeans were having problems assimilating into the main site, or that language barriers were hampering their ability to be understood.
Thank you for understanding. It's incredibly difficult to put up with the language the Americans seem so insistent on calling 'English'
|
|
|
|