News for hackers. Stuff that matters.
Re:No CS Degree – Interviews with self-taught developers by Nevermindmyview on Tuesday July 23, 2019 @11:02AM (#20507268)
What kind of coding did you do for 6 years if after that time you couldn't identify a for-loop?
Re:No CS Degree – Interviews with self-taught developers by sct202 on Tuesday July 23, 2019 @11:35AM (#20507555)
Maybe they're was using Coffeescript with jQuery, and jQuery has some built in looping functions like .each that don't exactly look like a for loop.
Re:No CS Degree – Interviews with self-taught developers by arethuza on Tuesday July 23, 2019 @11:14AM (#20507356)
A Haskell developer?
Re:No CS Degree – Interviews with self-taught developers by Nevermindmyview on Tuesday July 23, 2019 @11:21AM (#20507413)
I'll bet a choklate bar that 100% of all developers who spent 6 year using Haskell knows what a for-loop is.
Re:No CS Degree – Interviews with self-taught developers by jerf on Tuesday July 23, 2019 @12:21PM (#20507911)
"for" is not that complicated, it's just mapM with its arguments pre-flipped: http://hackage.haskell.org/package/base-4.12.0.0/docs/Contro...

I don't know why you want to call that a "loop", but, sure, you do you, you crazy imperative programmers.

Re:No CS Degree – Interviews with self-taught developers by hutzlibu on Tuesday July 23, 2019 @12:48PM (#20508143)
Because it is a loop in any sane language ... you overheaded functional programmers ..

edit: Sigh. I was jockingly mocking.

Re:No CS Degree – Interviews with self-taught developers by s_dev on Tuesday July 23, 2019 @12:36PM (#20508025)
Haskell just enforces iteration through recursion.

How did he solve the iteration problem? A for loop is just syntactic sugar for a while loop.

Re:No CS Degree – Interviews with self-taught developers by hutzlibu on Tuesday July 23, 2019 @12:47PM (#20508128)
I doubt there are many Haskell developers (or one at all) without a academic background ..
Re:No CS Degree – Interviews with self-taught developers by alephu5 on Tuesday July 23, 2019 @01:19PM (#20508408)
I'm a self-taught developer with haskell in my arsenal, although that being said I have an MSc in theoretical physics which probably helps me appreciate the power of its paradigm.
Re:No CS Degree – Interviews with self-taught developers by hutzlibu on Tuesday July 23, 2019 @01:21PM (#20508433)
So you do have a academic background (especially math)..
Re:No CS Degree – Interviews with self-taught developers by inflatableDodo on Tuesday July 23, 2019 @01:28PM (#20508506)
Hi. Not an academic. Currently fiddling around with OpenGL on Haskell, for reasons.
Re:No CS Degree – Interviews with self-taught developers by tasuki on Tuesday July 23, 2019 @01:19PM (#20508414)
There definitely are! Eg Jezen Thomas. Hopefully in the future also myself :)
Re:No CS Degree – Interviews with self-taught developers by hutzlibu on Tuesday July 23, 2019 @01:26PM (#20508483)
You are sure he was never at a university? And why are you drawn to Haskell? For me I only had to deal with it a bit at university and I found the concept interesting, but could not imagine non math people to use it for anything as a language of choice
Re:No CS Degree – Interviews with self-taught developers by tasuki on Tuesday July 23, 2019 @01:37PM (#20508583)
I'm not sure he never was at university, I just assume not [1].

> why are you drawn to Haskell?

I just want my programs to work. I've seen too many null pointer exceptions and other runtime errors. Runtime errors = bad. Compile errors = good.

[1]: https://news.ycombinator.com/item?id=20112065

Re:No CS Degree – Interviews with self-taught developers by hutzlibu on Tuesday July 23, 2019 @02:07PM (#20508826)
"I just want my programs to work"

Me too ...

And I think imperative languages are way more easy and clear to read and write.

I allways imagined that you have to be a math nerd to prefer Haskell, but apparently this guy is not a math guy, but loves Haskell .. so ok, good counterpoint.

Re:No CS Degree – Interviews with self-taught developers by tasuki on Wednesday July 24, 2019 @05:53AM (#20513623)
> And I think imperative languages are way more easy and clear to read and write.

Because it's what you've had exposure to. Perhaps, they're even objectively easier to read and write, I don't know. It's also completely besides my point.

My point was that I want my programs to work as desired. That's orthogonal to how easy it is to read and write. I don't want runtime exceptions where I could've gotten a compile-time error.

Re:No CS Degree – Interviews with self-taught developers by hutzlibu on Wednesday July 24, 2019 @04:02PM (#20519069)
But I had exposure to math functions much earlier. And I never liked their syntax. I did understood the math, but the math language made it harder for me.

And null pointer exceptions? They only happen to me very rarely, when I quickly hack something together and then it is a "oh forgot - and fixed" problem. The problems I do struggle with are non reproducable race condition fun etc. and I doubt haskell could help me with them. Or I struggle, because I do not really understand my problem, or a certain libary ... or, because I misunderstood existing code.

So how on earth are correct programms orthogonal to how easy it is to read and write them?!? Did you ever had to use someone else code? Or your own that you wrote 5 years ago (or sometimes 5 days)?

With any bigger project it is all about how easy it is to read and write them.

Re:No CS Degree – Interviews with self-taught developers by tasuki on Wednesday July 31, 2019 @05:57AM (#20572928)
> And null pointer exceptions? They only happen to me very rarely, when I quickly hack something together and then it is a "oh forgot - and fixed" problem.

And you never run into NPEs in production? It's something you always discover during development? How?

> The problems I do struggle with are non reproducable race condition fun etc. and I doubt haskell could help me with them.

In a pure system, thread race conditions are impossible. You can still get race conditions for your external effects, which is unavoidable.

Re:No CS Degree – Interviews with self-taught developers by joshmn on Tuesday July 23, 2019 @11:19AM (#20507400)
Ouch.
Re:No CS Degree – Interviews with self-taught developers by pmarreck on Tuesday July 23, 2019 @12:39PM (#20508053)
Any functional language, pretty much.

They use enumeration (list/array traversal) to process a list/array of inputs.

And it entirely makes impossible the off-by-one error.

I am happy if I never have to see a for-loop again. (Even in JS, I use iteration/enumeration constructs as much as possible.)

Re:No CS Degree – Interviews with self-taught developers by xmprt on Tuesday July 23, 2019 @01:35PM (#20508561)
I find it hard to believe a beginner with no theoretical CS background would pick up a functional language first. So the question still stands.
Re:No CS Degree – Interviews with self-taught developers by zshrdlu on Tuesday July 23, 2019 @02:57PM (#20509224)
How strange. Why would you find it hard to believe?

It is one of several programming paradigms, after all. Am I missing something?

Re:No CS Degree – Interviews with self-taught developers by pmarreck on Tuesday July 23, 2019 @07:21PM (#20511089)
The "advanced intro CS" class at Cornell (CS 212, at least at the time) used Scheme.

Maybe I should become a high school CS teacher, because I would not curse anyone with a procedural language.

Re:No CS Degree – Interviews with self-taught developers by whatshisface on Tuesday July 23, 2019 @11:04AM (#20507280)
The parent said they didn't know what for-in was, which implies they were using a language like C for their side projects which only has for (i=0;i<n;i++) loops.
Re:No CS Degree – Interviews with self-taught developers by bluedino on Tuesday July 23, 2019 @11:08AM (#20507309)
You can google that in 2 seconds. A CS degree isn't going to help you there if you have not covered a language that uses iterators.
Re:No CS Degree – Interviews with self-taught developers by saagarjha on Tuesday July 23, 2019 @11:25AM (#20507455)
Any self-respecting computer science degree education should cover at least one language that has iterators or enhanced enumeration.
Re:No CS Degree – Interviews with self-taught developers by cabaalis on Tuesday July 23, 2019 @12:09PM (#20507833)
My CS degree (2002-2006) did not explicitly cover "for x in y" iterators. But it did cover an understanding of algorithms and data structures well enough that I could implement one.

Which is better? YMMV.

Re:No CS Degree – Interviews with self-taught developers by 0xDEFC0DE on Tuesday July 23, 2019 @12:50PM (#20508151)
That was probably before they were really in style e.g. C# didn't add foreach / iterators until ~2005 with v2.0 and your curriculum probably lags a bit behind the industry state-of-the-art unless it was Ivy league
Re:No CS Degree – Interviews with self-taught developers by jki275 on Tuesday July 23, 2019 @03:32PM (#20509526)
It has not been very long since CS degrees were taught entirely in C89 or C++98, and there are a lot of us who won't touch Python or Java unless forced to.
Re:No CS Degree – Interviews with self-taught developers by grahamel on Tuesday July 23, 2019 @11:30AM (#20507515)
exactly - I had a similar learning curve (and no CS degree) where I could never remember what certain methods did but I knew exactly what to google for the answer
Re:No CS Degree – Interviews with self-taught developers by k_ on Tuesday July 23, 2019 @11:07AM (#20507302)
That or they only used `while` (and friends if available in the language) loops.
Re:No CS Degree – Interviews with self-taught developers by Nevermindmyview on Tuesday July 23, 2019 @11:25AM (#20507456)
Sounds like you didn't read the parent post carefully? He wrote:

> I didn't know how to write a for loop

If