Categories
Career DevOps Personal

DevOps in the real world

It has been a while since I wrote my thoughts about DevOps. Well, this time it is not just my realization but the reality of it.

I started to focus my career towards continuous improvement of developing applications. I have migrated from Asia to Europe not just to see the other side of the world but to meet other brilliant people that has the same passion as mine.

As I progressed, I have learned different technologies and techniques such as Cloud computing, Containerization, Clustering, Service Meshing, Infrastructure As Code, GitOps, Key-Value Management, Microservices, Domain-Driven Design, Test-Driven Design, Event-Driven Design, Continuous Integration/Continuous Delivery/Deployment that I have only read before. These technologies are the main tools that comprise next-level application today. Hence, learning the tools like Docker, Kubernetes, Istio, Vault, Terraform, Helm, Kustomize, and more was overwhelming.

But DevOps is not just about the tools that you need to use to productionize your application. Well, in my own opinion, it is about having a culture within the organization regardless whether it is small or huge team that sets up a happy environment where everybody is able to continuously improve and deploy their work with confidence anytime of the day. That said, there are work to be done like adding automation to conduct pre and post checks of your code; build artefacts with meaningful versions; having an opinionated development environment as your Swiss army knife tool; templates for proper documentation and version control; predictable code reviews; monitoring, logging, and alerting; securing and protecting your data; and last but not the least is to keep people happy and having fun.

There are still plenty of time to achieve my goal as an aspiring DevOps engineer. Well, maybe, I’ll not be able to reach it because it is a journey that has no end. I will just continuously become better and wise on choosing the right tools and making purposeful decision.

Categories
Career DevOps Personal

DevOps is indeed necessary!

Should I say? My day of being a programmer is expiring. And I have found a new career path that benefit both development and operations. You heard it right. To be a DevOps engineer!

I was so naive to think that my whole career will always be within my control. “Client requests to have this feature”. “No problem, I can do that”. “Done! Please check”. “Alright! It’s working. Please deploy it to live”. “Give me a sec! I’m doing backup now… Deploying… Done! Whew”. And it goes on like that for years. Later I realised, I need to step up my career and I cannot do it like this forever.

As I become a Tech Lead, I see frustrations to my teammate’s faces every day. Working for long hours. “Ugh! I hate it! I have to do something… Hmmm… Aha! If we can automate it, then we are able to reduce our frustrations and go home early”. Here comes continuous integration (CI).

We have started scripting our builds and put it in CI tools like Bitbucket Pipeline and Jenkins. Everyone were thrilled and asking for more. We have strengthen our skills by learning more everyday. Master our source code management (Git), unit testing, and packages. So that we can leverage on continuous delivery (CD) and continuous deployment (CD).

We have seen the importance of CI/CD in our operations. And we still have a long way to align everyone, not only tech people but the whole company, to adopt DevOps. I’ll be more than happy if everything we do is fully connected and automated.

Categories
Uncategorized

Why I have failed as a programmer

I have built my interests in anything computer related stuff way back in 2005. Hence, leads me to the programming world. I felt like being fond of mathematics, science and technology will be my biggest advantage on it. And yet up until today even when I became a Tech Lead, I still feel I didn’t fulfil my goal to become an expert. And I have wondered why.

In school, we used to juggle many things which was my edge when I first got my telecommuting job as a PHP programmer. As I go on with my career, I realised I became a generalist which cover backend and frontend. I provide solutions to anything that my employer needs. This includes architecture, security, tools, and even long-term solutions for their businesses.

Throughout my career I haven’t specialised anything. I guess it was due to the nature of the job I have been to that provides solution to the client’s problem. These cover from architecture down to the tools. To supplement that, I need to keep myself up-to-date with the technology out there. Hence, being “Jack of all trades, but master of none” which is not applicable anymore today! (sigh)

