Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

asp.NET with C#

Name: Anonymous 2009-12-05 23:21

Okay so I just got an ENTERPRISE entry level job-- I really like C# so far, but some shit is ridiculous, and it isn't my fault or the language's fault at all. I literally had to write this line the other day:

IEnumerable<Popsicles.Objects.DAL.Sproc_WebSite_LoadUniquePopsicleCountsResult> ab = SqlHelper.GetRecords<Popsicles.Objects.DAL.Sproc_WebSite_LoadUniquePopsicleCountsResult>("Sproc_WebSite_LoadUniquePopsicleCounts @WebsiteID=" + ws.WebSiteID.ToString(), new string[] { });

... On top of that, I had to filter those results with LINQ twice instead of just reshaping the stored process to fit my needs from the database. Even more horrible, I had to write this function to help with that:


protected int GetPrice(Sproc_WebSite_LoadUniquePopsicleCountsResult dl, PopsicleSite.WebSiteSetup.WebSite ws)
    {
        Popsicles.Objects.BusinessObjects.WebSiteBO.PriceField pf =  Popsicles.Objects.BusinessObjects.WebSiteBO.GetPriceFields(dl, ws.NewPrimaryPriceField, ws.NewPrimaryPriceFieldLabel, ws.NewSecondaryPriceFieldLabel, ws.SecondaryPriceFieldLabel, ws.PrimaryPriceField, ws.SecondaryPriceField, ws.PrimaryPriceFieldLabel, ws.SecondaryPriceFieldLabel).Where(z => z.isPrimary).FirstOrDefault();
        if (pf != null)
            return pf.Price;
        else
            return 0;
    }


what the FUQ.. Keep in mind that I have nothing to do with most of this shit that is being called/instantiated, I'm just trying to do my job of EXPERT WEB DEVELOPMENT.

Is this what OOP has come to? IS IT REALLY LIKE THIS IN THE REAL WORLD? I think most of this stuff is on the bill for re-factoring, and it's true that the development team doesn't really have much time, and it's also true that I really probably don't know what I'm talking about, but still...

I think I'm keeping to 1 and 2 character variable names just to keep from going insane


object references changed to cover my anus

Name: Anonymous 2009-12-06 10:25

>>3

This is excellent advice, thank you.

MSDN is telling me that  var is considered harmful to test driven development because you aren't offered IntelliSense on variables not statically typed HURR DURR


>>4

I must agree that it is a pain in the ass. I don't understand why I must declare

using Popsicles.Objects.BusinessObjects;
using Popsicles.Objects.DAL;
using Popsicles.Objects;


and instead cannot just declare


using Popsicles.Objects;


and have Popsicles.Objects.DAL and Popsicles.Objects.BusinessObjects available to me.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List