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

SEARCH KEYWORD -- GitHub



  Connect to SQLite using Go on Windows

In software development, it's often necessary to test and validate logic using a lightweight and easily manageable database system. SQLite, with its minimal setup and zero configuration requirements, is an excellent choice for such scenarios. Leveraging the simplicity and efficiency of SQLite for testing purposes can significantly streamline the development process. In this guide, we'll explore how to seamlessly connect to SQLite using Go on Windows, empowering developers to efficiently test the...

   WINDOWS,TUTORIAL,GOLANG,SQLITE3     2024-02-11 20:58:12

  ScrollerJS vs Odometer

Both ScrollerJS and Odometer are two JavaScript libraries to transition one number to another number with animation. They provide user a fancy animation about scrolling numbers. These libraries can be used in many scenarios such as user statistic counter, timer or odometer. This post is going to have a comparison on these two open source libraries. Below is a table which lists the features the two libraries have: Feature ScrollerJS Odometer Language JavaScript and CSS JavaScript and CSS S...

   JavaScript, Odometer, ScrollerJS, Open source, CSS Transition     2015-05-13 02:10:55

  Implement struct no copy in GoLang

There is some case where some of the struct in GoLang which is not meant to be copied. For example, sometimes a global configuration which should have only one version passed around the whole application and should not be copied and modified. In GoLang, there is no intuitive solution on preventing copying of struct. But there is still some way which can be leveraged to help prevent this while developing the code. The trick is to define some struct implementing sync.Locker interface and has this ...

   GO VET,NOCOPY,NO COPY     2020-09-04 22:24:58

  Use Delve to debug GoLang program

If you don't know how to debug program, you are not a real programmer. gdb can be used to debug go program, but according to golang website, delve is a better option.   Note that Delve is a better alternative to GDB when debugging Go programs built with the standard toolchain. It understands the Go runtime, data structures, and expressions better than GDB. Below is a simple go program. package main type Person struct { Name string Age int } func main() { var me Person me.Nam...

   GOLANG,DEBUG,DELVE     2018-11-09 23:28:43

  Fix 'this authentication plugin is not supported' issue while using Go to connect MySQL 8

MySQL 8 has changed its default authentication plugin from mysql_native_password to caching_sha2_password to improve its security. However many third party libraries seem act slowly to catch up with this change. This causes some compatible issues with their connection to MySQL. One of the issues is seen in Go libraries while it's trying to connect to MySQL 8. The specific error has been observed is "this authentication plugin is not supported". The root cause of this issue is that the go-sq...

   MYSQL,GO,MYSQL 8,AUTHENTICATION PLUGIN     2018-07-11 08:55:02

  Clojure & Java Interop

About a year ago I got a phone call asking if I wanted to join another team at DRW. The team supports a (primarily) Java application, but the performance requirements would also allow it to be written in a higher level language. I'd been writing Clojure (basically) full-time at that point - so my response was simple: I'd love to join, but I'm going to want to do future development using Clojure. A year later we still have plenty of Java, but the vast majority of the new code I add is Cloj...

   Java,Clojure,Interoprability,Commit,Function call     2011-12-29 09:11:22

  What's on your Learning List?

How do you track and decide what topics you want to spend time learning? For a while, I didn’t have a real good solution. Something would trigger me to remember “Oh yeah! I really wanted to learn more about that”. I would spend the evening doing busy learning - it seemed like I was learning but I really wasn’t. Instead of trying to do Deliberate Practice, I’d fool myself into thinking I was investing my time wisely by reading blog posts and examples but no...

   Learning list,Conscious,Study,Programming     2011-12-05 12:44:39

  Redis Cluster and Common Partition Techniques in Distributed Cache

In this post, I will discuss a few common partition techniques in distributed cache. Especially, I will elaborate on my understanding on the use of Redis Cluster. Please understand that at the time of writing, the latest version of Redis is 4.0.10. Many articles on the same topic have a different idea from this post. This is mainly because, those articles are probably outdated. In particular, they may refer to the Redis Cluster implementation in Redis 3. Redis Cluster has been improved...

   REDIS,DISTRIBUTED CACHE,CLOUD COMPUTING     2019-01-17 08:10:37

  Inspiring facts about JavaScript

JavaScript has been advocated as the first language to be learned by people who want to program. We have discussed the reasons why we should do so. Recently with the popularity of Node.js, JavaScript has become a full-stack language,  it can be used as both frontend and backend programming language. Today we will give some hard facts which will convince you about the popularity of JavaScript. Just like William Ting said ""JavaScript will stay relevant as long as people use the internet". Ye...

   JavaScript,popularity     2014-06-07 08:52:36

  How the Go language improves expressiveness without sacrificing runtime performance

This week there was a discussion on the golang-nuts mailing list about an idiomatic way to update a slice of structs. For example, consider this struct representing a set of counters. type E struct { A, B, C, D int } var e = make([]E, 1000) Updating these counters may take the form for i := range e { e[i].A += 1 e[i].B += 2 e[i].C += 3 e[i].D += 4 } Which is good idiomatic Go code. It's pretty fast too BenchmarkManual 500000 ...

   Go,Expressiveness,Performace,Sacrifice     2012-02-12 04:53:55