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

SEARCH KEYWORD -- Rules



  The Go Pointer Magic

Go is a language with the pointer type, by which we can Pass pointer into a function and update value in-place. Add methods to a struct as (* T) A, which is different from (T) A(). However, the pointer is type-safe in Go, meaning that there are such restrictions of the pointer. Different types of pointers are unconvertible. Pointer type cannot be used for calculation. Pointer types cannot be compared, either == nor !=. No mutual assignment between different pointer-...

   GOLANG,POINTER,UNSAFE     2021-10-03 02:18:57

  WireGuard VPN Troubleshooting

When you are working as a network/cluster admin for you team to config the WireGuard VPN for other members, you may meet some of the problems below and these are the solution you can try to fix them. ----------------------------------------------------------------------------------------------------------- Problem [1]: The WireGuard handshake request send from the client can be received from the server but the server's response was blocked at some where so the client can not receive serv...

   WIREGUARD,VPN,TROUBLESHOOTING     2021-12-14 09:17:46

  Can a == true && a == false be true in JavaScript?

JavaScript is a weak typed language and it has a loose comparison feature where two objects/values of different type can be compared using == operator. This provides developers great flexibility and confusion at the same time.  Before understanding how == works in JavaScript, can you first answer the question in the post title? Can a == true && a == false be true in JavaScript? Normally, we would think that this expression will always return false since a can be either true or ...

   JAVASCRIPT,COMPARISON,INTERVIEW QUESTION,==     2018-03-25 03:39:43

  10 Technological Trends that are Affecting Life of Teachers

Technology has reached the level where people think that they do not need anybody to teach them new things. When you do not know about anything, you simply Google it and get the answer. All this is good but in actual it is affecting the life of our teachers. So, whatever conclusions these folks have who are arriving today will always influence everyone else who is working in childhood education through their high school. Let us see how they are affecting the life of the teachers:  &nbs...

       2014-12-01 01:38:04

  Python internals: adding a new statement to Python

This article is an attempt to better understand how the front-end of Python works. Just reading documentation and source code may be a bit boring, so I’m taking a hands-on approach here: I’m going to add an until statement to Python. All the coding for this article was done against the cutting-edge Py3k branch in the Python Mercurial repository mirror. The until statement Some languages, like Ruby, have an until statement, which is the complement to while (until num == 0 is equi...

   Python,New statement,Research,Addition     2012-03-12 07:32:24

  Create namespace in JavaScript

A namespace (sometimes also called a name scope) is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An identifier defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace. Languag...

   JavaScript,namespace,example     2012-05-10 04:57:17

  Top 7 programmers bad habits

1.- The all code is crap, except mine, attitude. I have bad news for you buddy, all code is crap. No matter how much effort you put on it, there is always a majority of programmers who are going to think that your code sucks and that they could have done it 10 times better. I have already covered this topic in previous posts, you can find more information of what exactly I mean when I say that all the code is crap here and here. How to fix it: Don’t criticise others people code, it ...

   programming,habit,tips     2011-06-07 00:36:22

  Kubernetes Authentication & Authorization 101

If we want to build a system with user modules, Authentication and Authorization are something that we can never ignore, though they could be fuzzy to understand. Authentication (from Greek: αὐθεντικÏŒς authentikos, “real, genuine”, from αὐθέντης authentes, “author”) is the act of proving an assertion, such as the identity of a computer s...

   RBAC,AUTHORIZATION,AUTHENTICATION,KUBERNETES     2021-06-05 23:19:18

  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

  Learn How to Write iOS Apps

My friend contacted me on twitter and asked for advice on different sources on how to learn iOS apps. Since this paragraph will already exceed 140 characters, I'm posting here, instead. (Obviously, reading this blog regularly is a great way to pick up some iOS development tricks) To get started, some people buy a book or find some good online tutorials. I tried both approaches, and the online tutorials were definitely better. I found Stanford's class on iPhone Development, available for free...

   IOS App,Tutorial,Advice,Resource     2011-12-25 00:58:25