I write code, I productize technology.
Truth can only be found in one place: the code. ― Robert C. Martin
Book Review: Fraud: Cybercrime Story
https://www.amazon.in/dp/B073ZFT1VR/ref=rdr_kindle_ext_tmb The book is a quick read at just over 81 pages. It’s a book that you would like to “Read In One Sitting”. The book has a story about Cybercrime, How fraud happens? What is real life, a serious effect of Cybercrime in our life? I like the writing style. the characterization is excellent. Especially the hero of the story Samyak. The book also has a social message. The Book is not only for the technical reader but also non-technical readers.
Golang: Serialize struct using gob: Part 1
Golang: Serialize struct using gob: Part 1 Serialize of the struct will help you to transfer data over network or it will help you to write data on disk. In a distributed system you generate data then serialize, compress and send. On other end you receive data then decompress, deserialize and process. The entire process must be fast and efficient. Go lang has it’s own serialize format called gob. Using gob you can encode and decode structure.
Golang gracefully stop application
Golang: Gracefully stop application To shutdown go application gracefully, you can use open source libraries or write your own code. Following are popular libraries to stop go application gracefully https://github.com/tylerb/graceful https://github.com/braintree/manners In this article, I will explain how to write your own code to stop go app gracefully Step 1: make channel which can listen for signals from OS. Refer [os.Signal] package for more detail. os.Signal package is used to access incoming signals from OS.
Golang: Send GCM - Google Cloud Message to Android Device
Assumption Go lang is installed in your computer Android sample application with GCM support Step1: Generate server API key for GCM, This article will help you to generate server API key: [https://support.clevertap.com/docs/android/how-to-find-your-gcm-sender-id-and-gcm-api-server-key.html] Step2: Install Go library for GCM $ go get github.com/google/go-gcm Step3: Write the following function in your main.go, replace server API key in the following function. You can provide multiple client tokens in “regIDs” in case, you would like to broadcast message to multiple devices.
Golang: Send Push Notification to iOS device
Assumptions Go language is installed in your computer iOS sample application with APNs support for testing Step1: Generate certificate PEM file. This article will help you to generate PEM [https://www.raywenderlich.com/123862/push-notifications-tutorial] Step2: Install Go library for APNs go get github.com/anachronistic/apns Step3: Write the following function in your main.go. Place certificate PEM file in config folder. You can change push URL as per your requirement. func SendPushToClient(pushText string,pushToken string) { fmt.
Go Language for Java Developers Part 4
Following keywords are reserved and may not be used as identifiers. Java Keywords Go Lang Keywords There are few obvious keywords like break, case, if, for, etc but few keywords are new in Go Language. func: To declare the function interface: To declare the interface (It’s different than Java’s interface) defer: something like finalise method in Java go: To create a thread chan: To do synchronised between threads var: To declare a variable range: It’s like an iterator in Java
Go Language for Java Developers Part 4
Variable: A variable is a storage location for holding a value. The set of permissible values is determined by the variable’s type. Java language has primitive type and objects, both have different syntax to declare a variable either Primitive type or Object type. Animal a = new Animal() Student s = new Student() Java is object oriented language so that we can have access modifier for variable declaration private int a public String b protected float c private Animal a In the Java we can declare a variable at many places like Local variable, Parameters, Class level, Instance variable.
Monolithic vs MicroService architecture
Monolithic architecture is something that build from single piece of material, historically from rock. Monolith term normally use for object made from single large piece of material. — Non-Technical Definition Monolithic application has single code base with multiple modules. Modules are divided as either for business features or technical features. It has single build system which build entire application and/or dependency. It also has single executable or deployable binary — Technical Definition Industry is using this approach since long to develop enterprise application.
Go Language for Java Developers Part 1
Go language is normally known as golang. It’s general purpose programming language developed at Google in 2007 by three Google employees namely Robert Griesemer, Rob Pike, and Ken Thompson. In November 2008 Google had announced Go Language to public and made it [open source]. Go language compiler is available for the Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Plan 9, and Microsoft Windows operating systems and the i386, amd64, ARM and IBM POWER processor architectures.
Go Language for Java Developers Part 2
Normally first program you write in any programming language is “Hello World”. Hello World is simple program which print “Hello Word” text on console / screen. Java: Hello World As Java Developer you can easily understand following code. No need to explain. correct ? package com.kpbird.gotutorial; public class Main { public static void main(String[] args) { System.out.println("Hello World"); } } To compile & execute above code, you need to write following two commands in the Terminal.