Oct 28, 2009

MonoBrasil's new site is live!!!

For those Monoers able to read Brazilian Portuguese, rejoice (just kidding): our brand new MonoBrasil site is up and running.

We are still trying to fill it up with content we already had at the older site, while revising it in the process, and creating some new content, with the many, many, many new things spinning in the Mono world.

Content contributions are welcome, preferably in Portuguese (of the Brazilian variety or not), but also English/Spanish content that we may be able to translate will also be accounted as "Good Deeds" by MonoBrasil's demigods (currently that means me and my good fellow Binhara).

<pt-BR>Vejo vocês lá!!!</pt-BR>
<en>See you there</en>

Oct 21, 2009

We've upgraded to a Enterprise Licensed Monotouch

First thing to try (while waiting Apple bureaucracy to process our requests):

Build our prototype to the iPhone target... result: the binary of the program grows from 5MB to more than 7MB.

But I still think it is fairly sized for what it is carrying inside...

Sep 18, 2009

Developing for IPhone with MonoTouch

I'm developing my first app for the iPhone using Mono, MonoTouch and MonoDevelop in a Mac Mini. Never used seriously a Mac before, and last time I've developed something professionally for an Apple platform was for the Apple II, back in the 1970s (yes, I'm that old...).

Anyway, it is awesome to be able to leverage my skills with Mono and C#, instead of having to resort to Objective-C, to get the job done.

So far, I'm tackling the still steep learning curve over Cocoa, Interface Builder, and the limitations imposed over Mono by the AOT compiling the iPhone platform mandates.

My app has just a Login View, so far, that already interacts and validates against a hard-coded password, and Monodevelop generates an executable with some 4.7 Megabytes to be deployed to the iPhone Simulator.

When you think that all the Mono native runtime and huge parts of the basic class library already in native binary format is in there, I think it is a reasonable size, that won't grow much until I add loads and loads of functionality to the application.

I've been using the evaluation version of Monotouch so far, but I think it is proving itself worth the price, and my boss already said the investment on buying one or two (if we buy a second mac) enterprise licenses has a green.

Now I'm going to move more code from our J2ME version of the app to C#, while also trying to build an usable interface on top of it along the Apple guidelines.

Sep 16, 2009

Trying to change a background image on this blog

First insert it here to upload to blogger (in truth blogspot):Obtained from PatternCooler
I've obtained it from PatternCooler
After I save it I'll try to change the template CSS to refer to it.

Aug 26, 2009

PHP Toolkit for ADO.NET Data Services

Well that is an interesting crossover: Having your data served by .NET on a REST way, being easily consumed by a PHP web app.

See A new bridge for PHP developers to .NET through REST: PHP Toolkit for ADO.NET Data Services which I've found via Julie Lerman's Blog , which I've found out via Google after receiving an email from O'Reilly inviting to a free webcast with her: Entity Framework Tips & Tricks.

This is the nature of the Internet, it provides a continuous stream of connections (links) popping up every second that allow us to thread our way through many interesting subjects.

For a curious mind like mine, this is both a blessing and a curse, as it allows me to grow my knowledge and renew my stock of questions, but surely steal out lots of my time, thus playing havoc with my personal planning... :)

May 19, 2009

Book meme

Instructions :
  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.
"Uma parte das matérias será predominantemente presencial e outra, predominantemente virtual"

Translation:

"A number of classes will be predominantly face-to-face and others will be predominantly virtual"

Apr 29, 2009

Time to port some Windows XP drivers to Vista 64

Not the project I dreamed of, but it is still nice having to learn the innards of the newest Windows versions and x64 development.

Before anything else time to upgrade the DDKBUILD script to the newest available which covers kernel-mode development for Windows Vista and 2008 Server.


Put simply ddkbuild.cmd is a must-have for drivers' development, as it makes integration with VS2005 viable, newer versions of VS may also benefit but as I'm stuck with that version I don't know.

Apr 28, 2009

Sneer Summit was very nice!!!

We've discussed core technical issues like the component model abstracted around "Bricks", with some AOP-like cross-cut concerns added as "Natures". This was in Java.

Them some discussion on data-model separation. Currently it is tied to the component model, by defining POJOs that flow in-and-out the Brick mandatory public interface.

Them meta-programming, to substitute current "Nature", run-time injection of behavior with more debuggable Macros, but as that means using another language (Boo migrated to JVM as Boojay) it is not clearcut if the Sneer coders will go down this route.

After suffering some "Rock Band"-ness, I swayed to the sovereign games development session, where discussions just kept the big question unanswered, what kind of game would be a sucess in a Sovereign landscape.

Finally, we got back to the final all-voices discussions on the merits of pursuing such a project and how to make it effectively grow up. Most people feel that a killer app is needed, and that portable protocols should be defined to enable developers not to be forced to use Java or more generally just some specific language/platform to develop Sovereign pieces and apps.

I, for example, still prefer to implement my sovereign bits in C#,Boo, or probably some Mono-based DSL I'll cook in the vein of Intentional Programming or Reinvention Of Programming

