Friday, September 9, 2011

Which route planner.

I clicked the same route on various route planners available online and almost all gave different results. Here's a summary for the route Pozzallo - Zafferana Etnea (both in Sicily). Scores are 0-5 (5=best).












 viamichelin.com maps.nokia.commaps.google.com maps.yahoo.com maps.bing.com routes.tomtom.com
Ease to reach planner5 5 5 5 5 4
km151137.8151143.189.1mi (no quick possibility to switch to km) 151
time (hr:min)1:53 1:38 2:031:51 1:45 1:53
Offers alternative routes/modesYes Yes Yes No Some simple route modes No
Suggest location while you type Yes Yes Yes No No No
maps info and readability 5 4 4 4 1 4
Route calculation speed 4 4 5 44 4

Saturday, August 27, 2011

What Nokia needs

Nokia still makes the best hardware, and also Symbian is a good product. But what Nokia does not really have is charisma. It lost most of its charisma and now they've put a super (ex-Microsoft) Nerd as its CEO.
Apple did not really offer anything new to the mobile world, in essence, the iPhone and app store is what Nokia already had for years, but Apple had Steve Jobs charisma and everything looked unexplainably wow and new.
Now Nokia is still searching for its new role, and it is doing miserably and deliberately giving way to the competition.
Nokia is still not sure what it is offering and so it is offering an insensibly wide range of products, too much diverse, too much out of focus.
If Nokia is going to stick to just hardware, or both hardware and software, is still truly unclear. Nokia spent money developing a Linux mobile system (meeGo), and now it is thinking of using a Nerd's tool: Windows. All this, after successfully using and developing Symbian for so many years!

Someone said that no decision is worse than a bad decision, and Nokia is just doing both!

What if Nokia designed the new standard for hardware for mobility? Something like IBM did back in the 70s and 80s with their PC and software developers have a standard platform on which to work?
What if, for example we had the gorgeous C7 with a microSD slot and a boot loader and you can plug in any OS you like... be it Symbian, Android, Ubuntu, Windows and so on?

Sunday, April 17, 2011

my first symbian application

and also my first Python script.


PyS60 is cool. You can create a script and run it on your Nokia. Simple. Then I learnt that there are tools like ensymble (from google code) to create a sis file to install and distribute the application.

I wanted a quick and simple unit converter. Although SI units are used by almost all countries in this world there are still people who use the awkward system of feet, psi, ounces etc. Thanks to the French and their metric system, the SI units are more readable and more easy to understand. I wrote this script for my Nokia to convert from various units. I also included old Maltese system of measurements.

To run on your nokia, just install PyS60 to your nokia - from https://garage.maemo.org/frs/?group_id=854&release_id=3264 - and copy the script to your memory card. I use Linx and obex to copy th files using bluetooth: which is much more handy.



import appuifw

convCat = [u"Length", u"Area", u"Volume", u"Weight", u"Temperature", u"Pressure"]


