Before you ask, it's a brain. Wearing sunglasses. On a sailboat.
180 stories
·
4 followers

Chemist Eggs

3 Comments and 8 Shares
Chemists actually find it simpler to define a general odor of rotten eggs as a baseline, and the LACK of rotten eggs as a distinct smell.
Read the whole story
Share this story
Delete
3 public comments
jgbishop
5 days ago
reply
This is such a good point; I don't think I've ever smelled a rotten egg (though I know the smell that's referenced).
Durham, NC
rraszews
5 days ago
reply
People also always compare the smell of cyanide to "bitter almonds". But the thing is, bitter almonds don't smell like regular almonds (Regular almonds? They smell almost exactly the same as cherries), and aren't commonly eaten (Because, y'know, they've got a small amount of cyanide in them). The thing you might recognize which smells like bitter almonds and like cyanide is superglue.
Columbia, MD
sirwired
5 days ago
This is incorrect. Bitter almond oil is almost pure benzaldehyde, which is what gives cherries their scent. Sweet almond oil has no scent at all. My parents ran a potpurri business when I was a kid, and Sweet Almond oil is the canola oil of potpurri... used in large quantities (a batch of potpurri might use several oz) as a carrier for other scents (called a "fixative.") Bitter almond oil was used just eydropper-fuls at at time for that distinctive cherry scent. They bought bitter almond in 2 or 4 oz bottles, where they went through Sweet Almond by the gallon.
alt_text_bot
5 days ago
reply
Chemists actually find it simpler to define a general odor of rotten eggs as a baseline, and the LACK of rotten eggs as a distinct smell.

All-in-One

2 Comments and 5 Shares
Changes with this update: If you use the combined scan-shred function, it now performs them in that order instead of the reverse, saving a HUGE amount of CPU time.
Read the whole story
Share this story
Delete
2 public comments
rraszews
14 days ago
reply
No lie, I've been in engineering discussions about the feasibility of coupling a printer, scanner, and shredder as a secure one-way channel to transfer data between isolated networks.
Columbia, MD
gerweck
14 days ago
I hope this was in the vein of RFC 1149
rraszews
14 days ago
In the general area, with a bit more of a "malicious compliance" angle in the face of unreasonable customer requirements.
alt_text_bot
15 days ago
reply
Changes with this update: If you use the combined scan-shred function, it now performs them in that order instead of the reverse, saving a HUGE amount of CPU time.

The Scalzi Endorsement: Joe Biden

6 Comments and 8 Shares
A picture of Joe Biden and the phrase

Original photo of Joe Biden by Gage Skidmore, used under Creative Commons license.

Inasmuch as I have, in fact, already voted for Joe Biden, I think it’s both safe and reasonable to come out and endorse the man to be President of the United States. I also think it’s reasonable to point out that this endorsement will not precisely be the most fulsome and ringing endorsement that I have ever given to a candidate for president, even as I acknowledge and recognize that voting for Joe Biden might have been the most important vote for president that I have ever made, or might ever make. Welcome to 2020, folks. What a fucking mess it is.

To be clear: Joe Biden will (probably) do fine as president. He wasn’t my first choice, or my second choice for that matter, but he picked my first choice to be his Vice President, so that’s all right. Biden is a career politician and in his 78 years has made some exceedingly questionable choices, from casual plagiarism to how he handled Anita Hill during the Clarence Thomas hearings. He has a bit of a tin ear and he is prone to gaffes, some but not all of which can be ascribed to navigating around a stutter. Also, he’s also shown that he can roll with changes and can, when necessary, read a room. He understands the job he’s trying to get, and he really does understand it’s not all about him. He’s your basic pol: Mostly competent, mostly a man of the people, mostly someone who when you look at him, your basic reaction is, well, okay, fine, he can probably do that job.

This is what I mean by not a ringing endorsement! Joe Biden does not set me afire with political passion. He in himself does not strike me as an epochal candidate, the way Barack Obama was, or Hillary Clinton might have been as the first woman president. He’s old, white, middlin’ and middle of the road. Certain sitcom characters aside, he does not inspire fervor in anyone. Even the character assassination of him from the foamy right lacks real passion, in no small part because he is old, white, middlin’ and middle of the road, and not, say, a black man, or a woman. No one expects greatness from Joe Biden. They expect adequate competence. He’ll probably be fine is the mantra here.

And he will, again, probably do fine! He’ll be just fine. His administration will be just fine, full of smart, competent people who will also do just fine, not a revolution but maybe some decent, solid steps forward to where we as a nation need to be. His fuckups will keep the Sunday talk show people employed but normal people won’t have to care much. A Biden administration will probably not consume every waking moment of your day with an existential dread about what awful racist shit it’s up to now, and how it might undermine the basic fucking fabric of American society.

Which, oh, hey, brings us to Donald Trump, the monumental fuck-up who is currently president, and who, as I write this, is careening through the White House, pumped up on steroids and experimental drugs, shedding viruses like a white cat sheds on a black shirt, and is thinking that lurching out of a hospital to wantonly infect others somehow projects strength, not sociopathy.

He is, literally, the worst. After four years, I don’t feel I need to break out all the reasons that he is the worst, although to lightly gloss, it’s to do with the corruption, the white supremacy, the self-dealing, the incompetence and the fact that 210,000 Americans (so far!) have died from a viral pandemic that Trump even literally today, as it infects his own body, wants to pretend is not that big of a deal, and choses to do nothing useful about. The worst! The worst president in living memory for certain.

(Of all time? It’s a fight! James Buchanan actually broke the country so he might be the least competent president, and Andrew Jackson is pretty much the platonic ideal of a genocidal asshole, so he might be the worst human to be president. But Trump comes a close second in both categories! So he might be the worst president of all time simply on points. But even if Buchanan or Jackson (or Andrew Johnson, who was no treat either, or Warren G. Harding, I mean, shit, we really do elect some awful people to the gig) squeak by, again, no one alive has seen a worse president. No one alive has seen one so willfully unprepared for the job, one so disinterested in the job, one so ignorant of its scope, or one so unconcerned how all of that will affect those who have to suffer his administration, staffed as it is with incompetents and grifters because saner and smarter people either would have nothing to do with it, or left when they realized that Trump wanted sycophants, not useful advisors.)

The United States is not a better place for having Trump as president. The world is certainly not a better place. Most Americans are not better off now than they were four years ago. As much as Trump and his proudly ignorant, proudly racist and proudly angry supporters would like to suggest otherwise, a whole lot of the blame for all of that can be laid squarely at Trump’s door. Trump had no plan to be president — he didn’t want to be president, he just wanted attention — and he has no plan on what to do for another four years as president. He doesn’t want to be president now; he just doesn’t want to be branded a loser, and he doesn’t want to be on the hook for the hundreds of millions of dollars in personal loans coming due in the next few years. His presidency was born of grift and desperation, with a heavy dollop of white supremacy that history, I assure you, will find unforgivable.

Trump did not deserve to be president, does not deserve the job now, and certainly does not deserve another four years of it. Given the prospect of another four years of literally the worst president in living memory and possibly of all time, almost anyone the Democrats could have nominated would have had my vote in the general election. This was a done deal as of November 9, 2016, because it was pretty clear to me how bad the next four years were going to be, nor was I wrong. It makes no sense to deny that for the 2020 election, I was going to vote against Trump far more than I was going to vote for whomever the Democrats offered up.

Four years ago, I don’t think I was expecting that would be Biden, who will come into the White House as the oldest person to be elected to the job. I honestly believed that he figured he missed his shot, would write a memoir and then fade out. Surprise! Here we are, and here is Biden, and here is the 2020 election.

It is, to be clear, the most consequential of the nine presidential elections I have to date voted in. We get to decide whether we will get four more years of corruption, of white supremacy, of self-dealing and of, literally, plague… or at least four years of not all of that. Four years of probably decent, probably unremarkable governance, by and from people who mostly know what they’re doing and mostly want to be useful when they do it, headed up by Joe Biden.

I’m not at all certain America will ever recover fully from four more years of Donald Trump. I’m very certain we can survive, and perhaps even thrive, with at least four years of Joe Biden.

So yes, Joe Biden, all right, fine, you’ll do. You got my vote. I hope you will get the vote of the majority of Americans, and (critically, due to our fucked-up system of choosing presidents) enough of the votes in each of the fifty US states to get you well above 270 electoral votes.

And more than that, I actively endorse you for president and encourage everyone to vote for you, so you can be a calm, unflashy, quiet, competent president who allows us all to fucking not have to concentrate on what terrible, awful, undemocratic and unamerican thing you are doing today, just because you want to and the people you surround yourself with are too ignorant and too corrupt to stop you.

Please be a perfectly fine president, Joe Biden. I need sleep. And so does everyone else. Thanks.

— JS

Read the whole story
Share this story
Delete
6 public comments
dsmotivations
12 days ago
reply
Nice
sirshannon
14 days ago
reply
Just Biden time until 2028.
MaryEllenCG
14 days ago
reply
"So yes, Joe Biden, all right, fine, you’ll do. You got my vote. I hope you will get the vote of the majority of Americans, and (critically, due to our fucked-up system of choosing presidents) enough of the votes in each of the fifty US states to get you well above 270 electoral votes.

And more than that, I actively endorse you for president and encourage everyone to vote for you, so you can be a calm, unflashy, quiet, competent president who allows us all to fucking not have to concentrate on what terrible, awful, undemocratic and unamerican thing you are doing today, just because you want to and the people you surround yourself with are too ignorant and too corrupt to stop you."
Greater Bostonia
LeMadChef
15 days ago
reply
"His administration will be just fine, full of smart, competent people who will also do just fine..." What a day we live in to look forward to this.
Denver, CO
CallMeWilliam
16 days ago
reply
And more than that, I actively endorse [Joe Biden] for president and encourage everyone to vote for you, so you can be a calm, unflashy, quiet, competent president who allows us all to fucking not have to concentrate on what terrible, awful, undemocratic and unamerican thing you are doing today, just because you want to and the people you surround yourself with are too ignorant and too corrupt to stop you.
rraszews
16 days ago
reply
"Good enough" is, quite literally, good enough.
Columbia, MD

You Know What’s Cyberpunk? The California Sky Right Now! #cyberpunk

1 Comment

“The sky above the port was the color of television, tuned to a dead channel.” William Gibson, Neuromancer

Starting this morning, people in the Bay Area of California began posting pictures of the dark, hazy-orange, smoke-choked sky in the area. Many pointed out that this is the same color sky seen in Dune 2049 and the post-apocalyptic real-world in The Matrix films. Others made allusions to nuclear winter, waking up on Mars, or like it was the end of the world.

As if we needed any more unsettling reminders that we are living in the cyberpunk now. Where is our Neo when we need them?

[Above image, Oakland this AM, Krisztina Lazar. Bottom image, scene from Blade Runner 2049.]

Read the whole story
Share this story
Delete
1 public comment
rraszews
42 days ago
reply
"The sky above the port was the color of television, tuned to a dead channel. Black, with a big floating box that said 'NO SIGNAL'"
Columbia, MD

Constellation Monstrosity

2 Comments and 5 Shares
It's rare to get both astronomers and astrologers equally mad at you, but apparently I've messed up both a bunch of star location databases AND the will of the fates.
Read the whole story
Share this story
Delete
2 public comments
rraszews
44 days ago
reply
The Celestial Centipede
Columbia, MD
alt_text_bot
44 days ago
reply
It's rare to get both astronomers and astrologers equally mad at you, but apparently I've messed up both a bunch of star location databases AND the will of the fates.

CodeSOD: Win By Being Last

1 Comment

I’m going to open with just one line, just one line from Megan D, before we dig into the story:

public static boolean comparePasswords(char[] password1, char[] password2)

A long time ago, someone wrote a Java 1.4 application. It’s all about getting data out of data files, like CSVs and Excel and XML, and getting it into a database, where it can then be turned into plots and reports. Currently, it has two customers, but boy, there’s a lot of technology invested in it, so the pointy-hairs decided that it needed to be updated so they could sell it to new customers.

The developers played a game of “Not It!” and Megan lost. It wasn’t hard to see why no one wanted to touch this code. The UI section was implemented in code generated by an Eclipse plugin that no longer exists. There was UI code which wasn’t implemented that way, but there were no code paths that actually showed it. The project didn’t have one “do everything” class of utilities- it had many of them.

The real magic was in Database.java. All the data got converted into strings before going into the database, and data got pulled back out as lists of strings- one string per row, prepended with the number of columns in that row. The string would get split up and converted back into the actual real datatypes.

Getting back to our sample line above, Megan adds:

No restrictions on any data in the database, or even input cleaning - little Bobby Tables would have a field day. There are so many issues that the fact that passwords are plaintext barely even registers as a problem.

A common convention used in the database layer is “loop and compare”. Want to check if a username exists in the database? SELECT username FROM users WHERE username = 'someuser', loop across the results, and if the username in the result set matches 'someuser', set a flag to true (set it to false otherwise). Return the flag. And if you're wondering why they need to look at each row instead of just seeing a non-zero number of matches, so am I.

Usernames are not unique, but the username/group combination should be.

Similarly, if you’re logging in, it uses a “loop and compare”. Find all the rows for users with that username. Then, find all the groups for that username. Loop across all the groups and check if any of them match the user trying to log in. Then loop across all the stored- plaintext stored passwords and see if they match.

But that raises the question: how do you tell if two strings match? Just use an equality comparison? Or a .equals? Of course not.

We use “loop and compare” on sequences of rows, so we should also use “loop and compare” on sequences of characters. What could be wrong with that?

/**
   * Compares two given char arrays for equality.
   * 
   * @param password1
   *          The first password to compare.
   * @param password2
   *          The second password to compare.
   * @return True if the passwords are equal false otherwise.
   */
  public static boolean comparePasswords(char[] password1, char[] password2)
  {
    // assume false until prove otherwise
    boolean aSameFlag = false;
    if (password1 != null && password2 != null)
    {
      if (password1.length == password2.length)
      {
        for (int aIndex = 0; aIndex < password1.length; aIndex++)
        {
          aSameFlag = password1[aIndex] == password2[aIndex];
        }
      }
    }
    return aSameFlag;
  }

If the passwords are both non-null, if they’re both the same length, compare them one character at a time. For each character, set the aSameFlag to true if they match, false if they don’t.

Return the aSameFlag.

The end result of this is that only the last letter matters, so from the perspective of this code, there’s no difference between the word “ship” and a more accurate way to describe this code.

[Advertisement] Otter - Provision your servers automatically without ever needing to log-in to a command prompt. Get started today!
Read the whole story
Share this story
Delete
1 public comment
rraszews
56 days ago
reply
'there’s no difference between the word “ship” and a more accurate way to describe this code.'

Interestingly also true had the comparison validated all the characters EXCEPT the last one.
Columbia, MD
Next Page of Stories