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

SEARCH KEYWORD -- Module focus



  Different module types in Java 9

Java 9 is going to introduce a disruptive change to the Java platform -- Module System. The module system will change how Java applications work in the future. It's like changing the foundation of a house without impacting the house functionality and its top level structure. This obviously is a big challenge for the whole Java community.  To bring as little pain as possible to migrate existing applications to Java 9 without refactoring the whole application, Java 9 will introduce a few diff...

   JAVA,JAVA 9,JIGSAW,MODULE SYSTEM,UNNAMED MODULE,AUTOMATIC MODULE,NAMED MODULE     2016-04-15 07:15:23

  How to handle ES6 modules in NodeJS

In modern JavaScript, there are two types of modules: ES6 module and CommonJS module used by NodeJS. These two types of module are not compatible. Many people would wonder how to load ES6 modules in their NodeJS project. This post will show how this can be done. Difference The syntax of the module being loaded is different. CommonJS modules are loaded with require() and exported with module.exports. ES6 modules are loaded and exported using import and export respectively. Merchanismwise require(...

   NODEJS,COMMONJS,ES6     2020-08-28 22:01:33

  About go get and go install in Go 1.16

Go version 1.16 beta1 has been released on 18 Dec 2020, major features of Go 1.16 have been finalized with this beta release. Many people are discussing about the support of Apple M1, however, this post will not cover this topic. Instead the focus will be on go get and go install changes. There are lots of changes related to modules in Go 1.16, the details can be found in the release note. Below are some of the key highlights. GO111MODULE is on by default, if wanna keep old behavior, needs...

   GOLANG,GO 1.16,GO INSTALL     2020-12-26 00:26:58

  The 7 stages of refactoring

You have wanted to fix that module for ages. Just one look at it and you cringe. The documentation, the weird naming of functions, classes that are just plain weird. The module hobbeles along, but it is just plain dirty. The real programmer in you cringe, and when there finally is some time to refactor the module, you jump at it. Step 1 - Desperation  So you start to have a real good look at what you need to. Fix a class here, rename a few functions there, tear out a few function...

   Refactoring,Software,Desperation     2011-08-16 08:35:57

  A Peek Inside the Erlang Compiler

Erlang is a complex system, and I can’t do its inner workings justice in a short article, but I wanted to give some insight into what goes on when a module is compiled and loaded. As with most compilers, the first step is to convert the textual source to an abstract syntax tree, but that’s unremarkable. What is interesting is that the code goes through three major representations, and you can look at each of them. Erlang is unique among functional languages in its casual scop...

   Erlang,Peek,Erlang compiler     2012-02-08 10:12:04

  In-depth Exploration of Direct and Indirect Dependency Management in GoLang

The dependency management in Golang is handled using go mod. go mod is the official dependency management tool introduced by the Golang team. It assists developers in managing project dependencies to ensure the stability and maintainability of the project code. In go mod, dependencies are categorized into two types based on how packages are imported in the code: direct dependencies and indirect dependencies. Direct dependencies are explicitly referenced in the project code, while indirect depend...

   MODULE,GO,DIRECT DEPENDENCY,INDIRECT DEPENDENCY     2023-12-09 05:34:25

  HTTP Server development resource summary

This article summarizes some materials, articles and books I used when learning HTTP Server development. Hope this will help you. RFC and standard documents RFC2616 – Hypertext Transfer Protocol — HTTP/1.1 HTTP protocol standard document, it's an essential reference document for all personnel engaged in the development of the HTTP-related projects, careful study is recommended. RFC793 – TRANSMISSION CONTROL PROTOCOL TCP Protocol standard document The WWW Common Gateway Interfac...

   HTTP Server,Book,Article     2012-09-25 22:46:56

  Start to work with rollup.js to pack JS files

rollup.js is a module bundler for JavaScript. It compiles small piece of JavaScript modules spreading in different files into a single larger standardized ES code file. This post will show some entry level usage for this library. Introduction Normally a bundler tool would compile a few small JavaScript files into a single JavaScript so that web browser can read, parse and render it properly. A bundler tool may be needed because of a few reasons: Some early stage browsers don't understand module...

   ROLLUP.JS,COMMONJS,ES MODULE,BUNDLE,WEBPACK     2022-06-12 00:00:14

  Guest Post from a CodeBoy: The Five Stages of Debugging

Being confronted with a serious and difficult-to-diagnose bug can be one of the most traumatic and stressful experiences of a professional programmer's career. Those who have been through such an ordeal rate the stress as on a par with that accompanying serious injury, divorce, or the death of a family member. Researchers who have studied the psychology of computer programming have lately constructed a framework to understand the stages through which the programmer's mind progresses as she...

   Debug,Steps,Stages     2012-05-01 06:39:38

  A String is not an Error

I decided to write a little article to discourage an unfortunately common pattern in Node.JS modules (and browser JavaScript, to a lesser extent) that can boil down to these two examples: // A:function myFunction () {  if (somethingWrong) {    throw 'This is my error'  }  return allGood;} and // B: async Node.JS-style callback with signature `fn(err, …)`function myFunction (callback) {  doSomethingAsync(function () {    // …    if (...

   JavaScript,Node.js,String,Error object     2011-12-23 08:00:32