Tweakr 0.0.172 hits Maemo Extras!

Wednesday 10 Mar 2010

Tweakr has been finally pro­moted to Maemo Extras, check it out at http://maemo.org/downloads/product/Maemo5/tweakr/.

You can now eas­ily install it from the App. man­ager. I’ll write up a new tuto­r­ial some­day soon.


Tweakr 0.0.16

Wednesday 17 Feb 2010

Hi. I have released tweakr 0.0.16, which you should be able to install from Maemo Test­ing in a mat­ter of min­utes. A cou­ple of bugs fixed and the Silent pro­file hard­coded is what’s new. Update!


Tweakr promoted to extras-testing

Sunday 24 Jan 2010

Hi, a quick update on Tweakr: it has now been pro­moted to extras-testing, since the reboot loop bug (thanks, hildon-home!) has been fixed.

Also a new fea­ture present: the Pro­file but­ton in the Sta­tus Menu gets replaced by Tweakr’s own but­ton (which looks iden­ti­cal), so that you won’t have get your Sta­tus Menu too crowded.


Use Profile presets in the N900 with Tweakr

Monday 21 Dec 2009

A new fea­ture in Tweakr allows you to extend the sound Pro­files to more than just Gen­eral and Silent.

Tweakr intro­duces the con­cept of Pro­file pre­set. Pre­sets are Pro­file set­tings which can be saved, deleted and assigned to the Gen­eral pro­file. This allows you to prac­ti­cally use as many pro­files as you want on the N900.

The nor­mal use-case is to first tune the Gen­eral pro­file for the new pre­set you want to save, then open Tweakr and choose the Save cur­rent Gen­eral pro­file to new pre­set but­ton. This will allow you to save the set­tings of the Gen­eral pro­file with a new name.

Screenshot-20091221-210945

After that, you will find a new but­ton in your Sta­tus Menu, as shown in the fol­low­ing screenshot:

Screenshot-20091221-211001

You can now select what­ever pre­set you have cre­ated before, and its set­tings will be applied to the Gen­eral profile.

Screenshot-20091221-211006

If you’re not using Tweakr yet, go get it from its down­load page!


Introducing Tweakr

Saturday 19 Dec 2009

I have been work­ing on a lit­tle util­ity pack­age for Maemo 5, called Tweakr. It’s a Settings applet that lets you tweak lit­tle known set­tings that could oth­er­wise be changed only by edit­ing con­fig­u­ra­tion files by hand.

It has a plu­gin archi­tec­ture, so you could write your own plu­gin too. The ones I have so far are Desktop and Hardware keys.

Desk­top

This plu­gin allows you to edit the labels of the book­mark short­cuts you have on your desktop.

Hard­ware keys

You can con­fig­ure the behav­ior of the Power Key, and whether uncov­er­ing the cam­era lens unlocks the device.

More plu­g­ins and fea­ture com­ing soon!

Here’s some screenshots:

Tweakr entry in the Settings

Tweakr


Win32 odyssey: who needs documentation?

Thursday 14 Feb 2008

Dur­ing my cod­ing adven­tures, I have just found myself hav­ing to port an exist­ing Win32 appli­ca­tion to CMake. After writ­ing a mere 283 lines CMakeLists.txt file, and get­ting the appli­ca­tion suc­cess­fully com­pile, I fired it up to see if it worked, of course. I found it fail­ing when doing a WSAA­sync­S­e­lect, and fail­ing there didn’t seem to make any sense. So, to get to the point, I decided I’d just care­fully com­pare the compiler’s options gen­er­ated from CMake with the ones that were in the orig­i­nal Visual Stu­dio project file. After find­ing the dif­fer­ence, I decided I was gonna learn what those flags meant, so I googled for “visual c++ com­piler flags” and guess what? Noth­ing use­ful. The right string to google would be “visual c++ com­piler options”. But before get­ting to it, I had to unsuc­cess­fully go thru “visual stu­dio com­piler options”. You’d think that would cut it, right? Since “visual c++ com­piler options” did it. But, sur­pringly, “visual stu­dio com­piler flags” did actu­ally find what I wanted. Inter­est­ing combination.

