MehGerbil wrote: It really is a habit that needs to stop immediately Habit, Stop! :thumbsup:
User 4223959
Posts
-
Why do they insist on repeating the name of the table in the column name? -
Why do they insist on repeating the name of the table in the column name?So true about "I do not like it but it works". Just on a simple topic of table names, a few times (on new projects) I started with "CustomerAccount" tables, but ended up re-factoring all work to use "t_customer_account", etc. Some software could not cope with mixed-case strings. And absolutely true about having common standard - worth than anything is mixing different styles, but I am sure no-one goes that far :)
-
Why do they insist on repeating the name of the table in the column name?You will understand this when one day you analyse the system, say, trying to find out how come "AccountId" is null in "Audit" table. You will find that half of 200 tables have "AccountId" column, so this string is used 5900 times in 400 stored procedures. And of cause, if your SQL is formed in the code, you will find the "AccountId" is very popular as ... a class member! You will spend the rest of the month seifing through the code. And all that could save you the trouble was simply name that column "Audit_AccountId" :) It's just experience.
-
Really frustrated when moving from C# to C++You probably need to step back a little and write a small program in assembler. C++ is a syntax layer on top of C, which is a macro-assembler of a sorts. That's what makes them different from C#, Java, Python, Lisp... So write a small assembler program ( print an argument + 1) - and then write the same in C or C++. Now run your C program in debugger, step into your code in disassembler and see how the disassembler code compares to your assembler code. Then, I promise, things will click into their places, and you will understand everything :)
-
small, slow memory leakI'd say resource leaks are one kind of the two most likely causes of memory leaks in managed code. The other would be using static collections. But resource held by any object would be released by finaliser after GC - so unless one uses a buggy library, it can only be a result of using unmanaged code without implementing proper finaliser. So I would start by searching for "static" in the code.
-
Methods within methodsI agree, there are times I miss those things, though barely remember how many years ago I saw Pascal for the last time. BTW, you can do the same tricks with anonymous inner classes, in Java...
-
So that shiny IDE is not so new under the covers [modified - added image]harold aptroot wrote:
not that since they are used they must automatically be fully legal - if they were, Explorer wouldn't keep you from using them
Let me look at it from a different light. MS writes OS, and ships it with a lot a various tools, like Explorer, control panels, IE, etc. These tools use some files names and patterns as their "reserved" file names. Any tool needs some hidden/standard/whatever files to support it. So from point of view of OS, all the names like "..a.." or "Thumbs.db" would be legal, unless OS manual (MSDN) states otherwise. But the tools like Explorer might just treat them differently. Other tools follow different conventions. Java IDE show Thumbs.db like any other hidden file, for example. But when VS UI is hard-coded never to expect particular files to be anything but what was created but some MS program, it is a ... bug. :-D
-
So that shiny IDE is not so new under the covers [modified - added image]harold aptroot wrote:
You're only the 10th person saying that
Sorry, took me some time to write I think. But this whole thing about illegal names... I think it is an old conversion, to use such names for computer-generated files like hidden settings, etc. Java coders use it, I think, out of Linux habits. We started the thread with VS - so it seems VS uses the same practice for some debug data it hides on disk - why else it treats any file that starts with dot as its own debug... whatever? So MS uses it, and does not consider illegal. I think it is well in MS habit, to make tools a bit too clever, and design things to be used exclusively by MS products (I can never see Thumbs.db file in your folders - until I try to examine it with TortoiseSVN, and it asks me "and there is this Thumbs.db that was also added/modified - do you want to add it to source control?") :)
-
So that shiny IDE is not so new under the covers [modified - added image]Just FYI: leading dot is used on Linux for hidden files. Subversion client called TortoiseSVN (imho, best source control client on Windows) uses it too: it stored data in hidden folders named ".svn". They say that VS prior to VS 2005 had issues with this, and they had a workaround to use "_svn" as a name of the hidden directory.
-
How to Use Member VariablesGary Wheeler wrote:
If a member or an entire class is static,
All inner classes are static in C# - no complaints about them? (Java inner classes may instance-based or static). So not point in considering static methods evil. While the hint purpose primary is to point into discrepancy in the design ("did you mean that? Maybe you had something else in mind?"), the static methods would be slightly better optimised in runtime too.
-
Damn you C language and all it's compilers!leppie wrote:
Call gcc directly
I just did - you are right; it gives no warnings. Sorry for misplaced post :sigh:
-
Damn you C language and all it's compilers!g++ compiler considers it an error, not even a warning:
error: too many arguments to function `void MyNamespace::die()'
Run from NetBeans, via MinGW environment on Windows. Not sure about options: I use defaults.
-
ShamedIt's not about the price. The support Church of Scientology - so I would never give them a dime
-
Learning Words While ReadingEnglish language has too many words, for someone to express such a surprise. According to http://www.languagemonitor.com/[^] "English passed the 1,000,000 threshold on June 10, 2009 at 10:22 am GMT" The other side of the coin is that relative proportion of "active" vocabulary for English-speaking people is lower. (Actually, in absolute terms too, compared say to Russian). So "not to know a meaning of a word" should come as no surprise to anyone
-
Learning Words While Readingfat_boy wrote:
And how do you turn on spell checking for a web page?
Open the page in Firefox. It has a built-in spell-checker for whatever language is there.
-
Learning Words While ReadingNo, you use IE - Firefox always corrects me
-
Do we really need Java runtime?Rama Krishna Vavilala wrote:
no site uses Java these days.
You mean, on your client side. On the back, good half do
-
Toyota Acceleration IssuesEd.Poore wrote:
Put your foot down and nothing happened for a few seconds
Reminds me of Ford automatics. :laugh: That's why I always preferred Mitsubishi's adaptive auto: it does response immediately, and you always feel like it does what you want.
-
Monitor resolutions...and 1600 x 900 for cheap HP desktops :mad:
-
The Anti-If CampaignDespite all this looking like a joke, I agree too. I should add that most programmers do not have enough experience to realise how a complex state (like 10 boolean flags) can create an IF-ELSE hell, where one guy after another fixes one bug after another for a year, and still it never actually works... Just take a big "C" program (or a C++ program written by a C programmer)... :laugh: