Live data from Hacker News

Coding Is Hard

duttakapil.com

161–170 of 170 posts

Re: Coding Is Hard

#161
post #98

Earlier quoted context omitted.

A common definition of intelligence is the capacity for problem solving. There are few fields where the capacity for problem solving is more relevant. People do have innate limitations. I agree that it's dangerous to categorize one's self too harshly, but it's also important to understand your own capabilities and limitations. Telling people they have no innate limitations sounds nice, but probably just results in th…

None of that implies an innate inborn limitation. Although I know the concept flatters a lot of people here.

You don't think a lack of intelligence limits people in stem?

Re: Coding Is Hard

#162
post #152

Earlier quoted context omitted.

This is a very insightful comment actually. I think you are right in many ways. My brain is wired to constantly try going fast. Everything I am able to do, is mostly from short bursts of dopamine rush. If that rush slows down or stops, such as when dealing with frustration of not being able to make something work immediately, my brain starts to shut down - and then it's like trying to swim across dry land. Curiosity…

Have you tried out working on multiple projects or tasks at the same time? When I hit a wall, it's often futile to continue working on that single problem. So I'll just leave it as is is for a day and work on something else. When I revisit task one the next day, I often have a fresh approach or I'm able to spot that bug I just couldn't find the previous day. Other devs seem to prefer working very "linearly", but I'm…

I have been thinking to do exactly this lately. Just keep switching between projects when I hit the walls, keep the momentum going somehow

Re: Coding Is Hard

#163

Have been feeling very frustrated this past week working on something. Started wondering if I am dumb or is this actually hard. Decided to write a simple quick blog post on it -

Thanks for writing this.

I have added and removed about 4 million lines of code:

https://github.com/wekan/wekan/graphs/contributors

to WeKan Open Source kanban:

https://wekan.github.io

You are not dumb. It is normal to feel frustrated, when figuring out, step by step, how something works, and what to do. It is like labyrinth. Having enough breaks, taking a walk when needed, having enough coping skills or adding more of them, having patience to keep notes of what is current position in that labyrinth. If some way does not work, try some other way. Getting something working is victory feeling.

It is always about the basics. Many programming languages change syntax often. Some dependencies change.

For example, when writing some for database export:

1) There was no working code examples at documentation

2) Google etc searches had old info, did not work

3) I did not find from source code how it did work

4) ChatGPT, Bing AI etc examples did not work

5) So I tried with trial and error, what is correct syntax, character by character

For some error messages, sometimes Google search shows somebody having same problem, or even a fix. But if not, it's about reading source code of the software.

But this works only when code is available, like in Open Source.

If something is binary executeable, then there is need to decompile, read assembler, deobfuscate, etc. That means even more time required, I have not gone there yet. That is why I use and develop FOSS, when it is possible to more easily fix something, when it is broken.

Re: Coding Is Hard

#164
post #62

Earlier quoted context omitted.

This seems like an uninteresting test. Nobody (almost) is implementing sorting algorithms in their day job. We use libraries. It's like asking people who claim to not struggle with driving basics to change their spark plugs and saying "aha, I new you were an idiot".

Yes but it is basic in the sense that it’s one of the first couple algorithms/data structs mostly everyone has been exposed to. Many knowing what they are and the general principle of how and why they work. That is exactly my point though.. Like what do we consider “basic” exactly? That line becomes blurry in any complex field…

If you don't use something, you forget it. Nobody is writing these algorithms in their job. If you did, it will get flagged in code review, the same way rolling your own crypto does. Which is why I think it's unreasonable to expect people to remember how to implement them off the top of their head.

Re: Coding Is Hard

#165
I’ve been through this and out the other side. I suspect your real problem is just loneliness. Coding used to be harder for me when I was alone.

I have found that doing sessions of coding with colleagues and students— even if they don’t know how to code— seems to make my intelligence come out to play.

My mind seems to need an audience to please.

I wrote about this in my book on self-education: Secrets of a Buccaneer-Scholar

Re: Coding Is Hard

#166

Earlier quoted context omitted.

