Why should you see a doc

Recently I encountered a little accident and thought I should keep this little note written somewhere. We, Sri Lankan are usually reluctant to go for medical advice when damage appears to be small. “Ah.. it’s nothing. It’ll heal.”, is it? We get most of our medical expenses covered by the government, and for these little things we are less likely to spend a night or two at hospital.

As soon I encountered the scene I rushed to the hospital because I was afraid of serious internal damage to my hand, though the wound looked like just a deep puncture and swelling caused by it. Even few people told me there’s nothing to be afraid of. X-ray was taken and doctors concluded no tendon damage (they took X-ray for a reason, isn’t it?). An overnight hospital stay for free!

Before I am discharged from the hospital I met another man who came to visit a patient. His piece gave me the motivation to write this little note. When he clench his hand, little finger (pinky) stops halfway. It won’t clench unless external force is applied, and when released it will pop back to the previous position as if it was spring loaded.

“What happened?”

“Couple of years ago two of my fingers were accidentally cut by a knife. I went to the local hospital. Doctors wanted to transfer me to base hospital. I refused and told them this is just a minor wound, so basic treatments will do.”

After arguing with doctors, the man had discharged at will. And sustained permanent dysfunction of his little finger. A stupid trade-off when you get everything for free.

If you encounter a physical injury despite of its seriousness appearing to you from outside, see a doctor. Give them as much as information, not instructions.

What now, Mobitel?

Recently I wrote about Mobitel LiveScreen because I was unhappy about the experience.

As soon I published that on my Facebook page (850+ likes), it instantly took vast public attention. So far it reached 13,000+ people without targeted advertising. Given my page’s member base is small, the post made a significant reach. Unless advertised none of my other blog posts ever reached more than 500 people on average. By the time of this writing, I’ve seen more people have started to voice against VAS scams which is a good trend.

Get the message, Mobitel? Lots of people think that you violate proper business etiquette.

Mobitel staff may think I’m a douchebag, but I am certainly not that type. I am a loyal customer who always appreciate quality service (examples available). But when it comes to daylight robbery, I can turn into a real pain-in-ass customer. From the feedback I received from readers, I realize that every Sri Lanakn telco is playing this dirty game.

So, what now, if Mobitel (and other telcos) care to listen?

Value Added Services (VAS) in Sri Lankan telco industry probably have a history over more than 10 years (history that I know of). At that time the devices we used had limited capabilities. GPRS for Internet. No Viber/ WhatsApp/ SnapChat. WAP played God. SMS and MMS ruled.

In that era, downloading a celebrity’s portrait and setting it as phone’s screen background was a real deal. Now some people might be thinking, why can’t you simply download it, crop it by yourself and then set as wallpaper? There were several real world problems with that.

That problems enabled telcos to make some extra profit out of a wallpaper and ringtone business through WAP sites. I remember people used to download wallpapers, ringtones, and even games through WAP sites. It didn’t end up there. Content such as jokes, astrology, religious prayers were delivered to subscribers’ phones as SMS at a fee. This used to be a service that people wanted.

Now it’s 2016. We have Android that supercharged the mobile phone users. Most have smartphones. We have Google that will get us what we need effortlessly. Facebook has a lot of memes that you can enjoy. Lot of free and paid games are out there in Google Play. Almost everything is available for free. Zedge has a plethora of wallpapers and ringtones.

Do customers still want WAP-based entertainment sites? I don’t think so. That era is gone. Unfortunately, telcos such as Mobitel and Etisalat don’t seem to realize this. Or rather, they pretend to be not seeing it. Instead of striving to deliver value to the customer, they desperately attempt to hard-sell the same WAP content – just like Darley road car accessory traders do.

How?

  1. By unsolicited activation of LiveScreen on newly purchased/ replaced SIM cards. These pop ups appear intermittently in a way that ‘OK’ button (meaning ‘I Agree’) could be unintentionally touched.
  2. By directly exposing our accounts to third party content providers to bill us as they wish. So, if a pop-up ad in a web page is touched accidentally, you don’t even know but they bill us on the spot.

(I can provide more detailed logical explanations on why this is not gentlemanly – if you happen to lack of common sense)

Are these telcos too lazy to innovate?

