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'

194959799100

Posts

  • AnteCantelopeAnteCantelope Registered User regular
    Phyphor wrote: »
    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

    It's a uni course, not so much about programming in assembly as learning how processors work. And I really enjoy learning how processors work, and how an instruction of mov eax, [varName] is turned into binary and how the processor interprets that binary. It's just that after learning how it all works I don't want to spend additional hours fixing a dozen trivial mistakes that are throwing segfaults everywhere.

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Ah, for school. Well that's different then. You will be making a ton of mistakes.

    Decide on a calling convention, stick to it
    Put comments in the code, stating what is in each register, what registers are free and what the stack looks like
    Create macros that can test invariants, for example on function entry have a FUNC_ENTER macro that sets up the stack for the function and (for debugging) saves critical values. FUNC_EXIT reverses that and checks that esp is what it should be for example

  • ecco the dolphinecco the dolphin Registered User regular
    Phyphor wrote: »
    Ah, for school. Well that's different then. You will be making a ton of mistakes.

    Decide on a calling convention, stick to it
    Put comments in the code, stating what is in each register, what registers are free and what the stack looks like
    Create macros that can test invariants, for example on function entry have a FUNC_ENTER macro that sets up the stack for the function and (for debugging) saves critical values. FUNC_EXIT reverses that and checks that esp is what it should be for example

    This man speaks wisdom!

    Penny Arcade Developers at PADev.net.
  • jackaljackal Fuck Yes. That is an orderly anal warehouse. Registered User regular
    I've been reading the preview edition of Charles Petzold's sixth edition of Programming Windows (preview is $10 until the end of the month and gets you the final book). It's basically WinRT/Metro/C# stuff. So far if you've read his WPF book everything is going to feel really familiar.

    Windows 8 is a little wonky, but it is growing on me. I like how focused it is on asynchronous programming.

  • bowenbowen How you doin'? Registered User regular
    I'm holding off for Windows 9, seems to be following a trend of every other OS is shit.

    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
  • jackaljackal Fuck Yes. That is an orderly anal warehouse. Registered User regular
    edited May 2012
    It's more like the *.0 versions are poorly received. 5.0 (Windows 2000) and 6.0 (Vista). XP is 5.1, 7 is 6.1 and 8 is 6.2, so it'll probably be fine. Also Vista was actually good* (streets ahead of XP at least). I still use it on my desktop and I don't have a strong preference between it and 7. My work laptop is still XP and it makes me want to punch myself in the dick.

    *I got it like a year after release, so I may have missed any dark times.

    jackal on
  • bowenbowen How you doin'? Registered User regular
    7 performs better on a whole, you'd get more torque out of your system.

    I used windows 2000 until Windows7 came out, fuck yeah. Pretty much because I had a copy of the enterprise edition I could install on any pc from school they charged me $20 for. ITT probably did that illegally though.

    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
  • Joe KJoe K Registered User regular
    jackal wrote: »
    It's more like the *.0 versions are poorly received. 5.0 (Windows 2000) and 6.0 (Vista). XP is 5.1, 7 is 6.1 and 8 is 6.2, so it'll probably be fine. Also Vista was actually good* (streets ahead of XP at least). I still use it on my desktop and I don't have a strong preference between it and 7. My work laptop is still XP and it makes me want to punch myself in the dick.

    *I got it like a year after release, so I may have missed any dark times.

    w2k was frigging gold and a vast improvement over NT4.

    And you missed the only abortion bigger than MSBOB, WindowsME.

  • bowenbowen How you doin'? Registered User regular
    Windows ME was great unless you needed printing. I didn't, ME performed like 98 on my "parent's" PC.

    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
  • jackaljackal Fuck Yes. That is an orderly anal warehouse. Registered User regular
    Windows ME didn't really fit into my heuristic since it was the last of a dying and sickly breed, 9x (4.*).

  • urahonkyurahonky Registered User regular
    Anyone have any good tutorials on using kd.exe in Windows? (Kernal Debugger)

    The book I'm reading has the author using it extensively but I can't seem to get it running on my machine. I have the Debugger installed, but when I run kd.exe from the command line I get:
    Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
    Copyright (c) Microsoft Corporation. All rights reserved.

    Opened \\.\com1
    Waiting to reconnect...

  • bowenbowen How you doin'? Registered User regular
    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
  • InfidelInfidel Heretic Registered User regular
    Running as an administrator?

    OrokosPA.png
  • urahonkyurahonky Registered User regular
    bowen wrote: »

    So it's looking for a named pipe called com1?

  • bowenbowen How you doin'? Registered User regular
    Something like that. I don't know what that means to the whole picture.

    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
  • InfidelInfidel Heretic Registered User regular
    Hahaha, wait, is that com1 as in the serial port?

    Never used it so can't tell you what is up but you may need to look at the options. :D

    OrokosPA.png
  • bowenbowen How you doin'? Registered User regular
    Probably what happened is COM1 was used as the named pipe just for legacy's sake?

    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
    You might be onto something Infidel. I disabled COM1 in my device manager and then ran KD again and got an error.

  • Jimmy KingJimmy King Registered User regular
    bowen wrote: »
    Windows ME was great unless you needed printing. I didn't, ME performed like 98 on my "parent's" PC.

    I was doing desktop support type work for Best Buy back in the Win98/WinME days (pre-Geek Squad by several years) and ran WinME myself on multiple computers. My experience was that if you did a fresh install of WinME it worked as well as you could ever expect Windows to work. If you upgraded from 98 to ME it was the huge, barely working mess that so many people complain about it being, because most people upgraded and even lots of new, in store bought PCs actually had a 98->ME upgrade rather than fresh ME install.

  • bowenbowen How you doin'? Registered User regular
    Yeah I never had many problems until I tried to use a printer, oh god the printer subsystem.

    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
    edited May 2012
    In case someone searches and finds this in the future: the answer, to run KD.exe on your own system, is below:

    kd -kl

    If it fails it will tell you what to do to make it work. Do that and then reboot. Then it works!

    urahonky on
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    bowen wrote: »
    I'm holding off for Windows 9, seems to be following a trend of every other OS is shit.

    The API changes are really nice, but yeah I'm going to hold off too. Of course due to compatibility concerns I won't be able to use them for a decade!
    Infidel wrote: »
    Hahaha, wait, is that com1 as in the serial port?

    Never used it so can't tell you what is up but you may need to look at the options. :D

    Yup, that's how you do kernel debugging, over serial (at least where you have to break execution). Theoretically firewire also works, but I've never been able to make it work

  • InfidelInfidel Heretic Registered User regular
    Phyphor wrote: »
    bowen wrote: »
    I'm holding off for Windows 9, seems to be following a trend of every other OS is shit.

    The API changes are really nice, but yeah I'm going to hold off too. Of course due to compatibility concerns I won't be able to use them for a decade!
    Infidel wrote: »
    Hahaha, wait, is that com1 as in the serial port?

    Never used it so can't tell you what is up but you may need to look at the options. :D

    Yup, that's how you do kernel debugging, over serial (at least where you have to break execution). Theoretically firewire also works, but I've never been able to make it work

    Pfffft, old school maybe, get devices with USB thanks!

    OrokosPA.png
  • bowenbowen How you doin'? Registered User regular
    I'm surprised console makers haven't tapped into USB storage as a means of delivering games yet.

    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
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    I've never even seen a USB debug cable and I do USB development!

  • urahonkyurahonky Registered User regular
    Also thank you guys for recommending Console2 long ago. It works great.

  • InfidelInfidel Heretic Registered User regular
    Phyphor wrote: »
    I've never even seen a USB debug cable and I do USB development!

    It's USB serial sure, but that still means I'm not using a (non-existant) COM1 anymore!

    Embedded device development/debugging? Have done it on USB virtual serial. iPhone development/debugging? USB.

    You must have some bad karma to be stuck with hard serial ports. :D

    OrokosPA.png
  • bowenbowen How you doin'? Registered User regular
    edited May 2012
    Or even just serial to network? Emulate a serial port like a boss.

    We used to use that for one of our games that required a null modem cable, worked decently for that at least.

    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
  • bowenbowen How you doin'? Registered User regular
    http://www.advancedvirtualcomport.com/ something like this but I don't think that's the same one we used. Looks similar.

    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
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Ah, well I'm talking about Windows debugging; I don't think I've seen a non-laptop PC without a COM port. USB requires a special cable and BIOS support and firewire just doesn't seem to work. Of course, that's just on the target machine, the debugger can use a USB serial adapter if it wants

  • DrunkMcDrunkMc Registered User regular
    urahonky wrote: »
    *urahonky's a slowpoke.jpg*

    You'd be surprised how many people didn't know that. I converted a hex number to decimal, then modified it, then back to hex infront of a co-worker using the Windows Calculator and you'd figured I just turned lead into gold. They were like, "HOW DID YOU DO THAT!!!!!!!!!!!"

    :)

  • bowenbowen How you doin'? Registered User regular
    Speaking of which, I have 20 lbs of lead in my back yard...

    No I wasn't building a reactor.

    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
  • jackaljackal Fuck Yes. That is an orderly anal warehouse. Registered User regular
    My boss was shocked when he saw me drag an ini file into the body of notepad and notepad opened the file.

  • bowenbowen How you doin'? Registered User regular
    Haha what.

    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
  • InfidelInfidel Heretic Registered User regular
    That is one of the best things about pair programming.

    "Whoa whoa whoa what the fuck did you just do."

    It really enrichens everyone, especially if you rotate people.

    OrokosPA.png
  • bowenbowen How you doin'? Registered User regular
    I love pair programming. I love being the other pair not doing the typing because I am like a god damned messiah of debugging.

    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
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I hate pair programming, because in almost every instance, it slows me down horribly...and the resulting code quality is not so much better that it was worth the slow down.

    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
    Well.

    I like browsing PA while programming and I don't think that'd work too well with pair programming.

    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
    Welp... I was down to around 25 known bugs as of last week. Then they let someone else test it... Now we're at 63.

  • Jimmy KingJimmy King Registered User regular
    urahonky wrote: »
    Welp... I was down to around 25 known bugs as of last week. Then they let someone else test it... Now we're at 63.
    That's why just having the developer test the code is terrible. It used to happen all the time at my old job. I always tried to explain to them that I'm the developer, I'm biased and so at a disadvantage when testing. If I didn't already think it was correct I wouldn't have written it that way and I wouldn't be testing it yet. There are also things that you just don't even think to try because how it works is so engrained in your mind that you just know not to do X and it never crosses your mind that someone else might.

This discussion has been closed.