I don’t really feel like blam­ing Google on this. Repro­duc­ing the same search pat­tern in the inter­nal Help func­tion of Microsoft Visual Stu­dio gave me the same success/no-success scheme. Besides, the whole point-and-click pro­ce­dure is a ter­ri­bly uncom­fort­able expe­ri­ence. Not only I have to get my hands off my key­board (inher­ently a waste of time), but also do I have to (mind: have to) wan­der my mouse around for a while to get to the information.

So, I won­dered, is there an alter­na­tive? I went to my rxvt ter­mi­nal emu­la­tor (which I run through Cyg­win, can’t really be both­ered with using the native Win­dows Ter­mi­nal), and tried to get some help from cl.exe. No luck. After some try-and-fail recur­sion, the least use­less thing I would find was cl.exe -help which would give me 106 (one hun­dred and six!) lines of doc­u­men­ta­tion. Wow, impres­sive, isn’t it? Com­par­ing, gcc’s man­ual page is 7820 lines, as for the lat­est stable.


Leaving closed protocols behind

Tuesday 23 Oct 2007

In order to ful­fill what has been a propo­si­tion of mine for quite a long time, as of Decem­ber the 1st 2007, I will no longer use any Instant Mes­sag­ing ser­vices based on a closed pro­to­col, e.g. MSN, ICQ, AIM or Yahoo. The only way you will be able to con­tact me (besides con­ven­tional meth­ods such as phone and email) will be through my Jab­ber ID: salvatore.iovene at googlemail.com (replace “at” with “@”). This also works from GMail.

Rea­son

Pro­pri­etary IM sys­tems have a ter­ri­ble flaw: MSN users can’t chat with Yahoo users, AIM can’t chat with ICQ, and so on. So if I have friends who only use MSN and other friends who only use ICQ, I will have to use both to keep in touch with every­body. The rea­son for this is the cor­po­rate greed tak­ing advan­tage of the net­work effect. Wikipedia says:

The net­work effect is a char­ac­ter­is­tic that causes a good or ser­vice to have a value to a poten­tial cus­tomer depen­dent on the num­ber of cus­tomers already own­ing that good or using that service.

This also reflects the fact that cor­po­rates are valu­ing their own profit bet­ter than the final user’s sat­is­fac­tion. More­over, I don’t like the idea of using a closed pro­to­col. “Closed pro­to­col” means that the data (e.g. chat mes­sages) exchanged by two com­put­ers involved in a trans­ac­tion, is rep­re­sented with a secret for­mat, that the user is not allowed to study. Jab­ber, on the other hand, uses an open pro­to­col, based on XML. Every­body is allowed to study the pro­to­col, and write clients or servers that sup­port it. This allow col­lab­o­ra­tion and coöper­a­tion. Greedy cor­po­rates, instead, keep the pro­to­col secret in order to be the only ones able to write a client and a server for it, so they impose you the use of their clients (such MSN) which might be bloated with spy­ware and advertisements.

Since I’ve decided that I don’t want to sup­port this kind of behav­iour, I will unsub­scribe from the closed pro­to­col ser­vices that I use. You don’t have to do the same, but just get your­self a Jab­ber account in order to keep in touch with me, and, pre­ferrably, con­vince your friends to do the same.

What is Jabber?

When you hear some­one (prob­a­bly me) talk­ing about Jab­ber, they are usu­ally refer­ring to one of the following:

  • The XMPP (Jab­ber) Protocol
  • The Pub­lic Fed­er­ated Jab­ber Net­work (PFJN)
  • The Jab­ber Plat­form (which includes the pre­vi­ous items, as well as jab­ber chat clients, devices, trans­ports, etc.)

