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

SEARCH KEYWORD -- ALLOCATION



  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

  Will China surpass United States on innovation?

I had some discussions on whether China would surpass United States on innovation with some entrepreneurs during last weekend's APEC. The conclusion is United Stats has advantages on innovation today, but in the future, China's innovation will be more widespread and successful. For the next 10 years, what advantages do United States and China have? Actually United States has obvious advantages, especially on innovation structure and innovation culture. Technology -- It's undoubted that Unit...

   Innovation,China,United States     2013-07-15 04:40:12

  C++ for the Real-Time Web

C++? Why on Earth? C++ seems like one of the least likely languages to write a web application in. C++ is associated with complexity, both with language design and the need to manually manage memory. Programming in C++ unleashes a whole class of bugs associated with memory corruption and memory allocation. This is a trade off for giving more power to the developer along generally being much faster than equivalent programs in languages such as Python or Ruby. Real-time Web as a Use Case Making...

   C++,Web development,Real time     2012-01-30 06:00:20

  Address of a Java Object

In conventional java programming, you will never need address or location of a java object from memory. When you discuss about this in forums, the first question raised is why do you need to know the address of a java object? Its a valid question. But always, we reserve the right to experiment. Nothing is wrong in exploring uncharted areas.I thought of experimenting using a little known class from sun package. Unsafe is a class that belongs to sun.misc package. For some of you the package might ...

   Java,Object,Address,Memory,Start address     2011-09-29 11:17:46

  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

  10 reasons why I "hate" working in Facebook

To me, the past two years in Facebook is simply a nightmare, To celebrate the upcoming 2 year anniversary, I decided to jump out of it. Facebook, I have so many reasons to hate you. However, for fear that readers find me too annoying, I take my complaints to be condensed into the top ten reasons.1. Why should submit so much code? In the past two years, the number of Facebook engineers is doubled, and the amount of code submitted by each engineer is also increased with the increase of the number ...

   Facebook,Hate,Leave     2012-08-17 13:34:05

  Pay Your Programmers $200/hour

If you are hiring programmers, you should pay them $200/hr. This breaks through otherwise impenetrable psychological barriers, helps solve the agency problem, and ensures you are only hiring programmers when you really need them. Expectations $200/hr is an open declaration of your expectations. It states that you are expecting to hire both a professional and an expert in the field. As a programmer, I treat contracts that pay me $200/hr differently from jobs/contracts that pay me $65/hr eq...

   Salary,Programmer,Responsibility,Urgency,Value     2011-12-31 15:34:57

  Never create Ruby strings longer than 23 characters

Looking at things through a microscopesometimes leads to surprising discoveries Obviously this is an utterly preposterous statement: it’s hard to think of a more ridiculous and esoteric coding requirement. I can just imagine all sorts of amusing conversations with designers and business sponsors: “No… the size of this <input> field should be 23… 24 is just too long!” Or: “We need to explain to users that their subject lines should be les...

   Ruby,Specification,String,Interpreter,Optimization,23     2012-01-05 07:58:07

  Work is not challenging is just an excuse in interview?

Usually when an interviewer asks the interviewee why he/she wants to change his/her job, one answer may be "My current job is not challenging, I want a more challenging job.". The interviewer may tend to think that there are always challenges everywhere and why the interviewee indulges himself/herself without putting much effort on his/her work.   Here I want to say something to our interviewers. Work challenging is not equal to personal indulgence. The work is challenging which is an...

   Job,Interview,Challenge,Excuse     2012-04-18 07:03:12

   Move.Me Writing Your Own WebSocket Server

The WebSocket protocol has applications beyond plain vanilla web development.  I will explain how the protocol works, how to implement your own server and share some insights I had along the way. Before we get down and dirty, I will explain what I’ve been doing with it. At this point I expect many of you are saying “I’m not working on a web game this doesn’t seem relevant to me.” Well, neither am I. I embed a WebSocket server into my game engine and wit...

   Socket,NetWorking,WebSocket,Server development     2012-01-28 07:06:43