Do-it-Yourself or looking for a Ready-for-Use package?
Hi After 2 years with different IT fora my impression about Vietnamese IT Development community is ambiguous. It's like standing in the twilight -neither dark, nor bright. Even when I look into some "more professional" sites such as Kipalog.com I mostly found contributions that deal more with ...
Hi
After 2 years with different IT fora my impression about Vietnamese IT Development community is ambiguous. It's like standing in the twilight -neither dark, nor bright. Even when I look into some "more professional" sites such as Kipalog.com I mostly found contributions that deal more with using than developing. I wonder out loud about the reasons. Are they IT developers or IT users? I don't know and look for an answer HERE. The fact is: if it's about a contribution, it's usually about the usage of something.
This asking, for example, "Data visualization tool for machine learning?" on a Forum is one of the Looking-for-a-Ready-For-Use proof. The author may argue that "he does not want to reinvent the wheel". He errs. Probably because of his lack of IT self-confidence. Jack Ma becomes a Multi-billionaire because he did reinvent "Alibaba" from the old wheel "Amazon" pioneered by Jeff Bezos
A veritable developer, newbie or not, always starts to ponder about his/her own solution, tries to devise a raw way how to attain the goal. If one claims to be an IT developer and knows what one needs why one has to ask around for a "ready-for-use" solution? Does (s)he know that such an "asking effort" just reveals his/her inability to work as an IT developer?
Or why a company should hire a high-paid IT personal whose "job" is to ask around for ready-for-use applications? It's much cheaper to hire a low-paid clerk who gets a list of needed "ready-for-use" packages and does the search and the assembling (i.e. "coding").
Some forum members love to talk about high-flying solutions, coquette with "complex-and-abstract" mathematic algorithms, boast with thunderous buzzwords (e.g. Data Visualization for Machine Learning) but some of them cannot even spell a word in correct English or understand about the thing they are speaking of. Everyone knows XOR (Exclusive OR). How many IT developers know about its application in real life?
Problem: A dark sleeping room: How to switch the bulb on so that one can go to bed and to switch it off without having to stand up and to go to the switch at the door?
Solution: 2 switches. One at the door, one at the bed. The switches need only to be XORed.
Most "IT developers" complain loudly about slowness and sluggishness of this or that, but does (s)he has ever thought about an alternative, a new solution to circumvent the slowness, to bypass the sluggishness? I demonstrate hereunder 2 most basic methods which look more complex and more verbose than the standard counterparts (but in reality they aren't):
- toDouble(String) versus Double.parseDouble(String)
- toInt(String) versus Integer.parseInt(String)
It's in JAVA, but applicable with every OOPL.
public class BasicMath { public static void main(String... a) throws Exception { if (a.length != 2) { System.out.println("Usage: java BasicMath int_String Double_String"); System.exit(0); } for (int i = 0, len = a[0].length(); i < len; ++i) if (a[0].charAt(i) < '0' && a[0].charAt(i) != '-' || a[0].charAt(i) > '9') throw new Exception("Invalid integer:"+a[0]); for (int i = 0, len = a[1].length(); i < len; ++i) if (a[1].charAt(i) < '0' && a[1].charAt(i) != '-' && a[1].charAt(i) != '.' || a[1].charAt(i) > '9') throw new Exception("Invalid double:"+a[1]); BasicMath t = new BasicMath(a); } public BasicMath(String... a) { long beg, t1, t2;; double d; int I; // System.out.println("Time in NanoSeconds"); System.out.println("----------------------------------------------------"); beg = System.nanoTime(); d = toDouble(a[1]); t1 = System.nanoTime()-beg; System.out.println(" 1.T1="+t1+" d="+d+" for toDouble"); // beg = System.nanoTime(); d = Double.parseDouble(a[1]); t2 = System.nanoTime()-beg; System.out.println(" 2.T2="+t2+" d="+d+" for Double.parseDouble "+ " The difference: T2-T1:"+(t2-t1)+" nanoSec."); // System.out.println("----------------------------------------------------"); beg = System.nanoTime(); I = toInt(a[0]); t1 = System.nanoTime()-beg; System.out.println(" 3.T1="+t1+" I="+I+" for toInt"); // beg = System.nanoTime(); I = Integer.parseInt(a[0]); t2 = System.nanoTime()-beg; System.out.println(" 4.T2="+t2+" I="+I+" for Integer.parseInt "+ " The difference: T2-T1:"+(t2-t1)+" nanoSec."); // System.out.println("----------------------------------------------------"); } private int toInt(String I) { boolean neg; int li, i = 0; if (I.charAt(0) == '-'){ neg = true; li = 1; } else { neg = false; li = 0; } for (int b = I.length()-1, f = 1; b >= li; --b) { i += (I.charAt(b)&0x0F)*f; f *= 10; } return (neg? -i: i); } private double toDouble(String D) { boolean neg; double d = 0; int li, i = 0; if (D.charAt(0) == '-'){ neg = true; li = 1; } else { neg = false; li = 0; } if (D != null) { int len = D.length(); for (int b = 0; b < len; ++b) if (D.charAt(b) == '.') { double f = 10d; for (int e = b+1; e < len; ++e) { d += (double)(D.charAt(e)&0x0F)/f; f *= 10; } f = 1d; for (--b; b >= li; --b) { d += (double)(D.charAt(b)&0x0F)*f; f *= 10; } return (neg? -d:d); } double f = 1d; for (int b = len-1; b >= li; --b) { d += (D.charAt(b)&0x0F)*f; f *= 10; } } return (neg? -d:d); } }
the results reveal a big dicrepancy between Developer's codes and standard codes.
Joe 28-03-2018