Live data from Hacker News

Amazon CodeGuru – Preview

aws.amazon.com

91–100 of 209 posts

Re: Amazon CodeGuru – Preview

#91
post #37

Next step is to provide automated fixes. I've have a side project that does it for Go source code: https://fixmie.com (have plans for other languages and protocols). But due my Visa situation here in the US (H1B), I'll be never able to monetize it as it's illegal to have a side income. But I think this is just the start and there is an huge opportunity for new startups and projects.

My hot take is that if you can automatically detect meaningful bugs or author fixes, you need to level up your abstraction.

I think these things make the most sense for Java and Go where there tends to be lots of repetition and lower-order programming patterns.

Unlike say, Python, Lisp, or Rust.

Re: Amazon CodeGuru – Preview

#92
post #3

The code review feature seems too expensive to run on every PR automatically (to me): $0.75 per 100 lines of code. From their example pricing: "if you have a typical pull request with 500 lines of code, it would only cost $3.75 to run CodeGuru Reviewer on it." I wonder if it's actually good enough to justify that price.

If it’s trained on software written by Amazon it’s probably worth the $3.75 just so you can do the exact opposite of what they recommend.

I concur that Amazon's engineers suck. Source: They have rejected me twice.

Obviously have no clue what they're doing.

Re: Amazon CodeGuru – Preview

#93
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 do a lot of performance engineering work, and one of my go to tools for visualizing where programs are spending their time is flamegraphs. While you can certainly create them with profilers besides CodeGuru (and I do not work with Java, so I haven't yet had the chance to check out CodeGuru for any of my use cases), I'm super excited about anything that gets more people using them. They make it very easy to see where your optimization opportunities are, and I have personally found them very useful when working with our customers - they're way easier, in my opinion, to go through and explain than just looking at raw perf output or similar.

Re: Amazon CodeGuru – Preview

#94

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.

If you're discussing design and scaling at code review, you have a serious, SERIOUS, problem. That's what design docs are for.

Re: Amazon CodeGuru – Preview

#95
post #31

Earlier quoted context omitted.

What would the rationale be for that?

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)

Downsides I can see:

* Large repo.

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

Essentially acting in an empirical mode of operation (i.e. does it provide benefits for cost), and ignoring any philosophical objections, this seems like it could go either way depending on the situation.

Re: Amazon CodeGuru – Preview

#96

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.

Fair enough about the design discussions, but I also think this is quite a little bit more than a linter.

Re: Amazon CodeGuru – Preview

#97
post #37

Next step is to provide automated fixes. I've have a side project that does it for Go source code: https://fixmie.com (have plans for other languages and protocols). But due my Visa situation here in the US (H1B), I'll be never able to monetize it as it's illegal to have a side income. But I think this is just the start and there is an huge opportunity for new startups and projects.

My hot take is that if you can automatically detect meaningful bugs or author fixes, you need to level up your abstraction. I think these things make the most sense for Java and Go where there tends to be lots of repetition and lower-order programming patterns. Unlike say, Python, Lisp, or Rust.

I’ve never programmed in Java or Go in any serious context. What do some of those repeated patterns look like?

Re: Amazon CodeGuru – Preview

#98
post #21

I found what it generates. https://github.com/pediredla/Algorithms/pull/3/files It looks like a linter, but maybe there is more.

I've never seen a linter tell me problems with code in this detail before: > You are using a `ConcurrentHashMap`, but your usage of `get()` and `put()` may not be thread-safe at lines: 110, 113, 135, and 137 . Two threads can perform this same check at the same time and one thread can overwrite the value written by the other thread.

Pretty sure you can turn on that inspection in IntelliJ. The other ones are much more impressive. The 'waiters' one for instance is gold.

Re: Amazon CodeGuru – Preview

#99

Earlier quoted context omitted.

I'd be very surprised if the service they've announced is a linter. The announcement says it can even analyze parts your code that are more computationally expensive than they need to be. I'm not sure I understand the skepticism--surely they have among the largest code repositories in the world. Why couldn't they train models on it to look at best practices and even compare code practices to different metrics.

Isn't this just calculating the cyclomatic complexity?

No - OP meant computationally expensive, not cognitively expensive. Two nested for-loops can be O(nˆ2) but can have a cyclomatic complexity as low as 1.

Re: Amazon CodeGuru – Preview

#100
post #3

The code review feature seems too expensive to run on every PR automatically (to me): $0.75 per 100 lines of code. From their example pricing: "if you have a typical pull request with 500 lines of code, it would only cost $3.75 to run CodeGuru Reviewer on it." I wonder if it's actually good enough to justify that price.

If it’s trained on software written by Amazon it’s probably worth the $3.75 just so you can do the exact opposite of what they recommend.

I don’t have much context, but I’ve never seen Amazon as a technical leader in the industry. They’re absolutely a business leader, and the services they provide can be good, but at a code level I’ve always thought of them as very MVP, if it works it’s good enough.

For code review services I’d expect a level far above this. Maybe they are able to do that, but I don’t have any existing positive bias towards this, and a few things against it.

Post reply on HN