[ProgClub list] Memory management in C

John Elliot jj5 at progclub.org
Sat Oct 8 15:50:04 AEDT 2011


On 4/10/2011 5:59 AM, Stuart Laughlin wrote:
> I'll be interested to see if writing web apps in C# has the same
> appeal for you, coming back to it as you will be from a long foray
> into PHP. I spent a couple years writing C# web apps (.net not mono)
> and I must say I really enjoyed it. I had pretty well standardized on
> a technology stack comprised of MSSQL, NHibernate, Castle MonoRail,
> Castle Windsor, and dojo toolkit. ORM, MVC, IoC, and a nice js/widget
> toolkit make .Net web development pretty respectable.

That's an impressive list of technologies you had a grasp on man. I've 
not used most of them, some of them I haven't even heard of.

I've been doing some very minimal .NET maintenance on a web-site for a 
client but it's just been with OOTB ASP.NET stuff. I switched them over 
from a "copy and paste" templating scheme to use the ASP.NET Master 
Pages technology, and I've been meaning to get around to reviewing the 
way they use the database (don't close connections, or do close the 
connections and then actively remove them from the connection pool. I 
have nfi why they did that but I think it's creating an availability 
issue on the database).

As I hinted above I have a really tricky MS SQL issue to address at the 
moment. There are issues with intense slowness of the database during 
the day (something that takes 15 minutes to run on the weekend takes 2 
hours to run during a weekday) and sometimes connections time out 
waiting for the database which creates a problem. I'm tasked with 
resolving this issue, although I'm at a bit of a loss as to how to solve 
the problem. I guess I'll just open the profiler and begin tracing 
database activity, then create a map of all the applications in the 
organisation that are using the database and get a grip on their usage 
pattern. Then I guess I'll look for things that might be creating 
resource contention or doing silly things (like not using the connection 
pool). Then I guess I'll code review those apps that we have the source 
code for. It's a pretty wishy-washy fishing-expedition kind of a task. 
Not entirely sure how I should approach it.

p.s. I didn't know you did much with ASP.NET. I didn't think you did web 
dev, I thought you were a WinForms database programmer. Although, by the 
sounds of it you're like me and do both.

> But then I spent
> a year or two with python and django and that pretty well cured me of
> ever wanting to write another C# web app. I'm vastly more productive
> with django, I like my tools way better (i.e. linux/vim/pdb), I spend
> my time doing stuff instead of waiting for Visual Studio, and on and
> on the list goes. The ORM is included (and swappable), the MVC (or
> rather MTV) infrastructure is baked right in, and it turns out IoC is
> just a crutch to prop up your language's inadequacies.

I have to confess I've never gotten around to understanding IoC. I 
really don't get it. Something about "containers", whatever they are. I 
figured I'd have bumped into something that made it clear what it is by 
now, but it's just a technique that I've never got around to 
understanding. Care to explain IoC to me and why I should care about it?

> Now I'm putting python thru its paces with desktop app development,
> and we'll see how that goes. So far I'm inclined to say that wxWidgets
> is a bit more painful that Winforms, and the deployment story isn't
> that great. Other than that, I'm still loving python.

That's cool you're loving python man. From what I see when I squint it 
sounds like the language has a pretty good reputation. I've only just 
started to learn a little bit about the language, but I really hope I 
don't end up falling in love with it. :P



More information about the list mailing list