Slashdot Mirror


User: kazad

kazad's activity in the archive.

Stories
0
Comments
52
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 52

  1. Re:Download caps on In Japan, a 900 Gigabyte Upload Cap, Downloads Uncapped · · Score: 1

    Yep, you did it right: 900 GB/month in KB/sec. Of course it depends on how long your "month" is (30 days or 365/12).

  2. Re:It was on Does It Suck To Be An Engineering Student? · · Score: 1

    I agree with the sentiment -- learning *how* to learn and collecting those aha insights is the goal of education. But it depends so much on the professor to present material in this way -- I went to a good school and the difference in teaching quality between professors for the same subject was astounding. Academia rewards publications, not the praise of students.

    Shameless plug, but I've been blogging at betterexplained.com with the goal of sharing the "aha" insights that make math & science enjoyable. Given your viewpoint, you might find it interesting.

  3. Re:Umm... on Scientists Create Room Temperature Superconductor · · Score: 1

    Great reply. So many people love to naysay without taking 3 seconds to see that problems can be worked around.

  4. InstaCalc on Jon Udell on the Nerd's Spreadsheet · · Score: 1

    (shameless plug)
    I'm a nerd as well, and built an online calculator/spreadsheet for myself. It's a new take to an old problem: instant answers, inline units (MB, GB), and shareable results. Yes, it handles 850 * 77.1 and more.

    Thought you might find it useful.

  5. Re:exponential photons == not practical on Optical Solution For an NP-Complete Problem? · · Score: 1
  6. Re:I'm Sold. on Transformers Full Theatrical Trailer Available · · Score: 1

    I never thought I'd be arguing about Transformers on an internet forum, but here we are. I support you. Guys, realize that you suspend your disbelief when watching a movie. Sure, alien robots could have evolved. Sure, they could fight. Sure, they could come to Earth and fight. But make the body panels go somewhere! Make the mass roughly the same! (G1 Soundwave included... that bothered me even as a kid). Inconsistencies beyond the realm suspended disbelief jolts you out of the illusion. Star wars isn't "realistic" (or about as likely as transformers), but it's fine within that universe. But when they try to do crazy things like explain the force as being a physical property in your cells (ooh... can I have a force transplant?) the movie gets really bad really quick. My .02

  7. False Choice on People Don't Hate to Make Desktop Apps, Do They? · · Score: 2, Insightful

    People often get stuck in a false dichotomy when choosing between a web and desktop app.

    The simple answer is to use the web version for what it's good for (centralized updates, rapid development) and the desktop version for what it's good for (performance, offline access).

    Some apps run a local webserver on a non-standard port (Yahoo Music Engine) to create a hybrid model. Javascript/HTML can be a very effective rapid prototyping tool.

    For instacalc, I have an online version and downloadable gadgets to fill this need. I use both thunderbird (fast access to mail, offline access) and gmail (access from any computer) to read my email. The "secret" is letting a web app be a web app, and a desktop app be a desktop app. Use the right tool for the job.

  8. Re:Watch the Video on French Train Breaks Speed Record · · Score: 1

    Yeah, it's pretty mind-blowing. 350 mph is 500 feet per second!

  9. Re:Teacher shortage? on Paying for Better Math and Science Teachers · · Score: 1

    Shameless plug -- I have a tool that can help you convert your yearly salary into dollars per hour. Thought you might find it useful for this discussion :)

    http://tinyurl.com/328b3d

  10. Re:Blu-Ray? on Decryption Keys For HD-DVD Found, Confirmed · · Score: 1

    FYI, I put your numbers into a calculator here:

    http://tinyurl.com/ydzspv

    You can play around with different refresh rates, color depth, etc.

  11. Re:Explanation & Possible Solutions on GMail Vulnerable To Contact List Hijacking · · Score: 1

    Thanks for the comment. I had wondered about POST requests as well, but a few sources seem to say that POST requests can be forged using Javascript.

    http://getahead.ltd.uk/blog/joe/2007/01/01/csrf_at tacks_or_how_to_avoid_exposing_your_gmail_contacts .html

    "Switching to POST and denying GET: Forms can be trivially altered with DOM manipulation to forge POST requests."

    I'm not an expert in CSRF (hadn't heard about it till this incident, which sparked my interest), but is this a problem? Do you know how this could be done?

  12. Explanation & Possible Solutions on GMail Vulnerable To Contact List Hijacking · · Score: 2, Interesting

    I posted this on reddit which broke the story earlier, and on my blog. Thought you might find it useful.

    Quick follow-up. On digg someone posted the un-obfuscated code: http://www.cc.gatech.edu/~achille/contacts-source. txt

    How it works

    The code is pretty straightforward. Basically, Google docs has an embedded script that will run a callback function, passing the function your contact list as an object. The embedded script presumably checks a cookie to ensure you are logged into a Google account before handing over the list.

    Unfortunately, the script doesnt check what page is making the request. So, if you are logged in on window 1, window 2 (an evil site) can make the function call. Since you are logged in somewhere, the cookie is valid and the request goes through.

    Also, if you check the object that is returned, you see fields for the contact's name, email and "affinity". Presumably, a higher affinity means a more-emailed contact, so it may be possible to know the relative weight of links.

    Possible solutions

    Google is run by smart people and I'm sure they'll have this fixed soon. A few suggestions appear to be popping up, all centered on making sure the user is on a Google.com page and not a random site:

    Referrer blocking: Block all requests from sites not in the google.com domain. However, some people run referrer-blocking software. It may be the price they have to pay for security, but there could be other consequences.

    Script checks: An idea I had was to check the window.location (just like you check the cookie) to make sure it's coming from a google.com domain. This is another way to see what page is making the request.

    Challenge-response: Google pages (like Gmail) can have some token or unique, computed data that they submit with their requests. Random pages won't have access to this token when they make the function call.

    (From user JRF on reddit): Include part of cookie in the request URL as a unique token that only a "real" Google page would know. Need to watch out for proxies/browser history (accessible from other pages) being able to access this unique data. May need to seed or salt it in a challenge-response system.

    It's interesting thinking of fixes for this - do you have any other suggestions for how Google would fix this?

  13. Re:How much is that in square furlongs? on Giant Ice Shelf Snaps · · Score: 1

    Here's some more helpful conversions:

    66 km^2 in miles^2 = 25.48 miles^2
    66 km^2 in furlongs^2 = 1,630.89 furlongs^2
    66 km^2 in rods^2 = 2,609,432.82 rods^2

    Shameless plug: I made these using http://instacalc.com/beta/, a new tool I've developed. Feel feel to play around for all your conversion/calculation needs :)

  14. Re:Nintendo Sales on NPD Reports November Console Sales · · Score: 1

    Thanks for pulling this together. I whipped up a quick chart to help visualize the difference. It's amazing how many DSs were sold! Nearly double the PSP and almost 5x the PS3.

  15. Re:Well, at least Nintendo is happy ... on Game Consoles Sell Over 3.2 Million Units in November · · Score: 1

    Good catch, thanks. I should have combined it company-wide in the beginning, I was focused on just the next-gen consoles.

    I updated the numbers and it actually looks like Sony actually pulled in the most revenue overall!

    sony = ps3 + ps2 + psp = 254,150,000
    microsoft = xbox360 = 200,000,000
    nintendo = wii + nintendo_ds + gba = 236,900,000

    Surprising, huh? Of course, the ps2 sales may be cannibalizing possible ps3 sales.

  16. Re:Well, at least Nintendo is happy ... on Game Consoles Sell Over 3.2 Million Units in November · · Score: 1

    I plugged in the numbers into an editable chart (shameless plug for my site! :)

    xbox360 = 500k * 400 = 200,000,000
    ps3 = 200k * 600 = 120,000,000
    wii = 500k * 250 = 125,000,000
    ps2 = 500k * 129 = 64,500,000
    nintendo_ds = 600k * 129 = 77,400,000
    psp = 350k * 199 = 69,650,000

    Based off pure revenue, Microsoft appears to take the lion's share with 30%. But as we all know, revenue and profit are quite different. You can play around with the numbers above to get a feel for who's coming out ahead - I may have a mistake in my formulas.

  17. Re:My current explanation / understanding on Origin of Quake3's Fast InvSqrt() · · Score: 1
    Thanks, totally agree. The lack of comments is pretty disturbing, esp. if this is a core routine. It's not immediately obvious if it works on 32- and 64-bit architectures, big or little-endian machines, etc. Although in this case, even if it were commented, the comment might look something like this

    // Computes inverse square: 1/sqrt(x)
    // using Newton's method of approximating roots and a magic number as an initial guess.
    // See this master's thesis paper and the IEEE floating point spec on why I chose this number: ...
    :)
  18. My current explanation / understanding on Origin of Quake3's Fast InvSqrt() · · Score: 1

    The code is extremely clever. Net: It finds the inverse square root [1/sqrt(n)] using a great initial guess and one iteration of Newton's approximation method. It avoids excessive division, the square root operation, and multiplication, which are computationally expensive.

    I'm not an expert, but heres how I understand it:

    1. Background: Newton's method finds roots of any function
    ------

    What does factoring an equation have to do with finding 1/sqrt(n)? A lot. Give me a number n. I now make the function

    f(x) = 1/sqrt(x) - n

    Notice that when you find an x where f(x) = 0, it means x is the inverse square root of n:

    f(x) = 0
    1/sqrt(x) - n = 0
    1/sqrt(x) = n
    x = 1/sqrt(n)

    In other words, I need to find the root of that equation. Newton's method lets you do this by picking a starting value, seeing how far off you are, and getting closer and closer with each iteration. There's more info online. With Newton's method, call your initial guess "g". An better approximation for the root is

    guess_new = g - f(g)/f'(g)

    In our case, f(x) = 1/x^2 - i (where i is the initial value, as seen in the code). We use the power rule to see that f'(x) = -2x^-3, and plug it into the guess_new equation above:

    guess_new = x - (1/x^2 - i)/-2x^-3
    guess_new = x(1.5 - ix^2)

    which is exactly what the code above has. If you keep plugging "guess_new" back in the equation, you can get closer and closer to the answer.

    Here is a demo of multiple iterations to find inverse square: http://tinyurl.com/vh7hg/ Try plugging in different initial guesses (.2, .4, .8) to see how it converges. With me so far? Newton's method finds roots, and finds them fast if given a good guess.

    2. Now our problem becomes: How can we make a good guess?
    ------

    If we had a lot of time, we could just pick a random number and keep iterating using the method above. But that would be slow - we want a *good* guess.

    Well, our best guess for the inverse square root is the inverse square root itself! What's a good way to get 1/sqrt(n)?

    This is the first level of magic. Assume you have a number in exponent form, like this:

    10^6 = 1 million

    If you want to find the regular square root of 1 million, just divide the exponent by 2.
    sqrt(10^6) = 10^(6/2) = 10^3 = 1 thousand.

    If you want the *inverse* square root, divide the exponent by -2 to flip the sign.

    invsqrt(10^6) = 10^(6/-2) = 10^-3 = 1/thousand

    Ok so far? Our goal is to divide the exponent of i (our number) by -2 to get a really awesome guess for Newton's approximation method.

    3. Floats are stored in mantissa-exponent form
    ------

    This is the key. Floating-point numbers have an explicit exponent and mantissa component. Theoretically, we could mask out the bits for the exponent and do division.

    But division is expensive; the code uses another clever hack. Shifting bits is the same as dividing by 2 (or 4, 16, or any other power; the remainder is truncated, which is OK for an approximation).

    So we can divide by 2 easily. And if we want a negative number, instead of multiplying by -1 (expensive), we can just subtract the number from "0" (cheap).

    The program converts the floating point into an integer (using the pointer tricks), shifts the bits by 1 to halve the exponent, and subtracts from "0" (the magic number - hold on) to negate it.

    4. Why the magic number 0x5f37...?
    ------

    We can't just subtract from zero, there's too much going on. First, by shifting the bits we mave move some of the exponent bits into the mantissa. Also, there are different cases of odd/even exponents. The paper goes into lots of special cases, I didn't really understand them all first time around. But the magic number tries to minimize errors, and there can be several magic numbers used.

    5. What's the result?
    ------

    The result is that you get a great initial value to

  19. Re:What is the Purpose of Public Schools? on What's the Problem With US High Schools? · · Score: 1

    Interesting - are there any associations of home schoolers?

    Consider this: If a parent is great at Chemistry, but you aren't, maybe you send your kids to their class. In exchange, you teach a weekly class on your subject of expertise. Maybe the home schoolers chip in to rent a room/equipment from the public school, esp. for a class like Chem.

    Parents can pick what classes to send kids to, kids get to socialize. Not as formal as regular school, but perhaps has some of the benefits.

  20. Time your download speed on 100 Gbps Via Ethernet · · Score: 1

    I've whipped up a calculator to estimate download time:

    Download Time Calculator

    This is all theoretical of course; networking gurus can add in the effect of TCP headers, etc. to get a real throughput rate. Feedback is very welcome, thought you'd find this useful.

  21. Re:Keyboard Input on Impressions From A Second Shipment 360 Owner · · Score: 1

    But wait, this is slashdot... don't we have a polite way to tell users to read the manual? =)

  22. Re:did you fix it for yourself, or for everyone? on Is Linux as Secure as We'd Like to Think? · · Score: 1

    There is also mysql_escape_string which can clean up quotes for you.

  23. Re:Cell Phones on GPS Slowly Changing How Things Are Done · · Score: 1

    not to nitpick, but GPS uses triangulation as well =)

  24. Re:Dumb question to "test" someone. on Pure Math, Pure Joy · · Score: 1

    "How come" does sound colloqial, but I consider it shorthand for:

    If the members of mensa are so clever, how [did it] come [about that] there are so many of them?

  25. martial arts on What's Your (non-tech) Hobby? · · Score: 1

    I really enjoy martial arts, from karate (mainly stand-up striking) to jiu jitsu (groundwork, grappling).