Quote:
Originally Posted by well named
There's maybe a difference between people writing C# for ASP.NET stuff (more likely to come from having uses VB ASP in the past?) and people writing non-web apps? For example I've worked on a C# client that's not ASP for 6? years or so and I have no idea what repeaters, asp<tab><tab>, or lineviews are.
Yeah, this could be part of it. I think one of the short-comings of ASP is that it attempts to do so much for you and that ultimately abstracts the functionality away from you, so it can be quite difficult to envision what is happening or how it happens. I just wrote something yesterday and I still don't understand why it worked, I just know that it does work if type x here and y there. While it's sort of good in the sense that you can write some powerful stuff with ease, it can be bad because one little misstep creates massive hard-to-find bugs and sometimes figuring what you really do or do not can be a shot in the dark.
I'm getting a lot better at the rhythm of C#. I'm approaching the engineering strictly bottom-up. It is for this reason that the advice can be confusing and all over the place, assuming that many people likely try to go top-up / bottom down.
The asp<tab><tab> comment is basically the auto-fill capabilities:
Code:
<asp:Button ID="" runat="server">
I'm still kind of off-kilter about the tab-completion stuff. Grant it, I don't want to write more than I have to, but it's still a bit strange to me. As you are aware, some of those function names are looooonnng.
Quote:
Although it seems like around here the trend is basically that the C# codebase looks more and more like it was written by java developers, except for all the LINQ stuff
I guess it wouldn't shock me if the superstars of open source are in general better programmers than your average corporate c# developer though (i.e me :P)
LINQ seems to be where its at. Every .net C# book I've looked at lately spends about 50% of their time writing about how to use LINQ. Unfortunately, we aren't using LINQ.
Not sure what the "correct" style of C# coding is yet. The boss has pretty much let me have free reign to struggle and mess up. Mostly, I just ask questions about various approaches, but he really hasn't given me many answers, so he hasn't seen much of my code. He did send me some code he wrote before for guidance on an issue I had. Aside from one thing I totally disagree with, I don't see any real difference between what I wrote and what he wrote, though there are some things I do differently.
I should have been a little less contentious on my coder-quality commentary. I didn't really mean to suggest that C# / Java coders are bad programmers. I was just exploring the possibility that the spilled-ink may have some truth.
Quote:
Originally Posted by Neil S
Drupal's problem isn't the learning curve, it's that it's overengineered and underfeatured in its core.
The results are the Drupal version of DLL Hell, and a reliance on third party plugins documented in broken English.
I've not bothered to look at the source, so I'll take your word for it.
Quote:
Originally Posted by e i pi
set up your poker bot so it can play itself. then alter the strategy slightly on one of the bots like having it check raise and barrel every oesd if the board doesn't pair but fold to aggression unless given direct pot odds. simulate a hundred million hands or so and have it output the data. run some stats on the data to find the EV and variance of the hyper aggro strategy vs your bot and post results.
My first thought was to transcribe the poker bot, but I'm not too keen on doing that at this moment. It makes no sense to rewrite something that isn't even deployed to Average Joe yet. In fact, getting it ready to run on a browser is one of the things I would like to do during this time off, so I don't think I'll have time to rewrite the entire thing to C#.
I ended up with about 500 LOC of C# + 200 LOC of ASP at the end of this week (I guess i really wrote 1500?). When I told the boss he said that was about right. Had I wrote what I wrote this week in Clojure, it would be ~100 LOC and that would take care of the front and back end. Considering the bot is about 450 LOC, I'm a tad concerned.
The plus is that I would learn the C# style of using getters and setters, some stuff about OO design, and a bit more about its data-types. I'm still on the fence about it.
Quote:
Originally Posted by Shoe Lace
Dave, try to reproduce some of the 6.00x psets in c# and make them web capable? Maybe use the web aspect of .net to build an api server that lets you play hangman, then code up the UI with html5 stuff?
Or if you're feeling adventurous try to build a native windows app and learn the win32 api. I fooled around with c# once and wrote a helper tool for a game I used to play. It was a fun experiment to learn a bit about .net. It was really rewarding when I finally got a rect of a directx game drawn into my app's form while being zoomed in by x amount.
This is a good idea, I think. It'll cover all the little things that I'd want to cover and it shouldn't take that long. Don't think I have quite enough time to dive in win32 right now, but I will do that later.