5 Misconceptions Web Developers Believe About Mobile App Development

Last updated on October 29, 2020

Mobile apps have emerged as a competitive alternative to websites. Although websites are still irreplaceable parts of digital presence for business brands, mobile apps have been forcing them to change. The emergence of Progressive Web Apps (PWA) showcases this shift.

In spite of this overwhelming popularity of mobile apps, many web developers still hesitate to improve their skills and extend their focus on mobile app development. What misconceptions the web developers mostly harbor regarding app development? Well, this is what we are going to explain here.

Continue reading

CatchingFileNotFoundError? Watch Out!

Last updated on October 3, 2020

In Python,FileNotFoundError is an exception that is raised when a requested file does not exist. Many people assume that when their programs fail to open a file in read-only mode or delete a file,FileNotFoundError must be raised and they should only need to process that. For example, some people would write code similar to:

def process_file(path):    import sys    try:        f = open(path, 'r')  # or os.remove(path)    except FileNotFoundError as e:        print(f"File {path} not found!", file=sys.stderr)        return    # process the file...

However, this code may actually trigger unexpected errors. The reason is that, the failure to open a file in read-only mode or delete a file is not necessarily caused by the non-existence of the file. Very often, it's for different reasons: insufficient permission, or the file is a directory. In this case,PermissionError orIsADirectoryError would be thrown instead ofFileNotFoundError. So, in the example above, one would want to catch all of them:

Continue reading

What Is Mobile App Architecture? — Key Considerations to Build Great App Architecture

Last updated on October 1, 2020

For any business, while building a mobile app it is the priority to create apps for reaching their target audience with ease and optimize the app for this specific audience. But among the millions of apps that populate the Play Store and iOS App Store, perhaps only a few thousand can claim to be perfect in terms of user experience and unique value proposition: Many of the vast majority of apps that just fill up app marketplaces without contributing any substantial value is made up of less reliable architecture. Hence we are here to explain what mobile app architecture does, different types of app architecture and the ways to build them.

Continue reading

Learning Casting in Java

Last updated on August 25, 2020

One of the most renowned programming languages at present is Java. Furthermore, Java application development continues to be a lucrative source of income for many people who are into the tech industry. The language is used to create web platforms and web apps, designed for flexibility, which enables developers to write code that runs on any machine, whatever the platform or architecture may be. Billions of computers and mobile phones throughout the world run Java.

What is Java Casting?

Casting, a process of creating a variable as a variable to another type. Software and app developers are aware of the rapid pace of industry requirements. Nonetheless, some instruments continue to remain significant even in times of regularly fluctuating trends. Undoubtedly, Java is the best choice nowadays for software programmers and developers for many reasons.
With Java casting, if a class shares anIS-A or an inheritance relationship with another interface or class, the variables could be cast to the type of each other. There are times that the cast is permitted and at times not allowed. This is because some of the cast won’t show any error at compilation time but would fail during runtime.

Continue reading

Makefile Template for a Shared Library in C (with Explanations)

Last updated on October 28, 2019

tl;dr: Save the following file asMakefile and change the source files to the ones that you intend.

# Makefile template for a shared library in C# https://www.topbug.net/blog/2019/10/28/makefile-template-for-a-shared-library-in-c-with-explanations/CC = gcc  # C compilerCFLAGS = -fPIC -Wall -Wextra -O2 -g  # C flagsLDFLAGS = -shared   # linking flagsRM = rm -f   # rm commandTARGET_LIB = libtarget.so  # target libSRCS = main.c src1.c src2.c  # source filesOBJS = $(SRCS:.c=.o).PHONY: allall: ${TARGET_LIB}$(TARGET_LIB): $(OBJS)$(CC) ${LDFLAGS} -o $@ $^$(SRCS:.c=.d):%.d:%.c$(CC) $(CFLAGS) -MM $< >$@include $(SRCS:.c=.d).PHONY: cleanclean:-${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d)

The above code snippet is also available onGitHub gist.

Continue reading

Pitfalls in Using a Standard “Global” C++ Function: Its C Counterpart May Be Camouflaging

Last updated on September 30, 2019

A large number of C++ functions in the standard library are extended from standard C functions, such asqsort(),memcpy(), etc. Among these functions, many have overloaded their C counterparts. For example,abs() in C++ is overloaded for both integral and floating-point types, while it is only defined forint in C. These functions, however, are often unwittingly misused as global functions and produce unexpected results.

