Wednesday, April 4, 2018

Unpopular Opinion

I haven't written in a long while, probably years if I ever bothered to count. Grab a seat, a cold beer or a hot coffee (depending on where or what time you're at) since this is gonna be a long one.

I'm gonna tell you about three scenarios where having an unpopular opinion shifts you from being thought of as just a random guy to the most hated man in a circle. All of which, everyone is entitled to their opinion on whats right or wrong. The world is no longer black or white.

So there's this one time I got flak for reacting how people are overacting about Ramon Bautista's "Ang daming hipon sa Davao" issue. The guy has apologized for the commend and from my perspective, I agree that it was an awful joke but things started getting steam and getting out of proportion. I wouldn't be surprised how a gay acquaintance of mine jumped into the defense of his/her friend who I reacted with the comment. They probably thought that my comment was misogynistic and anti-LGBT and how I'm the most evil person in the world for condoning the act. No, I don't condone any of it. I also don't condone how virtually stoning people to death would lead to a better society. Did anyone actually bother knowing my stand about women empowerment and LGBT? None. I was virtually stoned to death along with that comment how we all overreacted to that offensive joke by Ramon. Did anyone bother asking me if I'm a misogynist and anti-LGBT? None. I was treated like an infection due to an unpopular opinion which nobody bothered clarifying. Everybody was already carrying pitchforks, burning people at the town square because of an unpopular opinion.

In my family, my mother worked hard in a corporate environment for more than 20 years. I was raised knowing that it doesn't matter if you're male or female as long as you do good work you're supposed to be treated equally. I have a tito who is openly gay. He works for as a fashion designer and has been a very caring individual to our family over the years. Often times, he is a stand in parent for my cousins who's mother (my tita) who is working hard abroad. Over the course of my 10+ year career, I've had two female bosses who I respected as a superior and just recently, a colleague of mine from a former company got promoted to lead our APAC and US-WEST team.

My mother always told me to treat women with respect. Most are just treating women as equals, but as a gentleman, women should be respected. Open doors for women and elderly, always offer to help, always 'mano', always say "po" and "opo" and call mothers "tita" (except for Mama Singh and Papa Singh: in the house of Singh, you should bestow proper honors).

Call me a misogynist or anti-LGBT for all I care. The ones who already condemned me wouldn't care to read this anyway (since I've long been unfollowed or unfriended).

Another story involves work ethic. I've tried so hard to keep everything fair, stick to an agreement everyone has agreed on. I did a project with a friend who I considered talented in what he does. There was a bounty for a project which had a small budget but we pushed through with it nonetheless. My role was business development, my friends role was development and our other colleague was graphic design. It was agreed upon that the bounty was going to be split 3-way. I wanted to save as much cash as we can, but still wanted to make sure that the project gets completed without any complications I asked our development guy two things: 1.) would paying for an API make development easier. (I offered to research on open source implementations) and 2.) would paying for another developer ship it faster. It was a consensus that we would try to make the open source solution work and save money by not getting more people. Our developer was confident enough to make it work.

One milestone passed, graphic assets were already ready but development was sub par. Second milestone passed, still not production ready. Anxiety about this project loomed well within the Christmas and New Year season and finally, with some compromises, a final product was shipped one day late of our target delivery. Our client was kind enough not to impose the penalty of paying twice the amount of the project budget if we failed to comply. Towards the end of the project, our developer told me that he lost his full time job. I told him that we could start charging higher if need be and prioritize his needs in future projects. After the bounty was paid, I met with the team and discussed the breakdown.

Deductions for expenses (meetings, dinners, toll fees, gas, etc.) and with the net amount, split into three. Someone at the table then asked, "divided by 3?". I took a deep breath and explained that it was agreed upon when we started, that he committed that its going to be "easy" and we wouldn't need to pay for additional developers and APIs and upon not meeting his targets, the blame was on me. I know that he just lost his full time job, but what is agreed upon should be upheld. I offered to pursue more opportunities to sustain his lifestyle while he looks for another permanent home, but not at the expense of the amount agreed upon for the just completed project.

I opted to stick to what is agreed upon and offered to ask him "his cost" for future projects. I knew it's gonna leave a sour taste in the mouth, but what else can we hold on to but our words and our commitment? There was another project worth 5 times the cost of that previous project, I asked him to cost it (so that we would not end up with a project cost being divided by 3 anymore and people complaining about shit) and asked if he can give an amount by the weekend. The weekend passed without any cost estimates. I told him that I had to ask someone else to do it due to his unfulfilled commitments (again). We never talked since. I wouldn't be surprised if in his circle, i'm the demon who short-changed him of his 'rightful bounty'.

