Tuesday, February 16, 2021

There it is... again

Long hiatus.
Nothing to write for almost a decade.
Life is good so far.
Settled down.
Achieved a lot of things.
Missed a lot of things too.
Many things are treasured, proud.
Some things.. hmm, wish I could have done better.
Colorful thing it is this life of mine.
Reminiscing - the path chosen is fulfilling.


"Kapalı kapı yoktur. Yanlış anahtar vardır"

Tuesday, April 1, 2014

Running Glassfish 3.1.2.2 with JDK 8

Stopped by an error after upgrading my Java 7 to Java 8.
Glassfish 3.1.2.2 just won't start.

Found a solution:

edit osgi.properties file in the glassfish/config folder and add this line at the end:

jre-1.8=${jre-1.7}

Saturday, March 17, 2012

Turning your home PC into a hosting server.

Most of you who is going to read this probably already know how to do this. I'm going to write a post about it anyway since I actually met a few people who are in the IT field themselves that do not really know how to achieve this.

So, people nowadays usually subscribes to a 24 hours available fast internet broadband at their homes. In some part of the world especially in the western countries, they probably are getting a fixed IP address which makes things a lot easier to achieve what we are discussing here since it's just a matter of buying a domain name, have it point to the fixed IP address and probably setup port forwarding from the router.

Here in Malaysia, the broadband that we subscribe to is based on a dynamic IP address. That means, we are getting a different IP address each time we get disconnected and reconnect to the Internet Service Provider.
This presents a problem as it's impossible to be sure that the IP that we are using remains the same and by the way, who would want to memorize IP address right?

So thankfully, the manufacturers of the broadband routers (most of them) includes a functionality called Dynamic DNS or DDNS built right into their products. What this functionality provide is a facility to automatically update your current IP address to a 3rd party service that their business is to provide a domain name for dynamic IP users.

To utilize this, first thing you have to do is to register at www.dyndns.org and add your chosen hostname (depends on availability).

Next, all you need to do is to login to your router, find the Dynamic DNS (or DDNS) setting page, input your credentials that you registered at the site before and save the setting.

Example is taken from my D-Link DIR-615 router.

DDNS setting in DIR-615 router

Now your network will have a domain name. :)

Next,  you need to tell the router your PC's IP address and the port that it needs to forward the packets to.
For example, if you want to make your PC to be your own personal private web hosting server, you need to input the port number that your web server application is listening to. Wweb servers (Apache, IIS, etc) listens to port 80. So, in this example, we are going to forward any packets that come in through port 80 to the PC with the web server application running. 

Login to your router again. This time, look for Port Forwarding or Virtual Servers in the menu. 
You should be able to find something almost similar like this (again screenshot is taken from my router):

Port forwarding rules in DIR-615 router

So what we have to do here is to input our PC's IP address in the private IP field and also the port number that we are using. In the image, I've set my router to forward any request to port 80 to the port 80 of my PC that is going to be the hosting machine.

What we have to do next it to test it. Try accessing the URL of the domain that we registered earlier from a device that is not using the same internet access (your smartphone with subscribed 3G/HSPA connection maybe). You should be able to access your web server remotely from anywhere in the globe with internet connection now. 

:)



Tuesday, January 10, 2012

The culture of prejudice.

Ever since I developed this habit of observing people's behavior years ago, only a very tiny number of them earned my respect when it comes to judging and criticizing whereas the others are having this nasty personality rot to judge and criticize as if that they are so holy.

Some of those that have this disease realizes it but they never cared as long they get to their dose of people bashing. This type of people are the ones who aren't worth a while to have a constructive argument with. You can recognize them from their absence of any facts from their arguments, only bashing, speculations and hearsay.When presented with facts that they can no longer refute, they start to find fault within the person they are arguing with. Most of these types are young adults with still very immature thoughts.

Another type is the ones who are so lost in the illusion of self grandeur. They do have respectable ideals, generally do not disturb others but they are so lost within themselves. These type of people is the Ignorants. They're smart people but sadly, they are so full of themselves. Always claims that they read the history, studied the profiles and biographies of great people from the past but failed to read between the lines or maybe they just left some part out hoping that their counter arguer wouldn't know. They always view themselves as being superior for having the gift of intellect and views others who does not share the same ideals and philosophy as losers and have no respect for them. So lost within their ideals that they lost their connection with the other majority of minds in the society. When given a fact, they disregard and digress by connecting it out of the context to another 'might-be-related' fact. Always confused between personal gains as contributions to the society. Smart, but not smart enough.

I wrote this entry just to vent out my disappointment. Instead of only finding faults, bashing, labeling, name calling, why can't we look at the good side and provide solutions to the problems? Why can't we see and help bring out the actual shine within ourselves?

To those whom I have those wonderfully insightful and fulfilling arguments, I thank you very much. You know I appreciate those moments when I say 'Thank You' at the end of each session. You guys earned my respect. :)

Thursday, December 29, 2011

Distributed VCS vs centralized VCS

I've been using GiT, a distributed VCS, for more than a year now. I don't find it cumbersome or hard to use at all. It just need a little shift in paradigm of how a VCS works. First things first, we just need to understand its concept of local and remote repository.

When you install DVCS and initialized a repository, this is your local repo. It resides on your local machine. When you do a commit, you are actually committing locally. This has several advantages.

You dont have to be online to commit your code. What does this gives you? The ability to track your changes. But one may argue that you can compare with Local History in your IDE. Question: Can you track the whole project changes with that? I believe that you only can track only a single file at a time. :) So, DVCS allows you to track your whole changes and 'save' it as a set. You might write a prototype program and it works fine. But let say you need to refactor it and something goes wrong somewhere and you lost track of what was changed that made it broke, can you track them back using the local history? Unless you are a masochist then I believe the answer is no.

You are free to develop and implement that experimental feature without the pain of doing merging that most popular centralized VCS gives you. Not just that, you are now able to do that OFFLINE and without the pain of creating a separate workspace/project.

You totally don't need a centralized repo to sync your codes with your buddies anymore. If you and your team work locally, you can just pull from each other and review each other's codes just by sharing a folder on the network, or create a 'bundle' and email it. Or appoint someone as the build manager and let him do the usual merging and build. You can have a 'Blessed' or 'Golden' or whatever name you want to give it to a main repo and work in a 'centralized' way if that is what you want.

Minimize broken builds. Now in my past experience, this thing is undeniably the most common showstopper for developers. Countless times I've been in this situation where somebody from a different timezone 'accidentally' committed half of what they supposed to and what happened was, the whole local team unable to do anything productive for the day. Worse if the team in the other timezone is celebrating holiday the next day. Or maybe somebody refactored a piece of code that another developer did a design mistake to tightly couple his code to it.

I'm not saying the CVCS is all that bad. It is simplistic but it relies too much on the network and developers to commit their code correctly.  Right now, if I am given the choice, I rather go with the DVCS instead of CVCS and I really recommend that you do too. Other than the shift in paradigm, another issue that most DVCS haters are having are just because they did not configure their client properly - this could be for so many reasons but I would say being lazy and impatient is the main issue as I never really have trouble using it. Take time to understand and I'm sure you'll like it as I do.




Tuesday, December 27, 2011

2011 in review.

2011 is closing its curtains. A lot of events occurred that brought major changes in my life's course.

To summarize some of the memorable stuffs:

  • Left a huge nonsensically chaotic corporate organization after a heated argument with a moronic asshole manager. XD
  • Went on a trip to Indonesia, sightseeing and attending my sister's wedding reception ceremony. :)
  • Joined an organization that is also dysfunctional but bearable due to the super flexible hours and remote working ability. :|
  • My team lead resigned. Major demoralization. :(
  • Went on a family trip to Cameron Highlands, BBQ and sightseeing. :)
  • Bought a Playstation 3. Yeah, I'm so outdated. :)
  • Bought a used Playstation Portable and gave it to my brother as his birthday present. :)
  • Bought a new mountain bike - Scott Scale 60 2011. :)
  • Bought a foldable bike - Dahon Vitesse P18 2011 and started cycling to work. :)
  • Partnered with some good friends (my ex-team lead) to start up our own company. :)
  • Ex team lead in Patimas joined the dysfunctional organization, but only lasted 3 weeks before resigning. Another major demoralization. :(
  • Influenced someone to buy a foldable bike too. >XD
  • Opening myself up by joining the cycling community. :)
  • I was on TV! (although just interframing) XD
  • Bought another Playstation Portable and gave it to my nephew for his UPSRA exam result. :)

Things to achieve in first few months of 2012:

  • Quit the dysfunctional organization.
  • Get something really rolling for my company.
  • More community service perhaps?
Out of ideas. To be added more later. 



Tuesday, November 29, 2011

Mental fatigue

It's almost December. It has been a long journey and still on the road. Not sure if I lost my passion for the job. I keep on losing focus no thanks to all the super fast requirement changes and super tight schedule. It was a disaster for my life. The only thing I can think of right now is to hoard a lot of cash and invest in shares. I just want to relax and enjoy life. Alas, my business is still in its infancy. There's a lot more work to do to get thing really moving. This is 'The Climb' as what those business people say. Targeting to have a good relaxed life in 5 years time could be too constricting I guess. Maybe I should aim lower.

Or maybe I just need a really long vacation. In my mind right now is only beautiful sceneries of paradise like beaches, beautiful mountains with snow, great waterfalls and serene lakes. But then, to even have decent week of vacation to those places would cost a lot of cash.

I wish life is as simple as it was during the times of our forefathers.

sigh...