Profile

Cover photo
Ian Ni-Lewis
Works at Google
6,265 followers|488,365 views
AboutPostsPhotosYouTube

Stream

Ian Ni-Lewis

Shared publicly  - 
 
Want to see something cool? +Glenn Kasten​ and I collaborated on this explanation of what's going on with Android audio latency. Glenn had this analogy that I loved, about a chicken crossing the road. I just had to go nuts with it. So here's my first ever fully animated Blender cartoon. The really good models are from Creative Commons sources, but I did model the road, the fence, and the 'Colonel.' :-)
7
3
Ian Ni-Lewis's profile photoThomas Brand's profile photoRaul Santos's profile photoKristan Uccello's profile photo
2 comments
 
+R Palan Nice tool! I've been looking for something like this. Too bad there doesn't seem to be an Android version. :-(
Add a comment...

Ian Ni-Lewis

Discussion  - 
 
I got tired of pointing people to the "Typical C++ Bulls**t" slide show whenever I wanted to make a point about batch processing--mostly because I don't think C++ bears all that much blame. So here's my rant, based on a performance bug Colt referred to me last week.
I’m probably going to tell you a hundred more times
11
3
Jimmy Leonardo's profile photoWolfgang Reithmeier's profile photo
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
My post about computers and repetition now has a fancy title image. Does it make the post better? I don't know! But it sure does make you scroll down a little before you read it!
I’m probably going to tell you a hundred more times
9
8
Cristian Garcia's profile photoRussell Wheeler's profile photoHYng Hwang's profile photoRebecca Huang's profile photo
 
I spend more time on the fancy title image than writing the articles! I would say it shows in the quality of the articles, but then, there is the fancy title image!
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
Another Android Performance Patterns video!

The key thing to remember is not that allocations are expensive per se. It's that they can block on lock acquisition. This kind of issue is insidious, because lock contention can be a rare and unpredictable condition. It increases your worst case frame time without much affecting your average. It's wise to keep it out of the critical path.
 
100 days of Google Dev, Episode 23/100

Calling new() inside of onDraw() is a good way to get nagged by Android Studio and Lint. But why would an allocation in onDraw() be worse than an allocation anywhere else? Ian Ni-Lewis explains why onDraw() is no place for new objects.

#GoogleDev100 #PERFMATTERS

https://goo.gl/0vFfnx
1 comment on original post
5
1
Scott Olcott's profile photo
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
I finally switched over to a Nexus 6, since my Nexus 5 got tweaked somehow and stopped wanting to talk to the cellular network. All I can say is, I finally understand the wearables craze. After a day of having to pull this beast out of my pocket whenever I want to check the time, I'm jonesing for a watch. :-)
10
Srdjan Pantic's profile photo
 
Nexus 5 forever!
Add a comment...

Ian Ni-Lewis

Discussion  - 
 
The most exciting announcement at I/O to me was the news that the NDK is no longer a third-class citizen on Android. It might not be in first class just yet, but it's at least moved to premium economy.

I'm curious to see how you folks end up using the NDK, now that it's no longer targeted solely at masochists and game developers.

Should we all start using C++ to write Android apps? Well, no. There's a cost to transitioning between native code and managed code, including a lock acquisition (which, as you know, should be treated as a call that may block indefinitely.) It's orders of magnitude more complicated than a Java function call. Chances are, there's a lot of code in your app that interacts with the Android Framework in Java, and the last thing you need is to add a massive perf penalty to every framework method call.

In addition, Android's ahead-of-time bytecode compiler isn't too shabby. It's not hard to find benchmarks showing AOT code running just as fast as native code. 

But there are some areas where the NDK is a clear win. It comes back, once again, to JNI overhead. Most of the Android framework is written in Java, but a large part of it is in C/C++. For instance, almost every method in the current Java OpenGL implementation is a wrapper around native methods. Same goes for MediaCodec (in L+),* and much of Canvas. Calling those methods from Java incurs the same overhead as a call from native code to the framework. 

The NDK doesn't expose all of Canvas, and MediaCodec isn't a very chatty API, so writing native code for those components doesn't seem too attractive. But OpenGL? Oh hells yeah. That API is super chatty. As an added bonus, it uses a lot of floating-point math, which is something C++ is pretty good at (especially if you use NEON, which you can't do from managed code right now).  So I think I can make a pretty good case for moving my GL code to native.

