Recently, one of the ESPN reporters tweeted his "accomplishment" to have 200,000 unread emails. Then followed by a bunch of people showing off similar achievements.
And I was like...
... because my inbox is normally at zero unread, and there are only a handful of messages in it. My inbox is my to-do list.
I'm sure Jeff Darlington isn't the only one with this "sickness." I've seen a bunch of friends with hundreds or thousands of unreads on their mail icon. Now, I'm not saying how I manage my inbox is the way to salvation, but it is.
I was once a filthy inbox-hoarding casual, here's how I got to where I am today. This methodology works for me, but YMMV. If you're interested, or know someone who can benefit from having a cleaner inbox then read on.
Purging the current inbox
If your inbox have a lot of messages, chances are you won't be reading anything further than the first 30-50 messages. The rest are accumulating and scaring you away the next time you want to check your messages. Take action now: read through a few dozen of emails, then archive the rest. If something were important enough, the sender probably would have contacted you differently, or multiple times. If you leave them around, by the time you get to reading them, it's probably too late anyway.
Note that I emphasize archive, not delete. I generally don't delete emails, so that I can always search for something if I need to. Email providers are quite generous these days. They provide enough space so you never have to delete any email.
Now that we have a clean slate, let's take some steps to prevent things from piling up again.
As more emails come in, you'll discover that they are from Facebook, Twitter, Airbnb, and other services repeating the notifications they already sent to your phone. Unsubscribe from these. I generally unsubscribe from newsletters. If there's a topic that I care enough about, I would have actively looked it up. Some mail services like Outlook can detect these emails and gives you an "Unsubscribe" button. If not, scroll to the bottom of the email, there's usually a line that you can click to unsubscribe.
There are a lot of times we can't simply just unsubscribe from an email list. For example, alert emails are sent to me when something fails at work. The emails will have the module owner on the "to" line, and the whole team on the "CC" line. I setup a filter to move these email@example.com emails to a specific folder, unless my name is in the "to" line. Otherwise my inbox would be bombarded by alerts caused by modules I don't really care about. Some reference links:
Outlook: Manage email messages using rules
GMail: Create rules to filter your emails
I have a dozen rules similar to the one above to make sure my inbox is not flooded with automated system emails. I have another rule to move messages to the "CC" folder if my name is in the "CC" line. It's somewhat extreme, but I really go with if something is important enough, my name should be on the "to" line.
3. Archive! Archive! Archive!
This is the most important step of all. Unsubscribing and filtering things out of your inbox is 90% of the battle. The only thing left to do is not to leave anything "processed" messages around. What does processed mean?
These 3 simple steps are how I keep my inbox clean and focused. 2017 could be your year to do so!
I got this exception while trying to create a new instance of the X509Certificate2—to have a public certificate in-memory. Obviously, the error message was not that helpful.
It turns out that the content of the byte I passed into the constructor was not correct. It was only the actual public-key (cert.PublicKey.RawData), and the rest of the public-key-cert (cert.RawData) was missing (e.g. name, expiration date).
I have no doubt other conditions could cause this exception, but this could be what you're looking for :-)
I cry a little inside whenever I see a class name ends with "Info" or "Wrapper".
Don't we all know that a class contains fields, properties, and methods that provide information about an object? How much meaning does "Info" add to "PersonInfo", or "CustomerInfo"?
What is a "HttpContextWrapper"? What information does it contain that "HttpContext" does not? The only thing "Wrapper" tells me is that it potentially has more information than HttpContext, not much else.
The implementation of String.Join internally calculates the expected output length. If the calculated length is greater than max int32 (~2 billion characters), it will throw an "OutOfMemoryException" even though the system is not out of memory at that time .
It takes about 4GB to store 2 billion characters; since .NET stores strings in UTF-16 format, two bytes per character. However, .NET has an array memory limit of 2GB (unless on a 64-bit environment with <gcAllowVeryLargeObjects> enabled). As the code comment noted, this pre-check only catches the extreme case. The remaining of the method may still cause an OutOfMemory exception even if the pre-check passes.
For the record, .NET has an InsufficientMemoryException class for situations like this. However, this exception type was introduces in .NET 2.0. To stay backward compatible, the method remains throwing the OutOfMemoryException.
The following snippet comes from the official implementation of the method: