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

SEARCH KEYWORD -- program



  Name resolution order in JavaScript

To understand what value a variable has in JavaScript, we need to understand some concepts such as scope and name resolution order. JavaScript has two scopes; one is program level and the other one is function level. Unlike in C,C++ or Java, JavaScript has no block level scope. So a variable defined in a if block will still be available outside. For example, the below example: var foo = 1; function bar() { if (true) { var foo = 10; } alert(foo); } bar(); The alert will display 10 since the ...

   JavaScript,Scope,Name resolution     2013-07-10 01:29:28

  Eight C++ programming mistakes the compiler won’t catch

C++ is a complex language, full of subtle traps for the unwary. There is an almost infinite number of ways to screw things up. Fortunately, modern compilers are pretty good at detecting a large number of these cases and notifying the programmer via compile errors or warnings. Ultimately, any error that is compiler-detectable becomes a non-issue if properly handled, as it will be caught and fixed before the program leaves development. At worst, a compiler-detectable error results in los...

   C++,Compiler,Error detection     2012-04-08 09:55:20

  A small trick on using console.log to print data in JavaScript

When debugging JavaScript application, one may frequently use console.log to print data so that it is easy to debug when issue occurs and also helps on understand the data flow. The common way of printing a variable would be something like.  let user = { name: "test" }; console.log(user); In this case it will print: { name: 'test' } This is OK when there is no much logging or the program is not complicated. But it becomes difficult to debug if there are lots of variables to be printed ...

   JAVASCRIPT,CONSOLE.LOG,DEBUGGING     2019-09-03 10:24:24

  How Can Your Data Be Stolen Online?

In 2019, according to Statista, nearly 165 million sensitive records were exposed in the US due to data breaches. Unfortunately, data theft is not going anywhere. Hackers are using increasingly sophisticated methods to steal information, but thankfully there are measures you can take to ensure your data stays safe. Here are some of the most common ways people get their data stolen online and how you can take precautions against the methods cybercriminals use. Human Error Hacking is one of the m...

   DATA SECURITY,PROTECTION KID     2021-01-27 19:46:05

  Investing in myself: Realizing my value as a programmer

Being a programmer, you have an invaluable skill that you need to learn to harness. Investors realize this already which is why they’ll spend stacks of cash to have you build them something that’ll someday be profitable. Large corporations realize the value in good developers and sometimes bend over backwards trying to retain their top talent. To be able to program well is a skill that people clearly value but why do programmers tend to place such little value on their own ta...

   Career,Inverstment,Self,Software,Developer     2012-01-11 04:36:16

  The roots of Lisp

(I wrote this article to help myself understand exactly what McCarthy discovered. You don't need to know this stuff to program in Lisp, but it should be helpful to anyone who wants to understand the essence of Lisp-- both in the sense of its origins and its semantic core. The fact that it has such a core is one of Lisp's distinguishing features, and the reason why, unlike other languages, Lisp has dialects.)In 1960, John McCarthy published a remarkable paper in which he did for programming somet...

   Lips,Root,McCarthy,AI,Artificial Intelligence     2011-10-25 10:35:13

  GoLang to build smaller executable file

Normally the executable file built with go is a bit large, it is always desired that a smaller executable file should be generated though. In this post, a couple of ways to reduce the size of the executable will be introduced. The end effect is that the executable file size would be much less than the normal generated one. The file which is built normally has below size. Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 12/14...

   GOLANG,EXECUTABLE     2019-12-13 20:10:45

  Scala Macros

This is the home page of project Kepler, an ongoing effort towards bringing compile-time metaprogramming to Scala. Our flavor of macros is reminiscent of Lisp macros, adapted to incorporate type safety and rich syntax. Unlike infamous C/C++ preprocessor macros, Scala macros: 1) are written in full-fledged Scala, 2) work with expression trees, not with raw strings, 3) cannot change syntax of Scala. You can learn more about our vision of metaprogramming from our talks. We propose to enrich Scala ...

   Scala,Macro,Efficiency,Maintainebility     2012-02-01 00:12:15

  Notes on Programming in C

Introduction       Kernighan and Plauger's The Elements of Programming Style was an important and rightly influential book.  But sometimes I feel its concise rules were taken as a cookbook approach to good style instead of the succinct expression of a philosophy they were meant to be.  If the book claims that variable names should be chosen meaningfully, doesn't it then follow that variables whose names are small essays on their use are even better?  Isn't MaximumV...

   C,Notes,Tips     2011-12-09 07:55:47

  Java Cipher encryption/decryption example

In Java, Cipher is the API for doing data encryption/decryption. Many cryptographic algorithms such as AES, DES, RC4 etc can be specified when creating Cipher instance. The Cipher instance calls the underlying algorithm specific implementation to do the actual encryption/decryption.  Before doing the encryption/decryption, a key needs to be created and it will be used to do the encryption/decryption. A sample program for performing all these is : import java.security.Key; import javax.cryp...

   Java, Java Security, Cipher, Example, Sample     2015-08-14 07:07:10