So, what I have realised that I should’ve done?

  1. Focus on one programming language and root from it
    This includes learning the core features, concepts, design patterns and practices.
  2. Learn related tools and libraries in line with your chosen programming language
    Pick related tools that will help you to level up your solutions. And at the same time open up to more opportunities without leaving your root language.
  3. Practice and execute more
    Build a habit of teaching yourself to be better by executing what you have learn every day.
  4. Build a product
    Come up with the product you want to build and apply everything you have learn.
  5. Find people that shares the same passion
    Programmer shouldn’t stay behind the closed door and code. You need to go out and look for people and collaborate.

Once you have the solid fundamentals, you can tailor your career in a much better way. You can support your career with less problem and always provide a quality work.

Categories
Personal Programming Web Development

Seamless frontend and backend integration

It has been a while since I wrote my last post. So, before going to bed I just want to write things that is bothering me this time.

I’ve been busy working on things and try to learn something new as much as possible without compromising my time with my wife.

Early this morning, I was thinking again about if there is a way to integrate frontend to backend without huge blockages. Think about it as frontend will create their pages and interactions without worrying about backend. And then backend will do the business logics without thinking about frontend. And once we put them together with a middleware program/service then it will just work with less coding and configuration. I know this sounds crazy but for some developers who always in this situation would agree.

On top of my head, maybe there is way to do less logic coding and instead leverage more on declaring things. This idea falls to a declarative programming. As you practice this style, you know what will be your expected result but you don’t know how to do it yet. It will be ideal that you know things will end this way without exerting too much effort on building the logic first.

There might be tools out there (that I still need to find) that have already implemented this. I’ll dig more and hopefully I can find anything. Or if not, then I’ll try to create one. Hopefully! 😀 Please do drop some comments if you have any idea about this. Thanks!

Categories
Personal Programming Web Development

Who comes first? Testing or Development

While riding the train today, I stumbled with this programming article. I always think about how to become a better programmer at the same time write less and effective codes.

I still remember during my college days, one of my professor friend thought me of how to be a better programmer. He told me that I should write my code first while in my mind I assume that things will work. This will help me speed up and write quality codes. It became my principle since then.

This principle is still effective. I am able to see things without even writing a single code because I trained myself to see it. But things have changed already in programming nowadays.

Today, I appreciate how important the practice test-driven development (TDD). I can’t believe that I’ve just discovered it although it exists a long time ago. By this we can catch possible known problems that we’ll encounter in our system or API.

We all have different practices and it solves our problems. But adapting other practices makes you better and effective. I am excited to change my practice now and be more efficient on my next coding.

Categories
Server

How To Renew Your Let’s Encrypt Certificate

Earlier I was trying to renew my Let’s Encrypt certificate and experienced some problem.

Basically, I’m just following the instructions from Let’s Encrypt Get Started page to use Certbot. And follow this steps from DigitalOcean.

What happened was when I ran the script below.

certbot-auto renew

I always get this result.

$ certbot-auto renew
...
/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
 InsecurePlatformWarning
You are using pip version 8.0.3, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

And I ran the script and see result below:

$ pip install --upgrade pip
...
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages

Technically, my server packages were already up-to-date but still I’m not able to install it. And I stumbled with this solution from StackOverflow.

The command below still doesn’t work:

$ pip install requests[security]
...
Requirement already satisfied (use --upgrade to upgrade): requests[security] in /usr/lib/python2.7/dist-packages
 requests 2.2.1 does not provide the extra 'security'

And finally I found the right command to update it.

$ pip install requests[security] --upgrade
...
# Packages were downloaded and installed

After upgrading the necessary packages. I finally ran the script below and successfully renewed my certificate.

$ certbot-auto renew
...
..
Congratulations, all renewals succeeded. The following certs have been renewed:
 /etc/letsencrypt/live/yourdomain.com/fullchain.pem (success)

I hope I’ve been a help with you guys. If you have any questions just drop your comment below. Thanks!

Categories
Personal

