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/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

Git Merge Squashing [Programming] Thread : Filesystems logging stuff

17677798182100

Posts

  • Jimmy KingJimmy King Registered User regular
    Seol wrote: »
    Jimmy King wrote: »
    The part that's easy to get thrown off by, as I did, is the part of the rule about "for a large enough value of n". Frequently these things are a polynomial, so it's, n^4 + n^3 + n^2. With small values of n, that +n^3 + n^2 contributes a significant percentage of the run time and so you'll look at the numbers and go "Well no way that's n^4", but once n = 100 or 1,000, or 1,000,000 or whatever, n^4 is responsible for so much more of the run time that you can just toss those others out. You might have 100,000,000,000 operations and of those n^3+n^2 is only really responsible fro 100,000 of them or whatever, so as far as estimating goes, they just don't matter.
    Of course, that's only really important if you're going to be scaling up like that. Like, most real-world general-purpose sorting algorithms switch from using O(nlogn) algorithms to O(n^2) algorithms for small sets, because for small sets, they're faster. And because they're recursive, every sort includes a small set sort.

    Making sure you don't have an n^2 term is going to be important if it's plausible you'll be dealing with 1,000,000 records, but sometimes you know it's not going to be more than 300.
    Yeah, definitely. For most of us, this big O stuff is all just an academic exercise which is good to understand, but rarely anything more. Usually when it really matters you'll be using a library which is already written and tested and uses the best choice. In 99% of the code I write, it's almost always O(n), guaranteed to be a super small set of data, or I did something else stupid long before the loop(s).

  • gavindelgavindel The reason all your software is brokenRegistered User regular
    Order(n) stuff comes up more ifyou're dealing with computational theory. Its a convenient lens for standardizing questions regarding P, NP, and EXP functions without having to deal with details of implementation or hardware.

    Which is to say, it is super academic most of the time.

    Angels, innovations, and the hubris of tiny things: my book now free on Royal Road! Seraphim
  • SmasherSmasher Starting to get dizzy Registered User regular
    gavindel wrote: »
    Order(n) stuff comes up more ifyou're dealing with computational theory. Its a convenient lens for standardizing questions regarding P, NP, and EXP functions without having to deal with details of implementation or hardware.

    Which is to say, it is super academic most of the time.
    I wouldn't go that far. Not knowing how your algorithm's running time/memory space scales with input size is asking for trouble unless you're certain the input will remain smaller than a certain size.

    That said, you're right that the Big O isn't always the determining factor (e.g. Quicksort).

  • EndEnd Registered User regular
    mixed tabs/spaces is driving me batty

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
    bowenInfidelEchoCampy
  • urahonkyurahonky Registered User regular
    Performance and Pay review for me on Monday. Should be interesting.

  • bowenbowen How you doin'? Registered User regular
    I thought they weren't keeping you guys?

    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
  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    So, uh, never be stupid and do what I did and uninstall every xorg driver on a linux machine. Turns out, it renders your laptop useless because it can't find the keyboard/mouse drivers anymore!

    In other news I'm working on another product integration. So much fun trying to decided if the bad data is because of the firmware or because the configuration is messed up somehow.

  • bowenbowen How you doin'? Registered User regular
    Wait you can't even use terminal anymore jongyo?

    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
    bowen wrote: »
    I thought they weren't keeping you guys?

    They have a bunch of us on Overhead at the moment until the new task order comes in.

  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    bowen wrote: »
    Wait you can't even use terminal anymore jongyo?

    I managed to get to a semi-usable state by booting directly to runlevel 3, but I lost keyboard/mouse when I tried starting the xserver, so I couldn't do much with it until I realized that I had deleted all the xorg input drivers.

  • urahonkyurahonky Registered User regular
    Huzzah! Got some hours.

    It's just 40, but I'll take it.

    an_altecco the dolphinNightslyr
  • urahonkyurahonky Registered User regular
    Any CSS folks in here?

    Let's say we have a single css file, and inside we have two styles named exactly the same, but some of the values are different. Which one of these are actually applied to something? For example:
    .header
    {
        padding-left: 0;
    }
    

    and
    .header
    {
        padding-left: 10;
    }
    

  • El SkidEl Skid The frozen white northRegistered User regular
    edited February 2014
    All sorts of my css headaches were put to rest with firebug (firefox addon). It lets you inspect a webpage (or a specific element on the webpage) and shows you exactly what css is applied to the element and what file it's from, and lets you change the css on the fly to see how that changes the display.

    Granted it's obviously only going to work in firefox, and other browsers can interpret css files differently, but it's a really helpful tool for this kind of sleuthing.

    e- In this situation it won't tell you WHY it's applying one over the other, but it lets you see for sure which is being used and what would happen if you changed other stuff around.

    El Skid on
  • EndEnd Registered User regular
    urahonky wrote: »
    Any CSS folks in here?

    Let's say we have a single css file, and inside we have two styles named exactly the same, but some of the values are different. Which one of these are actually applied to something? For example:
    .header
    {
        padding-left: 0;
    }
    

    and
    .header
    {
        padding-left: 10;
    }
    

    the last to appear

    if you wanted the first to take effect, you could make it more specific, for example:
    body .header
    {
        padding-left: 0;
    }
    

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • RendRend Registered User regular
    It should be noted that identical names in a single css file is absolutely ABYSMAL css.

    If you are able to, you should change it, either by inventing another name, or by making it more specific as End noted. Actually, you should make both of them more specific. Do your best never to have two identical names ever collide while traversing a css tree.

    InfidelVegemyte
  • urahonkyurahonky Registered User regular
    El Skid wrote: »
    All sorts of my css headaches were put to rest with firebug (firefox addon). It lets you inspect a webpage (or a specific element on the webpage) and shows you exactly what css is applied to the element and what file it's from, and lets you change the css on the fly to see how that changes the display.

    Granted it's obviously only going to work in firefox, and other browsers can interpret css files differently, but it's a really helpful tool for this kind of sleuthing.

    e- In this situation it won't tell you WHY it's applying one over the other, but it lets you see for sure which is being used and what would happen if you changed other stuff around.

    I can't run the app for some reason so I can't inspect it. :(

    @End thank you! I just need to remove one so I wanted to make sure this was it.

  • EndEnd Registered User regular
    edited February 2014
    I wouldn't be surprised if it isn't really an option in this case but I'd really recommend using sass (or less, but I think sass is better) if you're doing a lot of css stuff

    You can more easily organize your stylesheet to follow the structure of the page, which makes it easier to follow and also gives you more specific selectors.

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
    EchozeenySporkAndrew
  • urahonkyurahonky Registered User regular
    Rend wrote: »
    It should be noted that identical names in a single css file is absolutely ABYSMAL css.

    If you are able to, you should change it, either by inventing another name, or by making it more specific as End noted. Actually, you should make both of them more specific. Do your best never to have two identical names ever collide while traversing a css tree.

    I agree. Whoever wrote this css was just taking bits and pieces of another app's css and must have copied one twice.

  • El SkidEl Skid The frozen white northRegistered User regular
    urahonky wrote: »
    El Skid wrote: »
    All sorts of my css headaches were put to rest with firebug (firefox addon). It lets you inspect a webpage (or a specific element on the webpage) and shows you exactly what css is applied to the element and what file it's from, and lets you change the css on the fly to see how that changes the display.

    Granted it's obviously only going to work in firefox, and other browsers can interpret css files differently, but it's a really helpful tool for this kind of sleuthing.

    e- In this situation it won't tell you WHY it's applying one over the other, but it lets you see for sure which is being used and what would happen if you changed other stuff around.

    I can't run the app for some reason so I can't inspect it. :(

    @End thank you! I just need to remove one so I wanted to make sure this was it.

    If you have it installed you should be able to right click -> inspect element with firebug. If that doesn't work...Sorry :(

  • urahonkyurahonky Registered User regular
    Unfortunately it's a Flex application and it disables right clicking. :(

  • zeenyzeeny Registered User regular
    Oi guys, can I get a couple of concrete resources(preferably books) on Android/IPhone native development? What is considered the reference literature on the subject on our forum? Thanks a bunch!

  • RendRend Registered User regular
    zeeny wrote: »
    Oi guys, can I get a couple of concrete resources(preferably books) on Android/IPhone native development? What is considered the reference literature on the subject on our forum? Thanks a bunch!

    Can you be a bit more specific as to what you mean by native development? Regarding android that is.

  • zeenyzeeny Registered User regular
    Rend wrote: »
    zeeny wrote: »
    Oi guys, can I get a couple of concrete resources(preferably books) on Android/IPhone native development? What is considered the reference literature on the subject on our forum? Thanks a bunch!
    Can you be a bit more specific as to what you mean by native development? Regarding android that is.

    No responsive design/no js.

  • RendRend Registered User regular
    zeeny wrote: »
    Rend wrote: »
    zeeny wrote: »
    Oi guys, can I get a couple of concrete resources(preferably books) on Android/IPhone native development? What is considered the reference literature on the subject on our forum? Thanks a bunch!
    Can you be a bit more specific as to what you mean by native development? Regarding android that is.

    No responsive design/no js.

    I am afraid I haven't heard of those terms, and my cursory google fu is coming up short.

    But regardless, unfortunately I'm not sure I can offer you any resources as far as books are concerned. However, for dealing with android applications which utilize native code, you will want to look at the Android NDK, as well as AIDL, which is how android likes to transfer data between the native and java layers.

    This page: http://www.ntu.edu.sg/home/ehchua/programming/android/Android_NDK.html
    ...has a pretty good rundown of how to take care of that, though the documentation of NDK tends to be fairly incomplete.

  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    edited February 2014
    He means apps.

    admanb on
  • RendRend Registered User regular
    admanb wrote: »
    He means apps.

    Yeah, I figured as much, but I wanted to make sure.

    The link I posted has some really good information about programming an app with native code in it.

  • ecco the dolphinecco the dolphin Registered User regular
    edited February 2014
    Debugging a problem that our factory has reported.

    Have three computers to repro and debug with, with a combined total of 5 monitors, plus a 4 channel oscilloscope for real world electronic measurements, and probing via a JTAG dongle into the digital innards of our device.

    Cables everywhere.

    Feeling badass.

    Edit: Also, running out of desk space.

    ecco the dolphin on
    Penny Arcade Developers at PADev.net.
    CampyXrdd
  • SporkAndrewSporkAndrew Registered User, ClubPA regular
    urahonky wrote: »
    Any CSS folks in here?

    Let's say we have a single css file, and inside we have two styles named exactly the same, but some of the values are different. Which one of these are actually applied to something? For example:
    .header
    {
        padding-left: 0;
    }
    

    and
    .header
    {
        padding-left: 10;
    }
    

    The first one will take effect here, because if the values are exactly as you pasted - padding-left: 10; isn't valid CSS and the browser will skip over it. Well, Chrome does:

    KV2IGLC.png

    Padding / margin needs a unit of measurement if the value isn't 0 - px, x, em, rem, etc.

    The one about the fucking space hairdresser and the cowboy. He's got a tinfoil pal and a pedal bin
  • CampyCampy Registered User regular
    Debugging a problem that our factory has reported.

    Have three computers to repro and debug with, with a combined total of 5 monitors, plus a 4 channel oscilloscope for real world electronic measurements, and probing via a JTAG dongle into the digital innards of our device.

    Cables everywhere.

    Feeling badass.

    Edit: Also, running out of desk space.

    Pix plz!

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    urahonky wrote: »
    Unfortunately it's a Flex application and it disables right clicking. :(

    That's why you want FlexSpy

    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.
  • iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    Debugging a problem that our factory has reported.

    Have three computers to repro and debug with, with a combined total of 5 monitors, plus a 4 channel oscilloscope for real world electronic measurements, and probing via a JTAG dongle into the digital innards of our device.

    Cables everywhere.

    Feeling badass.

    Edit: Also, running out of desk space.

    See? See? This is what I was talkin' about!

    [small]But yes, there is definitely a bit of "the grass is greener" going on in my brain. ;)

  • urahonkyurahonky Registered User regular
    Heh, a few of the guys from my team are saying "Well, I still have a job." after coming out of their Performance and Pay review. That shouldn't be something that should be happening.

    Apparently they are still having a hard time coming up with money... Also our department is not getting funded after we integrate with one more application. After that it's going defunct and we're going to move to other things.

    I also have a phone interview on Wednesday with the guy in New York. I'm not willing to move but I'll talk to him. Basically I really SHOULD be getting my resume ready.

  • urahonkyurahonky Registered User regular
    It sucks too. Getting paid weekly and getting paid more than my last job was really nice.

  • bowenbowen How you doin'? Registered User regular
    Just remind yourself of the hell the other job is facing.

    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
    urahonky
  • urahonkyurahonky Registered User regular
    bowen wrote: »
    Just remind yourself of the hell the other job is facing.

    Oh that's what keeps me going. Knowing that when 5pm hits I can shut off my computer and go home without anyone grabbing me and having me stay 3 hours after work because she decided that she needs an electrician to come to the building and can't be bothered to wait herself.

    bowen
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    I am absolutely in love with Adobe Edge Animate

    I've been waiting for it to be good since forever. And now it is good.

    It's Flash on crack. The animation tools are lightyears ahead. The speed is good. The asset management is good.

  • undergroundmonorailundergroundmonorail single-track subway Registered User regular
    I keep writing code in my head to do the tiny mundane things I have to do in real life.

    My math work wanted me to do 8 problems, and then explain how the answer to the first 4 related to the other 4.
    for i in xrange(1, 5):
        print "The answer to question {} is equal to the remainder of question {}.".format(i, i+4)
    

    It happens without me meaning to do it, and I sometimes get distracted debugging code that doesn't exist...

    Pokémon X | 3DS Friend Code: 0490-4897-7688
    Friend Safari: Fighting - Machoke, Pancham, Riolu | In game name: Jessica
    Official Weather Gym Leader of the G+T Pokémon League. @me to try for the Climate Badge!
  • a5ehrena5ehren AtlantaRegistered User regular
    edited February 2014
    Man, I wish I could talk about this Byzantine-ass login system we have on our product.

    I think it's been bolted together over the past decade and 3 different product lines...now we're bolting PAM and RADIUS on to it somehow.

    a5ehren on
  • Jimmy KingJimmy King Registered User regular
    Any of you do any work with amazon mws stuff? I'm not seeing any way to actually test anything before going live. They've got a place where you can generate xml files and upload them to see that they validate, but that's it. No way to view that content listed actually appears how/where you want, no way generate a sale, create a report of orders that need fullfilled, download and test local processing of that report, and confirm shipping, cancel, or refund. Not that I'm seeing anyway... no mention of a testing account, test system, etc. No flags on the account to say "this shit is in test mode". Nothing.

  • Jimmy KingJimmy King Registered User regular
    yay, I found a setting which probably makes listings not appear... hopefully. I'll find out when I push some up and see what happens.

This discussion has been closed.