cont = 1
while cont:
# reset convCat
convUnits = []
convCalcToEsp = []
# get Category
convCatIndex = appuifw.popup_menu(convCat, u"Select a category")
if convCatIndex == 0:
# length, use m as 'Esperanto'.
convUnits = [ u"thou (th)", u"inches (in)", u"feet (ft)", u"yards (yd)", u"miles (mi)", u"knots (kt)", u"mm", u"cm", u"m", u"km", u"qasba", u"rod", u"fathom", u"league"]
convCalcToEsp = [0.0000254, 0.0254, 0.3048, 0.9144, 1609, 1852, 0.001, 0.01, 1, 1000, 2.096, 5.0292, 1.853184, 4828.032]
elif convCatIndex == 1:
# Area, use m2 as 'Esperanto'
convUnits = [ u"sq in", u"sq ft", u"sq yd", u"sq miles", u"sq knots", u"mm\u00B2", u"cm\u00B2", u"m\u00B2", u"km\u00B2", u"hectares", u"acres", u"tumoli", u"qasba kwadra"]
convCalcToEsp = [0.000645, 0.092903, 0.836127, 2589988, 3429904, 0.000001, 0.0001, 1, 1000000, 10000, 4046.87, 1124.13, 4.391]
elif convCatIndex == 2:
# Volume, use m3 as 'Esperanto'
convUnits = [ u"cu in", u"cu ft", u"cu yd", u"UK gal", u"UK quart", u"UK pint", u"fl oz", u"US gal", u"US quart", u"US pint", u"mm\u00B3", u"cm\u00B3", u"m\u00B3", u"litre (l)", u"centilitre (cl)", u"millilitre (ml)", u"cup", u"tablespoon", u"teaspoon", u"Oil barrel"]
convCalcToEsp = [ 0.000016387, 0.028316847, 0.764554858, 0.0045461, 0.0011365, 0.0005682, 2.841306E-05, 0.0037856, 0.0009464, 0.0004732, 0.000000001, 0.000001, 1, 0.001, 0.00001, 0.000001, 0.000236588, 0.000014784, 0.000004929, 0.15898 ]
elif convCatIndex == 3:
# Weight, use kg as 'Esperanto'
convUnits = [ u"grain (gr)", u"drachm (drc)", u"ounce (oz)", u"pound (lb)", u"stone (st)", u"UK hundredweight (cwt)", u"ton", u"mg", u"g", u"kg", u"tonne", u"ratal", u"wizna", u"qantar"]
convCalcToEsp = [ 0.00006579891, 0.001771845, 0.028349523, 0.45359237, 6.350293, 50.802345, 1016.0469, 0.000001, 0.001, 1, 1000, 0.7938, 3.969, 79.38]
elif convCatIndex == 4:
# Temperature, use C as 'Esperanto'
convUnits = [ u"F", u"C", u"K"]
convCalcToEsp = [ 1, 1, 1]
elif convCatIndex == 5:
# Pressure, Pa as 'Esperanto'
convUnits = [ u"psi", u"bar", u"Pascal (N/m\u00B2)"]
convCalcToEsp = [ 6894, 100000, 1]

else:
# 'back was pressed
cont=0

# check if there's a valid category
if len(convUnits) > 0 :
# check that if I made a programming mistake in arrays.
if len(convUnits) == len(convCalcToEsp):
# ok, hence calc.
convFromIndex = appuifw.popup_menu(convUnits, u"Convert from:")
if convFromIndex >= 0 :
convToIndex = appuifw.popup_menu(convUnits, u"Convert " + convUnits[convFromIndex] + " to:")
if (convFromIndex >=0) and (convToIndex >=0):
conVal = appuifw.query(u"Convert " + convUnits[convFromIndex] + " to " + convUnits[convToIndex], "float")
if convCatIndex == 4:
if (convFromIndex != convToIndex):
if (convFromIndex == 0):
# convert from F to C or K
resVal = (conVal -32) * 5/9
if (convToIndex == 2):
# convert C to K
resVal = resVal + 273.15
elif (convToIndex == 0):
# convert to F
C = conVal
if (convFromIndex == 2):
# convert K to C first
C = C - 273.15
# convert C to F
resVal = (C * 9/5) + 32
# now F is not select, hence conv from C to K or vice versa
else:
if convFromIndex == 1:
resVal = conVal + 273.15
else:
resVal = conVal - 273.15
else:
# no conversion required.
resVal=conVal
else:
# if not temperature, then use the following equation.
# appuifw.note(u"calc: "+ str(conVal) + " x " + str(convCalcToEsp[convFromIndex]) + " / " + str(convCalcToEsp[convToIndex]), "info")
# dummy = appuifw.query(u"calc: "+ str(conVal) + " x " + str(convCalcToEsp[convFromIndex]) + " / " + str(convCalcToEsp[convToIndex]), "query")
resVal = conVal * convCalcToEsp[convFromIndex] / convCalcToEsp[convToIndex]
# output
cont = appuifw.query(u" " + str(conVal) + " " + convUnits[convFromIndex] + " = " + str(resVal) + " " + convUnits[convToIndex] + "\n\nConvert another?", "query")
else:
appuifw.note(u"Internal error (" + str(len(convUnits)) + "/" + str(len(convCalcToEsp)) + ")", "error")



