3 ms·
Re: FizzBuzz, one factor could be that it's deeply procedural/imperative in nature. Whereas HTML, CSS, and functional programming styles (which rule the JS worl
by _bxg1 7y ago
Re: FizzBuzz, one factor could be that it's deeply procedural/imperative in nature. Whereas HTML, CSS, and functional programming styles (which rule the JS world and quite a few others right now), have you thinking declaratively. If, like me, that's most of what you've been doing for the past couple years, FizzBuzz may take you a second because you have to dust off a different way of thinking. If you learned on declarative/functional stuff - in a web dev bootcamp for example - and never had exposure to anything outside of those practical skills, you may be totally lost.
Is that a bad thing? Probably. Computers are, at their base, imperative. So it's important to have a grasp on that way of thinking. But does it mean these people who've held "programming" jobs are frauds who don't know how to program at all? Not necessarily, I don't think.
- mathw 7y agoIf that's the case, you can solve FizzBuzz using a declarative style in JavaScript, surely? It's pretty trivial in Haskell, which is declarative all over.
- _bxg1 7y agoIt's a little more natural in languages like Haskell and Python that have range generators; JS doesn't. You can do a hack where you initialize a sized array and then map over its indices, but that's unusual. Part of it may have been that the problem description I read used very imperative language. It didn't say "return a list of Fizz, Buzz, and FizzBuzz", it said "for each number that's ___, print X". Very side-effect-y.
- _bxg1 7y agoAnother thing is modulus. I know off the top of my head that mod == 0 means a number is divisible by another number because we used it all the time in my college programming assignments. People without a formal background may not even know what modulus is; there are lots of programming domains where it's not really useful.
- LyndsySimon 7y ago> there are lots of programming domains where it's not really useful. Off the top of my head, I can't think of any. Even if all you're doing is a simple CRUD app, alternating attributes on a list you're outputting to HTML is easily done with `if i % 2`.
- _bxg1 7y agoI'd do that particular case with CSS In five years since graduating I haven't used modulus outside of toy code challenges