Slashdot Mirror


User: Sunlighter

Sunlighter's activity in the archive.

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

Comments · 115

  1. Color Schemes on Developing for Color Blindness? · · Score: 2, Interesting

    I have a friend who is colorblind and so I have put some thought into this. I think the best thing to do is support color schemes (which can be read from a file or something) and have four color schemes in addition to full color:

    • Red-Cyan (for people who have trouble distinguishing green and blue)
    • Green-Magenta (for people who have trouble distinguishing red and blue)
    • Blue-Yellow (for people who have trouble distinguishing red and green)
    • Grayscale (for people who have trouble distinguishing red, green, and blue)

    I think this is really all you can do. A color monitor has only three spectral lines, anyway -- red, green, and blue -- so if a user has trouble distinguishing two of them, connect those two (so no distinction is necessary), and if a user has trouble distinguishing any of them, connect all three.

  2. Re:Most people do have tin-ears on Motherboard Audio Comes Of Age · · Score: 2, Informative

    Hell, just the other day, I downloaded a voice recording that people absolutely butchered. The guy ripped a CD at 44.1 kHz, and just used some program to change it to 48 kHz -- his theory is that now it sounded better because the sampling rate was higher. Well, anybody with any knowledge of what's going on knows that at best it will sound the same, and at worst it will sound horrible. Well, it sounded horrible, with so many birdies, artifacts. It was unlistenable.

    OK, I can't resist. He should have used sr-convert to convert the audio. It would at least have sounded the same.

    One thing that makes the difference between the sound cards is the quality of the analog phase. A sound card consists of a D/A converter followed by a filter followed by an analog amplifier.

    First of all, the D/A converter can be good or bad. If it's bad, it's bad. Any D/A converter is going to be better -- introduce fewer artifacts of its own -- at the higher sampling rates it supports. That said, some software will pretend to support higher sampling rates than the hardware by doing the cheapest, dirtiest downsampling possible, and in this case your best bet is to downsample to a rate that the D/A actually supports.

    The filter is supposed to get rid of most of the artifacts introduced by the D/A, but it is an analog filter, so it will either come down into your actual audio or it will leave some of the artifacts in place. Also, an analog filter tends to have fixed characteristics. Really good sound cards might select between multiple analog filters depending on the sampling rate, but the bad ones will use one filter for everything. This is why an 8 kHz file sounds so much better when you upsample it to 48 kHz. When the sampling rates are high to begin with, really good oversampling D/A converters can help by producing an area of minimum noise in which an analog filter can roll off gradually, but cheap D/A converters don't do that, and cheap filters can't take full advantage.

    Then there's the amplifier. Any amplifier is going to introduce characteristics of its own, particularly at the low end. An amplifier would burn itself up if it tried to amplify DC, so there has to be a cutoff. Getting a cutoff down to 10Hz requires really large capacitors, so manufacturers face the temptation to use the small cheap capacitors and your frequency response starts rolling off around 100 Hz. Result? No bass. Sometimes they try to compensate for it with software bass boost, but this would be CPU-intensive and would also reduce the output power as a whole. Amplifiers can also have horrible midrange or treble characteristics.

    So sound cards vary a lot, and you might want to check whether your sound card actually supports 48 kHz in hardware. If it doesn't, it may itself be doing the butchering (possibly with your drivers), and your best bet would be to downsample the input file and play it at 44.1, which hardware more commonly supports. On the other hand if you can load this voice file into Cool Edit and see the artifacts in the spectral display, then the guy used a cheap sample converter.

    Good luck.

  3. And the next step... on Piracy Deterrence and Education Act Introduced · · Score: 2, Insightful

    ...is to provide federal funding to run ads against candidates or referenda which would weaken intellectual property laws such as the DMCA, the super-DMCAs, the CDBPTA (did I spell that right?), etc.

    Why wouldn't they? They've already started doing it about candidates and referenda that try to legalize medical marijuana.

  4. Depends on how the display is made on Do Later LCDs Need Screen Savers? · · Score: 5, Informative

    Actually it can be done either way. A liquid crystal, when powered, rotates the polarization of light 90 degrees. When unpowered it has no effect. So, a LCD display is made from two polarizers and a layer of liquid crystals. Consider this:

    • Horizontal polarizer + horizontal polarizer = transparent (white)
    • Horizontal polarizer + vertical polarizer = opaque (black)
    • Horizontal polarizer + liquid crystal + horizontal polarizer = black when powered, clear when unpowered
    • Horizontal polarizer + liquid crystal + vertical polarizer = clear when powered, black when unpowered

    Whether white or black is powered depends on the way the display is made.

  5. Turning Off Screen on Do Later LCDs Need Screen Savers? · · Score: 4, Interesting

    I bought a Dell Inspiron 5000E about three years ago (they are no longer made) with the expensive 1600x1200 LCD display.

    Luckily, it doesnt have this problem. Ive used it every day for three years and not had any burn-in. None. Zero. Zip.

    Another reason I'm glad my LCD doesn't have this problem is this: the energy saver just turns off the backlight. I can shine a bright flashlight on the display and see that the liquid crystals are actually still displaying the screen. Once I even moved the mouse pointer around while the backlight was off, and I could see it with the flashlight. (There is a button which turns off the backlight. It is positioned so that shutting the lid pushes it.)

    Some screen savers also have a tendency to use the same areas of the screen, so watch out. "Blank Screen" is probably best because it really does set all the pixels to black, whether the backlight is on or not.

    I wonder whether it is black or white which causes the pixels to "fade."

  6. Coming Soon on Your Brain May Have Amazing Powers · · Score: 4, Insightful

    This reminded me of two things. First, Larry Niven came up with the idea of a tasp, a device which can remotely stimulate the pleasure center of someone's brain. He also came up with the idea of people running wires directly to the pleasure centers of their brains and thus achieving perpetual electric happiness (like a drug addiction). This might be around the corner.

    Second, I am reminded of the "focused" people in Vernor Vinge's A Deepness In The Sky. They were basically slaves, but their masters made them into savants by using machines to permanently disable parts of their brains. That, too, might be around the corner.

    Cool in a scary sort of way; science fiction still has predictive power.

  7. Re:I Know How a Transistor Works! on A New Bible For Programmers? · · Score: 1

    Well, now they know...

    ...and please substitute "them" for "you" in my last line.

  8. I Know How a Transistor Works! on A New Bible For Programmers? · · Score: 4, Interesting

    There are two kinds of transistors, bipolar junction transistors and field-effect transistors. Bipolar junction transistors are sandwiches made from two layers of N-type silicon separated by a layer of P-type silicon. A bipolar junction transistor has three terminals: an emitter, a base, and a collector. The emitter and collector are connected to the N-type silicon (on opposite sides of the sandwich) and the base terminal is connected to the P-type silicon. When a small voltage is put on the base terminal, current is allowed to flow from the emitter to the collector. (This is for an NPN-type transistor. There is also a PNP type which is the opposite and works with negative voltages instead of positive.)

    A field-effect transistor has three terminals, too, but they are called the source, the gate, and the drain. The source and the drain are connected by a channel made of N-type silicon, but the channel is somewhat narrowed by P-type silicon in the middle which is connected to the gate terminal. When you put a voltage on the gate, it creates an electric field which chokes off the current flow from the source to the drain. There is also a type of field-effect transistor with a channel made of P-type silicon, and the voltages are negative.

    I have done better than implementing a sort algorithm; I implemented keyless 2-3 trees in a functional style and thus speeded up my LR(1) parser generator from 27 minutes to 4 minutes.

    The work of people like us makes the work of people like you possible. So: nyah nyah na-nyah nyah.

  9. Close to Extinction? on Have Humans Come Close To Extinction? · · Score: 4, Interesting

    Arguably, in spite of our numbers, we're close to extinction now.

    Hey, good to know we got out of it last time.

  10. The Matrix? on The Computational Requirements for the Matrix · · Score: 3, Funny

    You can download the Boost library for C++ and have a Matrix in your own computer already. I think it even has a Matrix class. So you can pose and possibly answer important questions like:

    • Is the Matrix square or rectangular?
    • If it's square, what is the Determinant of the Matrix? (My hypothesis: The One. But we'll have to see the last movie to find out.)
    • If it's square, what is the Cofactor Matrix?
    • If the Matrix is square, does it have an Inverse? What is it?
    • Is it a floating-point Matrix, a Matrix of exact arbitrary-precision rationals, or a Matrix of bits like the ones Knuth used in his MMIX processor? (Maybe it's a Matrix of Unicode code points, which would explain those freaky green displays.)
    • If it is floating-point, how does it deal with round-off errors? How does it deal with denormals, infinities, and NANs?
    • If it is rectangular, what would be the result of Gauss-Jordan elimination? (I can imagine Agent Smith wanting to use that.) How long would it take to compute? (If it's not wider than it is long, Gauss-Jordan won't do much good, although in that case you could use Gauss-Jordan on the transpose of the Matrix. If the Matrix is square, Gauss-Jordan will only produce the Identity Matrix.)

    Sure is interesting to think about. (Heh heh...)

  11. Two Possibilities on Finding a Tech-Friendly Novel Editor? · · Score: 5, Informative

    There are two possibilities.

    (1) Your book is so technical that the layperson wouldn't understand it. That would mean that you really do need a technical editor and/or agent. However, your book will be harder to sell to publishers anyway because its audience will be limited to technical people.

    (2) Your book, although it contains technical elements, would really be accessible to anyone. In that case, you don't really need a technical agent; you can use any agent. Such an agent might not be able to critique your technical accuracy, but if you can get the technical stuff right on your own, then it should be an added plus for readers who understand it.

    The only difference between these types of books is that the latter explains things. A book for a general audience can still use technical language, but it makes it extra-clear whether a technical event is good or bad for the characters, and why.

    I'd recommend going for the larger audience. Go over your manuscript pretending to be a non-technical reader. See if a non-technical reader can at least tell what the important plot events are. (If something bad happens, can the reader at least tell it's bad, or is it something that only a technical professional would realize is bad?) Find some non-technical people you know, and let them read the book, asking them if they find it interesting -- if they find your book boring, they are probably passing over technical stuff uncomprehendingly, and missing the main events.

    If your book is targeted for a wide audience, you won't need any special technical skills on the part of your agent or your editor, and, besides, the book will sell better.

  12. Billions in tax money... on Investigating Artificial Black Holes · · Score: 0, Troll

    ...being poured into a black hole.

    Literally.

    How very sad.

  13. Re:Simple solution on Resume Spamming Creates Storage, Legal Snags · · Score: 1

    Sure, want a job as a résumé filer?

  14. Awww, dammit! on MobyGames Database Hits 10,000 Entries · · Score: 2, Funny

    They left out all those games I used to play on my TRS-80 Color Computer! Popcorn! Mega-bug! The Dallas Quest!

  15. It's not wavelength -- it's ECC bits on Blue-Laser DVD Formats Wars · · Score: 1

    The wavelength has nothing to do with it. Yes, more bits are damaged with each scratch, but there should also be more readable ECC bits in the neighborhood of the scratch which can be used to correct the errors caused by the scratch, so it should balance out. Just like RAID 5. If you have four 4 GB discs and you lose one, it's OK. But if you have four 250 GB discs and you lose one, it's OK. ECC is not exactly like RAID but in both cases it is the proportions that matter. If the discs are more sensitive to scratches than before, then either (a) they are not using a big enough interleave buffer, which means that the ECC bits are too close to the damaged bits and are getting damaged with them, or (b) they are not using enough ECC bits because they want the extra 2 GB of capacity.

    They can probably make blu-ray as robust as they want. They just need to use a bigger interleaving buffer, and an ECC which can withstand more errors.

    The format specification should tell you what kind of error-correcting codec is being used in a given format. It's probably worth a look.

  16. Possible Problem on Exec Shield for the Linux Kernel · · Score: 5, Interesting

    I've written a few pieces of code which take advantage of the executability of the stack and the heap. For example if you want to write a just-in-time compiler for some language, an easy way to do it is allocate an area on the heap, let the JIT compiler write the appropriate x86 machine code into that area, and then typecast the area pointer to a function pointer and execute it.

    With this patch, that won't work...

  17. Was this inspired by... on Free Documentation Base - Docs.eu.org Online · · Score: 2, Interesting

    ...the idea for Programmer How Tos?

  18. Interesting... on Web-Based Java Compiler Service · · Score: 2, Informative

    Just some random thoughts.

    DJ Delorie has had a public access compiler up for years. It's based on DJGPP. You could type in a little snippet of source code and get a DOS-extended executable. But you couldn't use C++ and you couldn't set the compiler flags. Probably just as well.

    This kind of service is primarily useful for very small programs. If your Java program is ten lines long, and you have the JRE, this kind of web service is much better than downloading a 40 megabyte compiler. However, I would prefer to download the source for the service and have it on an internal (or secure) webserver that I can control. Java's libraries are large enough that maybe some pretty short programs can do useful things. On the other hand, you usually have to call dozens of functions for even simple stuff.

    This is also made possible by the fact that the compiler is not Turing-complete or anything. Languages like Forth and Common Lisp can be compiled to produce executables, but they make the runtime available at compile time, so you could theoretically write code to open up /etc/passwd and e-mail you a copy during the compile. Even simpler, you could just allocate huge gobs of memory at compile time and try to bring the server down. Here, Java's lack of macros and #include, which to me is usually a disadvantage, can turn into an advantage.

  19. Key Exchange is Safe on More on Cisco Building Surveillance into Routers · · Score: 1

    Also from my limited knowledge of how encryption works, if they can record your key exchange, then it's as if you're not encrypting anything!

    Actually this is not true. Although it is possible to design insecure key exchange algorithms, the secure ones are designed with eavesdroppers specifically in mind (i.e., eavesdroppers cannot learn anything). Otherwise there would be no need for the algorithm.

    The real problem with key exchange is man-in-the-middle attacks, where Bob and Alice think they are exchanging keys with each other, but actually they are both exchanging keys with me, and I'm secretly decrypting and re-encrypting everything while monitoring it. A few extra steps in the key-exchange protocols can prevent even that.

    You might want to check out Applied Cryptography. It demonstrates fairly well how these things work.

  20. Doom III and BitTorrent on Carmack On Doom III And The Evolution Of Graphics · · Score: 2, Insightful

    I know this is off-topic somewhat, but I wonder if the guys at id would consider using BitTorrent to distribute the official downloadable Doom III Shareware when it comes out. That would be much better than offering it by mere FTP. (FTP sites seem to just jam up when big games like that come out, and FileShack is going to have long waits, at least for freeloaders.) BitTorrent is cool.

    (I'm assuming of course that they do come out with a shareware version. As popular as the guys at id are, they could probably skip it, and they know it. Like most gamers, I will buy the game anyway, right after I buy a new 4 GHz Pentium 5. Heh. But if I have a shareware version to run on my old computer, I might decide that I can put up with the low framerate for a while, and buy the full game before I buy a new computer. So they get their money sooner. -- On the other hand, I might decide the framerate is too low, and then I have to wait until I buy a new computer. But at least I'll know.)

    So, guys at id, are you listening? How 'bout it?

  21. Re:Eighth Amendment Problem? on RIAA Seeks Estimated $97.8 Billion From MTU Student · · Score: 1

    True, a claim of civil damages is not a "fine," but at the time I posted (when the headline read "97 trillion dollars") I was thinking that the RIAA can't possibly be claiming that much in actual damages, and thus must be relying on statuatory damages, which, it can be argued, do constitute a "fine," and thus would probably fall under the scope of the eighth amendment.

  22. Eighth Amendment Problem? on RIAA Seeks Estimated $97.8 Billion From MTU Student · · Score: 3, Informative

    The Eighth Amendment says: Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted.

    Are we talking about a claim of actual damages? If so, the RIAA is claiming that it and its members would have made up about 99% of the U.S. economy had this one person not pirated that music. Or are we talking about statuatory damages? In that case I think the eighth amendment would come into play -- that part about excessive fines in particular.

  23. In Other News... on Pennsylvania Refuses to Disclose Banned Website List · · Score: 4, Funny

    It's going to be interesting when they try to prosecute somebody.

    Prosecutor: This guy looked at child porn.

    Defendant: It isn't child porn!

    Judge: OK, let's show the jury this alleged porn.

    Prosecutor: No, we can't do that! It's illegal for the jurors to look at child porn!

    Judge: Well, then let me look at it.

    Prosecutor: But, Your Honor, it's illegal for you to look at child porn, too!

    Judge: Well, dammit, what if it's not porn?

    Prosecutor: Well, then you could look at it. But you realize that if you deem it porn, we can charge you with having viewed it.

    Judge: Well, then, I don't want to risk it. Ladies and gentlemen of the jury, you're just going to have to take his word for it.

    [Jury deliberates.]

    Jury: Not guilty due to lack of evidence.

  24. Donald Knuth Has The Answer on Eleventy What? · · Score: 5, Interesting

    In section 4.1 of The Art of Computer Programming, Donald Knuth describes:

    ...a prominent Swedish-American civil engineer named John W. Nystrom [who] decided to... [devise] a complete system of numeration, weights, and measures based on radix-16 arithmetic. He wrote, "I am not afraid, or do not hesitate, to advocate a binary system of arithmetic and metrology. I know I have nature on my side; if I do not succeed to impress upon you its utility and great importance to mankind, it will reflect that much less credit on our generation, upon our scientific men and philosophers." Nystrom devised special means for pronouncing hexadecimal numbers; for example, [0xC0160] was to be read "vybong, bysanton." His entire system was called the Tonal System, and it is described in J. Franklin Inst. 46 (1863), 263-275, 337,348, 402-407.

    Maybe you should get that issue of that journal and give it a try.

  25. But... Blue is also the Color of the Smurfs... on Plasmon Exhibits Working Blue Laser DVD Drive · · Score: 1