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

SEARCH KEYWORD -- syntax



  I don’t like the Ruby 1.9 hash syntax

There, I said it, I don’t like it. And I don’t know why you do either. I assume you like it anyway, everyone else I talk to seems to. My heart sank over and over again whilst I was at the recent RailsConf and saw respected rubyist after respected rubyist using the new Ruby 1.9 hash syntax in their presentations. I just don’t get it. But I’m not one to just moan. I plan to justify my feelings. Then maybe you can tell me why you do like it? My friend the hash rocket I ...

   Ruby,1.9,Hash,Feature     2011-12-14 07:05:09

  C/C++ Pointer Declaration Syntax – It makes sense!

I never really liked the way pointers are declared in C/C++: int *a, *b, *c; // a, b and c are pointers to int The reason is that I am used to reading variable declarations as MyType myVar1, myVar2, myVar3; and I always read “int*” as the type “integer pointer”. I therefore wanted the following int* a, b, c; // a is a pointer to int, b and c are ints to mean that a, b and c all were of type int*, i.e. pointers to int. and I therefore found it slightly a...

   C,Pointer,Declaration,Attempt     2012-02-22 05:43:58

  JavaScript Is Not A Language

Recently people presented arguments for and against using CoffeeScript. I felt the argument against was pointless and obviously wrong, but I couldn't figure out why, and I thought the counterargument for was kind of toothless and irrelevant. I've figured out the real issue.The real argument for CoffeeScript is that JavaScript is not really a language.Years ago I read something which explained, in my opinion, why Lisp has never achieved the mainstream adoption its passionate advocates belie...

   JavaScript,Not a language,CoffeeScript,Model     2011-12-29 08:46:15

  Strict mode in JavaScript

1. Introduction In addition to normal mode, ECMAScript 5 includes the other mode : strict mode. It means it will make JavaScript codes execute in a more strict environment. The purposes to have strict mode are: Remove some unreasonable and parts of JavaScript syntax. Reduce some of the quirk behaviors. Remove some insecure parts of code execution. Make the execution environment more secure Improve interpret efficiency and increase the execution speed Build foundation for future JavaScript versi...

   JavaScript, Strict mode. Introduction     2013-01-17 05:00:26

  Disgusting programming language list

To avoid arguments among different programming languages, this ranking only covers the opinions from programmers with multi-language experience. Also it doesn't mean the language is not good if the language is on the list, it just means those developers don't like some features of the language. Below ranking is summarized from Quora、Stack Overflow and Hacker News. 10. Python Reason : It uses code indent to define block level scope, why not use curly braces? It also uses massive colons and ...

   Programming language rank     2013-09-27 09:53:39

  What can select do in GoLang

In Go language, select is a keyword used to listen to and perform IO operations related to channels. With the select statement, we can simultaneously listen to multiple channels and perform corresponding operations when any of the channels are ready. This article will summarize the common uses of the select statement and provide some considerations when using it. Basic syntax The basic syntax of the select statement is as follows: select { case <-channel1: // when channel1 has data to ...

   GOLANG,SELECT,USAGE,SYNTAX,TUTORIAL     2023-08-12 20:17:02

  We need a programming language for the rest of us

Recently I took on the enormous task of learning Objective-C from the bottom up and I was struck by something I couldn’t shake: this is too hard. An experienced developer might scoff at me for saying that, but it’s true. I’ll be honest about my education, Calculus II was the most math I ever took, I have an advanced degree from Berkeley in Journalism. I am a proficient HTML/CSS developer and can glue enough javascript together to solve almost any problem that has presen...

   Code.Programming,Expectation,Easy-to-use     2011-07-22 02:20:09

  Learning Python as your first programming language

Python is a widely used general-purpose, high-level programming language Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C. Python now becomes more and more popular and is now being used the first teaching language in some universities. Why would you like to learn Python as your first programming language? Below are the reasons. Python is a high-level language with dynami...

   Python,Advantage     2014-04-07 05:36:04

  A simple tutorial on Linux nohup command

In our daily work, there might be need to run some important program for hours or even days without being abruptly terminated. In such case, we may want to run the program with command nohup. nohup is the abbreviation of no hangup, i.e, don't hang up or terminate the process. This command will tell the process to ignore the system HUP signal. The HUP signal will be emitted when the terminal is exited or disconnected. Normally process will abort its execution when receiving this signal.  Bas...

   NOHUP,LINUX     2020-08-08 01:14:50

  static nested and non-static nested class in Java

Nested classes are divided into two categories: static and non-static(inner). Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes. Static class can be defined as : class OuterClass{ static class StaticNestedClass{ //OTHER STUFF } } Static nested classes are accessed using the enclosing class name: OuterClass.StaticNestedClass For example, to create an object for the static nested class, use this synta...

   Java,static nested class,inner class     2014-04-23 07:11:44