Posts

Develop Web Based Application Faster Using PHP

Image
Wordpress logo I’ve been developing apps using many different frameworks, across different languages, so I can tell you which one is best for building web based applications the quickest, simplest and easiest. For me PHP is the easiest way to build web based applications, you don’t need to compile the codes, you don’t have to use classes with long namespaces, etc.  And PHP is widely known, it’s actually very popular, so if you have some troubles while writing your codes, you can just do some quick search and find the answers right away.  Web based app using Wordpress If you just want to build a Web blog, company profile, no need complex business process, just using Wordpress is enough. Wordpress is not just a blogging platform, it can be much more complex than that. The way you do customization is by developing a custom plugin. Many developers in the Wordpress community already build themes, templates and set of complex features, for example for Ecommerce purpose, Inventory ma...

How To Create An Import Excel/Spreadsheet Data Using PHP, Laravel and Phpspreadsheet

Image
If you build a data management app using PHP and Laravel Framework, maybe you need to have a feature to import data from spreadsheet files. Follow these steps below. We are gonna create a user interface form to upload the spreadsheet file and then process the data and insert them into our database. 1. Database table schema for our data In this example we are gonna use an example with Users data, it can be Customers, employees or anything. Here’s an example of the table schema that we are gonna use in our database. 2. Spreadsheets template We must define a valid spreadsheet template, an Excel file with XLSX extensions, and a set of headers to guide our user to fill the cell in the correct order. Here’s an example. 3. Install the library We are using a library called phpoffice/phpspreadsheet, it’s available on composer, so simply using composer command to include the library into our project. composer require phpoffice/phpspreadsheet 4. Set routes to map a controller for our UI and data ...

Heroku Free Cloud Platform, Start Develop Your Personal Project For Free

Image
Photo by ThisisEngineering RAEng on Unsplash I’ve been switching my projects lately from a Bare Metal VPS Server to Cloud or Platform as a service kind of type, as it is much more simpler, all i needed now is to focus more on the codes and the business logic, not on the infrastructure. As you may already know if you follow Tech news, people nowadays talk a lot about Clouds. And that’s why there's so many companies trying to compete as a cloud provider.  So now, we have many options to choose to deploy our project for the public user much faster because of the Clouds.  I see big companies like Google, Amazon, Alibaba and so many I can't mention offering Cloud. Some of them offer unlimited trials, but with limitations in storage and bandwidth. For hoby or individual projects, it’s okay to use free trials since we didn’t have any customers yet, we wouldn’t need so much resources in our cloud. Heroku Cloud Heroku is one of my favorite cloud providers. I've tried Google Cloud, b...

The Internet Distractions We Face Day To Day

Image
Photo by Charles Deluvio on Unsplash Because I often get distracted by many things when I am in front of the internet, I've been thinking why this happens to me? Or if it also happens to you, then why does it happen to us? So why were we distracted? It is because as our brains evolved and became large and complex, and the easiness of information we can get from the internet, we are thinking about many things simultaneously, we want to improve this, improve that, basically everything, and it’s not wrong, that’s how we human species survive until this moment.  Our survival mechanism requires us to improve ourselves day by day, so we must learn new things in order to survive, we must be the smartest and the strongest in order to survive and to pass our genetics to our offspring. Also as we grow into adults, day to day, we face different people each time, and we face many problems too, and if we want to solve that problem, we need to learn how to solve it. What is most effective to min...

Notice: Undefined index: name in test.php on line 3 Error On PHP 7

Image
Photo by  KOBU Agency  on  Unsplash Writing a PHP application is so simple and fun because the PHP is interpreted, you don’t need to compile first your program to run it. As soon as you save the project file you are working on, you can just execute from the browser. Consider this PHP file named test.php below <?php $array = array(); echo $array['name']; For really beginners PHP Programmers, some little error warning can be frustrating because most of them don't know how to handle and overcome the error. The error Notice: Undefined index: name in test.php on line 3 from the code above is telling you two possible situations: the variable doesn’t have the name key, the variable is empty, so it doesn’t the name key Solution Before accessing a variable key that may not exist, or the array itself is a Null or empty, you can first check the availability of the key using the EMPTY function. From the code example above that shows error notification, you can fix the problem so...

Blogging is hard, writing content for public readers is really hard, consistency is the key

Image
Photo by  Caroline Attwood  on  Unsplash When I was in High school and learning for the first time about creating a website or blog, I really enjoyed designing and writing on that blog which I lost.  It's a fun activity when you are doing the thing that you really like, for me working with a computer is the thing that I am very good at and enjoy spending time with.I am kind of introverted and have very few friends, so the outside world is not attracting me. Now I have grown up and blogging is not just a hobby anymore. Somehow I need to make a living because the job I currently work in is really not enjoyable. Then Blogging becomes less fun and somewhat intimidating.  Writing content for public readers is really hard, you are forced to have one level of knowledge above your readers, if they find you somewhat incapable of your writing, they’ll just leave and without recurring visitors, your number of visitors will be very limited. It’s a lot harder writing as an...

Tree Traversal in Java using Visitor pattern and For loop Example Codes

