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

SEARCH KEYWORD -- Program



  Using MemoryMappedBuffer to handle large file in Java

When handling large files, it will largely affect the process speed while using traditional FileInputStream, FileOutputStream or RandomAccessFile since they trigger lots of read and write operations. In Java NIO, a new way of handling large file is introduced which is to use MmeoryMappedBuffer to create memory mapped file. Memory-mapped I/O uses the filesystem to establish a virtual memory mapping from user space directly to the applicable filesystem pages. With a memory-mapped file, you can pre...

   JAVA,IO,NIO     2015-11-13 01:58:08

  You know what UTF-8 is when you see it?

When we are coding we may often see some encoding specifications in our source codes such as UTF-8,GB2312. Do you know what these encoding mean and why we need them? In this post, Julián Solórzano will introduce the most widely used encoding specification around the world accomodating all different character sets in the world. UTF-8 is a method for encoding Unicode characters using 8-bit sequences. Unicode is a standard for representing a great variety of characters from many ...

   UTF-8,Encoding     2014-04-18 22:13:44

  A Better Way to Learn How to Program

Learning how to program can be a nightmare. An aspiring coder has to jump through many unpleasant hoops and mysterious error messages just to get "Hello, World!" printed on the screen. Then, she's left wondering, "OK, now what? How do I actually build something?"As game developers seeing someone struggle through this, we should be screaming, “NOOOOO!” The whole thing reeks of bad game design: a lot of work with no reward, unclear failure cases, advanced features pushed on new players...

   Programming pattern,Game design,Derivati     2011-09-19 13:51:17

  Memory related exception analysis in Java

Java Virtual Machine Specification divides the memory of JVM into several areas : Heap, Stack, The Program Counter register and Method area etc. In HotSpot JVM, heap is composed of Young, Tenured and Perm. There are different OutOfMemory error can happen in different memory area. Next is an overview of some of these OOM errors. StackOverflowError The JVM will allow only a specified number of stacks created nested. An JVM option -Xss can be set to determine the maximum stack size. If the num...

   Java, Memory model, Memory exception, OOM     2015-01-19 06:54:27

  How I Program Stuff

I love programming. I can truly say that of all the things I enjoy, I enjoy programming the most. There's nothing quite like the feeling you get when you create something. Writing code is a lot like building your own little universe. When you build stuff, you're in complete control, and, no matter how hard you fight it, your code directly reflects yourself. If you write sloppy code, I can almost guarantee you'll be a sloppy person. If you haphazardly throw code around with any ca...

   Programming,Steps,Isolate,Eliminate     2012-01-17 11:39:51

  4 asynchronous programming methods in JavaScript

You may know the execution environment of JavaScript is single threaded. The so called single thread means only one task can be running at any time, if there are many tasks, they need to be in a queue and wait for the previous task to be completed. The advantage of this mode is it's easy to implement and the execution environment is relative simple; the disadvantage is that if one task takes long time, the tasks following it must wait in the queue and this will delay other tasks consequently. Th...

   JAVASCRIPT,ASYNCHRONOUS PROGRAMMING, EVENT MODEL,PROMISE     2012-12-25 00:55:47

  Weibo is testing an Instagram like app called Lvzhou

Weibo, the Chinese version of Twitter, is testing an Instagram like app called Lvzhou(Oasis in English). Now only invited people can access the app. You can download the app on App Store if you are an iPhone user or you can download online if you are an Android user. The vision of this app is to allow users to discover beautiful world, users can post photos or short videos and share with the rest of the world. Before you can access the app, you have to obtain an invitation code shared by y...

   INSTAGRAM,WEIBO,LVZHOU,OASIS     2019-09-07 09:59:54

  Common Lisp is the best language to learn programming

Now that Conrad Barski's Land of Lisp (see my review on Slashdot) has come out, I definitely think Common Lisp is the best language for kids (or anyone else) to start learning computer programming.Between Land of Lisp, David Touretzky's Common Lisp: A Gentle Introduction to Symbolic Computation (really great book for people new to programming, available for free) and The Little LISPer (3rd edition, editions four and up use Scheme) you have three really great resources to get started.Lisp's synta...

   Common Lisp,Kid,Programming language,First     2011-10-31 00:07:12

  10 Tips To Make Your C Program Effective

The beauty of any code lies not only in finding the solution to a given problem but is in its simplicity, effectiveness, compactness and efficiency( memory ). Designing the code is harder than actually implementing it. Hence every programmer should keep a couple of basic things in mind while programming in C. Here we introduce you to such 10 ways of standardizing your C code. 1. Avoid unwarranted function calls Consider the following two functions: view source print? 1 void str_print( c...

   C,Tips,Efficient,Speed increment,Recursi     2011-08-05 01:34:16

  I hate cut-and-paste

Me, I blame the IDE's.Coding used to be hard. Not because programming itself was overly hard, but mostly because editors absolutely sucked. How much the typical development environment in the 70's and 80's sucked is hard to convey (except for a very lucky few, and those would have likely been using DEC and WANG gear). I got in on the tail end of the punch card era. Punching your own program is lots of fun. Once. And if you drop a deck you get to play with the sorter, which is also lots of fun (o...

   IDE,Editor,Cut and paste,Shortcut,Blame     2011-10-24 11:33:46