Disclaimer: This is a personal web page. Contents written here do not represent the position of my employer.
Saturday, February 08, 2020
Xamarin forks and whatnots
- In Linux(GTK), cold storage mode when pairing was broken, because the absence of internet connection was not being detected properly. The bug was in a 3rd-party nuget library we were using: Xam.Plugin.Connectivity. But we couldn't migrate to Xamarin.Essentials for this feature because Xamarin.Essentials lacks support for some platforms that we already supported (not officially, but we know geewallet worked on them even if we haven't released binaries/packages for all of them yet). The solution? We forked Xamarin.Essentials to include support for these platforms (macOS and Linux), fixed the bug in our fork, and published our fork in nuget under the name `DotNetEssentials`. Whenever Xamarin.Essentials starts supporting these platforms, we will stop using our fork.
- The clipboard functionality in geewallet depended on another 3rd-party nuget library: Xamarin.Plugins.Clipboard. The GTK bits of this were actually contributed by me to their github repository as a Pull Request some time ago, so we just packaged the same code to include it in our new DotNetEssentials fork. One dependency less to care about!
- Xamarin.Forms had a strange bug that caused some buttons sometimes to not be re-enabled. This bug has been fixed by one of our developers and its fix was included in the new pre-release of Xamarin.Forms 4.5, so we have upgraded geewallet to use this new version instead of v4.3.
Labels: CSharp, General, Ingenieria, Miscelanea, Mono, Programacion, SoftwareLibre, Xamarin
Sunday, January 05, 2020
Introducing geewallet
- Make it even more user friendly: blockchain addresses are akin to the numeric IP addresses of the early 80s when DNS still didn’t exist. We plan to use either ENS or IPNS or BNS or OpenCAP so that people can identify recipients much more easily.
- Implement Layer2 technologies: we’re already past the proof of concept phase. We have branches that can open channels. The promise of these technologies is instantaneous transactions (no waits!) and ridiculous (if not free) fees.
- Switch the GTK Xamarin.Forms driver to work with the new “GtkSharp” binding under the hood, which doesn’t require glue libraries. (I’ve had quite a few nightmares with native dependencies/libs when building the sandboxed snap package!)
- Integrate with some Rust projects: MimbleWimble(Grin) lib, the distributed COMIT project for trustless atomic swaps, or other Layer2-related ones such as rust-lightning.
- Cryptography work: threshold keys or deniable encryption (think "duress" passwords).
- NFC support (find recipients without QR codes!).
- Tizen support (watches!).
- Acceptance testing via UI Selenium tests (look up the Uno Platform).
- Flatpak support: unfortunately I haven’t had time to look at this sandboxing technology, but it shouldn’t be too hard to do, especially considering that there’s already a Mono-based project that supports it: SparkleShare.
- Ubuntu packaging: there’s a patch blocked on some Ubuntu bug that makes the wallet (or any .NET app these days, as it affects the .NET package manager: nuget) not build in Ubuntu 19.10. If this patch is not merged soon, the next LTS of Ubuntu will have this bug :( As far as I understand, what needs to be solved is this issue so that the latest hotfixes are bundled. (BTW I have to thank Timotheus Pokorra, the person in charge to package Mono in Fedora, for his help on this matter so far.)
- GNOME community: I’m in search for a home for this project. I don’t like that it lives in my GitLab username, because it’s not easy to find. One of the reasons I’ve used GitLab is because I love the fact that being open source, many communities are adopting this infrastructure, like Debian and GNOME. That’s why I’ve used as a bug tracker, for merge requests and to run CI jobs. This means that it should be easy to migrate to GNOME’s GitLab, isn’t it? There are unmaintained projects (e.g. banshee, which I couldn’t continue maintaining due to changes in life priorities...) already hosted there, so maybe it’s not much to ask if I could host a maintained one? It's probably the first Gtk-based wallet out there.
- Please don’t ask me to add support for your favourite %coin% or <token>.
- If you want to contribute, don’t ask me what to work on, just think of your personal itch you want to scratch and discuss it with me filing a GitLab issue. If you’re a C# developer, I wrote a quick F# tutorial for you.
- Thanks for reading up until here! It’s my pleasure to write about this project.
PS: If you're still not convinced about these technologies or if you didn't understand that PoW video I posted earlier, I recommend you to go back to basics by watching this other video produced by a mathematician educator which explains it really well.
Labels: CSharp, General, Gnome, Ingenieria, Miscelanea, Mono, Programacion, Seguridad, SoftwareLibre, Xamarin
Wednesday, January 23, 2019
WORA-WNLF
- Xamarin (the company) was bought by Microsoft and, at the same time, Xamarin (the product) was open sourced.
- Xamarin.Forms is opensource now (TBH not sure if it was proprietary before, or it was always opensource).
- Xamarin.Forms started supporting macOS and Windows UWP.
- Xamarin.Forms 3.0 included support for GTK and WPF.
Labels: CSharp, General, Gnome, Ingenieria, Mono, Programacion, SoftwareLibre, Xamarin
Tuesday, March 17, 2015
How do you upgrade your distro? A tale of two workarounds
Every classic Linuxer would know why it's very handy to dedicate a separate partition for the /home folder of your tree: you could in theory share it between multiple OSs that you installed in your box (which you choose to run when you start your computer).
Now, I'm guessing that many people reading and nodding to the above, will also know that sharing /home/ is one thing, sharing $HOME (/home/yourUserName) is a completely different beast.
For example: you have a stable distro installed in your box; you decide to install a new version of that distro along the old one, in the same box. You run the new distro with a new account tied to the old /home/yourUserName folder: KABOOM!!! Weird things start happening. Among these:
- The newer versions of your desktop or desktop programs don't run properly with the settings saved in your .dotDirectories (they are to blame because they didn't probably have a settings-conversion feature).
- The newer versions of your desktop or desktop programs have a buggy settings-conversion feature; because your program does not run properly, or as well as it would have run if it had been ran for the first time with no settings saved at all.
- The newer versions of your non-buggy desktop or desktop programs convert your settings to a new format. Then when you go back and run your old distro again, your old-versioned programs stop working because they see settings in a new format which they don't understand. (This is impossible to fix, or very hard.) It's very important that this scenario works, because the migration to the new version of your distro may not be immediate, it may take you some days to figure everything out, and until that happens, you want to still be able to run the stable version of your desktop and desktop programs
- Etc.
To workaround these problems, I have a strategy: I use a different /home/ sub-directory for each distro installed in my system. For example, for distro X version A.B I use /home/knocteXAB/, for distro Y version C.D I use /home/knocteYCD/. The advantage about this is that you can migrate your settings manually and at your own pace. But then, you may be asking, how to really take advantage of sharing the /home folder when using this technique?
Easy: I keep non-settings data (mainly the non-dotfiles) in a different /home/ folder with no associated account in any of the distros. For example: /home/knocte/ (no version suffix). Then, from each of the suffixed /home/ subfolders, I setup symlinks to this other folder, setting the appropriate permissions. For instance:
- /home/knocteXAB/Music -> /home/knocte/Music
- /home/knocteXAB/Documents -> /home/knocte/Documents
- /home/knocteYCD/Music -> /home/knocte/Music
- /home/knocteYCD/Documents -> /home/knocte/Documents
- Etc.
- Debugger not stopping on breakpoints.
- Builds breaking with obscure error messages.
- Debugger opening file in the IDE which was already open, duplicating two tabs for the same file.
- Etc.
So I had to use a workaround for my workaround: clone all my projects in $HOME instead of /home/knocte/Documents/Code/OpenSource/ (yah, I'm this organized ;) ).
I've been trying to fix these problems for a while, without much time on my hands.
But the last weeks a magical thing happened: I decided to finally sit down and try to fix the last two remaining, and my patches were all accepted and merged last week! (at least all the ones fixing symlink-related problems), woo!!!
So the lessons to learn here are:
- Even the slickest workarounds have problems. Try to fix or report settings-conversion bugs!!
- Don't ever quit trying to fix a problem. Some day you'll have the solution and you will realize it was simpler than you thought.
- realpath is your friend.
- MonoDevelop (master branch) is now less buggy and as amazing as (or more than) ever (</PUBLIC_SERVICE_ANNOUNCEMENT>).
Labels: CSharp, General, Gnome, Mono, Programacion, SoftwareLibre
Monday, May 05, 2014
GSoC 2013 with Gnome
In summer 2013, Tomasz Maczynski worked on Banshee as a GSoC student, and he did great work! He developed a SongKick extension, and a FanArt.tv one. Both were worked on in the banshee-community-extensions repository. They work very well but there are a few downsides about this work, which we didn't have time to fix:
- The FanArt.TV extension depended on some Banshee API that hasn't been added yet to mainline. The patch to add it lived in bugzilla for a while, in a bug about a feature request to have images in the artist list. The reason for not committing the patch even if I had already reviewed it was because I was wary about it, since it allowed FanArt.TV to hook its ArtistList widget, but wouldn't be really extension friendly. What I mean is that if there was other extension that wanted to also attach a different ArtistList, it would conflict with FanArt extension when enabled at the same time. The ideal thing would be to expose this functionality as an extension point, so that if more than one extension attached a new kind of ArtistList widget, the user could switch between the two from the UI when both extensions were enabled. When I mentioned this in the bug, awesome Banshee-extension developer Frank Ziegler jumped in and created the extension interface necessary for this. I've been reviewing the patches in the last days (couldn't do it before because I really wanted to release 2.9.1 and 2.6.2 versions before landing this work) and I'll likely commit them this week.
- The FanART.TV extension uses Hyena's ListView widget to show images. This is the main widget that Banshee uses for showing the tracks in the main view. It's a great custom widget because it allows very fast rendering of data coming from an SQLite database, but it wasn't optimized for rendering images. The main disadvantage of it is in the case that images have different heights, because the ListView will just allocate a height for each row equal to the tallest of the images used. This means that the widget shown could be a bit ugly if you have many artists in your library and some of them have very differently sized images. Tomasz worked on this a bit, but couldn't finish it because of lack of time (we have a WIP patch). But fortunately this will be fixed this summer!
- Both SongKick and FanArt.TV don't implement caching yet. This is not only important to save bandwidth from the point of view of the client, but also from the point of view of the server! (We could even violate their ToS if we didn't implement this, IIRC.) Fortunately this will be fixed this summer!
- SongKick extension provides several ways to discover gigs: searching by city, by artist, etc. It even suggests you artists extracted from your library that composed songs which you marked with a high rating! But IMO this is not enough, SongKick extension should even be smarter and query ahead of time looking for your favorite artists *and* near your area (doing the latter via GeoLocation). Fortunately this will be fixed this summer! (and we will use Gnome infrastructure for it)
That is all folks! Stay tuned for the next blog post, which will explain the plan for GSoC 2014 (this year I get to mentor three students!).
Labels: CSharp, General, Gnome, Programacion, SoftwareLibre
Friday, June 14, 2013
Modernizing blam's autotools (or shaving the yak to move out from GoogleReader...)
Yes, I've been victim of Google's cuts too... And I was wondering, where should I move? Feedly? ThingyBob? Well, I shouldn't make the same mistake twice, right?
Actually, some time ago I was using a desktop app to avoid relying on software that I cannot control (yes, vendor lock-in, the most important thing that open source tries to solve, right?): Thunderbird. But somehow the convenience of a web app (that I can access from any computer) and the hassle of using my mail client for RSS reading made me move to the web.
I should be able to find a replacement that no company or individual can "take down", and which feels less clunky than Thunderbird for reading RSS. So, enter blam (in the future I'll figure out how to sync its state between computers, maybe using SparkleShare?, to achieve that same convenience that a web-app provides), that Gnome app that has strangely managed to not catch my eye until now...
Well, maybe because if I install it from debian sid and I try to import my very first RSS feed from my GoogleReader list it doesn't work? Well, apparently it is a bug that is already fixed upstream, thanks to Carlos which has modernized the way that the program deals with XML and serialization.
Then I went ahead and tried to compile master myself... and guess what, the autogen.sh execution fails. Here the yak shaving begins, when I feel like this when trying to fix the autotools stuff:
Fortunately, after some tinkering (and some copy&paste from banshee's build scripts), I managed to fix the problem, and also modernized a bit some things (like using the brand new ".ac" extension instead of ".in" for the configure script, or using properly the AC_INIT and AM_AUTOMAKE_INIT macros,...).
Anyway, the real thing to highlight here is that while I was fixing this stuff and pushing to the repository...
... I saw some really good stuff committed by Carlos: using the new .NET 4.5 C# async patterns to get rid of those ugly callbacks! Kudos to him.
And if you're willing to help more with our autotools housekeeping, please do, I still feel this autogen.sh is way too long and needs some ironing.
* And if you're wondering what's up with GSoC (aka Google Summer of Code):
- I had Nicholas Little lined up to work on Rygel+Banshee integration, but sadly he couldn't apply due to work commitments (hopefully he will still work with me on it in his spare time).
- I had Rashid Khan lined up to work on Cydin+Banshee integration, but sadly there were not enough GSoC spots for him :( (fortuntately he told me he still wanted to work on it with me in his spare time).
- I had Tomasz Maczyński lined up to work on Banshee integration with more REST APIs, and fortunately he was selected! So expect some nice FanArt.TV and SongKick plugins soon!
Labels: CSharp, General, Gnome, Mono, SoftwareLibre
Tuesday, May 01, 2012
Apple and LastFM can still receive open source love
But contradicting what you may think, open source is still friendly to them.
If you have an Apple device supported by libgpod* and you're an avid user of LastFM's scrobbling feature, you can today configure Banshee to send all the songs that were played on your device to your LastFM account the next time you connect your device while you have Banshee running.
Pretty handy, especially if you own a device that doesn't have internet connection these days (something definitely not on the rise). You should thank our new Banshee developer Phil Trimble for doing an awesome job on implementing this feature (and on resisting to not sending me to hell when I made the patch reviews...).
The next version of Banshee, in the 2.5.x series, should include this feature. Until then, hold on to your seats! (or compile it yourself from master ;) )
* Beware: not the last generation ones! you would have to donate to libgpod project if you want those recognised.
PS: If you're a developer and want to extend this feature to other kind of devices, you should just implement the interface IBatchScrobblerSource in the corresponding Source class of your device. If you want to make it scrobble to a different service than LastFM, just create a Banshee addin (simple sample here) that subscribes to the ServiceManager.SourceManager.SourceAdded event to then later subscribe to the IBatchScrobbleSource.ReadyToScrobble event from it, to later make the corresponding HttpWebRequests to the scrobbling service.
Labels: CSharp, General, Gnome, Mono, Programacion, SoftwareLibre
Sunday, May 08, 2011
#gtk#
I had never seen this channel with people in it at all in the past. I guess the recent interest comes from the fact that gtk-sharp master is already targeting Gtk+ 3.x API and some people are starting to use it to port things.
One example is Hyena, the awesome library that Gnome projects F-Spot, Banshee and PdfMod use (am I missing some other?). I started the port some weeks ago and all I have received is positive feedback, encouragement, and also a lot of help! For example Olivier Dufour (which I guess he will be recently known as one of the superstars that brought DVD support to Banshee -- work finished but still unmerged) who helped with accessibility and warnings, and Mike Kestner (father/maintainer of all these GAPI-based *-sharp bindings) which helped reviewing my patches to the binding and fixing other issues I reported (and of course for making huge efforts, in the first place, to have the bindings ready for the 3.x cycle, with even some GObject-Introspection experimentation, which I guess is still in the early stages and not enabled yet).
Stay tuned for the progress! (as new contributors have expressed interest in helping out soon). Branches are being created so you can join the effort if you feel like (bugs in bugzilla too, to track what's pending).
Labels: CSharp, General, Gnome, Mono, Programacion, SoftwareLibre
Monday, April 11, 2011
Calling hackers who care about Android+Banshee
Unfortunately my Android phone broke completely (don't ask me the details...) so I cannot work on the patch anymore. Anyone wants to continue the work?
If yes, go ahead and ask me anything you want, I'm usually in irc://irc.gnome.org/banshee with the "knocte" nickname, or you could also ask the question on the channel if I'm not there, there are usually awesome contributors there that will try to help. If you haven't ever coded for banshee, check the Contributing page first.
BTW, kudos to all the people involved in the Banshee v.2.0 release!
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Sunday, April 10, 2011
WTF reduction
What it basically does is a bit of what I call WTF reduction: you will no longer get a confusing message like "For property 'Foo' expected 'Bar' of type 'Bar' but got 'Bar' of type 'Bar'" when unit testing your entities' properties.
AFAIK the next release will include this, and will be the first one to link to the new version of NHibernate, 3.0, which I've found that works very well.
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Sunday, March 27, 2011
RT: MEF vs MonoAddins
> Can you give a short summary on why you replaced MEF with Mono.Addins?
Basically it came down to maturity. Mono.Addins seems far more stable and mature than MEF. The MEF documentation was lacking, inconsistent and out of date in a lot of places. But all that could be worked around, and for the first few internal versions of our app, MEF was servicing us just fine.
Then our addins became a bit more complex. We needed to package them up with multiple files, ideally distribute them as an archive, host them online in a plugin exchange, allow them to be discovered and installed easily. Essentially this page covers features in Mono.Addins that made us switch rather than implementing a lot of the same things using MEF ourselves:
http://monoaddins.codeplex.com/wikipage?title=Creating%20and%20Managing%20Add-in%20Packages&referringTitle=Programming%20Guide
At the time as well MEF had issues on Mono on linux. This might have been a problem with how we were using it, but it just turned out easier to plonk Mono.Addins in instead. Was an easy migration and has a lot more power and features straight out of the box (and it worked on Linux).
Your millage may vary, and your needs are probably different. MEF might be an awesome tool for your requirements. It is a little simpler to get up and running and requires less engineering to support it (which was one of the reasons we used it first off).
Hope that helps,
Michael
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Wednesday, September 08, 2010
Version Tolerant Serialization with Mono
(Zoot Woman - Lonely By Your Syde)
During the last months I've kept working {with|on} Mono, but not working for Novell anymore.
Today I'm proud to blog about a bit of work I've done on Mono towards a better Binary Serialization experience:
- mono-api-info command now can output ABI instead of API if you append the flag --abi. It has been useful for us in LindenLab while working on binary serialization compatibility between versions (already upstream!, so will be available in Mono v2.8, even with a new man page).
If you ever wondered why your .NET code is no longer capable of deserializing some old binary object you had in your servers, instead of fixing the problem in a case-by-case basis, you can now see the whole picture by just diffing the output of mono-api-info --abi from your current and old codebase! A small TODO that I haven't completed yet is to deal with automatic properties (because we still don't use them) so that would be an exercise for the reader! - Fix for upstream Mono to act as .NET in regards to Version Tolerant Serialization, a patch to which I have just added a lot more unit tests (soon to be pushed hopefully).
You can see the patch of this quite old mono bug here. Disclaimer: to be honest you will only need the previous --abi tool if you use a Mono version prior this fix, because from my testing VTS in MS.NET works as if every new field had an [OptionalField] attached! (At least the BinaryFormatter, the TODO here for the reader is to test the SoapFormatter ;) )
On a totally unrelated note: kudos to the MonoDevelop team for making such a great releases lately (and fixing the bugs I report so promptly). I've been testing it the last months on Windows and I can say it's a great experience to see your favorite IDE working cross-platform and making you not depend on VS anymore if you need to work on Windows from time to time (I know the Express versions are free, and are great! but they do not support plugins :( ). BTW, I've been lately experimenting with the C language support in this IDE, and have had some problems, but the real culprit seems to lay behind some wierd behaviour of my gdb in opensuse. Taking advantage that I'm in opensuse planet, can I do a couple of lazyweb requests?:
a) If you're quite familiar with gdb, can you take a look at these 2 bugs in case it rings any bell for you? BNC#588175, BNC#459274
b) Can you try to reproduce those bugs in openSUSE 11.3? (I haven't migrated yet from 11.2 because I fear about the HALlessness of it :) )
PS: Wondered why the video on the top? Well, I like the trend that some people have about posting random photos in their blog posts even when they may be completely unrelated, but in my case I love music so I figured this would suit better. Of course I would rather embed a WebM video or, even better, something that can preview a song (without video) in a "normally-lower-quality-than-what-you-can-buy" way, so if you have any hints, those are welcome! I especially mention the latter in this case because the Album version of the song above is much much better (synth pop FTW!).
UPDATE 28-AUG-2012: Found a video-less alternative to youtube for embedding songs! It is GoEar.
Labels: CSharp, General, Ingenieria, Mono, Programacion, SoftwareLibre
Tuesday, July 06, 2010
Mono? What?
.NET Culture Shock: Why .NET Adoption Lags Among Startups
Especially sad to find that Mono is not mentioned in the article.
Especially super sad to find that Mono is mentioned in the comments, but in a negative way.
Hey Mono community, help me reply all this nonsense.
Labels: CSharp, General, Ingenieria, Mono, Programacion, SoftwareLibre, WebDev
Monday, June 01, 2009
It's all about synchronization
Who could have imagined at that time, that 3 years later I would not only be working for Novell, but also be able to contribute to it at normal work hours! Yes, this is ITO, and our team spent a week hacking on other projects. In my case, I worked with the awesome guys Stephen Shaw and Mario Carrión. We managed to create an iFolder appliance for the server based on openSUSE 11.1, very easy to install thanks to SUSE Studio and to a new OBS repository where we packaged a preview of Mono 2.4.2 and some fixes needed to make it work.
We even created some demos! (Sorry for the quality of the sound, we had some problems when recording them)
The first one: setting up the appliance.
The second one: creating a user and using the Linux iFolder client.
Now, the next two videos are intended to show the second part of our work on that innovation week: new features.
The third one: automatic/immediate local detection of changes, server side trash can.
The fourth one: automatic/immediate remote synchronization of changes.
How cool is that? Unfortunately, the patches still need work and cleanup (help welcome!), but I plan to do it soon and/or on next hack week.
Before coming back to hacking on iFolder, I wanted to finish some stuff am working on for Banshee, which is also about synchronization! Look at this bug for more details. Yes! bidirectional Rating synchronization, not only from Banshee to the iPod but from the iPod to Banshee. The patch is working fine for me, be sure to give it a go and provide some feedback. Thanks!
Another thing I have on my TODO list is integrate some old mono-based GPL ed2k library into monsoon, now that it's getting MonoAddins support! (Lately there's been many people asking me for the source code.) And now that I talk about monotorrent, how cool would be to make iFolder work with this awesome library??
PS: Hello PlanetSUSE! First post. Hola Planeta GnomeHispano ;)
UPDATE Jun-08-2009: It seems someone wants to resurrect the lphant kernel as well, but using WPF! (WTF?): http://sourceforge.net/projects/hathi/.
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Monday, March 30, 2009
I14Y happens
Some months later I came to know the new term 'a11y', and I started to see it in a lot of places. By that time, I only associated it with the web development world. Terms like "Unobstrusive JavaScript" were very related to it (and I even created an "AJAXy" library called AMUSE for this purpose).
Now let's talk about the next one: I14Y. This concept is present when things like this happen: "I can open an (Microsoft's)OpenXML file with some (Novell's) edition of (Sun's)OpenOffice". Or even more weird things: "I can manage my (Apple's)IPod thanks to a (Microsoft's).NET-powered application called (Novell's)Banshee". Or even more awesome ones: "I can use (Sun?'s)Orca screen reader to control my (Microsoft's)Windows.Forms-powered applications in my (Novell's)SUSE Linux Box!".
So, yeah, we made it! Along with the awesome releases of Mono 2.4 and MonoDevelop 2.0.
Now, guess what's the word?
Labels: CSharp, General, Ingenieria, Mono, Mozilla, Programacion, SoftwareLibre, WebDev
Wednesday, February 04, 2009
My first .NET runtime wishlist item
public class TestStaticInits
{
public static readonly X var = new X ("Hello" + world);
private static string world = " World";
}
public class X
{
public X (string s)
{
Console.WriteLine (s);
}
public override string ToString () { return "Bye"; }
}
public class WishList
{
public static int Main(string[] args)
{
Console.WriteLine (TestStaticInits.var.ToString ());
return 0;
}
}
Shouldn't this print Hello World instead of just Hello? Basic initializations should have more priority than those involving constructors :)
At least it works if you replace the second static with const... But this confused me a bit for a while. So definitely something the compiler could warn about (ok, Gendarme is another candidate too).
UPDATE: And anyway, if we accept that our runtime is not so clever, it should give a NRE instead of printing Hello, right? You cannot concatenate a string with null. So is this a .NET bug?
UPDATE: Doh! I could have sworn that I got a lot of NRE's in the past when coding this
Console.WriteLine ("Hey" + null); (I mean, when using a var and not protecting against null). Thanks for all the comments.Labels: CSharp, General, Mono, Programacion
Sunday, September 07, 2008
Hackweeks
I was not so lucky as most of my teammates, who spent the week on the wonderful offices (as they say) of Novell Utah. Maybe if I was in the states already... but well, I had recently an interview in the US Embassy which was the last step of my visa process, so I hope that at least I can make it for the Gnome Boston Summit!
So, firstly I thought of dedicating my week to this task that I submitted to the ideas website, but in the end realized it would be a ton of work to complete without help, and nobody joined me so I decided to learn to use OpenSuseBuildService in order to package Bugzilla, a pretty complex server side software.
Fortunately, I've learnt a lot this week, especially thanks to all the people in irc://irc.freenode.net/#openSUSE-buildservice (above all, darix) and some people from my team (Ray Wang and Stephen Shaw). I could also contact the author of the RPM file for Fedora (who was formerly working for Red Hat), and he's willing to help on joining efforts, as OBS is cross-distribution.
Unfortunately, packaging is a complex task and I didn't finish the package. The documentation is a bit incomplete and having past experience in packaging is a plus that I didn't have. It's awesome that inside our UIA Team we have exclusive resources dedicate to this, because it would be impossible to do from just the developer side.
One of the difficulties I found is finding packages I needed. I could find some of them (BTW, using Webpin is cool for searching on SUSE software repositories, including Packman; except for the fact that doesn't enhance one-click-install) but not all so then I'll have to help on providing packages for some CPAN Perl modules, contributing to the devel:languages:perl official repo.
On the way of learning OBS, I also filed bugs and feature requests (not only to OBS, but also to Banshee! as I have been using it a lot lately at the same time I hack and I even cooked some small patches):
OBS:
Usability issues in project creation page
Link to "My projects" fails if no home:login project has been created yet
New option for uploading the tarball
ChangeLogs parsing is too strict: lines beginning with tab are not recognized, only one date format is accepted
OBS should not allow to create a package named "packageand"
The spec parser should detect the use of a miscplaced packageand(_:_) keyword
Banshee:
No such file or directory errors while importing
Cannot empty some ID3 tag fields
Importing songs without album metadata breaks artist navigation on the iPod
Banshee inserts deduced fictional text on metadata
Should try to locate correct album (and download its cover) in case no album is supplied on metadata
The patches are quite simple so I hope they get committed soon! Clearly Banshee devs and contributors are doing an amazing work, I'm specially amazed by the Moonlight effects, the Muinshee front-end and the effort that it seems is being dedicated to bring Library Sync & Refresh for 1.4. I wish them all the best success.
So let's get back to packaging. Firstly I thought I had found some limitations in OBS or rpm systems because the lack of proper "dual dependency" support. In the past when I installed Bugzilla manually (and updated it to newer versions) I found it a bit hard to do it, specially to deal with DB creation and upgrade. I wanted to make this process easier for the potential rpm user, but without limiting the choice of the DB engine used (as now Bugzilla supports MySQL, PostgreSQL, and Oracle, although the latter was not on my scope). It turns out that it's really hard to apply virtual-provides rules for these cases, as we should stablish more sub-dependencies depending on the db engine you choose, such as perl-DBD-mysql or perl-DBD-Pg, and because it would cause inconsistent situations in case someone in the future replaces his DB-engine with the alternative one (as in theory it should work at the dependencies-level without warning). For references, you may be interested in reading the whole thread about it in the BuildService mailing-list, whose last message includes a possible hack to workaround these problems using patterns (although I don't like to use patterns for solving something like this).
Even discarding the dream about solving this at a package level, it's difficult to solve it at an app level that wouldn't involve reading manuals. My idea was to modify Bugzilla upstream in order to avoid running manually a local script for its initialization, and replace it with a nice web front-end (even if it's only allowed to be run locally). That would cause problems because normally the webserver user doesn't have enough permissions to create files and the database tables and initial data (I'm sure there's always a solution that also doesn't expose security problems, but it's hard to find it as it's noticed in this thread in bugzilla devel newsgroup; so, help is truly welcome).
Maybe the easier and fastest solution is a mixture of both worlds, that is, having a web front-end that asks you the initial configuration, and the form submission process just writes it in a local XML and tells the admin to open a console and run a script as root to finish the process. But even with this solution I guess we should need something to detect at runtime (which should be cross distribution) if some package is installed (which also checks the version). I guess there's already some of that capabilities used in the bugzilla's script checksetup.pl, so I would reuse them. However, in case it finds a problem, there's no way for the application to request installation of a package directly to your OS (but I've attended to a PackageKit conference in last Guadec in which I heard something about this possibility in the future!).
Labels: CSharp, General, Mono, Mozilla, Programacion, Seguridad, SoftwareLibre, WebDev
Tuesday, July 08, 2008
Subversion 1.5.0 highlights and some MD hacking
- A common problem in older versions of Subversion was the way in which svn update handled incoming copies and moves.
Consider this scenario: Harry runs svn move foo bar; svn commit, and meanwhile Sally makes local changes to 'foo', and then runs svn update. In earlier versions of Subversion, the server would send down a completely new file 'bar', and unversion the file 'foo' (if it had no uncommitted changes, Subversion would remove it entirely.) From Sally's point of view, her changes seem to be lost; the newly added 'bar' file has the older content, and the file 'foo' has been taken out of version control.
In Subversion 1.5, the client and server both attempt to be smarter about this. The server doesn't send a whole new file during the update, but rather instructions to copy something that likely already exists in the working copy. So Sally's 'foo' file is copied to 'bar' (with local edits intact!). - Merge tracking means Subversion keeps track of what changes have been merged where. This reduces the overhead involved in maintaining branches, and gives users a way to inquire what changes are merged — or are available to be merged — on different lines of development.
Example (one of the improvements in place): Merging changes from (say) trunk to a branch no longer requires that you specify the revision range. Instead, each time you want to sync up with trunk, you can just do:
$ cd BRANCH_WORKING_COPY
$ svn merge URL_TO_TRUNK
Subversion will figure out what changes from URL_TO_TRUNK have not yet been merged and pull in just those changes. When it's time to merge the branch back to trunk, do this:
$ cd TRUNK_WORKING_COPY
$ svn merge --reintegrate URL_TO_BRANCH - Sparse checkouts (via new --depth option): Many users have very large trees of which they only want to checkout certain parts. In previous versions of Subversion, checkout -N was not really up to this task. Subversion 1.5 introduces the --depth option to the checkout, and other subcommands.
- Conflict resolution is now done interactively by the command-line client for the update/switch/merge subcommands.
- Relative URLs and @peg revisions for svn:externals.
Don't you think this is AMAZING? This means we almost got full/real MOVE support and that merging is taking the best ideas from DVCS systems (yes, we lack yet local commits).
To get up to speed with DVCS features I would also add pending commits feature although there are concerns and people seem to prefer it to be implemented upstream in bug tracking tools.
Well, I guess you already may have noticed I don't like current DVCS tools (at least the most popular), by a different set of (a little bit subjective, I know) set of reasons:
- Git: it's implemented in an unmanaged language (yeah SVN too, but at least the latter is cross-platform!).
- Bazar & Mercurial: they're implemented in a "too-managed" language (yeah sorry I dislike dynamically typed languages very much, especially for big developments that need to have a long life; yeah, refactorings are a pain with these ones, although I don't know the test coverage they may have...).
Maybe Git# (Mono SoC2008) is the answer? (I don't know the progress of this project.)
I was discussing about this yesterday with JP, and when I talked to him about this SVN 1.5.0 he said "too late!". Ermmm, what?, Gnome hasn't switched to DVCS yet so, why too late? Maybe because it's imminent? I don't know. Sincerely, there is much contradiction about how people approach migrations... Today I've been attending for almost an hour a meeting about Gnome Mobile, and one thing that was arised is the lack of flexibility and ease of use of the Gtk+ toolkit, as opposed to other toolkits. People were concerned about it and wanted to fix it, and nobody wanted to give up pushing Gtk+ just because it's old. Then, why doing this for Subversion? Subversion is very mature, and their devs have demonstrated to be worried about its lack of flexibility wrt the new distributed ways of work, so they are fixing it, they are *supporting* us. And however at Guadec here it seems everybody wants to push for the migration (but only taking care of doing the correct decision, i.e., select the 1 from the 3 we all know, but why not considering just to update to new SVN and wait a bit more to see where we go?
Well, now that I'm talking about Subversion, I'm going to talk you about a couple of features I worked on recently (and committed today), as my first ITO day, in the Subversion Addin of MonoDevelop: revert to revision, and revert changes from a revision. The mandatory screenshot (you get to this dialog when requesting the Log inside the Version Control contextual menu):

This reduces the need of having a console open when coding with the MonoDevelop IDE, which is a thing that many developers request.
Another feature I completed is the new pattern for searching in many files inside MonoDevelop: Current project (previously we only had "Whole solution", "Directories" and "Open files"):

Enjoy them! (Currently on SVN.)
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Tuesday, June 10, 2008
WTF
combo_box =
GTK_COMBO_BOX (NAUTILUS_NAVIGATION_WINDOW (window)->view_as_combo_box);
/* Clear the contents of ComboBox in a wacky way because there
* is no function to clear all items and also no function to obtain
* the number of items in a combobox.
*/
model = gtk_combo_box_get_model (combo_box);
g_return_if_fail (GTK_IS_LIST_STORE (model));
store = GTK_LIST_STORE (model);
gtk_list_store_clear (store);
Clearly, we need some improvements in Gtk+ API. I'd bet it's much easier with MWF unfortunately. At least, the developer that coded this was kind enough to file a bug, which BTW is 3 years old and, of course, still not fixed.
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Saturday, May 10, 2008
A new community devolopment model?
Long story
(Go to the short story if you're too lazy to read a lot.)Some time ago I wrote about the usual confusion between the terms "commercial" and "propietary". FLOSS is commercial software because it's not only driven by the generosity of some developers with their spare time. A FLOSS developer can be paid by a software company, either by being employed (the most common case currently) or either by a consultancy/bounty basis. And there are still even open source companies which still indirectly refer to FLOSS as non-commercial when they compare both most popular development models nowadays by saying "open source VS commercial software".
And why the bounty system is not so popular? Well, because:
1) It's very project-driven: bounties are usually published in means very related to the project. This can be considered an advantage because only motivated/interested developers will apply, but sometimes the project is too small, too recent or not very popular, or with a lot of similar projects around.
2) There's no strong system to manage the bounty in respect to requirements, secure payment, trust system between parts, etc.
3) Many people don't advocate for it (or they advocate for a bounty system that works as a task exchange without money intervention: I fix this for you if you fix this for me) because, we know, one of the reasons of the excellence of free software is because developers love what they do without rewards. (But IMHO one of the big downsides is also because there are also important tasks in a project that nobody likes to do. Besides, I think people tend to spend less spare time on free software as their age grows.)
An exception to the 1st item could be bountycounty.org: a site that tries to announce bounties from free software projects. However, it seems to be an initiative that hasn't got much audience (the last bounty is 2 years old), either because the people that offer bounties forget to notify to this system, or, maybe because in the end the bounty development model doesn't work in FLOSS?
Well, I don't think this is the case, because there's a bounty system that is succeeding, and which is also an exception to the (2) item of the above list: Google Summer of Code.
However, GSoC has the following disadvantages to be "complete" for this matter:
a) Only students can apply.
b) All projects happen in the same time-frame and have the same duration (a summer).
c) All bounties are the same for each developer.
d) A concrete company controls all the process (because, it's true, they put the money).
But we need something similar to GSoC (similar in the "It Works" aspect) and that saves these problems and is not a mere "announcement" site like BountyCounty.org.
Some initiatives have appeared that tried to solve these situation: BountySource.com and SourceForge.net marketplace. The common problem to both is that they try to solve it by attracting the developers to host their projects, so this causes big and mature projects not to apply (because they have currently good hosting solutions, or are self-hosted, like Mozilla projects for instance).
One of the ideas is to implement a bounty system in our bug tracking system software, like Bugzilla. If I had time and liked Perl more, I would try to contribute something for it. Maybe we're in the chicken-egg problem here: we need a bounty system for that task.
Surprisingly, there's already a general purpose web-based service for this task: RentACoder.com. But I haven't seen any free software projects using it, because it seems very focused on propietary developments.
And then it happened: Some weeks ago a new FLOSS-oriented service was born: FOSS Factory. I wanted to start using it by publishing some mini-bounties (which hopefully would grow if other people are interested, similarly to voting systems in Bug Tracking software), but I got disappointed when even the project creation had a cost. But yesterday I received this e-mail:
Andres G. Aragoneses,
Thanks so much for your interest in FOSS Factory! As one of our early adopters, I wanted to keep you in the loop on two very important developments.
First, in response to user feedback, we've removed all costs for creating FOSS Factory projects! Instead, we now charge a 5% transaction fee on payouts. This aligns our interests with yours by ensuring that we will only make money if your projects succeed. It also enables developers to post their own projects without having to spend money.
Second, we recently released our website source code under a FOSS license. You can now download the code from http://www.fossfactory.org/get-source.php. Our primary reason for doing this was so that we could take advantage of our own system to help improve the site. In case you're interested, we've already posted a few bounties for improvements that we haven't had time to implement ourselves: http://www.fossfactory.org/project.php?p=p30&tab=subprojects. Please feel free to participate.
If you have any questions or concerns, please either reply to this message, or email me directly at jjgignac {at} fossfactory {dot} org. Your feedback is very important to us!
Sincerely,
John-Paul Gignac
President and Founder
FOSS Factory Inc.
Unfortunately, there's a 5% transaction charge for each bounty, but hey, we need to support their service! Also, the software is PHP based, so I won't likely spend time on improving it (you know, I already fled from PHP and Perl some years ago ;) ).
But I like the initiative and I'll start to publish the bugs/features I consider interesting to have, but have no time/interest to hack on. Here are the first ones (take in account that, if every voter of the bug payed 10$, the bounty would be enough attractive for a developer I guess, because they are not very complicated):
- Thunderbird/Seamonkey feature Auto-watch threads you've posted to (21 votes)
- Thunderbird/Seamonkey regression Allow edit of unsent message (Unsent folder messages should open to a compose window when double click) (26 votes)
- Bugzilla's feature (or fix for highly confusing workflow for newcomers) Move all bug activity onto main bug screen (17 votes)
- Banshee's feature (currently handled by an outdated addin AFAIK) Banshee needs a way to cleanup (remove stale tracks) (reporter+4CC; no voting system in BGO)
- Banshee's feature (patch proposed but I guess someone should make it apply to trunk) [Patch] Automatically scan music folders for new songs (reporter+6CC; no voting system in BGO)
- Gnome's bug (someone wrote a patch but not sure if it will finally make it for 2.24...) The ``Replace File'' dialog should display the two file sizes, times, etc. (reporter+23CC; no voting system in BGO)
- Monsoon's crazy feature (maybe implies the creation of a new Gtk widget) When the option "Minimize to notification area on close" is not enabled, we should have a new widget on the title bar for that action (just me)
- Real fix for Mono's issue (because we already have a workaround) System.Windows.Forms dependency on GTK makes code to crash if it uses ATK# and GTK_MODULES contains 'atk-bridge'
The last of the issues affected our project until we found a workaround overriding environment variables. If we reach our milestones properly and nobody has fixed it at that time, we could have a try! Now we still have tons of work which Calvin and the team have perfectly outlined. Unfortunately I haven't helped in this doc effort because I was busy debugging the issues I mentioned in my last post, which turned out to be an invalid bug (but at least gave me an idea for a Gendarme Rule) and a GAPI parser bug that Mike fixed) and because on thursday afternoon I was affected by some small rock ;) and probably was the cause of me trying to debug something I didn't correctly updated on Friday (and maybe because of our dumb deployment methodology that Mike has already blamed). Well, I'll talk about this in a later entry...
Short story
Maybe this day will be remembered in the Free Software community as the day in which a first software draft is presented in order to fill some awesome ideas from devs like Nat Friedman about a general-purpose bounty system:FOSS Factory
Especially interesing is their reasonings for its creation.
Update 12-AUG-2009: Another interesting service I found (while reading the comments of this blog entry) is COfundOS.org
Update 10-MAY-2010: Wow, it seems that a new project was born, which is getting a lot of press and support, to fund projects (but any kind of projects, not only software). It's called Kickstart and it's key feature is that people can pledge for a project but if it doesn't reach the amount required, the people are never charged. I wonder if there should be an option to have projects not have a deadline (more suitable to bugs in bugzillas ;) ). And after reading the FAQ I still cannot figure out how they judge if a project was successfull...
Update 16-SEP-2010: Over the last months I've been still thinking about all this and wondering why the FossFactory project didn't really see much adoption. Other initiatives such as Kickstart have had some success (for example the Diaspora is an example of a software project that just released something thanks to this kind of funding) but it doesn't fit very well to how small unit-of-progress would be rewarded (i.e. small bugs in bug tracking systems as opposed to whole projects) so I guess there's still some hope in micro-payment systems for this.
And indeed there is. It turns out that I joined some months ago a new company that has an internal system to reward in this way (all is explained here -- the Love Machine), and even our CEO went away some months to develop this sole idea as a separate company. Now, the way he decided to pursue it is very interesting: develop a workflow system of little rewards that companies can adopt with their employees (or with their "contractors", because with this workflow they actually don't need to have fixed salaries... --which may be good or bad, and is subject for another discussion).
I don't know much about the success of that project actually. But what I know now is that a new service around the same idea was recently born is really having a lot of adoption, because it's actually not a product that can be deployed in a company, but just a product that is deployed by a company which hosts the service, and then anyone can send or receive micro-payments about anything so it's not a service from a company to a company but from a company to an end-user. And the real good idea behind this is that their micro-payment system makes them be the intermediary between you and the grant-receivers you want to donate to, every month. You don't ever need again to pay N subscriptions to donate to N causes/organizations you like, you just subscribe to them, and then every month (actually everyday) you decide where your money goes too.
Didn't I explain it correctly? Well, go to see the video which is more than a thousand words and more than a million images: FLATTR.
Update 18-FEB-2013: Lots of initiatives popping up now in regards to this, so just a simple update to list some of them:
Labels: CSharp, General, Ingenieria, Mono, Mozilla, Programacion, SoftwareLibre