Here's the script - then a sis may follow!

Monday, April 11, 2011

green energy, how?

We need power, power is not just energy, but it is like a concentrated form of energy. We consume energy in bursts and lot of it in such a small time. That is why we live in the petroleum era and which shall eventually decay and leave space to a new era.
A study says that if 1% of the Sahara were transformed into a solar farm, then we should solve our present need for energy.
But we need to harness energy so as to consume it in bursts far away from where it is generated. Transporting energy in its electrical form proved to be efficient and so far the only method which we know. Storing energy in its electrical form may not really prove efficient or possible on a large scale. Though once, I suggested to store energy in batteries scattered in distribution points round the island. These batteries are charged when we produce extra energy and then discharge during peak energy consumption.
Now I had this idea. We have sea, lots of it an very little land. Sun farming is possible but truly limited because of space, so why not use the sea surface? So I thought... what if we have a closed eco-water cycle? Water from the sea evaporates by using the sun's energy and then it condenses at an altitude. Water is stored (accumulator) at a higher altitude in a reservoir - something similar to a dam. Water from the reservoir will then drive a turbine and transform the potential energy in kinetic and eventually electric.

here's a diagram



/----------------------|
/ |
sun > / vapour |
/ \ condenses |
sun > / \ ==================|
/ \ =================|
sun > / \ === reservoir ==|
/ \ ===============|
/ green \ ==============|
/ house \---------- --/|
/ effect | | |
/ evaporation |X| | turbine
/ | | |
/================ water=============|
/====================================|



The scale involved is not on the small side but works very well in nature and should be tuned to work efficiently in a closed system. The trick is how to effectively condensate the vapour. The top of the structure may be covered in PV panels while the south facing side should all be in glass and well insulated. The area below the sun exposed area must cover an area much larger than that of the reservoir.

Thursday, March 10, 2011

Ricetta tal-pulpetti b'differenza.

Normalment nagħmel il-pulpetti ġoz-zalza tat-tadam. Jiġu tajbin u jgħoġbuni iżda llum fettilli nbiddel u għamilthom hekk:

Mela l-ewwel ippreparajt it-taħlita tas-soltu. Ikkapuljat tac-canga, ftit tewm mitħun, Worcestershire sauce, frak tal-hobz, chives, riegnu, kemmun u bzar aħmar niexef - jgħoġobni ħafna mal-pulpetti - u ovvjament bżar u melħ.

Wara li ħawwad kollox sew, ħallejt it-taħlita tistrieħ ftit. Mbgħad, b'bowl mimlija ilma ħalli nxarrab idejja, bdejt naghmel il-pulpetti - zgħar, m'hemm għalfejn tagħmel xi ballun tat-tennis! Importanti li xxarrab idejk wara kull pulpetta, ħalli ma jiġux iwaħħlu.

Il-pulpetti qedthom go dish tal-ħġieġ bi ftit zejt fil-qiegħ. Meta lestejt il-pulpetti kollha, daħħalt id-dish taħt il-grill u bdejt nsajjar il-pulpetti. Dan bil-għan li nissigillhom u jibqaw tondi kemm jista' jkun. Meta rabbew l-iskorca, qlibthom u komplejt nsajjarhom għal ftit hin ieħor.

