Friday, January 22, 2010

Donation to help Unicef in the Haiti disaster

I just finish to give the money on PayPal from FileHelpers donations to Unicef.

Is really frustrating watch all that people there in Haiti and is so little what we can do for them, so I decide to give u$s 200 to unicef to help the childrens there.

So all the people there that some time ago donated to the lib, now your money is going to the people that really need it. So thanks to all !!

If you want to help:


Monday, February 18, 2008

If Airplanes Were Made By Using Scrum/Agile

We just come back from vacations, and this video make me laugh a lot :P

The best metaphor for Scrum that I see in a while :P



From: http://sqlservercode.blogspot.com/2008/02/if-airplanes-were-made-by-using.html

Tuesday, July 17, 2007

Library Roadmap Update

Like Matt said in the previous post he is join me in the main dev of the library. He is helping me from so time now.

About the roadmap of the lib, we will be releasing the version 2.2 really soon (with little new features and bug fixes), after that a version 2.5 with some changes and later the big dump of the version 3.0 that is in the first face now =)

I'm in a new house now, with new assignments at my works, and changing of work office too !!!

As you can see, these are crazy days to me, forgive me if I delay asking mails or post in forums.

I want to give public thanks to Matt for all the help and motivation than he is giving to the lib, is very hard to maintain the lib, ask mails, support in forums, add new features, fix bugs, etc.

So any other than want to join us is really welcome, develop Open Source is the most impressive way to learn, know new people, found yourself useful and help others.

See you soon :P if I found time to post.

Cheers

Wednesday, July 11, 2007

FileHelpers Goes International

Hi folks! My name is Matt Campbell, and I've joined Marcos as a co-developer on the FileHelpers project. (I'm also known by the internet nickname "xenolinguist," in case you see that name somewhere.) I'm a professional software developer, and I live near St. Louis, Missouri in the USA. So now the FileHelpers Dev Team is not just international, but intercontinental as well!

Actually, I've been contributing - and even committing - for a few months now, but I've busy with my job and my family (not to mention some work on FileHelpers!) so this is the first time I've had a chance to introduce myself...

OK, that's actually a pretty lame excuse... the truth of the matter is, I really don't like blogging very much and I've been avoiding it for as long as possible. Like I said to Marcos the other day: "what a pair we make!" Between Marcos' not-so-great English and my own reluctance to write, this blog might stay mostly blank. :)

Anyway, I've been busy most of this week working on a new branch of the code which contains a huge refactoring of the Engines. Most of the functionality of the different Engines has been consolidated into the Engine Base class, and a whole lot of duplicate code has been eliminated as a result.

There are a few good results at the heart of this; all of the Engines will have support for events, progress notification, iteration, and async operations; the API for the Engines is a lot more consistent; and most of all, it will now be a ton easier for us to add or maintain Engine-related features.

There's a bad result of this though: like I hinted at above, there have been some API-breaking changes. For one example, an entire Engine class is gone - the FileHelperAsyncEngine is no more, since all Engines from now on will inherently support both synchronous and asynchronous usage in one class. We don't want to release any API-breaking changes before version 3.0, and there's a (constantly-growing) list of other features we'd like to see in a 3.0 release, several of which will not be ready for a while - so these changes may not be released for a little while.

Friday, April 6, 2007

New Record Class Wizard 2.0

Before the 2.0 Release I´m creating some movies to add to the docs.

Click on images to see the movie

The Examples and demo of the library


The Wizard and the Record Class Tester

Friday, February 2, 2007

Vacations Time

At last !!!

My wife and I are going to Mar del Plata until the 11/02 to enjoy the sea and I´m a bit out of touch of the mails and computers in fact the past week I only use my PC 10 minutes DAY !!! hahaha, thats very hard for a big addict like me :P

See you with renewed energy the next week

Some pics of Mardel


A crazy beach for fun ...






a quiet one to rest a lot =)


