The ugliest part is database structure. The coordinates are stored in the db in a single field, where the lat and lon are separated by a comma I would TALK to the programmer, but I would FIRE the database architect immediately. I did similar thing (if distances you deal with are not that big, you can do it without acos and sin, and even without SQRT in SQL code if you calculate distance*distance before you run the query). Yet it works horribly slow. I made it run very fast by indexing lat and long and finding all locations within the lat,long square, then cutting off everything outside of a circle... Now you see why I suggest to fire the database architect. You cannot use index on lat, long, so any code you write is doomed to work sluggish.
User 357305
Posts
-
Selecting all coordinates withing a distance -
Exstream Younit Testing:~ Person is afraid, that someone will steal the "truth" of his true values. He is just watching his TRUE values and virtues, what's wrong with that? :rolleyes:
-
Let's just make sure?Thank you. For some reason I was sure C# cares at least a little bit what do you assign to enum variable. You are right, it does not. Good thing is - I learned something new.
-
Let's just make sure?That's not an horror, just a typical 6pm inattention error! That shoud be scary - I mean, to work for a company, where at 6 p.m. enum values can jump out of enum range. They should also add private void method(bool b) { if (currenttime>=6pm) { if (b!=true && b!=false) { throw new After6pmException(); } } }
-
Don't they know what an array is?Oh trust me, this code (may be in JSON format would help?) is MUCH better for passing stuff across the process border and through shared memory then defining all the data in structures in IDL file and implement custom COM marshaller. Then any single access to this data structure causes almost 1000 disk read operations (it reads TLB from DLL) - I had to debug it, and it is not fun. Once again, if they use this ~ for passing data across the process border - I would not blame them - yes, I would use SafeArray instead, but still I would not blame these guys.