Ocinine is our participation to a Channel 9 contest. Ocinine is the perfect name to understand what we want to do. Ocinine (read OC9) means 'Open channel 9'. Our goal is to make avalaible the media content of Channel 9 to any 'Host Application'. Follow us as we create the new way to see Channel 9.


Shame on me!

It's been a week since last post...

I'm sorry, my coworker (the only guy who help me in my job) as some problem in his family. I'm so tired when I get home that I don't have head on Ocinine.

It's when you come in situation like this that you see the importance of a development process. I started the project with a methodology of my own (that means neer nothing). That's the reason Cromag can't do a lot of things on is own. I'm gonna corect this and we gonna re-start at full speed.


Not so sure now...

I'm still trying to create our application. I was doing our nunit with the idea I've explain here. And now, I'm not really so sure about it...

I'm not sure that's the way you should do things not at all. I'm even thinking that is a bad way of doing things... I must explain why... You gonna see it's easy why. If you think about the three lines of code the developer should do it, that means you think for the end user. And THAT is wrong.

The other thing that bother me is the following thing. If the three lines force me to a bad design, I have to refactor it. How many time I have to do this to make a good design. Let me give you an example: Our application take the RSS feed of Ocinine to get the information we need. Everyone now that a feed have one channel and one or more item(each post). If (I don't know how) my three lines of code give me something that look like I need one or more channel and only one item, I'm gonna have a problem.

I know, your not that so stupid. How can three lines of code can make me do something like this? Thats not the point. I understand why they tell this (You should make thing simple for the developper) But I think now you should do the otherway. I think (after doing some of our unit test, and i'm a developper to with another framework) That we really should start with the core of our Application and do a "spiral" around youre core class. Doing this, you could really finish some part of your app.

If you start with the finishing three lines, how can you tell when your application is finish? Is it when your three lines of code are working? You could do better then that. If you need to had some new stuff, what do you do? Write three other lines or change your first ones? If your new stuff create a bug in the old lines, what do you do?

Thats why I think you should first design the core of your application and then, write the three lines the developper will have to write.

Oh, I even have a better way then that, never write the line the developper gonna need. That's the concept of all new Java Framework (Spring, hibernate, JSF). The developper should do it's code like your framework doesn't exist. I see it with Nunit you only have to write a [Test] before your function and pouf, it's done. But to change from a three line of code to an annotation before the function, you better have the core of your application finish first.

Please, WRITE (you're our developper after all) what you think about this....


Starting by the end ?!?

I found a presentation today on how to Designing .NET Class Libraries After I read it and Listen to the video, I'm asking me a lot of question. The Instructor tell three phrase that make perplexed :
Write the three lines of code developper will have to write, then model the APIs around making that possible.

One of the reason I take part in this contest it's about the things I'm gonna learn in doing it (The firs one is that I always wanted to do something with Cromag).

If we don't win or even, if we don't finish the project. I think i've found the best thing i'm gonna learn in all this adventure. I come from a Javaworld (did I tell you? lol), Thinking in OO is something I do frequently, but I think i never stop to think about how the end user is gonna use my API. I think its one of the consequence to always have the same targeted audience. (My co-worker). I never think my code could go outside our own environment.

That's so basic, and so true that I didn't think about it. If you think in XP, it should be the first rule of all.

So, I think I didn't see the start of our application the good way. I was starting by the OcinineManager, maybe I should start with the Host. Doing this, it become easy to split the job with Cromag. One could work with the core, the other with the host...

Gonna think more about it!

Oh, and by the way, Happy Easter!


Qualis pater, talis filius

(The title mean : Like Father Like Son)

I don't know if you know it by now, but I come from a Java world (1,2,3) And Everyone know that C# was invented after some conflict between Sun and Microsoft.

So, it's not a big surprise to see a lot of thing we use in java taking life in C#. If they don't directly convert it, they inspired themself from a java tools or library.

It's for this reason that I'm gonna play by the rule and convert my Java Coding Conventions to a .Net naming gideline This way, I could use a tool like one I use in java to one for c#.

By the way, I Inform you that to the addition of the tools we said we gonna use. We gonna also use this library to help us make the better product of all the contest.

  • log4net: A library to help us manage our log. (conversion of log4j in Java)

  • NUnit: A library to help us test our application. (JUnit in Java)

  • TypeMock: A library to help us test our application. (Not really a conversion of a Java library, but come from an XP world. We have the same in Java from a long time.)

I also want a build tools. If I was sure it was really stable I prefer to use Maven CSharp Plugins. But it is in alpha stage. So If i had time we gonna probably use Nant.


Fighting with the language!

How much can you know about yourself if you've never been in a fight?
[Tyler Durden in Fight Club (1999)]

And what a Fight I'm doing!

I'm trying to do something that is supposed to be easy : serializing a class. I made a lot of research on the web. Every one give almost the same example. Something like this:

// Deserialize the content of the Contact array to a XML file
XmlSerializer x = new XmlSerializer( typeof(Contact[]) );
TextWriter writer = new StreamWriter( "phonebook.xml" );
x.Serialize( writer, aContact );

But I see nowhere the way to customize the default way of serializing/deserializing a class. I have a lot of way for doing this in java. But in csharp, I don't even know if the way I can do it in java exist. I can't believe there's only one way to map an XML file to a class.

Ok, I had to admit I still have difficulty to had a code library to my project. So if I find another way to do it, I'm gonna fight with our project to put the library in there. I'm gonna take it step by step and someday it's gonna work.

This is your life, and it's ending one minute at a time.
[Tyler Durden in Fight Club]


The true Start

Ok, the first post on the blog was titled: «A little Start». It was the first time you could ear from us talking about our project. Now, «the true start» is gonna be the first time you gonna see us giving you under the hood secrets of Ocinine.

At first, we wanted to show you a class diagram of Ocinine. Now, we talked about it and we gonna show you piece by piece and explain it to you in the same time.

If you read the description of the project. You should know by now that we want to create an abstraction layer. Like I said here, we gonna use a lot of Design Pattern. The first one (an easy one) I'm gonna explain is the Factory Method for the NewsManager. :

In this pattern, we use 4 class/interface. The First one, the OcinineManager Abstract class, is the one we gonna use to manage all the services provided by our project. The OcinineManagerImpl is the «Real» implementation of our Manager. (I'm not sure If I really need to explain the goal of an abstract class or interface implementation, but..) Doing this, we could easily change some functionality of the application without breaking all our project.

The third object we gonna look is the NewsManager interface. The NewsManager is responsible to retrieve all the content of channel 9. It's also by this interface that we gonna manage the history of news read or not. So, The NewsManager is the product(see the Factory Method) we need to interact with Channel 9. The last Object, NewsManagerImpl, is the default implementation of the NewsManager.

Hope you gonna appreciate the way were going to do it. If you need more explanation, leave a comment!


Coding style

There is no "one true style", but coding style can generate lots of comments. Larry Osterman have 9 post about it and it has generate lots of comments. So Fneuch came from the java world and is coding style look like this :

int main() {
if (a == 100) {

And I came from the C++/MFC world, so my coding style is more like that :

int main()
if (a == 100)

We will use is style for our project, but that will be tough for me !


For the newbie I am...

Like I said, I come from a java world (We use JEE environment at my job, never gonna say enough.).

So I'm always happy when I find a link like this one. And the better way to never lose a link, it's to post it on the web...

So for everyone like me (Not sure if someone like me is going to read this!), here is a Common Tasks QuickStart.


try{} catch{} Finally....

That's it!

We gonna live with this design. Yesterday when I change the layout, there was a lot of things that didn't work well. Now I'm done fixing them, I've add a bread crumb, update the adsense (you can click on it, don't be shy ;) ) and put the archive link in a descending order. I'm more happy with this design then the previous one.

Oh, and by the way! I've done a lot of reading about licensing. It's not an easy task. I'm not a lawyer and there's a lot of thing to consider. We want to had a license that give you free everything (modification, sell, etc). The only thing we really want is having the credits for what we're gonna do. So I think Ocinine is gonna be licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0. If you have a better understanding of the license then me, can you confirm our choice? Thanks!


Veni, Vidi... And definitively not Vici

Like you could see, I change all the layout of our website. I've tryed a lot of thing with the css and nothing satisfied me. So, i pick an existing template and modify it.

It's the way of the web!

Now I appreciate more the webdesigner at my job! But, don't stress, i'm better in making software then making web page.


My Documents, My Music, My Pictures and My Videos... no videos ?

Why "My Videos" folder is not a special folder as "My Music" and "My Pictures" in Environment.SpecialFolder ? We need to store videos on our project, so by default I would like to store them in "My Videos" folder. But no, this folder is created by Windows Movie Maker instead of being an OS special folder.

Why? Can somebody explain that choice ?