|
While working with (young) C# programmers I’ve noticed that some mistakes are being repeated by almost every one of them. These are mostly the mistakes, which once you point them, are quite easy to remember. However, if a developer is not aware of them, they can cause many problems with the efficiency and quality of the developed software. Therefore, I decided to gather the 8 most common mistakes made. What's your most common mistake?
|
|
|
|
|
Wow, so much misinformation in one place..
edit: the comments on that article (which are tiny for some reason) do a pretty good job at identifying the misinformation, especially this detailed reply-post[^]
modified 8-Jan-13 17:43pm.
|
|
|
|
|
Yes, indeed, a lot of imprecise language such as glossing over that StringBuilder does have to re-allocate at times.
One of my pet peeves is when developers don't re-use an existing StringBuilder after it has been expanded.
I also wanted to add this, but I have no interest in creating a profile on that site:
If the concatenated value exceeds the capacity of the StringBuilder, a new string will be instantiated resulting in an extra allocation.
modified 8-Jan-13 19:30pm.
|
|
|
|
|
I agree with the reply. Trying to find a one-size fits all approach is usually never the correct answer. If you really want to be a good developer, C# or otherwise, you need to figure out when something is appropriate, not memorize lists of solutions that other people have decided you should use all of the time. Taking 2 for example, maybe there's an issue if the collection is empty (i.e. it should always have items in it), and letting First throw an exception would help you figure out the problem faster than getting back a null or an exception later on.
|
|
|
|
|
Terrence Dorsey wrote: What's your most common mistake?
Using C#.
|
|
|
|
|
I can recall my first year with C# and say that I used to do all of these. Now I am not doing any of these anymore. and for that the credit goes to one of my friend who handed me C# 4.0 in a nutshell one day.
The fact is that when someone starts programming he tries to learn and put the code to make it work. With time, they learn the best practices and consider performance and non functional issues and try to put in better code.
P.S. I am in no way endorsing/publicizing anything, I am just telling my experience.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
Terrence Dorsey wrote: What's your most common mistake?
Agreeing to work on a project using Java or VB.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Terrence Dorsey wrote: What's your most common mistake?
String concatenation instead of StringBuilder .
In some cases, my signature will be longer than my message...
<em style="color:red"> <b>ProgramFOX</b></em> ProgramFOX
|
|
|
|
|
I was watching episode 10 of Elementary and they mentioned a language called Malbolge. I’ve been coding for a long time but never heard of this language so decided to do some research. Apparently there is a major group of programming language I haven’t been exposed to: Esoteric Languages. I thought I would show some of these to folks who may have never seen them. Python is bad enough, but an entire language in Whitespace?
|
|
|
|
|
Thanks! This led to this[^]. Many other weird languages including the last one (Ziim).
|
|
|
|
|
Windows RT distinguishes itself from Windows 8 in two main ways. First, it runs on ARM processors rather than x86 ones. Second, it bars the installation of third-party desktop applications. The built-in Windows applications like Notepad work, and of course, the bundled Office 2013 apps run on the desktop, but any attempt to run third-party applications is greeted with an error message. After a little under two-and-a-half months on the market, the first cracks have started to appear in Microsoft's lockdown. A developer going by the name of clrokr has published a way of defeating this limitation, enabling arbitrary desktop applications to be run on Windows RT. Not really a exploit. Not really a jailbreak.... So what is it?
|
|
|
|
|
Fair price comparisons are a valued treasure among customers attempting to identify the lowest cost scenario for a particular product or service. However, in many cases, price is but one factor that CIOs use in making strategic technology decisions. Obviously, if a lower cost product is incapable of meeting business goals, that product will not garner much consideration in an assessment. But, when the lower cost product provides what might be an adequate solution, perhaps the lower cost will win the day.... It is these two key metrics – overall cost and feature set – that continue to drive the war of words between Microsoft Hyper-V and VMware vSphere. If you’re a CIO looking at virtualization options, what do you do?
|
|
|
|
|
Microsoft is bad enough; I don't want to deal with another huge corporation.
A third-party product has to be much better than Microsoft's to bear consideration.
|
|
|
|
|
In the past year and half I've been learning Java (for Android), Python and JavaScript (& HTML/CSS) (for web development) and I've come to realize that the best way to learn programming from a book or tutorial is to read it 3 times! Yes, read it 3 times!! Reading new content this way has helped understand new languages/concepts well. I'm confident it can help you, a beginner to programming or a certain programming language, maximally absorb knowledge from whatever it is you're reading. Do you learn new languages by reading books, doing tutorials, or just hacking away?
|
|
|
|
|
I prefer taking classes; I need the structure. I've had this Android/Java book on my desk since last summer.
|
|
|
|
|
This is spooky. I do almost the same thing and i was discussing it with my friend yesterday. In fact he is the one who saw this insider news and told me that I was just reiterating the article and bragging it in my name yesterday. But the fact is that I read it today only for the first time.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
Same here, I find that to truly understand something I have to go at least 3 times over it. I then supplement this learning by doing all the tutorials/excercises the first time and then the second time I apply it to some small program of my own.
After all it seems like one can always find a bunch of people around the world who think and operate the same way as one self, no matter how different one might be to the group directly around you.
|
|
|
|
|
Cars are getting smarter and more connected, but there still seems to be a small variety of app icons sitting on the dash — usually Pandora radio, in-car navigation and not much more. But 2013 looks to be the year automakers move beyond a few pre-approved partnership-driven test apps and into the great unknown. She's real fine my 409 Conflict in Request.
|
|
|
|
|
Following the surprising immediate departure of Windows President Steven Sinofsky late last year, many are asking who will be CEO Steve Ballmer's successor. The talk persists despite the fact that Ballmer told The Wall Street Journal late last year he had no intentions of vacating the CEO chair any time soon; he said he plans to stick around until the board thinks he can't handle the job.... Who's potentially positioned to lead the new, devices- and services-centric Microsoft? Here are a few of the names I've heard bandied about. One for the Dark Lord on his dark throne. In the Land of Redmond where the Live Tiles thrive.
|
|
|
|
|
A person who calls for greater diversity is not necessarily advocating the implementation of a quota system — that’s a straw man fallacy. Similarly, having a diverse roster of speakers at a conference does not imply that those speakers were not chosen on merit. Diversity and a merit‐based selection process are not mutually exclusive. To state the contrary is a false dichotomy. And before assuming that a conference probably couldn’t find enough women because not enough women applied (blaming the victim), first find out whether or not the selection process actually included an open call for talks. In an industry where 27–29% are female, if you manage to get a speaker line‐up with 0% female speakers, you have a bias.
|
|
|
|
|
Haiku is a really sweet OS, and seems really stable for alpha stage software. It seems to have the essential software for my needs, and it runs fast even on the eee. Besides, Linux is just too mainstream. Good tips and tricks for / Installing Haiku OS / On your own netbook.
|
|
|
|
|
We increasingly live in a computer-embroidered reality, and the ability to manipulate that reality is empowering. If we can find a way to bring that ability to a wide audience, it could have an impact comparable to the invention of the printing press. This is end-user computing. “End user” means everyone: people like you, me, your friends and family. We all use computers in our daily lives to accomplish both work and personal goals. When those end users can write and run their own programs, they will have fully harnessed the power of computing. Is programming really the new literacy?
|
|
|
|
|
If a tree falls in a forest and there's no one to hear it, does it make a sound?
Okay, now here's a tougher one - if Google do a bad thing, with their motto, is it a bad thing?
Google have admitted that they deliberately blocked WP8 users from using Google Maps. Source[^]
|
|
|
|
|
I read a different article yesterday that said it redirect the users to google because the maps did not render correct on the WP8 and gave a poor user experience. I see no issue with that.
It is no different than Apple filtering and being selective of which videos to show users in the search results in Youtube on an iPad. I was at a pals last year and couldn't find half the videos that I seen via a normal browser on my PC or via my tablet. It was a very odd experience knowing they existed but not being able to get near them! Now that is evil.
|
|
|
|
|
DaveAuld wrote: I read a different article yesterday that said it redirect the users to google
because the maps did not render correct on the WP8 and gave a poor user
experience.
What they originally said was that as IE didn't use WebKit, the experience was poor. Well, Firefox and Opera don't use WebKit either, but there's no block there.
They then changed their tack, but it was shown that a simple user agent spoof on Windows Phone allowed the user to use Google Maps with no problems.
However - an important point is that Google have previously said that their mapping works cross browser with no loss of functionality, regardless of which browser is used.
|
|
|
|