Jab­ber is, strictly speak­ing, the infor­mal name of an open-standard decen­tral­ized instant mes­sag­ing pro­to­col offi­cially called XMPP.

NOTE: It is also the name of a com­pany called Jab­ber Inc., which sells Jabber-based prod­ucts. How­ever, the Jab­ber plat­form is much larger than this sin­gle com­pany. Don’t let this con­fuse you! If you want to go to the author­i­ta­tive web­site about jab­ber, that would be jabber.org, not jabber.com!

The net­work of inde­pen­dent Jab­ber servers on the inter­net make up the Pub­lic Fed­er­ated Jab­ber Net­work. If you have an account on a server on the PFJN, then you can com­mu­ni­cate with any­one else who has an account on a PFJN server. This means that Google Talk users can com­mu­ni­cate seam­lessly with Gizmo-Project users (and vice-versa), as both of these ser­vices are on the Pub­lic Fed­er­ated Jab­ber Network.

How can I use Jabber?

To use Jab­ber you need a Jab­ber client and an account on a server. Here’s a list of pop­u­lar clients:

MS Win­dows

MacOS X

GNU/Linux

Then you will need an account. Most of the listed clients will allow you to cre­ate a Jab­ber account choos­ing from a list of servers, or, if you want, you can run your own server.

Google Talk

If you have a gMail account, then you have a jab­ber id via Google Talk! Your jab­ber id is the same as your email address. You can use either the native google talk client or any other jab­ber client.

Gizmo Project

Also, if you use the Gizmo Project, you too have a jab­ber account. Your jab­ber ID is login-name@chat.gizmoproject.com.

jabber.org

The Jab­ber Soft­ware Foun­da­tion is prob­a­bly the best known Jab­ber server out there. They just recently switched over to ejab­berd for their soft­ware, so they should be quite solid now.


Fujitsu-Siemens shame on you

Wednesday 17 Oct 2007

I found myself in the process of real­iz­ing a dual-boot sys­tem on a lap­top, with Win­dows XP and Ubuntu 7.10. After wip­ing out the con­tent of the disk and par­ti­tion­ing it appro­pri­ately, I pro­ceed to the instal­la­tion of Win­dows XP (know­ing that I needed to install it first, since it would over­write the MBR and com­pletely dis­re­gard and dis­re­spect user’s free­dom), so I put in the so-called Recov­ery Disk pro­vided with that par­tic­u­larly Fujitsu-Siemens lap­top. After a lit­tle while, the Recov­ery Disk was propos­ing me to install Win­dows XP either using the full disk, or in two par­ti­tions, with a 10 GB “data” par­ti­tion. I was aston­ished and out­raged. It seems that the Fujitsu-Siemens peo­ple were think­ing that the user wasn’t smart enough to be able to choose what par­ti­tion use for his or her Win­dows install. They would rather limit the user’s free­dom, and not give him or her some choice. I sus­pect this was the result of some pres­sure from the Microsoft end: this “trick” basi­cally stops the user from installing other Oper­at­ing Sys­tems along Win­dows, unless he or she buys a new non-branded copy.

Fujitsu-Siemens and Microsoft: shame on you!


Who wants to talk about patent infringement?

Tuesday 15 May 2007

After all the dust raised again by Microsoft about Linux and the Open Source com­mu­nity allegedly com­mit­ting patent infringe­ments (235 this time, they were 228 in 2004), I really feel the need to spend a few words about the mat­ter, or then, a few images.

It looks like the jeal­ous Redmond’s zealots, avidly fight­ing to pro­tect the unique­ness of their work (sar­casm intended), didn’t real­ize that they have been play­ing copy­cat for a long time, rein­vent­ing the wheel and doing a bad job at it. Do the fol­low­ing screen­shots tell you anything?

Search page

search.jpg

Search results

search2.jpg

Image search

images.jpg

News search

news.jpg

Maps search

maps.jpg


TABs vs Spaces. The end of the debate.

Monday 14 May 2007