As a customer, I do not see why should I pay Rs. 30/ month to get home remedies via SMS. There is a plenty of Facebook pages that offer the same for free. I do not see why should I pay a WAP site to download pictures of a fashion model when Google gets me there for free. Rather than investing in an innovative service that delivers what customer needs, these telcos have totally ditched the sales etiquette, and they trade off their brand reputation for unsolicited VAS subscriptions.

Telcos,

Why don’t you do some market research to identify what kind of devices people use? I hardly think Android users who have subscribed to mobile data-included packages will have any interest in jokes via SMS. Why can’t you do a little market research to understand what people actually need? I have absolutely no interest in what happens around Bollywood, but there are other things that I’m interested in. As a busy worker, I’d rather be interested in things like road traffic alerts, train delays, freelancing opportunities, etc. Also, it’s worth understanding that SMS is only good for things that need urgent attention, such as breaking news alerts and job search.

Just think about your brand reputation and what customers are ought to do about this next. No more daylight robbery, please.

Mobitel LiveScreen මගඩිය

මෑතකදි මමයි අම්මයි දෙන්නම අළුත් මොබයිල් ෆෝන් දෙකකට මාරු වුණා. ඉතින් පරණ එකෙන් අළුත් එකට මාරු වෙද්දි අළුත් ෆෝන් එකට ගැළපෙන විධියට සිම් එකත් මාරු කරන්න වුණා. පරණ සිම් එක ඉවත් කරලා අපට Micro SIM එකකුත් Nano SIM එකකුත් තිබුණු පරණ දුරකථන අංක වලටම ලබාගන්න සිදුවුණා.

අළුත් සිම් දාපු හැටියේ මෙන්න එනවා SMS එකක්, Welcome to LiveScreen කියලා… මේ මොකක්ද? අපි ඒ ගැන ඒ හැටි හිතුවේ නෑ. නමුත්, මෙන්න දවසක් දෙකක් ගියාට පස්සෙ එනවා pop-up messages.

Remedies for all your problems! Get 1 Home Remedy daily @Rs.30/ month. Click OK!

මම නම් දන්නවනේ මේ මොකක්ද කියල. හොඳ වෙලාවට අම්මා මේකට අහුවෙලත් නෑ. ෆෝන් එක පාවිච්චි කර කර ඉන්නකොට, එක්කෝ ෆෝන් එක සාක්කුවෙ තියෙද්දි, මේ පොප් අප් message එක එනවා. වැරදිලාවත් OK එක ක්ලික් වුණොත් රුපියල් තිහක් එක්ක බදු මුදලකට කෙළවෙනවා.

පිටකොටුවෙ පේමන්ට් එකේ බාල බඩු විකුණන තොරොම්බල් වෙළෙන්දෙකුගෙ තත්වයට මේ ආයතනත් පත් වෙලා දැන්. මේ ගැන Facebook හරහා කතා කරද්දි අහන ප්‍රශ්න වලින් ලිස්සලා යන්නත් Mobitel ආයතනය ප්‍රවේසම් වෙනවා.🙂

ඉතින් මේ මගඩිය නවතින වගක් පේන්න නැති නිසා අළුතින් Mobitel SIM එකක් ගන්න අයටත්, පරණ නොම්මරේටම අළුත් SIM එකක් Mobitel වෙතින් ලබාගන්නා අයටත්, SIM එක ෆෝන් එකට දාගෙන ඒක ඇක්ටිව් වුණු ගමන්ම කළ යුතු පළවෙනිම කාරිය විධියට LiveScreen ඉවත් කරන හැටි කියා දෙන්න.

Menu (app drawer) –> SIM Toolkit –> LiveScreen –> Activate –> Deactivate –> Confirm

හැක්ඃ! Confirm කරන්නත් අහනවා..😀 හැම දේම අද කාලේ “OK Google, get me a home remedy for…” කියල හොයාගනිද්දි මාසෙට රුපියල් තිහක් ගෙවල දවසට SMS එක ගානේ ගෙන්නගන්න අපට පිස්සු නෑ.🙂

wunderlist-wall

Wunderlist Today wallpaper for Ubuntu

Wunderlist again. Currently this is the only Microsoft thing that I use – apart of Windows servers involved in my DevOps job.

Wunderlist hasn’t been treating nice for Ubuntu recently. So I thought about working on something that works for Ubuntu. Then here I got an idea of a very small app that will embed your day action items into the desktop wallpaper. Since I’m not very much into software development, this as a pilot project will make me comfortable for building something better for Ubuntu.

