Category Archives: Programming

CURL library for C# ( dotNet )

Couple of days ago I needed to download files from a TFTP server. I remembered that there was a CURL binding for .Net, so I checked it.

It was powerful and complicated. I just wanted to download a bunch of files, no big deal. So I wrote a small and simple wrapper for CURL in C# to do it.

CURL Manager Example

I don’t know if it can be useful, but I’ve uploaded the library and a Visual Studio Project demonstrating how to use it. Feel free to use it 😉

Visual Studio 2008 can’t be installed because Microsoft Visual Studio Web Authoring Component

Today I’ve tried to install Visual Studio 2008 on Windows 7 and it wasn’t easy. The installer was abnormally exited while it was trying to install “Microsoft Visual Studio Web Authoring Component”.

The installation log was: DepCheck indicates Microsoft Visual Studio Web Authoring Component is not installed

I thought VS was incompatible with Windows 7, but I checked it and it can works without issues on Windows 7. The problem was Office 2007. I don’t know really why, but uninstalling Office, installing VS and reinstalling Office seemed to solve the problem.

If you’ve any explanation, please share it, cause I have no fucking clue 🙁

iPhone / iPod Touch Hello World!

For the last few years I’ve been writing apps using Java and C#. Doubtless they’re good and powerful languages, however some tasks need to be performed with different languages.

I’ve bought an iPod Touch this Christmas and obviously I really want to develop my own applications for it but, unfortunately the only way is by using Objective-C.

As a computer scientist I’ve been trained on C++ but that was a long time ago and, the truth be told, just the basic stuff.

Be that as it may, I’ve decided to learn Objective-C and Cocoa in order to develop my own iPhone / iPod Touch applications 🙂 I’ve found some tutorials at the Apple Developer Connection and at other blogs. Notwithstanding my lack of Objective-C knowledge, following the instructions I was able to develop a simple “Hello World!” in a couple of minutes.

Everything was great until I decided to deploy my application into my iPod. I couldn’t. Do you want to know why? Apple doesn’t allow me to deploy my own applications in my own iPod until I pay a developer license, which costs about $100 USD Dollars.

There is only one possible workaround, jailbreaking my device. Unfortunately I’ve a second generation one, and there is no jailbreaking available yet. As soon as I can I’ll jailbreak my device and try to deploy my applications.

What do you think about this Apple behaviour? Will Apple eventually shape up?

Closures in Java 7 (Dolphin)

It has been nearly two years since the release of Java 6, so it is time to review the new and refreshing features of its successor, Java 7 (a.k.a. Dolphin) which will be released on 2009.

BGGA is one of the most exciting proposals and it seems to be almost done. BGGA gives to Java lambda closures, so Java will looks like functional language.

Since November 2007, C# has had similar characteristics, and it is hard to find a developer who dislikes those new features, but it is, even nowadays, easy to find developers who ignore it.

I thought that we would get the same in the Java community. I was wrong. A lot of them just think that those kind of modifications will come with an army, which will destroy every sign of smartness. The argue? They thought that if the same project is developed by a bunch of developers and the half of them use the imperative way and the other half the functional way, it will be a mess.

I do not think so. Java is, right now,  powerful enough to allows us to write code in many different ways, and no one think that it is a mess. Would you be frightened if some developers would use “if else” and others would use the ternary operator? Oh my Lord! The sky will fall down on our heads!

If you develop in x language, you must know its functions. You are not obliged  to use every single feature, but you must understand everything.

When I write C# code, I always try to use the functional way, because I strongly believe that it is better to express what you want, instead of saying how you want it also. By omitting that part you are avoiding errors, and, by the way, getting the code more legible (which is always good).

To sum up, for those who say that the java community can’t take a step forward because some developers will not have enough time to learn the new features, please, look for a better excuse.