Apr 24, 2009

Preparing for the Sneer Summit

Tomorrow night, I'll fly to Curitiba to participate in the Sneer Summit, that will happen on Sunday (Apr 25).

Have been reading all the basics on the subject (again and deeper), except the java code.
The subject is Sovereign Computing.

Probably some crazy idea will jailbreak out of my head, while there. Hopefully...

Apr 8, 2009

Java support in Google's App Engine and Mono and Sneer

I've been reading and watching the videos from Google's Campfire One, about the new features they've added to App Engine, specially the Java support, and got thinking of some possibilities when throwing Mono in the picture:

  1. We can see if they have interest in having Mono support in the App Engine, meaning basically to be able to host ASP.NET apps in there. That entails customizing the core libs/APIs using Mono as the VM and the libraries source, and also developing a plugin for Visual Studio (and maybe Monodevelop/Sharpdevelop) to give ASP.NET devs (WebForms and MVC) the same integrated experience they've provided for Java devs using Eclipse
  2. We can help Keerthi's proposal to GSOC for implementing a clone of Azzure take off, and integrate it into Monodevelop, and perhaps Visual Studio. The advantage here being that we would have an open-sourced cloud implementation, that more people can host, even as an in-house solution.
  3. We can retarget the Java in App Engine ideas from Computing in the Cloud, to Computing in the Crowd (Sovereign Computing),  it even keeps itself in the Java realm for the Sneer implementation of SC.
  4. Sneer.NET could offer something akin to Azzure
  5. We can drop all but the main concepts and have some Mono-based Cloud Implementation.
Well possibly some other permutations are also viable.
I've just thought to get the ball rolling on discussing those dreamable projects.

First reading an old Spolsky essay

The Iceberg Secret, Revealed (2002) dabbles in that pesky space between managers and programmers, where the success or failure of a project is slowly forged day by day.

As I've experienced myself some of those misadventures I agree with him on most things, except on the critics to Extreme Programming.

Corollary Two is historically proven true in my life, but that is easy, and to a lesser degree corollary One is very true also.

But number Five seems a bit too short-sighted: yes, you absolutely need to have the application/site good-looking when showing it off, but that MUST be backed with really useful and usable features, or after the 'wow!' factor dissipates it won't grow beyond the early-adopters crowd, and probably will also be abandoned by them.

Apr 6, 2009

I've been invited to the Sneer Summit

Sovereign Computing is the concept, Sneer is the reference implementation (in java, mostly, I believe).

Marvelous 'Go' player Klaus Wuestefeld is the man behind that vision. He and some other friends of mine are gathering together some 20 solar days down the time stream on the nice city of Curitiba, and they've invited me to share my craziness on the subject.

I'll try to fly down there and have some fun and perhaps let some useful idea escape from their prison in my mind through my lips.

I've officially asked permission to my wife and kids to stay away from them on a Sunday, and they gave me the green light so, unless monetary matters hold me, I'll be there.

Mar 26, 2009

Have you ever tried to change the default icon used on a VSNET Addin project? (Updated)

That icon is embedded in hexadecimal in the .Addin xml file.

<AboutIconData>000001000200101010000000040028010000260000002020100000000400E80200004E0100002800000010000000200000000100040000000000C0000000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000000000000000007FFF8FF8FF8F00007FFF8FF8FF8F000078888888888800007F778778778F00007F778778778F000078888888888800007F778778778F00007F778778778F000078888888888800007F778778778F00007F778778778F000078888888800000007FFF8FF8F7F700007FFF8FF8F770000077777777770000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0010000C0030000C0070000C00F0000280000002000000040000000010004000000000000020000000000000000000010000000100000000000000000008000008000000080800080000000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220022B2222B2022B2022B02222B22B022022B22022B2022B2022B22000022B022022B22022B2022B2022B22000022B02222B022022B2022B2022B22222B222B22022B22022B2022B2022B22022B222222022B22022B222B0222B00222B0220222022B000000000000000000000000002222B000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000555555555555555555555555555555555555555555555555555555555555555500000000000000000000000000000000055000055005555500550055055005500550005550550005505500550550550005500555505500055055005505505500055055055055000550550055055055000550550550550005505500550550550005555005505500055055555005505550055500055055000550000000000055000550000550550005500000000550550000000000000000000000000000000000555555555555555555555555555555555555555555555555555555555555555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF30042201208420F1208420F104842000208420802080861223FFFFFF07FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000FFFFFFFF9E60CC999C4E4C93984E4C93924E4C93924E4C93864E41918E4E7FF39E4E7F93FFFFFFFF0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF</AboutIconData>


I've found some people discussing ways to do that.
Someone talked about an alternate undocumented tag to put a reference but it didn't work, but another one really offered me the missing and useful information that the blob there in the xml is just the .ico file in hex form.

Problem is that I wanted to make it an automatic thing: edit the .ico file, build the project and voilá! the new icon shows when you select your rebuilt addin in the test VSNET instance "About" dialog.

