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

SEARCH KEYWORD -- Program



  Use Java ThreadLocal with caution

According to Oracle documentation, ThreadLocal is a class provides thread-local variables. These variables differ from their normal counterparts in that each thread that accesses one (via its get or set method) has its own, independently initialized copy of the variable. ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread. In short, ThreadLocal variables are variables belong to a thread, not a class or an instance of a class. One common...

   JAVA,MEMORY LEAK, THREADLOCAL     2015-11-03 07:31:57

  On Erlang's Syntax

I first planned to release this text as an appendix entry for Learn You Some Erlang, but considering this feels more like editorial content and not exactly something for a reference text, I decided it would fit better as a blog post. Many newcomers to Erlang manage to understand the syntax and program around it without ever getting used to it. I've read and heard many complaints regarding the syntax and the 'ant turd tokens' (a subjectively funny way to refer to ,, ; and .), how annoying...

   Erlang,Syntax,Error     2011-12-22 08:35:42

  When to use STDERR instead of STDOUT

Every process is initialized with three open file descriptors, stdin, stdout, and stderr. stdin is an abstraction for accepting input (from the keyboard or from pipes) and stdout is an abstraction for giving output (to a file, to a pipe, to a console). That's a very simplified explanation but true nonetheless. Those three file descriptors are collectively called 'The Standard Streams'. Where does stderr come from? It's fairly straightforward to understand why stdin and stdout exist, however ...

   UNIX,STDERR,STDOUT,Difference     2012-01-14 12:07:43

  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

  Optimization Tricks used by the Lockless Memory Allocator

With the releasing of the Lockless Memory Allocator under the GPL version 3.0 license, we can now discuss more of the optimization tricks used inside it. Many of these are things you wouldn't want to use in normal code. However, when speed is the ultimate goal, sometimes we need to break a few rules and use code that is a little sneaky.The SlabA slab is a well-known technique for allocating fixed size objects. For a given object size, a chunk of memory is divided up into smaller regions of that ...

   Optimization,Memory allocation     2011-11-16 08:02:16

  How NOT to teach a computer language

For the past year or so my wife has been taking online classes to get a computer science degree. For most of her classes she’s done great, she’s been flying through HTML and SQL, even up to the point where she can handle multilevel joins and optimizing through indexes. That was until she hit her vb.net class. I had no idea why she was having problems with a language has easy as vb.net so I started helping her out and find out why she was having so many problems. I’ve also ad...

   Programming,Teach,Book,Grade,Method,Computer     2011-11-06 14:52:13

  Hail the return of native code and the resurgence of C++

Programming language trends come and go. First, Java is the hot new language, then it's Python, then Ruby steals the limelight, then it's back to JavaScript. But the latest language darling is probably the last one anyone expected. Believe it or not, 2011 could be the year of C++. Last week, the latest version of the ISO C++ Standard was approved by unanimous vote. It's the first major revision of the language in 13 years. Now officially known as C++11, the new standard introduces features desig...

   C++,Future,Return back,Popular,Local dev     2011-08-24 02:20:24

  A Different Kind of Technical Interview

Everyone who's been programming professionally for a while knows the standard format of the technical interview. You go in, there's a whiteboard in the room, and you write code on it to answer questions.Everyone also has the same basic complaints about these interviews. In a normal work environment, you have access to an API or search engine, but at a whiteboard you don't. Whiteboard questions generally don't include much in the way of overall design, and they're typically limited to simple algo...

   Interview,Programming,Methods,Pairing     2011-06-04 07:56:21

  10 things you gotta have to succeed in IT

Takeaway: Everyone seems to agree that IT is a tough field. But what does it take to overcome the adversities and become a successful IT pro? These qualities may be the key. I recently wrote a string of articles discussing various reasons to leave IT — and various alternative careers for dissatisfied IT workers. I received an amazing amount of feedback from readers who have always wanted to express similar sentiments. But that leaves out a huge swath of peo...

   Tips,IT,Development     2011-07-21 21:55:13

  Great code is written twice (or more)

The last couple of years more and more people have been moving towards Agile development. These techniques aren’t new, most we’re devised in the 80s or 90s. But finally these days programmers and (more importantly) business consultants, architects and clients have learned to love and embrace Agile development.Evolving requirementsIt has now become common knowledge that you can’t write down all the requirements before you start the project. These requirements h...

   Twice,Good code,Recoding,Agile,Evolvement     2011-11-01 00:36:35