Live data from Hacker News

Coding Is Hard

duttakapil.com

111–120 of 170 posts

Re: Coding Is Hard

#111
>I forget how something was setup in some section of some file, and write code in another file and it just breaks the entire logic. I feel frustrated that I cannot upload and maintain the entire logical map of even this very small and simple codebase in my mind.

This is a sign of technology with insufficient abstraction. Computation has largely been built on the shoulders of giants with a "You shouldn't need to know" mentality.

Think of code in abstract "bits" of information (not necessarily in the data/ram/storage sense)...

The more bits of information from seemingly unrelated sources that you must retain, the worse the codebase is. In the worst case editing 1 bit of source code flips 50% of the remaining bits, ie perfect obfuscation.

In a perfect code base, changing a bit would flip no other bits (say in other packages), because all of the change would be perfectly contained.

There is a pragmatic balance due to timelines, brevity, reaching perfect abstraction might itself be more complex than an "imperfect" implementation, and the sheer ingenuity of it might challenge or exceed some of our IQs (certainly mine).

Re: Coding Is Hard

#112
One problem I see here is the desire to learn to code in some abstract sense, to prove something, even to understand CS, rather then starting from a simple project and asking yourself what you absolutely need to learn to do it.

Re: Coding Is Hard

#113
I'm mostly just riffing off the title but, as a programmer of 45 years I do often find programming hard or programming related things hard

Recent experience, trying to get any deep learning to run on my machine. Instructions all over the place about installing python, conda, making a virtual environment, installing certain libraries and when I finally get to the "run" command it doesn't work.

Similarly using many new libraries/frameworks, getting stuck on some detail and having to spend 20, 40, 60, 120 minutes trying to find a solution. This happened a lot, and still does, getting up to speed with TypeScript, not knowing how to express the types needed for some complex thing and not knowing how to even ask the question to get an answer. Posting on S.O. will just get closed but I don't necessarily know how to search for the answer. Recently I even tried asking ChatGPT but it failed too.

That said, I also understand, that there are many concepts I intuitively know that someone like the OP does not and that it's very hard to remember what it was like to not understand it. Pointers, pass by value, pass by reference, maps, stacks, race conditions, promises, file manipulation, memory, binary, hex, various math and solutions. Getting to the point that all of those things and more are 2nd nature is basically spending time coding for years just like becoming a good guitar player is spending time practicing for years

Re: Coding Is Hard

#114
post #104

got reminded of this video while reading through your blog: https://youtu.be/bkogwxzjwfI?si=9LmyTtB4zWXNLZQK .

Great video. The video suggests that people should be prepared to expect anything worthwhile to be seriously difficult, even painful.

It's difficult to keep working on something when you thought it would be easy but is actually hard.

The author of the original post seems like he thought coding would be easy and now is disillusioned because coding requires more than he expected.

To work through programming problems, it really helps to be curious and want to learn why something failed. If you don't understand why, you're clearly just changing things until they work. Programming is seriously punishing to those who try do things without understanding why.

Re: Coding Is Hard

#115

Get a 1-on-1 mentor/tutor. It's possible the things you're trying to do are just too difficult, but you are incorrectly assuming that they are easy and that everyone can do them. (This is especially common in game development - someone wants to create a 3D open-world MMO, not realizing that such projects typically take years to develop, even for teams of dozens or hundreds of engineers and artists.) It's possible the…

Absolutely. There are very few 100% self-taught experts in ANY field. Teachers and mentors are critical in helping you focus your efforts and prevent you from spinning your wheels.

Re: Coding Is Hard

#116
post #64

Earlier quoted context omitted.

I don't think writing bubble sort from scratch without mistakes is necessarily a good demonstration of someone's ability to "handle the basics" Realistically you will never need to write it yourself unless you're coding in some very specific domains It's at most a signal for whether or not they remember algorithms 101 or some leetcode exercise, but knowing that they do remember isn't really useful to me

> It's at most a signal for whether or not they remember algorithms 101 or some leetcode exercise, but knowing that they do remember isn't really useful to me For bubble sort? Do you really think anyone should have to remember an algorithm to write a quadratic time sort? All you have to do is "compare and swap" and loop through until you are done, this is way easier than Fizzbuzz. This is only hard if you have a hard…

[deleted]

Re: Coding Is Hard

#117
To OP: if pride is the only thing stopping you from dropping programming then that's a personal character development milestone for you. It does not come easy for many of us to admit that we cannot win all the battles. Been there, can relate, at the same time I'd advise you (over a beer) to shift your perspective towards the limited time you have on this Earth and to pick your battles and fight only those where you feel strong and on your own turf. Super long discussion though, one reserved for your closest circle of relatives and friends.

But, if you do decide to keep at programming:

1. Pick a much stricter language, with a strong static typing system -- like Rust. It might be too difficult and frustrating though, and I'd understand if it's a bridge too far. It that's indeed the case then pick Golang, it's a good compromise between productivity and strictness.

2. Write more tests. And I mean much more tests. From your article, you seem to have the problem of rushing too much and never stopping and establishing a solid ground before proceeding. Writing tests guaranteeing that what you wrote before will keep working will keep you in check and help you stop and think harder on how to fix the current problem.

I might be misreading your post, but you seem to be impatient. One more thing I completely relate to but it won't ever get you anywhere, sadly. Work hard on breaking down your tasks into smaller chunks and crossing them out as you progress -- works wonders for motivation.

Good luck.

Re: Coding Is Hard

#118

Whenever I see someone like this on HN – someone whose motivation is to build a large company and make a lot of money, someone who is an "idea guy," someone for whom programming is merely a means to an end – I'm glad I'm not like this. I'm grateful that programming itself is genuinely fun to me, that I don't mind whether what I'm coding is useful or ends up generating money. I'm glad I program because I enjoy it, not…

> I'm grateful that programming itself is genuinely fun to me

> I don't mind whether what I'm coding is useful or ends up generating money

you can have it both ways; i'm happy that I enjoy it _and_ i'm happy it's useful to others :)

Re: Coding Is Hard

#119
post #87
post #51

Earlier quoted context omitted.

> there is no pile of crap deep enough you cant peek under. no bug you shouldn't be able to find, I mean, yea, technically? But when the codebase gets very big, it can become intractable to chase every issue down. > given enough time. Okay sure. One often isn't given enough time though, if it's for a job.

That's the trick. You should not chase every issue down. You should prioritize, but give one issue you should be able to chase it down and get to the bottom of it. So it's not about actually taking om the task of solving every issue, it's about the capability of solving any issue you deem worth solving.

Yea that's fair

But I wouldn't describe it as a feeling of absolute agency. More like pressure-induced minor chaos

Re: Coding Is Hard

#120
The last compiler I wrote needed to be translated to another implementation language. The translator found one bug in it. It was effectively bug free. I am a good coder. I recognize most of these feelings though. Struggling through them is part of my process. I also have lots of ways of working that help me -- I take copious notes for example. Sketch a lot. Talk to others. Staying isolated is a way of staying stuck. Good luck.
Post reply on HN