Live data from Hacker News

An integer formula for Fibonacci numbers (2015)

blog.paulhankin.net

11–20 of 20 posts

Re: An integer formula for Fibonacci numbers (2015)

#11
post #6

Earlier quoted context omitted.

Indeed, what's the point to ask someone to write a fizzbuzz when it's already been done to the highest of professional enterprise standards! [1] [1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

I'm gonna need a write up. I've been looking at the code for 10 or 15 minutes and I still haven't found "fizz", "buzz", or the number 100 anywhere in the code. It's amazing.

I have no idea either, but those are "constants", and so it is only logical that they belong in com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.Constants (https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...).

Re: An integer formula for Fibonacci numbers (2015)

#12
Another article on the HN front page also talks about computing Fibonacci numbers quickly.

"Automatic Algorithms Optimization via Fast Matrix Exponentiation (2015)" ; https://news.ycombinator.com/item?id=17592359 ; https://kukuruku.co/post/automatic-algorithms-optimization-v...

Re: An integer formula for Fibonacci numbers (2015)

#13

Earlier quoted context omitted.

I'm gonna need a write up. I've been looking at the code for 10 or 15 minutes and I still haven't found "fizz", "buzz", or the number 100 anywhere in the code. It's amazing.

I have no idea either, but those are "constants", and so it is only logical that they belong in com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.Constants ( https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... ).

I think it’s really shortsighted to hardcode them statically into constants. You’d have to build a completely new binary should the requirements someday change! Obviously they belong behind a configuration interface, an instance of which can then be dependency injected to places that need them. In this way you can easily supply them from whatever source you like, such as a properties file, XML document, a database or even a web service.

As it is now, 2/10 would not pass review.

Re: An integer formula for Fibonacci numbers (2015)

#14
post #2

Now you're really gonna' piss the interviewers off! http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/

Neat text. I'd be really impressed if I were to interview him, but then again: I'd never ask someone to write a fizzbuzz... hmmm... Edit: I actually tried a FizzBuzz myself and I actually like it. I get why people were to ask it at interviews since it does require you to think for a second (if you haven't done it before) so you can easily filter out people who can't think

It doesn't require you to think - it makes you think there is an elegant solution but there isn't really. I suspect you've done it wrong.

Re: An integer formula for Fibonacci numbers (2015)

#16
post #6

Earlier quoted context omitted.

Neat text. I'd be really impressed if I were to interview him, but then again: I'd never ask someone to write a fizzbuzz... hmmm... Edit: I actually tried a FizzBuzz myself and I actually like it. I get why people were to ask it at interviews since it does require you to think for a second (if you haven't done it before) so you can easily filter out people who can't think

Indeed, what's the point to ask someone to write a fizzbuzz when it's already been done to the highest of professional enterprise standards! [1] [1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

IsEvenlyDivisibleStrategyFactory.java ... now I remember why I hate java.

Re: An integer formula for Fibonacci numbers (2015)

#17
post #6

Earlier quoted context omitted.

Neat text. I'd be really impressed if I were to interview him, but then again: I'd never ask someone to write a fizzbuzz... hmmm... Edit: I actually tried a FizzBuzz myself and I actually like it. I get why people were to ask it at interviews since it does require you to think for a second (if you haven't done it before) so you can easily filter out people who can't think

Indeed, what's the point to ask someone to write a fizzbuzz when it's already been done to the highest of professional enterprise standards! [1] [1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

Needs more AWS Lambda, this is outdated.

Re: An integer formula for Fibonacci numbers (2015)

#19
post #13

Earlier quoted context omitted.

I have no idea either, but those are "constants", and so it is only logical that they belong in com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.Constants ( https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... ).

I think it’s really shortsighted to hardcode them statically into constants. You’d have to build a completely new binary should the requirements someday change! Obviously they belong behind a configuration interface, an instance of which can then be dependency injected to places that need them. In this way you can easily supply them from whatever source you like, such as a properties file, XML document, a database or…

Sounds like Spring ConfigurationProperties https://docs.spring.io/spring-boot/docs/current/reference/ht...

Re: An integer formula for Fibonacci numbers (2015)

#20
post #19
post #13

Earlier quoted context omitted.

I think it’s really shortsighted to hardcode them statically into constants. You’d have to build a completely new binary should the requirements someday change! Obviously they belong behind a configuration interface, an instance of which can then be dependency injected to places that need them. In this way you can easily supply them from whatever source you like, such as a properties file, XML document, a database or…

Sounds like Spring ConfigurationProperties https://docs.spring.io/spring-boot/docs/current/reference/ht...

I'm utterly unsurprised.
Post reply on HN