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'

18485878990100

Posts

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Yes, you have vbproj and csproj. When adding a new item, make sure you are selecting from the Visual Basic language list and not the C# one. They will have similar items.

    Also, Visual Studio is trying to save you from your horrible mistake. It knows better.

    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
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    edited May 2012
    I always thought it was the contents of the project file, because you'll get stuff like <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> in it

    Phyphor on
  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Sure enough it is loading a csproj file... No idea why.

  • Options
    bowenbowen How you doin'? Registered User regular
    The solution may have csproj in a similar fashion to what phyphor is saying.
    Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "test_vb_app", "test_vb_app\test_vb_app.vbproj", "{31043FC6-6DB1-4019-BFBB-FE74511E2EDB}"
    

    vs
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VFS", "VFS\VFS.csproj", "{2D957064-3E8B-44D5-BB76-1A9551863EBF}"
    

    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
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    Nobody, either here or in my class's forum, has commented on my naive-bayes python script. Is it understandable? Did I use lambdas appropriately or am I overusing them?

    I'm really close to graduating and yet I sort of wish I had another class where we basically just code stuff and then have someone who knows what they are doing tear into it. We had a course very early called Programming Practicum that was basically this, but it was also very much Object Oriented Design Review. Like "What is the difference between overriding and overloading" stuff. But I have learned an absurd amount of stuff since then!

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    bowenbowen How you doin'? Registered User regular
    Here's what I would say to you MBW: What is the practicality? Could you have done this better?

    Outside of academia, coding is a vastly different game. Implementing predetermined algos like that, you're pretty much just measuring ease of reuse, efficiency, and correctness. Not much I can say or not say about it, looks okay from a code-reader's perspective and I know beans all python at the moment.

    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
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited May 2012
    The practicality is not so high because this sort of thing is generally done on large datasets in a database, so I sort of doubt Python would be the language for large dataset crunching. I guess it is mostly useful for getting the algorithm straight in my head, or if this was a real project, prototyping it before implementing a real application.

    Now that I look at it again I might be looping over the dataset more than nessicary, which with tiny little csv's doesn't matter but in the real world would be catastrophic.

    My complaint about not getting enough constructive criticism in school still stands.

    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
  • Options
    bowenbowen How you doin'? Registered User regular
    edited May 2012
    You learned one of the most valuable programming lessons, implement first, optimize later.

    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
    Also just upgraded to lion and updated xcode... yowza is 4.X far better than 3.X Feels like I'm in visual studio now.

    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
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    Did you see this bowen? I thought the idea was pretty cool, but idk much about mac/iStuff coding.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    EtheaEthea Registered User regular
    The practicality is not so high because this sort of thing is generally done on large datasets in a database, so I sort of doubt Python would be the language for large dataset crunching. I guess it is mostly useful for getting the algorithm straight in my head, or if this was a real project, prototyping it before implementing a real application.

    Now that I look at it again I might be looping over the dataset more than nessicary, which with tiny little csv's doesn't matter but in the real world would be catastrophic.

    My complaint about not getting enough constructive criticism in school still stands.

    I have only been coding for about 5 years after graduating but I rarely have any developer comment on the code I write. I feel that for the majority of developers
    the only critic you will ever have a conversation with is yourself when you review your own code when you have to fix a bug later on. As long as you are keep trying
    to be a better developer I expect your code is above average in quality.


  • Options
    bowenbowen How you doin'? Registered User regular
    edited May 2012
    Did you see this bowen? I thought the idea was pretty cool, but idk much about mac/iStuff coding.

    No I did not, but thanks, that appears to be sexy.

    I couldn't stomach the monotouch stuff, but this looks neat.

    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
    IncindiumIncindium Registered User regular
    Ethea wrote: »
    The practicality is not so high because this sort of thing is generally done on large datasets in a database, so I sort of doubt Python would be the language for large dataset crunching. I guess it is mostly useful for getting the algorithm straight in my head, or if this was a real project, prototyping it before implementing a real application.

    Now that I look at it again I might be looping over the dataset more than nessicary, which with tiny little csv's doesn't matter but in the real world would be catastrophic.

    My complaint about not getting enough constructive criticism in school still stands.

    I have only been coding for about 5 years after graduating but I rarely have any developer comment on the code I write. I feel that for the majority of developers
    the only critic you will ever have a conversation with is yourself when you review your own code when you have to fix a bug later on. As long as you are keep trying
    to be a better developer I expect your code is above average in quality.

    If you care that much about things you'll probably more likely be in the role of the person bitching about shitty code from a former colleague that you now have to support/fix...

    steam_sig.png
    Nintendo ID: Incindium
    PSN: IncindiumX
  • Options
    bowenbowen How you doin'? Registered User regular
    Hey I've done 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
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    So far most of my real world experience as it pertains to other's work has been less "This code is crap" and more "How the hell am I supposed to understand this, there's no documentation and barely any comments".

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    bowenbowen How you doin'? Registered User regular
    And that's when you start from the beginning... oh god the memories.

    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
    Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Nobody, either here or in my class's forum, has commented on my naive-bayes python script. Is it understandable? Did I use lambdas appropriately or am I overusing them?

    In almost al the cases you've used map+lambdas to construct lists I would use a list comprehension. I find them easier to read, especially when you've got something like
    sum(map(lambda x: (x-avg)**2, dataAsFloats))/(len(dataAsFloats) - 1)
    
    which would turn into
    sum([(x-avg)**2 for x in dataAsFloats])/(len(dataAsFloats) - 1)
    
    I find Pythons lambda syntax a bit verbose and the list comprehension syntax more concise.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Python's lambda syntax is annoying. Lambda syntax should be super light, as little as possible to express the concept meaningfully.

    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
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    I have to admit, I never really understood list comprehension, so I didn't think to do it that way. That's much cleaner.

    Also yes I very much prefer C#'s => lambda operator.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    jackaljackal Fuck Yes. That is an orderly anal warehouse. Registered User regular
    edited May 2012
    VB.Net's lambda syntax is pretty lol-sy.
    Dim sorted = customers.Orderby(Function (x) x.LastName)
    or for multiline
    Dim sorted = customers.Orderby(Function (x)
            x.LastName
       End Function)
    

    but eh, at least it has lambdas.

    In one of the first Python books I read (or I guess tried to read) the author was going over keywords and for lambda he said something like, "I don't know why this is in the language. It seems useless." I set the book down and walked away slowly.

    jackal on
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Oh dear. How to write a Python book without knowing anything about Python; Next episode at 11.

    Ruby has decent executable block syntax as well, though it has this oddity of differentiating between a proc and a lambda, which creates untold confusion in new Ruby programmers.

    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
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Anyone know of a good place to find simple, nice looking, CSS based layouts for sites? I need something just really basic and elegant, probably two column, and I'd like it to be CSS layout.

    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
    Would Twitter Bootstrap work for you, @GnomeTank?

    It's bootstrappy! And pretty awesome! I just built a whole site for my company using that.

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I have not heard of this thing until now. I am not even entirely sure what it is. It looks awesome, but I am trying to figure out how to even use it.

    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
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Ohhhhhhhhhhhhhhhhhhh. I get it now. That is fucking amazing. it's exactly what I wanted actually. I just want to work on some awesome back end Ruby code, I don't want to fuck with a good layout. This gives me exactly what I want, plus jQuery, since I plan to do a lot of ajax.

    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
    Yeah, it really is awesome. I hate CSS and web-design so finding that was the equivalent of a god-send.

    There's so much cool stuff embedded in there, from the nice tables to the image-set it comes with, all the way to the cool JS/AJAX stuff it'll do. The grid stuff is so simple but so awesome. It all makes sense, which is saying something for a web-library. :wink:

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    So it seems like when you just DL it raw, it's just all the stuff it does slammed in to single files. All the examples use it in a different way though, which makes it slightly annoying :P I guess I could DL it using customize and get the individual components.

    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
    Jimmy KingJimmy King Registered User regular
    GnomeTank wrote: »
    So it seems like when you just DL it raw, it's just all the stuff it does slammed in to single files. All the examples use it in a different way though, which makes it slightly annoying :P I guess I could DL it using customize and get the individual components.
    That's what I did. I just downloaded it, loaded the css in one of my web pages, and looked to see what looked different. Then started tweaking. I really need to just start from scratch now that I understand how it works, though.

    You guys should also have a look at bootswatch.com. They've got a bunch of themes that are fairly nice looking using bootstrap for free and of course they also run a paid theme site, but I like several of the free ones better than most of the ones they charge for.

  • Options
    HalibutHalibut Passion Fish Swimming in obscurity.Registered User regular
    New project at work is moving away from Struts 1.x, and towards Spring MVC. Thank God! I'm almost as happy as the day they upgraded to a (somewhat) recent version of their app server so we could start migrating to Java 1.5.

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    Bootstrap is literally the best CSS "framework" ever written.

    It is beyond doubt.

  • Options
    InfidelInfidel Heretic Registered User regular
    I shall have to mess with bootstrap on a project someday.

    OrokosPA.png
  • Options
    Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    I have to admit, I never really understood list comprehension, so I didn't think to do it that way. That's much cleaner.

    Also yes I very much prefer C#'s => lambda operator.

    On another issue, which is highly stylistic choice by me, is that instead of:
        if dataLine[wanted] in classes:
            classes[dataLine[wanted]].append(dataLine)
        else:
            classes[dataLine[wanted]] = [dataLine]
            probFuncs[dataLine[wanted]] = {}
    
    I'd do
        try:
            classes[dataLine[wanted]].append(dataLine)
        except KeyError:
            classes[dataLine[wanted]] = [dataLine]
            probFuncs[dataLine[wanted]] = {}
    
    Because I'm a "It's better to seek forgiveness than ask for permission" kind of guy. Especially in Python where exceptions are 'first class' control flow constructs (by that I mean library methods raise Exception rather than return error codes) and in your case where it looks like the appending will happen a lot more often than the creation of new entries so the exception way will be more efficient.

    You could also do
    variable = classes.get(dataLine[wanted],[])
    variable.append(dataLine)
    if len(variable) == 1:
        probFuncs[dataLine[wanted]] = {}
    
    Orrrrrrrrrrrrr
    
    variable = classes.get(dataLine[wanted],[])
    if not variable:
        probFuncs[dataLine[wanted]] = {}
    variable.append(dataLine)
    

    But that doesn't super help anything much. The get method of a dictionary returns the second argument if the key isn't present. And an empty list evaluates to False


    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • Options
    DrunkMcDrunkMc Registered User regular
    So I'm usually a JAVA whore. Love it. I could write a web crawler in that, but, what language would you guys suggest I write one in?

  • Options
    jackaljackal Fuck Yes. That is an orderly anal warehouse. Registered User regular
    I'm being told to work on a legacy VB6 app. If I post my address will someone come over and kill me? Something quick and painless would be nice, but I'm not picky.

  • Options
    bowenbowen How you doin'? Registered User regular
    jackal wrote: »
    I'm being told to work on a legacy VB6 app. If I post my address will someone come over and kill me? Something quick and painless would be nice, but I'm not picky.

    No I want you to suffer.

    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
    DrunkMc wrote: »
    So I'm usually a JAVA whore. Love it. I could write a web crawler in that, but, what language would you guys suggest I write one in?

    C# might not be a bad place to start to move you away from Java.
    :rotate:

    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
    Jimmy KingJimmy King Registered User regular
    DrunkMc wrote: »
    So I'm usually a JAVA whore. Love it. I could write a web crawler in that, but, what language would you guys suggest I write one in?
    Python or Scala. Python is going to be easier if you're going to do anything more than a super simple, naive inspection of the data on the page due to being more mature (well, I'm sure there's a good java lib for it you can use in scala, but that sort of defeats the point) but I've written basic crawlers in both and doing one a concurrent one using actors in scala was cool/interesting exercise.

    Or Perl, because the world needs more Perl.

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I have to say, Twitter Bootstrap and jQuery have made getting this Diablo 3 crafter net up really easy. I am doing it as a quick and dirty project for the Diablo 3 thread. Really I've just been looking for an excuse to do a small, easy to finish, RoR project.

    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
    InfidelInfidel Heretic Registered User regular
    Jimmy King wrote: »
    DrunkMc wrote: »
    So I'm usually a JAVA whore. Love it. I could write a web crawler in that, but, what language would you guys suggest I write one in?
    Python or Scala. Python is going to be easier if you're going to do anything more than a super simple, naive inspection of the data on the page due to being more mature (well, I'm sure there's a good java lib for it you can use in scala, but that sort of defeats the point) but I've written basic crawlers in both and doing one a concurrent one using actors in scala was cool/interesting exercise.

    Or Perl, because the world needs more Perl.

    This is totally a job for PERL!

    OrokosPA.png
  • Options
    bowenbowen How you doin'? Registered User regular
    ... and regular expressions.

    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
This discussion has been closed.