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

SEARCH KEYWORD -- Library



  2 million iPhone 5 sold in China in 3 days

Apple announces that since it was available in China from last Friday, iPhone 5 has been sold over 2 million units in 3 days. iPhone 5 was available for sale in China starting from 14th Dec, the price is 5288RMB and up, there are two cooperated vendors in China : China Telecom and China Unicom. They start sell iPhone 5 on their own sales channels, moreover Apple starts selling iPhone in their own Apple Store and official website. According to Tim Cook, because of the high demand of Apple product...

   iPhone 5, China, Sale     2012-12-17 12:27:59

  Learning Ruby and Ruby vs Lisp

The company I work for has a lot of legacy Ruby code, and as Ruby has become kind of a mainstream language, I decided to get a book about it and learn how it works. As my learning resource, I chose The Ruby Programming language by David Flanagan and Yukihiro Matsumoto as that receives great customer reviews, covers Ruby 1.8.7 and 1.9 and is authoritative because the language creator is one of the authors. The book makes a good read in general. There are plen...

   Ruby,Feature,Functional,OOP,Lisp,Difference     2011-12-12 07:42:01

  noConflict mechanism in jQuery

Many JavaScript frameworks like to use $ as function or variable name, jQuery is one of them. In jQuery, $ is just a reference to window.jQuery, so even if $ is deleted, window.jQuery will still be available to ensure the whole library can work normally. jQuery API design takes fully consideration of multiple frameworks conflicts, we can use jQuery.noConflict function to easily handle control. jQuery.noConflict accepts one optional boolean parameter[1] to determine whether to hand jQuery object ...

   jQuery,noConflict,$     2013-03-14 19:40:36

  Programming Languages for Machine Learning Implementations

Machine learning algorithms have a much better chance of being widely adopted if they are implemented in some easy-to-use code. There are several important concerns associated with machine learning which stress programming languages on the ease-of-use vs. speed frontier.Speed The rate at which data sources are growing seems to be outstripping the rate at which computational power is growing, so it is important that we be able to eak out every bit of computational power. Garbage collected la...

   Programming language,Machine learning,Development     2011-11-16 08:22:17

  A serious security vulnerability found in MySQL/MariaDB

Recently a serious security vulnerability was found in MySQL/MariaDB. It relates to the access to the database. The issue is described below.When a user connects to MariaDB/MySQL, a token (SHA over a password and a random scramble string) is calculated and compared with the expected value. Because of incorrect casting, it might've happened that the token and the expected value were considered equal, even if the memcmp() returned a non-zero value. In this case MySQL/MariaDB would think that the p...

   MySQL,MariaDB,bug,fix,password,memcmp()     2012-06-11 10:28:09

  new expression vs operator new in C++

In C++, there is a new mechanism for memory allocation and management. When we want to initialize an object, we can use new expression to get enough memory for storing an object and also initialize the object. When we want to create a new object, we can use new expression, for example: Obj *obj=new Obj; Basically, what the new expression does is to allocate enough memory for storing the obj object, in addition, it will initialize the object with some intial values. Also, there is an operator new...

   C++, new expression, operator new     2012-08-12 11:42:39

  Why Good Programmers Are Lazy and Dumb

I realized that, paradoxically enough, good programmers need to be both lazy and dumb. Lazy, because only lazy programmers will want to write the kind of tools that might replace them in the end. Lazy, because only a lazy programmer will avoid writing monotonous, repetitive code – thus avoiding redundancy, the enemy of software maintenance and flexible refactoring. Mostly, the tools and processes that come out of this endeavor fired by laziness will speed up the production. This ma...

   Good programmer,Lazy,Reason,Dumb     2012-04-18 07:15:23

  The Hungry Programmer

Programming is a lot like eating. Tonight I was hungry. I wasn't at home. I couldn't go to the kitchen for a snack. I looked around and saw only McDonald's across the street. Then I was struck with the same dilemma that I face whenever I leave the comfort of my own home for any decent spread of time: Do I eat crappy food now and satisfy that hunger? Or do I stay hungry for a little longer and eat a healthy meal back at home? As I pondered this dilemma I couldn't help but notice how much i...

   Programmer,Hungry,Coder,Coding     2012-01-19 11:04:30

  Fix issue "cannot load such file -- bcrypt_ext (LoadError)"

bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords. The bcrypt Ruby gem provides a simple wrapper for safely handling passwords. However, sometimes the rails application would fail to start after installing the bcrypt gem on Windows. The error would look similar to below. The issue is that it fails to load the bcrypt_ext which is the native built extension, the reason may be the library is wrongly built. To fix this issue, below steps can...

   RUBY,SOLUTION,RUBY ON RAILS,BCRYPT,LOAD ERROR     2017-03-05 00:21:10

  Haskell’s effect on my C++: exploit the type system

Like most programmers, I was attracted to Scheme by the promise that it would make me a better programmer. I came to appreciate the functional style, but swapped to Haskell, a more developed language with a rapidly developing standard library. Unfortunately, for me, Haskell can’t yet replace C++ on a day to day basis, so I reluctantly spend my days tapping away at C++. So, were the promises true? has functional programming made me a better programmer? Better is a tough question,...

   Haskell,C++,Type system,Comparison     2012-02-06 07:44:35