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/

#define THREAD_TITLE "PA Programming Thread"

2456762

Posts

  • KrisKris Registered User regular
    edited May 2010
    Alright. So avoid with IIS6, easy with IIS7. Thanks guys! :D

    Kris on
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited May 2010
    Does the MVC framework set the URL rewriting up for you automatically? Or does it have some other kind of routing engine it installs at runtime?

    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
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited May 2010
    I severely doubt the MVC API's themselves will generate the rewrite rules. Not even Django will automatically create the URL schemes.

    It's possible that Visual Studio might auto-generate the web.config keys when you are generating your skeletons, I don't know, but what I do know is that the rules exist in the *.configs, and I didn't think they are writable at runtime.

    Jasconius on
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited May 2010
    No no, I don't mean it auto-generates the rules. Yes, you need to setup the re-writes in your web.config. My question was, does the MVC framework installer setup URL re-writing for IIS6? I am almost certain it does (and Visual Studio 2010 does it by default when you install it, as it has MVC2). I worded that horribly the first time.

    I am pretty sure the "Microsoft Web Server Installer", or whatever it's called, that installs the MVC framework in runtime environments sets up URL re-writing.

    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
  • MKRMKR Registered User regular
    edited May 2010
    I am an idiot

    e.URL

    It was right there.

    And now my feed reader is just about functional.

    MKR on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited May 2010
    GnomeTank wrote: »
    No no, I don't mean it auto-generates the rules. Yes, you need to setup the re-writes in your web.config. My question was, does the MVC framework installer setup URL re-writing for IIS6? I am almost certain it does (and Visual Studio 2010 does it by default when you install it, as it has MVC2). I worded that horribly the first time.

    I am pretty sure the "Microsoft Web Server Installer", or whatever it's called, that installs the MVC framework in runtime environments sets up URL re-writing.

    I thought that the plugin for it was a third party plugin. That was.. years ago though. Maybe they bought it.

    Jasconius on
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited May 2010
    Jasconius wrote: »
    GnomeTank wrote: »
    No no, I don't mean it auto-generates the rules. Yes, you need to setup the re-writes in your web.config. My question was, does the MVC framework installer setup URL re-writing for IIS6? I am almost certain it does (and Visual Studio 2010 does it by default when you install it, as it has MVC2). I worded that horribly the first time.

    I am pretty sure the "Microsoft Web Server Installer", or whatever it's called, that installs the MVC framework in runtime environments sets up URL re-writing.

    I thought that the plugin for it was a third party plugin. That was.. years ago though. Maybe they bought it.

    Well it may be entirely possible that MS just setups up routing for the MVC framework itself in II6. It may not be full URL re-writing, I'm not sure.

    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
  • ASimPersonASimPerson Cold... and hard.Registered User regular
    edited May 2010
    Hah, love the thread title.

    As the OP says, I program straight-C everyday. I guess I'm just not as terrified of the CPP as you guys. Then again, it sounds like in C++ it can really fuck things up.

    ASimPerson on
  • NightslyrNightslyr Registered User regular
    edited May 2010
    All I know about ASP.NET MVC is that it gives you some sort of route table you can modify. The default route is controller/method/arg1/arg2/.. You can add custom routes. I haven't seen anything else describing what, if anything, is being done by IIS to facilitate that behavior.

    Nightslyr on
  • jonxpjonxp [E] PC Security Registered User regular
    edited May 2010
    Hey new thread. My OP contribution post from the last thread:

    Language: Ruby
    Frameworks: Are for sissies, but Rails and Sinatra
    Purpose: Web Programming and Server Scripting

    Ruby is Perl for Human Beings. It has an extremely flexible syntax with incredibly powerful metaprogramming elements. While you can write Ruby code however you want, generally there is a "Ruby Way" to do something in an elegant manner. With everything truly being an object, one is able to really use the flexibility of OO to keep yourself DRY. With the heavy community emphasis on testing and the ability to easily fit into other agile practices, it has become quite popular with the whole Agile Development crowd.

    Rubygems is the standard way to package and distribute libraries for Ruby. Want to be able to parse json? It's just "gem install json". Very handy way to get your libraries easily.

    Rails is the behemoth MVC web framework that does everything. Yes, even that. It is great for getting an application up off the ground quickly, and provides all the tools you need to continue to grow it. It is *very* opinionated about how to do business, and if you follow along your life is super easy. While they aren't bad rules to follow, if you aren't used to working exactly the Rails way, you may find yourself uncomfortable.

    Sinatra is a super lightweight web framework that does nothing more than allow you to make an application that responds to web requests. It works well for light sites, services, or if you want to make your own framework.

    Further reading: Why's Poignant Guide to Ruby, Ruby on Rails 15-Minute Blog

    jonxp on
    Every time you write parallel fifths, Bach kills a kitten.
    3DS Friend Code: 2707-1614-5576
    PAX Prime 2014 Buttoneering!
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited May 2010
    Concerning Java: I just got an interesting lesson. It seems that calling System.gc() every time you orphan an object, deep inside a method you are bound to call 10,000 times or something is not helpful.

    Turns out, that's actually bad.

    Basically I was just assuming my algorithm was slow. Which it is! But I was thinking last night, I don't really know the cost of System.gc(). Maybe calling it 10,000 times is a bad idea? So I went looking on the internet and came across this article. It was interesting.

    I tried removing the gc() and a method that called the first one a user-configuable number times went for dirt slow to useable!

    p.s. That article is ~6yrs old. Also, I don't pretend to understand every sentence in that article, I'm still technically in my first year of programming classes.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • SenjutsuSenjutsu thot enthusiast Registered User regular
    edited May 2010
    Perl for human beings is a great description. Ruby's DSL-friendly, conversational syntax is right up my alley

    Senjutsu on
  • Apothe0sisApothe0sis Have you ever questioned the nature of your reality? Registered User regular
    edited May 2010
    So, do we like python or ruby better?

    Apothe0sis on
  • jonxpjonxp [E] PC Security Registered User regular
    edited May 2010
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Do you like screwdrivers or socket wrenches better? They are different tools for different jobs.

    jonxp on
    Every time you write parallel fifths, Bach kills a kitten.
    3DS Friend Code: 2707-1614-5576
    PAX Prime 2014 Buttoneering!
  • LoneIgadzraLoneIgadzra Registered User regular
    edited May 2010
    Concerning Java: I just got an interesting lesson. It seems that calling System.gc() every time you orphan an object, deep inside a method you are bound to call 10,000 times or something is not helpful.

    Turns out, that's actually bad.

    Basically I was just assuming my algorithm was slow. Which it is! But I was thinking last night, I don't really know the cost of System.gc(). Maybe calling it 10,000 times is a bad idea? So I went looking on the internet and came across this article. It was interesting.

    I tried removing the gc() and a method that called the first one a user-configuable number times went for dirt slow to useable!

    p.s. That article is ~6yrs old. Also, I don't pretend to understand every sentence in that article, I'm still technically in my first year of programming classes.

    You you definitely shouldn't be worried about calling the garbage collector manually without a very good reason. Generally the compiler (or in this case, the virtual machine) is smarter than you.

    LoneIgadzra on
  • LoneIgadzraLoneIgadzra Registered User regular
    edited May 2010
    jonxp wrote: »
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Do you like screwdrivers or socket wrenches better? They are different tools for different jobs.

    No fun, derailing a good flame war.

    I personally find Ruby very annoying because I'm not sure how the block syntax adds anything meaningful besides confusion to the language. I keep seeing all these hilarious tutorials extolling the virtues of code that sounds like a sentence, and I'm just not seeing it - the resemblance to a sentence that is. Looks just as unnatural as any other programming language to me. I do like symbols (though I wonder if other languages, like Python, have optimizations to make up for the lack thereof in dictionaries?) and its otherwise very straightforward manner though.

    Of course my main experiences with Ruby are various Rails tutorials that do a piss-poor job of explaining how Rails actually does what it does (just seems like typing some magic spells into the command line and poof - web site!) or mentioning the Rails idioms (calling methods sans parentheses and using dictionaries to simulate named parameters seems to be the name of the game, and is very confusing to a newcomer).

    Overall I prefer the minimal amount of syntax I need to remember to work with Python + named function parameters. I'm also in love with Django, because from the get-go it's very clear what's going on and what purpose the code you're writing serves, and it doesn't magically import a bunch of shit into every script (Cake I'm looking at you).

    LoneIgadzra on
  • Smug DucklingSmug Duckling Registered User regular
    edited May 2010
    jonxp wrote: »
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Do you like screwdrivers or socket wrenches better? They are different tools for different jobs.

    Not really. Ruby on Rails and Python with Django are very comparable, for example. And plain ruby and plain python could be used for a lot of the same types of scripting jobs.

    Smug Duckling on
    smugduckling,pc,days.png
  • ASimPersonASimPerson Cold... and hard.Registered User regular
    edited May 2010
    Concerning Java: I just got an interesting lesson. It seems that calling System.gc() every time you orphan an object, deep inside a method you are bound to call 10,000 times or something is not helpful.

    Turns out, that's actually bad.

    Basically I was just assuming my algorithm was slow. Which it is! But I was thinking last night, I don't really know the cost of System.gc(). Maybe calling it 10,000 times is a bad idea? So I went looking on the internet and came across this article. It was interesting.

    I tried removing the gc() and a method that called the first one a user-configuable number times went for dirt slow to useable!

    p.s. That article is ~6yrs old. Also, I don't pretend to understand every sentence in that article, I'm still technically in my first year of programming classes.

    You you definitely shouldn't be worried about calling the garbage collector manually without a very good reason. Generally the compiler (or in this case, the virtual machine) is smarter than you.

    Yeah, I'm not sure how you found that function MonkeyBallWarrior or what gave you the idea it was a good thing to use!

    ASimPerson on
  • SenjutsuSenjutsu thot enthusiast Registered User regular
    edited May 2010
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Personally? Ruby. Python does a few things that irritate the every-living shit out of me.

    But it's mostly down to personal taste. They're closely comparable and I wouldn't say one is objectively much better than the other for most tasks.

    Senjutsu on
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited May 2010
    I prefer Ruby, but it's completely personal preference. There's no metric that makes it better for my uses, I'm just comfortable with it.

    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
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited May 2010
    ASimPerson wrote: »
    Hah, love the thread title.

    As the OP says, I program straight-C everyday. I guess I'm just not as terrified of the CPP as you guys. Then again, it sounds like in C++ it can really fuck things up.

    The issue with the PP in C++ is that it's completely type-unsafe, and leads to incredibly bad code re-use habits.

    In C, where type-safety is an illusion anyway (hi void*), and code re-use is harder to model well (not impossible, but harder), macros make a lot more sense.

    (Note, when I say the PP here, I am talking specifically about complex macros, not #includes and conditional compilation flags).

    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
  • LittleBootsLittleBoots Registered User regular
    edited May 2010
    jonxp wrote: »
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Do you like screwdrivers or socket wrenches better? They are different tools for different jobs.

    Screwdrivers of course, because not only are they a handy tool but they're are a pretty good mixed drink as well.

    LittleBoots on

    Tofu wrote: Here be Littleboots, destroyer of threads and master of drunkposting.
  • HalibutHalibut Passion Fish Swimming in obscurity.Registered User regular
    edited May 2010
    But a socket wrench is so much more elegant. It's basically the strategy pattern for the real world.

    Halibut on
  • jonxpjonxp [E] PC Security Registered User regular
    edited May 2010
    Obviously you've never seen my hammer.
    :winky:

    jonxp on
    Every time you write parallel fifths, Bach kills a kitten.
    3DS Friend Code: 2707-1614-5576
    PAX Prime 2014 Buttoneering!
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited May 2010
    So this code totally works:
    /**
    	 * Utility method.  Adds two numbers as Strings
    	 * @param x, y - Things to add
    	 * @return The sum of x and y
    	 */	
    	private static String stringAdd(String x, String y){
    		//make them the same length
    		int diff = x.length() - y.length();
    		if (diff > 0){ //x is longer than y
    			while (diff != 0){
    				y = "0" + y;
    				diff--;
    			}
    		} else if (diff < 0){
    			while (diff != 0){
    				x = "0" + x;
    				diff++;
    			}
    		} //else they are the same length
    		String answer = "";
    		boolean carry = false;
    		for (int i = (y.length() - 1); i >= 0; i--){
    			int sum = Integer.parseInt("" + x.charAt(i)) + Integer.parseInt("" + y.charAt(i));
    			if (carry){sum++;}
    			if (sum >= 10){
    				answer = (sum - 10) + answer;
    				carry = true;
    			} else {
    				answer = sum + answer;
    				carry = false;
    			}
    		}
    		if (carry){answer = "1" + answer;}
    		return answer;
    	}
    

    However, the line:
    int sum = Integer.parseInt("" + x.charAt(i)) + Integer.parseInt("" + y.charAt(i));
    Seems like I should be able to do that in a better way. Using some awesome magic method that i'm not aware of.

    Basically converting chars into int's normally turns them into ints that aren't at all what number they represent, but rather something completely different. I suspect it's their ordering in ASCII or Unicode or something.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Michael HMichael H Registered User regular
    edited May 2010
    I have a career-related question that's long and kind of rambly, so I'll put it in a spoiler tag so people can bypass it if they wish.
    I work for a Fortune 500 company in Milwaukee that, like lots of places, has had a rough couple of years. I work in Engineering, specifically doing lots of lab work. When I joined five years ago out of college, it was one of THE places to work in Milwaukee. People were beating down the doors because it was a great place to work and had awesome benefits. I was able to get in and since then it's been a downhill ride. Benefits have gotten cut, insurance has gotten cut, and we've had four major rounds of layoffs. I've made it this far, but I'm fairly sure that more jobs cuts are coming and statistics are less and less on my side.

    I'm not a programmer by title, but when projects come up that require programming I'm one of the two guys in the department that gets assigned. These projects have involved VB, VBA, and Matlab. My primary job is not being a programmer, it's to acquire data and perform testing. The programming side of it, however, has taken up more than 50% of my job in the last several months as I get more and more things to work on.

    What I'm working on is not "pro level" programming by any stretch of the imagination. (One might even label me a "faux-grammer".) I'm using VB6, for crying out loud, because we just migrated to XP from 2000 and IS won't give me Visual Studio or the ability to work in .NET. I've written and deployed a few executables that are used department wide, and done lots of VBA work to support the various tools we use. My largest project has only been about 1000 lines of code total. (Not that that really means anything except that I'm doing a little more than macros for sorting lists.) But, all in all, I've had to work with deadlines, support the users, and manage my projects. Schoolwise, I have taken college classes in VB and C++.

    THE QUESTION: Based on what I do, would I be totally living in dream world if I tried looking for jobs as a programmer? The writing is on the wall that it might be time to shop around, and even though I like where I work I feel like it just might be time to move on. To me, programming would be a great new challenge and something I've always wanted to do, but I feel like if I applied with my current level of programming experience I would get laughed out of an interview.

    Michael H on
  • quietjayquietjay Indianapolis, INRegistered User regular
    edited May 2010
    So this code totally works:
    /**
    	 * Utility method.  Adds two numbers as Strings
    	 * @param x, y - Things to add
    	 * @return The sum of x and y
    	 */	
    	private static String stringAdd(String x, String y){
    		//make them the same length
    		int diff = x.length() - y.length();
    		if (diff > 0){ //x is longer than y
    			while (diff != 0){
    				y = "0" + y;
    				diff--;
    			}
    		} else if (diff < 0){
    			while (diff != 0){
    				x = "0" + x;
    				diff++;
    			}
    		} //else they are the same length
    		String answer = "";
    		boolean carry = false;
    		for (int i = (y.length() - 1); i >= 0; i--){
    			int sum = Integer.parseInt("" + x.charAt(i)) + Integer.parseInt("" + y.charAt(i));
    			if (carry){sum++;}
    			if (sum >= 10){
    				answer = (sum - 10) + answer;
    				carry = true;
    			} else {
    				answer = sum + answer;
    				carry = false;
    			}
    		}
    		if (carry){answer = "1" + answer;}
    		return answer;
    	}
    

    However, the line:
    int sum = Integer.parseInt("" + x.charAt(i)) + Integer.parseInt("" + y.charAt(i));
    Seems like I should be able to do that in a better way. Using some awesome magic method that i'm not aware of.

    Basically converting chars into int's normally turns them into ints that aren't at all what number they represent, but rather something completely different. I suspect it's their ordering in ASCII or Unicode or something.

    Use the GetNumericValue method:
    int sum = Character.GetNumericValue(x.charAt(i))+Character.GetNumericValue(y.charAt(i));

    Or you could subtract the character '0'. Since the Unicode digits for '0' through '9' are consecutive, '1' - '0' is 1:

    int sum = x.charAt(i)-'0'+y.charAt(i)-'0';

    quietjay on
    Become a Star Citizen
  • SenjutsuSenjutsu thot enthusiast Registered User regular
    edited May 2010
    You would need to start upgrading your skills at home -- pick up a modern language and framework, and do some serious programming on your own time. Working primarily in VB and your "largest" project being barely 1000 lines likely means you have a lot of learning and unlearning to do.

    But, on the plus side, this industry has appalling standards, so you probably could find a programming job with your current skills. But to be a good developer and get a good job you probably have quite a lot of work ahead of you.

    Senjutsu on
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited May 2010
    quietjay wrote: »
    Or you could subtract the character '0'. Since the Unicode digits for '0' through '9' are consecutive, '1' - '0' is 1:

    int sum = x.charAt(i)-'0'+y.charAt(i)-'0';

    Oh I really like that one.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • ASimPersonASimPerson Cold... and hard.Registered User regular
    edited May 2010
    quietjay wrote: »
    Or you could subtract the character '0'. Since the Unicode digits for '0' through '9' are consecutive, '1' - '0' is 1:

    int sum = x.charAt(i)-'0'+y.charAt(i)-'0';

    Oh I really like that one.

    It's nice and all (though not sure I would do it that way in Java) but you do understand why it works, right?

    ASimPerson on
  • Apothe0sisApothe0sis Have you ever questioned the nature of your reality? Registered User regular
    edited May 2010
    ASimPerson wrote: »
    quietjay wrote: »
    Or you could subtract the character '0'. Since the Unicode digits for '0' through '9' are consecutive, '1' - '0' is 1:

    int sum = x.charAt(i)-'0'+y.charAt(i)-'0';

    Oh I really like that one.

    It's nice and all (though not sure I would do it that way in Java) but you do understand why it works, right?
    I would also add that while it's not entirely uncommon and I can't think of a course at uni that didn't have some lab work that didn't rely on a property like this (see also upper and lowercase letters), I find it uncomfortably close to using magic numbers - in this case, it isn't necessarily such a thing because IIRC it's a property of the Unicode standards.

    It's also a little hard, or confusing to read (not excessively so). Sure, it's short to type, but you're sacrificing clarity for brevity. It's only a minor thing in a project such as this but it's a good idea to get into a habit of writing clear code, rather than the code that takes the fewest number of keystrokes.

    Apothe0sis on
  • Apothe0sisApothe0sis Have you ever questioned the nature of your reality? Registered User regular
    edited May 2010
    Senjutsu wrote: »
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Personally? Ruby. Python does a few things that irritate the every-living shit out of me.

    But it's mostly down to personal taste. They're closely comparable and I wouldn't say one is objectively much better than the other for most tasks.

    I would like to know these things.

    My python experience greatly outweighs my ruby experience.

    Apothe0sis on
  • SeolSeol Registered User regular
    edited May 2010
    Apothe0sis wrote: »
    ASimPerson wrote: »
    quietjay wrote: »
    Or you could subtract the character '0'. Since the Unicode digits for '0' through '9' are consecutive, '1' - '0' is 1:

    int sum = x.charAt(i)-'0'+y.charAt(i)-'0';

    Oh I really like that one.

    It's nice and all (though not sure I would do it that way in Java) but you do understand why it works, right?
    I would also add that while it's not entirely uncommon and I can't think of a course at uni that didn't have some lab work that didn't rely on a property like this (see also upper and lowercase letters), I find it uncomfortably close to using magic numbers - in this case, it isn't necessarily such a thing because IIRC it's a property of the Unicode standards.

    It's also a little hard, or confusing to read (not excessively so). Sure, it's short to type, but you're sacrificing clarity for brevity. It's only a minor thing in a project such as this but it's a good idea to get into a habit of writing clear code, rather than the code that takes the fewest number of keystrokes.
    There's also the issue that it won't complain if you give it non-numeric symbols: it'll just give you a nonsense answer, which could make bugs harder to detect.

    Seol on
  • clsCorwinclsCorwin Registered User regular
    edited May 2010
    Quick question about databases and serializability.

    Am I only allowed to swap non-conflicting transaction, or can I shuffle anything everywhere?

    clsCorwin on
  • KyanilisKyanilis Bellevue, WARegistered User regular
    edited May 2010
    So programming has always been something I'm into. I've taken classes, looked at a lot of stuff on my own, etc. However I still feel like I have like 0 experience under my belt, which is the case. I always quit partway through a project and I want to stop doing that. My language of choice is C#. I'm wondering are there any resources for I guess, intermediate concepts? I know the basics and have worked with other languages, but never really getting past what you'd find in most intro to books. I guess what might be the most useful is maybe a list of ideas that would be a learning exercise for someone who knows the concepts, but just hasn't put it into enough practice.

    I'm willing to put in the time to learn new things, that's not the issue, it's just my own ideas tend to either be too easy or too daunting.

    Kyanilis on
  • MKRMKR Registered User regular
    edited May 2010
    Kyanilis wrote: »
    So programming has always been something I'm into. I've taken classes, looked at a lot of stuff on my own, etc. However I still feel like I have like 0 experience under my belt, which is the case. I always quit partway through a project and I want to stop doing that. My language of choice is C#. I'm wondering are there any resources for I guess, intermediate concepts? I know the basics and have worked with other languages, but never really getting past what you'd find in most intro to books. I guess what might be the most useful is maybe a list of ideas that would be a learning exercise for someone who knows the concepts, but just hasn't put it into enough practice.

    I'm willing to put in the time to learn new things, that's not the issue, it's just my own ideas tend to either be too easy or too daunting.

    C# 3.0 in a Nutshell has been great for me. It's more of a reference than a guide, but it's good about explaining things in clear detail.

    You could do like I did. I made a DNS client, then built an HTTP client on top of that, then built a feed reader on top of that.

    MKR on
  • WeretacoWeretaco Cubicle Gangster Registered User regular
    edited May 2010
    Who wants to write user docs for me!

    I know someone does. please...


    I hate writing docs so much :(

    Weretaco on
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • Dead ComputerDead Computer __BANNED USERS regular
    edited June 2010
    So don't write them.

    Dead Computer on
  • SenjutsuSenjutsu thot enthusiast Registered User regular
    edited June 2010
    Apothe0sis wrote: »
    Senjutsu wrote: »
    Apothe0sis wrote: »
    So, do we like python or ruby better?

    Personally? Ruby. Python does a few things that irritate the every-living shit out of me.

    But it's mostly down to personal taste. They're closely comparable and I wouldn't say one is objectively much better than the other for most tasks.

    I would like to know these things.

    My python experience greatly outweighs my ruby experience.

    Off the top of my head:

    - The scoping: used to be beyond retarded. Long since fixed, but I dealt with python extensively when it had the old rules and it left a bad taste in my mouth. I ended up becoming a Perl guy because of its shitty scoping, at the time.

    - The underscores errywhere: __foobar__ is ugly as hell and a pain to type.

    - The lack of blocks: hurts DSL support hugely, and I'm a huge fan of DSLs. It's also weird about closures, its list comprehensions are fairly limited, and in general its support for functional paradigms is half-assed and bolted on.

    - From above: Reasonably hostile to functional programming styles in favor of imperative. More or less a product of the There's Only One Way To Do It philosophy.

    - Lack of conditional postfixes. sometimes it's really nice to say "x = 10 if y > 3" rather than spit out a multi-line conditional.

    - The lack of proper private, protected, etc visibility declarations. Yeah, you can use two underscores (ugh). Which gives you a shitty exception about the method not existing (double ugh). In 2.6 or 3 you can mark private with annotations, which I also don't like (see next item).

    - The @whatever annotations. Too many bad flashbacks to enterprise Java development.

    - The whitespace thing. Yeah, any good programmer indents anyway. I still hit way more copy-paste problems than not having to type "end" is worth.

    - Regexps aren't a true language construct. I don't like passing a string to re.search as much as /[foo]/ being a first-class language construct.

    - Mandatory ()'s errywhere. Hostile to DSLs, but DSLs are a product of a TMTOWTDI philosophy, and I fundamentally don't like the Python community's hostility to TMTOWTDI.

    - Explicit self in method defs: A Modula-2-ism that Guido picked up. It should have died with Modula-2. Waste of typing.

    - super() is super broken: see here. It's wayyy too easy to end up in a very confusing place trying to use what should be a very simple mechanism.

    - single item in a tuple syntax: (1,). Seriously, this is ridiculous and not even "pythonic".

    But, again, it's not a bad language and I don't mean to offend its fans. It's just not for me in the way that Ruby is.

    Senjutsu on
  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    edited June 2010
    Anyone working with F#?

    I'm loving it. It very quickly cuts off the horrible OO-abominations at the knees that all our FEs used to write. Yeah for non-mutable analytical code.

    Kakodaimonos on
This discussion has been closed.