To be honest, first I was planning to do some browser DOM hacking and figure out how it works. Soon after, I found out that there’s a public API for Wunderlist (awesome, isn’t it?), and that can avoid the need of DOM hacking. So, that’s how wunderlist-ubu-wallpaper started as my pilot project.

It is still very young, and I’m sure my code needs a little cleanup as well. It’s just a 150 line Python script – not at all a big deal. Readme file has all the information you need to set it up on your Ubuntu. Run it and see what happens to your Ubuntu wallpaper. Isn’t that awesome?

14 years back when I was a kid, I was just making little Windows executables (I was a Windows user back then) with Visual Basic. After that I did programming to a some level when I was a systems administrator, but I was never permitted to release my work to the public for obvious reasons. After that, here comes my very first little code contribution to the world of Open Source.

By the way, my all other action items are overdue!😳

Remove imported (stolen) contacts from Facebook

I have reasons to believe that it rather steals contacts from your phone rather than politely synchronizing them.

Once you install Facebook, it forces you to install Messenger aside. If you don’t it will keep sending you new message notifications but not letting you read them. So you install Messenger.

Next, when you set up Messenger, they show you some an eye-candy stuff, and convince you to enable uploading your contacts, call and text history. This is where the problem begins. I don’t want to upload my contacts to Facebook, but Facebook developers have set up things in a way that it will convince most users to do so. Bad.

So here’s my normal routine when installing Messenger:

Text anyone in your phone: NOT NOW
Is your number up to date? NOT NOW (why the hell do I have to let people look me up on my phone number?)
Skip phone number? SKIP (are you effing kidding me now?)

So even after completing these three steps, Facebook Messenger won’t stop bugging you with Contacts Upload and Friend Finder stuff. I remember I accidentally touched a ‘Get Started’ button somewhere and it immediately started uploading my contacts. Just like a fish put back into the water!

I got panic and turned off WiFi immediately, but what’s done is done. After meddling with the Facebook and Messenger apps, I was able to turn off ‘Continuous contacts upload’. You can find that in the Facebook app settings.

After a bit of struggle with Facebook on web, I was able to find the following URL. Now, this URL is very important. I even recommend you to bookmark and share it with friends.

https://web.facebook.com/invite_history.php

Go to that URL, and you will see your past invitations (by any chance if you had previously shared your email password with Facebook) and other contacts stolen from your email account in one place. Scroll all the way to bottom and you will see a hyperlink saying “Remove all contacts”. Click it, and after a couple of confirmations, it will delete your imported contacts.

Towards the top of the same page, there’s a hyperlink saying “See contacts you’ve uploaded in Messenger.”. Click it, and then click the “Delete All” button. Don’t even bother reading the confirmation, just hit “Delete All” when it tries to convince you to keep them. That’s it!

Now I’m even more careful when working with the Facebook and Messenger apps.

 

[JIRA] Delete projects from XML backup using Python

[Experimental]

If you are a JIRA system administrator, have you ever come across the requirement of partially exporting JIRA into XML – probably for importing individual projects into another JIRA instance?

If yes, this might work for you. However, my work is incomplete and experimental. This worked with a small JIRA instance (100 issues), and failed with a huge JIRA instance (1 million issues).

Here’s the Python script I wrote for deleting projects from JIRA XML backup:

#!/usr/bin/python

from lxml import etree

#xp = etree.XMLParser(encoding='utf-8', recover=True)
#doc = etree.parse('entities.xml', xp)
doc = etree.parse ('entities.xml')

# Array of project keys
plist = ['ABC', 'DEF', 'GHI']