for i = 0 to n { for j = i to n { if n[j] > n[i] { swap(n[i], n[j] }}}

Except that sorts the list in reverse: https://tio.run/##Vc6xDsIwDATQPV9xYyJ5od2Qyo9UGYhIwFXkVlY68P... (Also a subtle off-by-one error, it should be 0 to |n|-1 and i to |n|-1.)

Thanks for catching the reverse. I was aware of the off by one but thought the “to” operator I invented would be exclusive of the second operand (kinda like range in Python) :)

Re: Coding Is Hard

#167
Coding is hard because most APIs suck. Most APIs

a) contain many leaky abstractions.

b) are unnecessarily complex in order to adhere to a specific ideology.

c) have various gotchas, either documented or undocumented.

d) the basic concepts behind them make sense only to the authors.

e) do not contain any abstractions at all, exposing all raw technical details to the user.

f) many details about their parameters are not documented at all.

g) have undisclosed side effects.

h) not implemented in the same way in different platforms. etc.

With all these and many more, a newcomer to coding can feel lost for many years.

Re: Coding Is Hard

#168
post #14
post #7

> That's when I decided that I didn't need to go to college. I could just teach myself, for free, through all these online resources. > I went through all the tracks, from basic HTML (again) to JavaScript and even Ruby amd Python. And I was super proud of myself for doing just that. I then started this 2-day python crash course... > It's been 10 years since I first started learning how to code. And I still struggle w…

I'll agree with this as a self taught person. I'll admit to being a little shaky on the types of programming needed in enterprise projects at the beginning (less of a focus on maintainable code, but probably more of a focus on what the machine is actually doing), as I only knew exactly what I needed to hack together whatever my hobby project was, but after 5 years of a career and working in 9 different languages it's…

I have been writing JavaScript since JS has existed, and the One Weird Trick I learned to working with JS’s OO system is to use it as little as possible. Don’t get me wrong, objects are wonderful, but you don’t need JS’s barking insane semantics around “this” when static closures work fantastically. It’s not even the prototype model that I’m talking about, it’s having to do things like foo.bar.bind(foo) or having to know that an event handler will re-bind “this” and so on. The Vue and React communities have caught on to this, and writing code for those is so much more pleasant now that there are fewer land mines like that to step on.

Re: Coding Is Hard

#169
post #31
post #21

In my experience it’s not supposed to be that hard, unless you’re working at the cutting edge or on really hard problems. But from what you’ve written it seems like you’re struggling with basic stuff. Maybe you’re still lacking fundamentals? Seems like your strategy so far has been to grind tutorials and crash courses. They will make you feel like you’re learning a lot in a short time but in the end you’ll still not…

The author says he struggled with concepts that are “easy” or supposed to be. In my experience of coding since 6th grade and having been in the industry for quite some time, it’s difficult to say something is supposed to be “easy” or “hard”. The author doesn’t give many concrete examples so it’s possible he is just assuming certain things should be super easy… A lot of programmers I meet love to claim they don’t stru…

> I work with arguably some of “smartest” people on the planet, and even they struggle with basic concepts from time to time, as does everyone. There is simply too much information for any single human to know it all, and learn new things instantly.

This. Many programmers, for some reason, act like skill is a complete order; you are either more skilled or less skilled than someone else. In practice you are just familiar with different things, so if somebody doesn't know something that feels trivial to you, it just means he didn't encounter it in the same way.

Re: Coding Is Hard

#170
post #7

> That's when I decided that I didn't need to go to college. I could just teach myself, for free, through all these online resources. > I went through all the tracks, from basic HTML (again) to JavaScript and even Ruby amd Python. And I was super proud of myself for doing just that. I then started this 2-day python crash course... > It's been 10 years since I first started learning how to code. And I still struggle w…

Yep. Resonates a lot. I've tinkered with code on the side and realised its very hard to do it "part-time".

Learned HTML/CSS in 2012. Built an app in Rails in 2014. Learned basic Javascript in 2018. Delved into React in 2020. Shifted to no-code. Back to Fundamentals in 2023.

I think its hard to really be good at it, but depends on the goal. Most people want to be software engineers for the wrong reasons these days. To me it was always a hobby and if I can build some small useful things for people with just front-end and a database its a win.

Its not easy though. It never was. It requires commitment and patience as well as regularity beyond tinkering with it 1 time a month.

Post reply on HN