Showing posts from November, 2019

Tips For Beginner Software Developer

Becoming a software developer is not a dream job i would say, it is far from enjoyable, fun and rewarding. After years then i feel myself not enjoying it anymore, writing codes. The average people stay in tech world as software developer is less than 2 years, after that short period of time, they will get bored and looking for another company or even completely steer into different field outside of doing software development, because it is not fun anymore.

I don't enjoy this job myself, the only reason i stay working in a company is that i don't have any income outside this job, i wish this blog can give me some hope, but it doesn't. I am still feel underpaid after years of experiences in coding. After long hours of working on a computer, you supposed to get some relaxation, but you don't, you will keep doing that in the night, tomorrow and the next day and the next day, it's just intimidating.

Here i give you three powerful tips before you go deep into software d…

What is Computer CPU, Disk and Memory?

If you are Windows user, then open task manager, you will see many processes running on your computer, each of the process has its own CPU, disk and memory usages. Sometimes it's using a lot of memory, sometimes it is using Disk or CPU. So what's that CPU, disk and Memory mean to us? Here's some little information i can provide.

1. CPU It's stands for central processor unit (CPU), in computer is like the brain of computer, it so important component of a computer, to do it's computing job. It handles basic instructions and allocates the more complicated tasks to other specific chips to get them to do what they do best. It’s the core of your PC, smartphone, or tablet. and it’s what makes the whole device run as it should.

The famous CPU you often heard is the AMD CPU and Intel CPU. Intel is more popular by their Intel Core I series, like Core I7 and the latest Intel Core I9.

2. Disk Disk storage is a general category of storage mechanisms where data is recorded by v…

CodeIgniter PHP Framework, Is It Worth to Learn?

I've been doing PHP coding for my entire career as web based software developer, combined with Javascript it is the most easiest and faster way to achieve the goal of our projects. You know just doing front end web stuff, end some not very complicated business process with admin privileges, etc.

CodeIgniter is PHP framework for web based application, you can make business models, views and controller to be structured into what we called MVC framework. You can also do some URL routing, database transactions, form submit, etc. That's probably is the major reasons to use CodeIgniter, other than that, i think maybe the security is handled by CodeIgniter, file uploading, html form handling, but it is not the convenience way of doing html form. I think UI or form should be separated from the PHP codes, because if it is mixed together it's gonna looks really bad (unmaintainable).

Just for small project, if you know very well of PHP codes, Javascript and JQuery, you can do a lot …

Flutter AppBar, With Icon, Title and Actions Link

It is very common to have AppBar in mobile apps, most mobile apps have app bar. AppBar or top App Bars is a collection of widget located at the top of the app, for wrapping our app's title, icon and action link. This app bar will work the same looks, style both in Android and IOS. Basically almost everything will work the same, Flutter is cross platform mobile app Framework.

Here's example code of AppBar in Flutter with icon, title and action:

import 'package:flutter/material.dart'; void main() { runApp(new MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Generated App', theme: new ThemeData( primarySwatch:, primaryColor: const Color(0xFF2196f3), accentColor: const Color(0xFF2196f3), canvasColor: const Color(0xFFfafafa), ), home: new MyHomePage(), ); } } class MyHomePage extends StatefulWidget { …

Intellij IDEA 2019.3, The Fastest Java IDE

Starting from Intellij IDEA 2019.3, the start up experience has been really amazing, never been before the launching of IDEA is fast as this 2019.4 new version, I am really happy that this improvement is happening, I am a IDEA fan, this tools has been really helpful for writing Java codes, not only Java though, it also support many languages using plugin. But if you want to code in other language, for example PHP, there's PHPStorm, for Python you can use PyCharm.

Here's some new feature and improvement of Intellij IDEA version 2019.3:

Smoother mouse scrolling.Intention action doesn't disappear from the list of suggestions.Field Call Hierarchy.Find in path displays file extension of the search results.Better performance on importing a Gradle project.Improved Maven support.Timeline for GitHub Pull Requests.Reworked Clone dialog.Force addition to VCS a file from an ignore list.

And so many more changes for improvement of the IDEA, you can go here for the detail of the release …

Is Nox Player a Malware? Nox Android Emulator

Yes it is Malware. After not using Nox for so long time, this time i try to install this Nox Player, and android emulator device for PC. After so long time i am not using it ,because my favorite android emulator is now BlueStack, today i try to install Nox again because i have have trouble in BlueStacks, it is surprising me that it turns out Nox has change radically its system, to become a malware program.

In the past, I've have quite experiences using Nox with no trouble, it run smoothly, no suspicious thing happens, all just working like normal android emulator. Then after i switch to BlueStacks because BlueStacks can not open some app that i installed, i decided to look another Android emulator, and Nox came to my mind, so i decided to install it.

After the installation of Nox, suddenly my Bluetooth mouse is not working. It is not that my mouse is broken, the viruses is damaging my Windows OS. The driver corespondent to Mouse is  working.

In the installation process, a typical…

Why Flutter? Beautiful, Natively Compiled Mobile App

So recently I've been doing mobile app development using this framework made by Google, Flutter. To be honest, other than that it is a multi platform mobile app framework, for Android and IOS, i am really disappointed. I hate it because it is using this Dart language that look like Javascript but it is not Javascript, it looks like Java but it’s no Java. It’s confusing for even creating, adding a variable typed List. Do i need to do var myList? or List myList=new ArrayList()? But then, can i just myList[123] or myList.get(123)? It turns out that there’s so many things we need to learn about this Dart language alone, and Flutter is another different complex story.

Flutter is React like mobile app development framework. I’ve been doing React and have been really happy, enjoying so much, but it is not as flexible as pure as HTML, Javascript, JQuery and CSS. You can build more maintainable codes with React, but is that you want?

Now talk about why consider Flutter to be your mobile a…

Remove Duplicate String Array Elements Using PHP

Just using for each loop, you can populate a new array, check if there's already an element with the same values, if is exists than skip that row. Look at this codes below for removing duplicate string array elements in PHP.

<?php function filter_duplicate($ori){ $result = array(); $labels= array(); $i=0; foreach ($ori as $row) { $label = $row['label']; if( !in_array($label, $labels) ){ $result[$i] = $row; $labels[$i] = $label; $i++; } } return $result; } $original_array=array( array( "name"=>"name1", "label"=>"name dup 1", ), array( "name"=>"name2", "label"=>"name dup 1", ), array( "name"=>"name3", "label"=>"name dup 3", ), array( "name"=>"name4", "label"=>"name dup 3", ) ); $no_duplicate = filter…

MySQL Database Pros and Cons, Why Is It Really Popular

These are several MySQL pros and cons i listed, not that very much list but enough for just as an information, why people using MySQL over several database competitor, and also some contradictions why is it bad, and so you can decided to choose another DB system if you think MySQL is not the right choice for your type of project you are currently doing. I am not really an expert, it is just based on my experiences as software developer for many years (not that long though).
Pros - Free, you can download MySQL community edition, or the open source MariaDB, it is basically just an open source version of MySQL
- Easy to install, in operating system that has package manager, with just single install of command line, your mysql will be ready. In Windows, the installer is really straight forward
- Not so much heavy, meaning it will not cost your computer memory or CPU usage, MySQL don't need that much of your computer resources
- Big community, so many technical, non technical document…

How to Launch Android Emulator Using CMD

Whenever you need an emulator either for development process of mobile app, or you just want to explore it. You can run mobile Android emulator from command line on windows, or terminal in Linux and Mac OS. Follow these steps below to launch mobile emulator from command line without opening Android Studio.

1. Make sure  ANDROID_SDK/emulator is in your environment path, this path contains emulator.exe

2. After adding the path, now open terminal and execute this commands
emulator -list-avds

Example output:
C:\Users\adam>emulator -list-avds Nexus_4_API_22
3. Now run the emulator with this command
emulator @Nexus_4_API_22

Note: Change according to your emulator name

Make sure you already have Android studio, it is already bundled with Android SDK, emulators and and the tools you need from creating a starter Android project (the project structure), writing your logic codes, designing the user interface, and compiling it to APK or AAB so you can upload and publish your app to Google PlayStore…

Cloud vs Dedicated Server Pros and Cons

If you are not deciding yet what type of server you want to choose, either you want to use Cloud service like Google cloud platform, dedicated server like Dedicated server from Namecheap. You can see these points of pros and cons, so maybe it can help you decided what type of service you want to use, for your development or production server.

Cloud is virtualized type of server, shared with many other tenants. Dedicated server or dedicated server is single tenant, the hosting provider giving you access to all the computer resources for you only.

Cloud pros - No need to set up your own server, the cloud provider will give you ready to use infrastructure
- No cost of building or maintaining the server
- Storage can be added as needed instantly, no need physical upgrade that can took time
- Managing the server can be initiated from anywhere, whatever device that have browser.
- Usually the cloud provider silently backing up your data, if somehow you do something wrong, you can request a…

How to Embed PDF in HTML Using PDFObject

Sometimes you have a PDF file that you need to display it to public, in modern browser like Google Chrome of course it have their default PDF reader, if you have a file contains PDF extension they will open it using PDF reader. But that reader is a full screen reader, meaning you can not put any of your HTML contents to display it side by side.

To just embed a PDF inside your HTML, you can do accomplished it by using PDFObject, you can see on this official website

1. Create a container to hold your PDF<div id="example1" style="height: 80vh; width: 80vw;"></div>
2. Tell PDFObject which PDF to embed, and where to embed it<script src=""></script> <script>PDFObject.embed("http://localhost/your-pdf.pdf", "#example1");</script>
Change the http://localhost/your-pdf.pdf with the location of your PDF file that you …

What is Bare Metal Server?

Bare metal server is a term to refer a server that is not in virtualization, so the Operating System is talking directly to the hardware, not using any virtualization medium. It is just to distinguished it from Cloud or VPS. For example if one VPS is down, it will not affecting the entirety of the real computer, it will just shut down that VPS instances, but the other VPS instances in the same computer is separated and will not be affected by that.

To manage bare metal server means you talked directly to the real physical computer resources such as disk, memory, network, etc with no filter. Switching off means it will also switch off your real computer power. It shortly means straight to the hardware.

It is now common to have a cloud server rather than bare metal server. I think bare metal is something in the past but not very relevant in the future, unless you have a big company that you really need privacy of your data pool, or much control of your infrastructure. But if you just s…

Datatables Custom Column Render Example Code

Column render in Datatables is use to display column data with special formatting, maybe you want to add some currency format, maybe you want to cut the string if it's too long, etc. If you are a fans of Datatables and don't know how to do custom column render, here's how.

$("#datatable").DataTable({ dom: "Bfrtip", buttons: [ "copy", "csv", "excel", "pdf", "print" ], "aoColumnDefs": [ { "render": function ( data, type, row ) { return data+ " - TEST" ; }, "targets": [4] } ], "processing": true, "serverSide": true, "ajax" : "http://localhost/data", });
So as you can see the codes above, aoColumnDefs property is the one responsible for column render. The render property will provide you with (data, type and row), you can d…

How to Make Money Online in 2020

This 2019 almost ended, and start a new year 2020, if you have a resolution to make money from the internet, or using media internet, you can try some of this options of you to start making money from the internet. Here's some ways people do to make money, there's lot of ways, but i will ranked it from the easiest to hard.

1. Start Youtube Channel You can start by creating a Youtube channel. Youtube is the easiest yet an effective way for lot of people to make money online. Many YouTube can make thousands of dollar in very short period of time, it is not scam, it is been proven by so many people on YouTube.

All you need to do is creating a video that people want to watch, not a trash or over produce videos. You can start even with your phone camera, talk about something you like, then upload it on YouTube, it's easy and simple.

It is not gonna be easy in the beginning of your channel, but keep going, keep making contents, give some values in it, give some values that make…

ERROR 1418 (HY000) at line xx: This function has none of DETERMINISTIC

This error occurred when you have to execute SQL file that contains function. i am trying to import SQL file using terminal like this:

mysql -u root -p1234 my_database < dump.sql

So there's many solution, when that error occurred. These 3 solutions for you solve this problem. I sometimes use the third one, because it do it permanently.

1. The first would be, when you dump into SQL file, please be always using command MYSQLDUMP, for example

mysqldump -u root -p1234 my_database > dump.sql

Always use that as the main dumping tool, using exporting tool for example from MySQL Workbench or Navicat, sometimes that dump file will not working in the importing process. Using MYSQLDUMP commands always work perfectly.

2. In the MySQL console, execute the following commands

SET GLOBAL log_bin_trust_function_creators = 1;

3. Edit the mysql.ini configuration file, and add this line, require MySQL restart

log_bin_trust_function_creators = 1;

That's all the three solutions i can provide.

How to Make Datatables Faster By Using Ajax

Here's how you can make a Datatables not loading all the rows in one page load, but rather doing ajax call per table page.

<html> <head> <title>Datatable</title> <link href="//"/> <script src="//"></script> </head> <body> <table id ="datatable"></table> <script> $("#datatable").DataTable({ dom: "Bfrtip", processing: true, serverSide: true, ajax : "http://localhost/data", }); </script> </body> </html>
Just simple as that actually, the hard thing you gonna do is on the Server side. In PHP you can check whatever $_POST and $_GET being sent from Datatables, you can get that information to do table filtering, paging, sorting, etc.
In a web desktop based software, displaying tabular data is one thing that we do almo…

JS Format Money Examples

Javascript don't have money formatting, while in fact almost all top languages don't have that kind of feature, even though this format is largely used in business software. Here's what i a usually use to do money formatting.

Number.prototype.format = function(n, x, s, c) { var re = '\\d(?=(\\d{' + (x || 3) + '})+' + (n > 0 ? '\\D' : '$') + ')', num = this.toFixed(Math.max(0, ~~n)); return (c ? num.replace('.', c) : num).replace(new RegExp(re, 'g'), '$&' + (s || ',')); };
To use it simply look at these examples:

(123000000).format(0, 3, ".", ","); //"123.000.000" (123000000).format(0, 3, ",", "."); //"123,000,000"(123000000).format(2, 3, ",", "."); //"123,000,000.00" (123000000.99).format(2, 3, ",", "."); // "123,000,000.99"
Problem with money format is that wh…

Call To Undefined Function curl_init() Error in PHP

This error maybe only occur in PHP 5.x, the best thing you need to do, if you have free time, is to upgrade your PHP version to the latest, PHP 7.3 version. There's lot of improvement, bug fixing that has happens since version to version 7.

If you want to use older version of PHP, no need to bothering upgrade, and just want to tackle this error in PHP 5 anyway, follow this 3 simple steps.

1. In PHP.ini uncomment php_curl
2. Add c:/php and c:/php/ext to your environment path
3. Restart Apache

Doing remote connection like API calling in PHP is not hard, PHP is one of the easiest language to learn. To make a remote remote connection in PHP, you can use cURL library, cURL is the simplest way you can use. You can also use file_get_contents, but with cURL you can not just only do GET requests but you can also do POST request using cURL.

Please if any error still appear, don't hesitate to post a comment.