Pokemon Go

Last week, Niantic Incorporated launched the Pokemon Go in Singapore and everybody downloaded it. I have also tried it just to check out this addictive game.

It is quite fun playing it aside from it helps you to exercise without you knowing it. By means of walking or checking out some places. You’ll see people always check their phones and laughed to you or you to them when you saw them playing too.

Beside from being addictive game, it turns out that businesses took advantage to it. They’ve dropped some lures module (one of the item to attract Pokemons in the area) to attract people. Everyone will definitely stay and buy things from them.

It has been fun playing it and I hope it will give positive outcome to our society.

Categories
Server Web Development

CodeIgniter Cron In Different Environment

Here are few ways on how to run CodeIgniter cron through your command line interface (CLI).

Default way

This way is to just run the cron regardless of the environment. But by default it will use “development”.

* * * * * php path/to/your/codeigniter/index.php controller method "parameters"

With Environment

The setup below helps you once you are working on different environment. If you are using version before 3, you need to use ENVIRONMENT as your server variable.

# Version 2.2 and below
* * * * * export ENVIRONMENT="testing"; php path/to/your/codeigniter/index.php controller method "parameters"
# Version 3+
* * * * * export CI_ENV="testing"; php path/to/your/codeigniter/index.php controller method "parameters"

I hope those simple snippets above will help you. Drop some comments if you have some or any suggestions. Thanks.

Categories
AEM Java Programming Web Development

AEM Sightly’s nightmare

I’ve been working on Sightly templates which they are calling HTL (HTML Template Language). I’ve discovered some hacks/techniques on how to manipulate variables. So, I thought I’m already used to it.

I have worked on one component which I duplicated from my working component. I know it is going to work but actually something happened. I didn’t know why it is happening that frustrates me.

The data-sly-list is showing my the list keys instead of values. I kept changing my Java Use-API to think that something is wrong with my collection.

Actually nothing is wrong with my implementation. It was actually because of the double quotes (“”) that my editor is doing. Every time I write double quote it closes it with another one. If you are rushing, you will not be able to notice this in your HTML codes.

<!-- The double quote below will give you problem -->
<div class="class-name"">
    <p>Some text here</p>
</div>

<!--/* This code will always print your list keys */-->
<!--/* Instead of giving you the list and loop it as normal */-->
<sly data-sly-list="${javaUseAPI.listItems}">
    ${itemList.index}
</sly>

I’m using Visual Studio Code as my editor. They have added auto-completion for quotes on their latest updates. To disable it, you need to do the settings below.

{
     "editor.autoClosingBrackets": false
}

I know auto-completion in your code helps developer a lot. It just happened that it caused me some trouble and frustrate me a little bit. It is a good thing to remember that not all auto-completion are helpful. Sometimes it has some disadvantages and we need to take note of it.

Categories
Security

Why Skype? Why?

Yesterday, I was transferring my files from my old laptop to my new one and encountered some interesting files inside the Skype folder. So, my curiosity doesn’t stopped me from trying to open it.

In just a few seconds after searching, I am able to see my profile, messages, and logs without logging in to my Skype which surprised me. I also found out that it was a well known vulnerability which I don’t understand why they did not bother to fix it. Though, it is not a direct vulnerability to Skype’s server but more on the user side.

When you install the Skype application it will actually keep your history for weeks or forever on your local folder. As a programmer, I fully understand that having this data on your local will help your application work faster compared to accessing it through your server. I kept thinking that their engineers should be aware enough that this might be used to exploit someone. So, they need to do something to it.

In order for you to access the jackpot file, you should go through user’s machine first. You will be lucky if they didn’t password protect it. So, having a login password to your OS will at least keep you protected from others who want to exploit those files.

Just be careful on logging in to public or untrusted computers to avoid this kind of mess. I must be just crazy thinking too much about this thing. However, it could be very important to others.

Let me know if you have some thoughts about this.