Live data from Hacker News

Coding Is Hard

duttakapil.com

141–150 of 170 posts

Re: Coding Is Hard

#142
If you're doing CS50 and struggling with the exercises, I think this points to a problem with your study habits. I had the same problem for the first few years of my programming career (and honestly still fall into the same trap from time to time). I'd work my way through entire Codecademy "courses", receive a congratulatory message at the end, and then realize I hadn't actually learnt anything at all. I'd just been following instructions.

The key is to keep testing whether you can do the work cold, with no-handholding, at every step of the way. The steps to follow are the same ones they gave us in elementary school when we were learning how to spell: look, cover, write, check. First, look at the information until you feel you understand it, then cover it up and try to replicate it cold, and finally check your work against the original to see where you went wrong. If you can successfully close that loop over and over again, your brain will learn. It has no choice.

Re: Coding Is Hard

#143

If you're doing CS50 and struggling with the exercises, I think this points to a problem with your study habits. I had the same problem for the first few years of my programming career (and honestly still fall into the same trap from time to time). I'd work my way through entire Codecademy "courses", receive a congratulatory message at the end, and then realize I hadn't actually learnt anything at all. I'd just been…

Introductory CS courses (and engineering courses in general) can take a lot of time, especially if you are learning the material for the first time (which many people in the class probably are not!)

Many CS courses that I am familiar with (particularly systems courses and programming/project courses) can take something like 20 hours a week rather than the 5-10 that a regular undergraduate course might take. The best approach in my opinion is to not overload yourself when you are taking such a course - either pad your schedule with less time-intensive courses or take fewer units.

I'm actually in favor of handholding - particularly getting help from course assistants, attending practice sessions, attending office hours, etc. Individualized instruction can help a lot, and at a university you're paying for it regardless of whether you take advantage of it. Some schools even employ a small army of course helpers and section leaders (often selected from the previous cohort) to provide individualized instruction, and I think it really helps more students to succeed and have fun.

Self-study can be much harder than formal study because you may not have people like the course staff to help you out (though it's good if you can find someone!) Also you may not be able to cut back your workload outside of the course. On the up side, you can proceed at your own pace and don't have to worry about being left behind!

> CS50 at the same time and had challenged myself to finish the 12 week course within 4 weeks.

I'd recommend spending the full 12 weeks. This gives you more time to put in the effort and I think taking more time - and having more nights to sleep on the material - helps with retention.

Re: Coding Is Hard

#144
post #25
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 still struggle after 15 years into programming, and I never published or finished anything because of "judgement anxiety". I waste days, weeks, months writing and rewriting code and then I decide to abandon it because "other developers are going to see how shitty of a developer I am and it'll jeopardize my reputation forever".

You may not realize just how terrible much of production code actually is! ;-)

There is some source code I've looked at that I thought was clear and easy to understand (at the time at least. I also like simple C/C++ code that compiles with "make", ideally with minimal #ifdefs and without lengthy configure scripts.) This is very rare in my experience, although I really like to see it!

Seriously, building things that are fun and interesting to you and getting them to work is one of the best things you can do. Once you have something working then you can decide whether you can just clean up your existing implementation or whether you want to reorganize it or rewrite it completely, but you'll be at the point where you understand your problem and its solution.

Re: Coding Is Hard

#145

Earlier quoted context omitted.

I have been giving advice to a person, young also (16 years old) and he thinks he can go very far very quickly. I told him to be patient, to insist, to commit time learning not only typical courses of how to code your website with a database. In fact I gave him advice against doing that first. I adviced him to learn binary/hex, algorithms, data structures and structured programming as a minimum. Also how a machine wo…

Something I have realized with my struggles in learning how to program is that it's as much a philosophy of how we get a computer to solve a problem as it is an experience learning the structure and syntax of a new language. Coming at it from a complete newbie perspective I don't even know what I don't know, so therefore I can't begin to learn what I should . At best, I can memorize how to do basic things but I don't…

> I don't understand the fundamentals of how those things work, or why they were designed that way

The problem with not understanding things is that when you face a new problem or things crash or go wrong you get totally lost and do not know how to proceed at all.

Another recommendation if you want to learn is that you use a terminal and an editor. Nothing else. You will see things closer to how they work. You will be aware you are launching a script or compiling a file. You will see the output files, you will understand there is a compiled file to be run. You will see if it is native code you run it directly but if it is compiled to bytecode you need a VM, etc.

That is part of the details one must be aware of.

Re: Coding Is Hard

#146
Coding has always been easy and fun for me. I taught myself assembler programming when I was 11 on a ZX-Spectrum and have been coding ever since. Professionally (30+ years) and for fun. I know coding is super hard for most people but for some reason it just fits my brain. Perhaps you need the right brain structure to find coding easy? Not sure …

Re: Coding Is Hard

#147
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 don’t know, I only bother to finish projects for work. With personal projects, it always ends up following the 20/80 rule — 20% of the code produces 80% of the value. The remaining 80% of code is largely uninteresting busywork and just isn’t worth the effort for a pet project.

But it’s definitely worth implementing the core concepts in total, both for whatever goal and your own learning. The rest just needs a working mental model, but actually implementing is a waste

As an aside, I’ve found this also holds true for most games, and stopped bothering to finish them (you can usually understand most games in total very quickly, largely because their systems are so shallow)

Re: Coding Is Hard

#148
post #31

Earlier quoted context omitted.

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 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 multiple steps.

Exercise 1:

a) Research the topic bubble sort. Explain what bubble sort does and write some notes or pseudo code that will help you implement it. Once you are done, we will disable internet access and close your browser.

b) Write a working bubble sort in COMPANY LANGUAGE.

c) Modify the bubble sort so that it can sort by multiple columns.

The first tests your research skills, the second your syntax skills and the third your ability to deal with changing requirements and implement novel functionality without research.

Re: Coding Is Hard

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

>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 exactly you are supposed to invert the child and parent relationship so that children point to parents instead of parents pointing to children. I.e. leaf nodes are now at the root and the root node is where the leaf nodes are supposed to be. Then someone said "He meant reversing the tree" and I'm like "That is not what he said."

Re: Coding Is Hard

#150

Earlier quoted context omitted.

I have been giving advice to a person, young also (16 years old) and he thinks he can go very far very quickly. I told him to be patient, to insist, to commit time learning not only typical courses of how to code your website with a database. In fact I gave him advice against doing that first. I adviced him to learn binary/hex, algorithms, data structures and structured programming as a minimum. Also how a machine wo…

Something I have realized with my struggles in learning how to program is that it's as much a philosophy of how we get a computer to solve a problem as it is an experience learning the structure and syntax of a new language. Coming at it from a complete newbie perspective I don't even know what I don't know, so therefore I can't begin to learn what I should . At best, I can memorize how to do basic things but I don't…

You probably don't know how valuable motivation is. I learned that lesson only three years ago. It is so easy to simply do nothing both when you are motivated and not motivated. You don't need to know how write lua if you can inspire your son to build things with it. In the last three years, I have probably had more ideas of things that I want to do than in the two decades before that.

When I was 16, I had software skills but was clueless about what to actually build. Now I know what to do and don't have enough time to do it. The idea of grinding two hours a week just doesn't work for me. I want to do things in bursts. Like working 10 hours on it and then weeks of nothing.

Post reply on HN