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

SEARCH KEYWORD -- Search



  JavaScript efficiency catch up

JavaScript is a very flexible language, we can write JavaScript code freely with various styles, different kinds of codes will have different execution efficiency. Here we summarize some tips we get from our development. Efficiency of JavaScript itself JavaScript has execution context chain, closures, prototype inheritance, eval etc. It brings us some magic features, but it also introduces the performance issue, if we don't use them properly, it will affect the codes execution efficiency. 1. Glo...

   JavaScript,efficiency,event delegation,eval     2013-04-02 04:08:46

  Google is returning back to China

It has been five years since Google announced its difficult decision to leave China in 2010. The well known reason was that Google didn't want to conform to China's censorship request on sensitive information. During these five years, many stories happened bbetween these two sides. Things may turn around now as there are a few indications where Google may return back to China at an appropriate time soon. The most convincing indication is that a customized Google play -- Google online shop may a...

   Google,China,Alphabet,Google play     2015-09-06 04:13:30

  Sites to go if you want to learn web development

Before you start to do web development, either for a hobby or for your start up project, you should be prepared for learning many different technologies including both front end and back end. You may need to deal with UI design, business logic design, data store and infrastructure setup etc. This seems a very complex. Indeed, if you know where you should go, the  it's actually not so hard. Here are some sites you should go when you face issues while you are doing web development. These site...

   Web development,Resource,Site     2013-09-19 08:12:23

  Create customized GitHub profile page

How long have you been using GitHub? Have you ever wondered whether one can customize his profile page with some fancy looking? Indeed GitHub allows developers to customize profile page through a secret repository. The secret is to create a repository with the same name as your GitHub username. And you will be granted into the work of customizing your own profile page. In this post, we will show a simple walk through on how to create it. Create secret repository As indicated by the term secret r...

   GITHUB,CUSTOMIZED PROFILE,SECRET REPOSITORY     2020-10-18 03:02:42

  Will Artificial Intelligences Find Humans Enjoyable?

Will AIs find humans interesting, enjoyable, and worthy of companionship? My guess: the smarter and more autonomous they become the more the answer will become NO. There are practical reasons for AIs to want to understand humans: The AIs will want to protect themselves from all threats, including human threads. The AIs will also want to get more resources (e.g. energy, raw materials for fabrication of additional computing power). The extent that humans control access to resources AIs will...

   AI,People,Cooperation,Enjoyable     2012-02-19 06:13:47

  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

  App defeats web

As an admired rock musician and co-founder of the venture capital firm Elevation Partners, Roger McNamee has a statement about Apple : The reason why Apple is so successful today is because App defeats Web.Apple divides contents of web into small apps, and then ask users to pay. This actually means that Apple creates a new business model which is fundamentally different from Web.Commodity Content and Differential ContentCommodity Content is the information model in desktop and web era which is h...

   App,Web,Apple,HTML5     2012-05-16 05:16:00

  Can Your Programming Language Do This?

One day, you're browsing through your code, and you notice two big blocks that look almost exactly the same. In fact, they're exactly the same, except that one block refers to "Spaghetti" and one block refers to "Chocolate Moose." // A trivial example: alert("I'd like some Spaghetti!"); alert("I'd like some Chocolate Moose!"); These examples happen to be in JavaScript, but even if you don't know JavaScript, you should be able to follow along. The repeated code looks wrong, ...

   Programming,Maintainability,Reusable     2011-05-31 07:42:41

  Forgotten TODOs: ideas for contributing to open-source projects

I often talk to students that want to contribute to open-source projects, but just don't have an idea what to work on. Here's a tip if you're in a similar situation (e.g. you want to apply for GSOC) : 1 git clone repository_url_of_some_open_source_project target_directory 2 grep -RIn TODO target_directory/* So, find the URL of the repository project you want to contribute to, checkout the repository using git/mercurial/svn and then find all the TODOs in the source code using grep. The -RI...

   Open source,constribution,TODO,participation     2012-03-03 22:30:28

  Resolve SystemStackError issue when resolving IP address in Ruby

In Ruby, Resolv is the default DNS resolution implementation. It can be used to resolve IP address of a hostname. To use it, one just needs to require 'resolv' in the code. But sometimes, a user would want to check /etc/hosts first or some other mechanisms to resolve an IP address. In this case, one can require 'resolv-replace' and then replace the default DNS resolvers with customized DNS resolvers. For example, using resolv-replace, one would write require 'resolv-replace' Resolv::DefaultResol...

   RUBY,RUBY ON RAILS,NETWORK     2017-07-08 09:54:35