Archive for February, 2010
How to generate image_src for Facebook links in WordPress theme
Feb 18th
Sharing your article for free advertisement on Facebook is a fact. While using different Social Networks sharing tools I had a problem when sharing my articles on Facebook: sometimes the image that I intended to use to represent the article wouldn’t show in the list of the images who can be chosen. Why is that?
It bothered me some while I got the some free time to actually look into this, between exams, work and master research. After some wandering on the internet, I found here the correct directions. What I learnt: Always search for the API!
In order to make sure that the preview is always correctly populated, you should add the tags shown below to the <head> element in your HTML code. If you don’t tag your page, Facebook Share will grab the title of your page as specified in the <title> tag, and will create a summary description from the first text that appears in the body of your page. A list of thumbnails will all be selected from available images on your page.
You can control the exact title, description, and thumbnail that Facebook Share uses by adding the following meta tags to the <head> element in your page:
<meta name="title" content="title" /> <meta name="description" content="description " /> <link rel="image_src" href="thumbnail_image" / >
Alensa Online
Feb 11th

Position: Team Leader and Lead Developer in Alensa Online – Software Development department
I was part of Alensa team between January 2007 and August 2008. Only the opportunity to study Media Informatics Master, held by RWTH Aachen University, could gave me enough reasons to leave Alensa Online that I enjoyed so much for almost two years.
I was in charge with our brand new solution for an online Healthcare project – Alensa Online. The Alensa Online Shopping site (www.alensa.ro) consists of an internet healthcare platform in Europe that would simplify research and self education related to health issues, and provides the customers with an interface allowing them to easily get their health questions answered by professionals. It was first developed by a third party company, then I took over the responsibility of developing and maintaining the solution.
My responsibilities were quite complex because I was the first hired person, very similar with Softwise company. This reminded me about the joy and responsibility that comes with this. Another nice surprise was to find in person of Mr. Alex Savic, the CEO of the company, a friend with whom I shared both technical discussions and personal development ones, he was one the most supportive about my decision to study in RWTH Aachen.
Shortly, at Alensa Online I were in charge with:
- Architecting and developing the web based solution using Microsoft ASP.NET / C# and SQL 2005 Server technologies;
- Performing server administration, configuration and maintenance for the Windows 2003 server, for IIS 6 and for SQL 2005 database server;
- Executing architectural modifications in order to make the website user friendly;
- Identifying, designing and developing solutions;
- Periodically testing the site functionalities and thus creating a real test environment, test cases and bug fixes;
- Performing code review, corrections and code optimization;
- Analyzing hardware/software requirements and proposing hardware/software improvements and suggestions (for example, choosing an appropriate hosting partner);
- Implementing real time traffic analysis tool to help the management department;
- Conducting internal training for his colleagues. More >
Add SyntaxHighlight to Windows Live Writer in Preview mode
Feb 7th
Windows Live Writer (shorter: WLW) is one of the most popular blog authoring tool that I also happen to like and use. And I say this because of its features – I especially enjoy the Preview tab. But what it really lacks is previewing the ENTIRE page – it will get only the html and some css. So no Syntax Highlighting of my code? Let me tell you how I solved this issue.
As a blog writer I searched for something that could allow me to write the articles offline and then upload them in WordPress. I also tried WordPress built-in editor, but the editing box is so small that I couldn’t use it too much.
The most important feature for me is that it retrieves the blog theme and has a preview function that provide you the same look on editor window. So you will be able to write a post with a preview. But when having a more complex theme, using JQuery or Prototype, you will discover that you don’t get any more the same look and feel as in the blog. This is partially ok for editing, but sometimes it is really bad – especially if you’re a programmer and add a lot of code in your page. On blogs there is a solution to show the code with syntax color, but in the Windows Live Writer I couldn’t find one suitable plug-in that does this.
Adding events to LINQtoCSV library
Feb 6th
The User Experience that a library provides must be at least equal with is quality and speed. And frankly, CSVtoLINQ rocks on latest two, as I presented in previous articles Import CSV file and query it with LINQ and continuing in LINQ wonder world, but lacks a little on the User Experience(in our case Developer Experience) by not having some events of starting, progress and ending of the parsing.
Especially important, while parsing huge files, is a confirmation for the user that something happens and (ideally) the point in which the processing is. That is why, thanks to Matt Perdeck for sharing the entire source of the library, I was able to improve it by adding events.
So, let’s see some code!
Modifications into LINQtoCSV library – CSVContext.cs
Important: All modifications will be made in the CsvContext class from LINQtoCSV namespace – the CSVContext.cs file.
First we’ll add the ReadStarted event to the library – it will fire when the reading of the CSV file has started.
// defining the delegate
public delegate void ReadStartedHandler(object sender, EventArgs e);
// here we define the event
public event ReadStartedHandler ReadStarted;
// the call of the event processing
protected virtual void OnReadStarted() {
if (ReadStarted != null) {
// we use empty eventargs because nothing is needed on readstarted event, just the confirmation of parsing started
ReadStarted(this, EventArgs.Empty);
}
}
LINQ wonder world
Feb 5th
I am sure that, if you are a developer, at some point in your career heard about and asked yourself: what is LINQ? If not, there’s no problem, you’ll find out now : LINQ comes from language-integrated query and it is a collection of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It helps developers by extending both C# and Visual Basic, adding native querying capabilities to these languages. It also comes with class libraries to get the full advantage out of these capabilities.
As we discussed in my previous article, Import CSV file and query it with LINQ, we are able to load and parse the file into a IQuerable collection, thus giving us the oportunity to do more and more SQL- like operations on it.
The C# 3.0 specification defines a so-called Query Expression Pattern along with translation rules from a LINQ expression to an expression in a subset of C# 3.0 without LINQ expressions. The translation thus defined is actually un-typed, which, in addition to lambda expressions being interpretable as either delegates or expression trees, allows for a great degree of flexibility for libraries wishing to expose parts of their interface as LINQ expression clauses. For example, LINQ to objects works on IEnumerable<T>s and with delegates, whereas LINQ to SQL makes use of the expression trees.
Import CSV file and query it with LINQ
Feb 4th
Assume that you have an plain text, old Comma Separated Values file filled with your precious export from a legacy system. How can you process it easily now? The first answer that comes to mind is to parse it and load it into a datatable and later process it by using DataTable.Select() method. But this approach has some limitations – like splitting data into several tables and then join them.
One would imagine that parsing CSV files is a straightforward and boring task, given that it is quite a while since CSV is around. Some of them are correct – in the sense that many implementations merely use some splitting method like String.Split(). Some don’t even offer the specification of the values splitting character – so your file wouldn’t be parsed correctly if instead of , you have ; as separator – yet another thing to modify if you’re lucky enough to have the sources. Others will not handle properly field values with commas because the simple split method of the String class. But there are better implementations that take care about escaped quotes, trimming spaces before and after fields and other small and useful details, but very few that I found did it all as I liked it – and at least as importantly, in a fast and efficient manner.
Media Informatics Master
Feb 1st
In the Autumn of 2008 I joined the Media Informatics Master program, saying goodbye to Alensa Online team. It is part of the Bonn-Aachen International Center for Information Technology (B-IT) and was created through the collaboration of prestigious German institutions:
- University of Bonn,
- RWTH Aachen University,
- University of Applied Sciences Bonn Rhein-Sieg,
- Fraunhofer Institute Centre Birlinghoven Castle IZB
Supported by the B-IT Foundation and complementary state resources, B-IT offers highly selective International Master Programs in Applied IT, as well as the summer/winter schools for qualified computer science students.
Most courses take place in the beautiful B-IT building next to the former office of the German Chancellor on the banks of the River Rhine in Bonn.
The University of Bonn has almost 200 years of history, over 38.000 students from 130 countries, with an excellent research record and an excellent graduate education have made one of the ten largest universities in Germany.
In the context of more than one hundred first degree programs, the university engages in a broad range of international co-operations in research and teaching.
Founded in 1868, RWTH Aachen University is Germany’s top-ranked University of Technology and one of Germany’s nine Elite Universities. Of its 30,000 students, over 4,000 are international, including 900 students from the Asian-Pacific region. In addition to 65 first degree programs, RWTH offers more than 20 graduate programs in Science and Engineering.
Within the Fraunhofer Society of Applied Research, the four institutes in Birlinghoven Castle represent a quarter of the largest IT research organization in Europe. Over 500 post-graduate researchers investigate Autonomous Intelligent Systems, Applied Information Technology, Media Communications, Algorithms and Scientific Computing in a world-wide network of industry and research partners.