Even if I completely give him my share of the bounty, for a total amount less than the current iPhone.. apparently a person would sacrifice friendship over money.

People would call me a douchebag or an asshole for my unpopular opinion, but then again, have you asked yourself if you haven't done the same? Am I an asshole for thinking Apple makes better products vs Microsoft (in some aspects)? Am I an asshole for Razer sells expensive crap (like Apple) compared to Dell? Am I an asshole for pointing out your humblebrags when you throw us "trivia" about some places abroad you visited (we could Google that, you don't need to shove that up our faces"). Am I an asshole for being sarcastic about your "recent car purchase #blessed" or "new condo #adulting"? Hey it's your life anyway, if you really need validation from others. I'm just the guy with the unpopular opinion.

Footnote:

[1] I emphasize on the word 'opinion'. I am not saying I know all the facts nor i'm not saying I'm right. I am just offering another perspective.
[2] Everyone is entitled to their own opinion. A variation of a saying goes: "Opinion is like a penis. It's fine to have one and it's fine to be proud of it, but please don't whip it out in public and start waving it around... and PLEASE don't try to shove it down peoples throat."
[3] I appreciate the ones who stuck around. I know I'm an acquired taste, but we all know that being brutally honest is better than being plastic.
[4] Wheres the third one? Maybe for another day. People hate me so much that I bet it'd be more than three instances where I've been virtually stoned to death.

Sunday, April 14, 2013

Self Signed SSL Certificates

Ever wondered how to enable SSL or HTTPS on your site? If you dont want to pay for commercial SSL certificates, you could create self signed certificates for your site by following the instructions here:

https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04

The instructions in the site above will make your default site HTTPS enabled. If you prefer having a commercial SSL, save your certificate files and key files in your server and edit the location on the /etc/apache2/sites-enabled/default to point to the directory where you stored those files.

Sunday, December 2, 2012

Report-a-Potty

In line with the nationwide Sanitation Hackathon organized by several organizations here in the philippines and abroad, I mentored for one of the GDG chapters here in Davao.

After my presentation yesterday, I myself attempted to do a quick hack on how to help in the sanitation problems faced here and abroad.


Using Google Maps Javascript API and a supposedly a little bit of PHP (but I became to busy to continue the rest of the application) I've created a webapp which does a simple basic thing: get your current location and report/tag it as an offender. This is in hoping that the corresponding establishments and local government units to improve the sanitation of their provided restroom facilities.



Unfortunately, since im one of the mentors for the Davao participants, I wont be able to join the submission of entries. Its a nice proof of concept though :) 

The source code could be viewed (since its all just a bunch of HTML and JavaScript. The app is available at http://tinyurl.com/pogzsanhack 


Friday, September 21, 2012

LTE and the Unlocked iPhone 5


So heres the deal, theres a new iPhone out there and its got the new blazing LTE. If you're planning to get one buying from countries which have unlocked options (Canada, Singapore, Hong Kong) doesnt necessarily merit that you'll get LTE compatibility wherever you go.

In the iPhone 5 website, theres a little asterisk there. Pretty sneaky if you ask me, that they have created 2 different models probably using 2 different LTE chips.

GSM model A1428*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 4 and 17) 
GSM model A1429*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 1, 3, 5)
- From: http://www.apple.com/iphone/specs.html

So what does this mean? If you're planning to get an unlocked unit from other country, LTE speeds might not be compatible with yours. From Wikpedia, theres a working list of LTE bands per country.

With me residing in the Philippines it seems that the LTE band in the Philippines is LTE Band 1 and 3 (GSM model A1429). But what if im travelling outside? US or Canada perhaps? I think what better way to explain this by plotting it into a spreadsheet.



So, how do you look at the graph? Normally, you would be sourcing your phone from somehere its factory unlocked. Either Hong Kong, Singapore, Canada (or US once they make it available in the Apple Store) So, look for the country where your unlocked iPhone will be originating. Most likely that the iPhone that will be sold there will be using that LTE band (duh). After, look for the country you will be using your phone. For me, I will be looking at the Philippines.

From here, it seems like the Philippines is using LTE band 1 and 3 (A1429) and the countries which will most likely sell an unlocked A1429 would be: Singapore, Hong Kong, Australia.

If you would notice, if I buy myself an A1429.. LTE features might not work when I fly to either Canada or the US. Sad.

