Live data from Hacker News

Amazon CodeGuru – Preview

aws.amazon.com

111–120 of 209 posts

Re: Amazon CodeGuru – Preview

#112
post #110

One of their screenshot examples flags inefficient code in crypto libraries, and the suggested "fix" is "Evaluate switching to the Amazon Corretto Crypto Provider ACCP". I don't know enough about the subject matter area to know whether that's the right move, but it's interesting that CodeGuru is apparently, among other things, an opportunity to pay Amazon to upsell you on replacing some of your code with one of the p…

Amazon Corretto is their OpenJDK Java distro that is free and Open Source. I don't know if the project was already using Corretto or not, but it makes sense for them to recommend their own, supported, open source solution.

Re: Amazon CodeGuru – Preview

#113

"Amazon CodeGuru is a machine learning service for automated code reviews and application performance recommendations. It helps you find the most expensive lines of code that hurt application performance..." I suspect if AWS is using customers code bases to train its AI models? Another source is to scavenge open source repositories.

"CodeGuru’s machine learning models are trained on Amazon’s code bases comprising hundreds of thousands of internal projects, as well as over 10,000 open source projects in GitHub" - from the article.

Could Amazon really have that many internal projects? That doesn't seem right.

Re: Amazon CodeGuru – Preview

#114
> CodeGuru is inexpensive enough to use for every code review and application you run

> For example, if you have a typical pull request with 500 lines of code, it would only cost $3.75 to run CodeGuru Reviewer on it

Wat?!

Come on, $4 per review is not inexpensive, especially for what is essentially a glorified SAST!

Re: Amazon CodeGuru – Preview

#115
post #31

Earlier quoted context omitted.

Generated code is an artifact of the source code. If you need it for something specific, regenerate it from the source when you pull that from your version control system. You're not getting any benefit by storing something that can be generated alongside the means to generate it.

Thank you for your response. The advantages you get: * Hermetic builds are faster because code-gen only occurs when changes occur in the base code * Lots of docgen tools don't support incremental compilation * Diffs in generated code show up as diffs when you change the code-gen tool, easier to isolate changes that occur if your code-gen tool is upstream (say you want entire org on Thrift 0.9.2 from Thrift 0.8) Downs…

> Source of truth is now the generated code, not the source, so someone else using the source could get a different result.

This seems to apply to the other side, I think. Generating from source with different tooling or tool versions could create different results, whereas using the generated code guarantees consistent behavior.

Re: Amazon CodeGuru – Preview

#116
So let me get this straight:

Amazon packages open source software (Linux, Postgres etc) in a way that is an abstracted service (RDS, EBS, Elastic Load Balancer). They add so many abstracted building blocks that you need a special skill set to manage them (Aws Certified Solutions Architect) instead of knowing how to do this with bare metal or a container image running in your own data center.

And now that things are complicated and developers might make mistakes using those services, they add a profiler that inspects your code running in production and a reviewer that ties into the stage before deployment. All just to optimize the use of their own services.

From a business perspective this is an awesome way to get vendor lock-in to a much higher degree. They are basically the certifying authority that tells you if your intellectual property (your code) conforms to their own standard. Yes, they show examples of standard Java optimizations, but it clearly says it detects deviation from best practices for using AWS APIs and SDKs.

And people were mad at Microsoft for shipping a non standards compliant browser as default and enriching it with HTML tags and plugins that would only work in that browser. Little did we know.

I personally wait for the "Amazon Compliant Code" label in the not too distant future as a selling point for business people.

Re: Amazon CodeGuru – Preview

#117
post #116

So let me get this straight: Amazon packages open source software (Linux, Postgres etc) in a way that is an abstracted service (RDS, EBS, Elastic Load Balancer). They add so many abstracted building blocks that you need a special skill set to manage them (Aws Certified Solutions Architect) instead of knowing how to do this with bare metal or a container image running in your own data center. And now that things are c…

> "Amazon Compliant Code" label

Wow, this is a scary but very real thought.

Though, the "Certified Windows XP / 7" stickers on hardware and video games / other software was quite common back in the day and isn't too dissimilar.

I would argue that the level of vendor lock-in Amazon is going for is far greater than Microsoft's.

Re: Amazon CodeGuru – Preview

#118

Disclaimer: I work at AWS on an unrelated team. I was not involved in development of this product. Opinions stated are my own, and not necessarily a reflection of my employer. Nothing here is being posted in any sort of official capacity. There's lots of focus here in the comments on the code reviewer portion, but one of the things I'm most excited about is the profiler - https://aws.amazon.com/codeguru/features/ I d…

A profiling tool I want to try out—it seems almost magical—is Coz. It can estimate the effect of speeding up any line of code. It does this by pausing (!) other threads, so it gives a 'virtual' speed up for that line.

What's interesting is that this technique correctly handles inter-thread effects like blocking, locking, contention, so it can point out inter-thread issues that traditional profilers and flame graphs struggle with.

Summary: https://blog.acolyer.org/2015/10/14/coz-finding-code-that-co...

Video presentation: https://www.youtube.com/watch?v=jE0V-p1odPg&t=0m28s

Coz: https://github.com/plasma-umass/coz

JCoz (Java version): http://decave.github.io/JCoz/ and https://github.com/Decave/JCoz

Re: Amazon CodeGuru – Preview

#119
post #53

Earlier quoted context omitted.

How so? There is so many things that we sometimes forgot. Even experienced developers will make mistakes.

If you relieve the programmer of thinking where his error is and give him the fix, the programmer will not bother to reason out what the solution is, he will simply expect it from you.

Do you really think that what we do and don't have to think about today is at some holy division of things that are best left automated (e.g. garbage collection, platform independence, serialization) and things we have to do by hand? Why is this particular point in time special?

It's a spectrum. Now isn't special.

Re: Amazon CodeGuru – Preview

#120

Code review is not linter. Code review is a chance to discuss design, scaling, trade-offs and mentor others. I don't think this solution will offer it.

> Code review is a chance to discuss design, scaling, trade-offs and mentor others. Trade offs sure but design and scaling need to be considered _before_ the code review. Maybe an architecture review of sorts? Once you hit code review it's a little too late to reconsider design and scale unless it's a serious issue. > mentor others Mentoring is mostly outside of a code review. Sure it can help with that but I don't t…

> Mentoring is mostly outside of a code review

Strongly disagree, at least for remote teams.

Working remotely, I've personally found code reviews to be a great way of mentoring less experienced team members.

I also encourage junior team members to review code of more experienced team members.

For big changes, we discuss proposal/API/code reviews as a team.

I've had several people provide feedback that they've learned a lot from reviews like this, and honestly I wish I'd had this kind of mentoring when I started out (I was basically a one-man cowboy-coder for the first 5 years or so of my career).

I know mentoring can be seen as a chore for many, but it can be seriously rewarding too!

Post reply on HN