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/

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

194969899100

Posts

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Dealing with the various ways Rails and jQuery can interact is....interesting. I finally figured that if I want to respond in format :js, versus :json, my form/anchor need to have the HTML5 data-type data selector set to "script" for the resulting JavaScript to be processed and executed.

    Otherwise it assumes the returned data is json, not executable JavaScript...and since the render action of my Characters#create action responds with a .js.erb file that contains the template to append to the table, JSON isn't what I wanted in that case.

    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
  • baronfelbaronfel Would you say I have a _plethora_?Registered User regular
    edited May 2012
    @GnomeTank is this for your twitter bootstrap Diablo III crafting site? I look forward to that project with great interest :D

    baronfel on
  • InfidelInfidel Heretic Registered User regular
    I wasn't following the D3 thread pre-release so I think I missed exactly what the Craftnet is going to do, fill me in?

    OrokosPA.png
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    baronfel wrote: »
    @GnomeTank is this for your twitter bootstrap Diablo III crafting site? I look forward to that project with great interest :D

    Yes, it is.

    @Infidel: Basically it's going to be a PA D3 socializing site, with a way for people to request items to be crafted, and schedule pick up games with fellow PA players. Essentially it's an excuse to write a big Rails project and do something cool for the PA D3 community at the same time.

    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
  • InfidelInfidel Heretic Registered User regular
    Okay, cool. I suppose I could combobinator some gems for folks! :rotate:

    OrokosPA.png
  • CantidoCantido Registered User regular
    This new part time job I got...the employer has a good relationship with my campus's excellent Career Services program, so that puts me at ease.

    It's not just that they want a PHP shopping cart (though they do want one), but are there software solutions out there for catalog/shopping cart software for tablets/iPad devices?

    3DS Friendcode 5413-1311-3767
  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    For a shopping cart? Just build a decent PHP one.

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Blarg...you can't put forms inside table rows in HTML and have them play nice, so I have to re-think the entire characters list. I'll have to make it using divs.

    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
  • CantidoCantido Registered User regular
    edited May 2012
    admanb wrote: »
    For a shopping cart? Just build a decent PHP one.

    I like that. :D

    But the manager says this is because interspire is being discontinued and he's looking for an alternative. So he just wants to buy another.

    Cantido on
    3DS Friendcode 5413-1311-3767
  • InfidelInfidel Heretic Registered User regular
    edited May 2012
    GnomeTank wrote: »
    Blarg...you can't put forms inside table rows in HTML and have them play nice, so I have to re-think the entire characters list. I'll have to make it using divs.

    This is an old quirk and you simply do forms like this:
    <form><table><tr><td><input ...></td></tr></table></form>
    

    Remember that forms aren't actually layout elements so it is fine to break the layering "man this looks wrong to me" thing.

    Infidel on
    OrokosPA.png
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Yeah, I know. The problem is I need one for for each row, because they send to different REST URL's. it's fine, I have Twitter Bootstrap on my side, I'll just use divs. I was just being lazy.

    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
  • KiTAKiTA Registered User regular
    edited May 2012
    GnomeTank wrote: »
    KiTA wrote: »
    Jasconius wrote: »
    I don't know much about XNA, but I think that people are drawn to Unity because of it's cross-platform abilities.

    I thought Unity was 3D games exclusively, however?

    No, you can do 2D with Unity. You just have to understand the fact that even 2D games today, are really 3D games, just using an orthographic projection, and projecting textures on to camera facing planes, generally represented as quads. The days of mode 13 and writing directly to surfaces is mostly gone.

    You can do this yourself using just raw Unity, but there are also some Unity plugins that make wrap some of that in to a nice friendly API and workflow.

    (Sorry for the somewhat late reply, Diablo 3 and all that.)

    Oh, wow, I hadn't thought of that. Thinking about it, that's kinda how XNA does it as well, huh.

    I'm interested in doing a tile based application (ok, I'll admit it -- a tile based game) to keep myself sane while I look for work now that I'm out of College. I was going to use XNA but apparently Unity lets you port to IOS and Android too? Anyway -- what are some of these Unity plugins you mentioned for 2d stuff? Anything specific for tile based games?

    I really need to shore up my programming skills. I've taken first year programming classes in a dozen different languages (and the single Data Structures class my latest College offers), but have no idea how to turn that into something a business might need. Just fiddle around I guess.

    KiTA on
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    @KiTA: I don't remember the name of the plugins off hand, but if you go to the Asset Store built in to Unity, you'll see them listed there, a long with a bunch of free and paid assets you can use to start building a game.

    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
  • BarrakkethBarrakketh Registered User regular
    KiTA wrote: »
    GnomeTank wrote: »
    KiTA wrote: »
    Jasconius wrote: »
    I don't know much about XNA, but I think that people are drawn to Unity because of it's cross-platform abilities.

    I thought Unity was 3D games exclusively, however?

    No, you can do 2D with Unity. You just have to understand the fact that even 2D games today, are really 3D games, just using an orthographic projection, and projecting textures on to camera facing planes, generally represented as quads. The days of mode 13 and writing directly to surfaces is mostly gone.

    You can do this yourself using just raw Unity, but there are also some Unity plugins that make wrap some of that in to a nice friendly API and workflow.

    (Sorry for the somewhat late reply, Diablo 3 and all that.)

    Oh, wow, I hadn't thought of that. Thinking about it, that's kinda how XNA does it as well, huh.
    Terms usually used include billboarding, billboard, and billboarded quad.

    Rollers are red, chargers are blue....omae wa mou shindeiru
  • TofystedethTofystedeth Registered User regular
    edited May 2012
    Does C# have an equivalent to Python's random.choice() which, returns a random item in a sequence, or do I have to roll my own?
    Looking in the Random class it looks like all it can spit out is numbers, but I didn't know if there was somewhere else that had one.

    Tofystedeth on
    steam_sig.png
  • baronfelbaronfel Would you say I have a _plethora_?Registered User regular
    edited May 2012
    You can do IEnumerable.ElementAt(Random.next()%IEnumerable.Count) to get the same effect. There may be a smoother way of doing that, though...

    EDIT: If list order doesn't matter you could do IEnumerable.Shuffle().Take(1)

    baronfel on
  • zeenyzeeny Registered User regular
    Google's adwords api.
    Wow, google. Just wow.

  • KiTAKiTA Registered User regular
    zeeny wrote: »
    Google's adwords api.
    Wow, google. Just wow.

    That bad?

  • wildwoodwildwood Registered User regular
    zeeny wrote: »
    Google's adwords api.
    Wow, google. Just wow.

    If you think Google's is bad, you should see Baidu's. :)

  • AnteCantelopeAnteCantelope Registered User regular
    Is there a good IDE for assembly programming? I've been using plain old notepad and fixing problems as the compiler finds them, but that seems a little more awkward than necessary. And assembly is already more awkward than necessary.

  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    Is there a good IDE for assembly programming? I've been using plain old notepad and fixing problems as the compiler finds them, but that seems a little more awkward than necessary. And assembly is already more awkward than necessary.

    On the one hand, this sounds like the kind of thing that would never exist because who in god's name could ever need it? On the other hand, anyone who would need it would need it desperately.

  • ecco the dolphinecco the dolphin Registered User regular
    edited May 2012
    Is there a good IDE for assembly programming? I've been using plain old notepad and fixing problems as the compiler finds them, but that seems a little more awkward than necessary. And assembly is already more awkward than necessary.

    If under Windows, the good old standby remains Visual Studio.

    Which type of assembly programming are you doing? Just certain functions in assembly, or entire apps in assembly?

    If doing certain functions/parts of functions in assembly, the easiest thing is probably to use inline assembly, and then debug using the Debug->Windows->Registers window with the Debug->Windows->Disassembly window. Maybe use the memory viewer as well.

    If writing entire apps in assembly, I believe it is possible to set that up in non-express versions as well.
    admanb wrote: »
    On the one hand, this sounds like the kind of thing that would never exist because who in god's name could ever need it? On the other hand, anyone who would need it would need it desperately.

    Heh. People that need it have probably already moved to windbg already and can probably read the matrix.

    I get the impression that using the Visual Studio IDE/debugger is easy-mode. =P

    ecco the dolphin on
    Penny Arcade Developers at PADev.net.
  • AnteCantelopeAnteCantelope Registered User regular
    No, it's in Linux, and that's not something I can change.

    It's entire (small) apps.

    So far my default text editor is doing a decent job, but something that would help me keep track of how big variables are, make jump statements a bit clearer, and remind me when to use [varName] as opposed to varName would be appreciated.

    At the moment I can write a few hundred lines of x86 in half an hour and logically it all works, but then it takes me three hours to go through it and fix all the little mistakes I've made.

  • TrippyJingTrippyJing Moses supposes his toeses are roses. But Moses supposes erroneously.Registered User regular
    edited May 2012
    I've a wee bit of a problem.

    FJ8Js.png

    The ZIP/Postal Code label is supposed to be on the next line, but some reason anything after the state selection refuses to do so.

    EDIT: Fixed it. Forgot to add "clear: left" to my style sheet.

    TrippyJing on
    b1ehrMM.gif
  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    Float and clear are the most hateful words in CSS.

  • SmasherSmasher Starting to get dizzy Registered User regular
    Vegan wrote: »
    Hey, everyone. Not A Programmer in the house here.

    I'm going to be starting an Associate Degree education in Web Programming (I can provide specifics if it's important) and I was wondering if I could get an idea of hardware requirements for a laptop. Right now my only computer is hooked up to my TV and there's no way I'm hunching in front of that for all of my class work.

    I can't imagine that the hardware requirements would be very demanding for those sorts of projects, correct?

    Also, how concerned should I be about being bad at math?

    For most programming you really don't need much more than +-/* and the occasional square root or exponent. Understanding binary is a good thing for programming in general, though it's probably not very relevant to web programming.

  • SmasherSmasher Starting to get dizzy Registered User regular
    An application I wrote has just been pen-tested within the past few months, so I've had compliance and security on the brain for a while now.

    Basically, SHA1 is next to useless now as there's so many rainbow tables for it available. What's recommended is doing recursive SHA256 hashing as many times as you can handle without affecting performance. Based on the build of the server I was working on and the speed of the language / framework I ended up with a 10,000 pass recursive hash seeded with a private key value and the current time in milliseconds. That satisfied the security company, anyway.

    Look into CSRF tokens / nonce values too -- they're exceptionally useful for increasing security at negligible cost.

    But, like others have said, even the most secure password hashing / security system in the world is only as good as the users using it. Even if you're storing data securely, there's nothing stopping people writing down their password or reading it out to someone over the phone who sounds professional.

    I want to ask a couple questions about your design decisions for my own edification, but some of them seem counter-intuitive to me so I'm not sure I'm understanding you correctly. Is this for hashing of user passwords for logging in, or something else?

  • PrimePrime UKRegistered User regular
    Thanks Phyphor and Bowen for you posts the other day. I've made some progress, but I'm having issues moving the second rectangle into the correct position while taking into account the first is rotated. I've neglected basic maths for too long!

    Here is a example of what im trying to get.

    29f7as2.png
    First rectangle is pre placed (blue), the user inserts a rectangle (red), red is placed in the flow with the blue matching its rotation.

    The top example fine and working. When I attempt to do anything where the first rectangle is rotated at all my workings go out the window. What should I be aware of that im forgetting?

    I have all data for the rects (position, length, height and rotation of both current and inserted.)

  • SporkAndrewSporkAndrew Registered User, ClubPA regular
    Smasher wrote: »
    I want to ask a couple questions about your design decisions for my own edification, but some of them seem counter-intuitive to me so I'm not sure I'm understanding you correctly. Is this for hashing of user passwords for logging in, or something else?

    Yeah, this is for storing hashed passwords for users so they can log into a system.

    The one about the fucking space hairdresser and the cowboy. He's got a tinfoil pal and a pedal bin
  • bowenbowen How you doin'? Registered User regular
    Prime wrote: »
    Thanks Phyphor and Bowen for you posts the other day. I've made some progress, but I'm having issues moving the second rectangle into the correct position while taking into account the first is rotated. I've neglected basic maths for too long!

    Here is a example of what im trying to get.

    29f7as2.png
    First rectangle is pre placed (blue), the user inserts a rectangle (red), red is placed in the flow with the blue matching its rotation.

    The top example fine and working. When I attempt to do anything where the first rectangle is rotated at all my workings go out the window. What should I be aware of that im forgetting?

    I have all data for the rects (position, length, height and rotation of both current and inserted.)

    I'm guessing your issue is matching the sides in a congruent fashion? Depending on where your origin point is (which part of the rectangle is the center/start) then all you need is simple additions to figure out where the start of the red one goes (adjacent to the blue one) and then rotate 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
  • bowenbowen How you doin'? Registered User regular
    edited May 2012
    Smasher wrote: »
    I want to ask a couple questions about your design decisions for my own edification, but some of them seem counter-intuitive to me so I'm not sure I'm understanding you correctly. Is this for hashing of user passwords for logging in, or something else?

    Yeah, this is for storing hashed passwords for users so they can log into a system.

    To expand upon this. Hashing is a 1-way form of encryption where you need to verify correctness rather than completeness, or you have sensitive data you don't want to store, but needs to be remembered.

    If you hash an array of bytes (files/strings) you'll get an output that should match it no matter where you go.

    "Hello my name is Steve" should be hashed the same no matter how many times you try it. So it's good if you need a quick way to go "this matches the input." Usually hashes are used for files and passwords because it's an easy way to see if they're compromised or match.

    The reason you use hashing for passwords is you don't want to store a password in plain text in a database (easy way to compromise a system) and there's really no reason to encrypt it, so, you don't need to reverse it.

    You hash "mypassword" and get the hash string of something like "3216fa4dba341bb4ae" and store that hash in your database. Then when a user logs in, you hash his password and see if it matches the hash. If it does, you're good. If it doesn't, it's the wrong password. Even a slight variation in capitals will cause that hash to be vastly different. Though depending on your level of hashing (SHA128 vs SHA256) you may have collisions of values.

    For instance "mypassword" might match the hash for "poopymcbutterface" thus allowing someone with that password in. You can semi combat this with salting as you basically shift how it calculates the hash. Public hash tables are a common thing, so, if someone compromises your database, and looks up hashes, if you don't salt the hash, and they know which hash function you use, your system is as good as compromised.

    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
  • zeenyzeeny Registered User regular
    admanb wrote: »
    For a shopping cart? Just build a decent PHP one.

    I've been working on several shopping carts of late and even the ones that are pretty much hacked on the spot without much of a plan are years of work for a solo developer + designer team. So, I don't know, man.
    Is there a good IDE for assembly programming? I've been using plain old notepad and fixing problems as the compiler finds them, but that seems a little more awkward than necessary. And assembly is already more awkward than necessary.

    The who what? Emacs has both, GAS & NASM modes and I did some of both back at uni(significantly more %%GAS), but for the hell of me I can't remember if I used something more than the syntax options.
    KiTA wrote: »
    zeeny wrote: »
    Google's adwords api.
    Wow, google. Just wow.

    That bad?

    Now, I've been known to say SOAP has a place(and then have people on here disagree), but dear fucking god, DAT ADWORDS API.
    The positive side is that the API is not as bad as their own PHP library for it! Hurray!
    wildwood wrote: »
    zeeny wrote: »
    Google's adwords api.
    Wow, google. Just wow.

    If you think Google's is bad, you should see Baidu's. :)


    You are scaring me. I'm not even going to try and look this up.

  • zeenyzeeny Registered User regular
    edited May 2012
    From reddit, but I laughed so hard:
    "Perl is the only language that looks the same before and after RSA encryption."
    Keith Bostic. Programmer, created Sleepycat, contributed to free BSD unices.

    zeeny on
  • bowenbowen How you doin'? Registered User regular
    Oh well, it was probably just Regex?

    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
  • urahonkyurahonky Registered User regular
    Have you guys seen that the calculator in Windows 7 has been updated to include helpful stuff for Programmers? Hex, Decimal, Binary, etc... Pretty cool that they added that.

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    That's been in there since Windows 98...you just didn't notice honky ;)

    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
  • bowenbowen How you doin'? Registered User regular
    Wasn't that there in Win3.1 as well?

    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
  • ecco the dolphinecco the dolphin Registered User regular
    edited May 2012
    GnomeTank wrote: »
    That's been in there since Windows 98...you just didn't notice honky ;)

    Did anyone notice the change to Calc's internal engine though? =P

    ecco the dolphin on
    Penny Arcade Developers at PADev.net.
  • urahonkyurahonky Registered User regular
    *urahonky's a slowpoke.jpg*

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    No, it's in Linux, and that's not something I can change.

    It's entire (small) apps.

    So far my default text editor is doing a decent job, but something that would help me keep track of how big variables are, make jump statements a bit clearer, and remind me when to use [varName] as opposed to varName would be appreciated.

    At the moment I can write a few hundred lines of x86 in half an hour and logically it all works, but then it takes me three hours to go through it and fix all the little mistakes I've made.

    Tell them you'd rather get it done in days instead of months and use a compiler. There's no good reason to ever write an entire program in assembly anymore

This discussion has been closed.