29 ms·
Behind enemy lines: 3 months as an iOS developer at Google
- interpol_p 14y ago"Same with merge conflicts on .pbxproj files - these files weren’t checked into source control." I use SourceGear DiffMerge as my default Git mergetool. Makes it pretty straightforward to merge .pbxproj files.
- Tloewald 14y agoGood to know. I've merged both xib and pbxproj files and while it's possible it's not pretty.
- archangel_one 14y agoFWIW, I do see the occasional iPhone at Google - but not many, of course. And no, the Nexus 4 wasn't an option for the Xmas present this year. Not totally surprising given the obvious trouble LG's having keeping up with demand.
- MatthewPhillips 14y agoMost people still using a Galaxy Nexus there?
- gbog 14y agoLast they got Galaxy Notes in Beijing, I purchased mine to a Googler with small hands.
- archangel_one 14y agoNo, mostly Nexus 4's, but they're generally prerelease devices - or I guess a few are bought separately. Still quite a few GNex's around of course.
- endtime 14y agoIn the NYC office, yeah, I mostly see the Galaxy Nexus.
- Peroni 14y agoBeen to many a meeting at Google HQ in London and almost everyone I've met there owns an iPhone.
- archangel_one 14y agoWhich building? Ours definitely isn't "almost everyone" but I can imagine the proportion might be different in CSG for example.
- Peroni 14y agoMost of my visits were to CSG. Granted the skillset in CSG is more sales & advertising as opposed to tech but still, it was quite funny to see. Completely unrelated: I'm in love with the carpeting in the London CSG office. I've never felt more compelled to take my shoes off in my life.
- archangel_one 14y agoI guess it makes a big difference that quite a few of us are actually on the Android team specifically. I know exactly what you mean about the carpets - a bunch of us went over a couple of times for beers, and we thought exactly the same :)
- bornhuetter 14y agoInteresting article. I was surprised the author ended it with "I only regret that i had to terminate my contract early due to out-of-my-control family reasons." Doesn't seem to me to be a great thing to have on your website for self promotion.
- jacquesm 14y agoMaybe his website is not about self promotion?
- robotnixon 14y ago"If you're looking for a good iOS developer, drop me a line!" Seems like he's at least partly using it for some self-promotion.
- SenorWilson 14y agoWithout it there would be lots of comments that questioned the reason for early termination.
- rednukleus 14y ago"Had to leave for personal reasons" would sound a lot better.
- jonknee 14y agoWhy does having an unexpected family problem have to do with being a problem for future clients? Everyone has had bad things happen, it doesn't mean anything. If my mom died during my last project I don't think that would harm my chances of getting a next project.
- bornhuetter 14y agoAs I have said in another comment: I originally misread the sentence as "out-of-control family reasons", missing the "my" - and the sentence is not as bad as I thought (or to put it another way, not necessarily bad at all). Unfortunately I can't edit or delete the original comment.
- trendnet 14y ago"Anyway, yes, there is a bit of anti-iOS sentiment there, you’ll be constantly teased about Obj-C’s strange syntax..." Ah, yes, and Java and C++ are all flowers and unicorns flying around.
- interpol_p 14y agoYeah I was struck by that line too. After 10 years as a C++ and Java developer, and 3 years of Objective-C, Objective-C is by far my preferred language (although it's an absolute must to use with an auto-completing IDE due to its wordiness).
- nicholassmith 14y agoI think it's mostly Obj-C's syntax is a bit of an oddity if you're a C/C++/Java/Python/Go (I think that's the main flavours in Google) developer who's never seen it before, but after spending some time in it it does make a lot of sense how it's been approached. Plus isn't syntax mocking the same as editor mocking? Expected and pointless.
- zem 14y agoexpected, pointless and not really taken seriously by anyone involved. it's just a fun social convention to identify with a team and mock the other team and it's adherents.
- morty16 14y agoI went from SmallTalk to Java/C/C++ in the mid-nineties. Obj-C is both a relief and a constant source of frustration.
- abrahamsen 14y agoI'd expect Smalltalk programmers to find Obj-C syntax much more natural than Java, C#, or C++.
- 14y ago
- nodata 14y agoLuckily, perforce has a fantastic graphical merge tool, which i’ve now adapted into my post-Google Git tooling. Anyknow know what he is referring to? Edit: anyone know what Git tool he is referring to?
- benvd 14y agoP4Merge, I would guess. (http://www.perforce.com/perforce/products/merge.html http://www.perforce.com/perforce/products/merge.html)
- djmdjm 14y agoI much prefer Meld (http://meldmerge.org/ http://meldmerge.org/) when I want a graphical tool, but usually just edit the conflicts in vim.
- nodata 14y agoOut of interest, do you have a good way to compare two parts of the same file using vimdiff without creating two files? Say a huge xml file with two nearly identical <parts></parts>?
- m0shen 14y agoYank the two parts into two new buffers (:vsplit) and do :diffthis in each
- benvd 14y agoI've actually never used a visual diff tool. Usually I just search the file for ">>>>>>>>>". Maybe I should check it out.
- josteink 14y agoAs someone who moved from perforce to VS/TFS2010 at work, the first thing everyone at the office demanded back was p4merge. It's a very good tool. Fortunately, with VS2012 the built in merge-tools has become much better and allows you to do inline editing in the basic compare/merge-view as well. Since VS2012, I can't say I don't miss p4merge, but I miss it a lot less.
- unwind 14y agoGoogle are very strict about things like code style guides, so things like having incorrect spacing, or ivars that aren’t in alphabetical order, or lines wider than 80 chars, will all get picked up. Is the part of instance variables having to be sorted alphabetically really true? I did a quick search but only found the C++ style guide, which says nothing like that. It sounds absurd, instance variables should (imo) be grouped logically, not sorted by their names which are not very relevant when it comes to which belong together.
- cryowaffle 14y agoDid you read the part about how it helps dealloc? I can see how that would be nice, if you don't have too many instance variables then it wouldn't be a big deal.
- unwind 14y agoNo, I missed that part ... I guess it makes some kind of sense, but it seems weird to assume that all instance variables need deallocation. If I have a buffer, and a length, I'd like to keep them together in the code since they both are part of the same thing. The length, however, is likely some integer type that won't need mentioning when destroying the instance.
- akmiller 14y agoBut, if you are forced to name alphabetically you might start naming those related instance variables in a related way (which wouldn't necessarily be bad). For example in your case you might have: myFileBuffer and myFileBufferLength which would hopefully be next to each other, no?
- jsnell 14y agoCan't say whether it's true, but the purported reason was stated in the article (same sorting used for declaration and for deallocation, to make reviewing for memory leaks easier).
- 14y ago
- um304 14y ago"Which explains things like android’s less-than-beautiful UI". They have improved their UI a lot in version 4 and above. I really like new artifacts they introduced such as ActionBars. You can see them implemented in GMail app and you can't label it "less-than-beautiful".
- myko 14y agoAndroid looks so much better than iOS in 4.0+ (on Nexus devices at least) that I'm surprised to hear people still say this. It's at least close (though to me it's no competition as to which OS is more aesthetically pleasing). That's not to say a lot of 3rd party apps on Android aren't horrendous looking, because that is true.
- securingsincity 14y agoPerhaps it is because he spent more on the source control process that I feel like this portion of the piece was really lacking. I would have liked to have heard a little bit more about google's design process.
- scorpion032 14y agoThey have improved a lot under Matias, who clearly has more than just a very good design sense (the ability to get it done.): https://plus.google.com/114892667463719782631/posts https://plus.google.com/114892667463719782631/posts
- lnanek2 14y agoI think they've been going the wrong way lately, personally. I have trouble figuring out all the unlabeled icons myself whenever I use an app I don't use every day. Took me a while to even figure out what happened to the foursquare check in button when it became a small tiny unlabeled icon. I know I can tap and hold, but I've never seen any one else do that, never seen a user do that in a user study, and it's a pain in the ass doing it for a ton of glyphs in an interface. I'm more likely to just assume functionality doesn't exist then go tap and hold on half a dozen icons. My users in apps I launch with the new style guidelines have horrendous times due to not noticing the main action is often an unlabeled icon with no chrome in the top right action bar, etc.. Often they flounder around in the app doing what they can tapping on content directly and never even try or notice the action bar icons. Do flat, chromeless, unlabeled icons look good? Yes, but they are about as unusable as possible. The worst thing is that we are forced to follow Google guidelines if we want to get featured, and their design guide is a piece of crap not backed up by user studies. So we developers end up implementing all these stupid work arounds, like a tutorial overlay the first time any screen is shown with a big freaking white arrow and some text pointing to the otherwise unnoticeable corner icons...
- nikolakirev 14y agoVery interesting read! Thank you for posting!
- cageface 14y agoI'm coming around to the point of view that storyboards cause more problems than they solve but throwing out xibs entirely seems a little extreme. Are they really doing all their layout in code?
- codewright 14y agoA relatively new to iOS engineer at my company does all his layout in code. Way more flexible.
- prawks 14y agoI essentially did this for my senior capstone at university, and it worked pretty well for my purposes. Granted, I was working mainly in data visualizations. I'd propose that doing so is actually not too bad of a thing if you're a) not rapidly prototyping, and b) need to manipulate the large majority of the UI in code anyways. I haven't made many more iOS apps after that, so I can't really say that with lots of experience, but still. As long as you're mindful of how you structure your code, it's not extremely difficult to maintain.
- _stephan 14y agoUsing code for layout has several advantages: - easier version control and code merging - you don't need Interface Builder to review the layout code - code is easier to search, e.g. for the use of certain controls (Xcode doesn't support searching XIB files) - code can be parameterized (you can e.g. use global constants for font sizes, colors and margins) - layouts that follows certain rules (fixed heights and margins etc) are sometimes easier to build with code, especially when the number of visible controls is variable or some controls are only optionally displayed - you can easily refactor aspects of the layout into reusable components (i.e. functions or classes)
- cageface 14y agoI'm a big fan of declarative layouts and vastly prefer doing Android UIs to iOS UIs for this reason. But that's only because Android has a sane & powerful layout language. Obj-C is so hideously inflexible and verbose for this kind of thing that I prefer to stick to xibs despite their limitations. Of course there will always be cases in iOS apps where layout in code makes more sense though.
- micampe 14y ago> Best case, your code is approved, you can then merge master into your branch and push your branch up to master. Isn't this backwards? The code should be reviewed after I merged master in my branch, the merge can introduce any number of random issues and conflicts that may substantially change the code being submitted. Besides, I think the 80-chars limit (especially in ObjC) is ridiculous, probably just put there by terminal diehards that make life harder for everyone else.
- RyanZAG 14y agoDefinitely - I'm guessing you would need to submit for merge for review as well? Maybe someone from Google can clear it up. The merge would be pretty likely to break things like alphabetical ordering that seems to be a terrible no-no at Google. ;)
- tiziano88 14y agoNormally those minor merge changes do not require another round of review, but it's up to the original author of the changelist to ask for it, in case the difference is substantial. Engineers are trusted to use their best judgement in such situations.
- lotu 14y agoI imagine the with a code base the size of Google you code is constantly being added so you have no hope of merging with the master branch and getting the code reviewed before someone else changes it.
- archangel_one 14y agoNot really - there are thousands of engineers and bazillions of files in the code base, but any single file you're working on is still unlikely to have hundreds of other engineers frantically changing it at the same time as you. The last company I worked at had 8 other engineers (at the most) and if anything I probably saw more merge conflicts there.
- cromwellian 14y agoUmm, nary an iPhone to be found? Most people I know at Google have an iOS product of some sort. Maybe it is different in Google Australia vs Mountain View, but Googlers aren't shy about Apple HW. I would say 50% of Googlers carry MacBooks.
- reidmain 14y agoMy understanding is that Googlers get a choice between a Apple computer (primarily MacBook Pro but I think iMac's are a possibility) or a computer running their customized version of Ubuntu. You can get a Windows machine but you need to jump through some hoops and paperwork to get it.
- archangel_one 14y agoThe standard dev setup is a Linux desktop and a Mac laptop (Macbook Pro / Air) or a ThinkPad. So unsurprisingly, you'll see a lot of Mac laptops, but not necessarily iPhones. Also, a Macbook doesn't run iOS. The article author is being more accurate with his terminology than you are, which might lead to the confusion.
- jmillikin 14y agoI work on Mountain View, and several people on my team have iPhones. The reason is that we have an oncall rotation, and nobody wants to miss a page because their phone kernel panicked or "PagerService has stopped" during their shift. Plus, the iPhone batteries last longer. I suspect the author's experience might be because he worked in an office where teams are located in closer physical proximity. It can be socially difficult to use an iPhone when the local Android team sits just down the hall.
- corresation 14y agoThe reason is that we have an oncall rotation, and nobody wants to miss a page because their phone kernel panicked or "PagerService has stopped" during their shift. Are you seriously trying to claim that there is a greater risk with a Nexus 4, for instance, of a pager service stopping or a kernel panic? Your post seems utterly ridiculous.
- Aqua_Geek 14y ago> Same with merge conflicts on .pbxproj files - these files weren’t checked into source control. Instead, there’s a Google open-source tool called GYP that generates your Xcode project from a JSON recipe and recursively searching the folders for source files. Wow. That sounds crazy. I feel that there's an opportunity here to make a merge tool that would know how to handle .pbxproj files. The most common scenario I've encountered is when multiple people add files to the project - they get appended to a section of the .pbxproj file and consequently result in a (easily-solvable) conflict. Part of me wonders why nobody at Apple has just gotten fed up with merge conflicts and solved the problem already.
- evmar 14y agoDiffs for pbxproj files are also not especially readable, so just a merge tool wouldn't be enough to make collaboration easy. Here's a recent diff of adding some files: http://trac.webkit.org/changeset/138661/trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj http://trac.webkit.org/changeset/138661/trunk/Source/WebCore... and the equivalent change in Gyp: http://trac.webkit.org/changeset/138661/trunk/Source/WebCore/WebCore.gypi http://trac.webkit.org/changeset/138661/trunk/Source/WebCore...
- lnanek2 14y agoGoogle has a similar situation for other languages, but rather than for merge issues, it is more a way to deal with the huge reams of libraries and software components and things like that available. GYP may do something similar. E.g. All code is in one codebase, but pulled out into a specific project by tooling, basically.
- davidjgraph 14y agoAm I the only one thinking that this contract was probably bound under an NDA, and that making such a post is generally bad practice leaving employment/a contract (regardless of whether there's an NDA). I know nothing ultra-secret is given away, but if I were looking for a contractor, I'd be concerned that such a person might perform a post-mortem on my company after leaving as well.
- eliben 14y agoI'll second this. I think such a post from a contractor is inappropriate, unless he cleared it with some Google authority, which I doubt he has.
- j_baker 14y agoWhat confidential information did he reveal?
- eliben 14y agoI don't know. But reading his post it's obvious he discusses a lot of details of the internal development methodology in Google which seems like something you should ask for approval to publish.
- j_baker 14y agoYou don't know that anything he said is confidential. You don't know that he didn't get approval for this, which you say he "should" do clearly without knowing anything about Google's policies. I'm also assuming you don't know what his NDA specifies. How can I construe this to not have you reaching a premature conclusion with too little info?
- eliben 14y agoI did say "... unless he cleared it with some Google authority, which I doubt he has." So what are you specifically objecting? My saying that I doubt he cleared it with Google? I'm entitled to my doubts, thank you :-)
- lnanek2 14y agoHaha, yeah, I worked with some ex-Googlers and experienced a similar review system. I often had multiple unrelated sections to work on while something was being approved, not to mention multiple iterations of the branch stuck in the approval bottleneck too. I guess other companies like Pivotal Labs get around this by pair programming, which I never thought of as an alternative to code review until now. Hmm.
- mattquiros 14y agoAs an Android developer who's required to learn iOS just to port one of my projects, I do find Objective-C's syntax to be strange--quite sloppy, in fact. I tried to list down the things I don't like about the language while going through my reference, and here are some of them so far: - Defining the method signatures in a header file or an @interface section, then repeating the same method signatures just to implement them in @implementation. I just think it's an awful waste of effort. - The idea of categories. The way I see it, there doesn't seem to be a reason not to subclass since categories won't make sense anyway if you don't include the original class in #import. - @optional directive in protocols. I think of protocols as Java interfaces, and I assume that's the intended purpose for having them, so having an @optional directive seems quite pointless to me. - Obscure variable scoping. I find myself having to memorize too many visibility rules--ones that apply to the objects themselves (what attributes they inherited, local/block scoping, etc.), ones that apply to files themselves (defining instance variables within @interface, global BUT in-file variables within @implementation, the extern keyword, etc.). This is much simpler and elegantly done in Java where you don't need to switch between thinking of your program as a bunch of interacting objects and as a bunch of files. - Which makes me think that Objective-C just doesn't have good OOP in the first place. - Conditional compilation. When is this ever useful? I just can't visualize having to write this (maybe for games?), but again, I never had to do this in Java.
- lnanek2 14y agoI've had to use conditional compilation quite a few times. Often due to strange things like target architecture and things like that. I noticed my native iOS stuff runs lightning fast, though. So think like you are writing souped up C code. You have to put up with header files and macros and conditional compilation sometimes for different versions of the app or to run on simulator architecture vs. real, etc. but it is very efficient building and running. Categories can be nice to avoid subclassing. Subclassing can become a nightmare when one controller extends another which extends another which extends the Google Analytics one. There's so much hidden behavior and you can't even easily disable the log spamming Google Analytics one easily. Not compiling in the init code gives you errors in the log all over.
- archangel_one 14y ago
- brown9-2 14y agoEveryone has a task list to work from, and for each task you ‘branch off’ (kindof, they use a customised version of an obscure source control system, but i’ll translate it into Git parlance). Is Perforce really that obscure?
- packetslave 14y agoTo be fair, Perforce tends to be adopted most often in the "big company, with really big codebase" use case. That's not typically the norm for IOS developers.
- aeturnum 14y agoI have friends who are barely aware of git, so I'm sure there are people out there.
- angersock 14y agoI'm not sure why you're being downvoted--the only reason I'd heard of Perforce was from the games industry in certain places.
- aeturnum 14y agoIronically, the friend I'm thinking of works in the games industry as well. However, they're on the smaller side, so their code base can be handled by pretty much anything.
- malkia 14y agoIt's widely used in video-games development. All metadata is kept on the server (unlike others like svn/cvs). The GUI tools are easy to use (p4win and p4v for all platforms). The thing just works. I love playing with git/hg/fossil/etc., but when comes to huge binary files (psd, tga, tiff, fbx) p4 is the king.
- malkia 14y agoMicrosoft also uses some kind of perforce based client (they bought/licensed some source code version of it many years ago).
- damniatx 14y agoI wish i can work for Google, but hearing their horror interview made me really afraid.
- kami8845 14y agoWhat's it gonna cost you to apply? Maybe an hour to prepare the CV + cover letter. Take it from there and if you really want the job solve all the problems of Cracking The Coding Interview.
- gdubs 14y agoI've had to resolve merge conflicts with pbxproj files and xib files, and while it's not pretty, it's not a good enough reason to eschew interface builder. There's a reason that toolset is still around since the NeXTStep days: it's powerful. It gets a lot of giggles from people who are less experienced with Cocoa / iOS, and think that programmatically defined UI is for 'real' coders. In my experience, the amount of time you save wiring-up an app with interface builder is significant. With the editor assistant screen open, you can even drag UI element outlets directly to your code, and it will automatically insert your property declarations (and same with method actions). The idea that I'm going to grok someone else's UI code at a glance -- the same way I would looking at a visual document -- is absurd. Does interface builder fit every situation? Absolutely not. But for the vast majority of apps, you'll get your rapid prototype finished more quickly if you use the tools, and then you can tweak from there.
- koko775 14y agoI stopped having merge conflicts with pbxproj files - ever - once I started making use of this tool in my projects: https://github.com/WebKit/webkit/blob/master/Tools/Scripts/sort-Xcode-project-file https://github.com/WebKit/webkit/blob/master/Tools/Scripts/s... It can be run while Xcode is open; it'll just reset the tree view. It basically alphabetizes everything, so there is one canonical ordering to items that you add to the project.
- deleted 14y ago[deleted]
- gilgoomesh 14y agoI second this. When you have a consistent, established framework for managing a part of your program that provides an easy to read, visual overview of that part of your program for new developers (or old developers who haven't touched the code in a while) and which can avoid thousands of lines of meticulous declarative code, you should have a better reason for avoiding it than pompously declaring that it's tricky to maintain computer generated XML in your version control system. For version control and XIBs... you should keep them as decomposed as possible (XIB files support soft links to sub-controllers allowing parents and children to be in separate files) and once fully decomposed, you shouldn't need to merge XIBs -- just treat them as monolithic. If you find yourself needing to merge then you've most likely failed to decompose your XIB enough or you've got too many people performing overlapping roles. If you need programmatic view adjustment, you can implement -layoutSubviews (iOS) or -resizeWithOldSuperviewSize: (Mac) you can handle programmatic reflow or other code-based tweaks if absolutely required Additionally, since a XIB file is a cached, serialization format, every view instantiated from the XIB after the first one loads faster than constructing the view in code.
- doktrin 14y ago>> However at Google it was noticeable that designs aren’t really taken seriously. Which explains things like android’s less-than-beautiful UI, and google’s generally noticeable lack of focus on design. This is something I have a hard time wrapping my head around. I am not a designer, and wouldn't even consider myself particularly good at it. However, there is no shortage of evidence to support the value and importance of good design. Therefore, I don't understand why any company or team culture would marginalize it. Can anyone comment on the extent of this culture at Google or elsewhere? Specifically, why it exists and how it's propagated.
- trentmb 14y ago"Man is a creature who can get used to anything, and I believe that is the very best way of defining him."
- racter 14y ago1. Many engineers are unable to recognize the merits of one design over another. But they have a finely tuned sense of engineering effort required to implement certain design features, so they literally see the cost of UX proposals without seeing the benefit. So they argue. 2. Many PMs believe that all design is subjective, and therefore it's perfectly reasonable to substitute their judgement for that of the UX'er. So they argue. 3. Google is a uniquely bottom-up culture, where consensus is required to move forward. These three things lead to design by committee, and it is extremely painful.
- doktrin 14y agoThank you. This was a very helpful response, and I appreciate you sharing it.
- TheSmoke 14y ago"But, more likely, your code has some mistakes or style violations and needs to be fixed up. So the reviewer puts comments against the relevant lines in a web-based review system, ..." is it rietveld? http://code.google.com/p/rietveld/source/browse/ http://code.google.com/p/rietveld/source/browse/
- Evbn 14y agoRietveld is a degoogled fork of it.
- drewda 14y agoInteresting to look at the product that he was working on: http://www.google.com/enterprise/mapsearth/products/coordinate.html http://www.google.com/enterprise/mapsearth/products/coordina... Based on the screenshots, it looks like something developed in-house for Google security guards. I wonder if Google can actually put the right kind of expertise and resources into selling these sort of specific IT solutions to non-technical organizations.
- austinl 14y agoI'm surprised Google chose to not use ARC for that project. Could anyone comment on why Google would use ARC for one thing and not another?
- michael_miller 14y agoRegardless of confidentiality issues, the post was definitely in poor taste. For example, he talks about "android’s less-than-beautiful UI". If I ever hired a contractor, and he posted something to that effect about one of my products, you can bet I'd never hire him again. It's extremely unprofessional, and a breach of trust. It's one thing talking about this stuff between friends, but another to badmouth your (former) employer to the public internet.
- vibrunazo 14y agoPosting just to bookmark it.