Mailing list filter – Outlook add in

by Juan 18. December 2009 15:57
Share on Facebook

I had a particular problem with my e-mails. I belong to multiple mailing lists at work, so when someone sends an e-mail to all of them, I get several copies, like the following picture illustrates

image

There was no way of fixing it with rules, as they are n different e-mails, not the same one.

After a little search, I couldn’t find anything to fix this, so I programmed a little add-in to deal with it (you can download both the binaries and the source at the end).

It works like this:

  • You provide a list of addresses by priority
  • If an e-mail is from one of those addresses (evaluated in order), and one recipient is in the list above the current one, the mail is deleted (as you have already received it with that previous address)

Easy! So easy, I may be missing something, if so, please let me know.

To install it, download the binaries and double-click the MailingListFilter.vsto file (you need to have the Visual Studio Tools for Office installed), if that doesn’t work, you can go to Tools –> Trust Center –> Add-ins –> Go…, there you can add it manually. Perhaps I’ll add an installer later.

To configure it, go to Tools –> Mailing List Filter…

image image

Remember to specify them in priority order (it’s a good idea to add your personal address first).

The code is based on this example.
You are free to download and modify the code, if you publish a modification, a link here would be nice.

Known Issues

Despite the documentation claiming the event I use (NewMailEx) is guaranteed to fire, I found that this is not always true. There are certain cases of race conditions with Outlook rules, and if you have one set to move mails to subfolders, the event may not fire. So in order for this add in to work, you shouldn’t have rules to move the eligible mails to subfolders; it’s kind of annoying, so I’ll post a fix if I ever find one.

Downloads

  

Tags: , ,

Duct Tape Programmers

by Juan 9. October 2009 12:26
Share on Facebook

Sure, there’s nothing officially wrong with trying to write multithreaded code in C++ on Windows using COM. But it’s prone to disastrous bugs, the kind of bugs that only happen under very specific timing scenarios, because our brains are not, honestly, good enough to write this kind of code. Mediocre programmers are, frankly, defensive about this, and they don’t want to admit that they’re not able to write this super-complicated code, so they let the bullies on their team plow away with some godforsaken template architecture in C++ because otherwise they’d have to admit that they just don’t feel smart enough to use what would otherwise be a perfectly good programming technique FOR SPOCK. Duct tape programmers don’t give a shit what you think about them. They stick to simple basic and easy to use tools and use the extra brainpower that these tools leave them to write more useful features for their customers.

From Joel Spolsky’s blog

Tags: , , ,

Programming | Tips

To delete or not to delete

by Juan 1. September 2009 13:01
Share on Facebook

According to this article, there is no question at all… the answer is not to delete. It could all also be summarize as “learn Domain Driven Design”, try not to always think technically and understand the business behind things.

As they say

I know it doesn’t show up as nicely on your resume as “3 years WXF”, but “saved the company $4 million in wasted inventory” does speak volumes.

Interesting read

Tags: , ,

Programming | Tips

I finally did it

by Juan 9. August 2009 20:19
Share on Facebook

You may have noticed that this blog was very slow.

Well, it had a reason… I was working hard on graduating!

small_100_2562 small_julio 09 035 small_Recibida 003

(If you are not from around here, don’t be alarmed, throwing crap all over people is a tradition here when you graduate… and oh my, did all that crap smell)

I almost can’t believe that 5 years went by, all that effort and investment finally paid off, as it was predicted a year and half ago :)

I’ll try to start blogging again now that I have more free time, although I’m about to start a new project with which I hope to become a millionaire (and have even more time to blog) as well as becoming a parent, which won’t be an easy task.

Write to you soon!

Tags: , ,

Student Life | Personal

Replays Hoshimi 2009

by Juan 30. June 2009 10:08
Share on Facebook

Perdón por la demora. Acá les dejo los replays y logs de la última competencia en la UP.

Los ganadores fueron

Apellido

Nombre

Equipo

Colegio

Puesto

         

Panzarasa

Nahuel

Monsters

nº32, San Martin; DE nº14

1ero

Scaramuccia

David Leonel

 

nº32, San Martin; DE nº14

 
         

Barbarroja

Emiliano

GyBSoft Team.

ET 37 Stella Maris

2do

Flores

Lucas

     
         

Lera Romero.

Gonzalo.

Lecosoft

ET 35

3ero

         

DE SOUSA;

JOAQUIN

NTS

ET 37 Stella Maris

4To

CHA,

PABLO

 

ET 37 Stella Maris

 
         

Egea

Dario

No Memory

Confederación Suiza

5to

Carrizo

David

     
         

Scherman

Ariel Kevin

"AriYLuky"

ORT

6to

Moscovicz

Lucas

 

ORT

 
         

GIORDANO,

LUCAS

SistorTeam

ET 37 Stella Maris

7mo

POBLETE,

FACUNDO

     

Felicitaciones a los ganadores, nos vemos en la próxima!

Tags: , ,

Hoshimi

Thinking ahead

by Juan 12. May 2009 21:46
Share on Facebook

Lately I’ve been reading an interesting blog about a girl that sees the world pretty much as I’d like to see it, and one excerpt from the latest post caught my attention

(…)

Even though there was an extremely slim chance of me and my place being in any danger, I packed up my stuff and evacuated. The way people are saved in huge disasters is through prompt and thorough reactions. If I had waited until I was in danger, I would have contributed to clogging the single freeway, lost more of my stuff, and put others in danger too. The proper response to an emergency is not denial, not panic, but rational, precautionary steps.