Image
Java Oracle Writing codes in Java is supposed to be reusable, it means that your code can be reused by yourself and other people working on similar things you do without rewriting the same code block  over and over. This is an example of object oriented passion on how you can use an object that could possibly have infinite children. You can use this class so you don’t need to write a loop over and over. Firstable given data person with children and grandchildren below. Now we can use for loop and visitor pattern to visit all the children recursively. 1. For loop The first example is a usual, easy to understand Example of how you write a Recursive method to visit tree traversal children using for loop. Using for loop is really really simple but Somewhat looks not an elegant way, and it could lead into bugs if you misplace variables before and after calling the recursive method. When the code gets bigger it becomes a mess. 2. Visitor Pattern And here’s the Object oriented way, usin...

Java Map And Filter, A lambda or anonymous expression example

Image
Java lambda expression  It’s been a while since JDK 8 release, since that version of Java the language, it adopted many new nicer syntax, the one that i love is the Lambda expressions.  Lambda or anonymous function can make you write in a nice looking functional one liner code, for example below is a Java way of looking for keywords if they match in an Array, true if match and false otherwise. //given array List<String> words = Arrays.asList( "foo", "bar", "cool" ); //check if 'cool' exists boolean isCool = words.stream().anyMatch(word -> word.equals("cool")); 1. Map Map objects to another value as specified by a Function object, example below to Reduce List of object Person, to just List of person names. 2. Filter Filter objects that match a Predicate object. Example below is an example to filter people with certain age. import lombok.Data; import java.util.Arrays; import java.util.List; import java.util.logging.Logger; import j...

How to Develop Intellij Plugin Part 1 - My First Time Experiences To Develop Plugin

Image
It is fun to develop a plugin for Jetbrains IDE platform, you know Intellij, PhpStorm, Pycharm and the like. As you may already know, Intellij is one of the smartest IDE in the world, especially for Java and Kotlin and frameworks like Spring. I believe it's their main concern.  If you are using Spring, Intellij will act so smart to detect any bugs you may introduce in your program, giving you completion, symbol references, even recommendation for the best possible code it might be. If you are not a Spring user, maybe because your company you work at doesn’t like it, or they are just happy with the framework or even language they already use, and Intellij doesn’t support it, then you may need to create your own plugin. Intellij provides an API for you to work on your framework or even your own language that they didn’t have support on, The API is i believe complete enough to get things done the way you want to, but the lack of documentation makes it really hard to get things fast, s...

Start Using Docker Great Video Tutorial For Beginners

Image
docker logo It’s not gonna be a post about a testimonial or using Docker as an expert docker user, contrary i don’t even know how to use it, i am just starting to use it. So there will be no useful tips or tricks provided on this post about docker. It's been a while since i've first heard about Docker, i tried to use it several times but didn't get any reason on what is docker can be used for, then i uninstalled it, and reinstalled it many many times, still not getting any idea how useful docker is. Then I watched a really good presentation about Docker, this is the most basic Docker that made me amaze how cool docker is. Here’s the link of the video. I am still kind of unsure how to properly use docker though, because my software development career is usually not involving something like a mission critical system that we need to care about hardware level, and also the language and the platform i am mostly used like Java is already handling the cross platform part. Docker h...

How To Start PHP Storm Plugin Development For The First Time

Image
Phpstorm version 2020.1 I was impressed by how smart Intellij IDEA and other jetbrains IDE products can be. If you use a framework, library or tool that the IDE doesn’t support, they also provide you with an API to develop your own plugin to support that framework or tool.  Problem is, it is not as easy as flipping your hand. In fact it’s pretty much night mare, because the lack of documentation and also plugin development is usually a very complex thing, that sometimes your framework that you want to develop the plugin is radically different from the simple example they provide, so you need to figure it out yourself. Recently I learned to develop a PHP framework plugin for PhpStorm, the framework is called Codeigniter. The framework is pretty much popular in the PHP world although kind of old and irrelevant to modern web application development using PHP compared to Symfony or Laravel. But I decided to keep going and with spirits in mind that if anyone can then i’ll learn in the e...

What current level of Artificial Intelligent do we have today?

Image
Shirt Without Stripes Queries AI or ML is probably the hottest tech jargon in current development of technological advancement. From individuals to large corporations they put so much effort into this field to invent some kind of sophisticated robot that, so advanced that they can learn by themselves, we just need to program their brain, and feed them some initial data and then their algorithm will do the rest. AI has been used by major tech companies like Google, Amazon and Microsoft for their and user products. they made their own AI system themselve, it so far works but probably far from perfect. I read hacker news today and found at the top list titled Shirt Without Stripes , which basically shows some flaws from the current AI system used by the company I mentioned above, their neural system is still for some queries that didn't work. They may be really good at some queries but there are still  many flaws so they can’t understand the word 'Without'. I tested it myself ...

Difference Between Windows 10 Home Pro and Windows Enterprise

Image
Windows 10 wallpaper Windows 10 is my favorite OS, why? firstable because it is the most widely used operating system, so for example application or game developers will likely target Windows as their target user because it has big users. So Windows has lots of programs that sometimes other OSes don't. That the main reason, the second reason is, because i've been using Windows as my main Os for very long time, along the way i learn how to customize the Os (not really customizing the core part, because unlike linux, windows is very much commercialized, you get what microsoft give). By customize i mean just deliberately keep programs that only useful for me, remove if they are just consuming my computer resources. So now I have almost full control over my computer. Not to be bragging, but i know many aspects of window OS, like what is services, command lines, etc. I don’t really know that much, but enough for me to stick to the OS. There are three main branches of Windows 10, t...

Popular posts from this blog

How To Create Phpinfo to List What PHP Configuration Have

Coding On Your Android Phone Using Termux

How to Install Microsoft Office on Your PC: A Step-by-Step Guide