Tag Archives: need coffee

I’m a donor for Folding@Home (and you can be as well)

I’m not a fan of IT hubris. I cringe -literally- when I hear stuff like “let’s fight cancer (or whatever) with scrum”. You don’t fight diseases with IT; at best, you can help.

But help can be important. One problem that IT is very well suited to solve is understanding how viruses and bacteria behave under certain circumstances. The Folding@Home project explains:

WHAT IS PROTEIN FOLDING AND HOW IS IT RELATED TO DISEASE?
Proteins are necklaces of amino acids, long chain molecules. They are the basis of how biology gets things done. As enzymes, they are the driving force behind all of the biochemical reactions that make biology work. As structural elements, they are the main constituent of our bones, muscles, hair, skin and blood vessels. As antibodies, they recognize invading elements and allow the immune system to get rid of the unwanted invaders. For these reasons, scientists have sequenced the human genome – the blueprint for all of the proteins in biology – but how can we understand what these proteins do and how they work?

However, only knowing this sequence tells us little about what the protein does and how it does it. In order to carry out their function (e.g. as enzymes or antibodies), they must take on a particular shape, also known as a “fold.” Thus, proteins are truly amazing machines: before they do their work, they assemble themselves! This self-assembly is called “folding.”

WHAT HAPPENS IF PROTEINS DON’T FOLD CORRECTLY?
Diseases such as Alzheimer’s disease, Huntington’s disease, cystic fibrosis, BSE (Mad Cow disease), an inherited form of emphysema, and even many cancers are believed to result from protein misfolding. When proteins misfold, they can clump together (“aggregate”). These clumps can often gather in the brain, where they are believed to cause the symptoms of Mad Cow or Alzheimer’s disease.

The project has made it very easy for anyone to help. You just download and install their software, and your computer starts calculating, solving math problems -essentially, you’re giving your computer’s processing power when you don’t use it. You can see your -and other’s- contribution in the project stats.

I heartily encourage you to do so.

That’s my HP i7, sitting in the attic and doing what little it can to help beat COVID19.

Signs that you need coffee, #5

You wake up on a beautiful sunny Swiss Sunday morning.

You go in front of your filter coffee machine which, spoiler, you have programmed to brew a coffee on a fixed time every day except Sunday.

You wait, like, 5 minutes in front of it wondering why there’s no coffee in the pot and pondering conspiracy theories which you will not confirm nor deny to include coffee-snatching aliens from Tau Ceti.

How I fought off a Facebook hacker -and how to avoid getting hacked yourself

Last night I helped a close friend: I successfully fought off a Facebook account takeover. It wasn’t easy. I sweated for a couple of hours until I got it done. And I even had to face a rather unsophisticated, or maybe just lazy, enemy. Here I’ll recap what happened and give some easy but effective advice that you can easily use .

What happened?

As it happens with many IT professionals, I’m the go-to person for any computer related problems for family and friends.

My friend called me, frantically trying to explain that someone, using his Facebook account, was using Messenger to send personal messages to all his contacts. The message was in casual language, like you would talk to a friend, claiming that he had lost his wallet and asking if the friend has an account in a certain bank (obviously the bank had nothing to do with this). Most importantly, the message didn’t look obviously fake.

