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

SEARCH KEYWORD -- Remove redundancy



  That’s Not TDD

A few months ago I was visiting a client who was having a lot of problems using TDD. “It takes over half an hour to run our unit tests,” he said. “You are not doing TDD,” I said. “In order for tests to be valuable all of them must run fast—within a few seconds, or developers will stop running tests frequently.” “But how to I make them run fast?” he asked, “Just connecting to the database takes 30 seconds” So I showed him a techn...

   TDD,Driver,QA,Model,Uncontrol,Method     2011-08-25 02:26:29

  3 ways to remove duplicates in List

Frequently, we may have an ArrayList which stores many values, and we need to process the ArrayList and get what are the distinct values in the list, or we may want to count occurrence of each value in the ArrayList. We can remove the duplicates in a few ways. Here we propose 3 methods :     public static void main(String[] args){        //SuperClass sub=new SubClass();                String[...

   Java,List,Duplicate,Clear     2012-09-03 09:44:32

  A simple way to remove the small arrow on on desktop application shortcut

Maybe many of us will see a small arrow on desktop application shortcut after we install the application on Windows. Some may like it but some people may think it doesn't look beautiful enough. We may need to remove these small arrows somehow the desktop can be clean. So how? Many people may use a third party software to remove the small arrows, then they must go to download the software and install them. But do we necessary do this in order to remove the small arrow?The answer is no. Here I ...

   Small Arrow,Shortcut,Desktop,Application,Windows     2014-10-25 08:39:58

  Office 2013 RT for Windows RT tablets may rule out macros and VBA

Office 2013 RT is the office suite optimized for Windows RT system running on ARM tablet PC, Microsoft plans to release a preview version later this year. However, according to TheVerge, Microsoft may remove some features in this version of the Office suite.The so-called optimization, certainly require some changes to Office based on ARM tablet architecture. To remove some features may be because of battery life and machine reliability considerations. Macrso, third-party add-ons, and VBA will be...

   Office 2013,Macro,Window RT     2012-08-07 14:17:53

  Permutation algorithm with JavaScript

In secondary school, we have learned permutation. Basically, for n numbers, the number of permutations for these n numbers can be calculated to n! which is called 'n factorial'. But to display all the permutations on the screen, we need to use a recursive function. The problem is how to write this function.  Next I write a program to display the permutations for n numbers with JavaScript. First, we need to understand that from these n numbers, we can first take any one number from it, and t...

   JavaScript,Permutation,Algorithm,Impleme     2011-09-21 12:02:35

  Why exception would be thrown when deleting element while looping through HashMap in Java

HashMap and other Collection types are frequently used in Java application programming. This post will explain why exception would be thrown when deleting element with Map.remove() while looping through a Map using Iterator. This issue would also occur to other Collection types such as Set, List. Below is a sample code snippet demonstrating the exception thrown. Map<String,String> map = Collections.synchronizedMap(new TreeMap<String,String>()); map.put("key1","value1"); map.put("ke...

   JAVA,HASHMAP,CONCURRENTMODIFICATIONEXCEPTION     2018-06-30 12:49:09

  Algorithm : Delete middle node from singly linked list

Questions about singly linked list are frequently asked during technical interviews. Today we will share with you one algorithm question about singly linked list. Here is the problem description. Assuming the only information you are giving is there is a pointer to a middle node of a singly linked list, no other information about the linked list is given. Please delete this node and don't affect the structure of the linked list. Initially you may think this question is easy if you know the hea...

   ALGORITHM,C,LINKED LIST     2015-10-30 05:21:25

  Remove browse button from input type=file

In Web 2.0 era, many websites will ask the user to upload their avatar when creating their profile. In HTML, the input control we should use is input="file". This is a file control provided by the browser vendor and it should be ran in a sandbox for security consideration. Browsers don't provide ways to choose file from local and upload to the remote server without the input="file" control.  There is one annoying part about the input="file", which is a default button named "Choose File" or...

   file,html,browse,remove browse button     2015-07-12 05:17:51

  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

  Removing all child nodes from an element

When manipulating the DOM, it's often useful to remove all child nodes from a specific element. This typically comes in handy when you're looking to replace the content of an element with a separate form element, such as an <input>, so the user can edit the actual value.Here's an example of something I recently created that illustrates my point:Get the Flash Player to see this player.These "dynamic form elements" are written to the page only when the...

   Js,DOM,Remove all children,Clear,JavaScript,Code     2011-10-19 10:04:23