When writ­ing source code, indent­ing is very impor­tant. Hav­ing a neat and clean pro­gram­ming style, let alone a pre­cise and uni­form one, is prob­a­bly one of the most impor­tant keys when attach­ing exam­ple source code with a job appli­ca­tion. I was myself asked to show some of my source code in my last two inter­views. Nobody ever asked me to show any run­ning pro­gram that I had made, though. Won­der why? A lot can be under­stood about the author just by glanc­ing quickly at some source code.

Indent­ing makes the source code eas­ier to read for us human beings, whereas the com­piler doesn’t really care (except for some lan­guages, where inden­ta­tion applies as a syn­tax ele­ment). Even if you’re not a pro­gram­mer, you can see the dif­fer­ences here:

Com­piler friendly

Compiler readable

Badly indented

Badly indented

Prop­erly indented

Properly indented

There is, I guess, no ques­tion that the last one, labelled as “Prop­erly indented”, is the most read­able. Prob­lem arise, though, when peo­ple start won­der­ing what they should use as indent­ing char­ac­ter. Some pre­fer TABs, other pre­fer blank spaces. A TAB, the key on the left of the Q of most Qwerty key­boards, is a sin­gle char­ac­ter that a text edi­tor can rep­re­sent what­ever way it wants. This is usu­ally cus­tomiz­able by the user, of course, so she can decide that a TAB will be shown as 8 spaces, or 4, or 2.

You can hear all the time some­one claim­ing, in turn, that TABs are evil or that spaces are evil, but the truth is that none is wrong, as long as you can indent.

I’ll use, as an exam­ple, a piece of source code taken from the ext3 mod­ule of the Linux ker­nel. The Linux pro­gram­ming guide­lines rec­om­mend using TABs for indent­ing, and that they should be 8 spaces wide. Let’s have a look at some code.

8-space TAB

8-space.jpg

4-space TAB

4-space.jpg

2-space TAB

2-space.jpg

As you can see, the orig­i­nal intent of the author, was to have the vari­able names aligned. But that align­ment gets screwed up as soon as a reader has a dif­fer­ent space-size for her TABs. What’s wrong there? Let’s use a very use­ful Vim tip: the :set list command.

:set list
set-list.jpg

This way, we can actu­ally see the TABs, as “>——-”. Of course there will be less dashes if part of the TAB area is occu­pied by some text. So, can you see what’s wrong with that? The author of that source code is using TABs not only for indent­ing, but also for align­ing! That way his align­ment gets messed up when some­body uses a dif­fer­ent TAB size. The solu­tion of this prob­lem is to sim­ply just use what ever you want for indent­ing, but use spaces for align­ing. Indent­ing must only be that left mar­gin that you give to some lines, but it’s not to be con­fused with align­ment. If the author of that source code had used TABs at the begin­ning of the lines, but just blank spaces between the type and the name of the vari­ables, his code would be as he meant it what­ever indent­ing style one’s edi­tor would use.

So, in the end, it doesn’t mat­ter whether you use TABs or space, for indent­ing, as long as you use just spaces for align­ing.

Use­ful Vim/Emacs tip

I like spaces, and add the fol­low­ing to the end of all of my source files:

/*
Local Variables:
mode:c++
c-basic-offset:2
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
c-tabs-mode:nil
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=2:tabstop=8:softtabstop=2

This way, if the reader uses Vim or Emacs (and maybe also gedit), her set­tings will be tem­porar­ily over­rid­den by mine, so, if she’s going to change my code, there are lit­tle chances that she’ll mess up my indenting.

The :set line options I use are the following:

set listchars=tab:>-,eol:$,trail:.,extends:#

It helps me to also spot trail­ing spaces. I rec­om­mend every­body to use the :set list, as it will pre­vent you to acci­den­tally mess up other’s indentation.



 
  • Hello there!

    You have landed to my personal website, where I write about things that I find interesting. I am a software engineer, Open Source supporter and free thinker.   Read More →