Cheers
Marcos

Thursday, January 11, 2007

Improving FileHelpers Performance with Reflection Emit

I´m in the works for the version 2.0 of the library and one of the milestones is to improve a bit the performance (mostly the use of reflection and string handling)

Now I´m trying to use the cool DynamicMethods of .NET 2.0 and I´m surprised how easy and fast them are !!

I just finish to implement the setters via a Dynamic Method using the CreateDelegate and I get a 25% of improved performance over the past versions !!!! (in files with more than 500 or 1000 records)

Here is the code that I´m using:

For example in the FieldBase I was using the FieldInfo.SetValue but now I create a new method at run time

(Suppose that the RecordClass is SampleType and the field Field1 of DateTime)

static void SetField1(object record, object val)

{

((SampleType)record).Field1 = (DateTime)val;

}

I need so a Delegate for these methods calls (all private to the FieldBase class)

delegate void SetValueDelegate(object record, object value);

SetValueDelegate mSetDelegate;

finally playing a bit with Reflector we need to add to the constructor we need these lines:

protected FieldBase(FieldInfo fi)

{

DynamicMethod dm = new DynamicMethod("__SetFH__" + fi.Name, typeof(void),

new Type[] { typeof(object), typeof(object) }, fi.DeclaringType, true);

ILGenerator il = dm.GetILGenerator();

il.Emit(OpCodes.Ldarg_0);

il.Emit(OpCodes.Castclass, fi.DeclaringType);

il.Emit(OpCodes.Ldarg_1);

if (fi.FieldType.IsValueType)

il.Emit(OpCodes.Unbox_Any, fi.FieldType);

else

il.Emit(OpCodes.Castclass, fi.FieldType);

il.Emit(OpCodes.Stfld, fi);

il.Emit(OpCodes.Ret);

mSetDelegate = (SetValueDelegate)dm.CreateDelegate(typeof(SetValueDelegate));

And at last instead of using the slow:

mFieldInfo.SetValue(record, val);

We use :

mSetDelegate(record, val);

I will post the benchmarks when I finish the tweaks.

See ya

Sunday, December 17, 2006

A useful Image Converter for the library

Some user ask for a way to read/write images with the library.

So I create this converter that you can copy and paste in your code:

public sealed class ImageConverter: ConverterBase
{
public override object StringToField(string from)
{
Byte[] bitmapData;
bitmapData = Convert.FromBase64String(from);
System.IO.MemoryStream streamBitmap = new System.IO.MemoryStream(bitmapData);
return Image.FromStream(streamBitmap);
}

public override string FieldToString(object from)
{
Image ima = (Image) from;
System.IO.MemoryStream ms = new System.IO.MemoryStream();
ima.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
return Convert.ToBase64String(ms.ToArray());
}
}

Note: you can of course change the ImageFormat to whatever you want, I use PNG because is lost less and compress the resulting strings =)

To use this converter you need some code like:

[FieldConverter(typeof(ImageConverter))]
public Image MyImage;

Easy isn't ?

Happy Coding !!

Sunday, December 10, 2006

Article on CSV parsing by Leon Bambrick

Some time ago Leon Bambrick wrote a good article about the gotchas of create your own CSV parser.

Check the article here: Stop Rolling Your Own CSV Parser!

Remember to scroll down and check the comments with the different points of views about this topic.

Happy Coding

FileHelpers on Ohloh

You can also review the FileHelpers statistics via the great Ohloh with a more granular distinction between the projects files:

Check the Online Statistics here: http://www.ohloh.com/projects/3254

(click to enlarge)

FileHelpers on Koders.com


The Koders.com servers just finish to index the FileHelpers project.


You can found the results here:


Nice project cost hahaha !!
u$s 94.824 and all for free
Cheers

FileHelpers Dev Blog - Hello World !!

Here we discuss the design, programming, architecture and new features of the FileHelpers library.