Mangelp's blag!

Random stuff about development and other things.

Rediscovering enum types in java

For a long time i've working with c# and i get a lot used to enumerations. Now that i'm back to java i was missing them until i realized that my first contact with java was with jdk 1.2 and the need of take a peek over some of it's new features.

Java has from jdk 1.5 support for enumeration types, strong-typed collections and a lot of new things that i'm still not needing yet tongue.png

Languages and software development in general are fast-evolving things that one can't just stop learning of to be up to date.

Installing nvidia drivers for fedora 10

Until now the way to install these drivers was to set up the freshrpms or livna repos and install from there, but now they have merged into rpmfusion and they have changed it a bit replacing dkms by akmod (dkms rebuilt the nvidia kernel module each time the kernel gets upgraded).

This means that after setting up rpmfusion repo you must install the nvidia kernel modules and the newly akmod dependency.


 yum install rpmfusion-nonfree-release rpmfusion-free-release

 yum install kmod-nvidia akmod-nvidia

 

With this all should be set up and running in the next reboot, don't forget to update the xorg.conf file and set nvidia as your driver (use nv if you get problems with this setup).

UPDATE: Missing steps

The above instructions works but you may experience that opengl doesn't work. To test this use glxgears from the command line:


 glxgears

 

If the program doesn't starts and show you a message saying that it cannot initialize opengl the problem might be that the akmod builds the regular driver but not the opengl extension because it needs the xorg development SDK to build the extension. To fix this you only have to install it and reload the nvidia service:


 yum install xorg-x11-server-devel

 service nvidia restart

 

The reload of the nvidia service fixes your xorg.conf adding the path of the nvidia opengl module and using the nvidia driver.

Repair RPM database corruption in Fedora 9

The title of this post refers to Fedora 9 as is the distro whose rpm database got corrupted by a sudden power lost of the laptop running it as the battery didn't lasted enough to let me plug it. This have been the unoficial way of repairing such things since i first experimented this issue, so will also work in other rpm-based distributions.

I'm not going to give you the details here as there are two web pages with the instructions, one is the set of commands to run and the second is a more larger document about the subject. Enjoy them.

Zend Framework 1.7

Hey, it was almost 3 months ago that i updated to Zend Framework 1.6 and 1.7 is already out!

They have been working hard the last months and there are some new hot features like Zend_Services_Twitter, Zend_ProgressBar or custom adapters for Zend_Paginator, plus other improvements and tons of bugfixes.

This is a great sign of a very active comunity and a bright future for this framework.

Exaile shoutcast plugin bug

The last month or so the exaile shoutcast pluging have been barely working due to changes in the markup of the shoutcast www page. This is an expected side-effect of parsing a www page to get information instead of having an api to retrieve it.

Anyways in the forum you can find an easy and quick fix that will bring back your online radio, this fix is already in the last update of the plugin, but that version doesn't show up in my list of plugins to update so having this is great.

NFSharp

Today i have created a new project in google code to host two subprojects that where under the tree of my old sharpknocking project.

Those projects are a library for common stuff and a library to work with iptables tool and change firewall rules from your code. I have been working a little in them this year, but the rest of the original project has come to a dead-end as i'm the only one working on it and i haven't got the time to keep up with the rest of it.

That is why i'm starting a new one with the aim of writting a graphical app to mess with iptables command and maybe some other stuff related with it. I'm writting a programmatic layer on top of netfilter stuff, so i've called this NFSharp (short form NetFilterSharp), and i hope in a future to cover more tools.

These libraries have been written in C# using MonoDevelop and licensed under LGPL V2.

Moderation disabled again

As i have stop getting spam since i enabled recaptcha i have disabled moderation in the posts.

Drop ie6 support or not, is that the question?

These days i have been working in a web site built on top of ZendFramework (as a previous post said), and with the recent 1.6 release we have also been using dojo support (formerly Zend_Dojo) to make cool web 2.0 forms with auto completion and so.

But today we take a look of the site using ie4linux and the effects of ie6 are devastating. Almost half of the features coded in javascript doesn't look to work properly.

That implies the question: are we going to support ie6?

My partner was highly convinced about supporting it, there is at least a 22% of ie6 users and the site we are working on is public, so not supporting ie6 can damage the site's popularity.
He is doing the 90% of javascript thing, and he will be doing the most of the work, so i think is fine if he decides about it.

But for my point of view is a waste of precious coding/sleep/party time. I have suffered enough hacking stylesheets and javascript to make them work/looks, more or less like they did in a modern browser.

We have reached a point in where we cannot develop to an old and rusty web browser, if an user uses a old-buggy software it should agree with the security and usability risks that comes with it and that he will not be able to use the same sites as does the users of most modern browser.

There is also no reason for ie6 users not to upgrade to ie7 or install opera or firefox.

I'm also not the first ranting about this, i'm the last. Take a look at the results of googling "drop ie6 support".

Dropping support for ie6 not necessary implies to ban them from your site, it will simply be a matter of putting a message that will tell what happens ("your web browser is very outdated, slow and insecure. Please upgrade") and suggest some links to the above browsers at least. Something like this.

ZSnes 1.51 in Fedora 9

ZSnes is a super nintendo emulator licensed with GPL since 2001 that had his last release in january 2007. The development still goes on (i guess) but now the repository is not publicly accessible and there haven't been any releases in more than a year and half.

Despite that is still a great emulator that will allow you to enjoy your favorite snes games in case you can't use your old console (or whatever tongue.png ).

The first option to get it is to download the rpm package from dribble and install it.
Note that this repository is one of the three repositories that are being merged into a new common project called rpmfusion so this link will work for limited time, but then you should be able to get it from rpmfusion.

The second option is to get the sources and build it by yourself, some people likes to do this way (as i do some times).

First dowload the sources from the official ZSnes page.

Go to the folder where you want to put it and unpack it:

#tar xvjf $HOME/Downloads/zsnes151src.tar.bz2

To build it you need to install the following packages:

  • compat-gcc-34
  • compat-gcc-34-c++
  • SDL-devel
  • ncurses-devel
  • nasm

And then do the configure-make dance this way:

# ./autogen.sh --prefix=/usr/local CC=gcc34 CXX=g++34 && make

If everything works you can install it:

# sudo make install

Remember to change the paths to match your preferences and if the configure cries about unresolved dependencies find the packages and install them.

Now you can re-enjoy your favorite games face-wink.png

Spam is attacking

Well, spammers had got to this blog so i'm forced to activate manual approval for comments and trackbacks. I think i'm not going to have much of these but it's better to warn before anyways.

Update:
I have set the captcha to reCaptcha service. I think this can be better than the math captcha suggested by manrash.