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

SEARCH KEYWORD -- GitHub



  Understanding How is Data Stored in RDBMS

We all know that DBMS (database management system) is used to store (a massive amount of) data. However, have you ever wondered how is data stored in DBMS? In this post, we will focus on data storage in RDBMS, the most traditional relational database systems. Physical Storage Data can be stored in many different kinds of medium or devices, from the fastest but costy registers to the slow but cheap hard drives, or even magnetic tapes. Nowadays, IaaS providers such as AWS...

   RDBMS,DATABASE     2019-02-04 09:25:36

  The war with spam comment

Spam comments are annoying and notorious. They are either malicious data from hackers to exploit the loopholes of the site or advertisements posted by robots. These kinds of comments have their own features and patterns, if we are careful enough, we can find ways to block most of them although it's not so easy. To block the comment with malicious executable codes such as JavaScript, we should remember one rule : never trust user input. So wherever there are user inputs, we need to check the vali...

   Spam comment,Block,Filter     2013-11-29 20:29:43

  Time to think about supporting max/min functions for integers in GoLang

Sometime back we wrote a post explaining why there is no max/min function support for integers in GoLang, one of the reasons is that no overloading is supported and the function name has been used for other numeric types float64. To solve this problem and make max/min function support integer as well, either GoLang should support overloading like in Java or the same set of functions need to be created in a different package other than standard math. These don't look like good options as overload...

   MIN,MAX,GENERICS,GOLANG     2021-07-24 03:14:42

  jQuery 2.0 gives up IE 6/7/8

jQuery 2.0 is released after 10 months development. jQuery 2.0 is customized for modern web browsers and also considers about mobile devices. But one big change is that jQuery 2.0 will not be  compatible with old versions of IE and its size is 10% less than the version 1.9.1. The execution efficiency is higher as well. jQuery 1.9.x will still be maintained by jQuery team, they will also provide update for it. Those websites which want to be compatible with all browsers should not upgrade to...

   jQuery 2.0,IE support     2013-04-20 07:58:16

  Gracefully exiting from console programs in Ruby

Imagine you write a CLI program or a Rake task which loops through some data performing some work on it. You run it and then you remembered something. You’d love to kill the process with ctrl-c, but that will raise an exception somewhere in the loop. What you want is for the iteration to complete and then you want the program to quit. You could handle the Interrupt exception or add some conditions. But how about a cleaner and reusable way? No problem - you can trap signals, which...

   Ruby,Exit,Command window,Console,Graceful     2012-03-14 13:42:16

  Stub Mixlib::ShellOut and shell_out in Ruby unit testing

Unit testing is part of software development to ensure the tiny component of a function can work as designed. Different frameworks and tools can be used to run unit testing for different programming languages. In Ruby, one popular unit testing framework is Rspec, or Chefspec if you are writing Chef recipes. While writing Chef recipes, some low level commands(DOS commands or shell commands) need to be executed on the managed resource to perform actions or gather information. For example, lis...

   RUBY,UNIT TESTING,RSPEC,CHEFSPEC,SHELL_OUT     2016-11-11 00:14:46

  Publish Your Go Package on pkg.go.dev

go.dev is a site where various resources for Go developers are shared, such as “Get Started”, Tutorial, Packages (pkg.go.dev), and all the official blogs. Among them, Packages is where I visit most, which allows free access to all the open-source Go packages submitted by communities including the native Golang packages. Thanks to all the contributors, I enjoy the great benefit, and sometimes I want to be a contributor myself. Let’s submit a “complete” package t...

   GO.DEV,PUBLISH PACKAGE,GOLANG     2022-06-12 00:31:20

  Designing Great API Docs

Writing documentation is one of those things that is dreaded by many developers. It takes a lot of effort and time to get right. And too often, people take shortcuts. This is sad, because well designed documentation is the key to getting people excited about your project, whether it's open source or a developer focused product. In fact, I argue that the most important piece of UX for a developer product isn't the homepage or the sign up process or the SDK download. It's the API documentati...

   API docs,Design API docs,Advice     2012-03-09 23:15:00

  Why I switched from Ruby back to C++

After two months of Sol Trader development in Ruby, I took a difficult decision last Wednesday morning: I’ve decided to rewrite the game code from scratch in C++. Let me explain my reasons. If you'd like to receive announcements about Sol Trader or be part of the beta program, sign up at soltrader.net. Why I did it Slow frames: When working with Ruby, I use the excellent Gosu library to do all my game specific coding. This initially worked great, but occasionally I’d just...

   C++,Ruby,Advantage,Feature     2012-01-09 08:56:21

  Our Go Cache Library Choices

In Build a Go KV Cache from Scratch in 20 minutes, I walked you through what matters when writing a local cache, and eventually implemented one, whose performance was beaten badly by that of the popular go-cache on Github though. However, the bright side is that we can learn a lot from those excellent Github Go cache products, studying their features, applicable scenarios, and implementations, and extracting what we need. In this article, I will mainly analyze and compare the four...

   GOLANG,CACHE,GO-CACHE,BIGCACHE,GOURPCACHE     2022-04-16 07:48:11