Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- DEBUG



  C++ and Java over Python in Google products

In Google, most of the products are written in C++ and Java. They usually don't choose Python to write their product stack. What's behind the decision to choose one language over the other in Google? Let's get to read some opinions from Robert Love, a Google software engineer. Love said he couldn't imagine writing let alone maintaining a large software stack in Python. They use C++, Go, and Java for production software systems, with Python employed for scripting, testing, and tooling.There are a...

   Java,Python,Google     2014-07-20 04:39:09

  Which one cost more in development : Android vs iOS

As for which platform has more development cost, there are many different views. Using Android we no need to spend money on an expensive Mac computer, iOS test machine and $99 year fee for each developer account. While developing iOS apps does not require much testing, screen adaption, debug and script compatibility considerations. Let's see a few views shared by some developers. Nan Li, ERP/SAP/Mobile network/Japan/Apple/KKK@ifanr Because of the performance of iOS, it actually has domina...

   Android,iOS,Development cost,Comparison     2012-03-23 13:39:48

  A Sip of Go Log

Logging is indispensable in any code that we need its support both in debugging and in statistics. However, a package that filled withfmt.Println/fmt.Printf printing various messages can never be considered a read-to-be-adopted package, which can be optimized by a simple change, using Golang’s native log package to print information to standard output or to a file. Then, how to apply the log package? Are there any limitations? If so, can we seek open-source packages? Let&rsq...

   GOLANG,LOGGING     2022-06-16 05:43:24

  SSH Security and You - /bin/false is *not* security

Backstory While at RIT around 2004 or 2005, I discovered that a few important machines at the datacenter allowed all students, faculty, and staff to authenticate against them via ssh. Everyone's shells appear to be set to /bin/false (or some derivative) on said machines, so the only thing you'll see after you authenticate is the login banner and your connection will close. I thought to myself, "Fine, no shell for me. I wonder if port forwarding works?" ...

   Linux,Security,/bin/false,SSH     2012-02-06 07:46:29

  How does GoLang know how many CPUs to use?

When running lscpu command on Linux, it will list the CPU info on the machine. Take one example where there is one CPU with 2 cores and each core has two threads which indicates there are 4 cores available. Now let's see how many cores GoLang program would identify. From output, NumCPU and GOMAXPROCS both output 4 which is expected. How does go runtime get this info, does it get it through similar command like lscpu or /proc/cpuinfo? Let's dig more in GoLang's source code. In runtim...

   GOLANG,CPU,NCPU     2020-12-29 23:22:15

  A simple tutorial on GoLang connecting to Clickhouse

Go, also known as Golang, is a statically-typed, concurrent programming language created by Google. ClickHouse is a high-performance, column-oriented database management system that can be used for real-time data analysis. This tutorial will provide a deep dive into how to connect to ClickHouse from a Go program, including how to perform common database operations such as SELECT and INSERT statements. Before proceeding, it is assumed that you already have Go and ClickHouse installed on your mach...

   GOLANG,CLICKHOUSE,TUTORIAL     2023-02-11 07:05:36

  What and what not to log while debugging

Log is a critical part of an application. It serves as an eye to the programmer on how the application is working while debugging. Especially for applications running on production environment, if the application encounters problem and the problem cannot be reproduced on other environments, log will be extremely useful. While log is essential, but developers have to log smartly. Because if don't put log smartly, you may not get what you want while debugging or you may get too many...

   PROGRAMMING,DEBUG,LOG,SUPPORT     2016-03-14 08:09:03

  How big are PHP arrays (and values) really? (Hint: BIG!)

Upfront I want to thank Johannes and Tyrael for their help in finding some of the more hidden memory usage. In this post I want to investigate the memory usage of PHP arrays (and values in general) using the following script as an example, which creates 100000 unique integer array elements and measures the resulting memory usage: <?php $startMemory = memory_get_usage(); $array = range(1, 100000); echo memory_get_usage() - $startMemory, ' bytes'; How much would you expect it to ...

   PHP,Array,Memory occupation,Garbage collection     2011-12-16 10:06:04

  Add compiler argument to build Maven project

Maven is a software project to manage a project's build, reporting and documentation from a central piece of information. It's now widely used t build and deploy projects. It can help automatically maintain the dependencies of projects. There is a central project configuration file named pom.xml. Here you can configure the project you want to build.  In this post, we will show you how to add compiler argument when using javac to compile Java source code. Sometimes we need to pass compi...

   Maven,compiler argument, compiler option, Java 8     2015-04-10 21:59:00

  A journey to investigate a goroutine leakage case

In Go, creating goroutines is straightforward, but improper usage may result in a large number of goroutines unable to terminate, leading to resource leakage and memory leaks over time. The key to avoiding goroutine leaks is to manage the lifecycle of goroutines properly. By exporting runtime metrics and utilizing pprof, one can detect and resolve goroutine leakage issues. This post will go through one real case encountered by the author. The author maintains a service that connects to a targe...

   TIMEOUT,SSH,GUIDE,DEBUG,LEAK,GOROUTINE,PPROF,GOLANG     2024-03-16 11:00:23