Anyway, as a disclaimer, this spreadsheet was compiled September 2012 and may not reflect the changes once new carriers roll out new LTE infrastructure in the future.

Saturday, September 15, 2012

Comparing Prepaid Data Plans from Globe, Smart and Sun

Recently I have been thinking about those minor differences when it comes to subscribing to a data plan here in the country. So far we're fortunate that we have lots of options but apparently, it takes some discerning as to what to subscribe to given the situation.

I have been in several instances wherein, I was at the beach with friends for 3 days. I would be getting a better deal if I subscribed into an unlimited data for 3 days rather than 1 day and resubscribe every time. Thinking about my consumption, since I didnt bring my laptop then (hey, it was Boracay!) the only thing I do with my iPhone was to check my mail and check in to 4square. Maybe an MB based subscription might be better.

On a recent trip, I was on the road going to the beach (again) but this time I have with me my laptop with the intention of squeezing in some work during the long travel time. I opted to subscribe for a 1 day unlimited since I knew for a fact that I would't be working on the way back.

So upon rummaging through the websites of our favorite telcos, I sorted the mobile dataplan for each. One is for MB based (currently sorted by the allocated MB) you may also cross reference it for the cost/MB ratio if you're getting a good deal.



Another, comparing the unlimited data plans. I sorted them according to the number of days you would be needing to be online. Again I also provided a column for cost/day ratio which you could try to pick if its just right for you.



Take note that these plans are for PREPAID sims only. I also did not include the hourly plan of Sun which doesnt really coincide with the MB chart.

Wednesday, June 13, 2012

Data Disaster

Several years ago, I was issued a white Macbook for work which I typically use for everything. I have my work files there, I have my personal files there and it has been part of my life. A colleague who was issued the same Macbook model woke up with an error with his Mac hard drive. 
Photo credit from here
As part of my work, I tried to recover whatever is recoverable in his drive. We had a Network Access Storage (NAS) which is seldom used but most of his files are in his Mac hard drive. Tough luck, after doing whatever I can to recover, I declared it dead. It was lucky that it was still under warranty but the files lost, or the time devoted to writing those files or creating those files will never be replaced. 

Soon enough, despite that warning, mine gave out. Died. Same error. Despite that earlier warning, I didnt back up either to the NAS or to any other storage. If felt like my life has been wiped clean. Source codes, documents, pictures, my life. Its hard to accept losing something that you've taken time to collect. Those pictures, that vacation, that exact moment, those kilo lines of code you wrote. Gone. 

I picked up whats left from fragments of my life scattered around. Some work files are in the NAS, some were in Google Docs, some in my old desktop PC, some in my laptop which was with my sister in Canada. As for the pictures, I had to pay Multiply to bulk download all my pictures in high res. I had to pay for my pictures. I kinda felt raped. Multiply was never fair to those people taking away data (see this post)

I bounced back after some time, I just thought to myself, any file that I wouldnt be looking for isnt probably needed anymore. After several years and several iterations of hardware, I found myself having too much spare hard drives either being given to me by my uncle as spare parts or part of my old PC. Old stuff, 40GB, 80GB, 120GB, 250GB IDE drives. Not much use slapped inside a PC. 

Lining them up to be loaded and labelled
It took some time for me to sort out everything in my digital life. In general, I have sorted into folders like: Pictures, Downloads, Documents, Music, Pogz Files (source codes and anything that doesnt fit anywhere else) and figured out that most of the folders, when organized properly are relatively small. Chunks of 10GB, 27GB and the largest are like 78GB, 40GB. Then I realized that maybe I could do a quarterly backup using my old drives. Its like a puzzle making combinations of folders fit in drives which had limited capacity. I end up with several drives and most of my folders backed up in 2 drives. I cant gamble the reliability of those old drives so having a secondary or tertiary backup would be great (since I have a lot of drives anyway). 

Yesterday, my netbook just gave up on me. Again, most of my files are there but thankfully, a part of the partition is still intact. I've been backing up since last night to my drives and would send the laptop to HP to claim its rightful warranty. 

My IDE poormans drive backup didnt save me this time, but it felt assuring that I do have some backups (even if its months back) rather than starting my life from scratch. 

To those who might ask: Why not buy dedicated cloud storage for backup? Dropbox? Google Drive? Amazon S3 + ZManda? 

To tell you the truth, I have considered that option. It would be a whole lot cheaper and more reliable than what I do, or compared to buying NAS drives or portable hard drives. But the problem is, despite my downstream hitting around 2Mbps, my upstream is a measly 512Kbps. The total filesize of all my folders is around 170gb. I have files which also exceeds upload limits. 

