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).
gavindelThe reason all your softwareis brokenRegistered Userregular
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
0
SmasherStarting to get dizzyRegistered Userregular
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).
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
0
mightyjongyoSour CrrmEast Bay, CaliforniaRegistered Userregular
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.
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.
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;
}
0
El SkidThe frozen white northRegistered Userregular
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.
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
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.
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.
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
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.
0
El SkidThe frozen white northRegistered Userregular
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
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!
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.
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.
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.
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.
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:
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
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.
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.
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.
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.
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!
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.
Posts
Which is to say, it is super academic most of the time.
That said, you're right that the Big O isn't always the determining factor (e.g. Quicksort).
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.
They have a bunch of us on Overhead at the moment until the new task order comes in.
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.
It's just 40, but I'll take it.
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; }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.
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; }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 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.
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.
I agree. Whoever wrote this css was just taking bits and pieces of another app's css and must have copied one twice.
If you have it installed you should be able to right click -> inspect element with firebug. If that doesn't work...Sorry
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.
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.
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.
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:
Padding / margin needs a unit of measurement if the value isn't 0 - px, x, em, rem, etc.
Pix plz!
http://steamcommunity.com/id/pablocampy
That's why you want FlexSpy
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.
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.
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.
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.
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.
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...
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!
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.