Emphasis mine.

That’s one piece of advise we could extrapolate to everything, I think, and I’d like to bring it to my field: Programming.

How many projects have you worked on, where it’s very smooth and quiet at the beginning, just to plunge into chaos towards the end? I know I have worked on many. Don’t you think it would be better to take that approach? Not falling in denial and panic, but taking steps to guarantee the success, or at least minimize loses. There are some books on that topic that are very interesting.

What about if you are in a job you don’t like? Are you going to wait until it’s unbearable and you have to go job hunting in a hurry because you can’t take it anymore? No. Rational, precautionary steps. Start slow, start searching when you have the time to search well, research, compare, decide with facts.

What about any other aspect of life?

Tags: , , , ,

General | Random Stuff

Levels of Programmers

by Juan 3. April 2009 12:01
Share on Facebook

Here’s an interesting article about the different levels of programmers.

I found the question on level 5 quite interesting

You have a successful career as a software developer. Your skills are always in demand and you never have to look very long or hard to find a great job. Your peers respect you. Every company you work with is improved and enriched in some way by your presence.

But where do you go from there?

Where do you go from here? I think that’s a question everyone ask themselves, at least I know I do… and quite often.

I might be close to answering it though…

Disclaimer: I’m not placing myself at level 5.

Tags: , ,

Programming

Hacked!

by Juan 1. April 2009 11:33
Share on Facebook

HACKED!

Hi Master (: Your System pwned By Turkish Hackers

BlueLine pwns you!

WhiteCode, LiZZard, with me in here

WE WERE HERE

Hacked by DarKLord ;)

Tags: , ,

General

LazyLoading and Serialization

by Juan 28. March 2009 22:55
Share on Facebook

The other day I run into a little problem, which I thought worth of mentioning. It’s really kinda obvious when you think about it, but I didn’t, until I run into it.

First, a little background for those that don’t know what LazyLoading or Serialization are.

Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used

So basically, you implement your properties (of complex objects) in such a way that they get instantiated only when the property get is called; something like this

image

In computer science, in the context of data storage and transmission, serialization is the process of converting an object into a sequence of bits so that it can be stored on a storage medium (such as a file, or a memory buffer) or transmitted across a network connection link. When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward.

The “not straightforward” part, is often solved getting the object referenced in the property, and serializing it also.

So, could you spot the problem?

Whenever an object that implements LazyLoading gets serialized, all its properties are called, which breaks the whole LazyLoding concept.

My specific problem appeared because I used an entity both to display a list of objects with a listview, that used the code and description properties, and when you clicked on one it would redirect you to an edit page, where the full object would be loaded so it could be edited.

I “fixed” it with a tiny little flag; since I have a Service class that calls a DataMapper to load the entities, I knew from where I was calling it, so I added a parameter to pass whether LazyLoading should be cancelled; in the above example, additionally to checking if the private field was null, I also checked this flag, and loaded it only if it was false. This greatly reduced rendering times.

I know it’s not a really good fix, so I though of leaving an open question to everyone… how would you solve this?

Other options I thought were:

  • Having two different entities, one lightweight for the list, and one for the full edit page. This would double the Service and DataMapper classes, and it was a lot of work.
  • Having two different entities and use inheritance to reduce that Data Access layer duplication. It seemed it wouldn’t be that clear, and still it seemed like a lot of work.
  • There was another option that I cannot recall right now.

Anyway, it’s an interesting problem, isn’t it?

What would you have done?

Tags: , , , ,

Share extension for BlogEngine.NET

by Juan 28. March 2009 12:37
Share on Facebook

Share is a new extension for BlogEngine.NET. What it does is pretty simple, it adds a “Share on Facebook” link on top of every post, so you can share them on facebook as a link.

After you install this extension (instructions below), you will see the link as follows

image 

The extension uses a custom page for its configuration, where you can select the text of the link, and the link type, as explained on facebook’s help page.

image

And, as advertised, when you click the share link, you get the pop up window to post the link to your facebook profile

image

Optionally, you can add a link to the head section of the site.master of your theme, to have facebook pull that image as a thumbnail, you do that like this

<link rel="image_src" href="<your_url>" />

Where <your_url>, is the url of the image you want to display.  

To install this extension, simple unzip the following files on your BlogEngine.Web root directory

Important Note: This code is an extension for BlogEngine.net version 1.4.5.15 and up. It was tested on this version, because it has a bug fix that made extensions don't work. The bug is present in 1.4.5, I don't really know exactly in which subversion it was fixed, you can check it yourself.

The problem was in the method DataStoreExtension in App_Code\ExtensionManager\Manager.cs, the line

Stream stm = (FileStream)xs.GetSettings();

has to be

Stream stm = (FileStream)o;

That's it! You can download the files below, and you can try it on this very post, just click "Share on Facebook" there on the top

Tags: , ,

Blogging | Programming

Powered by BlogEngine.NET 1.4.5.15
Theme by Mads Kristensen Modified by Juan Manuel Formoso

About the Author

Juan Manuel
Networking
View my LinkedIn profile View my Facebook profile View my Twitter feed View my StackOverflow CV

Juan Manuel Formoso
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something more bizarrely inexplicable.

There is another theory which states that this has already happened.

E-mail me Send mail

Hosting is not Free

Google Reader Picks

Most comments

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Recent comments

Comment RSS

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008