|
So, this is the way you making fun of an old man
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Switch to Java. Problem solved
-NP
Never underestimate the creativity of the end-user
|
|
|
|
|
That's liked curing a headache by shooting yourself in the head!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Actually, that's where the problems begin. Lower and upper-case primitives in Java do completely different things.
|
|
|
|
|
I write process control applications, so I have to deal with lots of values that are defined as a particular number of bits in a network interface or a hardware register. For that reason I use Int32 , UInt16 , and so on. While I realize the chances of the aliases changing underlying type in .NET are effectively zero, I have too many battle scars from prior apps written in C. A variable declared as an int could be 16 bits, 32 bits, 64 bits, or something else.
That said, string 's are another story entirely. Character sets, code pages, encoding, decoding, you still end up doing conversions of one sort or another regardless of your 'native' representation. I don't think I've ever declared a String in almost 10 years of C#. I always use the string alias.
Software Zen: delete this;
|
|
|
|
|
I think I will be explicit if the (Win) API is requiring an Int32, and non-specific in the code where I need an int.
One can change, the other will not.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Given all the confusion, I think I'll just override String and string, in future, with an array (which is all a string is meant to be, anyway).
I wanna be a eunuchs developer! Pass me a bread knife!
modified 18-Feb-17 9:30am.
|
|
|
|
|
What I find amusing is that VS2015 says that String.Empty can be simplified to string.Empty
Riiight.
Marc
|
|
|
|
|
Indeed a kind amusing. But if you claim this to MS the Chance is there that a over all "empty I can be everything" will be defined ... and after they will make c# a Java language. No, please not
modified 19-Jan-21 21:04pm.
|
|
|
|
|
For what it's worth, the C# style guidelines on MSDN say to use the lower case.
|
|
|
|
|
It's good for starting religious style arguments over code style.
|
|
|
|
|
True. I didn't intend to but it seems I have. I just wanted to have a gentle Friday afternoon chat about code style... I should have known better!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
There are lots of tools available to build what I call a pop-up website on the myriads of $5 web hosts. Usually featuring Wordpress.
But they all appear to be aimed at making a Blog.
Is there anything like that I can point someone at for making something more general purpose? Like a customer feedback page, for example? I think this person could build the whole thing, with an SQL server backend even, with a host available. But isn't in a position to set-up a server and hosting and all that entails themselves. He has a "real" business to run.
|
|
|
|
|
John Krause wrote: But they all appear to be aimed at making a Blog. Google for "webshop template".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Which are templates, for Wordpress?
|
|
|
|
|
Not just Wordpress.
Why does customer feedback go into a database? Wouldn't a form that mails you the result be enough?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
So others can see it too
Kind of like Amazon
I loved/hated this and here's why...
Naturally expectation is lots of love
|
|
|
|
|
|
Be USA, and his problem not mine
|
|
|
|
|
Which reminds me; not my problem
It is weekend.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I haven't used it personally, but I have recommended Wix[^] to someone non-techy. This person found it easy enough to make something with it.
Jeremy Falcon
|
|
|
|
|
I was just coming to make the same recommendation (with the same evidence). Are you me?
TTFN - Kent
|
|
|
|
|
Yes, I am you. But you (I) knew that already since you're (I'm) the one typing this.
Jeremy Falcon
|
|
|
|
|
So, I'm trying to squeeze a bit more performance out of a LINQ query executed by EF. It's used pretty frequently and returns just a page of data at a time, complete with filtering and sorting support for various columns. This thing grabs data from 11 tables, basically a status summary row from a bunch of different operations on a single record.
I go look in the SQL Profiler at the query EF generates and find it's hitting the database about 25-ish times, once for the main page of data (pagable grid) and once for each record in the page to fill in a couple of pieces of data for those records that were accidentally not Included in the original query. OK, not problem, easy fix to remove those extra trips to the database. Quick'n'easy.
I also notice the main page query is a bit ... large. 544 lines of SQL with 19 LEFT OUTER JOINS! Wow. I knew EF generated some crappy SQL but this is ridiculous. The other 24-ish hits are small EF house keeping queries and filling in missing pieces of data from the original page query. Not big deal.
So, I put in a couple of missing Includes in the query code and test it out. Great! Down to five trips to the database instead of 25 and the grid page response is about four times faster than it was. Awsome!
Out of curiosity, I go look at the new SQL for the grid page query. It's now 977 lines of SQL with 35 LEFT OUTER JOINS!! WOW!
Oh, it runs in less than 100 milliseconds.
|
|
|
|
|
To this day, I refuse to trust, or use, EF (or any other ORM) except for the most lightweight interactions.
The exception to that is my own ORM, because it's not a PoC.
Sadly, such attitude is rapidly making me obsolete in this industry, as I've actually never had to touch EF. Not that it isn't easy to learn at least the basics.
Marc
|
|
|
|