TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reverse Engineering One Line of JavaScript

114 pointsby akras14almost 8 years ago

4 comments

cyberferretalmost 8 years ago
Nice. But it does highlight a trend in modern programming languages such as Ruby etc. where these one line shorthand methods are used to such an extent these days that new programmers to the project have to spend an inordinate amount of time reverse engineering some of these shortcuts to make sense of program flow and understand the program in their heads.<p>Take the simple, quick initialiser:<p><pre><code> foo ||= 1 </code></pre> Instead of the more verbose<p><pre><code> if foo.nil? foo = 1 end </code></pre> Undoubtedly, the first line is a much cooler version, but like skinny jeans was once cool - getting in and out of them far outweighed the cool factor.
评论 #14769183 未加载
评论 #14768247 未加载
评论 #14768652 未加载
评论 #14769115 未加载
评论 #14769880 未加载
评论 #14769727 未加载
评论 #14768607 未加载
zspitzeralmost 8 years ago
I&#x27;d forgotten that setInterval will evaluate a string
dynamoaalmost 8 years ago
Isn&#x27;t this called un-obfuscating rather than reverse engineering?
评论 #14770095 未加载
评论 #14768232 未加载
评论 #14767934 未加载
评论 #14769750 未加载
thinkMOARalmost 8 years ago
Neat, enjoyable read for the friday afternoon.<p>Q: Whats that math&#x2F;graphing app you have screenshots of?
评论 #14769374 未加载