XImplosionX

Does Managed Programming Make Us Lazy?

by Patrick Godwin on May.25, 2009, under Programming, Technology

With the popularity of managed languages in recent years, we have no doubt seen changes in the way we program. In recent years, we’ve seen many additions to the .Net family of managed languages, such as WPF, LINQ, WCF, and XNA, to name a few. But have we given up our good programming practices for the convenience of managed languages?

I don’t know about the majority of programmers out there, but I find myself writing sloppy code while working in a managed language. I’m not saying that I break all rules of style or flow, but I’m not as careful as I usually am. Let’s say we’re writing a function in C++ that calls a simple integer type function. The rule of thumb would be to check what it returns, and based on predetermined conditions, handle any errors that may arise. A pattern I’ve noticed, mainly with C# programming, is a total disregard for exception handling. And even if the exception is handled, it isn’t handled well. Last time I checked, “Throw Exceptio” was not a smart way to handle errors.

I’m sure there are many other examples of Managed Programming leading to lazy programming. This is only the most obvious one I’ve delt wtih. What issues have you had with managed languages? Please write about them in the comments, get the conversation going.
Thanks for reading,
Patrick Godwin

Note: I’m very sorry for the short length of this post. The quality of this post is also extremely bad, and does a poor job of articulating my thoughts on the subject. Mea culpa.

3 Comments for this entry

  • Alfred Thompson

    Bad habits are bad habits and ignoring exceptions is a bad one. I can see how it would be easy to blame the language but I don’t think that is far. Just as good design is necessary for unmanaged code it is necessary for unmanaged code. It may be time to slow down and think out the conciquences regardless of the programming language used.

  • Patrick Godwin

    I agree with you completely Mr. Thompson. The main question I’ve been pondering is what would happen if every student stared in a language that requires close attention to memory management. Exception handling in itself is easy, as exceptions should never happen in end user products, but looking over the C# code of some of my class mates I see issues with exception handling left and right. One noticable issue is null data being returned from a function. Wouldn’t a simple if(return_var == null) then return some error code be easier than restructuring your code down the line. When I began programming in VB.NET, I would have a function that returns garbage and be unsure as to why the exception was happening. I’ve since fixed my design habits, but I find my friends making the same mistakes constantly. C/C++ is not taught as a part of our school district’s curriculum, nor are any true languages for that matter, and students are allowed to explore languages other than those suggested by the district. While I think this allows diversity to the course, having people teach themselves the language in say the Visual Studio IDE teaches them how to deal with exceptions, not how to prepare and prevent them.

  • Noah Dupes

    Another well executed post. i do not work with with code so i can not comment on the subject at hand, but i can comment on the general laziness of our society. We have all started to become lazy in one way or another. We are seemingly evolving in a technology standpoint, but are devolving in other matters. Students seem to have become lazier in school, i cannot say that i am not guilty, and i find this a shame. Some blame the new teaching methods, but could we also blame ourselves? We seem to have a lack of drive in our quest for betterment and this is just awful, i am slightly embarrassed to be apart of this generation. Is it technology’s fault? Who or what is to blame? All i can say is that if this trend continues, The U.S. could be in more trouble than it already is.

1 Trackback or Pingback for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

    Archives

    All entries, chronologically...