Then again, being partially safe, is better than not being safe. 




Sunday, October 2, 2011

[Programming] XMPP and Office Guru (Part 2)

Since my last post, I had a really hard time making XMPP work using XMPP severs for Linux. Luckily, there was an easier way of doing things without the messy details of installing and hosting your own XMPP server. From this post, How to Write Your Own IM Bot in Less Than 5 Minutes (http://www.labnol.org/internet/tutorial-create-bot-for-gtalk-yahoo-messenger/4354/) I found out that there is a service called IMified which 'hosts' your bots and calls a specific page to do all the processing. As an overview, below is a simple diagram on how IMified works.


So going back to our previous problem, how do we create a location monitoring application which accepts user input thru IM and then displays it to a screen? So with my IMified bot in place, what I did was to code a simple PHP page which accepts POST parameters from IMified and processes it accordingly. Below is the source code for the page which accepts the values sent from IMified

<?PHP
/* 
IMified Message Handler
Allan Paul "Pogz" Sy Ortile
June 2011

IMified sends information through POST requests 
which in turn is then handled by this page.
For the complete list of POST values sent, you
may consult http://www.imified.com/developers/api
for more details. 
*/

$user = $_POST['user'];
$msg = $_POST['msg'];
// Time stamp to log what time the message was recieved
$time = time();

// Connect to database
$con = mysql_connect("host","username","password");
if (!$con)
	{
	die('Could not connect: ' . mysql_error());
	}
else 
	{
	// Select the database to use
	mysql_select_db("db_name", $con);

	// Ass the message to the table in the database	
	mysql_query("UPDATE tbl_user SET time = '$time', location = '$msg' WHERE ymuser = '$user' ");

	// Bot reply to user
	echo "Hi " . $user . "! Your current location has been logged! ";
	mysql_close($con);
	}

?>

If we would trace what is happening between the user, the IMified service and the webserver you may refer to the steps below:

1.) ymuser sends "currently at the office" to the ymchatbot hosted by IMified
2.) IMified processes the message and then passes the POST values to the page located in our webserver
$_POST['user']; now contains the value ymuser
$_POST['msg']; now contains "currently at the office"
3.) The accepting page now processes the POST values sent which is then saved to a database along with a timestamp generated from the PHP code.
4.) The accepting page replies with "Hi ymuser! Your current location has been logged!"

So now, the values are saved into our MySQL database which is then picked up by another page which is just a regular PHP page. The source code could be found below:

<?PHP
/* 
Location Output Page
Allan Paul "Pogz" Sy Ortile
June 2011
*/

// Connect to database
$con = mysql_connect("host","username","password");
if (!$con)
	{
	die('Could not connect: ' . mysql_error());
	}
else 
	{
	// Use database and table
	mysql_select_db("db_name", $con);

	// Do query and pick only the ones in the SMS team and order it by latest timestamp
	$result = mysql_query("SELECT * FROM tbl_user WHERE team = 'SMS' ORDER BY time DESC ");
	
	// Display unique recent post
	echo "<body bgcolor='#FFFFEE'>
	<div align='center'>
	<table border='1'>
	<tr>
	<th align='center'><b><font size='+2' 'verdana'>USERNAME</b></font></th>
	<th width='250' align='center' ><b><font size='+2' 'verdana'>TIME</b></font></th>
	<th width='550'><b><font size='+2' 'verdana'>LOCATION</b></font></th>
	</tr>";
	
	// Some output mumbojumbo
	while($row = mysql_fetch_array($result))
	{
	$human_time = date('d-m-y H:i',$row['time']);
	echo "<tr>";
	echo "<td align='center'><font size='+2' face='verdana'>" . $row['dlsuuser'] . "</font></td>";
	echo "<td align='center'><font size='+1' face='verdana'><b>" . $human_time . "</b></font></td>";
	echo "<td><font size='+2' face='verdana'>" . $row['location'] . "</font></td>";	
	echo "</tr>";
	}
	echo "</table>
	</div></body>";

	mysql_close($con);
	}

?>

The database schema contains the following fields: uid, ymuser, dlsuuser, time, location, team. All of which are text values save for uid and time which are integer values. So, you might be wondering why I opted having a ymuser field and a dlsuuser field. The two fields just does a mapping of the persons YM id with its corresponding work userid. Its just for formalization.

From our infrastructure monitoring screen, I just added an iframe which just calls the page where the results are displayed.

Its pretty much straight forward.