Live data from Hacker News

Coding Is Hard

duttakapil.com

151–160 of 170 posts

Re: Coding Is Hard

#151

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 don't mind whether what I'm coding is useful or ends up generating money This is a problem most commonly seen in junior developers. It leads to them making poor decisions that are not aligned with business goals. > I'm glad I program because I enjoy it Spend enough time working in the industry and that will go away. For your mental health's sake, I hope you find a hobby that is unrelated to your job. What you are…

I got burnout from weeks of doing nothing during the pandemic. Think about it. What exactly do you put in your timesheet when you haven't written a single line of code or email or responded to a ticket?

Re: Coding Is Hard

#152

Coding, at least quality coding, is for slow people that are patient enough to study in depth and to get it right eventually. And getting it right can still be incredibly hard. ADHD is certainly not a good starting point. P.S There are certainly a few geniuses who code quickly and well. But they are true exceptions, not enough to run an industry.

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 doing better if I juggle several tasks at once.

Re: Coding Is Hard

#153
Software is a mixture of engineering, art and mathematics.

Everything we build is somewhat broken some of the time and layered on other things that are somewhat broken some of the time, all the way down to the interpreter baked into magic sand which is itself somewhat broken some of the time.

So yeah, the field is intellectually demanding. The top level symptom can be "wrong answer" and the root cause "error in someone's verilog from before tapeout". Or "sometimes it's broken in prod" and the answer "solar flare".

Re: Coding Is Hard

#154
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…

I agree with this.

You'll often see responses like "but many people don't need to write sorting algorithms from scratch in their day to day work, so they're out of practice". But to me this attitude itself is indicative of the issue.

Being able to do this doesn't require sorting algorithms to be well-practiced and fresh in one's mind. It requires a general ability to visualize and reason about simple data manipulations. Which to me is an absolute fundamental for a programmer working in any field.

If the algorithm can be described with a small sketch or a couple of sentences, generally an implementation should just flow for an experienced programmer who has general fluency? For something like bubble sort, the description can be more or less directly translated to code.

The fact that someone even conceives of this as something which needs to me memorized / practiced suggests to me that they might not have that kind of basic working fluency.

Re: Coding Is Hard

#155
Feeling dumb is a good emotion.

You are hitting your intellectual limits, when you feel dumb.

If you didn't 'touch the walls' by feeling dumb, I would wonder how much you're learning.

Re: Coding Is Hard

#156

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

The problem is that people need to know the algorithm you're asking them to implement, which biases it towards memorization. When you tell them how the algorithm works, it feels like you are not testing anything except syntax. If you let people look it up, it feels like you aren't testing anything except their research skills. It is difficult to have a test in a vacuum. It would probably be better to have a test with…

[deleted]

Re: Coding Is Hard

#157
post #64

Earlier quoted context omitted.

> 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…

>This is only hard if you have a hard time grasping loops, conditional comparisons or swaps Or because you don't know the algorithm in question... The problem isn't bubble sort but any generic algorithms test. The examiner wants you to write code but not tell you the specification because it would be shockingly similar to telling you the solution. When I read a post on HN about inverting a tree I was wondering how ex…

> Or because you don't know the algorithm in question

I don't think anyone would care if you did an insertion sort or some other brute force way to sort. Brute force sorting in general is trivial to come up with.

Re: Coding Is Hard

#158
post #79

Earlier quoted context omitted.

> All you have to do is "compare and swap" and loop through until you are done, this is way easier than Fizzbuzz. I think you have this wrong, Fizzbuzz is actually completely trivial to the point where the problem statement is almost literally (modulo modulo) a description of the algorithm. Bubble sort is very easy but it's not literally trivial to the same degree as Fizzbuzz!

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.)

Re: Coding Is Hard

#159

Earlier quoted context omitted.

> I don't mind whether what I'm coding is useful or ends up generating money This is a problem most commonly seen in junior developers. It leads to them making poor decisions that are not aligned with business goals. > I'm glad I program because I enjoy it Spend enough time working in the industry and that will go away. For your mental health's sake, I hope you find a hobby that is unrelated to your job. What you are…

58, been programming since 13. Still enjoy it. Still both a hobby and a job

I think programmers are like writers.

Those who are good at it and love it don't simply retire. They just decrease their hours and continue their craft for as long as they have the health and energy. It probably leads to more healthy years to have something like this.

Re: Coding Is Hard

#160
post #126

Earlier quoted context omitted.

one man's luxury... how did you learn to program computers without computers around?

I didn't either as a kid. I had one of those British Usborne Publishing computer books - one of their intros involved paper only with a long roll of instructions you wrote out and pulled through a cardboard "window" for the current instruction while you kept track of variables on a sheet of paper. I soon figured out you didn't really need the roll and cardboard window, and could just do the while thing on normal shee…

Yeah the "Trash80" was the first computer I actually used, the display model at the local Tandy Electronics store.

It was so very barebones with less than 2K free memory if I recall correctly. Later I found another local electronics store with a C64 which was bliss.

Post reply on HN