Sa danintant, qlejt nofs basla mqatta rqieqa, ġo taġen fuq nhar baxx. Żidt bictejn tadam nqaddet mqatta u komplejt nsajjar. Pero nxarrab b'ftit nbid abjad kull tant ħalli jkun hemm ftit umdu.
Wara żidt il kurrand. U warajh tfajt il-pulpetti. Hallejt ftit minuti - dejjem nxarrab b'ftit ilma jew nbid abjad. Hekk jibda jiehu ftit forma ta' zalza u mbgħad tfajt bictejn spinaci. Komplejt nhawwad u niccekja l-ilma. Lejn l-aħħar tfajt mgħarfa butir bi ftit salvja u ħawwadt sakemm dgħab il-butir kollu.

Neħħejt minn fuq in-nhar. Hawwart bit-tursin mqatta u zidt l-patata mixwija u kilna kollox, kollox!

Saturday, March 5, 2011

Malta, l-Libja u d-divorzju

Issa li nqala' l-inkwiet fil-Libja u ġew ħafna ajruplani u bastimenti, u Malta ġiet fuq l-iSky news, is-CNN etc. B'dan il-ħafna taqlib fid-dinja Arbija, insejna kwazi għal kollox il-kwistjoni tad-divorzju. Mhux tat-taħwid meta tqis li qas biss ġimgħa qabel qazzuna bid-divorzju? Pros u cons, mistoqsija tar-referendum, moralita u socjeta.

Jien, ser nagħmel bħal ma nagħmel bosta drabi u ngħid hekk kif naħsibha dwar id-divorzju u l-knisja. F'għajnejja l-knisja qas biss kellha tindaħal dwar id-divorzju, tant inqas tgħid li dan l-imbierek divorzju ser jbiddel iż-żwieġ u s-socjeta Maltija. Kollox ħrafa, kollu kliem fil-vojt.

Gesu Kristu kien car: "Dak li jgħaqqad Alla, m'għandux jifirdu l-bniedem." Żgur li dan hu kliem car li qiegħed 'il-fuq mill-knisja. Mela, l-knisja m'hix qeda f'posizjoni u mgħandiex tidħol fid-diskusjoni tad-divorzju (civili).
Il-knisja, trid tgħin lil bniedem biex ma jkissirx dak li għaqqad Alla imma mhux billi timponi li ma jkunx hemm id-divorzju iżda billi tgħin lil-insara biex dan l-imbierek divorzju ma jiġux bżonnu. Billi tgħin lilna n-nies nifmhu iktar x'hini l-imħabba u rispett li mingħajrhom jinqered iż-żwieġ. Hawn il-knisja trid taħdem u tikkoncentra l-isforzi tagħha. U il-knisja dan trid tibda tiddiskuti u mhux id-divorzju.
Sewwa qalu l-isqfijiet meta qalu "mhux iż-żwieġ irid jinbidel, iżda l-bniedem". U l-bniedem nbidel għeżież tiegħi, tant li d-divorzju ilu snin li daħal f'pajjiżna. Jaħasra, inthom "l-avukati" li toqgħodu ssibu d-differenzi bejn annulament, separazjoni u divorzju, ħarsu madwarkom u iftħu għajnejnkom!
Il-liġi tad-divorzju tkun qed tagħmel ufficjali l-ebusija li hemm f'qalb il-Maltin. Ebusija li realment qeda hemm - inutli tinnegha - għax biddlet il-bniedem u forsi qeda tikber. Il-knisja ma tistax tagħmel l-istess u twebbess l-attegjament tagħha billi tiprojbixxi d-divorzju. Il-knisja trid tgħin lin-nisrani jgħix il-ħajja nisranija u jrattab dik l-ebusija - b'hekk toħroġ id-differenza bejn żwieġ u żwieġ nisrani hekk kif iridu Alla.
Noqodu attenti ukoll għax f'għajnejja, l-knisja fil-kaz tal-qassisin taccettah d-divorzju; mela meta jinza' qassis, dik m'hix forma ta divorzju?