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.

Coding tricks I learnt at Apple

192 pointsby whiskersalmost 14 years ago

15 comments

BrandonMalmost 14 years ago
<i>&#62; These tests were run against a copy of the live database in a production environment.</i><p>This is pretty terrible from a security standpoint. A development environment is typically much less secure than the live environment, and for good reason. The development environment must be accessible to developers, typically both on-site and remote. All developers have access to test databases for the purpose of testing their changes. There are often many more software packages in a development environment, and development servers have a higher probability of running vulnerable services. Live environments typically have much better logging and auditing.<p>Every company should have a program that can be run to sanitize the live database for use in testing. I've seen too many situations where the production environment was appropriately locked down and audited, but the development environment was compromised. It's not unheard-of for a developer to lose possession of his laptop, and if it contains a copy of the live database it's no better than the site, itself, being compromised.
评论 #2642621 未加载
评论 #2641809 未加载
评论 #2641799 未加载
评论 #2642045 未加载
tptacekalmost 14 years ago
Hash tables are worst-case O(n) time.<p>B-trees are an external storage technique; he means balanced binary trees.<p>The answer to the interview question is another question: "what operations does the container need to support?". It's not "hash tables are O(1)".
评论 #2641524 未加载
评论 #2641855 未加载
评论 #2641600 未加载
评论 #2642695 未加载
unshiftalmost 14 years ago
no real tricks here, this guy just seems happy he worked on a team with professional standards. thorough testing like that is, while not the norm, pretty commonplace at most of the better places i've worked.
评论 #2641256 未加载
评论 #2642705 未加载
评论 #2641506 未加载
sc68calalmost 14 years ago
<i>We had one, highly specialized piece of software code which could only be checked out, worked on, and checked in by a single engineer at a time. You were only allowed to touch this piece of code if you possessed a physical token.</i><p>Ahh, the all powerful Source Control Shingle: <a href="http://thedailywtf.com/Articles/The-Source-Control-Shingle.aspx" rel="nofollow">http://thedailywtf.com/Articles/The-Source-Control-Shingle.a...</a>
评论 #2641093 未加载
评论 #2641086 未加载
edwalmost 14 years ago
Perhaps I'm too attuned to NDA issues after having listened to the most recent episode of Gruber's Talk Show (<a href="http://5by5.tv/talkshow/46" rel="nofollow">http://5by5.tv/talkshow/46</a>), but I am guessing that this guy is coming dangerously close to — and is perhaps crossing — the line with respect to disclosing details about Apple's technology and software development practices.<p>When in doubt, STFU. Not just for legal reasons, but also because you don't want future collaborators and employers thinking you're a Chatty Cathy who's going to tell everyone about your secret sauce.
评论 #2641545 未加载
评论 #2641571 未加载
评论 #2641522 未加载
评论 #2642236 未加载
评论 #2642728 未加载
svdadalmost 14 years ago
So this is all well and good if you work with a team like this. But I have two questions:<p>(a) How do you find out, before going to work somewhere, whether they actually work like this? Are there questions you can ask? Word of mouth? ... ?<p>(b) If you don't work somewhere like this, how do you start putting professional processes in place? Assuming in particular that you have never actually worked somewhere like this, so you can't speak from experience, only from instinct about what seems to be a good way of working.
评论 #2641862 未加载
评论 #2641863 未加载
lambyalmost 14 years ago
&#62; We had one, highly specialized piece of software code which could only be checked out, worked on, and checked in by a single engineer at a time.<p>Why? Also, is this common these days?
synnikalmost 14 years ago
Wait a sec - "it was always an interesting experience to turn the store back on after Steve Jobs walked off stage following one of his keynote presentations"<p>??<p>Does Apple seriously turn off their store while Jobs talks? Or is he talking about pushing new content out based on announcements?<p>The former just sounds... Odd.
评论 #2641893 未加载
评论 #2641869 未加载
评论 #2642713 未加载
评论 #2641867 未加载
评论 #2642244 未加载
tszmingalmost 14 years ago
It seems to me that the author was very proud of the O(1) sophisticated caching algorithms invented at Apple.
stretchwithmealmost 14 years ago
I was thinking the physical token would have had a USB connector that you actually had to plugin to use it.
steilpassalmost 14 years ago
"Before writing any production code, we'd write our unit tests." With XCode? Somehow I have my doubts.
评论 #2641486 未加载
评论 #2643767 未加载
kevinburkealmost 14 years ago
How can I learn how to test like Apple does? I feel like I don't know where to look for good resources on thorough website testing.
vildaalmost 14 years ago
I'm afraid the methodology described has little to do with Steve Jobs.
benihanaalmost 14 years ago
<i>When you're asked, during a job interview, which is the fasted lookup function, don't, as is very common, say, "a B-tree." Perfect hash tables always win, hands down.</i><p>Wait, saying a B-tree is the common answer?
评论 #2641377 未加载
seanp2kalmost 14 years ago
&#62;"Coding tricks I learnt at Apple"<p>I'd wager "learning how to properly use 'learned'" wasn't one of them.<p><a href="http://www.urch.com/forums/english/9214-learned-vs-learnt.html" rel="nofollow">http://www.urch.com/forums/english/9214-learned-vs-learnt.ht...</a> "The <i>descriptive</i> answer in American English is: There is no such word as "learnt". Use "learned" always."
评论 #2641205 未加载
评论 #2641448 未加载
评论 #2641208 未加载