So first I've coded this small utility program:


using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;

namespace IconHexer
{
class Program
{
static void Main(string[] args)
{
try {
if (args.Length >= 1) {
string icoFile = args[0];
if (File.Exists(icoFile)) {
StringBuilder builder = new StringBuilder();
byte[] data = File.ReadAllBytes(icoFile);
for (int i = 0; i < data.Length; i++)
builder.Append(data[i].ToString("X2"));
string hexedIcon = builder.ToString();
if (args.Length < 2)
Console.WriteLine(hexedIcon);
else
for (int j = 1; j < args.Length; j++) {
string addinFile = args[j];
if (File.Exists(addinFile)) {
string addinBackupFile = addinFile + ".backup";
string xml = File.ReadAllText(addinFile, Encoding.Unicode);
int start = xml.IndexOf("<AboutIconData>");
int end = xml.IndexOf("</AboutIconData>");
if (end > start && start > 0) {
xml = xml.Substring(0, start + "<AboutIconData>".Length)
+ hexedIcon
+ xml.Substring(end);
if (File.Exists(addinBackupFile))
File.Delete(addinBackupFile);
File.Move(addinFile, addinBackupFile);
File.WriteAllText(addinFile, xml, Encoding.Unicode);
Console.WriteLine("File '{0}' updated (backuped at '{1}')", addinFile, addinBackupFile);
}
} else {
ShowError("Addin file '{0}' doesn't exist", addinFile);
}
}
} else {
ShowError("Icon file '{0}' doesn't exist", icoFile);
}
} else {
ShowError("Please use '{0} pathToIcoFile [pathToAddinFile]'", Path.GetFileName(Assembly.GetEntryAssembly().Location));
}
} catch (Exception e) {
ShowError(e.ToString());
}
}

private static void ShowError(string format, params string[] parameters)
{
Console.Error.WriteLine("ERROR: " + format, parameters);
Environment.ExitCode = 1;
}
}
}

After building it as an exe tool in the solution I've tweaked the csproj for the Addin project to specially mark the two addin files:
<ItemGroup>
<Content Include="..\..\..\Addins\NUnitRunnerAddIn - For Testing.AddIn">
<Link>NUnitRunnerAddIn - For Testing.AddIn</Link>
<AddinFile>true</AddinFile>
</Content>
<EmbeddedResource Include="NUnitRunnerAddIn.ico" />
<Content Include="NUnitRunnerAddIn.AddIn">
<AddinFile>true</AddinFile>
</Content>
</ItemGroup>

and use them on a BeforeBuild target:
<Target Name="BeforeBuild">
<Message Importance="high" Text="Updating embedded icon on .Addin files"/>
<Exec
WorkingDirectory="$(ProjectDir)"
Command="&quot;$(SolutionDir)IconHexer\bin\$(ConfigurationName)\IconHexer&quot; &quot;$(ProjectDir)NUnitRunnerAddIn.ico&quot; &quot;%(Content.Identity)&quot;"
Condition="%(Content.AddinFile) == 'true'" />
</Target>

Last step is to put a build dependency on the tool project from the addin project, and edit the icon file (which path is hardcoded on the example above) and build the solution and run the addin and as expected the new icon is there in the VSNET about box as promised.

Hope it helps some other guy having to do that in the future...

Mar 20, 2009

TED Video - Kamal Meattle: How to grow your own fresh air

brings some interesting info about how to continuously renew the stock of this scarce resource "breathable air"

Some more info about Mr. Meattle:
http://www.technologyreview.com/read_article.aspx?id=17442

About the newest building he cites in the video:

Dear lazyweb: can you tell me where do I find the published papers he talks explaining more precisely the plants and proportions needed?

Kamal expands it a bit at:


but any more info is welcome. For instance, some blog I just scanned was talking about one of those plants being bad for cats, I have a dog so I would like to know the reasoning (the pros and cons) on plant selection, on a expanded view.

Well you got the gist of it, comments welcome

Feb 7, 2009

Boojay came to daylight

Nice screencast from my friend Rodrigo, the creator of boo and boojay.

Highly recommended. The most interesting part is that the pipelined design of the boo compiler allows this, to have it targeting different virtual machines and class libraries.

Niiiice...

Jan 20, 2009

I liked Obama's inaugural speach...

He is a great speaker, and preaches work and hope, so I wish him success in keeping up with his promises.

Happy new president, my USA friends. :)

PS.: Aside from some network congestion problems, Silverlight surely passed the test on streaming to probably a huge audience (I was bound to a Windows machine, but watched it in Chrome probably reusing Firefox's version of the Silverlight plugin)

Jan 10, 2009

New project DinDin

Starting a new open source (BSD license) project at google code: DinDin, which is a Brazilian Portuguese slang for money, as it is a distributed multi-platform home finance system based on Mono (WinForms+ASP.NET+Ajax) and maybe Moonlight.

Yes, I know, DinDin is also a childish slang for Dinner in English.