Live data from Hacker News

On finally learning to program at the age of 40

github.com

51–60 of 169 posts

Re: On finally learning to program at the age of 40

#51
post #48

I'm in this boat. Finally started programming in 2018 at age 38 after a lifetime of playing around with computers as a hobby (thanks, dad!) and a first career in a completely unrelated field, as an attorney. The linked article is about learning for pleasure, but there are also challenges associated with trying to enter the field as a second career. The technical complexity, of course, and the scale of what needs to b…

If you don't mind me asking, why would one give up a cushy, well paid attorney career and choose software engineering? Software engineering compensation _tops out_ below where an experienced attorney compensation _begins_. The least I've ever paid a lawyer was $250/hr.

maybe there are too many lawyers and the field is thus not as well remunerated as you think https://www.thoughtco.com/are-there-too-many-lawyers-4026025

Re: On finally learning to program at the age of 40

#52
I remember discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was, so that halted my progress.

I rediscovered it as a teenager in highschool and wound up making a basic platform game with a mess of shitty spaghetti code goto statements and drawing lines on the screen. It was great. My dad wanted to encourage me but didn't know how, so he got me a C++ book from the library but it just made no sense and I couldn't get anywhere.

Fast forward to being 23 and deciding what to major in at University. I rediscovered the idea of programming and instantly fell back in love with it. I remember blowing through the entire first semester textbook in 2 weeks and really getting it. It felt like a super power had finally been unlocked. Still does.

I was so glad to reconnect with programming. I always feel I would have been an absolute whizz kid by now if I had really picked it up when I was a teenager and part of me is a little sad about that.

Re: On finally learning to program at the age of 40

#53
post #44
post #36

Earlier quoted context omitted.

No it's not quadratic: since there is at most one conflict it will be linear.

It depends how you count. Is string reversion an O(1) or O(N) operation with N the string length? I believe is is O(N) and if you loop over it N times thats O(N^2), isnt it?

I didn't want to post code, but I guess it's the only way I can see to settle the debate. This should be manifestly linear.

    def check(s):
        is_palindrome = lambda s: s == s[::-1]
        if is_palindrome(s):
            return True
        d = [a==b for a, b in zip(s, s[::-1])].index(False)
        return is_palindrome(s[d+1:len(s)-d]) or is_palindrome(s[d:-d-1])
edit: It must be len(s)-d rather than -d, to handle d=0.

Re: On finally learning to program at the age of 40

#54

I remember discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was, so that halted my progress. I rediscovered it as a teenager in highschool and wound up making a basic platform game with a mess of shitty spaghetti code goto statements and drawing lines on the screen. It was great. My dad wanted to encourage me but didn't know how, so he got me a C++ book from the librar…

Be that whiz kid now. You needed time to “kid” and now you have time to program.

Re: On finally learning to program at the age of 40

#56
I am a nudge over 40 and learning to discovers the joys of programming again. I am on the product side, have coded in the past around a decade ago (C++) as part of a rotation scheme at company and learnt BASIC in school.

The thing that got me interested in this again was the excellent 'Automate the Boring Stuff with Python' https://automatetheboringstuff.com/.

This was my best lockdown read so far. I have used it automate some dumb stuff I have to do at work (moving mouse clicking). Get real-time custom alerts on my bank transactions and a develop an app that logs into a site, searches keywords, scrapes results and sends me an email each morning.

Can't recommend the book highly enough.

Re: On finally learning to program at the age of 40

#57

I remember discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was, so that halted my progress. I rediscovered it as a teenager in highschool and wound up making a basic platform game with a mess of shitty spaghetti code goto statements and drawing lines on the screen. It was great. My dad wanted to encourage me but didn't know how, so he got me a C++ book from the librar…

> discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was

i started off programming with qbasic as well -- i remember when i finally figured out what arrays were and how to use them -- now if i wanted to animate many enemies/projectiles i didn't need to keep copying and pasting and defining more and more variables for each new entity! magic! at some point i got hold of a copy of darkbasic (a basic product with simple access to input, 2d graphics and sound) and made some home-brewed space invaders knock off -- all of the entity state was encoded as some horrible huge 2d array -- one index for entity id, the other index for attribute. probably all attributes were stored as integers, with different meanings depending upon the entity type, also stored as an int in one of the columns.

Re: On finally learning to program at the age of 40

#58
post #48

Earlier quoted context omitted.

If you don't mind me asking, why would one give up a cushy, well paid attorney career and choose software engineering? Software engineering compensation _tops out_ below where an experienced attorney compensation _begins_. The least I've ever paid a lawyer was $250/hr.

maybe there are too many lawyers and the field is thus not as well remunerated as you think https://www.thoughtco.com/are-there-too-many-lawyers-4026025

$250 is generic "business contract review" lawyer. Not any kind of distinguished legal scholar. And I had to look pretty hard to find a decent one that didn't cost twice that.

Re: On finally learning to program at the age of 40

#59
I think Turbo Pascal was the perfect language to learn programming. It has a simple core, a static type system without much bells and whistles but that's more solid than the C crazyness, it doesn't force the student to learn 10 different concepts at the same time before writing HelloWorld (unlike Java and other OO languages), but it teaches thinking about types and not only values (unlike scripting languages).

Sadly it's basically dead now.

Re: On finally learning to program at the age of 40

#60

I remember discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was, so that halted my progress. I rediscovered it as a teenager in highschool and wound up making a basic platform game with a mess of shitty spaghetti code goto statements and drawing lines on the screen. It was great. My dad wanted to encourage me but didn't know how, so he got me a C++ book from the librar…

Be that whiz kid now. You needed time to “kid” and now you have time to program.

I am, but at 32 I'll be that whiz kid by 40. Heck, I'll take that. I love mastering the craft and getting deeper and deeper into it each year. It's rewarding. Though being a decade ahead would be pretty astounding.

That being said in just 7 short years I've gotten onto doing platform level development and having a great time doing it, so I'm pretty much right where I want to be.

Post reply on HN