“Good evening.. how are you?!! I’m here and there. I lost my wallet 😦 Can I ask you something.. do you maybe have an account in Piraeus Bank? I need a big favor, I lost the bank card as well :(“

The response

Mitigation: informing people

To avoid people actually sending money, I logged into Messenger with my friend’s credentials and started sending messages to people that were replying, concerned about what had might have happened to their friend. I opted for something short, clear and alarming: “I’VE BEEN HACKED PLEASE IGNORE IT’S A VIRUS” (yes, I know that technically speaking that’s not especially accurate)

But the enemy was active and chatting with 2-3 of the contacts. In these cases, I saw my message being deleted.

I noticed that all his messages were more or less the same; he had some kind of playbook and was copy-pasting text, maybe slightly changing the text to fit the conversation.

And in one case he came close to being victorious: before I could sent the “please ignore” message, one of the contacts sent him some bank details -not sure what exactly as the message was deleted by the enemy, presumably after copying it. The contact then saw my message and replied alarmed “I sent him, what do I do now???” to which I replied “Call your bank NOW and lock your account and credit card”. I hope that helped; I’ll definitely follow up on that.

Taking back control of the account

The enemy hadn’t changed any password, so I was able to log in. Remember that Messenger accounts are controlled in Facebook (unless you have a Messenger-only account, which was not the case here). So the first thing I checked was the active sessions in Facebook (Settings > Security and Login Settings > Where You’re Logged In). That was what I got:

Unfortunately I didn’t know at the time that you can hover over the session with the mouse and get more info, like the session’s IP address. Had I done that, we could have a chance to retaliate -like going to the police.

My friend uses an Ubuntu laptop (which I set up for him), a Windows PC at work and a Samsung mobile where he uses Facebook and Messenger through the apps. So the first 3 sessions were almost certainly the enemy. I immediately disconnected him. Then I changed the password.

But we were not out of the woods yet.

The Empire Strikes Back

After changing the password and believing that I had locked him out for good, I continuing notifying people in Messenger. But after a few minutes, I suddenly saw a fresh batch of the same message being sent. My friend has around 500 contacts (“friends”) and I suppose there’s some limitation from Messenger so the enemy wasn’t able to send his message to everyone at once.

How was this possible? I had changed the password and disconnected his sessions. I glanced at Facebook Settings (“Where You’re Logged In”) and, sure enough, new sessions of the Huawei Mate 8 were there. He couldn’t have guessed the new 18-character completely random password I had set. I tried logging into Facebook from a private browser window and I got “Wrong password”. Hmmm… the options I had from Facebook for changing a forgotten password was 1) SMS 2) email 3) recognize people in pictures. Until that point, I had used SMS. So how did he do that?

I called my friend:

