Online SSH Client from C9.io

Categories: Development NotesLinux; Tagged with: ; @ March 23rd, 2014 1:14

Access your server via. online https SSH Client: https://c9.io

image

 

Btw, C9’s online IED is awesome,  take a look it’s html editor:

image

Maven: Reuse tests in other Modules

Categories: Development Notes; Tagged with: ; @ September 6th, 2013 0:13

Requirement:

Reuse testcase in other Modules.

In ‘Module A’, I want to reuse the testcases in ‘Module-Core’ (e.g. extend Module-Core…AbstractUserManagerTest)

Solution: using attached test

http://maven.apache.org/guides/mini/guide-attached-tests.html

Clean Code: Meaningful Names 清晰有意义的命名

Categories: Development NotesJava; Tagged with: ; @ August 14th, 2013 0:02

One difference between a smart programmer and a professional programmer is that the professional understands that clarity is king . Professional use their powers for good and write code that others can understand.

Uncle Bob

Summary for Clean Code chapter 2:

Use Intention-Revealing names 表明意图

int d; –> int daysSinceCreation;

list1 –> flaggedCells

Avoid Disinformation 提供真实信息

accountList:  Unless it’s actually a List. otherwise, accountGroup/bunchOfAccounts/accounts would be better

Make meaningful distinctions 有意义的区分

copyChars(a1, a2) –> copyChars(source, destination)

Use Pronounceable Names 使用可以发音的变量名称

luo –> lastUpdatedOn

Hungarian notation 匈牙利命名法 不必再刻意添加前缀

strName –> name

m_desc –> desc

Class names: noun or noun phrase. Method names, verb or verb phrase.

Don’t be cute 清晰表达即可, 不要画蛇添足

eatMyShorts() –> abort() [Eat my shorts, by Bart Simpson]

Pick One Word per Concept 为一个概念选定一个名称 Don’t pun 不要使用双关词汇

fetch, get

add, insert?

Use Solution Domain Names 使用解决方案领域内词汇

AccountVisitor, StudentFactory

Add Meaningful Context 有意义的语境, Don’t Add Gratuitous  Context 但不要增加无意义的上下文

Class name: SGMailingAddress –> MailingAddress

The New Google Maps 新版Google地图

Categories: Development Notes; Tagged with: ; @ June 1st, 2013 15:26

Google 是个很炫的公司.

Google Map是个神奇的工具.

新的搜索条,  更加紧凑的利用空间.  灵活的跳转到搜索结果:

image

自动适应分辨率的调整. 在搜索结果中, 可以直接看到街景的预览.

 

下图为旧版:

image

相比之下 就略显笨拙.

JIRA: How to Select the user and groups mapping 获得用户与用户组关联列表

Categories: Development Notes; Tagged with: ; @ May 28th, 2013 10:09

Requirement:

Export the users and group mapping list.

Solution:

Seems there’s no feature / plugins for this requirement. If you can access the database, then everything is easy:

SELECT  member.[ID]
      ,[membership_type]
      ,[group_type]
      ,[parent_name]
      ,[lower_parent_name]
      ,[child_name]
      ,[lower_child_name]
      ,member.[directory_id], jira_user.display_name
  FROM [jiradb].[jiraschema].[cwd_membership] member
left join [jiradb].[jiraschema].[cwd_user] jira_user
ON member.child_name = jira_user.user_name
order by parent_name

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.