I'll be experimenting with some other use cases over the summer-well, I will as soon as +Xavier Ducrohet releases the long-awaited C++ plugins for Android Studio. Just knowing that they're almost ready to ship makes it impossible for me to go back to Eclipse right now. :)

*Previously the NDK's MediaCodec implementation called back into Java, which then called back into C, so it was kind of the worst of both worlds.
6
Add a comment...
Have him in circles
6,265 people
Aberdine Miquela's profile photo
James Green's profile photo
Arash Bizhan zadeh's profile photo
Alexander Demenshin's profile photo
Girish G's profile photo
Johannes Borchardt's profile photo
Jack Ware's profile photo
101apps.co.za's profile photo
Jessica Mosa's profile photo

Ian Ni-Lewis

Shared publicly  - 
 
This cider is LEGIT. From Vancouver Island, B.C., with no back sweeteners or any of the crap that goes into mass market American ciders. Love it. 

Ooh. Not sure about their "Prohibition" bottling, though. It's aged in rum casks and the apple flavor gets lost in the molasses. Try "Kings and Spies" instead. It's nothing but a great blend of cider apples. 
6
Corbin Hart's profile photoChristopher Tate's profile photoMichael Panzer's profile photo
3 comments
 
There is American cider? Any examples and advice for my next trip to the States? Here in Europe Bulmers, Stronbow and Magners are the big ones.
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
My first Medium article. More to come.
3
1
Raj Mal's profile photo
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
Check it out, my first Android Performance Patterns video has finally posted! I did most of the work on this almost six months ago, but had to go back to the recording studio three times before we got a take that we were all happy with. 

This is the first time I used Blender animation in a DevByte. Every shot with a phone in it is modeled in Blender and rendered with Cycles. The end result probably doesn't justify the effort, but hey, I got to learn something new. :-)
 
100 days of Google Dev, Episode 16/100

Transparency & Alpha is one of those awesome visual effects that helps communicate important details to the user, but sometimes it costs more than it has to. In this video, +Ian Ni-Lewis discusses the secret performance costs of using transparency on Android, and all the tips & tricks needed to help you find, and fix them.

#GoogleDev100
https://goo.gl/oHXXZX
3 comments on original post
12
2
Sarah Rowberry's profile photoRaph Levien's profile photoServando Pestano's profile photoJames Vanaria's profile photo
3 comments
 
I think you stumbled on "view hier-hierarchy". No, seriously, good stuff. Now I wanna make one of my own, so people on the Internet can pick apart all my mistakes too.
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
I just got a link from +Raph Levien to a beautiful little essay with scipy code, html, and charts & graphs all interleaved, and I had to find out how he made it. Turns out there's a whole set of tools now to do this sort of thing. No more cutting and pasting SciLab graphs for me!
3
Add a comment...

Ian Ni-Lewis

Shared publicly  - 
 
Amanda and Anton get big bike helmets! Their heads are already too big for the "kids 5+" size, so we got them Giro "universal youth" helmets. The straps are super adjustable so the fit is nice and snug even though the helmet looks kind of comical on tiny little Anton. :-)
2
Constance Lewis's profile photo
 
Amanda and Anton look daarling in the helmets!
Add a comment...
People
Have him in circles
6,265 people
Aberdine Miquela's profile photo
James Green's profile photo
Arash Bizhan zadeh's profile photo
Alexander Demenshin's profile photo
Girish G's profile photo
Johannes Borchardt's profile photo
Jack Ware's profile photo
101apps.co.za's profile photo
Jessica Mosa's profile photo
Basic Information
Gender
Male
Apps with Google+ Sign-in
  • Checkers 2
  • Boom Beach
  • Syberia 2
  • Bridge Constructor Playground
  • TowerMadness 2
  • Epic War TD 2
Story
Tagline
I write code
Work
Employment
  • Google
    Developer Advocate, 2009 - present
  • Intel Corporation
    Engine Architect, 2008 - 2009
  • Xbox
    Software Engineer, 2002 - 2008
  • Acclaim Games
    Engine Architect, 2000 - 2002
  • Citrix Systems
    Software Engineer, 1999 - 2000
  • Erudite Software
    Game Programmer, 1992 - 1999
Links
Contributor to