for x in plist:
    for p in doc.xpath ("//Project[@key!=\'" + x + "\']"):
        #p.get entities and delete
        pi = p.get("id")
        for i in doc.xpath ("//Issue[@project=\'" + pi + "\']"):
            ii = i.get("id")
            for cfv in doc.xpath ("//CustomFieldValue[@issue=\'" + ii + "\']"):
                cfv.getparent().remove(cfv)
            for cg in doc.xpath ("//ChangeGroup[@issue=\'" + ii + "\']"):
                cgi = cg.get("id")
                for ci in doc.xpath ("//ChangeItem[@group=\'" + cgi + "\']"):
                    ci.getparent().remove(ci)
                cg.getparent().remove(cg)
            for fa in doc.xpath ("//FileAttachment[@issue=\'" + ii + "\']"):
                fa.getparent().remove(fa)
            for il in doc.xpath ("//IssueLink[@source=\'" + ii + "\']"):
                il.getparent().remove(il)
            for il in doc.xpath ("//IssueLink[@destination=\'" + ii + "\']"):
                il.getparent().remove(il)
            for na in doc.xpath ("//NodeAssociation[@sourceNodeEntity=\'Issue\' and @sourceNodeId=\'" + ii + "\']"):
                na.getparent().remove(na)
            for wl in doc.xpath ("//Worklog[@issue=\'" + ii + "\']"):
                wl.getparent().remove(wl)
            for c in doc.xpath ("//Action[@issue=\'" + ii + "\']"):
                c.getparent().remove()
            i.getparent().remove(i)
        for na in doc.xpath ("//NodeAssociation[@sourceNodeEntity=\'Project\' and @sourceNodeId=\'" + pi + "\']"):
            na.getparent().remove(na)
        for c in doc.xpath ("//Component[@project=\'" + pi + "\']"):
            c.getparent().remove(c)
        for v in doc.xpath ("//Version[@project=\'" + pi + "\']"):
            v.getparent().remove(v)
        for a in doc.xpath ("//ProjectRoleActor[@pid=\'" + pi + "\']"):
            a.getparent().remove(a)
        for pk in doc.xpath ("ProjectKey[@projectId=\'" + pi + "\']"):
            pk.getparent().remove(pk)
        p.getparent().remove(p)

f = open ('entities.new.xml', 'w')
f.write (etree.tostring(doc, pretty_print=True, xml_declaration=True))
f.close()

Before you run this, you need to unzip the JIRA XML backup which is a zip archive containing two or three XML files. Put the script file in the same directory where you have the unzipped XML files and run it. It will produce output into file ‘entities.new.xml’. Once completed, replace ‘entities.xml’ by ‘entities.new.xml’, remove the Python script and re-pack the folder into a new zip file. Now it is ready to be imported into another JIRA instance.

Please note that this is incomplete and I cannot guarantee 100% success. You can easily follow the structure of this code and improve it by yourself.

Selection_059

Wunderlist for Ubuntu

Wunderlist killed its app for Ubuntu long time back.

And then it was bought by Microsoft, so I hardly think there will be a Linux app ever again. For a long time I didn’t use Wunderlist, but I thought of giving it a try once again. I figured out that pinning Wunderlist tab on Firefox works to some extent.

Today I was installing new software on my new Ubuntu installation, and figured out Atlassian HipChat is now ‘hipchat4’. The new hipchat4 is not the same as old app, but just the web app launched in a lightweight web browser. It’s the same way that Amazon app works (I’d love to use it but they don’t ship to Sri Lanka😦 ). Can’t this also be working for Wunderlist?

So here’s what I did:

$ gedit ~/.local/share/applications/wunderlist.desktop

And here’s the file contents (in fact, I copied this from an existing .desktop file and changed several lines😉 ).

[Desktop Entry]
Version=1.0
Name=Wunderlist
GenericName=Wunderlist
Comment=Wunderlist Task Management Tool
Keywords=Tasks;Tasklist;Wunderlist;TODO;
Type=Application
Icon=/opt/wunderlist/icon.png
Exec=webapp-container --enable-media-hub-audio "https://www.wunderlist.com/webapp#/lists/today" --maximized
Terminal=false
Categories=Accessories;Office;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
X-Ubuntu-Touch=true
X-Ubuntu-Gettext-Domain=webapp-container
X-Ubuntu-Single-Instance=true
X-Ubuntu-Default-Department-ID=web-browsers
X-Screenshot=/opt/wunderlist/screenshot.png
X-Ubuntu-Splash-Color=#FFFFFF

Find a Wunderlist icon and a screenshot using Google image search, and copy them to /opt/wunderlist.

$ sudo mkdir /opt/wunderlist
$ sudo mv icon.png screenshot.png /opt/wunderlist/

Hit Super Key and type Wunderlist (perhaps you may need to log out and log in again to make it appear for the first time). Launch Wunderlist and log in. Right click the Wunderlist icon on Unity launcher and click ‘Lock to Launcher’.

That’s it!

Desktop notifications and audible bell are also working, but file upload isn’t working with this.