Me: please tell me that you don’t have the same password in your email as in Facebook
(note: his password was something like “oldman53#”)
Friend: no I don’t
Me: so what’s your email password?
Friend: The same but without the # at the end

NICE. Well that’s really damn secure I thought to myself, though I didn’t say anything -didn’t want to castigate my beleaguered friend, I’m saving that for the weekend 🙂

So first thing, as people were already replying in Messenger and there was real danger of someone sending money, I had to stop him getting in. So I went to Facebook settings to change the email.

The thing is, with the password already changed and unknown to me, I had to reset the password first. And Facebook wouldn’t send an SMS anymore, after having used it a few times already.

Return of the Jedi

So I had to resort to face recognition. The process presented me with 3 photos at a time, for a total of 5 people, and a list of possible names from the friends list. There was the option “I don’t know”, but you could use it only twice -then you were out.

Obviously these people were unknown to me, so I had to send them through What’s App to my friend. It took us around 10 precious minutes but at the end it worked. I immediately changed the email to one that I own (and has a decent, unique password and multi-factor authentication!).

After that, I disconnected his sessions and that was the end of it, I didn’t see him again. I quickly headed over to outlook.com, where his email is hosted, changed the password there and added two factor authentication by SMS.

I anxiously kept monitoring Facebook’s sessions in case he somehow came back on one window and at the same time continued to notify the hundreds of people he had sent his message to. At the same time I tested, with a private browser window, that I even knowing the password I couldn’t login to Facebook or outlook.com without an SMS to my friend’s phone.

After around half an hour had passed, I felt the worst were behind us. I called my friend and told him to log in to Messenger and continue talking to people.

Some conclusions

To be clear, the reason this happened was because my friend, like many, many people, had bad password hygiene. He was using relatively easy (for a machine) to guess passwords but most importantly, he was reusing passwords between web sites. And web sites get passwords stolen. A lot.

What can you do to avoid this happening to you? Start from the low-hanging fruit. You get very decent security with very little effort.

So here’s a small TODO list:

  • Use random long (18 character or more) passwords. If it’s really random (e.g zGasd6t7a6tgQaERys6Ld5AoVF567) you don’t even need symbols. Don’t create them by hand, use a password generator (like this).
  • Use unique passwords. Every site or service you use needs to have its own. It will get stolen, eventually, but the damage will be contained to this site only. And no, oldman53 and oldman53# are NOT really different.
  • The two points above are basically impossible for a human to do. So you need to use a password manager. I use LastPass and I’m very happy with it. It costs around EUR 35 a year. If you want a free alternative use either Bitwarden or Firefox Lockwise. UPDATE: I’ve moved to Bitwarden Premium (just $10/year) and I’ve never been happier. I also recommend Bitwarden Free (+ Authy for 2FA) for any my friends that don’t want to pay a cent.
  • When available, use two-factor authentication (2FA); you might also see it named as multi-factor authentication (MFA) or two-step validation (2SV, that’s what Amazon calls it). This is an absolute must. 2FA is when, in order to login to a service, you need a username, a password plus something more. Usually it’s an SMS, and that’s fine, but even better you can use an authenticator app. LastPass has its own, and its backed up in your LastPass account, but if you want a free alternative get either Authy or the one from Microsoft which is backed up in your Microsoft account. Obviously your authenticator backup needs to be well protected, so use two-factor for this as well -but a different one in case you lose access to it, so here SMS is better. UPDATE: Bitwarden Premium (not Free) can store 2FA in the same record where you store the site’s username & password. What’s really really really convenient with this is that, as soon as it fills in the password, it auto-copies the 2FA token to the clipboard, saving you the hassle. It doesn’t sound much but if you login to many different sites every day (as I do), you’ll love it.
How much effort is this?

I did this with my friend so I got a taste. Note that I’m in Switzerland and he’s in Greece, so he did the whole process with me giving instructions on the phone -which slowed us down considerably. But on the other hand I knew what had to be done, while less experienced users might be not so comfortable when doing this for the first time. We used Bitwarden + Authy.

  • It took us around 90 min to set up Bitwarden and Authy, and then add all his passwords there. We set it up on his laptop and two mobile phones.
  • It took another hour to change the password for the most important services (Gmail, Outlook.com, Paypal and Facebook) and to set up two-factor authentication.
  • Add to that another 45 minutes of training, for him to learn to use a password generator, the password manager and 2FA. Basically how to use really long and random passwords when signing up to web sites, how to save the passwords in Bitwarden, how to log in from the laptop or phone without having to type the password and how to add 2FA (where available) in Authy.

So that was, what, almost three and a half hours in total. It’s not trivial. But trust me, if you find yourself in his shoes you’ll wish you had done it already. It’s time well spent 🙂

Signs that you need coffee, #4

You go at the office machine and put an espresso cup in place, which can hold about 60 ml max.

You slide in an espresso capsule.

You press the “Large” button which, spoiler, produces around 110 ml coffee.

You stand in front of the machine in amazement while the coffee overflows the cup, wondering what went wrong.

You thank your good fortune that spared you the embarrassment as no colleague was in the company canteen at that time 🙂

How to make an espresso / cappuccino freddo

So you went for vacations in Greece or Cyprus or southern Italy and liked the cold coffee they serve there? Or maybe you have a Greek colleague who’s busting your balls non stop about how great cold coffee is, and just want him to shut up? You’re at the right place!

Now you’re talking’

These recipe is for both espresso freddo and cappuccino freddo which are exactly the same thing; you just add cold foam milk on top of the espresso freddo to make the cappuccino version.

Over the years I’ve tried to simplify the recipe a bit. It’s not barista-level good, but anyone who’s tried it tells me it’s pretty decent.

You can see the video here:

To begin with, here’s the equipment you need:

  • A strong coffee mixer. This is an absolute must, you can’t do without it. Outside of Greece they are called “drink mixers” (you can find them in amazon.de for example). They look like this:
mixer
  • One or more suitable tall glasses. You need them to be around 200-250 ml for espresso freddo and 300-350 ml for cappuccino freddo. The ones from IKEA are fine.
Trinkglas
  • Two cocktail shakers, one for the milk and one for the coffee. It’s ok if you don’t have shakers though, you can just use normal glasses. But you can also buy them from amazon.de.
shaker

Now let’s see the stuff you need to prepare every time before you make cold coffee.

  • I’m sure you’ll be surprised to learn that you need coffee! Basically you need a double espresso, around 100ml. What I usually do is use the Lungo capsules for my Dolce Gusto machine, and set it to 3 lines instead of 4.
  • You also need straws, medium or thin ones. Don’t get the thick ones, they’re good for smoothies but not cold coffee.
  • You need ice cubes. For every coffee, you need 5-6.
  • If you’re going to make cappuccino (not espresso) freddo, you need milk, and you need it cold. Let me say that again, because it’s really really important: COLD. Ideally it should be 2 degrees. That means that you need to put it at the back of the fridge, not at the door where it’s a bit warmer. I usually put it in the refrigerator about 10min before I start. Keep it in the fridge until the moment you actually need it.

    You also need to experiment a bit with the kind of milk you’ll use. I’ve found that the best one -at least from the ones you find in a regular supermarket- is full fat UHT milk, 3.5%. The one you get at the fridge of the supermarket isn’t as good –no idea why. If you find a “barista milk” get it; they have more proteins so they froth better.

  • One of the shakers, the one to use for milk, has to be really, really cold. Put it in the refrigerator for at least an hour before making the coffee.

The basic idea is that, in order to make the foam milk, the milk has to be cold and stay cold. That’s why you need its container to also be frozen.

Now that we’ve prepared everything, let’s get to work.

  • The first thing you need to do is prepare the coffee. If you also want sugar, you need to add it immediately afterwards, while the coffee is still hot, and stir it a bit with the mixer; that way it will melt nicely and you won’t get the awful crunchy feeling of unmelted sugar.
  • Now we need to get our coffee ice cold. Put 5 or 6 ice cubes in the shaker or glass. Pour the coffee swiftly over the ice cubes. Stir it a bit with the mixer, but too much, you don’t want it to turn into foam. 5-6 seconds should be enough. Then pour everything (coffee+ice cubes) in the glass. 
  • If you want an espresso freddo, you can add a straw and stop here, you’re done. Otherwise you have one more step to prepare the cold foam milk. 
  • Get the milk and the 2nd shaker (or glass) out of the fridge. Fill the shaker just below half full. Stir it with the mixer for some time (at least 30 sec, can be more) until the surface is smooth and free of bubbles. This part is exactly why the shaker has to be cold. If it’s not, it will warm up the milk and it will be impossible to turn into foam.

Pro (well, sort of) tip: when holding the shaker with the milk and stirring, try to grab it from the top, not the middle or the bottom. That way the heat from your hand will affect the milk as little as possible.

The result should, ideally, look like this:

Αποτέλεσμα εικόνας για καπουτσινο φρεντο

The water -always with ice cubes!- is mandatory. The beach isn’t, but it’s a very nice addition 😉

How many coffee capsules is it safe to drink per day?

Short answer: 4-5 capsules per day, 3 for Intenso-type pods.

For more details, and an answer taking into account the specific type of capsule, read on.

To answer this -very important 😊- question, I’ll concentrate on Dolce Gusto capsules for the simple reason that that’s what I have at home (well, that, plus a Krups filter coffee machine, plus an Izzy traditional espresso machine, plus my one-time favorite Bialetti brikka). The results for Nespresso et. al. should be similar.

dolce gusto box

Do note that I’m only considering caffeine content; but that’s not always the only factor. E.g. if you drink anything near 400 cups Lungo decaffeinato in a single day, you will have non-caffeine related problems (WC attendance comes readily to mind ! 😊).

So, straight from Nestle’s faq:

How much caffeine is in each of the drinks?

Specialty Coffee :
– Cappuccino : 107 Mg Caffeine
– Cappuccino Skinny : 90 Mg Caffeine
– Latte Macchiato : 85 Mg Caffeine
– Vanilla Latte Macchiato : 83 Mg Caffeine
– Caramel Latte Macchiato : 83 Mg Caffeine
– Latte Macchito Skinny : 83 Mg Caffeine
– Mocha : 45 Mg Caffeine
– Cappuccino Ice : 35 Mg Caffeine

Coffee Drinks :
– Caffe Grande Intenso : 130 Mg Caffeine
– Espresso Intenso : 115 Mg Caffeine
– Grande Mild : 106 Mg Caffeine
– Light Roast : 106 Mg Caffeine
– Medium Roast : 103 Mg Caffeine
– Café au Lait : 92 Mg Caffeine
– Lungo : 89 Mg Caffeine
– Espresso : 80 Mg Caffeine
– Lungo decaffeinato : 1 Mg Caffeine

Non-Coffee Drinks
– Chai Tea Latte : 34 Mg Caffeine
– Nestea Peach Iced Tea : 9 Mg Caffeine

The usual number that’s given as “safe” caffeine per day for adults is 400 Mg (eg. see “Caffeine: How much is too much?” from Mayo Clinic here). So this amounts to:

Mg caffeine per capsuleMax capsules per day
Max. caffeine per day:400
Specialty Coffee :
Cappuccino1074
Cappuccino Skinny904
Latte Macchiato855
Vanilla Latte Macchiato835
Caramel Latte Macchiato835
Latte Macchito Skinny835
Mocha459
Cappuccino Ice3511
Coffee Drinks :
Caffe Grande Intenso1303
Espresso Intenso1153
Grande Mild1064
Light Roast1064
Medium Roast1034
Café au Lait924
Lungo894
Espresso805
Lungo decaffeinato1400
Non-Coffee Drinks
Chai Tea Latte3412
Nestea Peach Iced Tea944

Spreadsheet is here if you want to play with the numbers (you can also comment on it). I’ve rounded to closest integer because nobody makes 3 cups of coffee and then decides to have another 0.8 😊

Enjoy !

cup-of-coffee.jpg

Serious but hilarious NSA anecdotes

(This one’s for IT guys, perticularly crypto geeks, source is Schneier’s blog)

NSA recently declassified a lectures book from 1973. It contains some real gems, such as these from pages 55/56:

KAG-1/SEC used to be the bible of US cryptographers, was held in every crypto-center and covered everything from message preparation to compromise reporting in considerable detail. While we viewed it as a model of clarity, this perception was not always shared in the real world. A frustrated Navy Chief stormed out of bis crypto-ccntcr on board a carrier at sea, banded KAG-1 to a sailor and jokingly said “Throw this dam’ thing overboard.” He did. Several ships thereafter steamed back and forth for several days, but never found it. Winds, tides, and currents were studied to predict where it might come ashore with results so ambitious as to offer little hope and, in fact, it was never recovered – at least by us.

This incident triggered an R 1 study on what happens to our documents in salt water. A tank was made, and a copy of KAG-1 immersed. It stayed there for a year or so with no sign of deterioration. Agitators were added to stimulate wave action for another few months, with still no appreciable effect. We never did find out how long such a document would last. Subsequent work, however, has shown that good paper is nearly impervious to salt water, apparently indefinitely. A visit to S2’s exhibit of materials recovered from the sea bottom will bear that out. There you can see perfectly legible codes that had been under water since World War II, together with extraordinarily well-preserved items of hardware and magnetic tape that had been on the bottom for many years. These facts add to the previously expressed skepticism about jettison as a way to get rid of our stuff unless at very great depths and in completely secret location. (Shortly after WWII, small Army training crypto-devices called the SIGFOY were disposed of beyond the 100 fathom curve off Norfolk. Some years later, they became prize souvenirs for beach combers as they began washing ashore.)

UNSOLVED PUZZLE – We used to store a lot of cryptomaterial in a warehouse at Ft. Holabird. It was fenced and protected by a 24-hour armed civilian guard. One evening, such a guard saw an individual inside the fence, evidently attempting to penetrate the warehouse. He drew his weapon, cried “Halt!” and led the individual to the guard shack and started to call in for help. About that time, the intruder started running, climbed the fence, and disappeared.

We asked the guard why he didn’t shoot – he said he was afraid he might hurt somebody.

CONFETTI – When we manufacture one-time tape, a by-product of the punching process is millions upon millions of tiny, perfectly circular pieces of paper called “chad” that come out of holes in the tape. This chad was collected in burn bags and disposed of. Someone thought it would make good public relations to give this stuff to high school kids for use as confetti at football games. Inevitably, one of the burn bags was not quite empty when the chad went in. At the bottom, were a couple of TOP SECRET key card book covers and a few assorted keys. They carried the impressive caveats of those days like “CRYPTO – CRYPTO-CLEARANCE REQUIRED” and were, to use a term earlier referred to, “fascinating” to the kids when they discovered them.

One of the girls, whose father happened to be an Army officer, tacked soine of this material on her souvenir board. When Daddy saw it, he spiralled upward. He decided that it must be destroyed immediately; but first made a photograph of it for the record. He tore it up, flushed it away, and reported in. With some difficulty, various cheerleaders and other students who had glommed on to some of this material were tracked down, and persuaded to part with it.

We no lonser issue confetti.

A History of U.S. Communications Security (Volumes I and II);

the David G. Boak Lectures, National Security Agency (NSA), 1973

Oh the joy of coding with German Office

So I’m maintaining an Access database, with lots of VBA code, which serves as an internal management tool.

Changing a report should be, and usually is, pretty straight forward. But there I am today, after all changes are done, stuck trying to understand WHY THE FREAKING F*** a format string doesn’t work.

The offender is a text box with a date, and I’m trying to get it to be displayed like Nov-2015. So, according to Microsoft’s documentation, the format string is mmm-yyyy. Needless to say, didn’t work.

After an hour or so of banging my head on the wall, enlightenment comes: Year in German is Jahr !!! So mmm-jjjj, and, pronto, it worked like a charm.

By the way, Microsoft’s german doc is wrong (seems like a copy-paste error): it mentions jj and yyyy, instead of jj and jjjj which work (giving 15 and 2015 respectively).

GRRRRRRRRRRRRRRRRRRR *#@$%