As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

SELECT * FROM posts WHERE tid = 'PA PROGRAMMING THREAD'

15455575960100

Posts

  • Options
    InfidelInfidel Heretic Registered User regular
    urahonky wrote: »
    Mother of shit Sharepoint is terrible.

    As a user? That isn't nearly enough expletive rage to indicate you've touched development yet.

    OrokosPA.png
  • Options
    urahonkyurahonky Registered User regular
    Infidel wrote: »
    urahonky wrote: »
    Mother of shit Sharepoint is terrible.

    As a user? That isn't nearly enough expletive rage to indicate you've touched development yet.

    Yeah JUST as a user. How is it like 50 clicks just to copy a file over to another folder? HOW DOES THAT MAKE SENSE?

  • Options
    bowenbowen How you doin'? Registered User regular
    edited April 2012
    GnomeTank wrote: »
    bowen wrote: »
    At least you're not refactoring whatever the fuck it is I'm refactoring. My god mix match of using statements and straight declarations and calling dispose manually.

    What the fuck kind of monster made this?

    What's wrong with calling dispose manually? :P Not everything can be wrapped in a using() clause.

    In this case, yes.

    It is litreally:
    MyClass obj = new MyClass(stuff);
    obj.PerformAction();
    while(obj.Results().Read())
    {
        //do more stuff
    }
    obj.Dispose();
    

    everywhere

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    I will cut a bitch.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    800 instances of that and counting.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited April 2012
    @Bowen: Well yeah, that's pretty terrible. I was thinking of cases where the lifetime of the object exceeds scope barriers...but that's just silly what you pasted. It's also completely exception unsafe, as one exception in there will pass over the dispose.

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    bowenbowen How you doin'? Registered User regular
    GnomeTank wrote: »
    Well yeah, that's pretty terrible. I was thinking of cases where the lifetime of the object exceeds scope barriers...but that's just silly what you pasted. It's also completely exception unsafe, as one exception in there will pass over the dispose.

    Yeah I'd be okay with that.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    TomantaTomanta Registered User regular
    edited April 2012
    From a user standpoint Sharepoint is downright awful. But I think part of my view is because it keeps being used for things here that I don't think it was designed for. Exacerbated by the fact that we currently have other tools that are designed for those things.

    Plus, I think the "developers" are "whatever random supervisor gets around to it", and no one tries to make sure everything stays organized and current.

    Tomanta on
  • Options
    urahonkyurahonky Registered User regular
    Also it's almost always slower than hell. Or is that just our Sharepoint server?

  • Options
    InfidelInfidel Heretic Registered User regular
    urahonky wrote: »
    Also it's almost always slower than hell. Or is that just our Sharepoint server?

    The recommended best practices for good performance SharePoint 2010 requires you building your own data center.

    OrokosPA.png
  • Options
    TomantaTomanta Registered User regular
    urahonky wrote: »
    Also it's almost always slower than hell. Or is that just our Sharepoint server?

    Ours is slow, but not unbearably so, most of the time. Unless there's a lot of entries on a single page, or it has to sort through a lot of entries.. Which there sometimes can be, since one of the things we use it for a ticketing system. (It simply refuses to try and filter our dispatch ticket page)

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Sharepoint is just bad, you really don't need to justify it. The entire idea is flawed at a pretty basic level...kind of like BizTalk. It's classic Microsoft really, over designed, heavy as shit, not really very good at the core problem it's trying to solve...but enough white papers and tech salesman to get your non-technical suits to buy in 100% and force it down your throat.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    Infidel wrote: »
    urahonky wrote: »
    Also it's almost always slower than hell. Or is that just our Sharepoint server?

    The recommended best practices for good performance SharePoint 2010 requires you building your own data center.

    I chuckled at this, and then realized you might be serious. O_O

  • Options
    InfidelInfidel Heretic Registered User regular
    Infidel wrote: »
    urahonky wrote: »
    Also it's almost always slower than hell. Or is that just our Sharepoint server?

    The recommended best practices for good performance SharePoint 2010 requires you building your own data center.

    I chuckled at this, and then realized you might be serious. O_O

    The deploy I was involved in, you needed at least 5 distinct servers for "baseline performance and availability" and you could add 4 more if you were going with the enhanced searching system.

    I think the effective minimum is 2 distinct servers but I wouldn't want to be working with those if something went wrong. :rotate:

    A lot of system dependencies and differences between servers means you need distinct installs, so virtualization comes in handy, but the resources are still pretty high demand per server. DLL/GAC issues will fuck you if you try to put too many of the SP server roles on one install, just like how installing MS Office on an Exchange Server used to break the Exchange Server. :rotate:

    OrokosPA.png
  • Options
    bowenbowen How you doin'? Registered User regular
    Wow, that is some massive overhead.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    Wow, that is some massive overhead.
    1Topology of the server farms

    Each server farm in the design sample is composed of five servers with the following topology:

    Two front-end Web servers

    One application server

    Two database servers, either clustered or mirrored

    http://technet.microsoft.com/en-us/library/cc261995.aspx

    Yeah, looks like I remember correctly!

    You add servers as needed if you want more performance, redundancy, or features (such as enterprise search).

    OrokosPA.png
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    This is Tim Douchens reporting for ABC 15 News. We're down at the mayors office today to hear his announcement that Sharepoint is "fucking terrible". We asked his press secretary if the mayor was going to reveal anything else, and she said "No, just that Sharepoint is fucking terrible, as the release says".

    We'll be back at six to report more.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    Lux782Lux782 Registered User regular
    bowen wrote: »
    GnomeTank wrote: »
    bowen wrote: »
    At least you're not refactoring whatever the fuck it is I'm refactoring. My god mix match of using statements and straight declarations and calling dispose manually.

    What the fuck kind of monster made this?

    What's wrong with calling dispose manually? :P Not everything can be wrapped in a using() clause.

    In this case, yes.

    It is litreally:
    MyClass obj = new MyClass(stuff);
    obj.PerformAction();
    while(obj.Results().Read())
    {
        //do more stuff
    }
    obj.Dispose();
    

    everywhere

    Why wouldn't they use the using() statement in such a situation?

  • Options
    bowenbowen How you doin'? Registered User regular
    Because they hate me. Or, they didn't know using existed. It was some old .NET 1.0 codeish that was ported to 2, then to 3, and now I have the blessing to refactor it!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited April 2012
    Even that's not an excuse, using was an original keyword, both as a scoped disposal construct and a namespace importer. It's been there since C#/.NET 1.0 beta, at the very least (that's when I first touched C#).

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    EtheaEthea Registered User regular
    Lux782 wrote: »
    bowen wrote: »
    GnomeTank wrote: »
    bowen wrote: »
    At least you're not refactoring whatever the fuck it is I'm refactoring. My god mix match of using statements and straight declarations and calling dispose manually.

    What the fuck kind of monster made this?

    What's wrong with calling dispose manually? :P Not everything can be wrapped in a using() clause.

    In this case, yes.

    It is litreally:
    MyClass obj = new MyClass(stuff);
    obj.PerformAction();
    while(obj.Results().Read())
    {
        //do more stuff
    }
    obj.Dispose();
    

    everywhere

    Why wouldn't they use the using() statement in such a situation?

    That is how I would write C# code as a C++ programmer without any research on what C# can do. That or I would do the nasty C++ version of
    using() by wrap the entire think in { } and allocate obj on the stack.

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I would use a smart pointer in C++ personally. Probably boost::scoped_ptr.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    EtheaEthea Registered User regular
    GnomeTank wrote: »
    I would use a smart pointer in C++ personally. Probably boost::scoped_ptr.

    In my mind overkill as you can easily see the scope. I would do
    MyClass* obj = new MyClass(stuff);
    obj.PerformAction();
    while(obj.Results().Read())
    {
      //do more stuff
    }
    delete obj;
    

    or
    { //scope obj for while loop only
      MyClass obj(stuff);
      obj.PerformAction();
      while(obj.Results().Read())
      {
        //do more stuff
      }
    }
    

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Ethea wrote: »
    GnomeTank wrote: »
    I would use a smart pointer in C++ personally. Probably boost::scoped_ptr.

    In my mind overkill as you can easily see the scope. I would do
    MyClass* obj = new MyClass(stuff);
    obj.PerformAction();
    while(obj.Results().Read())
    {
      //do more stuff
    }
    delete obj;
    

    or
    { //scope obj for while loop only
      MyClass obj(stuff);
      obj.PerformAction();
      while(obj.Results().Read())
      {
        //do more stuff
      }
    }
    

    The top one isn't even remotely exception safe. The bottom one I can kind of get behind, but the top one screams "use scoped_ptr", because of exception and long jump safety.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    Lux782Lux782 Registered User regular
    using(MyClass obj =MyClass(stuff))
    {
        obj.PerformAction();
        while(obj.Results().Read())
        {
        // do stuff
        }
    }
    

    I still don't like that...This appears to do lots of stuff. I would probably attempt to refactor it out more, potentially into its own class. You essentially have 2 actions you are doing. First you are doing something then you processing the results of that action.
    // calling code
    using(MyClassProcessor process = new MyClassProcessor(new MyClass(stuff))
        process.Run();
    
    class MyClassProcess : IDisposable
    {
        private MyClass myClass;
    
        public MyClassProcess(MyClass obj)
        {
            myClass = obj;
        }
    
        public void Dispose()
        {
            myClass.Dispose();
        }
    
        public void Run() {
            DoAction();
            ProcessResults();
        }
    
        private void DoAction();
        private void ProcessResults(); // If this is really complex it might be worth while breaking out into its own class
    }
    

    Probably could refactor out more stuff, if the pattern is repeated as often as you say, you may be able to abstract a lot of things out and get some good reuse out of it.


  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Use lambdas and generics to make it completely reusable. For instance, let them pass the "what happens when I run?" to the Run method as a System.Action.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    Lux782Lux782 Registered User regular
    GnomeTank wrote: »
    Use lambdas and generics to make it completely reusable. For instance, let them pass the "what happens when I run?" to the Run method as a System.Action.
    Yeah.

  • Options
    CantidoCantido Registered User regular
    Head First C# came in the mail today. So juvenile, but so perfect.

    3DS Friendcode 5413-1311-3767
  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    During my internship I had a guy complain when I was using lambdas because I was trying to "get fancy".

    I had several design disagreements with him, which is hard for me because I know my design skills are weak at best, so its hard to know when I'm talking to someone who knows better and when I'm talking to someone who is even worse.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Lambdas are only "getting fancy" to people who don't understand them or what they offer. Sounds to me like someone who grew up in a different era of programming and isn't comfortable with "new fangled" constructs.

    If his argument is that you can misuse them, the simple counter argument is that you can misuse anything.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    GnomeTank wrote: »
    Lambdas are only "getting fancy" to people who don't understand them or what they offer. Sounds to me like someone who grew up in a different era of programming and isn't comfortable with "new fangled" constructs.

    Yeah... those new fangled... lambdas.

    (I realize you no doubt know that's not the case, but I still felt it had to be mocked. :P)

  • Options
    TavTav Irish Minister for DefenceRegistered User regular
    Just a quick question about standards, what would acceptable usage of author tags in a college project? Every class or every method?

  • Options
    TofystedethTofystedeth Registered User regular
    Infidel wrote: »
    urahonky wrote: »
    Also it's almost always slower than hell. Or is that just our Sharepoint server?

    The recommended best practices for good performance SharePoint 2010 requires you building your own data center.

    I chuckled at this, and then realized you might be serious. O_O
    Yeah, Sharepoint works fine for us.

    But then, we have our own datacenter....

    steam_sig.png
  • Options
    TofystedethTofystedeth Registered User regular
    @Urahonky I know you're still Javaing this thing, but if you've been fighting with GUI stuff for a while, and are also trying out Python, the wxPython demo is pretty cool for a lark if nothing else. I don't know if you looked at it all, but it's just a program that has a sample of (I think) every widget, with some combinations of widgets, advanced uses of some, some grouped by recently added. And on each widget sample you can click a button to view the source code, and edit it right in the program and see your changes (or bugs) right there.

    steam_sig.png
  • Options
    KambingKambing Registered User regular
    Tav wrote: »
    Just a quick question about standards, what would acceptable usage of author tags in a college project? Every class or every method?

    The standards for a college project are what your instructor wants. In lieu of that, stick with the general practice which is by-class author tags. Although, you could debate about the usefulness/widespreadness of using that level of Javadoc in code to begin with.

    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
  • Options
    TavTav Irish Minister for DefenceRegistered User regular
    Kambing wrote: »
    Tav wrote: »
    Just a quick question about standards, what would acceptable usage of author tags in a college project? Every class or every method?

    The standards for a college project are what your instructor wants. In lieu of that, stick with the general practice which is by-class author tags. Although, you could debate about the usefulness/widespreadness of using that level of Javadoc in code to begin with.

    Nothing was specified by the lecturer, I just want my contribution to be very clear since some of the team members aren't really pulling their weight. However, I didn't want it to be obnoxious to whoever ends up correcting it.

  • Options
    KambingKambing Registered User regular
    Tav wrote: »
    Kambing wrote: »
    Tav wrote: »
    Just a quick question about standards, what would acceptable usage of author tags in a college project? Every class or every method?

    The standards for a college project are what your instructor wants. In lieu of that, stick with the general practice which is by-class author tags. Although, you could debate about the usefulness/widespreadness of using that level of Javadoc in code to begin with.

    Nothing was specified by the lecturer, I just want my contribution to be very clear since some of the team members aren't really pulling their weight. However, I didn't want it to be obnoxious to whoever ends up correcting it.

    I almost expect those kinds of tags to be ignored by your graders. If there really is a problem with team members not pulling their weight, I think the more prudent course of action is to contact the instructor directly and ask them how they expect you to deal with it. In my particular case, I usually tell students to try to work it out themselves and if there is a continued problem, to send me a private note along with their submission outlining where things broke down.

    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
  • Options
    TavTav Irish Minister for DefenceRegistered User regular
    Kambing wrote: »
    Tav wrote: »
    Kambing wrote: »
    Tav wrote: »
    Just a quick question about standards, what would acceptable usage of author tags in a college project? Every class or every method?

    The standards for a college project are what your instructor wants. In lieu of that, stick with the general practice which is by-class author tags. Although, you could debate about the usefulness/widespreadness of using that level of Javadoc in code to begin with.

    Nothing was specified by the lecturer, I just want my contribution to be very clear since some of the team members aren't really pulling their weight. However, I didn't want it to be obnoxious to whoever ends up correcting it.

    I almost expect those kinds of tags to be ignored by your graders. If there really is a problem with team members not pulling their weight, I think the more prudent course of action is to contact the instructor directly and ask them how they expect you to deal with it. In my particular case, I usually tell students to try to work it out themselves and if there is a continued problem, to send me a private note along with their submission outlining where things broke down.

    We already went to the lecturer, he said we were supposed to get on the backs on the guys who were doing no work (Which we tried and it didn't work) and that if we submit as good a project as we can and thoroughly document who did what work in our final report and in our code, we'll be graded accordingly.

  • Options
    KambingKambing Registered User regular
    Tav wrote: »
    Kambing wrote: »
    Tav wrote: »
    Kambing wrote: »
    Tav wrote: »
    Just a quick question about standards, what would acceptable usage of author tags in a college project? Every class or every method?

    The standards for a college project are what your instructor wants. In lieu of that, stick with the general practice which is by-class author tags. Although, you could debate about the usefulness/widespreadness of using that level of Javadoc in code to begin with.

    Nothing was specified by the lecturer, I just want my contribution to be very clear since some of the team members aren't really pulling their weight. However, I didn't want it to be obnoxious to whoever ends up correcting it.

    I almost expect those kinds of tags to be ignored by your graders. If there really is a problem with team members not pulling their weight, I think the more prudent course of action is to contact the instructor directly and ask them how they expect you to deal with it. In my particular case, I usually tell students to try to work it out themselves and if there is a continued problem, to send me a private note along with their submission outlining where things broke down.

    We already went to the lecturer, he said we were supposed to get on the backs on the guys who were doing no work (Which we tried and it didn't work) and that if we submit as good a project as we can and thoroughly document who did what work in our final report and in our code, we'll be graded accordingly.

    Sounds consistent then with what I would expect. By "thoroughly document", you probably want a separate text document outlining contributions because just @author tags alone won't necessarily convey what you want in a concise, easy-to-read manner.

    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
  • Options
    urahonkyurahonky Registered User regular
    @Urahonky I know you're still Javaing this thing, but if you've been fighting with GUI stuff for a while, and are also trying out Python, the wxPython demo is pretty cool for a lark if nothing else. I don't know if you looked at it all, but it's just a program that has a sample of (I think) every widget, with some combinations of widgets, advanced uses of some, some grouped by recently added. And on each widget sample you can click a button to view the source code, and edit it right in the program and see your changes (or bugs) right there.

    Yeah I'm currently using wxWidgets for C++ and quite enjoy it. Though some of their examples are way too complex for me being a beginner. However I will be looking at wxPython for GUI stuff to play around with.

This discussion has been closed.