Slashdot Mirror


User: daniel_newby

daniel_newby's activity in the archive.

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

Comments · 53

  1. Re:Learn CSS on Freelance Web Developer Best Practices? · · Score: 4, Insightful

    There aren't many instances where tables give an advantage, and in the few instances it, the advantage isn't significant

    CSS is terrible at sharing horizontal space. Consider a two column page: a sidebar on the left aligned to the left of the page, an elastic-width content column on the right, and a fixed-width margin separating them.

    With a table, the code looks like this:

    <table class="bare-layout-table"><tr>
    <td><div class="sidebar"><% sidebar %></div></td>
    <td><div class="content"><% content %></div></td>
    </tr></table>

    Is that really so bad? All of what you normally consider style is set by CSS. The table is just there to position the content horizontally at sidebar right edge + margin, regardless of how wide the sidebar is at the moment.

    If you use raw divs for this, then you have to lock the sidebar to a fixed width, and manually give the content a horizontal position. Every time the sidebar is resized, you have to pull out a pocket calculator and recalculate, looking up the desired margin from whatever non-machine-readable place you stashed it. This is not good engineering, it is guru full employment. It is X Windows modelines brought to the web.

    float: left is not a solution either. Oh, it will seem to work for a few toy tests. But think what happens if the content ever gets so much as a single pixel wider than you hoped: it gets reflowed vertically below the sidebar to give it that extra pixel. The poor user is left staring at a blank space where the content should be. In the modern context of resizing fonts and single-pixel fixups in Javascript, this effect is almost to be triggered eventually, probably by a junior employee who cannot even recognize what they have done. Quite a number of major websites blow up in this fashion. One feels an urge to pat the designers on the head and take away their crayons.

    That's what the grandparent comment means by "ugly" and "brittle". Good engineering is about making the computer automatically do the hard work, not following the "semantic markup" demagogues off a cliff. Even if it is a damn stylish cliff and all the cool kids are doing it.

    Contrast tables with radical layout changes that can be made with small CSS bits. CSS was a pain before IE6, and IE6 still has issues, but for the most part CSS is an absolute joy to use now.

    CSS is pretty great for controlling typography**. Unfortunately, it provides no way to make block elements simply share horizontal space.

    **But try indenting/outdenting your headings a certain number of ems when they use non-100% fonts. It's pocket calculator time. If you change the indent/outdent/percentages, you have to manually fix-up everything. Dammit, CSS! Learn some arithmetic!

  2. Re:Author is Pedantic on Model-View-Controller — Misunderstood and Misused · · Score: 1

    Those are good points. I wonder what amount of template "power" would be optimal? Preventing changes outside the template's own variables would eliminate most mischief. Arithmetic is nice, and a major shortcoming of Django templates. Defining new classes is probably excessive.

    Must stop designing ... new ... language ...

  3. Re:Event Engine and Cross-Language on Model-View-Controller — Misunderstood and Misused · · Score: 1

    In OO you normally create an object and this means doing a malloc at the C level for every message.

    Many object systems let you assign a custom allocator for high-turnover classes. It is also common practice to keep a pool (or even a pool for each core) of pre-constructed objects (reusing freed objects in MRU order), rather than constantly be tearing down objects and building them back up from scratch. It's more an issue of folks not having experience with high-throughput design, rather than a problem with OOP.

  4. Re:Author is Pedantic on Model-View-Controller — Misunderstood and Misused · · Score: 1

    Django is a good example for the drawbacks of this approach since it went to the extreme and allows almost no logic in the templates - beyond the usual iteration and conditional constructs.

    Which is just a default, not a policy. Django templates are cleanly isolated from the rest of the framework, so any sensible Python template renderer can simply be plugged in. Here's an example of Cheetah templates being plugged into Django with a dozen lines of glue code. Mako looks like it would be trivial to plug in too.

    The result? It's a pain to develop with this part of django. Django constantly gets in the way here because you can't scribble even the smallest thing into a template to see if it works or "feels right", you have to fiddle with the controller or a custom filter all the time - and that becomes tiresome very soon.

    What's wrong with jamming in some "lorem ipsums", fiddling until it renders prettily, then building the necessary view? You can dive in even before the models are built.

    This separation of concerns obviously makes sense in a settled application that is deployed in, say, the publishing business, where you don't want the template guys to accidently screw with production code. ...

    An even better property is that it forces the software engineer to separate the logic from the presentation, no laziness allowed. That makes it dead simple to reuse the logic for any number of presentation formats. For example, suppose you make a web page that shows a completed e-commerce purchase. With more templates and a few lines of glue code, the logic can be trivially reused to generate an e-mail copy of the order form, a .csv for the accounting system, a WAP version, shipping labels, a packing list, a PDF RMA label, and so forth.

    This is critical for maintainability. With a typical PHP-like system, there is an almost irresistible temptation to copy-and-paste code to make multiple presentation documents, a recipe for unfixed bugs and version drift. This potential problem is why Django is very big on the DRY principle, Don't Repeat Yourself. And still it is not mandated, just a handy default that steps aside if you know better.

  5. Re:Nope, sorry on Ender in Exile · · Score: 1

    While doing drugs and engaging in rampant promiscuity are things I don't really condone, inciting hatred, bigotry, ignorance, and possible violence is on a whole other level.

    Ah, but that is Card's entire point. Gay "marriage" would apply those standards of behavior to child rearing. The predicted course of events is as follows:

    1. Gay "marriage" is approved.

    2. Billy Cornhole goes to the Mineshaft club, drops enough Ecstasy to make a rabid wolverine feel friendly, and spends all weekend screwing anything warm that moves. And a few things that are cold and/or non-moving.

    3. Billy wakes up Sunday evening to find that he is married. To whom takes a while to remember.

    4. Billy and spouse get into an epic cat fight about something silly a few weeks later and part ways. Billy finds that divorce is expensive, time consuming, annoying, legally risky, etc.

    5. Billy successfully lobbies, by a combination of threats and charisma, to make divorce instant, cheap, and zero risk. And he would indeed be right that, given the adaptation of marriage to gay sybarites, divorce must also be adapted to be fair.

    6. A generation of people are indoctrinated by the leftist propaganda machine that this is how divorce should be used in our brave new anything-goes society.

    7. Those people grow up and do what they were taught: they act as if marriage, and therefore children, are disposable inconveniences.

    It is not bigotry or hatred for Card to say that this is cultural suicide** and should be stopped. If he is wrong or misguided or improbable, then the gay leaders should explain how and discuss the matter logically, rather than vilify and terrorize their campaign opponents. Instead it appears as if many of the gay leaders cannot imagine that anyone would think screaming, puking babies are one of the greatest goods in the universe, so they incorrectly infer that their opponents' actions must be personal attacks, and therefore leap to personal accusations of bigotry and hatred.

    **Remember that the Spartans did not meet their doom in battle or plague. They neglected fertility and child rearing, in a context of homosexual indulgence, and gradually just faded away.

    It is also worth noting the history of the Mormons (Card is Mormon) for those who do not know. Due to their sexual unorthodoxy (polygamy), in the mid 1800s they were cast out of mainstream American society, driven away with naked violence, and exiled to parts ever more westward, ending in Utah. As a result, they tend to have a natural sympathy for underdogs and outcasts. However their history also gives them a powerful devotion to family and and its preservation at any cost, a devotion that is not simply a tradition but codified in writing. It is the latter motivation that the gay "marriage" advocates are bumping up against and (deliberately?) misinterpreting as bigotry to stoke the fires of their political movement.

    We should also note that, in many jurisdictions, gays already have civil union laws that their lobbyists can modify to their hearts' content, and such laws are inevitable in virtually all jurisdictions. They can already get legal sanction for behaviors mundane or outlandish. The battle for recognition and support is over: they won. Gay "marriage" is not about supporting homosexual households and families, it is about forcibly remaking marriage for all people as an act of cultural aggression.

  6. Re:A beam from the LHC can melt a 500kg block of c on Experimental Magnetic Shield Against Cosmic Rays · · Score: 4, Informative

    What needs to be mentioned if such a statement is to be of any use, is how long such melting is expected to take.

    According to this CERN page, in the few microseconds that it takes a beam dump to complete. The circulating kinetic energy of the beam is an impressive 350 MJ, equivalent to running a 1000 watt heater for 97 hours.

  7. Re:coincidence? on New Type of Particle May Have Been Found · · Score: 2, Informative

    That's why I will believe the summary when a significant amount of particles fit for scientifically publication (say, 20) are detected.

    The number of unexpected particles is ~10**5. This is not a statistical phantom, although the physical significance remains to be seen.

  8. Re:Applications and deeper questions on Memory Molecule Identified · · Score: 1

    I'm wondering whether there's a large amount of calcium in breast milk, and whether that influences the babies' ability to form memories.

    Yes. No.

    Long term (weeks to years) calcium balance is tightly controlled by regulating absorption and excretion. The short term (hours) level of free calcium in the blood is tightly regulated by adding or removing it from the large stores in the bones. These regulatory processes keep the amount of free calcium in the brain more or less constant under healthy conditions. If dietary calcium levels are low or high enough to have a big effect on memory formation, it is likely that drastic damage has already been done to other organs (bones, teeth, kidneys).

  9. Re:note to self on Sprint Cuts Cogent Off the Internet · · Score: 1

    Of course, instances like this and worrying about peering agreements always leaves me wondering: why can't we build some kind of national government owned backbone that all telcos link in to, just so we don't have to count *entirely* on peering agreements to keep traffic going?

    Let's define some words.

    Peering: There are two networks. Each network is transmitting about the same amount of data to the other. They could pay each other for the service, but the amounts would be about equal, leading to little net income. Therefore they enter into a (difficult to audit or tax) peering agreement to exchange traffic for free. One hand washes the other. Until one hand stops washing.

    Transit: Delivering data for a fee.

    What Sprint has done is to withdraw from the peering agreement, dropping Cogent like a hot potato like so many of Cogent's other peers in the past. Cogent is probably being a net.buttmunch and refusing to successfully negotiate a transit contract, while shamelessly playing the victim card.

  10. Re:How so? on Underground Lab To Probe Ratio of Matter To Antimatter · · Score: 5, Informative

    Who says there is more matter than antimatter in the universe? Has anyone ever gone to the Andromeda galaxy? So how do we now it consists of normal matter?

    Gas is observed between the galaxies, but not the hard radiation that would be produced when it reached a galaxy and annihilated.

  11. Re:Upgrade on Hubble Repairs Hindered By Antiquated Computer Systems · · Score: 1

    I would hope it involves putting the everything in a radiation shielded box.

    Unfortunately, cosmic rays include a lot of high-energy particles, including rare individual particles that have the kinetic energy of a .22 rifle bullet. The problem is that when you stop a very-high-energy particle, it produces a shower of high-energy products that are traveling in about the same direction, those particles produce their own showers when stopped, and so forth. If you use shield that is thick enough to stop, say, half of the radiation, you will have positioned the electronics at an intense part of the shower, and the radiation will be lower-energy particles that do more damage per particle (they interact more strongly with light elements like silicon and carbon). Stopping the collision product showers takes thick shielding, probably tonnes for a big boy like the Hubble, which would cost tens of millions of dollars to launch (and require an extremely expensive mission to de-orbit it when the telescope is scrapped). You can pay for a lot of fancy chips the $100M you save on shielding.

    Spacecraft also face events like gamma ray bursts, supernovae, and nuclear bombs, which deliver a huge spike of radiation within a second, sometimes within milliseconds. If the electronics are not carefully designed, the semiconductors will turn into a short circuit when this happens: everything fries. Fortunately the chip will burn out quickly and protect the circuit breakers from damage. ;-)

    The usual approach is to use several layers of sheet metal with gaps between to stop micrometeorites, and incidentally stop some of the low-energy nuisance radiation. Then the chips are designed cleverly to reduce radiation susceptibility. For example, they are made with a thin (micron) layer of silicon on top of insulator, instead of the silicon substrate that is used in disposable Chinese toys. (Thick silicon becomes conductive when radiation hits, carrying damage from the 500 micron substrate back to the 1 micron active layer.) This is actually done for high-performance Earthbound chips too, so it isn't exotic, just something not normally applied to 486s. Another technique is to use really large safety margins, so that the transistors can degrade and still work properly.

    Of course with a Hubble sized budget, there is no excuse for not having several back-up sets of the non-custom parts that might not be available in a few years.

    Mission critical chips often have a very long product life, sometimes decades of continuous production, with the full design package kept around in case somebody gets really desperate. I would not be surprised if you can still buy rad-hard 486s today.

  12. Re:Cool Movie - but bad idea! on Simulation of the Mars Science Laboratory Sky Crane · · Score: 1

    "Maybe you could separate the engines from the rover once it's landed but that's probably more complex/risky than a winch and cable mechanism."

    That would actually be simpler and easier, except that the descent rockets produce about 6000 newtons (1500 pounds) of thrust. That kicks up an almighty cloud of debris, which the rover would have to be protected from. That means a dust-proof box, a very reliable door opener for the box that works even if it is dented from a hard landing, and a ramp for the rover to reach the surface with (if it rides atop the lander). The final leg of the landing would also be blind, into a total brown-out (well, red out on Mars).

    Winch and cable sounds daft, but sucks less than the alternatives once you work out the details.

  13. Re:Think they read them anyway? on US House Limits Constituent Emails · · Score: 1

    Paulson is a wholly-owned subsidiary of Wall Street, and a lame duck appointee. He might or might not be evil, but after his make-me-dictator proposal he cannot be trusted. He has the political credibility of a toddler with a loaded revolver.

    PIMCO? Good grief. PIMCO backed a dump truck up to Fannie and Freddy and shoveled out all the bonds that would fit, then lobbied (successfully) for them to be bailed out at taxpayer expense.

    Regardless of qualifications, there is no one I would trust to disburse $700B with no oversight or review.

  14. Re:Think they read them anyway? on US House Limits Constituent Emails · · Score: 1

    Perhaps I haven't been paying close enough attention, but I am under the impression that they intend to pay above the mark to market prices but (well!) below the hold to maturity prices.

    Many of the mortgage pools were tranched (French for "sliced"). For example, a junior tranche might get 10% of the principal and 33% of the interest, while the senior tranche gets 90% of the principal and 67% of the interest. The catch is that losses accrue first to bonds from the junior tranche, and the senior bonds only start seeing a loss when the junior bonds are completely wiped out.

    The trouble is that once a junior bond is wiped out, it is wiped out totally and forever. Its value will never afterward become non-zero. The original Paulson proposal had absolutely no protections against "bailing out" junior bonds first, pissing away the entire bailout fund on worthless paper. The appalling lack of good sense and personal honor in the present administration makes this a foolish proposition, hence the strenuous opposition by people who have been following the financial meltdown.

  15. Re:Yeah... on US House Limits Constituent Emails · · Score: 1

    In the long term most of these assets have a much higher (and more stable) value, but since they're being measured in the short term, these horrible reports are coming out and scaring the shit out of everyone.

    No, the biggest short term problem is that money market fund investors have seniority in order of withdrawal. If a trivial 1% of the fund's investments blow up, and there is a run on the fund, the first 99% of investors get everything, while the last 1% of them get nothing with no hope of any recovery, ever. If Congress were to guarantee each investor a 1% loss of principal, instead of a 1% risk of instant bankruptcy, the money markets would thaw considerably, and the Cannot Make Payroll monster would step back into the shadows.

    The other short term problem is that (1) many financial firms are overlevered and will default on their obligations, and (2) said obligations are the subject of trillions of dollars in CDSes (credit insurance that pays out on default), the fulfillment of which would cause the writer to default, and so forth in a cascade that would bring money flows screeching to a halt. Most of the idiot writers have small net exposure, having purchased about as much CDSes as they wrote, but that does not prevent a systemic collapse. Congress needs to jam all these things on a public exchange so that companies will only have to stand for their net exposure.

    The mark-to-market problem is medium term. Much of the trouble has already been pushed off a while by financial companies moving the troubled assets to Level III accounting (held to maturity), where they can be accounted for in a more fuzzy way and do not trigger a cascading fire sale.

    But all the average scmuck knows about the situation is that the government is going to "throw away" 700bil ...

    Because that was the original proposal, presented during an attempted Pearl Harboring by one of the c*cksuckers who got filthy rich running the scam.

    They've got no idea, no more than the better informed people who are pushing it, and their attempts to get in the way are just causing problems.

    It don't take much to know that suspending the rule of law is a bad idea.

    To use an IT metaphor; the mainframe has eaten itself, and you're trying to fix it, and you've got to do things that may or may not destroy data, but that have to be done regardless just to get the system running again. Is it productive to listen to all the people who have a stake in the data screaming their uninformed opinions?

    It is when 95% of the data can be trivially recreated and the other 5% is life critical. (No, I'm not being overdramatic. Some Americans on the north Atlantic coast are probably going to freeze to death this winter due to dislocations in the heating oil market. If we let the feckless inmates continue to run the asylum, it could be much, much worse.)

  16. Re:Since looking farther = further in time on "Dark Flow" Outside Observable Universe · · Score: 1

    So it would seem interesting that the bodies outside our observable bubble are transmitting information (they exist, they are moving this way, etc) faster than their light itself would reach us.

    The outsider bodies could have affected motions before/during the inflation era, shortly after the Big Bang when the universe was a fraction of its current size. Yeah, that's a dirty cheat of an explanation ...

    My only conclusion is that the bodies are dark, but then I am left wondering why they are concentrated at such an arbitrary point in the universe.

    Indeed. The universe has all sorts of mysterious structures at the largest scales: galaxy superclusters arranged in sheets, billion light year bubbles that appear to be nearly empty, and now this enormous new accelerator.

  17. Re:Since looking farther = further in time on "Dark Flow" Outside Observable Universe · · Score: 1

    If information cannot travel faster than light, and the universe we live in is 13.7 billion years old, how can the universe be larger than a radius of 13.7 [billion] light years if it indeed did begin as a singularity?

    The data strongly suggest that space itself is expanding, allowing two objects to move farther apart without the necessity of them accelerating. Shortly after the Big Bang, the universe appears to have undergone a temporary phase called inflation where space expanded at a tremendous pace, turning a tiny speck into everything we observe today. After that it settled down into a phase described by Hubble's law, expanding at a (fairly) steady rate of 70 km/s/Mpc (Mpc = megaparse = ~3 million light-years).

    The newly-created space also expands, and then the new space from that expands, etc., like compound interest on a loan you are not paying off. Thus for objects beyond a certain distance from us, new distance is being inserted at a rate faster than the speed of light, so that we can never observe them. Things can exist farther away than the limit, but we cannot observe them by their own light.

  18. Re:Email Attachments on To Purge Or Not To Purge Your Data · · Score: 1

    "... getting rid of the "look at my pretty email that looks like a page from a spiral-bound notebook with my company logo at the bottom" images, and the hundreds and thousands of duplicates of those images, would reduce storage requirements, bandwidth requirements, ...

    So parse the MIME headers, separate the files, and store them in a content-addressable filesystem. A content-addressable filesystem hashes each file, then indexes the file under its hash instead of its name. Duplicates are automatically consolidated into a single file.

    Folks who are especially aggressive could even diff each email against all recent emails and extract common fragments. It wouldn't even be especially slow if implemented right.

  19. Re:That's what? on 1,500-Ship Fleet Proposed To Fight Climate Change · · Score: 1

    I don't get this crap, this judeo-christian oriented narrative that humans are separate from nature and somehow 'unnatural' because we behave sort of funny.

    BURN THE WITCH! Secular Puritanism FTW!

  20. Re:While troubling, also cool. on Prions Observed Jumping Species Barrier · · Score: 1

    In my opinion, viruses have more in common with computer viruses than with life. They're not life, they're escaped pieces of 'code' that force a host to replicate and spread it.

    That definition starts to get questionable for the larger viruses. For example, mimivirus has a genome larger than some bacteria, and has many genes of its own for fundamental metabolism. If it used its own cell wall, instead of dissolving into the host cell, everybody would call it a parasitic bacterium.

  21. Re:Rudimentary on Prions Observed Jumping Species Barrier · · Score: 2, Informative

    ... why prions are not broken down into amino acids during digestion, like all other proteins are

    The prion form of the protein is resistant to the enzymes that normally break down proteins, which is why prions are a problem in the first place. Even then the digestive tract blocks large proteins out pretty well, but very rarely one makes it through to start a prion infection.

  22. Re:Um, we've known this for well over 10 years!!!! on Brain Cells Observed Summoning a Memory · · Score: 1

    The idea that neuroscience retreads the ground trod by cognitive scientists, psychologists and psyhcophysicists is essentially and profoundly true. Take the case of light detection ...

    Where the black box observationalists missed photosensitive retinal ganglion cells, the existence of a spatial filter in the human retina, and gave little insight into processes such as cortical spreading depression and sphingolipid storage disorders.

    Gross observation certainly has its place, but it has major limits when it comes to practical achievements. It is the neurobiologists' work on mirror neurons and learning-without-doing that are leading to the first meaningful treatment for post-amputation phantom limb syndrome. It will almost certainly be the probes-and-chemicals scientists who develop the first anti-psychotic drug that does not cause brain damage and/or diabetes, not the psych kiddies doing yet another clever experiment on pigeons.

  23. Re:Addiction for idiots. It's like this: on Defining Video Game Addiction · · Score: 1

    Addiction requires:

    1) Physical dependence (body chemistry changes to require the substance)
    2) Tolerance (body develops an ability to deal with the substance)
    3) Increasing dose (body requires MORE substance for the same effect)
    4) Withdrawal (body goes through clinical recovery before it can function without the substance)

    Nope. Those tend to be correlated with addiction, but are neither necessary nor sufficient.

    Put two rats in identical cages. Implant drug injectors directly into their brains. Rat #1 gets a lever that when pushed squirts cocaine into BOTH animals' brains. Rat #2 gets a lever that does nothing. It turns out that rat #1 becomes a raging junkie, because the action-reward-learning circuits of its brain are hijacked by the drug. However rat #2 does not, because from its psychological point of view, it is receiving random doses that are uncorrelated with its behavior. Yet rat #2 gets the full spectrum of desensitization and withdrawal.

    The scientific literature defines addiction as a behavior that produces no useful result but, in the addictive context, tends to increase the tendency to perform the behavior in the future. E.g., look up "conditioned place preference" on PubMed, a phenomenon which is frequently used in animal models of addiction.

  24. Re:Withdrawal on Defining Video Game Addiction · · Score: 1

    Correction: Withdrawal has very little to do with addiction.

    The opposite is even true: there are plenty of non-addictive drugs with obnoxious and even fatal withdrawal symptoms. The beta-blockers, most of the anti-seizure drugs, certain antidepressants, etc.

  25. Re:It depends on your definition of addiction. on Defining Video Game Addiction · · Score: 1

    Nations do not have addictions. They have interests. :-P