Continue reading

Pros and Cons of Automated Machine Learning

Last updated on January 14, 2020

Machine Learning is nothing but one of the subdomains of science that deals with computers or applications that are not explicitly coded to perform the task. The combination of machine learning, cognitive technology, and AI will make a lot more smooth the processing of big chunks of data and information.

Machine Learning is an application of AI (Artificial Intelligence) which ables the machines or software to adapt, learn from itself, provided the data is resourceful and sensible. Simply saying the efforts are implying to developexpert systems.

Mainly we have three categories of machine learning:Supervised Learning,unsupervised learrning,reinforcement Learning.

Since it delivers at a faster rate with better and more accurate results, machine learning is brought into practice. The engineers work day and night to predict, classify, cluster the data. The player Machine Learning is sent on the pitch of data, and Big Data to handle the problems.

Continue reading

Automatically Conceal Sender’s IP Address in Email Clients via SSH Tunneling

Last updated on May 5, 2021

Desktop email clients, such asThunderbird andClaws Mail, are preferred over their web counterparts by many professionals and power users due to their additional convenience and security. However, one big downside is that they often expose the sender's IP address to the receivers, since many SMTP servers record the sender's IP address and put it in the header, something similar toReceived: from [xxx.xxx.xxx.xxx] (my.example.com. [xxx.xxx.xxx.xxx]). This, unfortunately, puts the sender's privacy in great jeopardy, as an IP address can reveal so much information including location, ISP, and institution names.

To address this issue, one simple solution is to let the email client connect via a proxy. While a system-widely available proxy works for many users, some of us just want our email clients, but not other programs, to go through a specific proxy. In this post, I'll demonstrate how to use an email client automatically via SSH tunneling. The instructions are specifically tailored for GNU/Linux and MacOS users, as it involves some uses of UNIX commands and bash scripts; if you are on Windows, you can still follow the instructions with the help ofCygwin.

Continue reading

Nikola: How to Deploy Compiled Webpages to a Different Git Repository

Last updated on November 18, 2018

Nikola is one of the most popular static website generators. It compiles source files into final publishable webpages offline and then uploads those files to a web host. Compared to dynamic websites such as those powered by PHP or Ruby on Rails, static websites offer better security and faster page loading.

Nikola provides some utilities to ease the deployment procedure (i.e., uploading compiled webpages), especially for deploying as GitHub pages. Unfortunately, Nikola does not (andits team does not plan to) provide a direct way to deploy the compiled webpages to a git repository that is different from the one that hosts the source files. This is often useful when you want to hide the source files in a private git repository and leave the git repository that hosts the compiled webpages public. Luckily, Nikola provides customizable deploying commands. Assumingoutput is the directory where the compiled webpages are located, change the value ofDEPLOY_COMMANDS using the following inconf.py (replaceme@example.com with your email address,https://xuhdev@github.com/xuhdev/xuhdev.github.io.git with your designated git repository on GitHub/GitLab/BitBucket/etc., andmaster with your designated branch):

DEPLOY_COMMANDS = {    'default': [        "cd output && git init && git config user.email me@example.com && touch .nojekyll && git add .",        "cd output && git commit -a -m 'Nikola'",        "cd output && git push -f https://xuhdev@github.com/xuhdev/xuhdev.github.io.git master",    ]}

Now runningnikola deploy should deploy the compiled webpages to your designated git repository and branch.

Technology is not Everything: Non-Technical Aspects to Consider for Open Source Projects

Last updated on November 21, 2018

Open source software, also known as free and open source software (FOSS), free, libre, and open source software (FLOSS), andfree software,has become more and more popular these days. When starting a new open source software project, we developers tend to think mostly on the technical side of this project, e.g., what programming languages and frameworks to use, how to design the architecture of the software, what platforms to target at, etc. We not only think, we actually think about these really carefully: We look around for advice, struggle in our mind, and, sometimes, even after years,we still argue that we should rewrite the software in a different programming language. On the other hand, we often take the non-technical side too light without much thinking: We use a specific source code hosting service simply because everyone else uses it, we use a specific license simply because this is the only license that we are able to read through once and (vaguely) understand, etc. These decisions, however, will heavily affect the style, the advancement,or even the survival of our open source software projects.

This post aims at draw developers' attention to non-technical aspects of open source software projects. We will have a brief overview of some non-technical aspects that can be important in open source software projects (while more aspects and details can be further discussed in the future).

Continue reading